/* ============================================================
   Bhashini International School — public site
   Palette (from the school logo):
   navy-teal #1B4A63 (text) · orange #F58220 · red #E52629 ·
   leaf green #7CB342 · teal-blue #1CA5C4 · light teal #EAF5F8
   Type: Fredoka (display) · Nunito Sans (body)
   ============================================================ */
:root {
  --ink: #1b4a63;
  --ink-soft: #2f7391;
  --sun: #f58220;
  --sun-deep: #d76f12;
  --blue: #1ca5c4;
  --sky: #eaf5f8;
  --leaf: #7cb342;
  --coral: #e52629;
  --paper: #ffffff;
  --line: #d5e4ea;
  --muted: #647079;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(27, 74, 99, 0.12);
  --font-display: 'Fredoka', 'Trebuchet MS', sans-serif;
  --font-body: 'Nunito Sans', 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  font-size: 16.5px;
  line-height: 1.65;
}
img { max-width: 100%; display: block; }
a { color: var(--ink-soft); }
.container { max-width: 1180px; margin: 0 auto; padding: 0 20px; }

h1, h2, h3, .display { font-family: var(--font-display); font-weight: 600; line-height: 1.15; }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); margin: 0 0 0.5em; }
h2 { font-size: clamp(1.5rem, 3.4vw, 2.2rem); margin: 0 0 0.6em; }
h3 { font-size: 1.25rem; margin: 0 0 0.4em; }

/* ---------- top bar + header ---------- */
.topbar {
  background: var(--ink); color: #cdd3f5; font-size: 0.82rem;
  display: flex; justify-content: space-between; gap: 12px;
  padding: 6px 20px; flex-wrap: wrap;
}
.topbar a { color: var(--sun); text-decoration: none; }

.site-header {
  position: sticky; top: 0; z-index: 60;
  background: var(--paper);
  border-bottom: 3px solid var(--sun);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 10px 20px; max-width: 1180px; margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand-logo { height: 54px; width: auto; max-width: 70vw; display: block; }
.brand-mark {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--sun);
  display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 600; font-size: 0.95rem; letter-spacing: 0.02em; color: var(--ink);
}
.brand-name { font-family: var(--font-display); font-size: 1.25rem; font-weight: 600; }
.brand-sub { font-size: 0.72rem; color: var(--muted); letter-spacing: 0.06em; text-transform: uppercase; }

.nav { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.nav a {
  text-decoration: none; color: var(--ink); font-weight: 700; font-size: 0.95rem;
  padding: 9px 13px; border-radius: 999px; transition: background 0.15s;
}
.nav a:hover, .nav a.active { background: var(--sky); }
.nav .cta {
  background: var(--ink); color: #fff; margin-left: 6px;
}
.nav .cta:hover { background: var(--ink-soft); }

.nav-toggle {
  display: none; background: none; border: 2px solid var(--ink);
  border-radius: 10px; padding: 6px 10px; font-size: 1.2rem; cursor: pointer; color: var(--ink);
}

/* ---------- notice ticker (signature) ---------- */
.ticker {
  background: var(--sun); color: var(--ink);
  display: flex; align-items: stretch; overflow: hidden; font-weight: 700;
}
.ticker-label {
  background: var(--ink); color: var(--sun);
  padding: 8px 16px; font-family: var(--font-display);
  white-space: nowrap; display: flex; align-items: center; gap: 8px;
  clip-path: polygon(0 0, 100% 0, calc(100% - 14px) 100%, 0 100%);
  padding-right: 28px; flex-shrink: 0;
}
.ticker-track { overflow: hidden; flex: 1; display: flex; align-items: center; }
.ticker-items {
  display: inline-flex; gap: 48px; padding-left: 100%;
  animation: ticker 28s linear infinite; white-space: nowrap;
}
.ticker-items a { color: var(--ink); text-decoration: none; font-size: 0.92rem; }
.ticker-items a::before { content: '📌 '; }
.ticker:hover .ticker-items { animation-play-state: paused; }
@keyframes ticker { to { transform: translateX(-100%); } }

/* ---------- hero slider ---------- */
.hero { position: relative; background: var(--ink); color: #fff; overflow: hidden; }
.hero-slide {
  display: none; position: relative; min-height: clamp(340px, 55vh, 560px);
  background-size: cover; background-position: center;
}
.hero-slide.active { display: block; }
.hero-slide::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(27,74,99,0.88) 25%, rgba(27,74,99,0.25) 70%);
}
.hero-copy {
  position: relative; z-index: 2; max-width: 1180px; margin: 0 auto;
  padding: clamp(48px, 9vh, 100px) 20px; max-width: 620px;
  margin-left: max(20px, calc((100vw - 1180px) / 2 + 20px));
}
.hero-copy .eyebrow {
  display: inline-block; background: var(--sun); color: var(--ink);
  font-weight: 800; font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 5px 14px; border-radius: 999px; margin-bottom: 16px;
}
.hero-copy p { font-size: 1.1rem; color: #dbe0fb; max-width: 46ch; }
.hero-dots { position: absolute; bottom: 18px; left: 0; right: 0; display: flex; justify-content: center; gap: 8px; z-index: 3; }
.hero-dots button {
  width: 11px; height: 11px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255,255,255,0.45);
}
.hero-dots button.on { background: var(--sun); }

.btn {
  display: inline-block; font-weight: 800; text-decoration: none;
  padding: 13px 26px; border-radius: 999px; border: 0; cursor: pointer;
  font-size: 1rem; font-family: var(--font-body); transition: transform 0.12s;
}
.btn:active { transform: scale(0.97); }
.btn-sun { background: var(--sun); color: var(--ink); }
.btn-sun:hover { background: #ffd463; }
.btn-ink { background: var(--ink); color: #fff; }
.btn-ink:hover { background: var(--ink-soft); }
.btn-ghost { background: transparent; color: var(--ink); border: 2px solid var(--ink); }

/* ---------- sections ---------- */
.section { padding: clamp(48px, 8vw, 84px) 0; }
.section-sky { background: var(--sky); }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 32px; flex-wrap: wrap; }
.section-head .kicker {
  font-weight: 800; color: var(--coral); text-transform: uppercase;
  letter-spacing: 0.12em; font-size: 0.8rem; display: block; margin-bottom: 4px;
}

/* stage cards: preschool → secondary */
.stages { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 20px; }
.stage-card {
  background: var(--paper); border-radius: var(--radius); padding: 26px 22px;
  box-shadow: var(--shadow); border-top: 6px solid var(--stage, var(--sun));
  transition: transform 0.15s;
}
.stage-card:hover { transform: translateY(-4px); }
.stage-card .age { font-size: 0.82rem; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.stage-card p { color: var(--muted); font-size: 0.95rem; margin-bottom: 0; }

/* news + events */
.grid-3 { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 22px; }
.card {
  background: var(--paper); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); display: flex; flex-direction: column;
}
.card img { height: 190px; width: 100%; object-fit: cover; }
.card-body { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-body time { color: var(--coral); font-weight: 800; font-size: 0.8rem; text-transform: uppercase; }
.card-body a { text-decoration: none; color: var(--ink); font-weight: 800; font-size: 1.08rem; }
.card-body p { color: var(--muted); font-size: 0.93rem; margin: 0; }

.event-row {
  display: flex; gap: 18px; align-items: center; background: var(--paper);
  border-radius: var(--radius); padding: 14px 18px; box-shadow: var(--shadow); margin-bottom: 14px;
}
.event-date {
  background: var(--ink); color: var(--sun); border-radius: 12px;
  min-width: 66px; text-align: center; padding: 8px 4px; font-family: var(--font-display);
}
.event-date .d { font-size: 1.5rem; font-weight: 600; line-height: 1; }
.event-date .m { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; }
.event-meta { font-size: 0.85rem; color: var(--muted); }

/* gallery */
.album-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; }
.album-tile {
  position: relative; border-radius: var(--radius); overflow: hidden;
  aspect-ratio: 4/3; text-decoration: none; box-shadow: var(--shadow); background: var(--sky);
}
.album-tile img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.25s; }
.album-tile:hover img { transform: scale(1.05); }
.album-tile .label {
  position: absolute; inset: auto 0 0 0; padding: 30px 16px 14px;
  background: linear-gradient(transparent, rgba(27,74,99,0.92));
  color: #fff; font-weight: 800;
}
.album-tile .label small { display: block; font-weight: 600; color: var(--sun); font-size: 0.78rem; }

.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.photo-grid a { border-radius: 10px; overflow: hidden; aspect-ratio: 1; }
.photo-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.2s; }
.photo-grid a:hover img { transform: scale(1.06); }

/* lightbox */
.lightbox {
  position: fixed; inset: 0; background: rgba(9,38,50,0.94); z-index: 100;
  display: none; align-items: center; justify-content: center; flex-direction: column; gap: 14px; padding: 20px;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 92vw; max-height: 80vh; border-radius: 10px; }
.lightbox .caption { color: #dbe0fb; }
.lightbox button {
  position: absolute; background: rgba(255,255,255,0.12); color: #fff; border: 0;
  font-size: 1.6rem; width: 48px; height: 48px; border-radius: 50%; cursor: pointer;
}
.lightbox .close { top: 18px; right: 18px; }
.lightbox .prev { left: 14px; top: 50%; }
.lightbox .next { right: 14px; top: 50%; }

/* forms */
.form-card { background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); padding: 30px; max-width: 640px; }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-weight: 800; font-size: 0.9rem; margin-bottom: 6px; }
.form-control, .form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 12px 14px; border: 2px solid var(--line); border-radius: 10px;
  font: inherit; background: #fff; color: var(--ink);
}
.form-control:focus, .form-group :is(input,select,textarea):focus {
  outline: none; border-color: var(--ink-soft); box-shadow: 0 0 0 3px var(--sky);
}
.help-block, .invalid-feedback { color: var(--coral); font-size: 0.82rem; font-weight: 700; margin-top: 4px; }
.has-error .form-control { border-color: var(--coral); }
.alert { border-radius: 12px; padding: 14px 18px; font-weight: 700; margin-bottom: 20px; }
.alert-success { background: #e2f6ec; color: var(--leaf); }
.alert-danger { background: #fdeae4; color: var(--coral); }

/* notice board page */
.notice-item {
  background: var(--paper); border-left: 6px solid var(--sun); border-radius: 10px;
  box-shadow: var(--shadow); padding: 16px 20px; margin-bottom: 14px;
}
.notice-item.pinned { border-left-color: var(--coral); }
.badge {
  display: inline-block; font-size: 0.72rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.06em; border-radius: 999px; padding: 3px 10px;
  background: var(--sky); color: var(--ink-soft);
}

/* faculty */
.faculty-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 20px; }
.faculty-card { text-align: center; background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px 16px; }
.faculty-card img, .faculty-card .ph {
  width: 110px; height: 110px; border-radius: 50%; object-fit: cover;
  margin: 0 auto 12px; background: var(--sky);
  display: grid; place-items: center; font-family: var(--font-display); font-size: 2rem; color: var(--ink-soft);
}
.faculty-card .role { color: var(--coral); font-weight: 800; font-size: 0.85rem; }
.faculty-card .qual { color: var(--muted); font-size: 0.82rem; }

/* stats strip */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 18px; text-align: center; }
.stats .num { font-family: var(--font-display); font-size: 2.6rem; font-weight: 600; color: var(--sun); }
.stats .lbl { color: #cdd3f5; font-weight: 700; font-size: 0.9rem; }

/* footer */
.site-footer { background: var(--ink); color: #cdd3f5; padding: 56px 0 24px; margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 32px; }
.site-footer h3 { color: var(--sun); font-size: 1.05rem; }
.site-footer a { color: #cdd3f5; text-decoration: none; }
.site-footer a:hover { color: var(--sun); }
.footer-links li { margin-bottom: 8px; list-style: none; }
.footer-links { padding: 0; margin: 0; }
.footer-bottom { border-top: 1px solid #2c6079; margin-top: 40px; padding-top: 18px; font-size: 0.82rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }

.pagination { display: flex; gap: 6px; list-style: none; padding: 0; justify-content: center; margin-top: 32px; }
.pagination a, .pagination span {
  display: block; padding: 8px 14px; border-radius: 10px; text-decoration: none;
  background: var(--sky); font-weight: 800;
}
.pagination .active a { background: var(--ink); color: #fff; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .brand-logo { height: 42px; }
  .nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--paper); flex-direction: column; align-items: stretch;
    padding: 12px 20px 20px; border-bottom: 3px solid var(--sun); box-shadow: var(--shadow);
  }
  .nav.open { display: flex; }
  .nav a { border-radius: 10px; }
  .topbar { justify-content: center; text-align: center; }
  .hero-copy { margin-left: 20px; padding-right: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .ticker-items { animation: none; padding-left: 0; flex-wrap: wrap; white-space: normal; }
  html { scroll-behavior: auto; }
}
:focus-visible { outline: 3px solid var(--coral); outline-offset: 2px; }

/* ---------- language switcher (Bhashini) ---------- */
.topbar-right { display:flex; align-items:center; gap:6px; flex-wrap:wrap; }
.lang-switch { position:relative; display:inline-block; }
.lang-btn {
  background:rgba(255,255,255,0.12); color:#fff; border:0; cursor:pointer;
  font:inherit; font-size:0.82rem; font-weight:700; padding:3px 10px; border-radius:999px;
}
.lang-btn:hover { background:rgba(255,255,255,0.22); }
.lang-menu {
  display:none; position:absolute; right:0; top:calc(100% + 6px); z-index:80;
  background:#fff; border-radius:12px; box-shadow:var(--shadow); padding:8px;
  min-width:170px; max-height:60vh; overflow:auto;
  grid-template-columns:1fr 1fr; gap:2px;
}
.lang-menu.open { display:grid; }
.lang-menu a {
  display:block; padding:8px 12px; border-radius:8px; text-decoration:none;
  color:var(--ink); font-weight:700; font-size:0.92rem;
}
.lang-menu a:hover { background:var(--sky); }
.lang-menu a.on { background:var(--ink); color:#fff; }

/* Indic scripts fall back to Noto Sans families loaded in the head */
:lang(hi), :lang(mr) { font-family:'Noto Sans Devanagari', var(--font-body); }
:lang(kn) { font-family:'Noto Sans Kannada', var(--font-body); }
:lang(ta) { font-family:'Noto Sans Tamil', var(--font-body); }
:lang(te) { font-family:'Noto Sans Telugu', var(--font-body); }

/* listen (TTS) button */
.btn-listen {
  display:inline-flex; align-items:center; gap:6px; background:var(--sky); color:var(--ink);
  border:0; cursor:pointer; font:inherit; font-weight:800; padding:8px 16px; border-radius:999px;
}
.btn-listen:hover { background:#e2e8ff; }
.btn-listen[disabled] { opacity:0.6; cursor:progress; }
