.gallery-hero {
    height: 500px;
    align-items: stretch;
}

.gallery-hero .page-hero-media {
    background-image: url('../img/gallery-hero.jpg');
    background-position: center 42%;
}

.gallery-hero .page-hero-veil {
    background: linear-gradient(90deg, rgba(20, 37, 31, 0.82) 0%, rgba(20, 37, 31, 0.48) 48%, rgba(20, 37, 31, 0.14) 100%);
}

.gallery-hero .page-hero-content {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding-top: 36px;
    padding-bottom: 52px;
}

.gallery-hero .breadcrumb {
    margin: 0;
    color: #ffffff;
    font-size: 11px;
    letter-spacing: 0;
    text-transform: none;
}

.gallery-hero .breadcrumb a:hover {
    color: #ffffff;
    opacity: 0.8;
}

.gallery-hero .page-eyebrow {
    color: #c7cec5;
    font-size: 10px;
}

.hero-intro {
    display: flex;
    flex-direction: column;
    gap: 18px;
    max-width: 760px;
}

.hero-intro h1 {
    margin: 0;
    font-family: 'Cormorant Garamond', serif;
    font-size: 68px;
    line-height: 1.02;
    font-weight: 500;
}

.hero-intro .page-hero-description {
    max-width: 640px;
    font-size: 14px;
    line-height: 1.7;
}

/* Gallery */

.gallery-section {
    padding: 80px var(--pad);
    background: var(--bg);
}

.gallery-inner {
    max-width: var(--max);
    margin: 0 auto;
}

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

.gallery-head h2 {
    margin: 12px 0 0;
    font-family: 'Cormorant Garamond', serif;
    font-size: 48px;
    line-height: 1.08;
    font-weight: 500;
}

.gallery-head > p {
    max-width: 380px;
    font-size: 14px;
    line-height: 1.7;
    color: var(--muted);
}

.gallery-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 18px 0;
    margin-bottom: 40px;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.gallery-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-btn {
    height: 40px;
    padding: 0 18px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    color: var(--text);
    font-family: inherit;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.filter-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.filter-btn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.filter-btn.is-active {
    background: var(--forest);
    border-color: var(--forest);
    color: var(--on-dark);
}

.gallery-count {
    flex: none;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
}

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

.gallery-item {
    margin: 0;
    min-width: 0;
}

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

.gallery-open {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: var(--forest);
    overflow: hidden;
    color: var(--on-dark);
    font-family: inherit;
    text-align: left;
    cursor: zoom-in;
}

.gallery-open:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

.gallery-open img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.55s ease;
}

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

.gallery-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    gap: 5px;
    padding: 24px;
    background: linear-gradient(180deg, rgba(20, 37, 31, 0) 38%, rgba(20, 37, 31, 0.78) 100%);
    transition: background 0.3s ease;
}

.gallery-open:hover .gallery-overlay,
.gallery-open:focus-visible .gallery-overlay {
    background: linear-gradient(180deg, rgba(20, 37, 31, 0.08) 20%, rgba(20, 37, 31, 0.88) 100%);
}

.gallery-item-tag {
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #e9bda9;
}

.gallery-item-caption {
    font-family: 'Cormorant Garamond', serif;
    font-size: 21px;
    line-height: 1.15;
    font-weight: 400;
    color: var(--on-dark);
}

.gallery-note {
    max-width: 780px;
    margin: 28px auto 0;
    font-size: 11px;
    line-height: 1.7;
    text-align: center;
    color: var(--muted);
}

/* Lightbox */

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

.gallery-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.gallery-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(16, 27, 22, 0.82);
}

.gallery-lightbox-inner {
    position: relative;
    z-index: 1;
    width: min(920px, 92vw);
    max-height: calc(100vh - 48px);
    display: flex;
    flex-direction: column;
    border-radius: 10px;
    background: var(--surface);
    color: var(--text);
    overflow: hidden;
    box-shadow: 0 40px 80px rgba(16, 27, 22, 0.45);
}

.gallery-lightbox figure {
    margin: 0;
    display: flex;
    flex-direction: column;
}

.gallery-lightbox img {
    display: block;
    width: 100%;
    max-height: calc(100vh - 180px);
    object-fit: contain;
    background: #1b2a23;
}

.gallery-lightbox figcaption {
    padding: 16px 24px 20px;
    font-family: 'Cormorant Garamond', serif;
    font-size: 22px;
    line-height: 1.3;
}

.gallery-lightbox-close {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(20, 37, 31, 0.72);
    color: #ffffff;
    font-family: inherit;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.gallery-lightbox-close:hover {
    background: var(--accent);
}

.gallery-lightbox-close:focus-visible {
    outline: 2px solid var(--on-dark);
    outline-offset: 2px;
}

/* Booking invitation */

.gallery-cta {
    padding: 64px var(--pad);
    background: var(--cream);
}

.gallery-cta-inner {
    max-width: var(--max);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}

.cta-copy {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
}

.cta-copy h2 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 48px;
    line-height: 1.08;
    font-weight: 500;
}

.cta-copy p {
    font-size: 14px;
    line-height: 1.7;
    color: var(--muted);
}

.gallery-cta .cta-button {
    height: 52px;
    padding: 0 24px;
    gap: 12px;
}

@media (max-width: 1024px) {
    .gallery-head {
        gap: 32px;
    }

    .gallery-head h2 {
        font-size: 40px;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hero-intro h1 {
        font-size: 56px;
    }

    .cta-copy h2 {
        font-size: 40px;
    }
}

@media (max-width: 900px) {
    .gallery-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .gallery-head > p {
        max-width: 640px;
    }

    .gallery-toolbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .gallery-cta-inner {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 760px) {
    .gallery-hero {
        height: 440px;
    }

    .gallery-hero .page-hero-content {
        padding-top: 28px;
        padding-bottom: 38px;
    }

    .hero-intro h1 {
        font-size: 46px;
    }

    .gallery-section {
        padding-top: 64px;
        padding-bottom: 64px;
    }

    .gallery-cta {
        padding-top: 48px;
        padding-bottom: 48px;
    }

    .gallery-head h2,
    .cta-copy h2 {
        font-size: 32px;
    }

    .filter-btn {
        height: 36px;
        padding: 0 15px;
        font-size: 10.5px;
    }

    .gallery-item-caption {
        font-size: 19px;
    }

    .gallery-overlay {
        padding: 20px;
    }
}

@media (max-width: 560px) {
    .gallery-hero {
        height: 400px;
    }

    .hero-intro h1 {
        font-size: 38px;
    }

    .hero-intro .page-hero-description {
        font-size: 13.5px;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .gallery-open {
        aspect-ratio: 4 / 3;
    }

    .gallery-lightbox figcaption {
        font-size: 19px;
        padding: 14px 18px 18px;
    }

    .gallery-cta .cta-button {
        height: 48px;
    }
}
