p { font-size: 1.2rem; margin-bottom: 1rem; } .gallery-wrap { position: relative; width: 100%; height: 100vh; display: flex; align-items: center; justify-content: center; overflow: hidden; } .gallery { position: relative; width: 100%; height: 100%; flex: none; } .gallery__item { background-position: 50% 50%; background-size: cover; flex: none; position: relative; img { object-fit: cover; width: 100%; height: 100%; } } .gallery--bento { display: grid; gap: 1vh; grid-template-columns: repeat(3, 32.5vw); grid-template-rows: repeat(4, 23vh); justify-content: center; align-content: center; } .gallery--final.gallery--bento { grid-template-columns: repeat(3, 100vw); grid-template-rows: repeat(4, 49.5vh); gap: 1vh; } .gallery--bento .gallery__item:nth-child(1) { grid-area: 1 / 1 / 3 / 2; } .gallery--bento .gallery__item:nth-child(2) { grid-area: 1 / 2 / 2 / 3; } .gallery--bento .gallery__item:nth-child(3) { grid-area: 2 / 2 / 4 / 3; } .gallery--bento .gallery__item:nth-child(4) { grid-area: 1 / 3 / 3 / 3; } .gallery--bento .gallery__item:nth-child(5) { grid-area: 3 / 1 / 3 / 2; } .gallery--bento .gallery__item:nth-child(6) { grid-area: 3 / 3 / 5 / 4; } .gallery--bento .gallery__item:nth-child(7) { grid-area: 4 / 1 / 5 / 2; } .gallery--bento .gallery__item:nth-child(8) { grid-area: 4 / 2 / 5 / 3; } .section { padding: 2rem 5rem; }