﻿:root {
    --maroon: #7A1F2B;
    --maroon-deep: #59141C;
    --gold: #D9A441;
    --gold-soft: #F0D9A6;
    --green: #2F5233;
    --ivory: #F8F3E7;
    --card: #FFFDF8;
    --ink: #2B1E1A;
    --ink-soft: #5B4A3F;
    --line: #E4D6BC;
}

.gallery-page * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.gallery-page {
    background: var(--ivory);
    color: var(--ink);
    font-family: 'Mukta', sans-serif;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

    .gallery-page h1,
    .gallery-page h2 {
        font-family: 'Yatra One', cursive;
        font-weight: 400;
        color: var(--maroon-deep);
    }

    .gallery-page .eyebrow {
        font-family: 'Rajdhani', sans-serif;
        font-weight: 600;
        letter-spacing: .22em;
        text-transform: uppercase;
        font-size: .78rem;
        color: var(--green);
    }

    /* ================= HERO ================= */
    .gallery-page .hero {
        position: relative;
        background: radial-gradient(ellipse at 15% -10%, rgba(217,164,65,.35), transparent 55%), radial-gradient(ellipse at 100% 0%, rgba(47,82,51,.25), transparent 50%), linear-gradient(180deg, var(--maroon-deep) 0%, var(--maroon) 100%);
        color: var(--ivory);
        padding: 90px 8vw 70px;
        overflow: hidden;
    }

        .gallery-page .hero::after {
            content: "";
            position: absolute;
            inset: 0;
            background-image: repeating-linear-gradient(45deg, rgba(255,255,255,.025) 0 2px, transparent 2px 26px);
            pointer-events: none;
        }

    .gallery-page .hero-inner {
        position: relative;
        max-width: 1080px;
        margin: 0 auto;
        text-align: center;
    }

    .gallery-page .seal {
        width: 92px;
        height: 92px;
        margin: 0 auto 26px;
        border-radius: 50%;
        border: 2px solid var(--gold);
        display: flex;
        align-items: center;
        justify-content: center;
        font-family: 'Yatra One', cursive;
        font-size: 1.5rem;
        color: var(--gold);
        background: rgba(255,255,255,.04);
        position: relative;
    }

        .gallery-page .seal::before {
            content: "";
            position: absolute;
            inset: -9px;
            border: 1px dashed rgba(217,164,65,.5);
            border-radius: 50%;
        }

    .gallery-page .hero .eyebrow {
        color: var(--gold-soft);
    }

    .gallery-page .hero h1 {
        font-size: clamp(2.1rem, 4.6vw, 3.4rem);
        margin: 16px 0 10px;
        line-height: 1.15;
        color: var(--ivory);
    }

    .gallery-page .hero .sub {
        max-width: 640px;
        margin: 0 auto;
        font-size: 1.08rem;
        color: #EFE4D2;
    }

/* ================= CONTAINER ================= */
.gallery-container {
    max-width: 1160px;
    margin: 0 auto;
    padding: 60px 8vw 20px;
}

/* ================= FILTER TABS ================= */
.filter-tabs {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 50px;
}

.filter-btn {
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    font-size: .82rem;
    padding: 10px 24px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--card);
    color: var(--maroon-deep);
    cursor: pointer;
    transition: all .25s ease;
}

    .filter-btn:hover {
        border-color: var(--gold);
        color: var(--maroon);
    }

    .filter-btn.active {
        background: linear-gradient(180deg, var(--maroon) 0%, var(--maroon-deep) 100%);
        color: var(--gold-soft);
        border-color: var(--maroon-deep);
        box-shadow: 0 10px 20px -12px rgba(89,20,28,.5);
    }

/* ================= SECTIONS ================= */
.gallery-section {
    margin-bottom: 60px;
}

.gallery-page .section-head {
    max-width: 700px;
    margin-bottom: 28px;
}

    .gallery-page .section-head h2 {
        font-size: clamp(1.5rem, 3vw, 1.9rem);
        margin-top: 8px;
    }

        .gallery-page .section-head h2 span {
            color: var(--ink-soft);
            font-family: 'Mukta', sans-serif;
            font-size: .55em;
            display: block;
            margin-top: 4px;
            letter-spacing: .02em;
        }

/* ================= GALLERY GRID ================= */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

.gallery-item {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--line);
    background: var(--card);
    box-shadow: 0 18px 36px -22px rgba(89,20,28,.35);
    cursor: pointer;
    aspect-ratio: 4 / 3;
}

    .gallery-item img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
        transition: transform .4s ease;
    }

    .gallery-item:hover img {
        transform: scale(1.08);
    }

.gallery-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 14px 16px;
    background: linear-gradient(0deg, rgba(89,20,28,.92) 0%, rgba(89,20,28,0) 100%);
    color: var(--gold-soft);
    font-family: 'Rajdhani', sans-serif;
    font-weight: 600;
    font-size: .9rem;
    letter-spacing: .02em;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity .3s ease, transform .3s ease;
}

.gallery-item:hover .gallery-caption {
    opacity: 1;
    transform: translateY(0);
}

.gallery-item::after {
    content: "";
    position: absolute;
    inset: 0;
    border: 2px solid transparent;
    border-radius: 16px;
    transition: border-color .25s ease;
    pointer-events: none;
}

.gallery-item:hover::after {
    border-color: var(--gold);
}

/* ================= LIGHTBOX ================= */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(43,30,26,.92);
    z-index: 999;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

    .lightbox.active {
        display: flex;
    }

    .lightbox img {
        max-width: 90vw;
        max-height: 85vh;
        border-radius: 12px;
        border: 3px solid var(--gold);
        box-shadow: 0 30px 60px -20px rgba(0,0,0,.6);
    }

.lightbox-close {
    position: absolute;
    top: 26px;
    right: 34px;
    color: var(--gold-soft);
    font-size: 2.4rem;
    font-family: sans-serif;
    line-height: 1;
    cursor: pointer;
    transition: color .2s ease;
}

    .lightbox-close:hover {
        color: var(--gold);
    }

/* ================= FOOTER NOTE ================= */
.gallery-footer-note {
    text-align: center;
    padding: 40px 8vw 60px;
    color: var(--ink-soft);
    font-size: .88rem;
    border-top: 1px solid var(--line);
    max-width: 1080px;
    margin: 0 auto;
}

    .gallery-footer-note .school-name {
        font-family: 'Yatra One', cursive;
        font-size: 1.2rem;
        color: var(--maroon);
        display: block;
        margin-bottom: 6px;
    }

/* ================= RESPONSIVE ================= */
@media (max-width: 820px) {
    .gallery-page .hero h1 {
        font-size: 1.8rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    }
}

@media (prefers-reduced-motion: reduce) {
    .gallery-item img,
    .gallery-caption {
        transition: none;
    }
}
