/* ============================================================
   Pramod Ji Mahajan CBSE School — stylesheet (v2)
   Clean, professional school design. Colors below can be
   changed in one place (:root) to re-theme the whole site.
   ============================================================ */

:root {
  --navy:      #16305F;   /* footer, dark headings */
  --blue:      #1F4DA0;   /* primary blue */
  --blue-dark: #173D82;
  --sky:       #EDF3FC;   /* light blue section background */
  --gold:      #F5A623;   /* buttons / highlights */
  --gold-dark: #D88C0C;
  --green:     #1F8A4D;   /* "open" / success */
  --ink:       #22304B;   /* heading text */
  --body:      #4B5566;   /* paragraph text */
  --line:      #DFE6F1;   /* borders */
  --white:     #FFFFFF;

  --font-head: "Poppins", "Segoe UI", sans-serif;
  --font-body: "Inter", "Segoe UI", sans-serif;

  --radius: 8px;
  --shadow: 0 8px 24px rgba(22, 48, 95, 0.10);
}

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

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--body);
  background: var(--white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--ink);
  line-height: 1.25;
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(1.9rem, 4.5vw, 3rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 600; }
p  { margin: 0 0 1em; }

.container { max-width: 1160px; margin: 0 auto; padding: 0 22px; }

svg.ic { width: 1em; height: 1em; stroke: currentColor; fill: none;
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
  vertical-align: -0.12em; }

/* ---------------- Top bar ---------------- */
.topbar {
  background: var(--navy);
  color: #C9D6EE;
  font-size: 0.82rem;
}
.topbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 7px 22px;
  max-width: 1160px;
  margin: 0 auto;
  flex-wrap: wrap;
}
.topbar a { display: inline-flex; align-items: center; gap: 6px; margin-right: 20px; }
.topbar a:hover { color: var(--white); }
.chip-open {
  background: var(--green);
  color: var(--white);
  padding: 3px 12px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.76rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

/* ---------------- Header / nav ---------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  box-shadow: 0 1px 0 var(--line);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 22px;
  gap: 16px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--blue);
  color: var(--gold);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.05rem;
  flex-shrink: 0;
  border: 2px solid var(--gold);
}
.brand-text {
  font-family: var(--font-head);
  font-weight: 600;
  color: var(--ink);
  font-size: 1.02rem;
  line-height: 1.2;
}
.brand-text small {
  display: block;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  color: var(--blue);
  text-transform: uppercase;
}
.nav-links {
  display: flex;
  gap: 4px;
  list-style: none;
  margin: 0; padding: 0;
  font-size: 0.9rem;
  font-weight: 500;
}
.nav-links a {
  display: block;
  padding: 8px 11px;
  border-radius: 6px;
  color: var(--ink);
}
.nav-links a:hover { background: var(--sky); color: var(--blue); }
.nav-links a[aria-current="page"] {
  color: var(--blue);
  background: var(--sky);
  font-weight: 600;
}
.nav-toggle {
  display: none;
  background: none;
  border: 1.5px solid var(--line);
  border-radius: 6px;
  padding: 9px 11px;
  cursor: pointer;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: "";
  display: block;
  width: 20px; height: 2px;
  background: var(--ink);
  position: relative;
  transition: 0.2s;
}
.nav-toggle span::before { position: absolute; top: -6px; }
.nav-toggle span::after  { position: absolute; top: 6px; }

@media (max-width: 992px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    gap: 0;
    padding: 6px 14px 14px;
    display: none;
    box-shadow: var(--shadow);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 13px 10px; border-bottom: 1px solid var(--line); border-radius: 0; }
  .nav-links li:last-child a { border-bottom: none; }
}

/* ---------------- Announcement bar ---------------- */
.announce {
  background: #FFF4DC;
  border-bottom: 1px solid #F3DCA8;
  color: #6B4E0A;
  font-size: 0.88rem;
}
.announce .container {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 9px;
  padding-bottom: 9px;
}
.announce .ic { color: var(--gold-dark); flex-shrink: 0; font-size: 1.05rem; }

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 26px;
  border-radius: 6px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.93rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease, color 0.15s ease;
}
.btn:focus-visible { outline: 3px solid var(--gold-dark); outline-offset: 2px; }
.btn-gold { background: var(--gold); color: var(--navy); }
.btn-gold:hover { background: var(--gold-dark); color: var(--white); transform: translateY(-1px); }
.btn-blue { background: var(--blue); color: var(--white); }
.btn-blue:hover { background: var(--blue-dark); transform: translateY(-1px); }
.btn-outline { border-color: var(--blue); color: var(--blue); background: transparent; }
.btn-outline:hover { background: var(--blue); color: var(--white); }
.btn-white-outline { border-color: rgba(255,255,255,0.7); color: var(--white); background: transparent; }
.btn-white-outline:hover { background: var(--white); color: var(--navy); }

/* ---------------- Hero (home) ---------------- */
.hero {
  background: linear-gradient(130deg, var(--navy) 0%, var(--blue) 60%, #2A63C4 100%);
  color: var(--white);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.09) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
}
.hero .container {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
  padding-top: 68px;
  padding-bottom: 76px;
}
.hero h1 { color: var(--white); }
.hero .lede { color: #D7E2F6; font-size: 1.06rem; max-width: 50ch; }
.hero-badges { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; }
.badge {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.28);
  color: var(--white);
  font-size: 0.76rem;
  font-weight: 500;
  padding: 5px 12px;
  border-radius: 999px;
  letter-spacing: 0.02em;
}
.badge.open { background: var(--green); border-color: var(--green); }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 26px; }

/* Photo frame with automatic fallback if image file is missing */
.photo-frame {
  position: relative;
  border-radius: 10px;
  background: var(--white);
  padding: 8px;
  box-shadow: var(--shadow);
}
.photo-frame::after {
  content: "";
  position: absolute;
  right: -12px; bottom: -12px;
  width: 60%; height: 60%;
  border: 3px solid var(--gold);
  border-radius: 10px;
  z-index: -1;
}
.photo { position: relative; border-radius: 6px; overflow: hidden; }
.photo img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4/3; }
.photo .img-fallback {
  display: none;
  aspect-ratio: 4/3;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 10px;
  background: linear-gradient(150deg, var(--sky), #DCE8FA);
  color: var(--blue);
  text-align: center;
  padding: 20px;
  font-size: 0.85rem;
}
.photo.no-img img { display: none; }
.photo.no-img .img-fallback { display: flex; }

@media (max-width: 900px) {
  .hero .container { grid-template-columns: 1fr; padding-top: 52px; padding-bottom: 60px; }
}

/* ---------------- Inner page hero ---------------- */
.page-hero {
  background: linear-gradient(130deg, var(--navy), var(--blue));
  color: var(--white);
  padding: 46px 0 50px;
}
.page-hero h1 { color: var(--white); margin-bottom: 6px; }
.page-hero p { color: #D7E2F6; max-width: 68ch; margin: 0; }

/* ---------------- Sections ---------------- */
.section { padding: 72px 0; }
.section-sky { background: var(--sky); }

.sec-head { text-align: center; max-width: 660px; margin: 0 auto 44px; }
.sec-head.left { text-align: left; margin-left: 0; }
.kicker {
  color: var(--blue);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 8px;
}
.sec-head h2::after {
  content: "";
  display: block;
  width: 56px; height: 4px;
  border-radius: 2px;
  background: var(--gold);
  margin: 14px auto 0;
}
.sec-head.left h2::after { margin-left: 0; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 34px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
@media (max-width: 992px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px)  { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
}
.card.hover { transition: transform 0.18s ease, box-shadow 0.18s ease; }
.card.hover:hover { transform: translateY(-4px); box-shadow: var(--shadow); }

.icon-circle {
  width: 54px; height: 54px;
  border-radius: 50%;
  background: var(--sky);
  color: var(--blue);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 16px;
}

/* ---------------- Stats strip ---------------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-top: -40px;
  position: relative;
  z-index: 5;
}
.stat {
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 4px solid var(--gold);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-align: center;
  padding: 20px 14px;
}
.stat .figure {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.45rem;
  color: var(--blue);
}
.stat .label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--body);
}
@media (max-width: 768px) { .stats { grid-template-columns: repeat(2, 1fr); } }

/* ---------------- Notices ---------------- */
.notice {
  display: flex;
  gap: 16px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 14px;
}
.notice-date {
  flex-shrink: 0;
  width: 66px;
  background: var(--sky);
  border-radius: 8px;
  text-align: center;
  padding: 10px 4px;
  color: var(--blue);
  align-self: flex-start;
}
.notice-date .d { display: block; font-family: var(--font-head); font-weight: 700; font-size: 1.4rem; line-height: 1; }
.notice-date .m { display: block; font-size: 0.68rem; font-weight: 600; letter-spacing: 0.1em; margin-top: 3px; }
.notice-date .y { display: block; font-size: 0.66rem; color: var(--body); }
.notice-body h3 { margin-bottom: 4px; font-size: 1.02rem; }
.notice-body p { margin: 0; font-size: 0.9rem; }
.notice-tag {
  display: inline-block;
  background: #FFF1D6;
  color: var(--gold-dark);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 9px;
  border-radius: 999px;
  margin-bottom: 6px;
}

/* ---------------- Tables ---------------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
th, td { text-align: left; padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: none; }
th {
  background: var(--blue);
  color: var(--white);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}
tbody tr:nth-child(even) { background: #F7FAFE; }

/* ---------------- Steps (admissions) ---------------- */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.steps li {
  position: relative;
  padding: 0 0 30px 62px;
  counter-increment: step;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0; top: 0;
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--blue);
  color: var(--white);
  font-family: var(--font-head);
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.steps li::after {
  content: "";
  position: absolute;
  left: 20px; top: 46px; bottom: 4px;
  width: 2px;
  background: var(--line);
}
.steps li:last-child { padding-bottom: 0; }
.steps li:last-child::after { display: none; }
.steps h3 { margin-bottom: 4px; }
.steps p { margin: 0; font-size: 0.94rem; }

/* ---------------- FAQ ---------------- */
.faq details {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 12px;
  overflow: hidden;
}
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 16px 20px;
  font-family: var(--font-head);
  font-weight: 600;
  color: var(--ink);
  position: relative;
  padding-right: 44px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 18px; top: 50%;
  transform: translateY(-50%);
  color: var(--blue);
  font-size: 1.3rem;
  font-weight: 500;
}
.faq details[open] summary::after { content: "–"; }
.faq details p { padding: 0 20px 16px; margin: 0; font-size: 0.93rem; }

/* ---------------- Forms ---------------- */
.form-grid { display: grid; gap: 16px; }
label {
  display: block;
  font-family: var(--font-head);
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
}
input, select, textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: 6px;
  background: var(--white);
  font-family: var(--font-body);
  font-size: 0.94rem;
  color: var(--ink);
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(31, 77, 160, 0.15);
}
.form-note {
  font-size: 0.83rem;
  background: var(--sky);
  border: 1px solid #CFDFF5;
  border-radius: 6px;
  padding: 12px 14px;
  color: #3A5580;
}

/* ---------------- Gallery ---------------- */
.gallery-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 992px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); } }
.g-item { border-radius: var(--radius); overflow: hidden; position: relative; }
.g-item img { aspect-ratio: 1; object-fit: cover; width: 100%; }
.g-item .img-fallback {
  display: none;
  aspect-ratio: 1;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 14px;
  color: var(--white);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.88rem;
}
.g-item.no-img img { display: none; }
.g-item.no-img .img-fallback { display: flex; }
.g-item figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  background: linear-gradient(transparent, rgba(15, 30, 60, 0.85));
  color: var(--white);
  font-size: 0.82rem;
  font-weight: 500;
  padding: 26px 12px 10px;
}

/* ---------------- CTA band ---------------- */
.cta-band {
  background: linear-gradient(120deg, var(--blue-dark), var(--blue));
  color: var(--white);
  border-radius: 12px;
  padding: 44px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.cta-band h2 { color: var(--white); margin: 0 0 6px; }
.cta-band p { color: #D7E2F6; margin: 0; }

/* ---------------- Footer ---------------- */
.site-footer {
  background: var(--navy);
  color: #B9C7E2;
  padding: 56px 0 26px;
  font-size: 0.9rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.3fr;
  gap: 34px;
  margin-bottom: 36px;
}
@media (max-width: 992px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px)  { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h4 {
  color: var(--white);
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 9px; }
.site-footer a:hover { color: var(--gold); }
.footer-contact li { display: flex; gap: 9px; align-items: flex-start; }
.footer-contact .ic { margin-top: 4px; flex-shrink: 0; color: var(--gold); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.14);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.8rem;
  color: #8A9AC0;
}

/* ---------------- Utility ---------------- */
.mt-0 { margin-top: 0; }
.mb-30 { margin-bottom: 30px; }
.center { text-align: center; }

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