/* =========================================================
   Galéria page — tabs, grid, lightbox
   ========================================================= */

.gallery {
    padding-top: 118px;
}

.gallery-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.gallery-head h2 {
    margin-top: 16px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.gallery-grid[hidden] {
    display: none;
}

.gallery-grid img {
    width: 100%;
    height: 270px;
    object-fit: cover;
    border-radius: 3px;
    cursor: zoom-in;
    transition: opacity .25s ease;
}

.gallery-grid img:hover {
    opacity: .86;
}

@media (max-width: 900px) {
    .gallery-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 560px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }
}

/* --------------------------- LIGHTBOX --------------------------- */

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 60;
    background: rgba(28, 20, 15, .95);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 56px;
    cursor: zoom-out;
}

.lightbox[hidden] {
    display: none;
}

.lightbox img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 3px;
    box-shadow: 0 30px 90px rgba(0, 0, 0, .5);
    cursor: default;
}

.lightbox-btn {
    position: absolute;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    border: 1px solid rgba(247, 242, 234, .35);
    background: transparent;
    color: var(--cream);
    font: 400 20px/1 var(--font-sans);
    cursor: pointer;
}

.lightbox-close {
    top: 26px;
    right: 30px;
}

.lightbox-prev {
    left: 26px;
    width: 48px;
    height: 48px;
}

.lightbox-next {
    right: 26px;
    width: 48px;
    height: 48px;
}

@media (max-width: 600px) {
    .lightbox {
        padding: 20px;
    }
}
