:root {
  --green: #176b4d;
  --green-dark: #104b38;
  --gold: #c6a340;
  --page-bg: #edf2ed;
  --surface: #edf2ed;
  --surface-raised: #f4f7f3;
  --text: #24382d;
  --muted: #68796e;
  --line: rgba(44, 78, 56, .12);
  --shadow-light: #ffffff;
  --shadow-dark: #cbd5cc;
  --font-body: "Plus Jakarta Sans", "Segoe UI", sans-serif;
  --font-display: "Lora", Georgia, serif;
  --radius: 18px;
  --container: 1160px;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --page-bg: #1d2922;
  --surface: #202e26;
  --surface-raised: #26362d;
  --text: #e6eee7;
  --muted: #aab9ad;
  --line: rgba(223, 240, 226, .09);
  --shadow-light: #2d4035;
  --shadow-dark: #152019;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 94px; background: var(--page-bg); }
body {
  margin: 0;
  color: var(--text);
  background: var(--page-bg);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: color .25s ease, background-color .25s ease;
}
img { max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
[hidden] { display: none !important; }
.container { width: min(100% - 40px, var(--container)); margin: 0 auto; }

/* Header and identity */
.header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--surface) 91%, transparent);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.nav { min-height: 82px; display: flex; align-items: center; justify-content: space-between; gap: 22px; }
.brand { display: inline-flex; align-items: center; gap: 12px; min-width: 210px; }
.brand-logo {
  width: 54px; height: 54px; object-fit: contain; flex: 0 0 auto;
  padding: 3px; border-radius: 13px; background: #fff;
  box-shadow: 4px 4px 9px var(--shadow-dark), -4px -4px 9px var(--shadow-light);
}
.brand-copy { display: grid; gap: 1px; line-height: 1.35; }
.brand-copy strong { color: var(--text); font-size: 15px; font-weight: 800; letter-spacing: -.035em; }
.brand-copy small { color: var(--muted); font-size: 8px; font-weight: 800; letter-spacing: .11em; }
#menu { display: flex; align-items: center; justify-content: flex-end; gap: 2px; }
#menu a { color: var(--muted); padding: 9px 9px; border-radius: 10px; font-size: 11px; font-weight: 700; transition: color .2s, background .2s; }
#menu a:hover, #menu a:focus-visible { color: var(--green); background: var(--surface); box-shadow: inset 2px 2px 4px var(--shadow-dark), inset -2px -2px 4px var(--shadow-light); }
.nav-actions { display: flex; align-items: center; gap: 9px; flex: 0 0 auto; }
.theme-toggle, .menu-btn {
  min-height: 40px; border: 0; border-radius: 12px; cursor: pointer;
  color: var(--text); background: var(--surface); box-shadow: 4px 4px 9px var(--shadow-dark), -4px -4px 9px var(--shadow-light);
  transition: transform .2s, box-shadow .2s, background .2s;
}
.theme-toggle { display: inline-flex; align-items: center; gap: 7px; padding: 0 12px; font-size: 10px; font-weight: 800; white-space: nowrap; }
.theme-icon { color: var(--gold); font-size: 16px; line-height: 1; }
.theme-toggle:active, .menu-btn:active { box-shadow: inset 3px 3px 6px var(--shadow-dark), inset -3px -3px 6px var(--shadow-light); transform: translateY(1px); }
.menu-btn { display: none; width: 42px; font-size: 19px; }

/* Hero */
.hero { position: relative; isolation: isolate; overflow: hidden; padding: 82px 0 94px; color: #fff; background: linear-gradient(130deg, var(--green-dark), var(--green)); }
.hero::before { content: ""; position: absolute; z-index: -1; inset: 0; opacity: .18; background-image: radial-gradient(rgba(255,255,255,.42) .75px, transparent .75px); background-size: 18px 18px; mask-image: linear-gradient(90deg, #000, transparent 78%); }
.hero-orb { position: absolute; z-index: -1; border: 1px solid rgba(255,255,255,.16); border-radius: 50%; pointer-events: none; }
.hero-orb-one { width: 470px; height: 470px; right: -145px; top: -245px; box-shadow: 0 0 0 42px rgba(255,255,255,.035), 0 0 0 84px rgba(255,255,255,.025); }
.hero-orb-two { width: 260px; height: 260px; left: -175px; bottom: -190px; }
.hero-layout { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(280px, .75fr); align-items: center; gap: 70px; position: relative; z-index: 1; }
.hero-copy { max-width: 690px; }
.badge { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 18px; padding: 7px 13px; border: 1px solid rgba(255,255,255,.22); border-radius: 999px; background: rgba(255,255,255,.1); color: #f4e6b7; font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.badge::before { content: "✦"; color: #e6c76d; }
.hero h1 { max-width: 720px; margin: 0; font-family: var(--font-display); font-size: clamp(38px, 5.3vw, 64px); font-weight: 700; line-height: 1.12; letter-spacing: -.045em; text-wrap: balance; }
.tagline { max-width: 560px; margin: 20px 0 28px; color: rgba(255,255,255,.82); font-size: 14px; line-height: 1.9; }
.hero-btn { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.btn { display: inline-flex; min-height: 46px; align-items: center; justify-content: center; gap: 8px; padding: 0 20px; border: 0; border-radius: 12px; background: var(--gold); color: #21392b; font-size: 11px; font-weight: 800; box-shadow: 5px 5px 12px rgba(0,0,0,.15), -3px -3px 8px rgba(255,255,255,.09); transition: transform .2s, filter .2s; }
.btn:hover { transform: translateY(-2px); filter: brightness(1.06); }
.btn-outline { border: 1px solid rgba(255,255,255,.52); background: rgba(255,255,255,.07); color: #fff; box-shadow: none; }
.hero-note { display: flex; align-items: center; gap: 8px; margin-top: 29px; color: rgba(255,255,255,.65); font-size: 10px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
.hero-note-mark { color: #e8ca76; font-size: 16px; }
.hero-side { justify-self: center; width: min(100%, 340px); padding: 29px 25px 24px; border: 1px solid rgba(255,255,255,.22); border-radius: 28px; background: linear-gradient(145deg, rgba(255,255,255,.15), rgba(255,255,255,.055)); box-shadow: 14px 14px 28px rgba(0,0,0,.13), -6px -6px 18px rgba(255,255,255,.07); text-align: center; backdrop-filter: blur(8px); }
.hero-emblem-wrap { position: relative; display: grid; place-items: center; width: 180px; height: 180px; margin: 0 auto 18px; }
.hero-emblem-halo { position: absolute; inset: 0; border: 1px solid rgba(238,211,128,.55); border-radius: 50%; box-shadow: 0 0 0 11px rgba(255,255,255,.035), 0 0 0 22px rgba(255,255,255,.025); }
.hero-emblem { position: relative; width: 145px; height: 132px; object-fit: contain; padding: 5px; border-radius: 12px; background: #fff; box-shadow: 0 9px 20px rgba(0,0,0,.18); }
.hero-side-title { margin: 0; font-family: var(--font-display); font-size: 23px; font-weight: 700; letter-spacing: .08em; }
.hero-side-subtitle { margin: 5px 0 0; color: rgba(255,255,255,.65); font-size: 8px; font-weight: 800; letter-spacing: .15em; }
.hero-values { display: flex; justify-content: center; align-items: center; gap: 13px; margin-top: 21px; padding-top: 17px; border-top: 1px solid rgba(255,255,255,.18); color: #f1d68d; font-size: 9px; font-weight: 800; letter-spacing: .13em; }
.hero-values i { width: 4px; height: 4px; border-radius: 50%; background: #e4c66f; }

/* Floating statistics */
.stats { position: relative; z-index: 3; margin-top: -34px; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.stats-grid > div { min-width: 0; padding: 19px 12px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: 7px 7px 16px var(--shadow-dark), -7px -7px 16px var(--shadow-light); text-align: center; }
.stats-grid strong { display: block; color: var(--green); font-family: var(--font-display); font-size: 27px; font-weight: 700; line-height: 1.3; }
.stats-grid span { display: block; margin-top: 4px; color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }

/* Shared sections and typography */
.section { padding: 82px 0; scroll-margin-top: 85px; }
.section.alt { background: color-mix(in srgb, var(--surface) 72%, var(--shadow-dark) 28%); }
.section-heading { max-width: 760px; margin: 0 0 30px; }
.eyebrow, .card-kicker { display: inline-block; color: var(--gold); font-size: 9px; font-weight: 800; letter-spacing: .19em; text-transform: uppercase; }
h2 { position: relative; margin: 8px 0 0; padding-bottom: 16px; color: var(--text); font-size: clamp(26px, 3vw, 36px); font-weight: 800; letter-spacing: -.045em; line-height: 1.25; }
h2::after { content: ""; position: absolute; left: 0; bottom: 0; width: 46px; height: 3px; border-radius: 5px; background: var(--gold); }
.section-intro, .lead { max-width: 740px; margin: 14px 0 0; color: var(--muted); font-size: 13px; line-height: 1.9; }
h3 { margin: 7px 0 10px; color: var(--text); font-size: 16px; font-weight: 800; letter-spacing: -.025em; line-height: 1.45; }
p { overflow-wrap: anywhere; }
.grid { display: grid; gap: 20px; margin-top: 24px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.two.single-column { grid-template-columns: 1fr; }
.card { min-width: 0; padding: 25px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 8px 8px 18px var(--shadow-dark), -8px -8px 18px var(--shadow-light); transition: transform .22s ease, box-shadow .22s ease, background .22s ease; }
.card:hover { transform: translateY(-3px); box-shadow: 10px 10px 21px var(--shadow-dark), -10px -10px 21px var(--shadow-light); }
.card p, .card li { color: var(--muted); font-size: 12px; line-height: 1.9; }
.card.center { text-align: center; }
.card .btn { margin-top: 16px; background: var(--green); color: white; }
.card-kicker { font-size: 8px; letter-spacing: .15em; }
.profile-story { position: relative; overflow: hidden; }
.profile-story::after { content: "م"; position: absolute; right: 15px; bottom: -35px; color: var(--green); opacity: .055; font-family: var(--font-display); font-size: 130px; font-weight: 700; pointer-events: none; }
.card-icon { display: grid; width: 44px; height: 44px; place-items: center; margin-bottom: 12px; border-radius: 13px; background: var(--surface); color: var(--gold); box-shadow: inset 4px 4px 8px var(--shadow-dark), inset -4px -4px 8px var(--shadow-light); font-size: 21px; }
.vision-card { background: linear-gradient(145deg, var(--surface-raised), var(--surface)); }
ul, ol { padding-left: 20px; }
.card ul:not(.data) li, .card ol li { margin-bottom: 7px; padding-left: 3px; }
.mission-list li::marker { color: var(--gold); font-weight: 800; }
.data { list-style: none; padding: 0; margin: 10px 0 0; }
.data li { padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 11px; }
.data li:last-child { border-bottom: 0; }
.data b { color: var(--text); font-weight: 800; }
.icon { display: grid; width: 54px; height: 54px; place-items: center; margin: 0 auto 13px; border-radius: 16px; background: var(--surface); box-shadow: inset 4px 4px 8px var(--shadow-dark), inset -4px -4px 8px var(--shadow-light); font-size: 26px; }
.avatar { display: grid; width: 86px; height: 86px; place-items: center; margin: 0 auto 13px; overflow: hidden; border-radius: 50%; background: var(--surface); box-shadow: inset 4px 4px 9px var(--shadow-dark), inset -4px -4px 9px var(--shadow-light); font-size: 36px; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.card small { color: var(--gold); font-size: 10px; font-weight: 800; letter-spacing: .05em; }

/* Gallery, admissions and contact */
.gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 17px; margin-top: 24px; }
.gallery figure { min-width: 0; margin: 0; padding: 9px; border: 1px solid var(--line); border-radius: 17px; background: var(--surface); box-shadow: 7px 7px 15px var(--shadow-dark), -7px -7px 15px var(--shadow-light); }
.gallery img, .ph { display: block; width: 100%; aspect-ratio: 4/3; border-radius: 11px; object-fit: cover; }
.ph { display: grid; place-items: center; background: var(--surface-raised); color: var(--muted); font-size: 12px; }
.gallery figcaption { padding: 9px 5px 4px; color: var(--muted); font-size: 10px; font-weight: 600; }
.ppdb { background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--surface) 72%, var(--shadow-dark) 28%)); }
.ppdb-schedule { display: flex; flex-direction: column; align-items: flex-start; }
.ppdb-schedule .btn { margin-top: auto; }
.contact-card { min-height: 100%; }
.map-card { padding: 10px; overflow: hidden; }
.map-card iframe { display: block; width: 100%; min-height: 300px; border: 0; border-radius: 12px; }

/* Footer */
.footer { padding: 30px 0; background: var(--green-dark); color: rgba(255,255,255,.86); }
.footer-inner { display: flex; align-items: center; gap: 17px; }
.footer-logo { width: 54px; height: 54px; flex: 0 0 auto; padding: 3px; border-radius: 10px; background: white; object-fit: contain; }
.footer-inner strong { display: block; color: #fff; font-size: 13px; font-weight: 800; }
.footer-inner p { margin: 2px 0 3px; color: rgba(255,255,255,.67); font-size: 10px; }
.footer-inner small { color: rgba(255,255,255,.53); font-size: 9px; }
.admin-link { margin-left: auto; color: rgba(255,255,255,.7); font-size: 10px; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.noscript { padding: 18px; text-align: center; }

@media (max-width: 1080px) {
  .nav { gap: 13px; }
  .brand { min-width: 185px; }
  #menu { gap: 0; }
  #menu a { padding: 8px 6px; font-size: 10px; }
  .theme-toggle { padding: 0 10px; }
}
@media (max-width: 900px) {
  .nav { min-height: 74px; }
  .menu-btn { display: inline-grid; place-items: center; }
  #menu { display: none; position: absolute; top: calc(100% + 1px); left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 3px; padding: 13px 20px 18px; border-bottom: 1px solid var(--line); background: var(--surface); box-shadow: 0 12px 22px rgba(0,0,0,.09); }
  #menu.open { display: flex; }
  #menu a { padding: 11px 13px; font-size: 12px; }
  .hero-layout { gap: 35px; }
}
@media (max-width: 700px) {
  .container { width: min(100% - 30px, var(--container)); }
  .brand-logo { width: 48px; height: 48px; }
  .brand-copy strong { font-size: 13px; }
  .brand-copy small { max-width: 155px; font-size: 7px; }
  .theme-toggle { width: 40px; justify-content: center; padding: 0; }
  .theme-label { display: none; }
  .hero { padding: 60px 0 72px; }
  .hero-layout { grid-template-columns: 1fr; gap: 34px; }
  .hero h1 { font-size: clamp(36px, 10vw, 49px); }
  .tagline { font-size: 13px; }
  .hero-side { width: min(100%, 300px); padding: 23px 20px; }
  .hero-emblem-wrap { width: 150px; height: 150px; }
  .hero-emblem { width: 120px; height: 112px; }
  .stats { margin-top: -25px; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
  .stats-grid > div { padding: 15px 8px; }
  .stats-grid strong { font-size: 23px; }
  .section { padding: 60px 0; }
  .grid { gap: 14px; margin-top: 19px; }
  .grid.two, .grid.three { grid-template-columns: 1fr; }
  .grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .card { padding: 21px; }
}
@media (max-width: 420px) {
  .brand { gap: 8px; min-width: 0; }
  .brand-copy small { letter-spacing: .07em; }
  .nav-actions { gap: 7px; }
  .hero-btn { align-items: stretch; }
  .hero-btn .btn { flex: 1 1 100%; }
  .grid.four { grid-template-columns: 1fr; }
  .footer-inner { align-items: flex-start; flex-wrap: wrap; }
  .admin-link { margin: 5px 0 0 71px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
