/* ===== VARIABLES ===== */
:root {
    --max-width: 1200px;
    --space: 1.5rem;
    --radius: 8px;
    --bg: #f5f5f5;
    --white: #ffffff;
    --text: #222;
}

/* ===== RESET ===== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ===== BASE ===== */
body {
    font-family: Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
}

/* ===== LAYOUT ===== */
.container {
    width: min(100% - 2rem, var(--max-width));
    margin: auto;
}

.section {
    padding: var(--space) 0;
}

/* ===== HEADER & FOOTER ===== */
.site-header,
.site-footer {
    background: var(--white);
    padding: var(--space) 0;
}

/* ===== GRID ===== */
.grid {
    display: grid;
    gap: var(--space);
    margin-top: var(--space);
}

/* ===== ITEMS ===== */
.item {
    background: var(--white);
    padding: var(--space);
    border-radius: var(--radius);
    text-align: center;
}

/* ===== IMAGE HANDLING ===== */
.image-box {
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: var(--radius);
    background: #ddd;
}

.image-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ===== RESPONSIVE GRID ===== */
@media (min-width: 600px) {
    .grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 900px) {
    .grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ===== MARQUEE : ADMISSIONS NOTICE ===== */
.marquee-wrap {
    background: #ffeb3b;
    overflow: hidden;
    width: 100%;
}

.marquee {
    display: flex;
    width: max-content;
    animation: marqueeScroll 20s linear infinite;
}

.marquee span {
    display: inline-block;
    padding-right: 5rem;
    white-space: nowrap;
    font-weight: bold;
}

@keyframes marqueeScroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

.marquee-wrap:hover .marquee {
    animation-play-state: paused;
}

/* ===== TOP CONTACT & SOCIAL BAR ===== */
.top-bar {
    width: 100%;
    background: #000364;
    color: #fff;
    animation: slideDown 0.6s ease-out;
}

.top-bar-container {
    max-width: var(--max-width);
    margin: auto;
    padding: 0.4rem 0.6rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 0.5rem;
}

.top-bar-left {
    display: flex;
    gap: 0.5rem;
    white-space: nowrap;
}

.call-link {
    color: #fff;
    text-decoration: none;
    font-size: 0.9rem;
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    white-space: nowrap;
}

.call-now-btn {
    background: #fff;
    color: #000364;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: bold;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ===== SOCIAL ICONS ===== */
.social-icon i {
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

.instagram {
    color: #E4405F;
}

.facebook {
    color: #1877F2;
}

.youtube {
    color: #FF0000;
}

.maps {
    color: #34A853;
}

.whatsapp {
    color: #25D366;
}

.social-icon:hover i {
    transform: scale(1.2);
}

/* ===== MAIN HEADER ===== */
.main-header {
    background: #eef1ff;
    color: #000364;
}

.main-header-container {
    max-width: var(--max-width);
    margin: auto;
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-box {
    width: 40px;
    height: 40px;
}

.logo-box img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.school-name {
    text-align: center;
}

.school-name h1 {
    font-size: 0.9rem;
}

.school-name p {
    font-size: 0.65rem;
}

@media (min-width: 768px) {
    .logo-box {
        width: 90px;
        height: 90px;
    }

    .school-name h1 {
        font-size: 1.4rem;
    }

    .school-name p {
        font-size: 0.85rem;
    }
}

/* ===== STICKY NAVBAR ===== */
.main-nav {
    position: sticky;
    top: 0;
    background: #000364;
    z-index: 999;
}

.nav-container {
    max-width: var(--max-width);
    margin: auto;
    padding: 0.5rem 1rem;
    display: flex;
    justify-content: space-between;
}

.nav-links {
    display: flex;
    gap: 1rem;
    list-style: none;
}

.nav-links a {
    color: #fff;
    text-decoration: none;
}

.contact-link {
    background: #0566ee;
    padding: 0.3rem 0.6rem;
    border-radius: 8px;
}

/* ===== GALLERY CATEGORIES ===== */
.gallery-categories {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.gallery-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: var(--radius);
    background: #000364;
    color: #fff;
    font-weight: bold;
    cursor: pointer;
}

.gallery-btn.active {
    background: #ffeb3b;
    color: #000;
}

/* ===== GALLERY GRID (ADDED, SAFE) ===== */
.gallery-grid {
    display: flex;
    justify-content: center;
}

.gallery-category {
    display: none;
    width: 100%;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.gallery-category.active {
    display: flex;
}

.gallery-category a {
    flex: 1 1 calc(25% - 0.75rem);
    border-radius: var(--radius);
    overflow: hidden;
}

.gallery-category img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.gallery-category img:hover {
    transform: scale(1.05);
    opacity: 0.9;
}

/* Responsive gallery */
@media (max-width: 1024px) {
    .gallery-category a {
        flex: 1 1 calc(33.333% - 0.75rem);
    }
}

@media (max-width: 768px) {
    .gallery-category a {
        flex: 1 1 calc(50% - 0.75rem);
    }
}

@media (max-width: 480px) {
    .gallery-category a {
        flex: 1 1 100%;
    }
}

/* ===== SITE FOOTER ===== */
.site-footer {
    background: #020437;
    color: #fff;
}

.footer-top {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.footer-bottom {
    background: #000;
    text-align: center;
    padding: 0.8rem;
    font-size: 0.75rem;
}

/* ===== SCROLL REVEAL ===== */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: 0.6s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* ===== FOOTER TOP SECTION FIX ===== */

.footer-container {
    max-width: var(--max-width);
    margin: auto;
    padding: 1.5rem 1rem;
}

.footer-top {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1.5rem;
    padding-bottom: 1.5rem;
}

.footer-about,
.footer-links,
.footer-contact {
    flex: 1 1 250px;
}

.footer-about h4,
.footer-links h4,
.footer-contact h4 {
    font-size: 1rem;
    margin-bottom: 0.6rem;
    color: #ffeb3b;
}

.footer-about p,
.footer-contact p {
    color: #f1f1f1;
    line-height: 1.4;
}

/* Quick Links */
.footer-links ul {
    list-style: none;
    padding: 0;
}

.footer-links ul li {
    margin-bottom: 0.4rem;
}

.footer-links ul li a {
    color: #f1f1f1;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links ul li a:hover {
    color: #ffeb3b;
}

/* Footer Social Icons */
.footer-social {
    display: flex;
    gap: 0.6rem;
    margin-top: 0.6rem;
}

.footer-social a {
    color: #ffffff;
    font-size: 1.1rem;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.footer-social a:hover {
    transform: scale(1.2);
    opacity: 0.85;
}

/* Footer Bottom */
.footer-bottom {
    width: 100%;
    background: #000;
    text-align: center;
    padding: 0.8rem 0;
    font-size: 0.75rem;
}

/* ===== FOOTER MOBILE FIX ===== */
@media (max-width: 768px) {
    .footer-top {
        flex-direction: column;
        gap: 1rem;
    }

    .footer-about,
    .footer-links,
    .footer-contact {
        flex: 1 1 100%;
    }
}

/* ===== GALLERY HEADING ENHANCEMENT ===== */
.gallery-heading {
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    color: #000364; /* brand primary */
    margin-bottom: 2rem;
    position: relative;
    letter-spacing: 1px;
}

/* underline accent */
.gallery-heading::after {
    content: "";
    width: 80px;
    height: 4px;
    background: #ffeb3b; /* brand secondary */
    display: block;
    margin: 0.6rem auto 0;
    border-radius: 2px;
}

/* subtle fade-in */
.gallery-heading {
    opacity: 0;
    animation: galleryFadeIn 0.8s ease forwards;
}

@keyframes galleryFadeIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile tweak */
@media (max-width: 600px) {
    .gallery-heading {
        font-size: 1.5rem;
    }
}
/* ===== GALLERY TOP SPACING FIX ===== */
.page-section {
    padding-top: 3rem;
}

/* Extra breathing room below navbar */
.gallery-heading {
    margin-top: 1.5rem;
}

/* Mobile adjustment */
@media (max-width: 600px) {
    .page-section {
        padding-top: 2.2rem;
    }

    .gallery-heading {
        margin-top: 1rem;
    }
}
