/* =========================================
   GALLERY PAGE HERO
========================================= */

.gallery-page-hero {
    min-height: 580px;
}


/* =========================================
   HERO IMAGE
========================================= */

.gallery-page-hero .page-hero-image img {
    object-position: center 50%;
}


/* =========================================
   HERO OVERLAY
========================================= */

.gallery-page-hero .page-hero-overlay {

    background: linear-gradient(
        90deg,
        rgba(30, 71, 6, 0.88),
        rgba(30, 71, 6, 0.55),
        rgba(30, 71, 6, 0.18)
    );

}


/* =========================================
   TABLET
========================================= */

@media (max-width: 900px) {

    .gallery-page-hero {
        min-height: 540px;
    }

}


/* =========================================
   MOBILE
========================================= */

@media (max-width: 600px) {

    .gallery-page-hero {
        min-height: 480px;
    }


    .gallery-page-hero .page-hero-image img {
        object-position: center;
    }


    .gallery-page-hero .page-hero-overlay {

        background: linear-gradient(
            180deg,
            rgba(30, 71, 6, 0.18),
            rgba(30, 71, 6, 0.92)
        );

    }

}






/* =========================================
   GALLERY INTRO SECTION
========================================= */

.gallery-intro-section {
    width: 100%;

    padding: var(--space-5xl) 0;

    background: var(--white);

    overflow: hidden;
}


/* =========================================
   CONTAINER
========================================= */

.gallery-intro-container {
    width: min(
        calc(100% - 60px),
        var(--container-width)
    );

    margin-inline: auto;
}


/* =========================================
   HEADER
========================================= */

.gallery-intro-header {
    display: flex;

    align-items: flex-end;
    justify-content: space-between;

    gap: 50px;

    margin-bottom: 65px;
}


.gallery-intro-heading {
    max-width: 650px;
}


.gallery-intro-heading .section-eyebrow {
    margin-bottom: 20px;
}


/* TITLE */

.gallery-intro-title {
    margin: 0;

    font-family: var(--font-heading);

    font-size: clamp(42px, 4.5vw, 64px);

    font-weight: var(--fw-regular);

    line-height: 1.02;

    color: var(--text-primary);
}


.gallery-intro-title span {
    display: block;

    color: var(--primary);

    font-style: italic;
}


/* INTRO */

.gallery-intro-text {
    max-width: 350px;
}


.gallery-intro-text p {
    margin: 0;

    font-size: 13px;

    line-height: 1.8;

    color: var(--text-secondary);
}


/* =========================================
   EDITORIAL GRID
========================================= */

.gallery-intro-grid {
    display: grid;

    grid-template-columns:
        minmax(0, 1.25fr)
        minmax(300px, 0.75fr);

    gap: 25px;

    align-items: stretch;
}


/* =========================================
   MAIN IMAGE
========================================= */

.gallery-intro-main {
    position: relative;

    min-height: 620px;

    overflow: hidden;

    background: var(--cream);
}


.gallery-intro-main img {
    width: 100%;
    height: 100%;

    display: block;

    object-fit: cover;

    transition: transform 0.8s ease;
}


.gallery-intro-main:hover img {
    transform: scale(1.035);
}


/* =========================================
   MAIN CAPTION
========================================= */

.gallery-intro-main-caption {
    position: absolute;

    left: 25px;
    bottom: 25px;

    display: flex;

    align-items: center;

    gap: 15px;

    padding: 12px 18px;

    background: rgba(255,255,255,0.94);

    border-left: 3px solid var(--primary);
}


.gallery-intro-main-caption span {
    font-size: 9px;

    letter-spacing: 1.5px;

    color: var(--primary);

    font-weight: var(--fw-semibold);
}


.gallery-intro-main-caption p {
    margin: 0;

    font-family: var(--font-heading);

    font-size: 17px;

    color: var(--text-primary);
}


/* =========================================
   SIDE COLUMN
========================================= */

.gallery-intro-side {
    display: grid;

    grid-template-rows:
        1.25fr
        auto
        0.8fr;

    gap: 25px;
}


/* =========================================
   SIDE IMAGE
========================================= */

.gallery-intro-side-image {
    overflow: hidden;

    background: var(--cream);
}


.gallery-intro-side-image img {
    width: 100%;
    height: 100%;

    display: block;

    object-fit: cover;

    transition: transform 0.8s ease;
}


.gallery-intro-side-image:hover img {
    transform: scale(1.035);
}


/* =========================================
   SIDE CONTENT
========================================= */

.gallery-intro-side-content {
    padding: 25px 5px;

    border-top: 1px solid var(--border-dark);
    border-bottom: 1px solid var(--border-dark);
}


.gallery-intro-side-content span {
    display: block;

    margin-bottom: 10px;

    font-size: 9px;

    letter-spacing: 1.8px;

    color: var(--text-light);

    font-weight: var(--fw-semibold);
}


.gallery-intro-side-content p {
    max-width: 360px;

    margin: 0;

    font-family: var(--font-heading);

    font-size: 22px;

    line-height: 1.35;

    color: var(--text-primary);
}


/* =========================================
   TABLET
========================================= */

@media (max-width: 1000px) {

    .gallery-intro-header {
        flex-direction: column;

        align-items: flex-start;

        gap: 25px;
    }

    .gallery-intro-text {
        max-width: 500px;
    }

    .gallery-intro-grid {
        grid-template-columns:
            minmax(0, 1fr)
            minmax(250px, 0.65fr);
    }

    .gallery-intro-main {
        min-height: 550px;
    }

}


/* =========================================
   MOBILE
========================================= */

@media (max-width: 700px) {

    .gallery-intro-section {
        padding: 80px 0;
    }

    .gallery-intro-container {
        width: min(
            calc(100% - 40px),
            var(--container-width)
        );
    }

    .gallery-intro-title {
        font-size: clamp(38px, 11vw, 52px);
    }

    .gallery-intro-header {
        margin-bottom: 45px;
    }

    .gallery-intro-grid {
        grid-template-columns: 1fr;

        gap: 20px;
    }

    .gallery-intro-main {
        min-height: 480px;
    }

    .gallery-intro-side {
        grid-template-rows:
            350px
            auto
            300px;

        gap: 20px;
    }

}


/* =========================================
   SMALL MOBILE
========================================= */

@media (max-width: 480px) {

    .gallery-intro-section {
        padding: 65px 0;
    }

    .gallery-intro-container {
        width: calc(100% - 30px);
    }

    .gallery-intro-main {
        min-height: 400px;
    }

    .gallery-intro-side {
        grid-template-rows:
            280px
            auto
            250px;
    }

    .gallery-intro-main-caption {
        left: 15px;
        bottom: 15px;

        padding: 10px 14px;
    }

    .gallery-intro-main-caption p {
        font-size: 15px;
    }

}






/* =========================================
   GALLERY SHOWCASE
========================================= */

.gallery-showcase-section {
    width: 100%;

    padding: var(--space-5xl) 0;

    background: var(--cream);

    overflow: hidden;
}


/* =========================================
   CONTAINER
========================================= */

.gallery-showcase-container {
    width: min(
        calc(100% - 60px),
        var(--container-width)
    );

    margin-inline: auto;
}


/* =========================================
   HEADER
========================================= */

.gallery-showcase-header {
    display: flex;

    align-items: flex-end;
    justify-content: space-between;

    gap: 50px;

    margin-bottom: 45px;
}


.gallery-showcase-heading {
    max-width: 650px;
}


.gallery-showcase-heading .section-eyebrow {
    margin-bottom: 20px;
}


.gallery-showcase-title {
    margin: 0;

    font-family: var(--font-heading);

    font-size: clamp(42px, 4.5vw, 64px);

    font-weight: var(--fw-regular);

    line-height: 1.02;

    color: var(--text-primary);
}


.gallery-showcase-title span {
    display: block;

    color: var(--primary);

    font-style: italic;
}


/* =========================================
   INTRO TEXT
========================================= */

.gallery-showcase-intro {
    max-width: 350px;
}


.gallery-showcase-intro p {
    margin: 0;

    font-size: 13px;

    line-height: 1.8;

    color: var(--text-secondary);
}


/* =========================================
   CATEGORY FILTER
========================================= */

.gallery-filter {
    display: flex;

    align-items: center;

    gap: 30px;

    margin-bottom: 35px;

    padding-bottom: 15px;

    border-bottom: 1px solid var(--border-dark);

    overflow-x: auto;

    scrollbar-width: none;
}


.gallery-filter::-webkit-scrollbar {
    display: none;
}


/* FILTER BUTTON */

.gallery-filter-btn {
    position: relative;

    flex-shrink: 0;

    padding: 5px 0 12px;

    border: 0;

    background: transparent;

    color: var(--text-light);

    font-family: var(--font-body);

    font-size: 10px;

    letter-spacing: 1.5px;

    font-weight: var(--fw-semibold);

    cursor: pointer;

    transition: var(--transition);
}


/* ACTIVE LINE */

.gallery-filter-btn::after {
    content: "";

    position: absolute;

    left: 0;
    bottom: -16px;

    width: 0;
    height: 2px;

    background: var(--primary);

    transition: var(--transition);
}


.gallery-filter-btn:hover,
.gallery-filter-btn.active {
    color: var(--primary);
}


.gallery-filter-btn.active::after {
    width: 100%;
}


/* =========================================
   GALLERY GRID
========================================= */

.gallery-showcase-grid {
    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 15px;
}


/* =========================================
   GALLERY ITEM
========================================= */

.gallery-item {
    position: relative;

    display: block;

    width: 100%;

    aspect-ratio: 1 / 1;

    padding: 0;

    border: 0;

    overflow: hidden;

    background: var(--cream-dark);

    cursor: pointer;

    text-align: left;
}


/* =========================================
   IMAGE
========================================= */

.gallery-item img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;

    transition:
        transform 0.8s ease,
        filter 0.5s ease;
}


.gallery-item:hover img {
    transform: scale(1.05);
}


/* =========================================
   OVERLAY GRADIENT
========================================= */

.gallery-item::after {
    content: "";

    position: absolute;

    inset: 0;

    background: linear-gradient(
        180deg,
        transparent 40%,
        rgba(30, 71, 6, 0.9) 100%
    );

    opacity: 0;

    transition: opacity 0.5s ease;
}


.gallery-item:hover::after {
    opacity: 1;
}


/* =========================================
   ITEM CONTENT
========================================= */

.gallery-item-overlay {
    position: absolute;

    z-index: 2;

    left: 20px;
    right: 18px;
    bottom: 18px;

    display: flex;

    align-items: flex-end;
    justify-content: space-between;

    gap: 15px;

    text-align: left;

    opacity: 0;

    transform: translateY(10px);

    transition:
        opacity 0.45s ease,
        transform 0.45s ease;
}


.gallery-item:hover .gallery-item-overlay {
    opacity: 1;

    transform: translateY(0);
}


/* CONTENT */

.gallery-item-overlay > div {
    display: flex;

    flex-direction: column;

    gap: 5px;

    min-width: 0;
}


/* CATEGORY */

.gallery-item-overlay > div > span {
    display: block;

    font-size: 8px;

    letter-spacing: 1.8px;

    color: var(--accent);

    font-weight: var(--fw-semibold);
}


/* TITLE */

.gallery-item-overlay strong {
    display: block;

    font-family: var(--font-heading);

    font-size: 20px;

    line-height: 1.1;

    font-weight: var(--fw-regular);

    color: var(--white);
}


/* =========================================
   EXPAND ICON
========================================= */

.gallery-item-icon {
    width: 36px;
    height: 36px;

    flex: 0 0 36px;

    display: flex;

    align-items: center;
    justify-content: center;

    border: 1px solid rgba(255,255,255,0.55);

    border-radius: 50%;

    color: var(--white);

    font-size: 10px;

    transition: var(--transition);
}


.gallery-item:hover .gallery-item-icon {
    background: var(--accent);

    border-color: var(--accent);

    color: var(--primary-dark);
}


/* =========================================
   HIDDEN FILTER ITEMS
========================================= */

.gallery-item.hidden {
    display: none;
}


/* =========================================
   LIGHTBOX
========================================= */

.gallery-lightbox {
    position: fixed;

    z-index: 9999;

    inset: 0;

    display: flex;

    align-items: center;
    justify-content: center;

    padding: 50px;

    background: rgba(20, 27, 20, 0.96);

    opacity: 0;

    visibility: hidden;

    transition:
        opacity 0.35s ease,
        visibility 0.35s ease;
}


.gallery-lightbox.active {
    opacity: 1;

    visibility: visible;
}


/* =========================================
   LIGHTBOX CONTENT
========================================= */

.gallery-lightbox-content {
    position: relative;

    width: min(1000px, 85vw);

    max-height: 85vh;
}


.gallery-lightbox-content img {
    display: block;

    width: 100%;

    max-height: 78vh;

    object-fit: contain;
}


/* =========================================
   LIGHTBOX CAPTION
========================================= */

.gallery-lightbox-caption {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 20px;

    padding-top: 15px;
}


.gallery-lightbox-caption span {
    font-size: 8px;

    letter-spacing: 1.8px;

    color: var(--accent);

    font-weight: var(--fw-semibold);
}


.gallery-lightbox-caption strong {
    font-family: var(--font-heading);

    font-size: 20px;

    font-weight: var(--fw-regular);

    color: var(--white);
}


/* =========================================
   LIGHTBOX BUTTONS
========================================= */

.gallery-lightbox-close,
.gallery-lightbox-prev,
.gallery-lightbox-next {
    position: absolute;

    display: flex;

    align-items: center;
    justify-content: center;

    border: 1px solid rgba(255,255,255,0.25);

    background: transparent;

    color: var(--white);

    cursor: pointer;

    transition: var(--transition);
}


/* CLOSE */

.gallery-lightbox-close {
    top: 25px;
    right: 30px;

    width: 45px;
    height: 45px;

    border-radius: 50%;
}


/* PREVIOUS / NEXT */

.gallery-lightbox-prev,
.gallery-lightbox-next {
    top: 50%;

    width: 50px;
    height: 50px;

    border-radius: 50%;

    transform: translateY(-50%);
}


.gallery-lightbox-prev {
    left: 30px;
}


.gallery-lightbox-next {
    right: 30px;
}


/* BUTTON HOVER */

.gallery-lightbox-close:hover,
.gallery-lightbox-prev:hover,
.gallery-lightbox-next:hover {
    background: var(--accent);

    border-color: var(--accent);

    color: var(--primary-dark);
}


/* =========================================
   LIGHTBOX COUNTER
========================================= */

.gallery-lightbox-counter {
    position: absolute;

    left: 30px;
    bottom: 25px;

    display: flex;

    gap: 7px;

    font-size: 10px;

    letter-spacing: 1px;

    color: rgba(255,255,255,0.55);
}


/* =========================================
   TABLET
========================================= */

@media (max-width: 1000px) {

    .gallery-showcase-header {
        flex-direction: column;

        align-items: flex-start;

        gap: 25px;
    }


    .gallery-showcase-intro {
        max-width: 500px;
    }


    .gallery-showcase-grid {
        grid-template-columns:
            repeat(3, minmax(0, 1fr));

        gap: 12px;
    }

}


/* =========================================
   MOBILE
========================================= */

@media (max-width: 700px) {

    .gallery-showcase-section {
        padding: 80px 0;
    }


    .gallery-showcase-container {
        width: min(
            calc(100% - 40px),
            var(--container-width)
        );
    }


    .gallery-showcase-title {
        font-size: clamp(38px, 11vw, 52px);
    }


    /* FILTER */

    .gallery-filter {
        gap: 22px;

        margin-bottom: 25px;
    }


    /* 2 COLUMN SQUARE GRID */

    .gallery-showcase-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap: 10px;
    }


    /* ALWAYS SHOW OVERLAY ON MOBILE */

    .gallery-item::after {
        opacity: 1;
    }


    .gallery-item-overlay {
        opacity: 1;

        transform: translateY(0);

        left: 12px;
        right: 12px;
        bottom: 12px;
    }


    .gallery-item-overlay strong {
        font-size: 16px;
    }


    .gallery-item-icon {
        width: 30px;
        height: 30px;

        flex-basis: 30px;

        font-size: 9px;
    }


    /* =====================================
       LIGHTBOX
    ====================================== */

    .gallery-lightbox {
        padding: 50px 15px 30px;
    }


    .gallery-lightbox-content {
        width: 100%;
    }


    .gallery-lightbox-content img {
        max-height: 70vh;
    }


    /* MOVE NAVIGATION TO BOTTOM */

    .gallery-lightbox-prev,
    .gallery-lightbox-next {
        top: auto;
        bottom: 20px;

        width: 42px;
        height: 42px;

        transform: none;
    }


    .gallery-lightbox-prev {
        left: 20px;
    }


    .gallery-lightbox-next {
        right: 20px;
    }


    .gallery-lightbox-caption {
        padding-bottom: 65px;
    }


    .gallery-lightbox-close {
        top: 15px;
        right: 15px;

        width: 40px;
        height: 40px;
    }


    .gallery-lightbox-counter {
        left: 50%;

        bottom: 32px;

        transform: translateX(-50%);
    }

}


/* =========================================
   SMALL MOBILE
========================================= */

@media (max-width: 480px) {

    .gallery-showcase-section {
        padding: 65px 0;
    }


    .gallery-showcase-container {
        width: calc(100% - 30px);
    }


    .gallery-showcase-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap: 8px;
    }


    .gallery-item-overlay {
        left: 10px;
        right: 10px;
        bottom: 10px;

        gap: 8px;
    }


    .gallery-item-overlay strong {
        font-size: 14px;
    }


    .gallery-item-icon {
        width: 27px;
        height: 27px;

        flex-basis: 27px;
    }

}