/* ============================================================
   Gangotri EBSS — Sample 1 "Mithila Sunrise"
   Indigo #1e2a78 · Sunrise #f2762e · Sky #eef2fb
   Rounded, warm, friendly. Runs on Bootstrap 5.3 (CDN).
   ============================================================ */

:root {
  --ms-indigo: #1e2a78;
  --ms-indigo-deep: #141c52;
  --ms-sunrise: #f2762e;
  --ms-sunrise-deep: #b04e12; /* AA on white for text */
  --ms-sky: #eef2fb;
  --ms-ink: #1c1e26;
  --ms-muted: #5a6072;
  --ms-white: #ffffff;
  --ms-radius: 1.25rem;
  --ms-radius-sm: 0.75rem;
  --ms-shadow: 0 0.75rem 2rem rgba(30, 42, 120, 0.12);
  --ms-display: "Poppins", "Segoe UI", system-ui, sans-serif;
  --ms-body: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

html { scroll-behavior: smooth; }

img { max-width: 100%; height: auto; }

body {
  font-family: var(--ms-body);
  color: var(--ms-ink);
  background: var(--ms-white);
}

h1, h2, h3, h4, .display-font {
  font-family: var(--ms-display);
  font-weight: 600;
  color: var(--ms-indigo);
  letter-spacing: -0.01em;
}

a { color: var(--ms-indigo); }
a:hover { color: var(--ms-sunrise-deep); }

.text-sunrise { color: var(--ms-sunrise-deep); }
.bg-sky { background: var(--ms-sky); }

/* Mithila-inspired triangle border motif */
.mithila-band {
  height: 12px;
  background:
    linear-gradient(135deg, var(--ms-sunrise) 25%, transparent 25%) 0 0 / 12px 12px,
    linear-gradient(225deg, var(--ms-sunrise) 25%, transparent 25%) 0 0 / 12px 12px,
    var(--ms-indigo);
}

/* Skip link */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--ms-indigo);
  color: #fff;
  padding: 0.6rem 1rem;
  z-index: 2000;
  border-radius: 0 0 var(--ms-radius-sm) 0;
}
.skip-link:focus { left: 0; color: #fff; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1030;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  transition: box-shadow 0.25s ease;
}
.site-header.is-scrolled { box-shadow: 0 0.25rem 1rem rgba(20, 28, 82, 0.12); }

.navbar-brand { display: flex; align-items: center; gap: 0.7rem; }
.navbar-brand img { width: 46px; height: 46px; }
.brand-name {
  font-family: var(--ms-display);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.2;
  color: var(--ms-indigo);
}
.brand-name small {
  display: block;
  font-weight: 500;
  font-size: 0.72rem;
  color: var(--ms-sunrise-deep);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.navbar .nav-link {
  font-weight: 500;
  color: var(--ms-ink);
  border-radius: 999px;
  padding: 0.45rem 1rem !important;
}
.navbar .nav-link:hover { background: var(--ms-sky); color: var(--ms-indigo); }
.navbar .nav-link.active {
  background: var(--ms-indigo);
  color: #fff;
}

.btn-sunrise {
  background: var(--ms-sunrise);
  border: none;
  color: #fff;
  font-weight: 600;
  border-radius: 999px;
  padding: 0.65rem 1.5rem;
}
.btn-sunrise:hover, .btn-sunrise:focus { background: var(--ms-sunrise-deep); color: #fff; }

.btn-ghost {
  border: 2px solid var(--ms-indigo);
  color: var(--ms-indigo);
  font-weight: 600;
  border-radius: 999px;
  padding: 0.55rem 1.4rem;
  background: transparent;
}
.btn-ghost:hover { background: var(--ms-indigo); color: #fff; }
.btn-ghost-light {
  border: 2px solid rgba(255,255,255,0.85);
  color: #fff;
  font-weight: 600;
  border-radius: 999px;
  padding: 0.55rem 1.4rem;
  background: transparent;
}
.btn-ghost-light:hover { background: #fff; color: var(--ms-indigo); }

/* ---------- Ticker ---------- */
.ticker {
  background: var(--ms-indigo-deep);
  color: #fff;
  overflow: hidden;
  font-size: 0.9rem;
}
.ticker .ticker-track {
  display: inline-block;
  white-space: nowrap;
  padding: 0.45rem 0;
  animation: ticker-scroll 28s linear infinite;
}
.ticker:hover .ticker-track,
.ticker:focus-within .ticker-track { animation-play-state: paused; }
.ticker a { color: #ffd9be; text-decoration: none; }
.ticker a:hover { text-decoration: underline; }
.ticker .sep { color: var(--ms-sunrise); margin: 0 1.2rem; }
@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(60rem 30rem at 110% -20%, rgba(242, 118, 46, 0.25), transparent 60%),
    linear-gradient(160deg, var(--ms-indigo) 0%, var(--ms-indigo-deep) 75%);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.hero h1 { color: #fff; font-weight: 700; }
.hero .lead { color: #d9defa; }
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  padding: 0.35rem 1rem;
  font-size: 0.85rem;
  color: #ffe1cd;
}
.hero-photo {
  border-radius: var(--ms-radius);
  box-shadow: var(--ms-shadow);
  transform: rotate(1.5deg);
  border: 6px solid rgba(255, 255, 255, 0.14);
}
.hero-chip {
  position: absolute;
  background: #fff;
  color: var(--ms-ink);
  border-radius: var(--ms-radius-sm);
  box-shadow: var(--ms-shadow);
  padding: 0.6rem 0.9rem;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.55rem;
}
.hero-chip i { color: var(--ms-sunrise-deep); }
.hero-wave { display: block; width: 100%; height: 70px; margin-top: 2rem; }
.hero-wave path { fill: var(--ms-white); }

/* ---------- Sections ---------- */
.section { padding: 4.5rem 0; }
.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ms-sunrise-deep);
  margin-bottom: 0.5rem;
}
.section-title { margin-bottom: 0.75rem; }

/* ---------- Cards ---------- */
.card-ms {
  background: #fff;
  border: 1px solid rgba(30, 42, 120, 0.08);
  border-radius: var(--ms-radius);
  box-shadow: 0 0.25rem 1rem rgba(30, 42, 120, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  height: 100%;
  overflow: hidden;
}
.card-ms:hover { transform: translateY(-4px); box-shadow: var(--ms-shadow); }
.icon-dot {
  width: 3.2rem;
  height: 3.2rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--ms-sky);
  color: var(--ms-indigo);
  font-size: 1.25rem;
}
.card-ms .tag {
  display: inline-block;
  background: var(--ms-sky);
  color: var(--ms-indigo);
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 999px;
  padding: 0.25rem 0.8rem;
}

/* ---------- Stats ---------- */
.stat-panel {
  background: var(--ms-indigo);
  border-radius: var(--ms-radius);
  color: #fff;
  box-shadow: var(--ms-shadow);
}
.stat-value {
  font-family: var(--ms-display);
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  font-weight: 700;
  color: #fff;
}
.stat-label { color: #c9d1f5; font-size: 0.9rem; }
.stat-cell { border-right: 1px solid rgba(255, 255, 255, 0.15); }
.stat-cell:last-child { border-right: 0; }
@media (max-width: 767.98px) {
  .stat-cell { border-right: 0; border-bottom: 1px solid rgba(255,255,255,0.15); }
  .stat-cell:last-child { border-bottom: 0; }
}

/* ---------- Notices ---------- */
.filter-pills .btn {
  border-radius: 999px;
  border: 1.5px solid rgba(30, 42, 120, 0.25);
  color: var(--ms-indigo);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.35rem 1.1rem;
  background: #fff;
}
.filter-pills .btn.active {
  background: var(--ms-sunrise);
  border-color: var(--ms-sunrise);
  color: #fff;
}
[data-item-group].is-hidden { display: none !important; }

.notice-card {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  background: #fff;
  border: 1px solid rgba(30, 42, 120, 0.1);
  border-radius: var(--ms-radius-sm);
  padding: 1rem 1.15rem;
  height: 100%;
}
.notice-date {
  min-width: 4.1rem;
  text-align: center;
  background: var(--ms-sky);
  color: var(--ms-indigo);
  border-radius: var(--ms-radius-sm);
  padding: 0.45rem 0.3rem;
  line-height: 1.15;
  font-weight: 600;
}
.notice-date .d { font-size: 1.25rem; display: block; }
.notice-date .m { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; }

/* ---------- Leadership / Faculty ---------- */
.leader-card img,
.leader-fallback {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  max-height: 300px;
  object-fit: cover;
  object-position: top center;
}
.leader-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ms-sky);
  color: var(--ms-indigo);
  font-size: 3.5rem;
}
.leader-role {
  display: inline-block;
  background: var(--ms-sky);
  color: var(--ms-indigo);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.25rem 0.9rem;
}

/* ---------- Gallery ---------- */
.gallery-grid figure { margin: 0; }
.gallery-grid img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  max-height: 300px;
  object-fit: cover;
  border-radius: var(--ms-radius-sm) var(--ms-radius-sm) 0 0;
  cursor: zoom-in;
  transition: transform 0.2s ease;
}
.gallery-grid a:focus-visible img,
.gallery-grid img:hover { transform: scale(1.02); }
.gallery-grid figcaption {
  font-size: 0.83rem;
  background: var(--ms-sky);
  color: var(--ms-ink);
  border-radius: 0 0 var(--ms-radius-sm) var(--ms-radius-sm);
  padding: 0.5rem 0.75rem;
  min-height: 3.1rem;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(20, 28, 82, 0.94);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 2rem;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: min(92vw, 1000px);
  max-height: 78vh;
  border-radius: var(--ms-radius-sm);
}
.lightbox figcaption { color: #d9defa; text-align: center; padding-top: 0.75rem; }
.lightbox button {
  position: absolute;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  width: 2.8rem;
  height: 2.8rem;
}
.lightbox button:hover { background: var(--ms-sunrise); border-color: var(--ms-sunrise); }
.lb-close { top: 1.25rem; right: 1.25rem; }
.lb-prev { left: 1.25rem; top: 50%; transform: translateY(-50%); }
.lb-next { right: 1.25rem; top: 50%; transform: translateY(-50%); }

/* ---------- Contact ---------- */
.contact-list { list-style: none; padding: 0; margin: 0; }
.contact-list li { display: flex; gap: 0.9rem; margin-bottom: 1.15rem; }
.contact-list i {
  color: var(--ms-sunrise-deep);
  font-size: 1.1rem;
  width: 1.6rem;
  text-align: center;
  margin-top: 0.2rem;
}
.map-frame {
  border: 0;
  width: 100%;
  height: 340px;
  border-radius: var(--ms-radius);
  box-shadow: var(--ms-shadow);
}
.admission-note {
  max-width: 26rem;
  background: var(--ms-sky);
  border-left: 4px solid var(--ms-sunrise);
  border-radius: var(--ms-radius-sm);
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
}
.form-control:focus, .form-select:focus {
  border-color: var(--ms-indigo);
  box-shadow: 0 0 0 0.2rem rgba(30, 42, 120, 0.15);
}

/* ---------- Footer ---------- */
.site-footer { background: var(--ms-indigo-deep); color: #c9d1f5; }
.site-footer h5 { color: #fff; font-size: 1rem; }
.site-footer a { color: #c9d1f5; text-decoration: none; }
.site-footer a:hover { color: #ffd9be; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.12); font-size: 0.85rem; }

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

/* 404 */
.err-code {
  font-family: var(--ms-display);
  font-size: clamp(5rem, 18vw, 9rem);
  font-weight: 700;
  color: var(--ms-sky);
  -webkit-text-stroke: 3px var(--ms-indigo);
  line-height: 1;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .ticker .ticker-track { animation: none; padding-left: 0; }
  .card-ms:hover { transform: none; }
  .gallery-grid img:hover { transform: none; }
}
