/* ==============================
   GALLERY
================================ */
:root {
     --green: #084523;
    --green-dark: #084523;
    --green-light: #28583D;

    --gold: #fcd305;
    --gold-light: #fcd305;

    --cream: #F8F5EC;
    --cream-dark: #EFE9D8;

    --text: #27382D;
    --muted: #68756C;

    --white: #FFFFFF;
}


.gallery-section {
    padding: 110px 0;
    background: var(--cream);
}

.gallery-heading {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 45px;
}

.section-label {
    display: inline-block;
    margin-bottom: 12px;
    color: var(--gold);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 3px;
}

.gallery-heading h2 {
    margin: 0;
    color: var(--green);
    font-family: "Playfair Display", serif;
    font-size: clamp(36px, 5vw, 58px);
    line-height: 1.1;
}

.gallery-heading h2 em {
    color: var(--gold);
    font-weight: 500;
}

.gallery-heading p {
    margin-top: 18px;
    color: var(--muted);
    font-size: 16px;
}


/* ==============================
   FILTER
================================ */

.gallery-filter {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 45px;
}

.filter-btn {
    border: 1px solid rgba(23, 63, 42, 0.18);
        background: #68ad35;
    color: #fff;
    padding: 11px 23px;
    border-radius: 50px;
    cursor: pointer;
    font-family: "DM Sans", sans-serif;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: .5px;
    transition: .3s ease;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--green);
    color: var(--white);
    border-color: var(--green);
    transform: translateY(-2px);
}


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

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

.gallery-item {
    position: relative;
    height: 330px;
    overflow: hidden;
    border-radius: 16px;
    background: var(--cream-dark);
    cursor: pointer;

    opacity: 1;
    transform: scale(1);
    transition:
        opacity .35s ease,
        transform .35s ease;
}

.gallery-item.hide {
    display: none;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform .7s cubic-bezier(.2,.7,.2,1);
}

.gallery-item:hover img {
    transform: scale(1.08);
}


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

.gallery-overlay {
    position: absolute;
    inset: 0;

    display: flex;
    align-items: flex-end;
    justify-content: space-between;

    padding: 22px;

    background:
        linear-gradient(
            to top,
            rgba(14, 43, 28, .82),
            rgba(14, 43, 28, 0) 60%
        );

    opacity: 0;
    transition: opacity .35s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay span {
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.gallery-view {
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255,255,255,.6);
    border-radius: 50%;
    background: rgba(255,255,255,.12);
    color: #fff;
    font-size: 27px;
    line-height: 1;
    cursor: pointer;
    backdrop-filter: blur(8px);
    transition: .3s ease;
}

.gallery-view:hover {
    background: var(--gold);
    border-color: var(--gold);
    transform: rotate(90deg);
}


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

.gallery-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;

    display: flex;
    justify-content: center;
    align-items: center;

    padding: 35px;

    background: rgba(7, 20, 13, .94);
    backdrop-filter: blur(12px);

    opacity: 0;
    visibility: hidden;
    transition: .3s ease;
}

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

.lightbox-content {
    max-width: min(1100px, 90vw);
    max-height: 90vh;
    text-align: center;
}

.lightbox-content img {
    display: block;
    max-width: 100%;
    max-height: 82vh;
    object-fit: contain;

    border-radius: 10px;
    box-shadow: 0 25px 80px rgba(0,0,0,.5);

    transform: scale(.92);
    transition: transform .35s ease;
}

.gallery-lightbox.active .lightbox-content img {
    transform: scale(1);
}

.lightbox-caption {
    margin-top: 15px;
    color: rgba(255,255,255);
    font-size: 15px;
    letter-spacing: 1px;
}


/* ==============================
   BUTTONS
================================ */

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;

    width: 48px;
    height: 48px;

    border: 1px solid rgba(255,255,255,.25);
    border-radius: 50%;

    background: rgba(255,255,255,.08);
    color: #fff;

    cursor: pointer;
    transition: .3s ease;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    background: var(--gold);
    border-color: var(--gold);
}

.lightbox-close {
    top: 25px;
    right: 30px;
    font-size: 30px;
    line-height: 1;
}

.lightbox-prev {
    left: 30px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
}

.lightbox-next {
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
}


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

@media (max-width: 900px) {

    .gallery-section {
        padding: 80px 0;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .gallery-item {
        height: 270px;
    }

    .gallery-overlay {
        opacity: 1;
    }

    .lightbox-prev {
        left: 12px;
    }

    .lightbox-next {
        right: 12px;
    }
}

@media (max-width: 600px) {

    .gallery-heading {
        margin-bottom: 30px;
    }

    .gallery-filter {
        gap: 8px;
        margin-bottom: 30px;
    }

    .filter-btn {
        padding: 9px 16px;
        font-size: 12px;
    }

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

    .gallery-item {
        height: 210px;
        border-radius: 11px;
    }

    .gallery-overlay {
        padding: 12px;
    }

    .gallery-overlay span {
        font-size: 10px;
    }

    .gallery-view {
        width: 34px;
        height: 34px;
        font-size: 22px;
    }

    .gallery-lightbox {
        padding: 20px;
    }

    .lightbox-close {
        top: 15px;
        right: 15px;
        width: 42px;
        height: 42px;
    }

    .lightbox-prev,
    .lightbox-next {
        width: 40px;
        height: 40px;
    }

    .lightbox-prev {
        left: 10px;
    }

    .lightbox-next {
        right: 10px;
    }

    .lightbox-content {
        max-width: 82vw;
    }
}