/* Staging gallery page. Builds on The Journey (.highlights-section / .highlight-card) styles in home.css. */

.gallery-page main {
    background: var(--forest-deep);
}

.gallery-page-section {
    min-height: 70vh;
    padding-top: clamp(56px, 7vw, 96px);
}

.gallery-page .section-heading h1 {
    margin: 0;
    color: #fffdf7;
    font-family: var(--serif);
    font-size: var(--type-heading);
    font-weight: 600;
    letter-spacing: -0.035em;
    line-height: 1.08;
    text-wrap: balance;
}

.gallery-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin: 0 auto 30px;
}

.gallery-filter {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 0 16px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    background: transparent;
    color: rgba(255, 253, 247, 0.82);
    font: inherit;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.gallery-filter span {
    color: #e4c17c;
    font-size: 0.62rem;
    letter-spacing: 0.12em;
}

.gallery-filter:hover {
    border-color: rgba(228, 193, 124, 0.7);
    color: #fffdf7;
}

.gallery-filter.is-active {
    border-color: #dfbc79;
    background: var(--gold);
    color: #1e2d21;
}

.gallery-filter.is-active span {
    color: #1e2d21;
}

.gallery-filter:focus-visible,
.gallery-card-open:focus-visible,
.gallery-lightbox button:focus-visible {
    outline: 2px solid #e4c17c;
    outline-offset: 3px;
}

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

.gallery-card .highlight-content h2 {
    margin: 7px 0 6px;
    color: #fffdf7;
    font-family: var(--serif);
    font-size: 1.3rem;
    font-weight: 600;
    line-height: 1.13;
}

.gallery-card-tag {
    color: rgba(255, 253, 247, 0.7);
    text-transform: uppercase;
}

.gallery-card-open {
    position: absolute;
    inset: 0;
    z-index: 2;
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: zoom-in;
}

.gallery-empty {
    margin: 10px 0 0;
    color: rgba(255, 253, 247, 0.66);
    text-align: center;
}

.gallery-page-actions {
    flex-wrap: wrap;
    gap: 12px;
}

.gallery-lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    padding: clamp(16px, 4vw, 48px);
    background: rgba(6, 17, 12, 0.95);
    color: #fffdf7;
}

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

.gallery-lightbox-figure {
    display: grid;
    justify-items: center;
    gap: 16px;
    margin: 0;
    min-width: 0;
}

.gallery-lightbox-figure img {
    width: auto;
    max-width: 100%;
    max-height: 72vh;
    object-fit: contain;
}

.gallery-lightbox-figure figcaption {
    max-width: 640px;
    text-align: center;
}

.gallery-lightbox-figure h2 {
    margin: 6px 0 4px;
    font-family: var(--serif);
    font-size: 1.35rem;
    font-weight: 600;
}

.gallery-lightbox-figure p {
    margin: 0;
    color: rgba(255, 253, 247, 0.76);
    font-size: 0.82rem;
    line-height: 1.5;
}

.gallery-lightbox-nav,
.gallery-lightbox-close {
    display: inline-grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 50%;
    background: transparent;
    color: #fffdf7;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background 160ms ease;
}

.gallery-lightbox-nav:hover,
.gallery-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.12);
}

.gallery-lightbox-nav[hidden] {
    visibility: hidden;
    display: inline-grid;
}

.gallery-lightbox-close {
    position: absolute;
    top: clamp(12px, 3vw, 28px);
    right: clamp(12px, 3vw, 28px);
    font-size: 1.5rem;
}

body.gallery-lightbox-open {
    overflow: hidden;
}

@media (max-width: 700px) {
    .gallery-card .highlight-content h2 {
        font-size: 1rem;
    }

    .gallery-lightbox {
        grid-template-columns: minmax(0, 1fr);
        padding-bottom: 86px;
    }

    .gallery-lightbox-nav {
        position: absolute;
        bottom: 22px;
    }

    .gallery-lightbox-prev {
        left: calc(50% - 56px);
    }

    .gallery-lightbox-next {
        right: calc(50% - 56px);
    }
}
