/* ==========================================================================
   Visual Gallery Stylesheet - G-Family Adventure Safaris
   ========================================================================== */

:root {
    --gy-forest: #a85f28;
    --gy-forest-dark: #78411f;
    --gy-forest-light: #c3692d;
    --gy-gold: #d88732;
    --gy-gold-hover: #bd7326;
    --gy-ochre: #a85f28;
    --gy-sand: #faf7f2;
    --gy-charcoal: #171717;
    --gy-muted: #6b7280;
    --gy-border: rgba(23, 23, 23, 0.08);
    --gy-radius: 14px;
    --gy-transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-container {
    width: min(100% - 2.5rem, 1280px);
    margin: 0 auto;
}

/* --------------------------------------------------------------------------
   Hero Section
   -------------------------------------------------------------------------- */
.gallery-hero {
    position: relative;
    min-height: 480px;
    display: flex;
    align-items: center;
    background: url('/uploads/gallery/serengeti_lions.jpg') center/cover no-repeat;
    color: #fff;
    padding: clamp(5.5rem, 10vw, 8rem) 1.5rem;
    isolation: isolate;
}

.gallery-hero__overlay {
    position: absolute;
    inset: 0;
    background: rgba(18, 18, 18, 0.68);
    z-index: 1;
}

.gallery-hero__container {
    position: relative;
    z-index: 2;
    width: min(100% - 2rem, 920px);
    margin: 0 auto;
    text-align: center;
}

.gallery-hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: rgba(216, 135, 50, 0.25);
    border: 1px solid rgba(216, 135, 50, 0.5);
    border-radius: 30px;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #ffd8a8;
    margin-bottom: 1.25rem;
}

.gallery-hero__title {
    font-family: "Playfair Display", Georgia, serif;
    font-size: clamp(2.2rem, 4.5vw, 3.8rem);
    font-weight: 800;
    line-height: 1.15;
    margin: 0 0 1.25rem;
    letter-spacing: -0.02em;
    color: #fff;
    text-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.gallery-hero__desc {
    font-size: clamp(1rem, 1.8vw, 1.2rem);
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.9);
    max-width: 780px;
    margin: 0 auto 2.25rem;
}

.gallery-hero__actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.gallery-btn-gold {
    background: var(--gy-gold) !important;
    color: #fff !important;
    border: none !important;
    font-weight: 700 !important;
    padding: 0.9rem 2rem !important;
    border-radius: 8px !important;
    transition: var(--gy-transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.gallery-btn-gold:hover {
    background: var(--gy-gold-hover) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(216, 135, 50, 0.35);
}

.gallery-btn-white {
    background: rgba(255, 255, 255, 0.12) !important;
    backdrop-filter: blur(8px);
    color: #fff !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    font-weight: 700 !important;
    padding: 0.9rem 2rem !important;
    border-radius: 8px !important;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--gy-transition);
}

.gallery-btn-white:hover {
    background: #fff !important;
    color: var(--gy-forest) !important;
}

/* --------------------------------------------------------------------------
   Filter Bar
   -------------------------------------------------------------------------- */
.gallery-section {
    padding: 4.5rem 0 6rem;
    background: var(--gy-sand);
}

.gallery-filters-bar {
    display: flex;
    justify-content: center;
    margin-bottom: 3rem;
}

.gallery-filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    background: #fff;
    padding: 0.5rem;
    border-radius: 40px;
    border: 1px solid var(--gy-border);
    box-shadow: 0 4px 15px rgba(0,0,0,0.04);
}

.gallery-filter-pill {
    padding: 0.65rem 1.4rem;
    border-radius: 30px;
    border: none;
    background: transparent;
    color: #4b5563;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    transition: var(--gy-transition);
}

.gallery-filter-pill i {
    font-size: 0.85rem;
}

.gallery-filter-pill:hover {
    color: var(--gy-forest);
    background: rgba(168, 95, 40, 0.08);
}

.gallery-filter-pill.is-active {
    background: var(--gy-forest);
    color: #fff;
    box-shadow: 0 3px 10px rgba(168, 95, 40, 0.25);
}

/* --------------------------------------------------------------------------
   Gallery Grid
   -------------------------------------------------------------------------- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 1.75rem;
}

.gallery-item {
    margin: 0;
    border-radius: var(--gy-radius);
    overflow: hidden;
    position: relative;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(0,0,0,0.06);
    border: 1px solid var(--gy-border);
    background: #000;
    transition: var(--gy-transition);
}

.gallery-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(168, 95, 40, 0.2);
    border-color: rgba(216, 135, 50, 0.4);
}

.gallery-item__media {
    position: relative;
    height: 290px;
    overflow: hidden;
}

.gallery-item__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.65s cubic-bezier(0.16, 1, 0.3, 1), filter 0.4s ease;
}

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

.gallery-item__badge {
    position: absolute;
    top: 14px;
    left: 14px;
    background: rgba(28, 18, 12, 0.85);
    backdrop-filter: blur(6px);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 20px;
    z-index: 2;
}

.gallery-item__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(28, 18, 12, 0.95) 0%, rgba(28, 18, 12, 0.4) 60%, rgba(0,0,0,0.1) 100%);
    opacity: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 1.5rem;
    transition: opacity 0.3s ease;
    z-index: 3;
}

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

.gallery-item__zoom {
    align-self: flex-end;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: background 0.2s, transform 0.2s;
}

.gallery-item:hover .gallery-item__zoom {
    background: var(--gy-gold);
    transform: scale(1.08);
}

.gallery-item__overlay-info {
    color: #fff;
}

.gallery-item__location {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.78rem;
    font-weight: 700;
    color: #ffd8a8;
    margin-bottom: 0.35rem;
}

.gallery-item__title {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.35;
}

/* --------------------------------------------------------------------------
   Experience Callout Banner
   -------------------------------------------------------------------------- */
.gallery-cta-banner {
    margin-top: 4.5rem;
    background: #171717;
    border-radius: 20px;
    padding: clamp(2.5rem, 5vw, 4rem);
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2.5rem;
    box-shadow: 0 20px 45px rgba(168, 95, 40, 0.2);
    border: 1px solid rgba(216, 135, 50, 0.3);
}

.gallery-cta-subhead {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: #ffd8a8;
    margin-bottom: 0.5rem;
}

.gallery-cta-content h2 {
    margin: 0 0 0.85rem;
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #fff;
}

.gallery-cta-content p {
    margin: 0;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.85);
    max-width: 600px;
    line-height: 1.6;
}

.gallery-cta-actions {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   Lightbox Modal
   -------------------------------------------------------------------------- */
.gallery-lightbox {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(10, 20, 16, 0.88);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.gallery-lightbox__wrapper {
    position: relative;
    background: #fff;
    border-radius: 18px;
    overflow: hidden;
    width: min(100%, 1050px);
    max-height: 90vh;
    box-shadow: 0 30px 60px rgba(0,0,0,0.4);
    animation: lbFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes lbFadeIn {
    from {
        opacity: 0;
        transform: scale(0.96);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.gallery-lightbox__close {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0,0,0,0.65);
    color: #fff;
    border: none;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: background 0.2s, transform 0.2s;
}

.gallery-lightbox__close:hover {
    background: var(--gy-gold);
    transform: rotate(90deg);
}

.gallery-lightbox__content {
    display: grid;
    grid-template-columns: 1.25fr 1fr;
    max-height: 90vh;
}

.gallery-lightbox__img-container {
    background: #0d1a14;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    min-height: 440px;
}

.gallery-lightbox__img {
    width: 100%;
    height: 100%;
    max-height: 85vh;
    object-fit: cover;
}

.gallery-lightbox__details {
    padding: 3rem 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow-y: auto;
}

.gallery-lightbox__category {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--gy-ochre);
    margin-bottom: 0.4rem;
}

.gallery-lightbox__title {
    margin: 0 0 0.75rem;
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--gy-charcoal);
    line-height: 1.25;
}

.gallery-lightbox__location {
    margin: 0 0 1.25rem;
    font-size: 0.85rem;
    color: #4b5563;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
}

.gallery-lightbox__location i {
    color: var(--gy-forest);
}

.gallery-lightbox__caption {
    margin: 0 0 2rem;
    font-size: 0.95rem;
    line-height: 1.65;
    color: #374151;
}

.gallery-lightbox__actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: auto;
    padding-top: 1.5rem;
    border-top: 1px solid #f1f3f5;
}

/* --------------------------------------------------------------------------
   Responsive Design
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
    .gallery-lightbox__content {
        grid-template-columns: 1fr;
        max-height: 85vh;
        overflow-y: auto;
    }
    
    .gallery-lightbox__img-container {
        min-height: 260px;
        max-height: 320px;
    }
    
    .gallery-lightbox__details {
        padding: 2rem 1.5rem;
    }

    .gallery-cta-banner {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .gallery-cta-actions {
        width: 100%;
        flex-direction: row;
    }
}

@media (max-width: 600px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .gallery-filter-pills {
        border-radius: 14px;
        width: 100%;
    }
    
    .gallery-filter-pill {
        flex: 1 1 45%;
        justify-content: center;
        font-size: 0.8rem;
        padding: 0.5rem 0.8rem;
    }
    
    .gallery-cta-actions {
        flex-direction: column;
    }
}
