.gallery-container { text-align: center; } .gallery-container>.page-container:not(:first-child) { display: none; } .gallery-container>.page-container>img { width: 20%; min-width: 200px; margin: 0.5%; aspect-ratio: 16/9; object-fit: cover; cursor: pointer; } @media (max-width: 1000px) { .gallery-container>.page-container>img { width: 40%; } } .gallery-container>.page-container>.empty { width: 20%; min-width: 200px; margin: 0.5%; aspect-ratio: 16/9; display: inline-block; background: #222; } .gallery-container .pages { display: flex; align-items: center; justify-content: center; } .gallery-container .pages>.page { display: flex; align-items: center; justify-content: center; width: 30px; height: 30px; margin: 5px; cursor: pointer; } .gallery-viewer { position: fixed; display: flex; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.5); opacity: 0; transition: all 0.5s ease; align-items: center; justify-content: center; z-index: 10000; top: 0; left: 0; visibility: hidden; } .gallery-viewer.opened { opacity: 1; visibility: visible; }