/* =====================================================
   NEW NAVODIT INTERNATIONAL SCHOOL
   PREMIUM GALLERY
===================================================== */


/* ================= GLOBAL ================= */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family:
        "Poppins",
        "Segoe UI",
        Arial,
        sans-serif;

    background: #f6f8fc;
    color: #172554;
}



/* ================= MAIN SECTION ================= */

.gallery-section {
    max-width: 1250px;

    margin: auto;

    padding: 80px 25px;
}

.gallery-heading {
    text-align: center;

    max-width: 700px;

    margin: 0 auto 40px;
}

.gallery-heading span {
    color: #2563eb;

    font-size: 12px;

    font-weight: 700;

    letter-spacing: 3px;
}

.gallery-heading h2 {
    margin: 12px 0;

    font-size: clamp(30px, 5vw, 48px);

    line-height: 1.2;

    color: #102a5c;
}

.gallery-heading h2 strong {
    color: #2563eb;
}

.gallery-heading p {
    color: #64748b;

    font-size: 16px;
}


/* ================= FILTERS ================= */

.gallery-filters {

    display: flex;

    justify-content: center;

    align-items: center;

    flex-wrap: wrap;

    gap: 10px;

    margin-bottom: 45px;
}

.filter-btn {

    border: 1px solid #dbe4f0;

    background: white;

    color: #31527f;

    padding: 11px 20px;

    border-radius: 30px;

    cursor: pointer;

    font-size: 14px;

    font-weight: 600;

    transition: all 0.3s ease;

    box-shadow:
        0 3px 12px rgba(0,0,0,0.04);
}

.filter-btn:hover {

    transform: translateY(-2px);

    border-color: #2563eb;

    color: #2563eb;
}

.filter-btn.active {

    background: #123b82;

    color: white;

    border-color: #123b82;

    box-shadow:
        0 8px 20px rgba(18,59,130,0.25);
}


/* ================= GALLERY GRID ================= */

.gallery-grid {

    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    gap: 22px;

    min-height: 200px;
}


/* ================= CARD ================= */

.gallery-card {

    position: relative;

    overflow: hidden;

    border-radius: 18px;

    background: white;

    min-height: 280px;

    box-shadow:
        0 8px 30px rgba(15,23,42,0.08);

    cursor: pointer;

    animation: cardAppear 0.5s ease;

    transition:
        transform 0.35s ease,
        box-shadow 0.35s ease;
}

.gallery-card:hover {

    transform: translateY(-7px);

    box-shadow:
        0 18px 45px rgba(15,23,42,0.16);
}


/* IMAGE */

.gallery-photo {

    display: block;

    width: 100%;

    height: 330px;

    object-fit: cover;

    transition:
        transform 0.6s ease;
}

.gallery-card:hover .gallery-photo {

    transform: scale(1.08);
}


/* DARK OVERLAY */

.gallery-card::after {

    content: "";

    position: absolute;

    inset: 0;

    background:
        linear-gradient(
            transparent 45%,
            rgba(3,18,45,0.88)
        );

    pointer-events: none;
}


/* INFO */

.gallery-info {

    position: absolute;

    left: 0;
    right: 0;
    bottom: 0;

    z-index: 3;

    padding: 22px;

    color: white;
}

.gallery-info h3 {

    margin: 0 0 5px;

    font-size: 20px;
}

.gallery-info p {

    margin: 0;

    font-size: 13px;

    color: #dbeafe;
}


/* ================= LOADING ================= */

.gallery-loading {

    grid-column: 1 / -1;

    text-align: center;

    padding: 70px 20px;

    color: #64748b;
}

.loader {

    width: 42px;
    height: 42px;

    margin: auto auto 15px;

    border-radius: 50%;

    border: 4px solid #dbeafe;

    border-top-color: #2563eb;

    animation:
        spin 0.8s linear infinite;
}

@keyframes spin {

    to {
        transform: rotate(360deg);
    }
}

@keyframes cardAppear {

    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* ================= LIGHTBOX ================= */

.lightbox {

    position: fixed;

    inset: 0;

    z-index: 5000;

    background:
        rgba(2,10,25,0.94);

    display: none;

    align-items: center;
    justify-content: center;

    padding: 30px;
}

.lightbox-content {

    max-width: 1100px;
    max-height: 90vh;

    text-align: center;
}

.lightbox-content img {

    max-width: 100%;

    max-height: 75vh;

    object-fit: contain;

    border-radius: 12px;

    box-shadow:
        0 20px 70px rgba(0,0,0,0.5);
}

.lightbox-caption {

    color: white;

    margin-top: 15px;
}

.lightbox-caption h3 {

    margin: 0;

    font-size: 20px;
}

.lightbox-caption p {

    margin: 5px 0 0;

    color: #bfdbfe;
}


/* CLOSE */

.close-btn {

    position: absolute;

    top: 25px;
    right: 30px;

    width: 48px;
    height: 48px;

    border: none;

    border-radius: 50%;

    background: rgba(255,255,255,0.12);

    color: white;

    font-size: 34px;

    cursor: pointer;

    z-index: 5;

    transition: 0.3s;
}

.close-btn:hover {

    background: rgba(255,255,255,0.25);

    transform: rotate(90deg);
}


/* PREVIOUS / NEXT */

.lightbox-prev,
.lightbox-next {

    position: absolute;

    top: 50%;

    transform: translateY(-50%);

    width: 55px;
    height: 55px;

    border: none;

    border-radius: 50%;

    background:
        rgba(255,255,255,0.13);

    color: white;

    font-size: 42px;

    line-height: 1;

    cursor: pointer;

    transition: 0.3s;

    z-index: 5;
}

.lightbox-prev:hover,
.lightbox-next:hover {

    background:
        rgba(255,255,255,0.25);
}

.lightbox-prev {
    left: 25px;
}

.lightbox-next {
    right: 25px;
}


/* ================= FOOTER ================= */

.gallery-footer {

    background: #071b42;

    color: white;

    padding: 45px 25px;

    text-align: center;
}

.gallery-footer h3 {

    margin: 0 0 10px;

    font-size: 20px;
}

.gallery-footer p {

    max-width: 650px;

    margin: 8px auto;

    color: #bfdbfe;

    line-height: 1.6;
}

.gallery-footer .copyright {

    margin-top: 25px;

    padding-top: 20px;

    border-top:
        1px solid rgba(255,255,255,0.1);

    font-size: 13px;

    color: #93c5fd;
}


/* ================= TABLET ================= */

@media (max-width: 900px) {

    .gallery-grid {

        grid-template-columns:
            repeat(2, 1fr);

    }

    .gallery-photo {

        height: 280px;

    }

}


/* ================= MOBILE ================= */

@media (max-width: 600px) {

    .gallery-nav {

        min-height: 68px;

        padding: 8px 15px;

    }

    .gallery-logo img {

        width: 44px;
        height: 44px;

    }

    .gallery-logo strong {

        font-size: 15px;

    }

    .gallery-logo span {

        font-size: 10px;

    }

    .gallery-menu {

        padding: 8px 14px;

        font-size: 12px;

    }

    .gallery-hero {

        min-height: 330px;

    }

    .gallery-hero h1 {

        font-size: 52px;

    }

    .gallery-hero p {

        font-size: 15px;

        line-height: 1.6;

    }

    .gallery-section {

        padding: 55px 15px;

    }

    .gallery-grid {

        grid-template-columns:
            repeat(2, 1fr);

        gap: 10px;

    }

    .gallery-card {

        min-height: 210px;

        border-radius: 12px;

    }

    .gallery-photo {

        height: 210px;

    }

    .gallery-info {

        padding: 12px;

    }

    .gallery-info h3 {

        font-size: 14px;

    }

    .gallery-info p {

        font-size: 10px;

    }

    .filter-btn {

        padding: 9px 14px;

        font-size: 12px;

    }

    .lightbox {

        padding: 15px;

    }

    .lightbox-prev,
    .lightbox-next {

        width: 42px;
        height: 42px;

        font-size: 30px;

    }

    .lightbox-prev {

        left: 10px;

    }

    .lightbox-next {

        right: 10px;

    }

    .close-btn {

        top: 15px;
        right: 15px;

        width: 42px;
        height: 42px;

        font-size: 28px;

    }

}

.gallery-hero {
    min-height: 390px;
    position: relative;

    display: flex;
    align-items: center;
    justify-content: center;

    text-align: center;

    background:
        linear-gradient(
            rgba(9, 38, 91, 0.72),
            rgba(10, 48, 110, 0.78)
        ),
        url("../assets/images/school.jpg")
        center / cover no-repeat;
}

.gallery-hero-content {
    position: relative;
    z-index: 2;

    max-width: 800px;
    padding: 40px 20px;

    color: white;
}

.gallery-hero-content span {
    display: inline-block;

    font-size: 12px;
    letter-spacing: 3px;

    margin-bottom: 15px;
}

.gallery-hero-content h1 {
    margin: 0;

    font-size: clamp(45px, 7vw, 75px);
}

.gallery-hero-content strong {
    color: #fbbf24;
}

.gallery-hero-content p {
    max-width: 650px;

    margin: 20px auto 0;

    font-size: 17px;
    line-height: 1.7;
}