/* ==========================================================
   GALLERY PAGE
========================================================== */

.gallery-page {
    background: #fffdf9;
}


/* ==========================================================
   GALLERY HERO
========================================================== */

.gallery-hero {
    position: relative;

    margin-top: 50px;

    padding:
        48px
        0
        32px;

    overflow: hidden;

    background:
        linear-gradient(
            90deg,
            #fffdf9 0%,
            #fffdf9 34%,
            #faf8f2 100%
        );
}


/* ==========================================================
   MAIN LAYOUT
========================================================== */

.gallery-hero__layout {
    display: grid;

    grid-template-columns:
        minmax(300px, .62fr)
        minmax(760px, 1.38fr);

    gap: 44px;

    align-items: center;
}


/* ==========================================================
   LEFT CONTENT
========================================================== */

.gallery-hero__content {
    max-width: 390px;
}


/* ==========================================================
   EYEBROW
========================================================== */

.gallery-hero__eyebrow {
    display: flex;

    align-items: center;

    gap: 8px;

    margin-bottom: 14px;

    color: #1b4b3d;

    font-size: 10px;

    font-weight: 700;

    letter-spacing: .11em;

    text-transform: uppercase;
}


.gallery-hero__leaf {
    color: #bf8f37;

    font-size: 14px;
}


/* ==========================================================
   TITLE
========================================================== */

.gallery-hero__title {
    margin: 0;

    color: #17211d;

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size: 49px;

    font-weight: 400;

    line-height: 1.05;

    letter-spacing: -.035em;
}


.gallery-hero__title span,
.gallery-hero__title em {
    display: block;
}


.gallery-hero__title em {
    color: #17483b;

    font-weight: 400;

    font-style: italic;
}


/* ==========================================================
   DIVIDER
========================================================== */

.gallery-hero__divider {
    display: flex;

    align-items: center;

    gap: 8px;

    width: fit-content;

    margin:
        19px
        0
        17px;

    color: #6f8878;
}


.gallery-hero__divider span:first-child,
.gallery-hero__divider span:last-child {
    width: 46px;
    height: 1px;

    background: #c99c43;
}


.gallery-hero__divider span:nth-child(2) {
    font-size: 13px;
}


/* ==========================================================
   TEXT
========================================================== */

.gallery-hero__text {
    max-width: 360px;

    margin: 0;

    color: #53615b;

    font-size: 11px;

    line-height: 1.7;
}


/* ==========================================================
   FEATURED VISUAL
========================================================== */

.gallery-hero__visual {
    min-width: 0;

    display: grid;

    grid-template-columns:
        1.28fr
        .98fr
        1.05fr;

    gap: 5px;

    height: 345px;

    overflow: hidden;

    border-radius: 10px;
}


/* ==========================================================
   FEATURED CARD
========================================================== */

.gallery-hero__card {
    position: relative;

    min-width: 0;

    overflow: hidden;

    background: #758a76;
}


.gallery-hero__card:first-child {
    clip-path:
        polygon(
            0 0,
            100% 0,
            89% 100%,
            0 100%
        );
}


.gallery-hero__card:nth-child(2) {
    clip-path:
        polygon(
            10% 0,
            100% 0,
            90% 100%,
            0 100%
        );

    margin-left: -35px;
}


.gallery-hero__card:nth-child(3) {
    clip-path:
        polygon(
            10% 0,
            100% 0,
            100% 100%,
            0 100%
        );

    margin-left: -35px;
}


/* ==========================================================
   IMAGE PLACEHOLDER
========================================================== */

.gallery-hero__image-placeholder {
    position: absolute;

    inset: 0;

    display: flex;

    align-items: center;
    justify-content: center;

    color: #ffffff;

    background:
        linear-gradient(
            135deg,
            #7e967d,
            #3f684d
        );
}


.gallery-hero__card:nth-child(2)
.gallery-hero__image-placeholder {
    background:
        linear-gradient(
            135deg,
            #947f6a,
            #614f45
        );
}


.gallery-hero__card:nth-child(3)
.gallery-hero__image-placeholder {
    background:
        linear-gradient(
            135deg,
            #789066,
            #3d6740
        );
}


.gallery-hero__image-placeholder span {
    padding:
        6px
        8px;

    background: rgba(12,59,46,.58);

    border-radius: 999px;

    font-size: 7px;
}


/* ==========================================================
   DARK IMAGE OVERLAY
========================================================== */

.gallery-hero__card-overlay {
    position: absolute;

    inset: 0;

    background:
        linear-gradient(
            180deg,
            rgba(0,0,0,0) 46%,
            rgba(5,23,17,.72) 100%
        );
}


/* ==========================================================
   CARD TEXT
========================================================== */

.gallery-hero__card-content {
    position: absolute;

    left: 20px;
    right: 18px;
    bottom: 17px;

    z-index: 2;

    color: #ffffff;
}


.gallery-hero__card:nth-child(2)
.gallery-hero__card-content,
.gallery-hero__card:nth-child(3)
.gallery-hero__card-content {
    left: 38px;
}


.gallery-hero__card-content h2 {
    margin:
        0
        0
        5px;

    color: #ffffff;

    font-family: inherit;

    font-size: 12px;

    font-weight: 600;

    line-height: 1.25;
}


.gallery-hero__card-content p {
    display: flex;

    align-items: center;

    gap: 5px;

    margin: 0;

    color: rgba(255,255,255,.86);

    font-size: 8px;

    line-height: 1.3;
}


/* ==========================================================
   NEXT BUTTON
========================================================== */

.gallery-hero__next {
    position: absolute;

    top: 50%;
    right: 14px;

    z-index: 3;

    width: 38px;
    height: 38px;

    display: flex;

    align-items: center;
    justify-content: center;

    padding: 0;

    color: #17483b;

    background: rgba(255,255,255,.94);

    border: 0;

    border-radius: 50%;

    font-size: 16px;

    cursor: pointer;

    transform: translateY(-50%);

    box-shadow:
        0
        5px
        15px
        rgba(0,0,0,.10);
}

/* ==========================================================
   GALLERY — FILTERS
========================================================== */

.gallery-filters {
    position: relative;

    padding:
        0
        0
        22px;

    background: #fffdf9;
}


/* ==========================================================
   BAR
========================================================== */

.gallery-filters__bar {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 24px;
}


/* ==========================================================
   CATEGORY FILTERS
========================================================== */

.gallery-filters__categories {
    display: flex;

    align-items: center;

    gap: 10px;

    min-width: 0;

    overflow-x: auto;

    padding-bottom: 2px;

    scrollbar-width: none;
}


.gallery-filters__categories::-webkit-scrollbar {
    display: none;
}


/* ==========================================================
   FILTER BUTTON
========================================================== */

.gallery-filter {
    flex: 0 0 auto;

    min-height: 36px;

    padding:
        8px
        17px;

    color: #3f4f48;

    background: #ffffff;

    border:
        1px solid rgba(12,59,46,.13);

    border-radius: 7px;

    font-family: inherit;

    font-size: 9px;

    font-weight: 500;

    line-height: 1;

    cursor: pointer;

    transition:
        color .2s ease,
        background-color .2s ease,
        border-color .2s ease;
}


.gallery-filter:hover {
    color: #17483b;

    border-color: #17483b;
}


.gallery-filter.is-active {
    color: #ffffff;

    background: #10483a;

    border-color: #10483a;
}


/* ==========================================================
   VIEW TOGGLE
========================================================== */

.gallery-filters__view {
    flex: 0 0 auto;

    display: flex;

    align-items: center;

    gap: 3px;

    padding: 3px;

    background: #ffffff;

    border:
        1px solid rgba(12,59,46,.12);

    border-radius: 7px;
}


/* ==========================================================
   VIEW BUTTON
========================================================== */

.gallery-view-toggle {
    width: 34px;
    height: 34px;

    display: flex;

    align-items: center;
    justify-content: center;

    padding: 0;

    color: #42534b;

    background: transparent;

    border: 0;

    border-radius: 5px;

    font-family: inherit;

    font-size: 16px;

    cursor: pointer;

    transition:
        color .2s ease,
        background-color .2s ease;
}


.gallery-view-toggle.is-active {
    color: #ffffff;

    background: #10483a;
}


/* ==========================================================
   GALLERY — MAIN CONTENT
========================================================== */

.gallery-content {
    position: relative;

    padding:
        0
        0
        28px;

    background: #fffdf9;
}


/* ==========================================================
   LAYOUT
========================================================== */

.gallery-content__layout {
    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        245px;

    gap: 16px;

    align-items: start;
}


/* ==========================================================
   GALLERY GRID
========================================================== */

.gallery-grid {
    display: grid;

    grid-template-columns:
        repeat(5, minmax(0, 1fr));

    gap: 10px;
}


/* ==========================================================
   GALLERY CARD
========================================================== */

.gallery-card {
    min-width: 0;

    overflow: hidden;

    background: #ffffff;

    border:
        1px solid rgba(12,59,46,.09);

    border-radius: 8px;

    transition:
        opacity .25s ease,
        transform .25s ease;
}


.gallery-card.is-hidden {
    display: none;
}


/* ==========================================================
   IMAGE
========================================================== */

.gallery-card__image {
    min-height: 125px;

    display: flex;

    align-items: center;
    justify-content: center;

    overflow: hidden;

    color: #ffffff;

    background:
        linear-gradient(
            135deg,
            #829680,
            #506d58
        );
}


.gallery-card:nth-child(2n)
.gallery-card__image {
    background:
        linear-gradient(
            135deg,
            #9b816d,
            #665546
        );
}


.gallery-card:nth-child(3n)
.gallery-card__image {
    background:
        linear-gradient(
            135deg,
            #768d6c,
            #3d674a
        );
}


.gallery-card__image span {
    max-width: 90%;

    padding:
        5px
        7px;

    color: #ffffff;

    background: rgba(12,59,46,.58);

    border-radius: 999px;

    font-size: 6px;

    text-align: center;
}


/* ==========================================================
   CARD CONTENT
========================================================== */

.gallery-card__content {
    padding:
        9px
        9px
        10px;
}


.gallery-card__content h3 {
    margin:
        0
        0
        5px;

    color: #253e35;

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size: 10px;

    font-weight: 400;

    line-height: 1.25;
}


.gallery-card__content p {
    display: flex;

    align-items: center;

    gap: 4px;

    margin: 0;

    color: #68736d;

    font-size: 7px;

    line-height: 1.3;
}


/* ==========================================================
   LIST VIEW
========================================================== */

.gallery-grid.is-list {
    grid-template-columns: 1fr;
}


.gallery-grid.is-list .gallery-card {
    display: grid;

    grid-template-columns:
        180px
        minmax(0, 1fr);

    min-height: 130px;
}


.gallery-grid.is-list .gallery-card__image {
    min-height: 130px;
}


.gallery-grid.is-list .gallery-card__content {
    display: flex;

    flex-direction: column;

    justify-content: center;

    padding:
        18px
        20px;
}


.gallery-grid.is-list .gallery-card__content h3 {
    font-size: 15px;
}


.gallery-grid.is-list .gallery-card__content p {
    margin-top: 5px;

    font-size: 9px;
}


/* ==========================================================
   SIDEBAR
========================================================== */

.gallery-sidebar {
    display: grid;

    gap: 12px;

    position: sticky;

    top: 105px;
}


/* ==========================================================
   STATS CARD
========================================================== */

.gallery-sidebar__stats {
    padding:
        20px
        18px;

    background:
        linear-gradient(
            135deg,
            #f7f3e9,
            #fbf9f4
        );

    border:
        1px solid rgba(12,59,46,.07);

    border-radius: 9px;
}


/* ==========================================================
   SIDEBAR HEADING
========================================================== */

.gallery-sidebar__heading {
    display: flex;

    align-items: center;

    gap: 7px;

    margin-bottom: 18px;
}


.gallery-sidebar__heading h2 {
    margin: 0;

    color: #21473b;

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size: 16px;

    font-weight: 400;

    line-height: 1.25;
}


.gallery-sidebar__heading span {
    color: #7b8d80;

    font-size: 12px;
}


/* ==========================================================
   STATS LIST
========================================================== */

.gallery-sidebar__stats-list {
    display: grid;

    gap: 15px;
}


/* ==========================================================
   STAT
========================================================== */

.gallery-sidebar__stat {
    display: grid;

    grid-template-columns:
        38px
        minmax(0, 1fr);

    gap: 10px;

    align-items: center;
}


.gallery-sidebar__stat-icon {
    width: 36px;
    height: 36px;

    display: flex;

    align-items: center;
    justify-content: center;

    color: #315e4e;

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size: 18px;
}


.gallery-sidebar__stat strong {
    display: block;

    margin-bottom: 2px;

    color: #173f34;

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size: 19px;

    font-weight: 400;
}


.gallery-sidebar__stat span {
    display: block;

    color: #59655f;

    font-size: 7px;

    line-height: 1.3;
}


/* ==========================================================
   SIDEBAR CTA
========================================================== */

.gallery-sidebar__cta {
    position: relative;

    min-height: 210px;

    overflow: hidden;

    padding:
        22px
        18px;

    color: #ffffff;

    background:
        linear-gradient(
            135deg,
            #17483b,
            #0c342a
        );

    border-radius: 9px;
}


.gallery-sidebar__cta h2 {
    max-width: 170px;

    margin: 0;

    color: #fffaf0;

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size: 18px;

    font-weight: 400;

    line-height: 1.25;
}


.gallery-sidebar__cta p {
    max-width: 160px;

    margin:
        8px
        0
        0;

    color: #e0a84d;

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size: 13px;

    font-style: italic;

    line-height: 1.4;
}


.gallery-sidebar__cta a {
    position: relative;

    z-index: 2;

    display: inline-flex;

    align-items: center;

    gap: 8px;

    margin-top: 16px;

    padding:
        8px
        12px;

    color: #17483b;

    background: #fffdf9;

    border-radius: 5px;

    font-size: 8px;

    font-weight: 700;
}


.gallery-sidebar__cta-leaf {
    position: absolute;

    right: -10px;
    bottom: -18px;

    color: rgba(218,177,85,.25);

    font-size: 95px;

    transform: rotate(-25deg);
}

/* ==========================================================
   GALLERY — BOTTOM QUOTE
========================================================== */

.gallery-quote {
    position: relative;

    padding:
        0
        0
        90px;

    background: #fffdf9;
}


.gallery-quote__box {
    display: flex;

    align-items: center;
    justify-content: center;

    gap: 16px;

    max-width: 900px;

    margin:
        0
        auto;

    padding:
        14px
        28px;

    background:
        linear-gradient(
            90deg,
            #f4f0e6,
            #faf8f2,
            #f4f0e6
        );

    border-radius: 8px;

    text-align: center;
}


.gallery-quote__mark {
    color: #17483b;

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size: 34px;

    font-weight: 700;

    line-height: .8;
}


.gallery-quote__box p {
    margin: 0;

    color: #34483f;

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size: 16px;

    font-style: italic;

    line-height: 1.45;
}


.gallery-quote__leaf {
    color: #8b9b8c;

    font-size: 16px;
}

/* ==========================================================
   GALLERY PAGE — RESPONSIVE
   Paste at the END of gallery.css
========================================================== */


/* ==========================================================
   SMALL LAPTOP / LARGE TABLET — 1200px
========================================================== */

@media (max-width: 1200px) {

    /* HERO */

    .gallery-hero__layout {
        grid-template-columns:
            minmax(280px, .65fr)
            minmax(0, 1.35fr);

        gap: 30px;
    }

    .gallery-hero__title {
        font-size: 44px;
    }

    .gallery-hero__visual {
        height: 320px;
    }


    /* MAIN GRID */

    .gallery-content__layout {
        grid-template-columns:
            minmax(0, 1fr)
            225px;
    }

    .gallery-grid {
        grid-template-columns:
            repeat(4, minmax(0, 1fr));
    }
}


/* ==========================================================
   TABLET — 992px
========================================================== */

@media (max-width: 992px) {

    /* ======================================================
       HERO
    ====================================================== */

    .gallery-hero {
        margin-top: 35px;

        padding:
            42px
            0
            30px;
    }

    .gallery-hero__layout {
        grid-template-columns: 1fr;

        gap: 28px;
    }

    .gallery-hero__content {
        max-width: 600px;
    }

    .gallery-hero__title {
        font-size: 43px;
    }

    .gallery-hero__text {
        max-width: 520px;

        font-size: 12px;
    }

    .gallery-hero__visual {
        height: 330px;
    }


    /* ======================================================
       FILTERS
    ====================================================== */

    .gallery-filters__bar {
        gap: 16px;
    }

    .gallery-filter {
        min-height: 34px;

        padding:
            8px
            14px;
    }


    /* ======================================================
       MAIN CONTENT
    ====================================================== */

    .gallery-content__layout {
        grid-template-columns:
            minmax(0, 1fr)
            210px;

        gap: 14px;
    }

    .gallery-grid {
        grid-template-columns:
            repeat(3, minmax(0, 1fr));
    }

    .gallery-card__image {
        min-height: 145px;
    }


    /* SIDEBAR */

    .gallery-sidebar {
        top: 90px;
    }

    .gallery-sidebar__stats {
        padding:
            18px
            15px;
    }

    .gallery-sidebar__cta {
        padding:
            20px
            15px;
    }
}


/* ==========================================================
   MOBILE / LARGE PHONE — 767px
========================================================== */

@media (max-width: 767px) {

    /* ======================================================
       HERO
    ====================================================== */

    .gallery-hero {
        margin-top: 20px;

        padding:
            34px
            0
            28px;
    }

    .gallery-hero__layout {
        grid-template-columns: 1fr;

        gap: 24px;
    }

    .gallery-hero__content {
        max-width: 100%;
    }

    .gallery-hero__eyebrow {
        font-size: 9px;
    }

    .gallery-hero__title {
        font-size: clamp(35px, 10vw, 42px);
    }

    .gallery-hero__text {
        max-width: 100%;

        font-size: 12px;
    }


    /* Hero collage becomes normal stacked grid */

    .gallery-hero__visual {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        height: auto;

        gap: 10px;

        overflow: visible;
    }

    .gallery-hero__card,
    .gallery-hero__card:first-child,
    .gallery-hero__card:nth-child(2),
    .gallery-hero__card:nth-child(3) {
        min-height: 220px;

        margin-left: 0;

        clip-path: none;

        border-radius: 9px;
    }

    .gallery-hero__card:first-child {
        grid-column: 1 / -1;
    }

    .gallery-hero__card:nth-child(2)
    .gallery-hero__card-content,
    .gallery-hero__card:nth-child(3)
    .gallery-hero__card-content {
        left: 18px;
    }

    .gallery-hero__next {
        width: 34px;
        height: 34px;
    }


    /* ======================================================
       FILTERS
    ====================================================== */

    .gallery-filters {
        padding-bottom: 18px;
    }

    .gallery-filters__bar {
        align-items: flex-start;

        gap: 12px;
    }

    .gallery-filters__categories {
        flex: 1;
    }

    .gallery-filter {
        min-height: 32px;

        padding:
            7px
            12px;

        font-size: 8px;
    }

    .gallery-view-toggle {
        width: 32px;
        height: 32px;
    }


    /* ======================================================
       MAIN CONTENT
    ====================================================== */

    .gallery-content__layout {
        grid-template-columns: 1fr;

        gap: 24px;
    }

    .gallery-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap: 11px;
    }

    .gallery-card__image {
        min-height: 180px;
    }

    .gallery-card__content {
        padding:
            11px
            10px
            12px;
    }

    .gallery-card__content h3 {
        font-size: 12px;
    }

    .gallery-card__content p {
        font-size: 8px;
    }


    /* ======================================================
       LIST VIEW
    ====================================================== */

    .gallery-grid.is-list .gallery-card {
        grid-template-columns:
            150px
            minmax(0, 1fr);

        min-height: 120px;
    }

    .gallery-grid.is-list .gallery-card__image {
        min-height: 120px;
    }

    .gallery-grid.is-list .gallery-card__content {
        padding:
            14px
            15px;
    }


    /* ======================================================
       SIDEBAR
    ====================================================== */

    .gallery-sidebar {
        position: static;

        grid-template-columns:
            1fr
            1fr;

        gap: 12px;
    }

    .gallery-sidebar__stats,
    .gallery-sidebar__cta {
        min-height: 100%;
    }

    .gallery-sidebar__stats-list {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap:
            15px
            10px;
    }

    .gallery-sidebar__cta h2 {
        font-size: 19px;
    }


    /* ======================================================
       BOTTOM QUOTE
    ====================================================== */

    .gallery-quote {
        padding-bottom: 65px;
    }

    .gallery-quote__box {
        gap: 12px;

        padding:
            16px
            20px;
    }

    .gallery-quote__box p {
        font-size: 14px;
    }

    .gallery-quote__mark {
        font-size: 30px;
    }
}


/* ==========================================================
   SMALL MOBILE — 480px
========================================================== */

@media (max-width: 480px) {

    /* ======================================================
       HERO
    ====================================================== */

    .gallery-hero {
        padding-top: 28px;
    }

    .gallery-hero__title {
        font-size: 35px;
    }

    .gallery-hero__visual {
        grid-template-columns: 1fr;
    }

    .gallery-hero__card:first-child {
        grid-column: auto;
    }

    .gallery-hero__card,
    .gallery-hero__card:first-child,
    .gallery-hero__card:nth-child(2),
    .gallery-hero__card:nth-child(3) {
        min-height: 230px;
    }


    /* ======================================================
       FILTERS
    ====================================================== */

    .gallery-filters__bar {
        flex-direction: column;
    }

    .gallery-filters__categories {
        width: 100%;
    }

    .gallery-filters__view {
        align-self: flex-end;
    }


    /* ======================================================
       GRID
    ====================================================== */

    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .gallery-card__image {
        min-height: 230px;
    }


    /* ======================================================
       LIST VIEW
    ====================================================== */

    .gallery-grid.is-list .gallery-card {
        grid-template-columns: 1fr;
    }

    .gallery-grid.is-list .gallery-card__image {
        min-height: 190px;
    }

    .gallery-grid.is-list .gallery-card__content {
        padding:
            15px
            14px;
    }


    /* ======================================================
       SIDEBAR
    ====================================================== */

    .gallery-sidebar {
        grid-template-columns: 1fr;

        gap: 14px;
    }

    .gallery-sidebar__stats {
        padding:
            20px
            18px;
    }

    .gallery-sidebar__stats-list {
        grid-template-columns: 1fr 1fr;
    }

    .gallery-sidebar__cta {
        min-height: 190px;
    }


    /* ======================================================
       QUOTE
    ====================================================== */

    .gallery-quote {
        padding-bottom: 60px;
    }

    .gallery-quote__box {
        align-items: flex-start;

        gap: 8px;

        padding:
            16px
            14px;
    }

    .gallery-quote__box p {
        font-size: 13px;
    }

    .gallery-quote__mark {
        font-size: 26px;
    }

    .gallery-quote__leaf {
        font-size: 14px;
    }
}


/* ==========================================================
   VERY SMALL MOBILE — 360px
========================================================== */

@media (max-width: 360px) {

    .gallery-hero__title {
        font-size: 32px;
    }

    .gallery-sidebar__stats-list {
        grid-template-columns: 1fr;
    }

    .gallery-quote__box p {
        font-size: 12px;
    }
}