﻿/* =====================================
   GALLERY HERO
===================================== */

.gallery-hero {
    position: relative;
    min-height: 360px;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: #243d22;
}

.gallery-hero-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 80% 30%, rgba(218, 171, 38, 0.18), transparent 35%), linear-gradient(135deg, #1d351d, #304b2b);
}

.gallery-hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 70px 0;
}

.gallery-label {
    display: inline-block;
    margin-bottom: 18px;
    color: #d9aa2e;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 4px;
}

.gallery-hero h1 {
    margin: 0 0 18px;
    color: #fff;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 58px;
    font-weight: 400;
    line-height: 1.05;
}

.gallery-hero p {
    max-width: 650px;
    margin: 0;
    color: rgba(255, 255, 255, 0.85);
    font-size: 17px;
    line-height: 1.8;
}


/* =====================================
   GALLERY SECTION
===================================== */

.gallery-section {
    padding: 70px 0 90px;
    background: #f8f7f2;
}


/* =====================================
   TABS
===================================== */

.gallery-tabs {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 45px;
}

.gallery-tab {
    border: 1px solid rgba(45, 70, 39, 0.22);
    border-radius: 50px;
    padding: 12px 20px;
    background: transparent;
    color: #30472b;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.4px;
    cursor: pointer;
    transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}

    .gallery-tab:hover {
        border-color: #d5a92d;
        color: #243d22;
        transform: translateY(-2px);
    }

    .gallery-tab.active {
        border-color: #d5a92d;
        background: #d5a92d;
        color: #fff;
    }


/* =====================================
   GALLERY GRID
===================================== */

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}


/* =====================================
   IMAGE ITEM
===================================== */

.gallery-item {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 24px;
    background: #e9e7df;
    cursor: pointer;
    box-shadow: 0 12px 35px rgba(30, 50, 28, 0.08);
    opacity: 1;
    transform: scale(1);
    transition: opacity 0.35s ease, transform 0.35s ease, box-shadow 0.35s ease;
}

    .gallery-item:hover {
        transform: translateY(-6px);
        box-shadow: 0 20px 45px rgba(30, 50, 28, 0.15);
    }

    .gallery-item img {
        width: 100%;
        height: 100%;
        display: block;
        object-fit: cover;
        transition: transform 0.7s cubic-bezier(.2,.7,.2,1), filter 0.5s ease;
    }

    .gallery-item:hover img {
        transform: scale(1.07);
        filter: brightness(0.88);
    }


    /* Hide filtered images */

    .gallery-item.is-hidden {
        display: none;
    }


    /* =====================================
   IMAGE HOVER ICON
===================================== */

    .gallery-item::after {
        content: "\f00e";
        position: absolute;
        left: 50%;
        top: 50%;
        width: 58px;
        height: 58px;
        display: flex;
        align-items: center;
        justify-content: center;
        transform: translate(-50%, -45%) scale(0.7);
        border-radius: 50%;
        background: #d5a92d;
        color: #fff;
        font-family: FontAwesome;
        font-size: 20px;
        opacity: 0;
        transition: opacity 0.3s ease, transform 0.3s ease;
    }

    .gallery-item:hover::after {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }


/* =====================================
   LIGHTBOX
===================================== */

.gallery-lightbox {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: rgba(16, 22, 15, 0.94);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

    .gallery-lightbox.active {
        opacity: 1;
        visibility: visible;
    }


/* =====================================
   LIGHTBOX IMAGE
===================================== */

.lightbox-content {
    position: relative;
    width: min(1100px, 82vw);
    height: min(82vh, 800px);
    display: flex;
    align-items: center;
    justify-content: center;
}

#lightboxImage {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 20px 80px rgba(0, 0, 0, 0.45);
    transform: scale(0.96);
    transition: transform 0.3s ease;
}

.gallery-lightbox.active #lightboxImage {
    transform: scale(1);
}


/* =====================================
   LIGHTBOX BUTTONS
===================================== */

.lightbox-close,
.lightbox-prev,
.lightbox-next,
#lightboxZoom {
    position: absolute;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    background: rgba(20, 30, 18, 0.75);
    color: #fff;
    cursor: pointer;
    transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

    .lightbox-close:hover,
    .lightbox-prev:hover,
    .lightbox-next:hover,
    #lightboxZoom:hover {
        background: #d5a92d;
        border-color: #d5a92d;
        transform: scale(1.08);
    }


/* CLOSE */

.lightbox-close {
    top: 25px;
    right: 30px;
    z-index: 5;
    font-size: 21px;
}


/* PREVIOUS */

.lightbox-prev {
    left: 25px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    font-size: 18px;
}

    .lightbox-prev:hover {
        transform: translateY(-50%) scale(1.08);
    }


/* NEXT */

.lightbox-next {
    right: 25px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    font-size: 18px;
}

    .lightbox-next:hover {
        transform: translateY(-50%) scale(1.08);
    }


/* ZOOM */

.lightbox-controls {
    position: absolute;
    right: 20px;
    bottom: 20px;
    z-index: 5;
}

#lightboxZoom {
    position: relative;
    width: 48px;
    height: 48px;
    font-size: 18px;
}


/* =====================================
   ZOOMED IMAGE
===================================== */

#lightboxImage.zoomed {
    max-width: none;
    max-height: none;
    width: auto;
    height: auto;
    transform: scale(1.8);
    cursor: zoom-out;
}

.gallery-lightbox.zoom-mode {
    overflow: auto;
}


/* =====================================
   BODY LOCK
===================================== */

body.gallery-open {
    overflow: hidden;
}


/* =====================================
   RESPONSIVE
===================================== */

@media (max-width: 991px) {

    .gallery-hero {
        min-height: 320px;
    }

    .gallery-hero-content {
        padding: 60px 0;
    }

    .gallery-hero h1 {
        font-size: 48px;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 22px;
    }

    .gallery-section {
        padding: 55px 0 70px;
    }

    .gallery-tabs {
        margin-bottom: 35px;
    }
}


@media (max-width: 767px) {

    .gallery-hero {
        min-height: 280px;
    }

    .gallery-hero-content {
        padding: 50px 20px;
    }

    .gallery-label {
        font-size: 11px;
        letter-spacing: 2.5px;
    }

    .gallery-hero h1 {
        font-size: 40px;
    }

    .gallery-hero p {
        font-size: 15px;
        line-height: 1.7;
    }

    .gallery-section {
        padding: 45px 0 60px;
    }

    .gallery-tabs {
        justify-content: flex-start;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding: 4px 3px 12px;
        margin-bottom: 30px;
        scrollbar-width: none;
    }

        .gallery-tabs::-webkit-scrollbar {
            display: none;
        }

    .gallery-tab {
        flex: 0 0 auto;
        padding: 10px 17px;
        font-size: 12px;
    }

    .gallery-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .gallery-item {
        border-radius: 16px;
    }

        .gallery-item::after {
            width: 44px;
            height: 44px;
            font-size: 15px;
        }

    .gallery-lightbox {
        padding: 15px;
    }

    .lightbox-content {
        width: 100%;
        height: 75vh;
    }

    .lightbox-close {
        top: 15px;
        right: 15px;
    }

    .lightbox-prev {
        left: 10px;
    }

    .lightbox-next {
        right: 10px;
    }

    .lightbox-close,
    .lightbox-prev,
    .lightbox-next {
        width: 45px;
        height: 45px;
    }

    .lightbox-controls {
        right: 10px;
        bottom: 10px;
    }
}


@media (max-width: 480px) {

    .gallery-grid {
        gap: 10px;
    }

    .gallery-item {
        border-radius: 13px;
    }

    .gallery-hero h1 {
        font-size: 34px;
    }
}
