/* ==========================================================================
   SmartSchool PUBLIC WEBSITE design system
   ==========================================================================
   Used only by /public/site/index.html. It shares nothing with
   /public/portal/portal.css — the management portal has its own, darker,
   dashboard-orientated system so the two products can never be confused.
   ========================================================================== */

:root {
  --brand: #1f4fd8;
  --brand-dark: #173da8;
  --brand-soft: #eaf0ff;
  --ink: #10131c;
  --ink-2: #3b4255;
  --muted: #6b7385;
  --line: #e6e9f0;
  --bg: #ffffff;
  --bg-soft: #f7f9fc;
  --radius: 16px;
  --shadow: 0 2px 6px rgba(16, 24, 40, .04), 0 14px 34px rgba(16, 24, 40, .07);
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --maxw: 1160px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.02em; }
h1 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); font-weight: 800; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }
.muted { color: var(--muted); }
.center { text-align: center; }

/* ------------------------------------------------------------------ header */
.site-head {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.head-inner { display: flex; align-items: center; gap: 18px; min-height: 76px; }
.crest {
  width: 46px; height: 46px; border-radius: 13px; flex: none; overflow: hidden;
  background: linear-gradient(135deg, var(--brand), #6b46e5);
  display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 17px;
}
.crest img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.brand-text { min-width: 0; }
.brand-name { font-weight: 800; font-size: 17px; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-tag { font-size: 12px; color: var(--muted); }

.nav { display: flex; gap: 2px; margin-left: auto; align-items: center; }
.nav a {
  padding: 9px 12px; border-radius: 10px; font-size: 14.5px; font-weight: 600; color: var(--ink-2);
}
.nav a:hover { background: var(--bg-soft); text-decoration: none; color: var(--ink); }
.nav a.active { color: var(--brand); background: var(--brand-soft); }
.nav-cta { display: flex; gap: 8px; margin-left: 10px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  padding: 10px 18px; border-radius: 11px; font-weight: 700; font-size: 14.5px;
  border: 1px solid var(--line); background: #fff; color: var(--ink); cursor: pointer;
}
.btn:hover { background: var(--bg-soft); text-decoration: none; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-ghost { background: transparent; border-color: #fff; color: #fff; }
.btn-ghost:hover { background: rgba(255, 255, 255, .16); }
.btn-lg { padding: 13px 24px; font-size: 15.5px; }
.burger { display: none; margin-left: auto; background: none; border: 0; font-size: 22px; cursor: pointer; }

.mobile-nav { display: none; border-top: 1px solid var(--line); background: #fff; }
.mobile-nav a { display: block; padding: 13px 22px; border-bottom: 1px solid var(--line); font-weight: 600; color: var(--ink-2); }
.mobile-nav.open { display: block; }

/* -------------------------------------------------------------------- hero */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background: linear-gradient(135deg, #10214d 0%, #1f4fd8 55%, #4f46e5 100%);
}
.hero.has-image { background-size: cover; background-position: center; }
.hero::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(8, 15, 36, .55), rgba(8, 15, 36, .78));
}
.hero-inner { position: relative; z-index: 1; padding: 92px 0 96px; max-width: 760px; }
.eyebrow { text-transform: uppercase; letter-spacing: .16em; font-size: 12.5px; font-weight: 700; opacity: .85; margin-bottom: 14px; }
.hero h1 { color: #fff; }
.hero p { font-size: 18px; opacity: .92; margin-bottom: 26px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------------------------------------------------------------- sections */
section.block { padding: 62px 0; }
section.block.alt { background: var(--bg-soft); }
.sec-head { max-width: 660px; margin-bottom: 34px; }
.sec-head.center { margin-left: auto; margin-right: auto; }
.sec-head .kicker { color: var(--brand); font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .1em; }
.sec-head p { color: var(--muted); font-size: 16.5px; }

.grid { display: grid; gap: 20px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow); height: 100%;
}
.card h3 { margin-bottom: .4em; }
.card p { color: var(--muted); font-size: 15px; margin-bottom: 0; }
.card .icon {
  width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand); font-size: 20px; margin-bottom: 14px;
}

.stat-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.stat { text-align: center; }
.stat b { display: block; font-size: 34px; font-weight: 800; letter-spacing: -.03em; color: var(--brand); }
.stat span { color: var(--muted); font-size: 14px; }

/* news / events / teachers / gallery */
.post { display: flex; flex-direction: column; overflow: hidden; padding: 0; }
.post .thumb { height: 168px; background: #eef1f8 center/cover no-repeat; }
.post .body { padding: 20px; }
.post .meta { font-size: 12.5px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.post h3 { font-size: 1.1rem; margin: 8px 0 .4em; }
.post p { color: var(--muted); font-size: 14.5px; }

.list-item {
  display: flex; gap: 18px; padding: 18px 0; border-bottom: 1px solid var(--line); align-items: flex-start;
}
.list-item:last-child { border-bottom: 0; }
.date-badge {
  min-width: 62px; text-align: center; background: var(--brand-soft); color: var(--brand-dark);
  border-radius: 12px; padding: 8px 6px; flex: none;
}
.date-badge b { display: block; font-size: 22px; font-weight: 800; line-height: 1; }
.date-badge span { font-size: 11.5px; text-transform: uppercase; font-weight: 700; letter-spacing: .06em; }

.person { text-align: center; }
.person .photo {
  width: 104px; height: 104px; border-radius: 50%; margin: 0 auto 14px; object-fit: cover;
  background: var(--brand-soft); color: var(--brand); display: grid; place-items: center;
  font-size: 30px; font-weight: 800; overflow: hidden;
}
.person .photo img { width: 100%; height: 100%; object-fit: cover; }
.person h3 { font-size: 1.05rem; margin-bottom: 2px; }
.person .role { color: var(--brand); font-weight: 600; font-size: 13.5px; }
.person .bio { color: var(--muted); font-size: 14px; margin-top: 8px; }

.gallery-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.gallery-item {
  position: relative; aspect-ratio: 1 / 1; border-radius: 14px; overflow: hidden;
  background: #eef1f8 center/cover no-repeat; display: block;
}
.gallery-item .cap {
  position: absolute; inset: auto 0 0 0; padding: 10px 12px; font-size: 12.5px; font-weight: 600;
  color: #fff; background: linear-gradient(transparent, rgba(8, 15, 36, .8));
}

.faq-item { border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 12px; background: #fff; overflow: hidden; }
.faq-q { padding: 16px 20px; font-weight: 700; cursor: pointer; display: flex; gap: 12px; align-items: center; }
.faq-q:hover { background: var(--bg-soft); }
.faq-a { padding: 0 20px 18px; color: var(--muted); display: none; }
.faq-item.open .faq-a { display: block; }
.faq-cat { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--brand); font-weight: 700; }

blockquote.testimonial {
  margin: 0; padding: 24px; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
blockquote.testimonial p { font-size: 15.5px; color: var(--ink-2); }
blockquote.testimonial footer { font-size: 13.5px; color: var(--muted); font-weight: 600; }
.stars { color: #f5a524; letter-spacing: 2px; }

/* ------------------------------------------------------------------ footer */
.site-foot { background: #0d1526; color: #c9d1e4; padding: 56px 0 26px; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 30px; }
.site-foot h4 { color: #fff; font-size: 15px; margin-bottom: 12px; }
.site-foot a { color: #c9d1e4; font-size: 14.5px; }
.site-foot a:hover { color: #fff; }
.site-foot ul { list-style: none; margin: 0; padding: 0; }
.site-foot li { margin-bottom: 7px; }
.foot-bottom { border-top: 1px solid rgba(255, 255, 255, .12); margin-top: 34px; padding-top: 18px; font-size: 13px; color: #8e99b3; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.socials { display: flex; gap: 8px; margin-top: 12px; }
.socials a {
  width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center;
  background: rgba(255, 255, 255, .08); font-size: 14px; font-weight: 700;
}
.socials a:hover { background: rgba(255, 255, 255, .18); text-decoration: none; }

/* ------------------------------------------------------------------- misc */
.banner {
  background: #fff8e6; border-bottom: 1px solid #f3dfae; color: #7a5a12;
  padding: 10px 22px; font-size: 14px; text-align: center;
}
.skeleton { background: linear-gradient(90deg, #eef1f7 25%, #e3e8f2 37%, #eef1f7 63%); background-size: 400% 100%; animation: shimmer 1.4s infinite; border-radius: 12px; }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }
.empty { text-align: center; padding: 44px 20px; color: var(--muted); }
.breadcrumb { font-size: 13px; color: var(--muted); padding: 18px 0 0; }
.page-hero { background: var(--bg-soft); border-bottom: 1px solid var(--line); padding: 44px 0 46px; }
.page-hero h1 { margin-bottom: .2em; }
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 8px 16px; font-size: 15px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.contact-card { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 18px; }
.contact-card .icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); flex: none; font-size: 18px; margin: 0; }
input.inp, textarea.inp, select.inp {
  width: 100%; border: 1px solid var(--line); border-radius: 11px; padding: 11px 13px;
  font: inherit; font-size: 15px; outline: none; background: #fff;
}
input.inp:focus, textarea.inp:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(31, 79, 216, .13); }
label.lbl { display: block; font-size: 13px; font-weight: 700; margin-bottom: 6px; color: var(--ink-2); }
.form-row { margin-bottom: 14px; }
.form-note { font-size: 13.5px; margin-top: 12px; }
.album-card { padding: 0; overflow: hidden; }
.album-card .thumb { height: 150px; background: #eef1f8 center/cover no-repeat; }

/* -------------------------------------------------------------- responsive */
@media (max-width: 980px) {
  .g4, .stat-row, .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 780px) {
  .nav, .nav-cta { display: none; }
  .burger { display: block; }
  .g2, .g3, .g4, .stat-row, .gallery-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-inner { padding: 66px 0 70px; }
  section.block { padding: 46px 0; }
  .foot-grid { grid-template-columns: 1fr; }
}
