/* =====================================================================
   Jagdish Memorial Public School — Public Site Stylesheet
   Design tokens: deep navy + antique gold + warm ivory, paired with a
   heritage serif (Fraunces) for display type and Inter for body text.
   Signature motif: a hand-drawn "chalk swoosh" underline beneath key
   headings — a small nod to the chalkboard, used with restraint.
   ===================================================================== */

:root {
    /* Color tokens */
    --navy-900: #0B1F3A;
    --navy-700: #13315C;
    --navy-600: #1B3E70;
    --gold-500: #C9A24B;
    --gold-300: #E4C77A;
    --ivory-50: #FAF7F0;
    --paper-white: #FFFFFF;
    --ink-800: #1C1F26;
    --ink-600: #4A5063;
    --line: #E4DFD2;
    --success: #2F7D5D;
    --danger: #B3413B;

    /* Type */
    --font-display: 'Fraunces', Georgia, serif;
    --font-body: 'Inter', -apple-system, Segoe UI, sans-serif;

    /* Layout */
    --max-width: 1180px;
    --radius-md: 10px;
    --radius-lg: 18px;
    --shadow-soft: 0 10px 30px rgba(11, 31, 58, 0.08);
    --shadow-lift: 0 18px 40px rgba(11, 31, 58, 0.16);
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--ink-800);
    background: var(--ivory-50);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 {
    font-family: var(--font-display);
    color: var(--navy-900);
    margin: 0 0 0.5em;
    line-height: 1.2;
    font-weight: 600;
}
p { margin: 0 0 1em; color: var(--ink-600); }
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }
:focus-visible { outline: 3px solid var(--gold-500); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
    html { scroll-behavior: auto; }
}

/* Section rhythm */
.section { padding: 88px 0; }
.section--tight { padding: 56px 0; }
.section--navy { background: var(--navy-900); color: #EAEFF7; }
.section--navy h2, .section--navy h3 { color: #FFFFFF; }
.section--navy p { color: #C7D2E4; }
.section--white { background: var(--paper-white); }

.eyebrow {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 0.78rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--gold-500);
    font-weight: 700;
    margin-bottom: 12px;
}

.section-head { max-width: 640px; margin: 0 0 44px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

/* Signature chalk-swoosh underline */
.swoosh { position: relative; display: inline-block; }
.swoosh::after {
    content: '';
    position: absolute;
    left: -2%;
    bottom: -0.14em;
    width: 104%;
    height: 0.32em;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 220 20' preserveAspectRatio='none'%3E%3Cpath d='M2 14 C 40 4, 80 18, 120 9 S 200 3, 218 12' stroke='%23C9A24B' stroke-width='4' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center / 100% 100%;
    z-index: -1;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 26px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.95rem;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-gold { background: var(--gold-500); color: var(--navy-900); }
.btn-gold:hover { background: var(--gold-300); box-shadow: var(--shadow-lift); }
.btn-outline { background: transparent; border-color: rgba(255,255,255,0.5); color: #fff; }
.btn-outline:hover { border-color: var(--gold-300); color: var(--gold-300); }
.btn-navy { background: var(--navy-900); color: #fff; }
.btn-navy:hover { background: var(--navy-700); box-shadow: var(--shadow-lift); }
.btn-sm { padding: 9px 18px; font-size: 0.85rem; }

/* ---------- Header / Nav ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 500;
    background: rgba(11, 31, 58, 0.97);
    backdrop-filter: blur(6px);
}


.navbar { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; }
.brand { display: flex; align-items: center; gap: 12px; color: #fff; }
.brand-name { font-family: var(--font-display); font-size: 1.15rem; line-height: 1.1; font-weight: 600; }
.brand-name small { display: block; font-family: var(--font-body); font-size: 0.7rem; letter-spacing: 0.08em; color: var(--gold-300); font-weight: 500; text-transform: uppercase; }

.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-links > li { position: relative; }
.nav-links > li > a {
    display: inline-block;
    padding: 10px 14px;
    color: #DCE4F2;
    font-size: 0.93rem;
    font-weight: 500;
    border-radius: 8px;
    transition: background 0.15s ease, color 0.15s ease;
}
.nav-links > li > a:hover,
.nav-links > li.active > a { background: rgba(255,255,255,0.08); color: #fff; }

.has-dropdown:hover .dropdown,
.has-dropdown:focus-within .dropdown { display: block; }
.dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: var(--paper-white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lift);
    padding: 8px;
    margin-top: 6px;
}
.dropdown a { display: block; padding: 10px 12px; border-radius: 6px; color: var(--ink-800); font-size: 0.9rem; }
.dropdown a:hover { background: var(--ivory-50); color: var(--navy-900); }

.portal-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--gold-500);
    color: var(--navy-900);
    padding: 10px 18px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.88rem;
    box-shadow: 0 6px 18px rgba(201, 162, 75, 0.35);
}
.portal-btn:hover { background: var(--gold-300); }

.nav-toggle { display: none; background: none; border: 0; color: #fff; font-size: 1.6rem; cursor: pointer; }

@media (max-width: 960px) {
    .nav-toggle { display: block; }
    .nav-links {
        position: absolute;
        top: 100%; left: 0; right: 0;
        flex-direction: column;
        align-items: stretch;
        background: var(--navy-900);
        padding: 10px 20px 20px;
        display: none;
        gap: 0;
    }
    .nav-links.open { display: flex; }
    .dropdown { position: static; box-shadow: none; margin-top: 0; background: white; }
    .has-dropdown:hover .dropdown, .has-dropdown:focus-within .dropdown { display: none; }
    .has-dropdown.open .dropdown { display: block; }
    .portal-btn { margin-top: 10px; justify-content: center; }
    .topbar-item:nth-child(3) { display: none; }
}

/* ---------- Hero ---------- */
.hero {
    position: relative;
    min-height: 78vh;
    display: flex;
    align-items: center;
    color: #fff;
    background: linear-gradient(180deg, rgba(11,19,35,0.55), rgba(11,19,35,0.82)), var(--navy-900);
    overflow: hidden;
}
.hero-bg-pattern {
    position: absolute; inset: 0;
    background-image: radial-gradient(circle at 15% 20%, rgba(201,162,75,0.18), transparent 40%),
                       radial-gradient(circle at 85% 80%, rgba(201,162,75,0.12), transparent 40%);
    pointer-events: none;
}
.hero-content { position: relative; max-width: 720px; }
.hero .eyebrow { color: var(--gold-300); }
.hero h1 { color: #fff; font-size: clamp(2.1rem, 4.2vw, 3.4rem); }
.hero p.lead { color: #D6DEEC; font-size: 1.1rem; max-width: 560px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 28px; }
.hero-stats { display: flex; gap: 34px; margin-top: 48px; flex-wrap: wrap; }
.hero-stat b { display: block; font-family: var(--font-display); font-size: 1.6rem; color: var(--gold-300); }
.hero-stat span { font-size: 0.82rem; color: #AEB9CE; letter-spacing: 0.03em; text-transform: uppercase; }

/* ---------- Quick info strip ---------- */
.quickbar { background: var(--paper-white); box-shadow: var(--shadow-soft); }
.quickbar .container { display: flex; flex-wrap: wrap; gap: 24px; padding-top: 22px; padding-bottom: 22px; }
.quick-item { display: flex; align-items: center; gap: 12px; flex: 1 1 220px; }
.quick-icon {
    width: 44px; height: 44px; border-radius: 12px;
    background: var(--ivory-50); border: 1px solid var(--line);
    display: flex; align-items: center; justify-content: center;
    color: var(--gold-500); flex-shrink: 0;
}
.quick-item b { display: block; color: var(--navy-900); font-size: 0.95rem; }
.quick-item span { font-size: 0.83rem; color: var(--ink-600); }

/* ---------- Cards / grids ---------- */
.grid { display: grid; gap: 26px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 960px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card {
    background: var(--paper-white);
    border-radius: var(--radius-lg);
    padding: 30px;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--line);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
.card .icon { width: 52px; height: 52px; border-radius: 14px; background: var(--navy-900); color: var(--gold-300); display: flex; align-items: center; justify-content: center; margin-bottom: 18px; }
.card h3 { font-size: 1.1rem; margin-bottom: 8px; }
.card p { margin: 0; font-size: 0.92rem; }

/* About snapshot */
.about-snap { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.about-snap img { border-radius: var(--radius-lg); box-shadow: var(--shadow-lift); }
@media (max-width: 860px) { .about-snap { grid-template-columns: 1fr; } }

/* ---------- Photo gallery ---------- */
.gallery-filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 32px; }
.gallery-filter {
    padding: 9px 18px; border-radius: 999px; border: 1px solid var(--line);
    background: var(--paper-white); color: var(--ink-600); font-size: 0.87rem; font-weight: 600;
    cursor: pointer; transition: all 0.15s ease;
}
.gallery-filter:hover { border-color: var(--gold-500); color: var(--navy-900); }
.gallery-filter.active { background: var(--navy-900); border-color: var(--navy-900); color: #fff; }

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 190px;
    gap: 16px;
}
.gallery-item {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    background: var(--navy-700);
}
.gallery-item.tall { grid-row: span 2; }
.gallery-item.wide { grid-column: span 2; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.gallery-item:hover img { transform: scale(1.08); }
.gallery-caption {
    position: absolute; inset: auto 0 0 0;
    padding: 14px 16px 12px;
    background: linear-gradient(180deg, transparent, rgba(11,19,35,0.88));
    color: #fff; font-size: 0.82rem; font-weight: 600;
    opacity: 0; transform: translateY(6px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}
.gallery-item:hover .gallery-caption { opacity: 1; transform: translateY(0); }
@media (max-width: 900px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .gallery-grid { grid-template-columns: 1fr; grid-auto-rows: 220px; } .gallery-item.tall, .gallery-item.wide { grid-column: span 1; grid-row: span 1; } }

/* Lightbox */
.lightbox {
    position: fixed; inset: 0; background: rgba(6, 12, 24, 0.94);
    display: none; align-items: center; justify-content: center;
    z-index: 1000; padding: 40px;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: min(92vw, 1000px); max-height: 82vh; border-radius: 10px; box-shadow: 0 20px 60px rgba(0,0,0,0.5); }
.lightbox-caption { position: absolute; bottom: 26px; left: 0; right: 0; text-align: center; color: #E8EDF6; font-size: 0.9rem; }
.lightbox-close, .lightbox-prev, .lightbox-next {
    position: absolute; background: rgba(255,255,255,0.1); color: #fff; border: 0;
    width: 46px; height: 46px; border-radius: 50%; font-size: 1.3rem; cursor: pointer;
    display: flex; align-items: center; justify-content: center; transition: background 0.15s ease;
}
.lightbox-close:hover, .lightbox-prev:hover, .lightbox-next:hover { background: var(--gold-500); color: var(--navy-900); }
.lightbox-close { top: 24px; right: 24px; }
.lightbox-prev { left: 24px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 24px; top: 50%; transform: translateY(-50%); }

/* ---------- Leadership ---------- */
.leader-card { text-align: center; }
.leader-photo {
    width: 130px; height: 130px; border-radius: 50%; margin: 0 auto 18px;
    overflow: hidden; border: 4px solid var(--ivory-50); box-shadow: var(--shadow-soft);
}
.leader-photo img { width: 100%; height: 100%; object-fit: cover; }
.leader-card h3 { margin-bottom: 2px; }
.leader-role { color: var(--gold-500); font-weight: 700; font-size: 0.85rem; letter-spacing: 0.04em; text-transform: uppercase; margin-bottom: 12px; display: block; }
.leader-quote { font-family: var(--font-display); font-style: italic; color: var(--ink-600); font-size: 0.98rem; }

/* ---------- Testimonials ---------- */
.testi-card { background: var(--navy-900); color: #fff; border-radius: var(--radius-lg); padding: 32px; }
.testi-card p { color: #D6DEEC; font-family: var(--font-display); font-size: 1.05rem; font-style: italic; }
.testi-user { display: flex; align-items: center; gap: 12px; margin-top: 18px; }
.testi-avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--gold-500); color: var(--navy-900); display: flex; align-items: center; justify-content: center; font-weight: 700; }
.testi-user b { display: block; font-size: 0.92rem; }
.testi-user span { font-size: 0.8rem; color: #9FADC6; }

/* ---------- CTA banner ---------- */
.cta-banner {
    background: linear-gradient(120deg, var(--navy-900), var(--navy-700));
    border-radius: var(--radius-lg);
    padding: 52px;
    display: flex; align-items: center; justify-content: space-between; gap: 30px; flex-wrap: wrap;
    color: #fff;
}
.cta-banner h2 { color: #fff; margin-bottom: 6px; }
.cta-banner p { color: #C7D2E4; margin: 0; }

/* ---------- Notices / news ---------- */
.notice-item { display: flex; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.notice-item:last-child { border-bottom: 0; }
.notice-date { flex-shrink: 0; width: 64px; text-align: center; background: var(--navy-900); color: var(--gold-300); border-radius: 10px; padding: 8px 4px; font-size: 0.78rem; font-weight: 700; }
.notice-date b { display: block; font-family: var(--font-display); font-size: 1.15rem; color: #fff; }

/* ---------- Achievements strip ---------- */
.achieve-strip { display: flex; flex-wrap: wrap; gap: 18px; justify-content: center; }
.achieve-badge { display: flex; align-items: center; gap: 10px; background: var(--paper-white); border: 1px solid var(--line); border-radius: 999px; padding: 12px 20px; font-size: 0.88rem; font-weight: 600; color: var(--navy-900); }
.achieve-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold-500); }

/* ---------- FAQ ---------- */
.faq-item { border-bottom: 1px solid var(--line); }
.faq-q { display: flex; align-items: center; justify-content: space-between; padding: 20px 0; cursor: pointer; font-weight: 600; color: var(--navy-900); }
.faq-q .plus { font-size: 1.3rem; color: var(--gold-500); transition: transform 0.2s ease; }
.faq-item.open .plus { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height 0.25s ease; }
.faq-item.open .faq-a { max-height: 240px; }
.faq-a p { padding-bottom: 18px; margin: 0; }

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 700px) { .form-grid { grid-template-columns: 1fr; } }
label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--navy-900); margin-bottom: 6px; }
input, select, textarea {
    width: 100%; padding: 12px 14px; border-radius: 8px; border: 1px solid var(--line);
    font-family: var(--font-body); font-size: 0.95rem; background: var(--paper-white); color: var(--ink-800);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--gold-500); box-shadow: 0 0 0 3px rgba(201,162,75,0.18); }
textarea { resize: vertical; min-height: 110px; }
.form-note { font-size: 0.8rem; color: var(--ink-600); }

.alert { padding: 14px 18px; border-radius: 10px; font-size: 0.9rem; margin-bottom: 20px; }
.alert-success { background: #E7F3ED; color: var(--success); border: 1px solid #BFE0D0; }
.alert-error { background: #FBEAE8; color: var(--danger); border: 1px solid #F0C6C1; }

/* ---------- Contact map / info ---------- */
.contact-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
@media (max-width: 900px) { .contact-wrap { grid-template-columns: 1fr; } }
.map-frame { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-soft); border: 0; width: 100%; height: 340px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-900); color: #B9C4D8; padding-top: 64px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 40px; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-grid h4 { color: #fff; font-family: var(--font-body); font-size: 0.85rem; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 16px; }
.footer-grid li { margin-bottom: 10px; font-size: 0.9rem; }
.footer-grid a:hover { color: var(--gold-300); }
.footer-brand p { color: #93A0BC; font-size: 0.88rem; }
.social-row { display: flex; gap: 10px; margin-top: 14px; }
.social-row a { width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,0.08); display: flex; align-items: center; justify-content: center; }
.social-row a:hover { background: var(--gold-500); color: var(--navy-900); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding: 18px 0; font-size: 0.82rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.footer-bottom a { color: var(--gold-300); font-weight: 600; }

/* ---------- Utility ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.badge-soft { display: inline-flex; align-items: center; gap: 6px; background: var(--ivory-50); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; font-size: 0.8rem; font-weight: 600; color: var(--navy-900); }

/* ---------- School Movements slider ---------- */
.movement-slider { position: relative; max-width: 900px; margin: 0 auto; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lift); }
.movement-slider-track { display: flex; transition: transform 0.45s ease; }
.movement-slide { min-width: 100%; position: relative; }
.movement-slide img { width: 100%; height: 420px; object-fit: cover; display: block; }
.movement-slide-caption { position: absolute; inset: auto 0 0 0; padding: 28px 32px; background: linear-gradient(180deg, transparent, rgba(11,19,35,0.92)); color: #fff; }
.movement-slide-caption h3 { color: #fff; margin-bottom: 6px; }
.movement-slide-caption p { color: #D6DEEC; margin: 0; font-size: 0.92rem; }
.movement-slider-prev, .movement-slider-next {
    position: absolute; top: 50%; transform: translateY(-50%);
    background: rgba(255,255,255,0.15); color: #fff; border: 0;
    width: 44px; height: 44px; border-radius: 50%; font-size: 1.3rem; cursor: pointer;
    display: flex; align-items: center; justify-content: center; transition: background 0.15s ease;
}
.movement-slider-prev:hover, .movement-slider-next:hover { background: var(--gold-500); color: var(--navy-900); }
.movement-slider-prev { left: 16px; }
.movement-slider-next { right: 16px; }
.movement-slider-dots { position: absolute; bottom: 16px; right: 24px; display: flex; gap: 6px; }
.movement-slider-dots button { width: 8px; height: 8px; border-radius: 50%; border: 0; background: rgba(255,255,255,0.45); cursor: pointer; padding: 0; transition: all 0.15s ease; }
.movement-slider-dots button.active { background: var(--gold-500); width: 20px; border-radius: 4px; }
@media (max-width: 640px) { .movement-slide img { height: 280px; } .movement-slide-caption { padding: 18px 20px; } }

/* Inner page header banner (About, Academics, etc.) */
.page-banner {
    background: var(--navy-900);
    color: #fff;
    padding: 70px 0 50px;
    position: relative;
    overflow: hidden;
}
.page-banner h1 { color: #fff; margin-bottom: 8px; }
.breadcrumb { font-size: 0.85rem; color: #AEB9CE; }
.breadcrumb a:hover { color: var(--gold-300); }
