/* ============================================================
   GALLERY PAGE – HERO
============================================================ */

.hero.gallery-hero {
    min-height: 42vh;
    padding-top: calc(var(--nav-h) + 40px);
    padding-bottom: 40px;
    text-align: center;
}

.hero.gallery-hero h1 {
    font-size: clamp(46px, 6.2vw, 68px);
}

.hero.gallery-hero p {
    font-size: clamp(18px, 3vw, 24px);
    max-width: 620px;
    margin-inline: auto;
    margin-top: 8px;
    color: var(--gold);
}

@media (max-width: 900px) {
    .hero.gallery-hero {
        padding-top: calc(var(--nav-h) + 24px);
        padding-bottom: 30px;
    }
}

/* ============================================================
   GALLERY SECTION – DARK BAND
============================================================ */

.gallery-section.content-section {
    position: relative;
    padding: clamp(40px, 7vw, 60px) 20px;
    /* the wave texture is baked into --band-grad now */
    background: var(--band-grad);
    color: #fff;
}

/* Full-width gold divider between hero and gallery band */
.gallery-section::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: -12px;
    height: 12px;
    background: linear-gradient(90deg, var(--gold), #ffe29b);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
    z-index: 2;
}

.gallery-section .section-inner {
    position: relative;
    z-index: 1;
}

.gallery-heading h2 {
    color: #ffffff;
    letter-spacing: 0.13em;
    position: relative;
}

.gallery-heading h2::after {
    content: "";
    display: block;
    width: min(400px, 78%);
    height: 3px;
    margin-top: 12px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--gold) 0%, var(--gold) 35%, rgba(246, 196, 83, 0) 100%);
}

.gallery-heading p {
    margin: 8px 0 0;
    color: rgba(255, 255, 255, 0.92);
    font-size: clamp(18px, 1.7vw, 22px);
    line-height: 1.7;
}

/* ============================================================
   FILTER CHIPS
============================================================ */

.gallery-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: clamp(18px, 3vw, 26px) 0 22px;
}

.filter-chip {
    /* 44px tall hit target */
    padding: 11px 20px;
    min-height: 44px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    font-family: inherit;
    font-weight: 700;
    font-size: 15px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    transition:
        background 0.18s ease,
        color 0.18s ease,
        border-color 0.18s ease,
        transform 0.18s ease,
        box-shadow 0.18s ease;
}

.filter-chip:hover {
    background: rgba(255, 255, 255, 0.14);
    transform: translateY(-1px);
}

.filter-chip:active {
    transform: translateY(1px);
}

.filter-chip[aria-pressed="true"] {
    background: linear-gradient(135deg, var(--gold), #ffe29b);
    color: #281505;
    border-color: transparent;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.3);
}

.filter-chip:focus-visible {
    outline: 3px solid var(--gold);
    outline-offset: 3px;
}

/* ============================================================
   MASONRY GRID
============================================================ */

.gallery-grid {
    columns: 3 300px;
    column-gap: 16px;
}

/* On phones `columns: 3 300px` collapses to ONE 358px column, so every
   photo blew up full-width and portrait shots ate a whole screen. Two
   narrower columns spread the set properly and halve the scroll. */
@media (max-width: 700px) {
    .gallery-grid {
        columns: 2 auto;
        column-gap: 10px;
    }

    .gallery-item {
        margin-bottom: 10px;
        border-radius: 14px;
    }

    .gallery-item figcaption {
        padding: 8px 10px 10px;
        font-size: 0.82rem;
        line-height: 1.45;
    }
}

/* Very narrow phones: one column reads better than two slivers */
@media (max-width: 380px) {
    .gallery-grid {
        columns: 1 auto;
    }
}

.gallery-item {
    position: relative;
    break-inside: avoid;
    margin: 0 0 16px;
    border-radius: 18px;
    overflow: hidden;
    background: #041b1b;
    box-shadow:
        0 12px 26px rgba(0, 0, 0, 0.4),
        0 3px 10px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(0, 0, 0, 0.4);
}

.gallery-item.is-hidden {
    display: none;
}

.gallery-item__btn {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: none;
    cursor: zoom-in;
    line-height: 0;
}

.gallery-item__btn:focus-visible {
    outline: 3px solid var(--gold);
    outline-offset: -3px;
}

.gallery-item img {
    display: block;
    width: 100%;
    height: auto;
    transition: transform 0.35s ease;
}

@media (hover: hover) and (pointer: fine) {
    .gallery-item:hover img {
        transform: scale(1.035);
    }
}

.gallery-item figcaption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 30px 14px 12px;
    background: linear-gradient(to top, rgba(2, 20, 20, 0.88), rgba(2, 20, 20, 0));
    color: #fff;
    font-size: 14.5px;
    font-weight: 600;
    letter-spacing: 0.02em;
    line-height: 1.4;
    pointer-events: none;
}

/* Empty-state message */
.gallery-empty {
    margin: 18px 0 0;
    font-style: italic;
    color: rgba(255, 255, 255, 0.85);
}

/* ============================================================
   BOTTOM CTA
============================================================ */

.gallery-cta {
    margin-top: clamp(28px, 4vw, 40px);
    padding-top: clamp(20px, 3vw, 28px);
    border-top: 1px dashed rgba(255, 255, 255, 0.25);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px 28px;
    flex-wrap: wrap;
}

.gallery-cta p {
    margin: 0;
    font-size: clamp(18px, 1.6vw, 22px);
    font-weight: 700;
    color: rgba(255, 255, 255, 0.95);
}

.gallery-cta__actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.gallery-cta .btn {
    padding: 10px 24px;
    font-size: 16px;
}

@media (max-width: 640px) {
    .gallery-cta {
        flex-direction: column;
        text-align: center;
    }

    .gallery-cta__actions {
        width: 100%;
        max-width: 420px;
        flex-direction: column;
    }

    .gallery-cta .btn {
        width: 100%;
    }
}

/* ============================================================
   LIGHTBOX (extends the shared pattern with nav + caption)
============================================================ */

.lightbox {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1200;
}

.lightbox.is-open {
    display: flex;
}

.lightbox__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(3, 28, 28, 0.84);
    backdrop-filter: blur(6px);
}

.lightbox__dialog {
    position: relative;
    margin: 0;
    max-width: min(1040px, 92vw);
    max-height: min(84vh, 760px);
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid rgba(246, 196, 83, 0.55);
    box-shadow:
        0 18px 40px rgba(0, 0, 0, 0.6),
        0 4px 14px rgba(0, 0, 0, 0.35);
    background: #06302f;
    z-index: 1;
}

.lightbox__dialog img {
    display: block;
    max-width: 100%;
    max-height: min(84vh, 760px);
    width: auto;
    height: auto;
    margin: 0 auto;
    object-fit: contain;
}

/* Close + nav — thin gold rings, same family as the carousel arrows */
.lightbox__close {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    border: 1.5px solid rgba(246, 196, 83, 0.85);
    background: rgba(3, 26, 26, 0.55);
    color: var(--gold);
    font-size: 19px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 3;
    transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.lightbox__close:hover {
    background: var(--gold);
    color: #163232;
    transform: translateY(-1px);
}

.lightbox__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 999px;
    border: 1.5px solid rgba(246, 196, 83, 0.85);
    background: rgba(3, 26, 26, 0.55);
    color: var(--gold);
    font-size: 24px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 3;
    transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.lightbox__nav:hover {
    background: var(--gold);
    color: #163232;
}

.lightbox__nav--prev {
    left: 10px;
}

.lightbox__nav--next {
    right: 10px;
}

/* Caption — brand caption bar with a gold left edge (story-shot style) */
.lightbox__caption {
    position: absolute;
    left: 0;
    bottom: 0;
    max-width: min(86%, 640px);
    padding: 9px 18px 10px;
    background: rgba(6, 48, 47, 0.94);
    border-left: 3px solid var(--gold);
    border-top: 1px solid rgba(246, 196, 83, 0.35);
    color: #fff;
    font-size: 14.5px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-align: left;
    pointer-events: none;
    z-index: 2;
}

.lightbox__caption:empty {
    display: none;
}

@media (max-width: 640px) {
    .lightbox__nav {
        width: 38px;
        height: 38px;
        font-size: 22px;
    }

    .lightbox__caption {
        padding: 22px 48px 10px;
        font-size: 13.5px;
    }
}
