/* مدارس التميز الأهلية —حجر دافئ، وزيتوني داكن، وطوبي نجدي (٦٠-٣٠-١٠)، بخط Beiruti */
:root {
  --bg: #fcfaf6;
  --paper: #ffffff;
  --stone: #f4eee4;
  --line: #e8dfd1;
  --ink: #221d19;
  --ink-2: #554c44;
  --ink-3: #6f655b;
  --brick: #b8472a;
  --brick-deep: #963720;
  --brick-50: #f8e9e2;
  --olive: #2f4a2c;
  --olive-2: #4d6b39;
  --olive-50: #ebf0e2;
  --sun: #f2b52f;
  --sky: #e2edf1;
  --sh-1: 0 1px 2px rgb(60 40 20 / .05), 0 4px 14px -4px rgb(60 40 20 / .08);
  --sh-2: 0 2px 4px rgb(60 40 20 / .05), 0 22px 44px -18px rgb(60 40 20 / .22);
  --r: 22px;
  --gut: 16px;
  --max: 1180px;
  --head: 64px;
  --ease: cubic-bezier(.16, 1, .3, 1);
}
@media (min-width: 900px) { :root { --gut: 40px; --head: 72px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--head) + 12px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: 'Beiruti', system-ui, sans-serif; font-size: 18px; line-height: 1.6; font-weight: 400;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: clip;
  word-spacing: .1em;   /* Beiruti's own space is narrow: «احجز زيارة» read as one word */
}
img { display: block; max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
h1, h2, h3, h4, p, ul, dl, dd, figure { margin: 0; }
ul { padding: 0; list-style: none; }
iconify-icon { display: inline-block; width: 1em; height: 1em; flex: none; }
:focus-visible { outline: 3px solid var(--brick); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; inset-inline-start: 8px; top: -60px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px; }
.skip:focus { top: 8px; }
.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gut); }

/* entrance: hidden until GSAP sets the starting states (preload is lifted at 3.5s at the latest) */
.preload .hero-arch, .preload .hero .ground, .preload .hero .lockup,
.preload .hero .hero-facts, .preload .hero .ctas, .preload .top-in { visibility: hidden; }

/* ── buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 22px; border-radius: 999px; border: 0;
  font-size: 17px; font-weight: 700; text-decoration: none; white-space: nowrap;
  transition: background-color .2s, color .2s, box-shadow .2s, border-color .2s;
  -webkit-tap-highlight-color: transparent;
}
.btn iconify-icon { font-size: 20px; }
.btn, .seg span, .chip span, .tabs button, .menu a, summary { word-spacing: .22em; }
.btn-sm { min-height: 44px; padding: 0 18px; font-size: 16px; }
.btn-brick { background: var(--brick); color: #fff; box-shadow: 0 8px 20px -10px rgb(184 71 42 / .7); }
.btn-brick:hover { background: var(--brick-deep); }
.btn-line { background: var(--paper); color: var(--ink); box-shadow: inset 0 0 0 1.5px #d8ccb9; }
.btn-line:hover { box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn-wide { width: 100%; }
.btn:active { opacity: .88; }
.link-btn { background: none; border: 0; color: var(--brick); font-weight: 700; padding: 10px 4px; text-decoration: underline; text-underline-offset: 4px; }

/* ── header: the emblem and today's date, transparent over the hero, then solid ── */
.top { position: fixed; inset: 0 0 auto 0; z-index: 50; transition: background-color .3s, box-shadow .3s; }
.top.solid { transition: none; }   /* solid from the first pixel of scroll: nothing shows through while it would fade in */
.top.solid { background: rgb(252 250 246 / .92); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: 0 1px 0 var(--line); }
.top-in { height: var(--head); max-width: var(--max); margin-inline: auto; padding-inline: var(--gut); display: flex; align-items: center; gap: 12px; }
.crest { display: grid; place-items: center; width: 44px; height: 48px; flex: none; }
.crest svg { width: 38px; height: 44px; }
.today { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; transition: opacity .3s, transform .3s; }
.top-id { display: grid; margin-inline-end: auto; min-width: 0; }
.top-id > * { grid-area: 1 / 1; align-self: center; }
.top-name { font-size: 19px; font-weight: 800; white-space: nowrap; opacity: 0; transform: translateY(6px); transition: opacity .3s, transform .3s; pointer-events: none; }
.top.past .top-name { opacity: 1; transform: none; }
.top.past .today { opacity: 0; transform: translateY(-6px); }
.today span:first-child { font-size: 15px; font-weight: 700; white-space: nowrap; }
.today span:last-child { font-size: 13px; color: var(--ink-3); white-space: nowrap; }
.nav { display: none; }
.top-apply { display: none; }
/* desktop: the header's own «قدّم طلب القبول» waits until the hero, which has the same button, has been scrolled past */
.top-apply { transition: opacity .3s, visibility .3s; }
.top:not(.past) .top-apply { opacity: 0; visibility: hidden; }
.menu-btn {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px;
  border-radius: 999px; border: 0; background: var(--paper); box-shadow: inset 0 0 0 1.5px #ddd2c1;
  font-size: 15px; font-weight: 700; -webkit-tap-highlight-color: transparent;
}
.menu-btn svg { width: 20px; height: 20px; flex: none; }
.menu { position: absolute; inset: calc(var(--head) - 4px) var(--gut) auto var(--gut); background: var(--paper); border-radius: 20px; box-shadow: var(--sh-2); padding: 8px; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.menu[hidden] { display: none; }
.menu a { display: flex; align-items: center; gap: 8px; min-height: 52px; padding: 0 12px; border-radius: 14px; text-decoration: none; font-weight: 700; font-size: 16px; }
.menu a:active, .menu a:hover { background: var(--stone); }
@media (max-width: 359px) { .today span:first-child { font-size: 14px; } .menu-btn span { display: none; } .menu-btn { padding: 0 12px; } }
@media (min-width: 1024px) {
  .menu-btn, .menu { display: none !important; }
  .nav { display: flex; gap: 2px; }
  .nav a { padding: 8px 12px; border-radius: 999px; text-decoration: none; font-weight: 500; font-size: 16px; color: var(--ink-2); }
  .nav a:hover { background: rgb(34 29 25 / .06); color: var(--ink); }
  .top-apply { display: inline-flex; }
  .top-id { margin-inline-end: 12px; }
  .nav { margin-inline-end: auto; }
}

/* ── hero: the campus photograph standing inside the emblem's arched door, on one ground line,
      with the school's name, its two facts and its two requests beside it (desktop) or under it (phone) ── */
.hero { position: relative; background: var(--bg); color: var(--ink); }
.hero-in {
  width: 100%; max-width: 1280px; margin-inline: auto; min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column;
  padding: calc(var(--head) + 6px) var(--gut) calc(84px + env(safe-area-inset-bottom));
}
/* the arch: a half-circle top exactly like the door of the emblem, square at the ground */
.hero-arch {
  position: relative; flex: 1 1 auto; min-height: 200px; max-height: 560px;
  border-radius: 999px 999px 0 0; overflow: hidden; isolation: isolate; background: #d9ccb6;
  -webkit-mask-image: -webkit-radial-gradient(white, black);   /* Safari: keep the round top while the photo moves inside */
}
.hero-media { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.hero-media picture { position: absolute; inset: -6% 0; }
.hero-img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 58%; }
/* a warm shade at the foot of the door, only under the admission line */
.hero-media::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(to top, rgb(24 17 11 / .5) 0%, rgb(24 17 11 / .18) 18%, rgb(24 17 11 / 0) 32%); }
.status {
  position: absolute; inset-inline: 0; bottom: 16px; margin-inline: auto; width: max-content; max-width: calc(100% - 24px);
  display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; color: #fff; white-space: nowrap;
  background: rgb(34 29 25 / .5); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  padding: 6px 14px 6px 12px; border-radius: 999px; box-shadow: inset 0 0 0 1px rgb(255 255 255 / .22);
}
/* the ground line the door stands on, as in the emblem; it runs to both edges of the screen */
.ground { display: block; height: 1.5px; margin-inline: calc(var(--gut) * -1); background: #d9ccb8; transform-origin: 50% 50%; }
.hero-text { padding-top: 18px; }
/* the name as one lockup: the emblem, a hairline, then «مدارس التميز» over «الأهلية» */
.lockup { display: flex; align-items: center; gap: 14px; font-weight: 800; }
.lock-emblem { width: 50px; height: 58px; flex: none; }
.lock-rule { align-self: stretch; width: 1.5px; flex: none; background: #d9ccb8; transform-origin: 50% 0; }
.lock-name { display: grid; line-height: 1.06; }
.l1 { font-size: clamp(36px, 12vw, 58px); letter-spacing: -.005em; color: var(--ink); }
.l2 { font-size: clamp(22px, 6.4vw, 31px); font-weight: 500; color: var(--brick); margin-top: 2px; }
.lock-name .w-mask { padding: .06em 0 .24em; margin: -.06em 0 -.24em; }   /* the word masks leave room for the descenders */
/* the two facts, set apart: the span of grades as a range (the two ends heavy, the joining words light),
   and «للبنين والبنات» under it as a small olive tag */
.hero-facts { display: grid; justify-items: start; gap: 8px; margin-top: 14px; }
.range { font-size: 21px; line-height: 1.35; font-weight: 400; color: var(--ink-3); word-spacing: .12em; }
.range b { font-weight: 800; color: var(--ink); }
.hero-tag {
  display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; line-height: 1;
  color: var(--olive); background: var(--olive-50); padding: 8px 14px 8px 12px; border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgb(47 74 44 / .14);
}
.hero-tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--sun); flex: none; }
.ctas { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.ctas .btn { flex: 1 1 auto; }
@media (max-width: 359px) {
  .lockup { gap: 10px; } .lock-emblem { width: 42px; height: 49px; }
  .range { font-size: 18px; } .hero-tag { font-size: 14px; padding: 7px 12px 7px 10px; }
  .ctas { margin-top: 14px; } .ctas .btn { padding: 0 14px; font-size: 16px; min-height: 50px; }
  .hero-in { padding-bottom: calc(80px + env(safe-area-inset-bottom)); }
}
@media (max-width: 639px) and (max-height: 700px) {
  .status { font-size: 14px; bottom: 12px; } .hero-text { padding-top: 14px; }
  .hero-facts { margin-top: 10px; gap: 6px; } .ctas { margin-top: 14px; }
}
@media (min-width: 640px) { .ctas .btn { flex: 0 0 auto; } }
/* desktop: the words on the right (start), the door on the left, both standing on the one ground line */
@media (min-width: 1024px) {
  .hero-in {
    min-height: max(640px, min(100vh, 1000px));
    display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "text arch" "ground ground";
    column-gap: clamp(48px, 5vw, 88px); align-content: end;
    padding-top: calc(var(--head) + 28px); padding-bottom: 88px;
  }
  .hero-arch { grid-area: arch; flex: none; max-height: none; min-height: 0; height: clamp(460px, calc(100vh - var(--head) - 116px), 820px); aspect-ratio: .74; }
  .ground { grid-area: ground; margin-inline: 0; }
  .hero-text { grid-area: text; align-self: center; padding: 0 0 24px; }
  .status { bottom: 22px; font-size: 16px; }
  .lockup { gap: 22px; }
  .lock-emblem { width: 92px; height: 107px; }
  .lock-rule { width: 2px; }
  .l1 { font-size: clamp(64px, 6.2vw, 102px); }
  .l2 { font-size: clamp(34px, 3.2vw, 52px); margin-top: 4px; }
  .hero-facts { margin-top: 26px; gap: 12px; }
  .range { font-size: 30px; }
  .hero-tag { font-size: 17px; padding: 9px 16px 9px 14px; }
  .ctas { margin-top: 30px; gap: 12px; }
}
/* the header crest steps aside while the hero's own emblem is on screen */
.crest { transition: opacity .3s; }
.top:not(.past) .crest { opacity: 0; visibility: hidden; }

/* ── sections ── */
.sec { padding: 52px 0; }
.vision { padding-bottom: 40px; }
.stages { padding-top: 40px; }   /* phones: the stage tabs arrive soon after the pledges */
@media (min-width: 900px) { .sec, .vision, .stages { padding: 104px 0; } }
.eyebrow { font-size: 15px; font-weight: 700; color: var(--brick); margin-bottom: 8px; }
.h2 { font-size: clamp(30px, 7.6vw, 54px); line-height: 1.18; font-weight: 800; letter-spacing: -.005em; max-width: 22ch; text-wrap: balance; }
.h3 { font-size: 22px; font-weight: 800; line-height: 1.3; }
.card { background: var(--paper); border-radius: var(--r); box-shadow: var(--sh-1), inset 0 0 0 1px var(--line); }

/* about: three plain lines, the fact in bold at the start of each */
.vision .h2 { max-width: 20ch; }
.pledges { margin-top: 22px; display: grid; max-width: 760px; }
.pledge { font-size: 19px; line-height: 1.55; color: var(--ink-2); padding: 14px 0; border-top: 1px solid var(--line); text-wrap: pretty; }
.pledge:last-child { border-bottom: 1px solid var(--line); }
.pledge b { color: var(--ink); font-weight: 800; }
@media (min-width: 900px) { .pledges { margin-top: 40px; } .pledge { font-size: 22px; padding: 18px 0; } }

/* stages */
.stages { background: var(--stone); }
.tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin: 24px 0 0; padding: 5px; background: var(--paper); border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line); max-width: 640px; }
.tabs button { min-height: 46px; border: 0; border-radius: 999px; background: none; font-size: 16px; font-weight: 700; color: var(--ink-2); padding: 0 4px; -webkit-tap-highlight-color: transparent; transition: background-color .25s, color .25s; }
.tabs button[aria-selected="true"] { background: var(--olive); color: #fff; }
@media (max-width: 359px) { .tabs button { font-size: 15px; } }
.panel { margin-top: 18px; background: var(--paper); border-radius: 26px; box-shadow: var(--sh-2), inset 0 0 0 1px var(--line); overflow: hidden; display: grid; }
.panel-img { background: #f6e3d6; aspect-ratio: 4 / 3; overflow: hidden; }
.panel-img img { width: 100%; height: 100%; object-fit: cover; }
.panel-body { padding: 22px 20px 22px; }
.panel-body h3 { font-size: 30px; font-weight: 800; line-height: 1.2; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.facts div { background: var(--stone); border-radius: 14px; padding: 10px 14px; }
.facts dt { font-size: 14px; color: var(--ink-3); font-weight: 500; }
.facts dd { font-size: 17px; font-weight: 700; line-height: 1.4; }
#stHours { white-space: nowrap; }
@media (max-width: 359px) { .facts { grid-template-columns: 1fr; } }
.progs { margin-top: 16px; display: grid; gap: 12px; }
.progs li { display: grid; grid-template-columns: 40px 1fr; gap: 12px; align-items: center; min-height: 40px; }
.progs .pi { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--brick-50); color: var(--brick); font-size: 22px; }
.progs strong { display: block; font-size: 18px; line-height: 1.35; }
.progs span { display: block; font-size: 16px; color: var(--ink-2); line-height: 1.5; }
.seats { margin-top: 18px; padding-top: 16px; border-top: 1px dashed #dccfbd; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.seats p { font-size: 16px; color: var(--ink-2); }
.seats strong { font-size: 24px; color: var(--olive); }
@media (min-width: 900px) {
  .panel { grid-template-columns: 1fr 1.05fr; min-height: 520px; }
  .panel-img { aspect-ratio: auto; }

  .panel-body { padding: 36px 40px; align-self: center; }
  .panel-body h3 { font-size: 38px; }
}

/* news: the national days rail, then the latest news */
.days-rail { display: grid; grid-auto-flow: column; grid-auto-columns: min(78vw, 300px); gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 26px var(--gut) 8px; scroll-padding-inline: var(--gut); scrollbar-width: none; overscroll-behavior-x: contain; }
.days-rail::-webkit-scrollbar { display: none; }
.day { scroll-snap-align: start; background: var(--paper); border-radius: var(--r); padding: 18px 18px 20px; box-shadow: var(--sh-1), inset 0 0 0 1px var(--line); display: flex; flex-direction: column; }
.day.next { box-shadow: var(--sh-2), inset 0 0 0 2px var(--brick); }
.day-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.day-ico { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-size: 24px; color: #fff; background: var(--c); }
.day-state { font-size: 14px; font-weight: 700; padding: 4px 12px; border-radius: 999px; background: var(--stone); color: var(--ink-3); }
.day.next .day-state { background: var(--brick); color: #fff; }
.day h3 { font-size: 22px; font-weight: 800; line-height: 1.3; }
.day .hijri { font-size: 17px; font-weight: 700; margin-top: 6px; color: var(--olive); }
.day .greg { font-size: 15px; color: var(--ink-3); }
.day .what { font-size: 16px; color: var(--ink-2); margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); line-height: 1.55; }
@media (min-width: 1024px) {
  .days-rail { max-width: var(--max); margin-inline: auto; grid-auto-flow: row; grid-template-columns: repeat(4, 1fr); overflow: visible; padding: 40px var(--gut) 8px; }
}
.news .h3 { margin-top: 44px; }
.posts { display: grid; gap: 14px; margin-top: 16px; }
.post { background: var(--paper); border-radius: var(--r); padding: 20px; box-shadow: var(--sh-1), inset 0 0 0 1px var(--line); }
.post-lead { padding: 0; overflow: hidden; }
.post-lead img { aspect-ratio: 16 / 9; width: 100%; object-fit: cover; object-position: 50% 50%; background: var(--stone); }
.post-lead > div { padding: 18px 20px 22px; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; font-size: 15px; color: var(--ink-3); }
.tag { font-size: 14px; font-weight: 700; padding: 2px 10px; border-radius: 8px; }
.tag-brick { background: var(--brick-50); color: var(--brick-deep); }
.tag-olive { background: var(--olive-50); color: var(--olive); }
.tag-sand { background: #f3e6cf; color: #7a5520; }
.post h4 { font-size: 21px; font-weight: 800; line-height: 1.35; margin-top: 8px; }
.post p:last-child { font-size: 16px; color: var(--ink-2); margin-top: 6px; }
@media (min-width: 900px) {
  .posts { grid-template-columns: 1fr 1fr; }
  .post-lead { grid-column: 1 / -1; display: grid; grid-template-columns: 1.1fr 1fr; align-items: center; }
  .post-lead img { aspect-ratio: 16 / 10; height: 100%; }
  .post-lead h4 { font-size: 28px; }
  .post { padding: 26px; }
  .post-lead { padding: 0; }
  .post-lead > div { padding: 22px 26px 26px; }
}

/* numbers */
.numbers { background: var(--olive); color: #fff; position: relative; overflow: hidden; }
.numbers .eyebrow { color: var(--sun); }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 16px; margin-top: 32px; position: relative; }
.stat { border-top: 1px solid rgb(255 255 255 / .2); padding-top: 14px; }
.stat .big { font-size: clamp(46px, 13vw, 76px); font-weight: 800; line-height: 1; display: flex; align-items: baseline; gap: 2px; }
.stat .big small { font-size: .55em; color: var(--sun); }
.stat p:last-child { font-size: 16px; color: rgb(255 255 255 / .82); margin-top: 8px; line-height: 1.5; }
@media (min-width: 900px) { .stats { grid-template-columns: repeat(4, 1fr); gap: 32px; margin-top: 48px; } }

/* facilities */
.shots { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 28px; }
.shot { position: relative; border: 0; padding: 0; border-radius: 20px; overflow: hidden; background: var(--stone); aspect-ratio: 1 / 1; text-align: start; -webkit-tap-highlight-color: transparent; }
.shot img { width: 100%; height: 100%; object-fit: cover; }
.shot-a, .shot-d { grid-column: 1 / -1; aspect-ratio: 16 / 10; }
.shot-a img { object-position: 50% 50%; }
.shot::after { content: ""; position: absolute; inset: 45% 0 0 0; background: linear-gradient(transparent, rgb(25 20 16 / .7)); pointer-events: none; }
.cap { position: absolute; z-index: 1; inset: auto 0 0 auto; max-width: calc(100% - 96px); padding: 0 14px 12px; color: #fff; font-size: 14px; line-height: 1.45; }
.cap strong { display: block; font-size: 18px; font-weight: 800; }
@media (max-width: 899px) { .shot:not(.shot-a):not(.shot-d) .cap-d { display: none; } }
@media (min-width: 900px) {
  .shots { grid-template-columns: 1.4fr 1fr 1fr; grid-template-rows: 280px 280px; gap: 16px; margin-top: 44px; }
  .shot { aspect-ratio: auto; }
  .shot-a { grid-column: 1; grid-row: 1 / 3; aspect-ratio: auto; }
  .shot-d { grid-column: 2 / 4; aspect-ratio: auto; }
  .cap { padding: 0 18px 16px; font-size: 15px; max-width: none; }
}
@media (hover: hover) { .shot img { transition: transform .6s var(--ease); } .shot:hover img { transform: scale(1.04); } .shot-a:hover img { transform: scale(1.04); } }

/* parents */
.parents { background: var(--stone); }
.parents-grid { display: grid; gap: 16px; margin-top: 28px; }
.book { padding: 20px; }
.book-t { font-size: 24px; font-weight: 800; line-height: 1.3; margin-bottom: 16px; }
.seg i { font-style: normal; }
#bookSec, #aSec { margin-bottom: 0; }
.book fieldset + .field { margin-top: -4px; }
.book .field select, .book .field input { background: var(--paper); }
fieldset { border: 0; padding: 0; margin: 0 0 18px; min-width: 0; }
legend { font-size: 15px; font-weight: 700; color: var(--ink-3); margin-bottom: 8px; padding: 0; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; padding: 4px; background: var(--stone); border-radius: 16px; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; }
.seg span { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 48px; border-radius: 12px; font-weight: 700; font-size: 16px; color: var(--ink-2); transition: background-color .2s, color .2s; text-align: center; padding: 0 6px; }
.seg span iconify-icon { font-size: 20px; }
.seg input:checked + span { background: var(--paper); color: var(--ink); box-shadow: var(--sh-1); }
.seg input:focus-visible + span { outline: 3px solid var(--brick); outline-offset: 2px; }
/* three people to meet: on phones the icon sits above the name so each name keeps one line where it can */
@media (max-width: 599px) { #bookWho span { flex-direction: column; gap: 2px; min-height: 64px; padding: 8px 4px; line-height: 1.3; font-size: 15px; } }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; margin: 0; }
.chip span { display: flex; flex-direction: column; justify-content: center; min-height: 48px; padding: 6px 14px; border-radius: 14px; background: var(--paper); box-shadow: inset 0 0 0 1.5px #dfd3c2; font-size: 16px; font-weight: 700; line-height: 1.25; text-align: center; transition: background-color .2s, color .2s, box-shadow .2s; }
.chip span small { font-size: 13px; font-weight: 500; color: var(--ink-3); }
.chip input:checked + span { background: var(--olive); color: #fff; box-shadow: none; }
.chip input:checked + span small { color: rgb(255 255 255 / .82); }
.chip input:disabled + span { background: repeating-linear-gradient(-45deg, var(--stone) 0 6px, #ece4d7 6px 12px); color: var(--ink-3); box-shadow: none; }
.chip input:disabled + span small { color: var(--ink-2); font-size: 14px; font-weight: 500; }
.chip input:focus-visible + span { outline: 3px solid var(--brick); outline-offset: 2px; }
.chips { display: grid; grid-template-columns: repeat(3, 1fr); }
@media (min-width: 900px) { .chips { grid-template-columns: repeat(5, 1fr); } #visitDays { grid-template-columns: repeat(2, 1fr); } }
.chip span small { font-size: 14px; }
/* 320: the day chips get two columns so the Hijri date stays on two lines, and the two-word choice stays on one */
@media (max-width: 359px) { #bookDays, #visitDays { grid-template-columns: repeat(2, 1fr); } .seg span { font-size: 15px; gap: 4px; padding: 0 4px; } .seg span iconify-icon { display: none; } #bookWho span iconify-icon { display: block; } }
.err { color: #a3261b; font-size: 15px; font-weight: 700; min-height: 0; }
.err:not(:empty) { margin: -6px 0 12px; }
.done { text-align: center; padding: 18px 6px 8px; }
.done-ico { display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--olive-50); color: #3f8a46; font-size: 40px; }
.done h3 { font-size: 26px; font-weight: 800; margin-top: 10px; }
.done p { color: var(--ink-2); font-size: 17px; margin-top: 6px; }
.faq .h3 { margin-bottom: 10px; }
details { background: var(--paper); border-radius: 18px; box-shadow: inset 0 0 0 1px var(--line); margin-bottom: 10px; }
summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 58px; padding: 12px 18px; font-weight: 700; font-size: 17px; cursor: pointer; -webkit-tap-highlight-color: transparent; }
summary::-webkit-details-marker { display: none; }
summary::after { content: ""; width: 10px; height: 10px; flex: none; border-inline-start: 2px solid var(--brick); border-bottom: 2px solid var(--brick); transform: rotate(-45deg) translateY(-3px); transition: transform .3s var(--ease); }
details[open] summary::after { transform: rotate(135deg) translateY(-3px); }
details p { padding: 0 18px 16px; color: var(--ink-2); font-size: 16px; }
@media (min-width: 900px) { .parents-grid { grid-template-columns: 1.1fr 1fr; gap: 28px; margin-top: 44px; align-items: start; } .book { padding: 28px; } }

/* contact */
.contact-grid { display: grid; gap: 28px; }
.hours { margin-top: 22px; display: grid; gap: 14px; }
.hours li { display: grid; grid-template-columns: 44px 1fr; gap: 12px; align-items: start; font-size: 16px; color: var(--ink-2); line-height: 1.5; }
.hours iconify-icon { width: 44px; height: 44px; border-radius: 14px; background: var(--olive-50); color: var(--olive); display: grid; place-items: center; font-size: 22px; }
.hours strong { display: block; color: var(--ink); font-size: 17px; }
.contact .ctas { margin-top: 24px; }
.hours .tel { font-size: 17px; font-weight: 700; color: var(--ink); }
.map { border-radius: 24px; overflow: hidden; box-shadow: var(--sh-2), inset 0 0 0 1px var(--line); background: #efe7da; }
.map svg { display: block; width: 100%; height: auto; }
.map figcaption { display: flex; flex-wrap: wrap; gap: 8px 16px; padding: 12px 16px; background: var(--paper); font-size: 14px; color: var(--ink-3); }
.map figcaption span { display: inline-flex; align-items: center; gap: 6px; }
.key { width: 12px; height: 12px; border-radius: 4px; display: inline-block; }
.key-school { background: #f4dfd5; box-shadow: inset 0 0 0 2px var(--brick); }
.key-park { background: #cfdcb4; }
.key-mosque { background: #d9c7a6; border-radius: 50%; }
@media (min-width: 900px) { .contact-grid { grid-template-columns: 1fr minmax(0, 460px); gap: 56px; align-items: center; } }

/* the course */

.foot { background: var(--ink); color: rgb(255 255 255 / .72); padding: 0 0 96px; }
.foot-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; border-top: 1px solid rgb(255 255 255 / .12); padding-top: 22px; font-size: 15px; }
.foot-in p { display: flex; align-items: center; gap: 10px; }
.foot-in svg { width: 26px; height: 30px; }
.foot-in a { display: inline-flex; align-items: center; gap: 8px; color: #fff; font-weight: 700; text-decoration: none; min-height: 44px; padding: 0 16px; border-radius: 999px; box-shadow: inset 0 0 0 1px rgb(255 255 255 / .3); }
.foot-in a:hover { background: rgb(255 255 255 / .08); }

/* ── the request sheet (bottom sheet on phones, a card on desktop) ── */
dialog { border: 0; padding: 0; color: var(--ink); }
dialog::backdrop { background: rgb(25 20 16 / .5); }
.sheet { width: 100%; max-width: 100%; margin: auto 0 0; border-radius: 26px 26px 0 0; background: var(--paper); max-height: 92vh; max-height: 92dvh; overflow: auto; overscroll-behavior: contain; }
.sheet-in { padding: 18px 20px calc(24px + env(safe-area-inset-bottom)); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.sheet-head h2 { font-size: 24px; font-weight: 800; }
.x { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--stone); display: grid; place-items: center; font-size: 24px; color: var(--ink-2); }
.seg-2 { margin-bottom: 16px; }
.field { display: block; margin-bottom: 14px; }
.field > span, .field > legend { display: block; font-size: 15px; font-weight: 700; color: var(--ink-3); margin-bottom: 6px; }
.field input, .field select { width: 100%; min-height: 52px; border-radius: 14px; border: 0; box-shadow: inset 0 0 0 1.5px #dccfbd; background: var(--bg); padding: 0 14px; font-size: 17px; }
.field input:focus, .field select:focus { outline: none; box-shadow: inset 0 0 0 2px var(--olive); background: #fff; }
.field input[aria-invalid="true"] { box-shadow: inset 0 0 0 2px #a3261b; }
.field input[dir="ltr"] { text-align: right; }
.field input::placeholder { color: #9a8f84; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ticket { margin-top: 14px; display: inline-flex; gap: 8px; align-items: baseline; padding: 8px 16px; border-radius: 12px; background: var(--stone); font-size: 15px; color: var(--ink-2); }
.ticket strong { font-size: 20px; color: var(--ink); letter-spacing: .02em; }
.sheet .done .btn { margin-top: 18px; }
@media (min-width: 700px) { .sheet { width: 480px; margin: auto; border-radius: 26px; } .sheet-in { padding: 24px 28px 28px; } }

/* the facilities viewer */
.viewer { width: min(94vw, 920px); max-width: none; background: transparent; overflow: visible; }
.viewer-in { position: relative; background: var(--paper); border-radius: 24px; overflow: hidden; }
.viewer img { width: 100%; aspect-ratio: 1 / 1; max-height: 72vh; object-fit: cover; background: var(--stone); }
#vCap { padding: 14px 18px 4px; font-size: 16px; color: var(--ink-2); }
#vCap strong { color: var(--ink); font-size: 19px; margin-inline-end: 8px; }
.viewer-nav { display: flex; align-items: center; justify-content: space-between; padding: 6px 12px 14px; }
.viewer-nav button { width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--stone); font-size: 22px; display: grid; place-items: center; }
.viewer-nav span { font-size: 15px; color: var(--ink-3); }
.viewer .x { position: absolute; top: 12px; inset-inline-end: 12px; background: rgb(255 255 255 / .9); }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: .01ms !important; } }
@media print { .top, 
/* verification-round nits: chips of one row share a height; the lede clears the platform on the smallest phones;
   the desktop pledge titles share a baseline; visit days sit two by two on phones */
.chip { display: grid; }
.chip span { height: 100%; }
#visitDays { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 900px) { .pledge .num { height: 84px; display: flex; align-items: flex-end; } }
/* phones: the stages follow the admission buttons closely, so their first photo shows without a long empty strip (owner, 24 Nov 2026) */
@media (max-width: 899px) {
  .hero-in { min-height: 0; padding-bottom: calc(28px + env(safe-area-inset-bottom)); }
  .stages { padding-top: 34px; }
}
