/* ======================================================
   UFF BHABHI
   Premium Gallery
====================================================== */

.gallery-page {
    min-height: 100vh;
    background:
        radial-gradient(
            circle at 50% 0%,
            rgba(224,0,108,.14),
            transparent 38%
        ),
        var(--background);
}

.gallery-hero {
    padding: 135px 20px 80px;
}

.gallery-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

.gallery-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 25px;
    margin-bottom: 32px;
}

.gallery-eyebrow {
    display: inline-block;
    margin-bottom: 10px;
    color: #e0d12b;
    text-shadow: 0 1px 6px rgba(183,121,0,.12);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: 3px;
}

.gallery-heading h1 {
    margin: 0;
    font-family: 'Cinzel', serif;
    color: var(--heading);
    font-size: clamp(2.3rem, 5vw, 4rem);
}

.gallery-heading p {
    margin: 12px 0 0;
    color: #cfbad6;
    font-size: .95rem;
    opacity: 1;
}

.gallery-view-switch {
    display: inline-flex;
    gap: 8px;
    padding: 6px;
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 14px;
    background: rgba(255,255,255,.05);
    backdrop-filter: blur(16px);
}

.gallery-view-btn {
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--text-light);
    cursor: pointer;
    transition: .25s ease;
}

.gallery-view-btn:hover,
.gallery-view-btn.active {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 10px 25px rgba(224,0,108,.25);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.gallery-grid[data-view="masonry"] {
    display: block;
    column-count: var(--gallery-columns, 4);
    column-gap: 18px;
}

.gallery-grid[data-view="masonry"] .gallery-item {
    width: 100%;
    margin: 0 0 18px;
    break-inside: avoid;
}

.gallery-item {
    position: relative;
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    overflow: hidden;
    border-radius: 18px;
    background: #111;
    cursor: pointer;
    box-shadow: 0 18px 45px rgba(0,0,0,.20);
}

.gallery-item img {
    display: block;
    width: 100%;
    height: auto;
    transition: transform .45s ease;
}

.gallery-item:hover img {
    transform: scale(1.04);
}

.gallery-item-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    padding: 14px;
    background: linear-gradient(
        180deg,
        transparent 55%,
        rgba(0,0,0,.65)
    );
    opacity: 0;
    transition: opacity .3s ease;
}

.gallery-item:hover .gallery-item-overlay {
    opacity: 1;
}

.gallery-item-overlay span {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(224,0,108,.9);
    color: #fff;
    box-shadow: 0 0 25px rgba(224,0,108,.35);
}

.gallery-empty {
    padding: 110px 20px;
    text-align: center;
}

.gallery-empty-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 22px;
    background: rgba(224,0,108,.1);
    color: var(--primary);
    font-size: 1.7rem;
}

.gallery-empty h2 {
    color: var(--heading);
}

.gallery-empty p {
    margin-top: 8px;
    color: var(--text-light);
}


/* ======================================================
   LIGHTBOX
====================================================== */

.gallery-lightbox {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: rgba(5,5,8,.92);
    backdrop-filter: blur(20px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s ease, visibility .25s ease;
}

.gallery-lightbox.is-open {
    opacity: 1;
    visibility: visible;
}

.gallery-lightbox-stage {
    position: relative;
    width: min(1100px, 88vw);
    height: min(88vh, 900px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-lightbox-stage img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 30px 80px rgba(0,0,0,.55);
}

.gallery-lightbox-close,
.gallery-lightbox-nav {
    position: fixed;
    z-index: 2;
    border: 0;
    cursor: pointer;
    color: #fff;
    background: rgba(255,255,255,.08);
    backdrop-filter: blur(12px);
    transition: .25s ease;
}

.gallery-lightbox-close {
    top: 22px;
    right: 22px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    font-size: 1.1rem;
}

.gallery-lightbox-nav {
    top: 50%;
    transform: translateY(-50%);
    width: 54px;
    height: 54px;
    border-radius: 50%;
    font-size: 1.1rem;
}

.gallery-lightbox-prev {
    left: 22px;
}

.gallery-lightbox-next {
    right: 22px;
}

.gallery-lightbox-close:hover,
.gallery-lightbox-nav:hover {
    background: var(--primary);
    box-shadow: 0 0 25px rgba(224,0,108,.35);
}

.gallery-lightbox-caption {
    position: absolute;
    left: 50%;
    bottom: 18px;
    transform: translateX(-50%);
    max-width: 90%;
    padding: 8px 16px;
    border-radius: 999px;
    background: rgba(0,0,0,.65);
    color: #fff;
    font-size: .88rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.gallery-lightbox-open {
    overflow: hidden;
}


/* ======================================================
   DARK THEME
====================================================== */

[data-theme="dark"] .gallery-item {
    box-shadow:
        0 20px 55px rgba(0,0,0,.35);
}


/* ======================================================
   RESPONSIVE
====================================================== */

@media (max-width: 1100px) {

    .gallery-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .gallery-grid[data-view="masonry"] {
        column-count: 3;
    }

}

@media (max-width: 760px) {

    .gallery-hero {
        padding: 110px 15px 55px;
    }

    .gallery-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .gallery-grid[data-view="masonry"] {
        column-count: 2;
        column-gap: 12px;
    }

    .gallery-grid[data-view="masonry"] .gallery-item {
        margin-bottom: 12px;
    }

    .gallery-lightbox {
        padding: 20px;
    }

    .gallery-lightbox-nav {
        width: 44px;
        height: 44px;
    }

    .gallery-lightbox-prev {
        left: 12px;
    }

    .gallery-lightbox-next {
        right: 12px;
    }

    .gallery-lightbox-close {
        top: 12px;
        right: 12px;
    }

}

@media (max-width: 480px) {

    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .gallery-grid[data-view="masonry"] {
        column-count: 1;
    }

}