/* =========================================================
   ECO WILDROAMS — GALLERY PAGE
   PART 1
   Hero, introduction, toolbar and filters
========================================================= */


/* =========================================================
   PAGE BASE
========================================================= */

.gallery-page {
    background: #f5f1e8;
    color: #1d211d;
    overflow-x: hidden;
}

.gallery-page main {
    overflow: hidden;
}

.gallery-page img {
    display: block;
    max-width: 100%;
}

.gallery-page button,
.gallery-page a {
    -webkit-tap-highlight-color: transparent;
}

.gallery-page button {
    font: inherit;
}

.gallery-page.no-scroll {
    overflow: hidden;
}


/* =========================================================
   LOCAL VARIABLES
========================================================= */

.gallery-page {
    --gallery-cream: #f5f1e8;
    --gallery-cream-light: #faf8f2;
    --gallery-sand: #d9c8a9;
    --gallery-gold: var(--clr-primary, #e67e22);
    --gallery-gold-light: var(--clr-accent, #d4a017);
    --gallery-green: var(--clr-secondary, #163a26);
    --gallery-green-deep: #082417;
    --gallery-charcoal: #1d211d;
    --gallery-muted: #6f746f;
    --gallery-white: #ffffff;

    --gallery-border: rgba(29, 33, 29, 0.14);
    --gallery-border-light: rgba(255, 255, 255, 0.18);

    --gallery-shadow-soft:
        0 16px 50px rgba(16, 35, 25, 0.08);

    --gallery-shadow-medium:
        0 24px 70px rgba(16, 35, 25, 0.16);

    --gallery-shadow-dark:
        0 28px 90px rgba(0, 0, 0, 0.32);

    --gallery-radius-small: 14px;
    --gallery-radius-medium: 24px;
    --gallery-radius-large: 34px;

    --gallery-ease:
        cubic-bezier(0.22, 1, 0.36, 1);

    --gallery-transition:
        500ms var(--gallery-ease);
}


/* =========================================================
   HERO
========================================================= */

.gallery-hero {
    position: relative;
    min-height: 100svh;
    display: flex;
    align-items: flex-end;
    isolation: isolate;
    background: var(--gallery-green-deep);
    color: #ffffff;
}

.gallery-hero__media {
    position: absolute;
    inset: 0;
    z-index: -3;
    overflow: hidden;
}

.gallery-hero__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 58%;
    transform: scale(1.04);
    animation: galleryHeroReveal 1.7s var(--gallery-ease) forwards;
}

.gallery-hero__overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(
            180deg,
            rgba(8, 20, 13, 0.34) 0%,
            rgba(8, 20, 13, 0.08) 28%,
            rgba(8, 20, 13, 0.42) 66%,
            rgba(8, 20, 13, 0.92) 100%
        ),
        linear-gradient(
            90deg,
            rgba(8, 20, 13, 0.72) 0%,
            rgba(8, 20, 13, 0.30) 45%,
            rgba(8, 20, 13, 0.06) 100%
        );
}

.gallery-hero::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 150px;
    z-index: -1;
    pointer-events: none;
    background:
        linear-gradient(
            180deg,
            transparent 0%,
            rgba(245, 241, 232, 0.07) 50%,
            var(--gallery-cream) 100%
        );
}

.gallery-hero__content {
    position: relative;
    width: 100%;
    padding-top: clamp(150px, 18vh, 220px);
    padding-bottom: clamp(110px, 14vh, 160px);
}

.gallery-hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    margin: 0 0 24px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.24em;
    line-height: 1.4;
    text-transform: uppercase;
    opacity: 0;
    transform: translateY(24px);
    animation:
        galleryContentReveal
        850ms
        var(--gallery-ease)
        300ms
        forwards;
}

.gallery-hero__eyebrow::before {
    content: "";
    width: 44px;
    height: 1px;
    background: var(--gallery-gold-light);
}

.gallery-hero__title {
    max-width: 900px;
    margin: 0;
    color: #ffffff;
    font-family: var(--font-heading);
    font-size: clamp(3.3rem, 8.5vw, 8.2rem);
    font-weight: 400;
    letter-spacing: -0.055em;
    line-height: 0.92;
    text-wrap: balance;
    opacity: 0;
    transform: translateY(36px);
    animation:
        galleryContentReveal
        1s
        var(--gallery-ease)
        450ms
        forwards;
}

.gallery-hero__title span {
    display: block;
    color: var(--gallery-gold-light);
    font-style: italic;
    font-weight: 400;
}

.gallery-hero__description {
    max-width: 620px;
    margin: 32px 0 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: clamp(1rem, 1.4vw, 1.2rem);
    line-height: 1.8;
    opacity: 0;
    transform: translateY(30px);
    animation:
        galleryContentReveal
        900ms
        var(--gallery-ease)
        620ms
        forwards;
}

.gallery-hero__scroll {
    position: absolute;
    left: 0;
    bottom: 40px;
    display: inline-flex;
    align-items: center;
    gap: 15px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.78rem;
    font-weight: 650;
    letter-spacing: 0.16em;
    text-decoration: none;
    text-transform: uppercase;
    opacity: 0;
    animation:
        galleryFadeIn
        900ms
        ease
        900ms
        forwards;
}

.gallery-hero__scroll:hover {
    color: #ffffff;
}

.gallery-hero__scroll-line {
    position: relative;
    width: 60px;
    height: 1px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.32);
}

.gallery-hero__scroll-line::after {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--gallery-gold-light);
    transform: translateX(-100%);
    animation:
        galleryScrollLine
        2.2s
        ease-in-out
        1.2s
        infinite;
}

.gallery-hero__meta {
    position: absolute;
    right: clamp(24px, 4vw, 72px);
    bottom: 38px;
    display: flex;
    align-items: center;
    gap: 13px;
    color: rgba(255, 255, 255, 0.58);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.gallery-hero__meta-divider {
    display: block;
    width: 26px;
    height: 1px;
    background: rgba(255, 255, 255, 0.42);
}


/* =========================================================
   HERO DECORATIVE GRAIN
========================================================= */

.gallery-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    opacity: 0.11;
    pointer-events: none;
    mix-blend-mode: soft-light;
    background-image:
        url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='.55'/%3E%3C/svg%3E");
}


/* =========================================================
   GENERAL SECTION EYEBROW
========================================================= */

.gallery-page .section-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 18px;
    color: var(--gallery-gold);
    font-size: 0.74rem;
    font-weight: 750;
    letter-spacing: 0.2em;
    line-height: 1.4;
    text-transform: uppercase;
}

.gallery-page .section-eyebrow::before {
    content: "";
    width: 34px;
    height: 1px;
    background: currentColor;
}


/* =========================================================
   INTRODUCTION
========================================================= */

.gallery-intro {
    position: relative;
    padding:
        clamp(95px, 11vw, 160px)
        0
        clamp(80px, 10vw, 140px);
    background: var(--gallery-cream);
}

.gallery-intro::before {
    content: "";
    position: absolute;
    top: 0;
    right: -100px;
    width: 420px;
    height: 420px;
    border: 1px solid rgba(193, 139, 69, 0.14);
    border-radius: 50%;
    pointer-events: none;
}

.gallery-intro::after {
    content: "";
    position: absolute;
    top: 120px;
    right: -160px;
    width: 420px;
    height: 420px;
    border: 1px solid rgba(193, 139, 69, 0.09);
    border-radius: 50%;
    pointer-events: none;
}

.gallery-intro__grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns:
        minmax(0, 0.95fr)
        minmax(320px, 0.72fr);
    gap: clamp(60px, 8vw, 140px);
    align-items: start;
}

.gallery-intro__heading h2 {
    max-width: 680px;
    margin: 0;
    color: var(--gallery-charcoal);
    font-family: var(--font-heading);
    font-size: clamp(2.6rem, 5.4vw, 5.5rem);
    font-weight: 400;
    letter-spacing: -0.05em;
    line-height: 0.98;
    text-wrap: balance;
}

.gallery-intro__copy {
    padding-top: clamp(20px, 5vw, 72px);
}

.gallery-intro__copy p {
    margin: 0;
    color: var(--gallery-muted);
    font-size: clamp(1rem, 1.25vw, 1.13rem);
    line-height: 1.9;
}

.gallery-intro__copy p + p {
    margin-top: 24px;
}

.gallery-intro__copy p:first-child::first-letter {
    float: left;
    margin:
        8px
        10px
        0
        0;
    color: var(--gallery-gold);
    font-family: var(--font-heading);
    font-size: 4rem;
    line-height: 0.7;
}


/* =========================================================
   GALLERY COLLECTION
========================================================= */

.gallery-collection {
    position: relative;
    padding:
        clamp(78px, 9vw, 130px)
        0
        clamp(100px, 11vw, 170px);
    background: var(--gallery-cream-light);
}

.gallery-collection::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    width: min(92%, 1420px);
    height: 1px;
    transform: translateX(-50%);
    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(29, 33, 29, 0.14),
            transparent
        );
}


/* =========================================================
   TOOLBAR
========================================================= */

.gallery-toolbar {
    display: flex;
    justify-content: space-between;
    gap: 50px;
    align-items: flex-end;
    margin-bottom: clamp(44px, 6vw, 78px);
}

.gallery-toolbar__heading h2 {
    margin: 0;
    color: var(--gallery-charcoal);
    font-family: var(--font-heading);
    font-size: clamp(2.25rem, 4.2vw, 4.2rem);
    font-weight: 400;
    letter-spacing: -0.045em;
    line-height: 1;
}


/* =========================================================
   FILTERS
========================================================= */

.gallery-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
    max-width: 680px;
}

.gallery-filter {
    position: relative;
    min-height: 46px;
    padding: 11px 20px;
    overflow: hidden;
    cursor: pointer;
    color: var(--gallery-muted);
    background: transparent;
    border: 1px solid var(--gallery-border);
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    line-height: 1;
    text-transform: uppercase;
    transition:
        color 300ms ease,
        border-color 300ms ease,
        background-color 300ms ease,
        transform 300ms var(--gallery-ease),
        box-shadow 300ms ease;
}

.gallery-filter::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: var(--gallery-green);
    border-radius: inherit;
    transform: scale(0.72);
    opacity: 0;
    transition:
        transform 340ms var(--gallery-ease),
        opacity 250ms ease;
}

.gallery-filter:hover {
    color: var(--gallery-green);
    border-color: rgba(31, 52, 40, 0.36);
    transform: translateY(-2px);
}

.gallery-filter.is-active {
    color: #ffffff;
    border-color: var(--gallery-green);
    background: var(--gallery-green);
    box-shadow:
        0 10px 25px rgba(31, 52, 40, 0.18);
}

.gallery-filter.is-active::before {
    opacity: 1;
    transform: scale(1);
}

.gallery-filter:focus-visible {
    outline: 3px solid rgba(193, 139, 69, 0.36);
    outline-offset: 4px;
}


/* =========================================================
   REVEAL ANIMATION HELPERS
========================================================= */

.gallery-intro__heading,
.gallery-intro__copy,
.gallery-toolbar__heading,
.gallery-filters {
    opacity: 1;
    transform: none;
}

.js .gallery-intro__heading,
.js .gallery-intro__copy,
.js .gallery-toolbar__heading,
.js .gallery-filters {
    opacity: 0;
    transform: translateY(32px);
    transition:
        opacity 800ms var(--gallery-ease),
        transform 800ms var(--gallery-ease);
}

.js .gallery-intro__heading.is-visible,
.js .gallery-intro__copy.is-visible,
.js .gallery-toolbar__heading.is-visible,
.js .gallery-filters.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.js .gallery-intro__copy {
    transition-delay: 120ms;
}

.js .gallery-filters {
    transition-delay: 100ms;
}


/* =========================================================
   KEYFRAMES
========================================================= */

@keyframes galleryHeroReveal {
    from {
        transform: scale(1.12);
        filter: brightness(0.72);
    }

    to {
        transform: scale(1.04);
        filter: brightness(1);
    }
}

@keyframes galleryContentReveal {
    from {
        opacity: 0;
        transform: translateY(32px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes galleryFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes galleryScrollLine {
    0% {
        transform: translateX(-100%);
    }

    45%,
    55% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(100%);
    }
}


/* =========================================================
   RESPONSIVE — PART 1
========================================================= */

@media (max-width: 1100px) {

    .gallery-intro__grid {
        grid-template-columns:
            minmax(0, 1fr)
            minmax(300px, 0.78fr);
        gap: 60px;
    }

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

    .gallery-filters {
        justify-content: flex-start;
        max-width: none;
    }
}


@media (max-width: 820px) {

    .gallery-hero {
        min-height: 820px;
    }

    .gallery-hero__content {
        padding-top: 150px;
        padding-bottom: 120px;
    }

    .gallery-hero__title {
        max-width: 700px;
    }

    .gallery-hero__description {
        max-width: 560px;
    }

    .gallery-hero__meta {
        display: none;
    }

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

    .gallery-intro__copy {
        max-width: 700px;
        padding-top: 0;
    }
}


@media (max-width: 640px) {

    .gallery-hero {
        min-height: 760px;
    }

    .gallery-hero__content {
        padding-top: 130px;
        padding-bottom: 112px;
    }

    .gallery-hero__image {
        object-position: 58% center;
    }

    .gallery-hero__eyebrow {
        gap: 10px;
        margin-bottom: 18px;
        font-size: 0.68rem;
        letter-spacing: 0.18em;
    }

    .gallery-hero__eyebrow::before {
        width: 28px;
    }

    .gallery-hero__title {
        font-size: clamp(3.25rem, 16vw, 5rem);
        line-height: 0.94;
    }

    .gallery-hero__description {
        margin-top: 24px;
        font-size: 0.96rem;
        line-height: 1.7;
    }

    .gallery-hero__scroll {
        bottom: 30px;
        gap: 11px;
        font-size: 0.66rem;
        letter-spacing: 0.12em;
    }

    .gallery-hero__scroll-line {
        width: 36px;
    }

    .gallery-intro {
        padding-top: 82px;
        padding-bottom: 78px;
    }

    .gallery-intro__heading h2 {
        font-size: clamp(2.65rem, 13vw, 4rem);
    }

    .gallery-intro__copy p {
        font-size: 0.98rem;
        line-height: 1.8;
    }

    .gallery-intro__copy p:first-child::first-letter {
        font-size: 3.2rem;
    }

    .gallery-collection {
        padding-top: 72px;
        padding-bottom: 110px;
    }

    .gallery-toolbar {
        gap: 34px;
        margin-bottom: 44px;
    }

    .gallery-toolbar__heading h2 {
        font-size: clamp(2.45rem, 12vw, 3.6rem);
    }

    .gallery-filters {
        flex-wrap: nowrap;
        width: calc(100% + 40px);
        margin-left: -20px;
        padding:
            2px
            20px
            14px;
        overflow-x: auto;
        overscroll-behavior-inline: contain;
        scrollbar-width: none;
    }

    .gallery-filters::-webkit-scrollbar {
        display: none;
    }

    .gallery-filter {
        flex: 0 0 auto;
        min-height: 42px;
        padding: 10px 17px;
        font-size: 0.7rem;
    }
}


@media (max-width: 420px) {

    .gallery-hero {
        min-height: 700px;
    }

    .gallery-hero__title {
        font-size: 3.1rem;
    }

    .gallery-hero__description {
        max-width: 95%;
    }
}


/* =========================================================
   REDUCED MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {

    .gallery-hero__image,
    .gallery-hero__eyebrow,
    .gallery-hero__title,
    .gallery-hero__description,
    .gallery-hero__scroll {
        animation: none;
        opacity: 1;
        transform: none;
    }

    .gallery-hero__scroll-line::after {
        animation: none;
        transform: none;
    }

    .js .gallery-intro__heading,
    .js .gallery-intro__copy,
    .js .gallery-toolbar__heading,
    .js .gallery-filters {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .gallery-filter {
        transition: none;
    }
}

/* =========================================================
   ECO WILDROAMS — GALLERY PAGE
   PART 2
   Gallery grid, cards, filtering and interactions
========================================================= */


/* =========================================================
   GALLERY GRID
========================================================= */

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    grid-auto-flow: dense;
    grid-auto-rows: 58px;
    gap: clamp(14px, 1.5vw, 24px);
}

.gallery-item {
    position: relative;
    grid-column: span 4;
    grid-row: span 6;
    min-width: 0;
    opacity: 1;
    transform:
        translateY(0)
        scale(1);
    transition:
        opacity 420ms ease,
        transform 520ms var(--gallery-ease);
}

.gallery-item--wide {
    grid-column: span 8;
    grid-row: span 6;
}

.gallery-item--large {
    grid-column: span 8;
    grid-row: span 8;
}

.gallery-item--portrait {
    grid-column: span 4;
    grid-row: span 8;
}

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

.gallery-item.is-filtering-out {
    pointer-events: none;
    opacity: 0;
    transform:
        translateY(18px)
        scale(0.97);
}

.gallery-item.is-filtering-in {
    animation:
        galleryItemFilterIn
        620ms
        var(--gallery-ease)
        both;
}


/* =========================================================
   GALLERY CARD
========================================================= */

.gallery-card {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    min-height: 100%;
    padding: 0;
    overflow: hidden;
    cursor: zoom-in;
    color: #ffffff;
    text-align: left;
    background: var(--gallery-green-deep);
    border: 0;
    border-radius: var(--gallery-radius-medium);
    box-shadow:
        0 18px 50px rgba(16, 35, 25, 0.09);
    isolation: isolate;
    transform: translateZ(0);
    transition:
        transform 600ms var(--gallery-ease),
        box-shadow 600ms var(--gallery-ease);
}

.gallery-card::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 3;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: inherit;
    pointer-events: none;
    transition:
        border-color 400ms ease,
        inset 500ms var(--gallery-ease);
}

.gallery-card::after {
    content: "";
    position: absolute;
    top: -36%;
    left: -60%;
    z-index: 2;
    width: 42%;
    height: 180%;
    pointer-events: none;
    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(255, 255, 255, 0.16),
            transparent
        );
    transform:
        rotate(18deg)
        translateX(-220%);
    transition:
        transform 900ms var(--gallery-ease);
}

.gallery-card:hover {
    z-index: 4;
    transform:
        translateY(-8px)
        scale(1.012);
    box-shadow:
        0 30px 80px rgba(16, 35, 25, 0.2);
}

.gallery-card:hover::before {
    inset: 8px;
    border-color: rgba(255, 255, 255, 0.26);
}

.gallery-card:hover::after {
    transform:
        rotate(18deg)
        translateX(520%);
}

.gallery-card:focus-visible {
    outline: 4px solid rgba(193, 139, 69, 0.7);
    outline-offset: 5px;
}


/* =========================================================
   GALLERY IMAGE
========================================================= */

.gallery-card__image {
    position: absolute;
    inset: 0;
    z-index: -2;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transform: scale(1.005);
    filter:
        saturate(0.96)
        contrast(1.02);
    transition:
        transform 1.1s var(--gallery-ease),
        filter 700ms ease;
}

.gallery-card:hover .gallery-card__image,
.gallery-card:focus-visible .gallery-card__image {
    transform: scale(1.075);
    filter:
        saturate(1.08)
        contrast(1.04);
}


/* =========================================================
   IMAGE POSITION REFINEMENTS
========================================================= */

.gallery-item[data-title="King of the Savannah"]
.gallery-card__image {
    object-position: center 42%;
}

.gallery-item[data-title="Golden Silence"]
.gallery-card__image {
    object-position: center 50%;
}

.gallery-item[data-title="Built for Speed"]
.gallery-card__image {
    object-position: 52% center;
}

.gallery-item[data-title="Gentle Giants"]
.gallery-card__image {
    object-position: center 55%;
}

.gallery-item[data-title="Shared Wonder"]
.gallery-card__image {
    object-position: center 42%;
}

.gallery-item[data-title="Living Heritage"]
.gallery-card__image {
    object-position: center 30%;
}

.gallery-item[data-title="Dinner in the Wild"]
.gallery-card__image {
    object-position: center 55%;
}

.gallery-item[data-title="Into the Wild"]
.gallery-card__image {
    object-position: center 54%;
}

.gallery-item[data-title="Above the Grasslands"]
.gallery-card__image {
    object-position: center 36%;
}

.gallery-item[data-title="Beneath Kilimanjaro"]
.gallery-card__image {
    object-position: center 48%;
}

.gallery-item[data-title="The Open Road"]
.gallery-card__image {
    object-position: center 55%;
}

.gallery-item[data-title="Rested by Nature"]
.gallery-card__image {
    object-position: center 48%;
}

.gallery-item[data-title="Proud Traditions"]
.gallery-card__image {
    object-position: center 34%;
}

.gallery-item[data-title="Through the Viewfinder"]
.gallery-card__image {
    object-position: center 42%;
}

.gallery-item[data-title="Where Water Leads"]
.gallery-card__image {
    object-position: center 55%;
}

.gallery-item[data-title="Endless Horizons"]
.gallery-card__image {
    object-position: center 50%;
}

.gallery-item[data-title="First Light"]
.gallery-card__image {
    object-position: center 45%;
}

.gallery-item[data-title="Last Light"]
.gallery-card__image {
    object-position: center 52%;
}

.gallery-item[data-title="Together in the Wild"]
.gallery-card__image {
    object-position: center 38%;
}

.gallery-item[data-title="Stories by Firelight"]
.gallery-card__image {
    object-position: center 54%;
}


/* =========================================================
   CARD OVERLAY
========================================================= */

.gallery-card__overlay {
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        linear-gradient(
            180deg,
            rgba(7, 16, 10, 0.06) 15%,
            rgba(7, 16, 10, 0.16) 48%,
            rgba(7, 16, 10, 0.8) 100%
        );
    transition:
        background 650ms ease;
}

.gallery-card:hover .gallery-card__overlay,
.gallery-card:focus-visible .gallery-card__overlay {
    background:
        linear-gradient(
            180deg,
            rgba(7, 16, 10, 0.03) 8%,
            rgba(7, 16, 10, 0.12) 45%,
            rgba(7, 16, 10, 0.9) 100%
        );
}


/* =========================================================
   CARD CONTENT
========================================================= */

.gallery-card__content {
    position: absolute;
    right: clamp(20px, 2.2vw, 34px);
    bottom: clamp(20px, 2.2vw, 32px);
    left: clamp(20px, 2.2vw, 34px);
    z-index: 4;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    transform: translateY(8px);
    transition:
        transform 520ms var(--gallery-ease);
}

.gallery-card:hover .gallery-card__content,
.gallery-card:focus-visible .gallery-card__content {
    transform: translateY(0);
}

.gallery-card__category {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 11px;
    color: var(--gallery-gold-light);
    font-size: 0.67rem;
    font-weight: 750;
    letter-spacing: 0.18em;
    line-height: 1.2;
    text-transform: uppercase;
}

.gallery-card__category::before {
    content: "";
    width: 23px;
    height: 1px;
    background: currentColor;
    transform-origin: left;
    transition:
        width 450ms var(--gallery-ease);
}

.gallery-card:hover .gallery-card__category::before,
.gallery-card:focus-visible .gallery-card__category::before {
    width: 38px;
}

.gallery-card__title {
    max-width: 92%;
    color: #ffffff;
    font-family: var(--font-heading);
    font-size: clamp(1.45rem, 2.2vw, 2.55rem);
    font-weight: 400;
    letter-spacing: -0.035em;
    line-height: 1.04;
    text-wrap: balance;
}

.gallery-item--large .gallery-card__title {
    max-width: 80%;
    font-size: clamp(2rem, 3.4vw, 4rem);
}

.gallery-item--wide .gallery-card__title {
    font-size: clamp(1.8rem, 3vw, 3.5rem);
}

.gallery-card__location {
    display: block;
    max-height: 0;
    margin-top: 0;
    overflow: hidden;
    color: rgba(255, 255, 255, 0.74);
    font-size: 0.8rem;
    font-weight: 550;
    letter-spacing: 0.04em;
    line-height: 1.5;
    opacity: 0;
    transform: translateY(10px);
    transition:
        max-height 500ms var(--gallery-ease),
        margin-top 500ms var(--gallery-ease),
        opacity 380ms ease,
        transform 500ms var(--gallery-ease);
}

.gallery-card:hover .gallery-card__location,
.gallery-card:focus-visible .gallery-card__location {
    max-height: 48px;
    margin-top: 10px;
    opacity: 1;
    transform: translateY(0);
}


/* =========================================================
   CARD ICON
========================================================= */

.gallery-card__icon {
    position: absolute;
    top: clamp(18px, 2vw, 28px);
    right: clamp(18px, 2vw, 28px);
    z-index: 4;
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.26);
    border-radius: 50%;
    opacity: 0;
    transform:
        translateY(-10px)
        rotate(-35deg)
        scale(0.86);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition:
        opacity 400ms ease,
        transform 550ms var(--gallery-ease),
        color 300ms ease,
        background-color 300ms ease;
}

.gallery-card__icon svg {
    width: 21px;
    height: 21px;
}

.gallery-card:hover .gallery-card__icon,
.gallery-card:focus-visible .gallery-card__icon {
    opacity: 1;
    transform:
        translateY(0)
        rotate(0)
        scale(1);
}

.gallery-card__icon:hover {
    color: var(--gallery-green);
    background: #ffffff;
}


/* =========================================================
   LOADING STATE
========================================================= */

.gallery-card.is-loading {
    background:
        linear-gradient(
            110deg,
            #d9d3c7 20%,
            #eee8dc 40%,
            #d9d3c7 60%
        );
    background-size: 220% 100%;
    animation:
        gallerySkeleton
        1.4s
        linear
        infinite;
}

.gallery-card.is-loading .gallery-card__image {
    opacity: 0;
}

.gallery-card.is-loaded .gallery-card__image {
    animation:
        galleryImageFadeIn
        650ms
        ease
        both;
}


/* =========================================================
   EMPTY FILTER STATE
========================================================= */

.gallery-empty {
    grid-column: 1 / -1;
    padding: 80px 24px;
    text-align: center;
    color: var(--gallery-muted);
    border: 1px dashed var(--gallery-border);
    border-radius: var(--gallery-radius-medium);
}

.gallery-empty h3 {
    margin: 0 0 12px;
    color: var(--gallery-charcoal);
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 400;
}

.gallery-empty p {
    max-width: 520px;
    margin: 0 auto;
    line-height: 1.8;
}


/* =========================================================
   STAGGERED REVEAL
========================================================= */

.js .gallery-item {
    opacity: 0;
    transform:
        translateY(42px)
        scale(0.985);
}

.js .gallery-item.is-visible {
    opacity: 1;
    transform:
        translateY(0)
        scale(1);
}

.js .gallery-item:nth-child(2n) {
    transition-delay: 70ms;
}

.js .gallery-item:nth-child(3n) {
    transition-delay: 120ms;
}

.js .gallery-item:nth-child(5n) {
    transition-delay: 170ms;
}


/* =========================================================
   KEYFRAMES — PART 2
========================================================= */

@keyframes galleryItemFilterIn {
    from {
        opacity: 0;
        transform:
            translateY(22px)
            scale(0.97);
    }

    to {
        opacity: 1;
        transform:
            translateY(0)
            scale(1);
    }
}

@keyframes galleryImageFadeIn {
    from {
        opacity: 0;
        transform: scale(1.035);
    }

    to {
        opacity: 1;
        transform: scale(1.005);
    }
}

@keyframes gallerySkeleton {
    from {
        background-position: 100% 0;
    }

    to {
        background-position: -120% 0;
    }
}


/* =========================================================
   RESPONSIVE GRID — LARGE TABLET
========================================================= */

@media (max-width: 1180px) {

    .gallery-grid {
        grid-template-columns: repeat(8, minmax(0, 1fr));
        grid-auto-rows: 60px;
    }

    .gallery-item {
        grid-column: span 4;
        grid-row: span 6;
    }

    .gallery-item--wide,
    .gallery-item--large {
        grid-column: span 8;
    }

    .gallery-item--wide {
        grid-row: span 6;
    }

    .gallery-item--large {
        grid-row: span 8;
    }

    .gallery-item--portrait {
        grid-column: span 4;
        grid-row: span 8;
    }
}


/* =========================================================
   RESPONSIVE GRID — TABLET
========================================================= */

@media (max-width: 820px) {

    .gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-auto-rows: 80px;
        gap: 16px;
    }

    .gallery-item,
    .gallery-item--wide,
    .gallery-item--large,
    .gallery-item--portrait {
        grid-column: span 1;
        grid-row: span 5;
    }

    .gallery-item--large,
    .gallery-item--wide {
        grid-column: span 2;
        grid-row: span 6;
    }

    .gallery-item--portrait {
        grid-row: span 7;
    }

    .gallery-card {
        border-radius: 20px;
    }

    .gallery-card__content {
        right: 22px;
        bottom: 22px;
        left: 22px;
    }

    .gallery-card__icon {
        top: 18px;
        right: 18px;
        width: 44px;
        height: 44px;
    }

    .gallery-card__title,
    .gallery-item--large .gallery-card__title,
    .gallery-item--wide .gallery-card__title {
        max-width: 90%;
        font-size: clamp(1.55rem, 4.6vw, 2.7rem);
    }
}


/* =========================================================
   RESPONSIVE GRID — MOBILE
========================================================= */

@media (max-width: 620px) {

    .gallery-grid {
        display: flex;
        flex-direction: column;
        gap: 16px;
    }

    .gallery-item,
    .gallery-item--wide,
    .gallery-item--large,
    .gallery-item--portrait {
        width: 100%;
        min-height: auto;
    }

    .gallery-card {
        height: auto;
        min-height: 0;
        aspect-ratio: 4 / 5;
        border-radius: 18px;
    }

    .gallery-item--wide .gallery-card,
    .gallery-item--large .gallery-card {
        aspect-ratio: 4 / 3;
    }

    .gallery-item--portrait .gallery-card {
        aspect-ratio: 3 / 4;
    }

    .gallery-card:hover {
        transform: none;
    }

    .gallery-card:hover::before {
        inset: 0;
    }

    .gallery-card__content {
        right: 20px;
        bottom: 20px;
        left: 20px;
        transform: none;
    }

    .gallery-card__category {
        margin-bottom: 8px;
        font-size: 0.62rem;
    }

    .gallery-card__title,
    .gallery-item--large .gallery-card__title,
    .gallery-item--wide .gallery-card__title {
        max-width: calc(100% - 50px);
        font-size: clamp(1.65rem, 8vw, 2.35rem);
    }

    .gallery-card__location {
        max-height: 48px;
        margin-top: 8px;
        opacity: 1;
        transform: none;
    }

    .gallery-card__icon {
        top: 16px;
        right: 16px;
        width: 42px;
        height: 42px;
        opacity: 1;
        transform: none;
    }

    .gallery-card__icon svg {
        width: 19px;
        height: 19px;
    }
}


/* =========================================================
   RESPONSIVE GRID — SMALL MOBILE
========================================================= */

@media (max-width: 420px) {

    .gallery-grid {
        gap: 13px;
    }

    .gallery-card {
        border-radius: 16px;
    }

    .gallery-card__content {
        right: 17px;
        bottom: 17px;
        left: 17px;
    }

    .gallery-card__title,
    .gallery-item--large .gallery-card__title,
    .gallery-item--wide .gallery-card__title {
        font-size: 1.62rem;
    }

    .gallery-card__location {
        font-size: 0.74rem;
    }

    .gallery-card__icon {
        top: 13px;
        right: 13px;
        width: 39px;
        height: 39px;
    }
}


/* =========================================================
   TOUCH DEVICES
========================================================= */

@media (hover: none) {

    .gallery-card::after {
        display: none;
    }

    .gallery-card:hover {
        transform: none;
        box-shadow:
            0 18px 50px rgba(16, 35, 25, 0.09);
    }

    .gallery-card__image,
    .gallery-card:hover .gallery-card__image {
        transform: scale(1.005);
    }

    .gallery-card__content {
        transform: none;
    }

    .gallery-card__location {
        max-height: 48px;
        margin-top: 8px;
        opacity: 1;
        transform: none;
    }

    .gallery-card__icon {
        opacity: 1;
        transform: none;
    }
}


/* =========================================================
   REDUCED MOTION — PART 2
========================================================= */

@media (prefers-reduced-motion: reduce) {

    .gallery-item,
    .gallery-card,
    .gallery-card::before,
    .gallery-card::after,
    .gallery-card__image,
    .gallery-card__overlay,
    .gallery-card__content,
    .gallery-card__category::before,
    .gallery-card__location,
    .gallery-card__icon {
        animation: none !important;
        transition: none !important;
    }

    .js .gallery-item {
        opacity: 1;
        transform: none;
    }

    .gallery-card:hover {
        transform: none;
    }

    .gallery-card:hover .gallery-card__image {
        transform: scale(1.005);
    }

    .gallery-card__location,
    .gallery-card__icon {
        opacity: 1;
        transform: none;
    }
}

/* =========================================================
   ECO WILDROAMS — GALLERY PAGE
   PART 3
   CTA, lightbox modal and final refinements
========================================================= */


/* =========================================================
   GALLERY CTA
========================================================= */

.gallery-cta {
    position: relative;
    min-height: clamp(560px, 72vw, 820px);
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    isolation: isolate;
    color: #ffffff;
    background: var(--gallery-green-deep);
}

.gallery-cta__media {
    position: absolute;
    inset: 0;
    z-index: -2;
    overflow: hidden;
}

.gallery-cta__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 48%;
    transform: scale(1.03);
    transition:
        transform 1.2s var(--gallery-ease);
}

.gallery-cta:hover .gallery-cta__image {
    transform: scale(1.07);
}

.gallery-cta__overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(
            180deg,
            rgba(8, 20, 13, 0.08) 0%,
            rgba(8, 20, 13, 0.24) 40%,
            rgba(8, 20, 13, 0.92) 100%
        ),
        linear-gradient(
            90deg,
            rgba(8, 20, 13, 0.74) 0%,
            rgba(8, 20, 13, 0.3) 52%,
            rgba(8, 20, 13, 0.08) 100%
        );
}

.gallery-cta__content {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 780px;
    padding-top: clamp(120px, 14vw, 190px);
    padding-bottom: clamp(84px, 9vw, 130px);
}

.gallery-cta__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 18px;
    color: var(--gallery-gold-light);
    font-size: 0.74rem;
    font-weight: 750;
    letter-spacing: 0.19em;
    line-height: 1.4;
    text-transform: uppercase;
}

.gallery-cta__eyebrow::before {
    content: "";
    width: 38px;
    height: 1px;
    background: currentColor;
}

.gallery-cta h2 {
    max-width: 760px;
    margin: 0;
    color: #ffffff;
    font-family: var(--font-heading);
    font-size: clamp(3rem, 6.7vw, 6.8rem);
    font-weight: 400;
    letter-spacing: -0.055em;
    line-height: 0.95;
    text-wrap: balance;
}

.gallery-cta__content > p:not(.gallery-cta__eyebrow) {
    max-width: 620px;
    margin: 28px 0 0;
    color: rgba(255, 255, 255, 0.76);
    font-size: clamp(1rem, 1.35vw, 1.16rem);
    line-height: 1.8;
}

.gallery-cta__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 36px;
}

.gallery-cta .button {
    min-height: 54px;
}

.gallery-cta .button--outline-light {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.28);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.gallery-cta .button--outline-light:hover {
    color: var(--gallery-green-deep);
    background: #ffffff;
    border-color: #ffffff;
}


/* =========================================================
   CTA REVEAL
========================================================= */

.gallery-cta__content {
    opacity: 1;
    transform: none;
}

.js .gallery-cta__content {
    opacity: 0;
    transform: translateY(38px);
    transition:
        opacity 900ms var(--gallery-ease),
        transform 900ms var(--gallery-ease);
}

.js .gallery-cta__content.is-visible {
    opacity: 1;
    transform: translateY(0);
}


/* =========================================================
   LIGHTBOX ROOT
========================================================= */

.gallery-lightbox {
    position: fixed;
    inset: 0;
    z-index: 5000;
    display: none;
    place-items: center;
    padding: clamp(18px, 2.5vw, 36px);
    color: #ffffff;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition:
        opacity 320ms ease,
        visibility 320ms ease;
}

.gallery-lightbox.is-open {
    display: grid;
}

.gallery-lightbox.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.gallery-lightbox__backdrop {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(
            circle at 50% 45%,
            rgba(31, 52, 40, 0.34),
            transparent 48%
        ),
        rgba(3, 10, 6, 0.94);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}


/* =========================================================
   LIGHTBOX PANEL
========================================================= */

.gallery-lightbox__panel {
    position: relative;
    z-index: 1;
    width: min(1380px, 100%);
    height: min(900px, calc(100vh - 72px));
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr) 72px;
    align-items: center;
    gap: clamp(12px, 2vw, 24px);
    opacity: 0;
    transform:
        translateY(24px)
        scale(0.985);
    transition:
        opacity 420ms var(--gallery-ease),
        transform 520ms var(--gallery-ease);
}

.gallery-lightbox.is-visible .gallery-lightbox__panel {
    opacity: 1;
    transform:
        translateY(0)
        scale(1);
}


/* =========================================================
   LIGHTBOX FIGURE
========================================================= */

.gallery-lightbox__figure {
    min-width: 0;
    height: 100%;
    display: grid;
    grid-template-rows:
        minmax(0, 1fr)
        auto;
    margin: 0;
    overflow: hidden;
    background: rgba(12, 25, 17, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 28px;
    box-shadow:
        0 40px 120px rgba(0, 0, 0, 0.5);
}

.gallery-lightbox__media {
    position: relative;
    min-height: 0;
    display: grid;
    place-items: center;
    overflow: hidden;
    background:
        radial-gradient(
            circle at center,
            rgba(255, 255, 255, 0.045),
            transparent 62%
        ),
        #07130d;
}

.gallery-lightbox__image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 1;
    transform: scale(1);
    transition:
        opacity 260ms ease,
        transform 420ms var(--gallery-ease);
}

.gallery-lightbox__image.is-loading {
    opacity: 0.18;
    transform: scale(0.985);
}


/* =========================================================
   LIGHTBOX LOADER
========================================================= */

.gallery-lightbox__loader {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    opacity: 0;
    visibility: hidden;
    transition:
        opacity 220ms ease,
        visibility 220ms ease;
}

.gallery-lightbox__loader.is-active {
    opacity: 1;
    visibility: visible;
}

.gallery-lightbox__loader span {
    width: 46px;
    height: 46px;
    border: 3px solid rgba(255, 255, 255, 0.16);
    border-top-color: var(--gallery-gold-light);
    border-radius: 50%;
    animation:
        galleryLightboxSpin
        850ms
        linear
        infinite;
}


/* =========================================================
   LIGHTBOX CAPTION
========================================================= */

.gallery-lightbox__caption {
    display: grid;
    grid-template-columns:
        minmax(0, 1fr)
        auto;
    gap: 28px;
    align-items: end;
    padding:
        clamp(22px, 2.6vw, 34px)
        clamp(24px, 3vw, 40px);
    background:
        linear-gradient(
            180deg,
            rgba(14, 31, 21, 0.96),
            rgba(8, 22, 14, 0.99)
        );
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.gallery-lightbox__caption-copy {
    min-width: 0;
}

.gallery-lightbox__category {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 10px;
    color: var(--gallery-gold-light);
    font-size: 0.68rem;
    font-weight: 750;
    letter-spacing: 0.17em;
    line-height: 1.3;
    text-transform: uppercase;
}

.gallery-lightbox__category::before {
    content: "";
    width: 28px;
    height: 1px;
    background: currentColor;
}

.gallery-lightbox__title {
    margin: 0;
    color: #ffffff;
    font-family: var(--font-heading);
    font-size: clamp(1.85rem, 3.4vw, 3.6rem);
    font-weight: 400;
    letter-spacing: -0.045em;
    line-height: 1.04;
}

.gallery-lightbox__description {
    max-width: 740px;
    margin: 13px 0 0;
    color: rgba(255, 255, 255, 0.66);
    font-size: 0.94rem;
    line-height: 1.7;
}

.gallery-lightbox__caption-meta {
    display: grid;
    justify-items: end;
    gap: 12px;
    text-align: right;
}

.gallery-lightbox__location {
    margin: 0;
    color: rgba(255, 255, 255, 0.58);
    font-size: 0.76rem;
    font-weight: 650;
    letter-spacing: 0.08em;
    line-height: 1.5;
    text-transform: uppercase;
}

.gallery-lightbox__counter {
    min-width: 72px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin: 0;
    padding: 9px 14px;
    color: rgba(255, 255, 255, 0.82);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}


/* =========================================================
   LIGHTBOX CONTROLS
========================================================= */

.gallery-lightbox__control,
.gallery-lightbox__close {
    display: grid;
    place-items: center;
    padding: 0;
    cursor: pointer;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 50%;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition:
        color 260ms ease,
        background-color 260ms ease,
        border-color 260ms ease,
        transform 320ms var(--gallery-ease),
        opacity 260ms ease;
}

.gallery-lightbox__control {
    width: 60px;
    height: 60px;
}

.gallery-lightbox__control svg {
    width: 24px;
    height: 24px;
}

.gallery-lightbox__control:hover,
.gallery-lightbox__close:hover {
    color: var(--gallery-green-deep);
    background: var(--gallery-gold-light);
    border-color: var(--gallery-gold-light);
}

.gallery-lightbox__control:hover {
    transform: scale(1.06);
}

.gallery-lightbox__control:disabled {
    cursor: not-allowed;
    opacity: 0.3;
}

.gallery-lightbox__control:disabled:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.16);
    transform: none;
}

.gallery-lightbox__close {
    position: absolute;
    top: -14px;
    right: -14px;
    z-index: 4;
    width: 50px;
    height: 50px;
}

.gallery-lightbox__close svg {
    width: 22px;
    height: 22px;
}

.gallery-lightbox__control:focus-visible,
.gallery-lightbox__close:focus-visible {
    outline: 3px solid rgba(223, 182, 118, 0.65);
    outline-offset: 4px;
}


/* =========================================================
   BODY LOCK
========================================================= */

body.no-scroll {
    overscroll-behavior: none;
}


/* =========================================================
   LIGHTBOX KEYFRAMES
========================================================= */

@keyframes galleryLightboxSpin {
    to {
        transform: rotate(360deg);
    }
}


/* =========================================================
   RESPONSIVE — CTA
========================================================= */

@media (max-width: 900px) {

    .gallery-cta {
        min-height: 650px;
    }

    .gallery-cta__content {
        max-width: 680px;
    }
}


/* =========================================================
   RESPONSIVE — LIGHTBOX TABLET
========================================================= */

@media (max-width: 900px) {

    .gallery-lightbox {
        padding: 18px;
    }

    .gallery-lightbox__panel {
        height: min(900px, calc(100vh - 36px));
        grid-template-columns: 54px minmax(0, 1fr) 54px;
        gap: 10px;
    }

    .gallery-lightbox__control {
        width: 50px;
        height: 50px;
    }

    .gallery-lightbox__control svg {
        width: 21px;
        height: 21px;
    }

    .gallery-lightbox__figure {
        border-radius: 22px;
    }

    .gallery-lightbox__caption {
        gap: 20px;
        padding: 24px;
    }

    .gallery-lightbox__description {
        font-size: 0.9rem;
    }
}


/* =========================================================
   RESPONSIVE — MOBILE
========================================================= */

@media (max-width: 680px) {

    .gallery-cta {
        min-height: 610px;
        align-items: flex-end;
    }

    .gallery-cta__image {
        object-position: 60% center;
    }

    .gallery-cta__content {
        padding-top: 110px;
        padding-bottom: 74px;
    }

    .gallery-cta h2 {
        font-size: clamp(3rem, 14vw, 4.8rem);
    }

    .gallery-cta__actions {
        flex-direction: column;
        align-items: stretch;
    }

    .gallery-cta .button {
        width: 100%;
        justify-content: center;
    }

    .gallery-lightbox {
        padding: 0;
    }

    .gallery-lightbox__panel {
        width: 100%;
        height: 100dvh;
        display: block;
        overflow: hidden;
    }

    .gallery-lightbox__figure {
        width: 100%;
        height: 100%;
        grid-template-rows:
            minmax(0, 1fr)
            auto;
        border: 0;
        border-radius: 0;
    }

    .gallery-lightbox__media {
        min-height: 0;
    }

    .gallery-lightbox__image {
        padding: 58px 12px 10px;
    }

    .gallery-lightbox__caption {
        grid-template-columns: 1fr;
        gap: 18px;
        padding:
            22px
            20px
            calc(20px + env(safe-area-inset-bottom));
    }

    .gallery-lightbox__caption-meta {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 18px;
        text-align: left;
    }

    .gallery-lightbox__location {
        max-width: 70%;
    }

    .gallery-lightbox__close {
        top: calc(12px + env(safe-area-inset-top));
        right: 12px;
        width: 46px;
        height: 46px;
    }

    .gallery-lightbox__control {
        position: absolute;
        top: 50%;
        z-index: 4;
        width: 46px;
        height: 46px;
        transform: translateY(-50%);
    }

    .gallery-lightbox__control:hover {
        transform: translateY(-50%);
    }

    .gallery-lightbox__control--previous {
        left: 12px;
    }

    .gallery-lightbox__control--next {
        right: 12px;
    }

    .gallery-lightbox__title {
        font-size: clamp(1.8rem, 8vw, 2.6rem);
    }
}


/* =========================================================
   SMALL MOBILE
========================================================= */

@media (max-width: 430px) {

    .gallery-cta {
        min-height: 570px;
    }

    .gallery-cta__content {
        padding-bottom: 62px;
    }

    .gallery-cta__eyebrow {
        font-size: 0.66rem;
    }

    .gallery-cta__content > p:not(.gallery-cta__eyebrow) {
        font-size: 0.95rem;
        line-height: 1.72;
    }

    .gallery-lightbox__caption {
        padding:
            18px
            16px
            calc(16px + env(safe-area-inset-bottom));
    }

    .gallery-lightbox__description {
        font-size: 0.84rem;
        line-height: 1.6;
    }

    .gallery-lightbox__control {
        width: 42px;
        height: 42px;
    }

    .gallery-lightbox__control--previous {
        left: 8px;
    }

    .gallery-lightbox__control--next {
        right: 8px;
    }

    .gallery-lightbox__close {
        right: 8px;
        width: 42px;
        height: 42px;
    }
}


/* =========================================================
   REDUCED MOTION — PART 3
========================================================= */

@media (prefers-reduced-motion: reduce) {

    .gallery-cta__image,
    .gallery-cta__content,
    .gallery-lightbox,
    .gallery-lightbox__panel,
    .gallery-lightbox__image,
    .gallery-lightbox__loader,
    .gallery-lightbox__control,
    .gallery-lightbox__close {
        animation: none !important;
        transition: none !important;
    }

    .js .gallery-cta__content {
        opacity: 1;
        transform: none;
    }

    .gallery-lightbox__loader span {
        animation-duration: 1.4s;
    }
}

/* =========================================================
   FINAL GALLERY POLISH
   Cohesive hero, premium CTA and local button treatments
========================================================= */

/* Keep the Gallery aligned to the same visual rhythm as the site */
.gallery-page {
    --gallery-container: min(100% - 9.5rem, 1200px);
}

/* ------------------------------
   HERO REFINEMENT
------------------------------ */

.gallery-hero {
    min-height: max(720px, 100svh);
    align-items: center;
}

.gallery-hero__overlay {
    background:
        linear-gradient(
            180deg,
            rgba(5, 18, 11, 0.42) 0%,
            rgba(5, 18, 11, 0.08) 26%,
            rgba(5, 18, 11, 0.30) 58%,
            rgba(5, 18, 11, 0.88) 100%
        ),
        linear-gradient(
            90deg,
            rgba(5, 18, 11, 0.82) 0%,
            rgba(5, 18, 11, 0.43) 42%,
            rgba(5, 18, 11, 0.08) 78%
        );
}

.gallery-hero__content {
    width: var(--gallery-container);
    max-width: 1200px;
    margin-inline: auto;
    padding:
        clamp(165px, 20vh, 220px)
        0
        clamp(135px, 16vh, 175px);
}

.gallery-hero__title {
    max-width: 820px;
    font-size: clamp(4rem, 7.2vw, 7rem);
    line-height: 0.94;
}

.gallery-hero__description {
    max-width: 590px;
    margin-top: 28px;
    color: rgba(255, 255, 255, 0.82);
    font-size: clamp(1rem, 1.15vw, 1.12rem);
}

.gallery-hero__eyebrow {
    color: rgba(255, 255, 255, 0.86);
}

.gallery-hero__scroll {
    bottom: 34px;
}

.gallery-hero__meta {
    right: max(4.75rem, calc((100vw - 1200px) / 2));
}

.gallery-hero::after {
    height: 115px;
    background:
        linear-gradient(
            180deg,
            transparent 0%,
            rgba(245, 241, 232, 0.08) 45%,
            var(--gallery-cream) 100%
        );
}

/* ------------------------------
   CTA REFINEMENT
------------------------------ */

.gallery-cta {
    min-height: clamp(620px, 66vw, 790px);
    align-items: center;
}

.gallery-cta__overlay {
    background:
        linear-gradient(
            180deg,
            rgba(4, 18, 11, 0.12) 0%,
            rgba(4, 18, 11, 0.34) 45%,
            rgba(4, 18, 11, 0.88) 100%
        ),
        linear-gradient(
            90deg,
            rgba(4, 18, 11, 0.88) 0%,
            rgba(4, 18, 11, 0.56) 42%,
            rgba(4, 18, 11, 0.14) 80%
        );
}

.gallery-cta__content {
    width: var(--gallery-container);
    max-width: 1200px;
    margin-inline: auto;
    padding:
        clamp(110px, 12vw, 160px)
        0;
}

.gallery-cta__content > * {
    max-width: 700px;
}

.gallery-cta h2 {
    max-width: 720px;
    font-size: clamp(3.6rem, 6vw, 6.2rem);
    line-height: 0.96;
}

.gallery-cta__content > p:not(.gallery-cta__eyebrow) {
    max-width: 590px;
    color: rgba(255, 255, 255, 0.80);
}

.gallery-cta__actions {
    gap: 16px;
    margin-top: 34px;
}

/* Local, dependable button styling */
.gallery-cta .button {
    position: relative;
    min-width: 190px;
    min-height: 56px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 0 28px;
    overflow: hidden;
    border-radius: 10px;
    font-size: 0.86rem;
    font-weight: 850;
    letter-spacing: 0.01em;
    text-decoration: none;
    transition:
        transform 260ms ease,
        color 260ms ease,
        background-color 260ms ease,
        border-color 260ms ease,
        box-shadow 260ms ease;
}

.gallery-cta .button::after {
    content: "→";
    font-size: 1rem;
    transition: transform 260ms ease;
}

.gallery-cta .button:hover::after {
    transform: translateX(4px);
}

.gallery-cta .button--primary {
    color: #ffffff;
    border: 1px solid #ef7f1a;
    background:
        linear-gradient(
            135deg,
            #e96f0c,
            #f28a22
        );
    box-shadow:
        0 18px 42px rgba(230, 126, 34, 0.30);
}

.gallery-cta .button--primary:hover {
    color: #ffffff;
    transform: translateY(-3px);
    box-shadow:
        0 24px 54px rgba(230, 126, 34, 0.40);
}

.gallery-cta .button--outline-light {
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.44);
    background: rgba(255, 255, 255, 0.07);
    box-shadow: none;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.gallery-cta .button--outline-light:hover {
    color: #102319;
    border-color: #ffffff;
    background: #ffffff;
    transform: translateY(-3px);
    box-shadow:
        0 20px 44px rgba(0, 0, 0, 0.20);
}

/* Gentle image treatment */
.gallery-cta__image {
    filter: saturate(0.94) contrast(1.04);
}

/* ------------------------------
   SMALL COHESION DETAILS
------------------------------ */

.gallery-intro,
.gallery-collection {
    isolation: isolate;
}

.gallery-toolbar__heading h2,
.gallery-intro__heading h2 {
    color: #172019;
}

.gallery-filter.is-active {
    background:
        linear-gradient(
            135deg,
            var(--gallery-green),
            #294936
        );
}

.gallery-card {
    box-shadow:
        0 18px 55px rgba(16, 35, 25, 0.11);
}

.gallery-card:hover {
    box-shadow:
        0 34px 86px rgba(16, 35, 25, 0.23);
}

/* ------------------------------
   RESPONSIVE FINAL POLISH
------------------------------ */

@media (max-width: 1100px) {
    .gallery-page {
        --gallery-container: min(100% - 4rem, 1000px);
    }
}

@media (max-width: 820px) {
    .gallery-page {
        --gallery-container: min(100% - 3rem, 760px);
    }

    .gallery-hero {
        min-height: 760px;
    }

    .gallery-hero__content {
        padding-top: 145px;
        padding-bottom: 125px;
    }

    .gallery-hero__title {
        font-size: clamp(3.7rem, 11vw, 5.7rem);
    }

    .gallery-cta__content {
        padding-block: 100px;
    }
}

@media (max-width: 640px) {
    .gallery-page {
        --gallery-container: calc(100% - 2.5rem);
    }

    .gallery-hero {
        min-height: 720px;
        align-items: flex-end;
    }

    .gallery-hero__content {
        padding-top: 130px;
        padding-bottom: 108px;
    }

    .gallery-hero__title {
        font-size: clamp(3.2rem, 15vw, 4.8rem);
    }

    .gallery-hero__description {
        max-width: 100%;
        font-size: 0.96rem;
    }

    .gallery-hero__meta {
        display: none;
    }

    .gallery-cta {
        min-height: 650px;
        align-items: flex-end;
    }

    .gallery-cta__content {
        padding-block: 92px 70px;
    }

    .gallery-cta h2 {
        font-size: clamp(3.1rem, 14vw, 4.7rem);
    }

    .gallery-cta__actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .gallery-cta .button {
        width: 100%;
        min-width: 0;
    }
}

@media (max-width: 420px) {
    .gallery-page {
        --gallery-container: calc(100% - 2rem);
    }

    .gallery-hero {
        min-height: 680px;
    }

    .gallery-hero__title {
        font-size: 3.05rem;
    }

    .gallery-cta {
        min-height: 610px;
    }
}

