/* ==========================================================================
   GALLERY PAGE — Full photo gallery
   ========================================================================== */
body.gallery-page {
    background: var(--white);
    user-select: auto;
}

/* ---------------------------------------------------------------------
   Page header
   --------------------------------------------------------------------- */
.gallery-page-section {
    padding: 3.5rem 0 7rem;
}

.gallery-page-head {
    max-width: 720px;
    margin: 0 auto 3.5rem;
    text-align: center;
}

.gallery-page-head .eyebrow {
    display: block;
}

.gallery-page-lede {
    margin: 1rem 0 0;
    color: var(--muted);
    font-size: 1.05rem;
}

/* ---------------------------------------------------------------------
   Image grid
   --------------------------------------------------------------------- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
}

.gallery-item {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 20px;
    aspect-ratio: 4 / 3;
    background: var(--secondary);
    padding: 0;
    width: 100%;
    cursor: zoom-in;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.gallery-item:hover img,
.gallery-item:focus-visible img {
    transform: scale(1.06);
}

.gallery-item-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    padding: 1.1rem 1.3rem;
    background: linear-gradient(to top, rgba(18, 17, 15, 0.65), rgba(18, 17, 15, 0) 55%);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.gallery-item:hover .gallery-item-overlay,
.gallery-item:focus-visible .gallery-item-overlay {
    opacity: 1;
}

.gallery-item-name {
    color: var(--white);
    font-size: 0.95rem;
    font-weight: 600;
}

/* ---------------------------------------------------------------------
   Lightbox
   --------------------------------------------------------------------- */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(10, 9, 8, 0.92);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-base);
    padding: 1.5rem;
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-figure {
    position: relative;
    max-width: 92vw;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.lightbox-img {
    max-width: 92vw;
    max-height: 78vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.45);
}

.lightbox-caption {
    color: var(--white);
    font-size: 0.95rem;
    text-align: center;
    opacity: 0.85;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: fixed;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    font-size: 1.2rem;
    border: 1px solid var(--border-light);
    transition: background var(--transition-base), color var(--transition-base);
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    background: var(--accent);
    color: var(--white);
}

.lightbox-close {
    top: 1.5rem;
    right: 1.5rem;
}

.lightbox-prev,
.lightbox-next {
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-prev {
    left: 1.5rem;
}

.lightbox-next {
    right: 1.5rem;
}

/* ---------------------------------------------------------------------
   Responsive
   --------------------------------------------------------------------- */
@media (max-width: 991.98px) {
    .gallery-page-section {
        padding: 2.5rem 0 5.5rem;
    }

    .gallery-page-head {
        margin-bottom: 2.5rem;
    }
}

@media (max-width: 767.98px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 0.9rem;
    }

    .lightbox-close,
    .lightbox-prev,
    .lightbox-next {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .lightbox-close {
        top: 0.8rem;
        right: 0.8rem;
    }

    .lightbox-prev {
        left: 0.8rem;
    }

    .lightbox-next {
        right: 0.8rem;
    }
}
