/* ===== New Tagore Public School — shared stylesheet ===== */

:root {
  --navy: #0f2a4a;
  --navy-dark: #0a1d34;
  --maroon: #8c1c1c;
  --gold: #d4a017;
  --gold-light: #f2c94c;
  --cream: #fbf7ee;
  --ink: #1c2530;
  --muted: #5b6472;
  --line: #e6e0d2;
  --white: #ffffff;
  --shadow: 0 10px 30px rgba(15, 42, 74, 0.10);
  --radius: 14px;
  --maxw: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Poppins", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--white);
  line-height: 1.65;
}

h1, h2, h3, h4 {
  font-family: "Poppins", "Segoe UI", Roboto, sans-serif;
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 0.5em;
  color: var(--navy-dark);
}

p { margin: 0 0 1em; color: var(--muted); }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { margin: 0; padding: 0; }
li { list-style: none; }

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--maroon);
  background: rgba(140, 28, 28, 0.08);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 14px;
}

.section { padding: 72px 0; }
.section-tight { padding: 48px 0; }
.section-alt { background: var(--cream); }

.section-head {
  max-width: 680px;
  margin: 0 auto 44px;
  text-align: center;
}
.section-head h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.section-head p { font-size: 1.02rem; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.btn-primary { background: var(--gold); color: var(--navy-dark); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(212,160,23,0.35); }
.btn-outline { background: transparent; color: var(--white); border-color: rgba(255,255,255,0.6); }
.btn-outline:hover { background: rgba(255,255,255,0.12); }
.btn-navy { background: var(--navy); color: var(--white); }
.btn-navy:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(15,42,74,0.3); }
.btn-block { width: 100%; justify-content: center; }

/* ===== Header ===== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 24px;
  max-width: var(--maxw); margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { height: 52px; width: 52px; object-fit: contain; }
.brand-text .name { font-weight: 700; font-size: 1.05rem; color: var(--navy-dark); display: block; }
.brand-text .tagline { font-size: 0.72rem; color: var(--maroon); letter-spacing: 0.06em; text-transform: uppercase; font-weight: 600; }

.main-nav ul { display: flex; gap: 2px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.main-nav a {
  display: inline-block; white-space: nowrap;
  padding: 9px 11px; border-radius: 8px; font-weight: 600; font-size: 0.87rem; color: var(--ink);
  transition: background 0.15s ease, color 0.15s ease;
}
.main-nav a:hover, .main-nav a.active { background: var(--navy); color: var(--white); }
.main-nav .nav-cta { background: var(--maroon); color: var(--white); margin-left: 6px; }
.main-nav .nav-cta:hover { background: #6f1515; }

.nav-toggle {
  display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px;
}
.nav-toggle span { width: 24px; height: 2.5px; background: var(--navy-dark); border-radius: 2px; }

/* ===== Footer ===== */
.site-footer { background: var(--navy-dark); color: rgba(255,255,255,0.82); padding: 56px 0 24px; }
.footer-grid {
  display: grid; grid-template-columns: 1.3fr 1fr 1fr 1.1fr; gap: 36px; margin-bottom: 36px;
}
.footer-grid h4 { color: var(--white); font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 16px; }
.footer-brand { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; }
.footer-brand img { height: 46px; width: 46px; object-fit: contain; }
.footer-brand .name { color: var(--white); font-weight: 700; font-size: 1.05rem; }
.footer-col p, .footer-col a { color: rgba(255,255,255,0.72); font-size: 0.92rem; }
.footer-col li { margin-bottom: 10px; }
.footer-col a:hover { color: var(--gold-light); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12); padding-top: 20px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  font-size: 0.84rem; color: rgba(255,255,255,0.55);
}

/* ===== Hero ===== */
.hero {
  position: relative; color: var(--white); overflow: hidden;
  min-height: 78vh; display: flex; align-items: flex-end;
}
.hero img.hero-bg {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0;
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,29,52,0.35) 0%, rgba(10,29,52,0.55) 55%, rgba(10,29,52,0.92) 100%);
  z-index: 1;
}
.hero-content { position: relative; z-index: 2; padding: 64px 0 56px; width: 100%; }
.hero-content .eyebrow { background: rgba(255,255,255,0.15); color: var(--gold-light); }
.hero-content h1 { color: var(--white); font-size: clamp(2.1rem, 5vw, 3.4rem); max-width: 780px; }
.hero-content p.lead { color: rgba(255,255,255,0.88); font-size: 1.1rem; max-width: 600px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 22px; }

.page-hero {
  background: linear-gradient(120deg, var(--navy-dark), var(--navy));
  color: var(--white); padding: 64px 0 52px;
}
.page-hero h1 { color: var(--white); font-size: clamp(1.9rem, 4vw, 2.6rem); }
.page-hero p { color: rgba(255,255,255,0.82); max-width: 620px; font-size: 1.02rem; }
.page-hero .eyebrow { background: rgba(255,255,255,0.14); color: var(--gold-light); }

/* ===== Stat strip ===== */
.stat-strip {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
  background: var(--navy); color: var(--white); border-radius: var(--radius);
  padding: 34px 20px; margin-top: -64px; position: relative; z-index: 3;
  box-shadow: var(--shadow);
}
.stat-strip .stat { text-align: center; padding: 0 8px; }
.stat-strip .stat .num { font-size: clamp(1.6rem, 3vw, 2.1rem); font-weight: 800; color: var(--gold-light); }
.stat-strip .stat .label { font-size: 0.82rem; color: rgba(255,255,255,0.78); margin-top: 4px; }

/* ===== Cards / grids ===== */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: center; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }

.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow);
}
.icon-badge {
  width: 46px; height: 46px; border-radius: 12px; background: rgba(212,160,23,0.14);
  display: flex; align-items: center; justify-content: center; font-size: 1.3rem; margin-bottom: 14px;
}
.card h3 { font-size: 1.05rem; }
.card p { font-size: 0.92rem; margin-bottom: 0; }

/* Faculty */
.staff-card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); transition: transform 0.15s ease;
}
.staff-card:hover { transform: translateY(-4px); }
.staff-photo { aspect-ratio: 1/1; overflow: hidden; background: var(--cream); }
.staff-photo img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.staff-body { padding: 18px 18px 20px; }
.staff-body .role { color: var(--maroon); font-weight: 700; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 4px; }
.staff-body h3 { font-size: 1.05rem; margin-bottom: 4px; }
.staff-body .meta { font-size: 0.84rem; color: var(--muted); margin-bottom: 8px; }
.staff-body p.bio { font-size: 0.88rem; margin-bottom: 0; }

.principal-feature {
  display: grid; grid-template-columns: 260px 1fr; gap: 36px; align-items: center;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px; box-shadow: var(--shadow); margin-bottom: 44px;
}
.principal-feature .photo { border-radius: 12px; overflow: hidden; aspect-ratio: 1/1; }
.principal-feature .photo img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.principal-feature blockquote { font-style: italic; color: var(--navy-dark); border-left: 3px solid var(--gold); padding-left: 16px; margin: 14px 0; font-size: 1.02rem; }

/* Results / Toppers */
.result-badge {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  background: linear-gradient(135deg, var(--maroon), #6f1515); color: var(--white);
  border-radius: var(--radius); padding: 22px 24px; margin-bottom: 40px; text-align: center;
  box-shadow: var(--shadow);
}
.result-badge .big { font-size: 1.8rem; font-weight: 800; color: var(--gold-light); }
.result-badge .txt { font-size: 1rem; font-weight: 600; }
.topper-card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); transition: transform 0.15s ease; text-align: center;
}
.topper-card:hover { transform: translateY(-4px); }
.topper-photo { aspect-ratio: 1/1; overflow: hidden; background: var(--cream); }
.topper-photo img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.topper-body { padding: 14px 10px 18px; }
.topper-body .pct { font-size: 1.3rem; font-weight: 800; color: var(--maroon); }
.topper-body h3 { font-size: 0.92rem; margin: 2px 0 2px; }
.topper-body .roll { font-size: 0.68rem; color: var(--muted); }
.results-table { width: 100%; border-collapse: collapse; background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.results-table th { background: var(--navy); color: var(--white); text-align: left; padding: 12px 16px; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; }
.results-table td { padding: 11px 16px; border-bottom: 1px solid var(--line); font-size: 0.92rem; }
.results-table tr:last-child td { border-bottom: none; }
.results-table td.pct { font-weight: 700; color: var(--maroon); text-align: right; }
.results-table td.roll { color: var(--muted); font-size: 0.82rem; }
.result-banner-img { width: 100%; height: auto; display: block; border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 28px; }

/* Gallery */
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.gallery-grid .g-item { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 4/3; }
.gallery-grid .g-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
.gallery-grid .g-item:hover img { transform: scale(1.06); }
.gallery-grid .g-wide { grid-column: span 2; }

/* Timeline / steps */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.step { position: relative; padding: 26px 20px 20px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.step .num {
  position: absolute; top: -16px; left: 20px; width: 34px; height: 34px; border-radius: 50%;
  background: var(--maroon); color: var(--white); display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.95rem; box-shadow: 0 4px 10px rgba(140,28,28,0.35);
}
.step h3 { font-size: 1rem; margin-top: 8px; }
.step p { font-size: 0.88rem; margin-bottom: 0; }

/* Map */
.map-wrap { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--line); }
.map-wrap iframe { width: 100%; height: 380px; border: 0; display: block; }

/* Forms */
.form-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 32px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 0.86rem; font-weight: 600; margin-bottom: 6px; color: var(--navy-dark); }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px; border-radius: 9px; border: 1.5px solid var(--line);
  font-family: inherit; font-size: 0.94rem; background: var(--cream); color: var(--ink);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--gold); background: var(--white);
}
.field textarea { resize: vertical; min-height: 100px; }
.form-note { font-size: 0.82rem; color: var(--muted); margin-top: 10px; }
.form-status { margin-top: 14px; font-size: 0.92rem; font-weight: 600; display: none; padding: 12px 14px; border-radius: 9px; }
.form-status.show { display: block; }
.form-status.ok { background: rgba(46,125,50,0.12); color: #2e7d32; }
.form-status.err { background: rgba(198,40,40,0.1); color: #c62828; }

/* Info list */
.info-list li { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 18px; }
.info-list .ic { width: 40px; height: 40px; border-radius: 10px; background: rgba(15,42,74,0.08); display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 1.1rem; }
.info-list .txt strong { display: block; color: var(--navy-dark); font-size: 0.94rem; }
.info-list .txt span, .info-list .txt a { font-size: 0.9rem; color: var(--muted); }

/* Alumni strip */
.alumni-strip { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.alumni-chip {
  background: var(--white); border: 1.5px solid var(--gold); color: var(--navy-dark);
  padding: 10px 20px; border-radius: 999px; font-weight: 700; font-size: 0.92rem;
}

/* CTA band */
.cta-band {
  background: linear-gradient(120deg, var(--maroon), #6f1515);
  color: var(--white); border-radius: var(--radius); padding: 46px; text-align: center; box-shadow: var(--shadow);
}
.cta-band h2 { color: var(--white); }
.cta-band p { color: rgba(255,255,255,0.85); max-width: 560px; margin: 0 auto 20px; }

/* Utility */
.mt-0 { margin-top: 0; }
.text-center { text-align: center; }
.tag-row { display: flex; gap: 10px; flex-wrap: wrap; }
.tag { background: rgba(15,42,74,0.08); color: var(--navy); font-size: 0.78rem; font-weight: 700; padding: 6px 12px; border-radius: 999px; }

/* ===== Responsive ===== */
@media (max-width: 980px) {
  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .stat-strip { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .principal-feature { grid-template-columns: 1fr; }
  .principal-feature .photo { max-width: 220px; margin: 0 auto; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid .g-wide { grid-column: span 2; }
}

@media (max-width: 720px) {
  .main-nav { position: fixed; top: 76px; left: 0; right: 0; background: var(--white); border-bottom: 1px solid var(--line);
    box-shadow: 0 12px 20px rgba(0,0,0,0.08); transform: translateY(-130%); opacity: 0; transition: transform 0.2s ease, opacity 0.2s ease; }
  .main-nav.open { transform: translateY(0); opacity: 1; }
  .main-nav ul { flex-direction: column; align-items: stretch; padding: 14px; gap: 4px; }
  .main-nav .nav-cta { display: block; margin-left: 0; margin-top: 4px; text-align: center; }
  .nav-toggle { display: flex; }
  .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .stat-strip { grid-template-columns: repeat(2, 1fr); margin-top: -40px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .form-row { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr; }
  .gallery-grid .g-wide { grid-column: span 1; }
  .hero { min-height: 62vh; }
}

/* Policy pages: numbered lists */
.container ol { margin: 0 0 1.4em; padding-left: 1.6em; }
.container ol > li { list-style: decimal; margin-bottom: 0.7em; padding-left: 0.3em; }

/* Clearly visible hyperlinks in body text and notes */
.form-note a, .section .container p a:not(.btn), .section .container li a:not(.btn) {
  color: var(--maroon);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 500;
}
.form-note a:hover, .section .container p a:not(.btn):hover, .section .container li a:not(.btn):hover { color: var(--navy); }


/* Header: no wrapping of the school name/tagline; tighter nav on tablets */
.brand-text .name, .brand-text .tagline { white-space: nowrap; }
.brand { flex-shrink: 0; }
@media (max-width: 1100px) and (min-width: 721px) {
  .brand-text .name { font-size: 0.98rem; }
  .brand-text .tagline { font-size: 0.64rem; letter-spacing: 0.04em; }
  .main-nav a { padding: 8px 7px; font-size: 0.8rem; }
  .main-nav .nav-cta { margin-left: 2px; }
  .header-inner { padding: 10px 16px; }
}
@media (max-width: 720px) {
  .brand { gap: 10px; }
  .brand img { height: 44px; width: 44px; }
  .brand-text .name { font-size: 0.98rem; }
  .brand-text .tagline { font-size: 0.58rem; letter-spacing: 0.02em; }
  .header-inner { padding: 10px 14px; }
  .main-nav { top: 65px; }
}
@media (max-width: 380px) {
  .brand-text .tagline { font-size: 0.54rem; }
}


/* Top bar with Pay Fees button (inside the sticky header) */
.topbar { background: var(--navy-dark); color: var(--white); }
.topbar-inner { max-width: var(--maxw); margin: 0 auto; padding: 5px 24px; display: flex; justify-content: flex-end; align-items: center; gap: 18px; font-size: 0.82rem; }
.topbar-phone { color: rgba(255,255,255,0.85); font-weight: 500; }
.topbar-phone:hover { color: var(--gold-light); }
.topbar-pay { background: var(--gold); color: var(--navy-dark); font-weight: 700; padding: 5px 14px; border-radius: 999px; white-space: nowrap; transition: transform 0.15s ease; }
.topbar-pay:hover { transform: translateY(-1px); }
@media (max-width: 720px) {
  .topbar-inner { padding: 5px 14px; justify-content: space-between; font-size: 0.78rem; }
  .main-nav { top: 103px; }
}


/* Hero: clear the stat strip and add a Pay Fees button */
.btn-light { background: var(--white); color: var(--navy-dark); }
.btn-light:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(255,255,255,0.25); }
.hero-content { padding-bottom: 112px; }
@media (max-width: 720px) {
  .hero-content { padding-bottom: 80px; }
}


/* Online payment switch: everything marked .pay-only is hidden until PAYMENT_URL is set in js/main.js */
html:not(.pay-on) .pay-only { display: none !important; }
.pay-off-note { display: none; }
html:not(.pay-on) .pay-off-note { display: block; }
