/* =============================================================
   School Public Website — Design System

   Palette:  Deep blue #123C69 (nav/footer/authority), Blue #1D5FA8
             (links/CTAs), Blue-soft #EAF2FB (section tint), Warm
             white #FAFBFD, Berry pink #C13C6B (accent only — never
             a background fill), Pink-soft #FBEAF1, Ink #10233F,
             Slate #5B6B85 (secondary text).
   Type:     Display -> 'Fraunces' (headlines, warm/characterful serif)
             Body    -> 'Manrope' (clean, modern, welcoming)
   Signature: the "ruler-tick" motif — alternating blue/pink ticks
              drawn from a school ruler/ledger sheet — used as section
              dividers and the active-nav-link underline.
   ============================================================= */

:root {
    --blue-deep:   #123C69;
    --blue:        #1D5FA8;
    --blue-soft:   #EAF2FB;
    --white:       #FFFFFF;
    --ivory:       #FAFBFD;
    --pink:        #C13C6B;
    --pink-soft:   #FBEAF1;
    --ink:         #10233F;
    --slate:       #5B6B85;
    --slate-light: #8B99B0;
    --border:      #E1E7F0;
    --success:     #1E7145;
    --success-bg:  #E7F4EC;
    --danger:      #B3261E;
    --danger-bg:   #FBEAE9;

    --font-display: 'Fraunces', Georgia, serif;
    --font-body: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 22px;
    --shadow-sm: 0 1px 3px rgba(16, 35, 63, 0.06);
    --shadow-md: 0 8px 24px rgba(16, 35, 63, 0.10);
    --shadow-lg: 0 20px 48px rgba(16, 35, 63, 0.16);

    --container: 1180px;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; max-width: 100%; overflow-x: hidden; scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    color: var(--ink);
    background: var(--ivory);
    -webkit-font-smoothing: antialiased;
    line-height: 1.6;
}

h1, h2, h3, h4 {
    font-family: var(--font-display);
    color: var(--blue-deep);
    margin: 0 0 0.5em;
    line-height: 1.15;
    font-weight: 600;
}
h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 600; }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; color: var(--slate); }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }

:focus-visible { outline: 3px solid var(--pink); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.section { padding: 72px 0; }
.section-tint { background: var(--blue-soft); }
.section-header { max-width: 640px; margin: 0 0 40px; }
.section-header.center { margin-left: auto; margin-right: auto; text-align: center; }
.eyebrow {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--pink);
    margin-bottom: 12px;
}

/* ── Signature: ruler-tick motif ───────────────────────────────────────
   A row of alternating blue/pink ticks, like marks on a ruler or a
   school ledger sheet. Used as a section divider and the active nav
   underline — never purely decorative, always marking a boundary. */
.ruler-divider {
    display: flex;
    justify-content: center;
    gap: 6px;
    padding: 0;
    margin: 0;
    list-style: none;
    height: 18px;
    overflow: hidden;
}
.ruler-divider span {
    width: 2px;
    background: var(--blue);
    opacity: 0.35;
}
.ruler-divider span:nth-child(3n) { height: 18px; background: var(--pink); opacity: 0.6; }
.ruler-divider span:nth-child(3n+1) { height: 10px; }
.ruler-divider span:nth-child(3n+2) { height: 14px; }

/* ── Buttons ────────────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 26px;
    font-size: 15px;
    font-weight: 700;
    border-radius: var(--radius-sm);
    border: 2px solid transparent;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.05s ease, color 0.15s ease;
    white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--blue-deep); color: var(--white); }
.btn-primary:hover { background: var(--blue); }
.btn-accent { background: var(--pink); color: var(--white); }
.btn-accent:hover { background: #a8305c; }
.btn-outline { background: transparent; border-color: var(--white); color: var(--white); }
.btn-outline:hover { background: rgba(255,255,255,0.12); }
.btn-outline-blue { background: transparent; border-color: var(--blue-deep); color: var(--blue-deep); }
.btn-outline-blue:hover { background: var(--blue-deep); color: var(--white); }
.btn-whatsapp { background: #25D366; color: var(--white); }
.btn-whatsapp:hover { background: #1DA851; }
.btn-block { width: 100%; }
.btn-sm { padding: 9px 18px; font-size: 13.5px; }

/* ── Navigation ─────────────────────────────────────────────────────── */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(250, 251, 253, 0.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}
.nav-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    max-width: var(--container);
    margin: 0 auto;
}
.nav-brand { display: flex; align-items: center; gap: 10px; }
.nav-logo-mark {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--blue-deep);
    color: var(--pink-soft);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.nav-brand-text { font-family: var(--font-display); font-weight: 600; font-size: 16px; color: var(--blue-deep); line-height: 1.2; }
.nav-links {
    display: flex;
    align-items: center;
    gap: 28px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.nav-links a {
    color: var(--ink);
    font-weight: 600;
    font-size: 14.5px;
    padding: 6px 2px;
    position: relative;
}
.nav-links a:hover { text-decoration: none; color: var(--blue); }
.nav-links a.active { color: var(--blue-deep); }
.nav-links a.active::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: -6px;
    height: 3px;
    background: repeating-linear-gradient(90deg, var(--blue) 0 4px, var(--pink) 4px 6px, transparent 6px 9px);
}
.nav-cta { flex-shrink: 0; }
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    padding: 8px;
}
.nav-toggle span { width: 24px; height: 2.5px; background: var(--blue-deep); border-radius: 2px; }
.nav-mobile-panel { display: none; }

/* ── Hero ───────────────────────────────────────────────────────────── */
.hero {
    background: linear-gradient(180deg, var(--blue-soft) 0%, var(--ivory) 100%);
    padding: 64px 0 0;
    overflow: hidden;
}
.hero-grid {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px 56px;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 48px;
    align-items: center;
}
.hero-content h1 { margin-bottom: 18px; }
.hero-tagline {
    font-family: var(--font-display);
    font-style: italic;
    font-size: 1.3rem;
    color: var(--blue);
    margin-bottom: 16px;
}
.hero-intro { font-size: 16px; max-width: 480px; margin-bottom: 32px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-visual {
    position: relative;
    aspect-ratio: 4 / 5;
    border-radius: var(--radius-lg);
    background: var(--blue-deep);
    background-image:
        radial-gradient(circle at 20% 20%, rgba(193,60,107,0.25), transparent 45%),
        radial-gradient(circle at 80% 80%, rgba(29,95,168,0.4), transparent 50%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}
.hero-visual-mark { text-align: center; color: rgba(255,255,255,0.9); }
.hero-visual-mark .nav-logo-mark { width: 80px; height: 80px; font-size: 26px; margin: 0 auto 14px; background: rgba(255,255,255,0.12); color: var(--white); border: 1px solid rgba(255,255,255,0.3); }
.hero-visual-mark p { color: rgba(255,255,255,0.75); font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; margin: 0; }
.hero-visual-ticks {
    position: absolute;
    right: 18px;
    top: 18px;
    bottom: 18px;
    width: 6px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.hero-visual-ticks span { height: 2px; background: rgba(255,255,255,0.35); }
.hero-visual-ticks span:nth-child(4n) { background: var(--pink); opacity: 0.8; width: 100%; }

/* ── Feature cards (Why Choose Us) ─────────────────────────────────── */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 22px; }
.feature-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 28px 24px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.feature-icon {
    width: 48px; height: 48px;
    border-radius: 12px;
    background: var(--blue-soft);
    color: var(--blue-deep);
    display: inline-flex; align-items: center; justify-content: center;
    font-family: var(--font-display); font-weight: 700; font-size: 18px;
    margin-bottom: 16px;
}
.feature-card h3 { margin-bottom: 8px; font-size: 17px; }
.feature-card p { font-size: 14px; margin: 0; }

/* ── Two-column content blocks ─────────────────────────────────────── */
.split-block { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.split-visual {
    aspect-ratio: 4/3;
    border-radius: var(--radius-lg);
    background: var(--blue-soft);
    display: flex; align-items: center; justify-content: center;
    position: relative;
    overflow: hidden;
}
.split-visual img { width: 100%; height: 100%; object-fit: cover; }
.split-visual-placeholder { color: var(--blue); text-align: center; padding: 20px; }

/* ── Admission / Portal CTA panels ─────────────────────────────────── */
.cta-panel {
    background: var(--blue-deep);
    background-image: radial-gradient(circle at 85% 15%, rgba(193,60,107,0.28), transparent 50%);
    color: var(--white);
    border-radius: var(--radius-lg);
    padding: 56px;
    text-align: center;
}
.cta-panel h2 { color: var(--white); }
.cta-panel p { color: rgba(255,255,255,0.82); max-width: 560px; margin-left: auto; margin-right: auto; }
.cta-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 24px; }

/* ── News cards ─────────────────────────────────────────────────────── */
.news-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    display: flex;
    flex-direction: column;
}
.news-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.news-card-image { aspect-ratio: 16/10; background: var(--blue-soft); overflow: hidden; }
.news-card-image img { width: 100%; height: 100%; object-fit: cover; }
.news-card-body { padding: 20px 22px 24px; flex: 1; display: flex; flex-direction: column; }
.news-card-date { font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--pink); margin-bottom: 8px; }
.news-card-body h3 { margin-bottom: 10px; }
.news-card-body h3 a { color: var(--blue-deep); }
.news-card-body h3 a:hover { text-decoration: none; color: var(--blue); }
.news-card-excerpt { font-size: 14px; flex: 1; }
.news-card-link { font-weight: 700; font-size: 13.5px; margin-top: 8px; }

/* ── Gallery ────────────────────────────────────────────────────────── */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.gallery-item {
    position: relative;
    aspect-ratio: 4/3;
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    background: var(--blue-soft);
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
.gallery-item:hover img { transform: scale(1.06); }
.gallery-caption {
    position: absolute; left: 0; right: 0; bottom: 0;
    padding: 14px 16px 12px;
    background: linear-gradient(180deg, transparent, rgba(16,35,63,0.75));
    color: var(--white);
    font-size: 13px;
    font-weight: 600;
    opacity: 0;
    transition: opacity 0.2s ease;
}
.gallery-item:hover .gallery-caption { opacity: 1; }

.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(16,35,63,0.92);
    z-index: 200;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 90vw; max-height: 82vh; border-radius: var(--radius-md); box-shadow: var(--shadow-lg); }
.lightbox-caption { color: var(--white); text-align: center; margin-top: 14px; font-size: 14px; }
.lightbox-close {
    position: absolute; top: 20px; right: 24px;
    background: rgba(255,255,255,0.12); border: none; color: var(--white);
    width: 40px; height: 40px; border-radius: 50%; font-size: 20px;
}

/* ── Forms ──────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 13.5px; font-weight: 700; color: var(--blue-deep); margin-bottom: 6px; }
.form-control {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 13px 16px;
    font-size: 15px;
    font-family: var(--font-body);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--white);
    color: var(--ink);
    box-sizing: border-box;
}
.form-control:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(29,95,168,0.15); }
textarea.form-control { resize: vertical; min-height: 130px; }
.field-error { color: var(--danger); font-size: 12.5px; margin-top: 5px; }

.alert { padding: 14px 18px; border-radius: var(--radius-sm); font-size: 14px; margin-bottom: 20px; border: 1px solid transparent; }
.alert-success { background: var(--success-bg); color: var(--success); border-color: #bfe3cd; }
.alert-error { background: var(--danger-bg); color: var(--danger); border-color: #f0c6c3; }

/* ── Contact info blocks ───────────────────────────────────────────── */
.contact-info-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 20px; }
.contact-info-item { display: flex; gap: 16px; align-items: flex-start; }
.contact-info-icon {
    width: 44px; height: 44px; flex-shrink: 0;
    border-radius: 12px; background: var(--blue-soft); color: var(--blue-deep);
    display: inline-flex; align-items: center; justify-content: center; font-size: 18px;
}
.contact-info-item h4 { margin: 0 0 4px; font-family: var(--font-body); font-size: 14.5px; color: var(--blue-deep); }
.contact-info-item p { margin: 0; font-size: 14px; }
.map-embed { border-radius: var(--radius-md); overflow: hidden; border: 1px solid var(--border); }
.map-embed iframe { width: 100%; height: 280px; border: 0; display: block; }

/* ── Footer ─────────────────────────────────────────────────────────── */
.site-footer { background: var(--blue-deep); color: rgba(255,255,255,0.75); padding: 56px 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; padding-bottom: 40px; }
.footer-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.footer-brand-text { font-family: var(--font-display); font-weight: 600; color: var(--white); font-size: 16px; }
.footer-col h4 { color: var(--white); font-family: var(--font-body); font-size: 13.5px; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 14px; }
.footer-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-col a { color: rgba(255,255,255,0.75); font-size: 14px; }
.footer-col a:hover { color: var(--white); text-decoration: none; }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.14);
    padding: 20px 0;
    font-size: 12.5px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

/* ── Floating WhatsApp button ──────────────────────────────────────── */
.whatsapp-float {
    position: fixed;
    bottom: 22px;
    right: 22px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #25D366;
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    z-index: 90;
    font-size: 26px;
    transition: transform 0.15s ease;
}
.whatsapp-float:hover { transform: scale(1.08); text-decoration: none; }

/* ── Admissions process steps ──────────────────────────────────────── */
.process-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0; }
.process-step { display: flex; gap: 20px; padding: 24px 0; border-bottom: 1px solid var(--border); }
.process-step:last-child { border-bottom: none; }
.process-num {
    width: 40px; height: 40px; flex-shrink: 0;
    border-radius: 50%; background: var(--blue-deep); color: var(--white);
    display: inline-flex; align-items: center; justify-content: center;
    font-family: var(--font-display); font-weight: 700; font-size: 15px;
}
.process-step h3 { margin-bottom: 6px; }
.process-step p { margin: 0; }

/* ── Admin panel (lightweight CMS) ─────────────────────────────────── */
.admin-body { background: var(--ivory); font-family: var(--font-body); }
.admin-shell { display: flex; min-height: 100vh; }
.admin-sidebar { width: 220px; background: var(--blue-deep); color: var(--white); padding: 20px 14px; flex-shrink: 0; }
.admin-sidebar-brand { font-family: var(--font-display); font-weight: 600; padding: 10px 10px 20px; font-size: 15px; }
.admin-nav-link { display: block; padding: 10px 12px; border-radius: 8px; color: rgba(255,255,255,0.8); font-size: 14px; font-weight: 600; margin-bottom: 2px; }
.admin-nav-link:hover, .admin-nav-link.active { background: rgba(255,255,255,0.1); color: var(--white); text-decoration: none; }
.admin-main { flex: 1; padding: 28px; max-width: 100%; overflow-x: hidden; }
.admin-topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; flex-wrap: wrap; gap: 12px; }
.admin-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 24px; box-shadow: var(--shadow-sm); max-width: 100%; overflow-x: auto; }
.admin-table-wrap { max-width: 100%; overflow-x: auto; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-md); }
table.admin-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.admin-table th, table.admin-table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border); }
table.admin-table th { font-size: 11.5px; text-transform: uppercase; color: var(--slate); background: var(--blue-soft); }
.admin-badge { display: inline-block; font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 20px; }
.admin-badge-published { background: var(--success-bg); color: var(--success); }
.admin-badge-draft { background: #F1EEE8; color: var(--slate); }
.admin-badge-unread { background: var(--pink-soft); color: var(--pink); }
.admin-thumb { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; }
.admin-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.admin-empty { text-align: center; color: var(--slate-light); padding: 32px !important; }

/* ── Responsive ─────────────────────────────────────────────────────── */
@media (max-width: 960px) {
    .nav-links { display: none; }
    .nav-toggle { display: flex; }
    .nav-mobile-panel {
        display: none;
        flex-direction: column;
        gap: 4px;
        padding: 14px 24px 20px;
        border-top: 1px solid var(--border);
        background: var(--white);
    }
    .nav-mobile-panel.open { display: flex; }
    .nav-mobile-panel a { padding: 12px 6px; font-weight: 600; color: var(--ink); border-bottom: 1px solid var(--border); }
    .nav-mobile-panel a:last-child { border-bottom: none; }

    .hero-grid { grid-template-columns: 1fr; }
    .hero-visual { max-width: 420px; margin: 0 auto; }
    .split-block { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .cta-panel { padding: 40px 26px; }

    .admin-sidebar { position: fixed; left: 0; top: 0; bottom: 0; transform: translateX(-100%); transition: transform 0.2s ease; z-index: 50; }
    .admin-sidebar.open { transform: translateX(0); }
    .admin-main { width: 100%; padding-top: 64px; }
    #adminSidebarToggle { display: block !important; }
}

@media (max-width: 560px) {
    .section { padding: 52px 0; }
    .hero-actions, .cta-actions { flex-direction: column; align-items: stretch; }
    .footer-grid { grid-template-columns: 1fr; }
    .footer-bottom { flex-direction: column; text-align: center; }
}
