/* ============================================================
   Nirvana Secondary School — public stylesheet
   Palette: deep blue + white, with warm accents from the badge.
   ============================================================ */
:root {
  --blue-900: #0a2a66;
  --blue-800: #0b3d91;
  --blue-700: #1356c4;
  --blue-600: #1769e0;
  --blue-500: #2e86f6;
  --blue-100: #e8f1ff;
  --blue-50:  #f3f8ff;
  --accent:   #e23b3b;
  --ink:      #16213a;
  --muted:    #5a6680;
  --white:    #ffffff;
  --line:     #e2e8f4;
  --shadow:   0 18px 45px -22px rgba(11, 61, 145, 0.45);
  --radius:   18px;
  --maxw:     1160px;
  --font:     'Plus Jakarta Sans', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --serif:    'Lora', Georgia, serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
.container { width: min(100% - 2.4rem, var(--maxw)); margin-inline: auto; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: background .3s, box-shadow .3s, border-color .3s;
}
.site-header.scrolled { box-shadow: 0 6px 24px -16px rgba(10, 42, 102, .55); border-color: var(--line); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: flex; align-items: center; gap: .7rem; }
.brand-logo { width: 44px; height: 44px; object-fit: contain; border-radius: 8px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-text strong { font-size: 1.15rem; color: var(--blue-800); font-weight: 800; letter-spacing: .2px; }
.brand-text small { font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: 2px; }

.main-nav { display: flex; align-items: center; gap: 1.35rem; }
.main-nav a { font-size: .92rem; font-weight: 600; color: var(--ink); position: relative; padding: .3rem 0; transition: color .2s; }
.main-nav a::after { content: ""; position: absolute; left: 0; bottom: -2px; height: 2px; width: 0; background: var(--blue-600); transition: width .25s; }
.main-nav a:hover { color: var(--blue-700); }
.main-nav a:hover::after { width: 100%; }
.nav-admin { background: var(--blue-700); color: #fff !important; padding: .5rem 1rem !important; border-radius: 999px; }
.nav-admin::after { display: none; }
.nav-admin:hover { background: var(--blue-800); }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { width: 26px; height: 3px; background: var(--blue-800); border-radius: 3px; transition: .3s; }
.nav-toggle.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ---------- Buttons ---------- */
.btn { display: inline-block; font-weight: 700; padding: .85rem 1.7rem; border-radius: 999px; cursor: pointer; border: 2px solid transparent; transition: transform .2s, box-shadow .2s, background .2s, color .2s; font-size: .98rem; }
.btn-primary { background: var(--blue-700); color: #fff; box-shadow: 0 14px 30px -14px rgba(19, 86, 196, .8); }
.btn-primary:hover { background: var(--blue-800); transform: translateY(-2px); }
.btn-ghost { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.75); }
.btn-ghost:hover { background: #fff; color: var(--blue-800); transform: translateY(-2px); }
.btn.full { width: 100%; text-align: center; }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100vh; display: flex; align-items: center;
  background: url('../assets/img/students.jpg') center/cover no-repeat fixed;
  text-align: center; color: #fff; padding: 7rem 0 4rem;
}
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,42,102,.82), rgba(11,61,145,.78)); }
.hero-content { position: relative; z-index: 2; max-width: 860px; margin-inline: auto; }
.hero-badge { width: 110px; margin: 0 auto 1.3rem; filter: drop-shadow(0 10px 22px rgba(0,0,0,.45)); border-radius: 12px; }
.hero h1 { font-size: clamp(2.3rem, 6vw, 4rem); font-weight: 800; line-height: 1.05; letter-spacing: -.5px; }
.hero-motto { font-family: var(--serif); font-style: italic; font-size: clamp(1.2rem, 3vw, 1.7rem); margin-top: .8rem; color: #dce9ff; }
.hero-sub { margin: 1.1rem auto 0; max-width: 620px; color: #e7eefc; font-size: 1.05rem; }
.hero-cta { margin-top: 2.1rem; display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.hero-scroll { position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%); z-index: 2; color: #fff; font-size: 2rem; animation: bob 1.8s infinite; opacity: .85; }
@keyframes bob { 0%,100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 10px); } }

/* ---------- Sections ---------- */
.section { padding: 5.5rem 0; }
.section-tint { background: var(--blue-50); }
.section-blue { background: linear-gradient(160deg, var(--blue-800), var(--blue-900)); color: #fff; }
.section-head { max-width: 720px; margin: 0 auto 3rem; text-align: center; }
.eyebrow { display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: 2.5px; text-transform: uppercase; color: var(--blue-600); background: var(--blue-100); padding: .35rem .9rem; border-radius: 999px; }
.eyebrow.light { color: #cfe0ff; background: rgba(255,255,255,.12); }
.section-head h2 { font-size: clamp(1.7rem, 4vw, 2.5rem); font-weight: 800; margin: 1rem 0 .6rem; line-height: 1.15; }
.section-head h2.quote { font-family: var(--serif); font-style: italic; font-weight: 500; font-size: clamp(1.3rem, 3vw, 2rem); line-height: 1.4; }
.section-head p { color: var(--muted); font-size: 1.05rem; }
.section-blue .section-head p, .section-blue .lead { color: #d4e2ff; }
.lead { font-size: 1.12rem; }

/* ---------- Cards ---------- */
.cards { display: grid; gap: 1.5rem; }
.cards.two { grid-template-columns: repeat(2, 1fr); }
.cards.three { grid-template-columns: repeat(3, 1fr); }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.8rem; box-shadow: var(--shadow); transition: transform .25s, box-shadow .25s; }
.card:hover { transform: translateY(-6px); box-shadow: 0 26px 50px -24px rgba(11,61,145,.55); }
.card h3 { font-size: 1.22rem; margin-bottom: .5rem; color: var(--blue-800); }
.card p { color: var(--muted); }
.card-icon { font-size: 2rem; margin-bottom: .6rem; }
.card.glass { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.18); box-shadow: none; backdrop-filter: blur(6px); }
.card.glass h3, .card.glass p { color: #fff; }
.card.glass p { color: #d7e4ff; }
.card.numbered { position: relative; padding-top: 2.4rem; }
.card.numbered .num { position: absolute; top: 1.2rem; right: 1.4rem; font-size: 2.4rem; font-weight: 800; color: var(--blue-100); }
.card.outline { box-shadow: none; border: 1px solid var(--line); }
.card.outline:hover { border-color: var(--blue-500); }

/* ---------- Split (about / boarding) ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.split.reverse .split-media { order: 2; }
.split-media img { border-radius: var(--radius); box-shadow: var(--shadow); aspect-ratio: 4/3; object-fit: cover; width: 100%; }
.split-body .eyebrow { margin-bottom: 1rem; }
.split-body h2 { font-size: clamp(1.6rem, 3.5vw, 2.3rem); font-weight: 800; margin-bottom: 1rem; line-height: 1.2; }
.split-body p { color: var(--muted); margin-bottom: 1rem; }
.ticks { list-style: none; display: grid; gap: .7rem; margin-top: 1rem; }
.ticks li { position: relative; padding-left: 2rem; font-weight: 500; }
.ticks li::before { content: "✓"; position: absolute; left: 0; top: 0; width: 1.4rem; height: 1.4rem; background: var(--blue-700); color: #fff; border-radius: 50%; font-size: .8rem; display: grid; place-items: center; }

/* ---------- Pills (activities) ---------- */
.pill-grid { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; }
.pill { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.25); padding: .85rem 1.5rem; border-radius: 999px; font-weight: 600; font-size: 1rem; transition: background .2s, transform .2s; }
.pill:hover { background: #fff; color: var(--blue-800); transform: translateY(-3px); }

/* ---------- Leadership ---------- */
.leader-card { background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.18); border-radius: var(--radius); padding: 2rem; text-align: center; backdrop-filter: blur(6px); }
.leader-avatar { width: 74px; height: 74px; margin: 0 auto 1rem; border-radius: 50%; background: linear-gradient(135deg, var(--blue-500), var(--blue-700)); display: grid; place-items: center; font-weight: 800; font-size: 1.6rem; color: #fff; box-shadow: 0 10px 24px -10px rgba(0,0,0,.5); }
.leader-card h3 { font-size: 1.35rem; }
.leader-role { color: #bcd2ff; font-weight: 600; margin-bottom: 1rem; letter-spacing: .5px; }
.leader-contacts { list-style: none; display: grid; gap: .55rem; }
.leader-contacts a { color: #eaf2ff; font-weight: 500; transition: color .2s; word-break: break-word; }
.leader-contacts a:hover { color: #fff; text-decoration: underline; }

/* ---------- News / Notices / Events ---------- */
.cards#news-list { grid-template-columns: repeat(3, 1fr); }
.post-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem; box-shadow: var(--shadow); }
.post-card .badge { display: inline-block; font-size: .72rem; text-transform: uppercase; letter-spacing: 1px; font-weight: 700; color: var(--blue-700); background: var(--blue-100); padding: .25rem .7rem; border-radius: 999px; margin-bottom: .7rem; }
.post-card h3 { color: var(--blue-800); margin-bottom: .4rem; font-size: 1.2rem; }
.post-card .meta { font-size: .82rem; color: var(--muted); margin-bottom: .6rem; }
.post-card p.body { color: var(--muted); white-space: pre-wrap; }

.notice-list { display: grid; gap: 1rem; max-width: 880px; margin: 0 auto; }
.notice-item { display: flex; gap: 1.2rem; align-items: flex-start; background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--blue-600); border-radius: 12px; padding: 1.2rem 1.4rem; box-shadow: var(--shadow); }
.notice-item .tag { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: #fff; background: var(--blue-700); padding: .3rem .7rem; border-radius: 6px; white-space: nowrap; }
.notice-item h3 { font-size: 1.08rem; color: var(--blue-800); }
.notice-item p { color: var(--muted); white-space: pre-wrap; margin-top: .2rem; }

.event-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.4rem; }
.event-item { display: flex; gap: 1.1rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem; box-shadow: var(--shadow); }
.event-date { flex: 0 0 64px; text-align: center; background: var(--blue-700); color: #fff; border-radius: 12px; padding: .6rem 0; height: fit-content; }
.event-date .d { font-size: 1.6rem; font-weight: 800; line-height: 1; }
.event-date .m { font-size: .72rem; text-transform: uppercase; letter-spacing: 1px; }
.event-item h3 { font-size: 1.12rem; color: var(--blue-800); }
.event-item .where { font-size: .85rem; color: var(--blue-600); font-weight: 600; margin: .2rem 0; }
.event-item p { color: var(--muted); font-size: .92rem; }

.loading { color: var(--muted); text-align: center; grid-column: 1 / -1; }
.empty-msg { color: var(--muted); text-align: center; grid-column: 1 / -1; padding: 1rem; }
.section-blue .loading, .section-blue .empty-msg { color: #cfe0ff; }

/* ---------- Gallery ---------- */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; }
.gallery-item { position: relative; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 4/3; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.gallery-item:hover img { transform: scale(1.08); }
.gallery-item figcaption { position: absolute; inset: auto 0 0 0; padding: 1.4rem .9rem .7rem; color: #fff; font-weight: 600; font-size: .95rem; background: linear-gradient(0deg, rgba(8,28,66,.85), transparent); }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; align-items: start; }
.contact-info h3 { color: var(--blue-800); font-size: 1.3rem; margin-bottom: .4rem; }
.contact-info h4 { color: var(--blue-700); margin: 1.2rem 0 .3rem; font-size: 1rem; }
.contact-line { color: var(--muted); margin-bottom: .25rem; }
.contact-line a { color: var(--blue-700); font-weight: 600; }
.contact-line a:hover { text-decoration: underline; }
.map-wrap { margin-top: 1.4rem; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--line); }
.map-wrap iframe { width: 100%; height: 280px; border: 0; display: block; }

.contact-form { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 2rem; box-shadow: var(--shadow); }
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: .4rem; color: var(--ink); }
.field input, .field textarea { width: 100%; padding: .8rem 1rem; border: 1px solid var(--line); border-radius: 12px; font-family: inherit; font-size: 1rem; background: var(--blue-50); transition: border-color .2s, box-shadow .2s; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--blue-500); box-shadow: 0 0 0 3px rgba(46,134,246,.18); background: #fff; }
.field textarea { resize: vertical; }
.hidden-field { position: absolute; left: -9999px; }
.form-status { margin-top: .9rem; font-weight: 600; font-size: .95rem; text-align: center; }
.form-status.ok { color: #1c8a4a; }
.form-status.err { color: var(--accent); }

/* ---------- Footer ---------- */
.site-footer { background: var(--blue-900); color: #cdd9f2; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2.5rem; padding: 3.5rem 0; }
.footer-logo { width: 60px; border-radius: 10px; margin-bottom: 1rem; }
.footer-brand h3 { color: #fff; font-size: 1.3rem; }
.footer-motto { font-family: var(--serif); font-style: italic; color: #9fb6e6; margin-top: .3rem; }
.footer-col h4 { color: #fff; margin-bottom: 1rem; font-size: 1.05rem; }
.footer-col ul { list-style: none; display: grid; gap: .6rem; }
.footer-col a:hover { color: #fff; text-decoration: underline; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding: 1.3rem 0; text-align: center; font-size: .9rem; color: #9fb6e6; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .cards.three, .cards#news-list { grid-template-columns: repeat(2, 1fr); }
  .split, .contact-grid { grid-template-columns: 1fr; }
  .split.reverse .split-media { order: 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .nav-toggle { display: flex; }
  .main-nav {
    position: fixed; inset: 72px 0 auto 0; flex-direction: column; align-items: stretch;
    background: #fff; padding: 1rem 1.4rem 1.6rem; gap: .3rem; border-bottom: 1px solid var(--line);
    box-shadow: 0 20px 30px -20px rgba(10,42,102,.5);
    transform: translateY(-130%); transition: transform .35s; max-height: calc(100vh - 72px); overflow-y: auto;
  }
  .main-nav.open { transform: translateY(0); }
  .main-nav a { padding: .8rem .2rem; border-bottom: 1px solid var(--blue-50); }
  .main-nav a::after { display: none; }
  .nav-admin { text-align: center; margin-top: .6rem; }
  .hero { background-attachment: scroll; }
}
@media (max-width: 560px) {
  .cards.two, .cards.three, .cards#news-list { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .section { padding: 4rem 0; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
