/* ============================================================
   BWAY — Gallery Section Styles
   Font stack, colors and spacing mirror your site's warm golden theme
   ============================================================ */

:root {
    --gold: #C49A3C;
    --gold-light: #E8C96A;
    --gold-dark: #8A6B20;
    --cream: #F9F3E8;
    --warm-white: #FDF8F0;
    --brown: #4A3520;
    --brown-mid: #6B4E2F;
    --border: rgba(196, 154, 60, 0.25);
    --shadow: rgba(74, 53, 32, 0.12);
    --transition: .28s cubic-bezier(.4, 0, .2, 1);
}

body {
    background: #f8f2e7 !important;
}

.footer-wave-path {
    fill: #f9f3e8 !important;
}


.background-hero {
    opacity: 0.6 !important;
}

section {
    padding-top: 0 !important;
}

/* ── Wrapper ─────────────────────────────────────────────── */
.gallery-Wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: linear-gradient(0deg, var(--cream) 70%, transparent 100%);
    /* offset for your navbar */
}

.gallery-header {
    padding: 3rem 5vw 1.5rem;
    border-bottom: 1px solid var(--border);
}

.gallery-header h1 {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    color: var(--brown);
    font-weight: 700;
    letter-spacing: -.02em;
    margin: 0 0 .3rem;
}

.gallery-header p {
    color: var(--brown-mid);
    font-size: .95rem;
    margin: 0;
}

/* ── Filter bar (photos / videos toggles) ────────────────── */
.gallery-filters {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: .9rem 5vw;
    background: var(--warm-white);
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
}

.gallery-filters .filter-label {
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: var(--brown-mid);
    font-weight: 600;
}

.toggle-btn {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .4rem .9rem;
    border-radius: 99px;
    border: 1.5px solid var(--border);
    background: transparent;
    color: var(--brown);
    font-size: .85rem;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.toggle-btn svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
}

.toggle-btn.active {
    background: var(--gold);
    border-color: var(--gold);
    color: #fff;
}

.toggle-btn:hover:not(.active) {
    border-color: var(--gold);
    color: var(--gold-dark);
}

/* ── Body: sidebar + grid ────────────────────────────────── */
.gallery-body {
    display: flex;
    flex: 1;
}

/* ── Sidebar categories ──────────────────────────────────── */
.gallery-sidebar {
    width: 220px;
    min-width: 180px;
    flex-shrink: 0;
    border-right: 1px solid var(--border);
    padding: 1.5rem 0;
    background: var(--warm-white);
    position: sticky;
    top: 0;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
}

.sidebar-title {
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .15em;
    color: var(--gold-dark);
    font-weight: 700;
    padding: 0 1.2rem .8rem;
}

.category-item {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .65rem 1.2rem;
    cursor: pointer;
    color: var(--brown-mid);
    font-size: .9rem;
    transition: var(--transition);
    border-left: 3px solid transparent;
    position: relative;
}

.category-item:hover {
    background: rgba(196, 154, 60, .08);
    color: var(--brown);
}

.category-item.active {
    color: var(--gold-dark);
    background: rgba(196, 154, 60, .12);
    border-left-color: var(--gold);
    font-weight: 600;
}

.category-item .cat-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.category-item.active .cat-icon {
    background: rgba(196, 154, 60, .2);
}

.cat-count {
    margin-left: auto;
    font-size: .72rem;
    color: var(--gold);
    background: rgba(196, 154, 60, .15);
    padding: .1rem .45rem;
    border-radius: 99px;
}

/* ── Grid area ───────────────────────────────────────────── */
.gallery-content {
    flex: 1;
    padding: 1.5rem 2rem;
    overflow: hidden;
    background-color: #f9f3e8;
}

/* Section labels (Photos / Videos divider) */
.gallery-section-label {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0 1rem;
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .14em;
    color: var(--gold-dark);
    font-weight: 700;
}

.gallery-section-label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* ── Grid ────────────────────────────────────────────────── */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}

/* ── Media card ──────────────────────────────────────────── */
.media-card {
    position: relative;
    aspect-ratio: 1;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    background: rgba(196, 154, 60, .08);
    border: 1px solid var(--border);
    transition: var(--transition);
}

.media-card:hover {
    transform: scale(1.03);
    border-color: var(--gold);
    box-shadow: 0 8px 28px rgb(74 53 32 / 27%);
    filter: brightness(1.03);
}

.media-card img,
.media-card video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: var(--transition);
}

/*
.media-card .card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(74, 53, 32, .5) 0%, transparent 55%);
    opacity: 0;
    transition: var(--transition);
    display: flex;
    align-items: flex-end;
    padding: .6rem;
}

.media-card:hover .card-overlay {
    opacity: 1;
}

.media-card .card-overlay span {
    color: #fff;
    font-size: .75rem;
    font-weight: 500;
}
    */

/* video badge */
.media-card .video-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, .55);
    color: #fff;
    font-size: .68rem;
    font-weight: 600;
    padding: .15rem .45rem;
    border-radius: 99px;
    display: flex;
    align-items: center;
    gap: .25rem;
    backdrop-filter: blur(4px);
}

/* ── Skeleton / loading placeholder ─────────────────────── */
.skeleton-card {
    aspect-ratio: 1;
    border-radius: 12px;
    background: linear-gradient(90deg,
            rgba(196, 154, 60, .1) 25%,
            rgba(196, 154, 60, .22) 50%,
            rgba(196, 154, 60, .1) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.4s infinite;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* ── Empty state ─────────────────────────────────────────── */
.gallery-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
    color: var(--brown-mid);
}

.gallery-empty svg {
    width: 52px;
    height: 52px;
    opacity: .3;
    margin: 0 auto 1rem;
    display: block;
}

/* ── Lightbox ────────────────────────────────────────────── */
#gallery-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(20, 12, 4, .93);
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

#gallery-lightbox.open {
    display: flex;
}

#gallery-lightbox .lb-inner {
    position: relative;
    max-width: 92vw;
    max-height: 88vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

#gallery-lightbox img,
#gallery-lightbox video {
    max-width: 92vw;
    max-height: 82vh;
    border-radius: 10px;
    object-fit: contain;
    box-shadow: 0 24px 80px rgba(0, 0, 0, .6);
}

.lb-close {
    position: fixed;
    top: 1.2rem;
    right: 1.4rem;
    background: rgba(255, 255, 255, .12);
    border: none;
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.3rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.lb-close:hover {
    background: rgba(255, 255, 255, .25);
}

.lb-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, .12);
    border: none;
    color: #fff;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    font-size: 1.4rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.lb-nav:hover {
    background: rgba(255, 255, 255, .25);
}

.lb-nav.prev {
    left: 1rem;
}

.lb-nav.next {
    right: 1rem;
}

.lb-caption {
    color: rgba(255, 255, 255, .7);
    font-size: .82rem;
    margin-top: .8rem;
    text-align: center;
    display: none;
    visibility: hidden;
}

/* ── Scroll sentinel ─────────────────────────────────────── */
#scroll-sentinel {
    height: 1px;
    width: 100%;
    grid-column: 1 / -1;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 768px) {
    .gallery-body {
        flex-direction: column;
    }

    .gallery-sidebar {
        width: 100%;
        max-height: none;
        border-right: none;
        border-bottom: 1px solid var(--border);
        position: static;
        display: flex;
        padding: .8rem 1rem;
        gap: .5rem;
        overflow-x: auto;
        flex-wrap: nowrap;
    }

    .sidebar-title {
        display: none;
    }

    .category-item {
        white-space: nowrap;
        border-left: none;
        border-bottom: 3px solid transparent;
        border-radius: 99px;
        background: rgba(196, 154, 60, .08);
        padding: .4rem .9rem;
        flex-shrink: 0;
    }

    .category-item.active {
        border-left: none;
        border-bottom: none;
        background: var(--gold);
        color: #fff;
    }

    .category-item .cat-icon {
        display: none;
    }

    .cat-count {
        display: none;
    }

    .gallery-content {
        padding: 1rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    }
}

svg {
    height: 13px;
}