/* مجموعة التكامل التعليمية — أنماط الموقع
   اتجاه الصفحة (RTL/LTR) يأتي من html[dir]؛ كل المسافات والمحاذاة بخصائص منطقية.
   الوحدة الأساسية 4px. الخطوط مستضافة محلياً (fonts/). */

/* ───────── الخطوط ─────────
   TKM UI      = Vazirmatn (عربي + لاتيني) — النص والواجهة
   TKM Display = Noto Naskh Arabic للحروف العربية/الكردية/الفارسية + Noto Serif للاتيني — العناوين */
@font-face {
  font-family: "TKM UI";
  src: url("/fonts/ui.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "TKM Display";
  src: url("/fonts/display-ar.woff2") format("woff2");
  font-weight: 500 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFF, U+200C-200F;
}
@font-face {
  font-family: "TKM Display";
  src: url("/fonts/display-latin.woff2") format("woff2");
  font-weight: 500 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-05FF, U+2000-206F, U+20AC, U+2122, U+2190-2199;
}

/* ───────── المتغيّرات ───────── */
:root {
  --plum: #8E2778;
  --plum-deep: #6B1C5A;
  --plum-ink: #2B0F25;
  --plum-tint: #F5E9F2;
  --gold: #F5C21B;

  --bg: #FFFFFF;
  --tint: #F8F4F8;
  --ink: #231A21;
  --text: #4A4048;
  --muted: #6F6470;
  --line: #E7DFE6;
  --line-2: #CFC3CD;
  --danger: #B3261E;

  --ui: "TKM UI", "Vazirmatn", system-ui, "Segoe UI", Tahoma, sans-serif;
  --display: "TKM Display", "TKM UI", Georgia, serif;

  --gutter: 20px;
  --hdr-h: 64px;
  --r-1: 8px;
  --r-2: 12px;
  --r-3: 16px;
  --shadow: 0 8px 24px rgba(35, 26, 33, .12);
}
@media (min-width: 768px) { :root { --gutter: 32px; --hdr-h: 72px; } }

/* ───────── أساس ───────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--ui);
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
html[lang="en"] body { line-height: 1.65; }
h1, h2, h3, h4, p, ul, ol, figure, dl { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
[id] { scroll-margin-top: calc(var(--hdr-h) + 16px); }
bdi { unicode-bidi: isolate; }

h1, h2 { font-family: var(--display); font-weight: 600; color: var(--ink); line-height: 1.35; }
h3, h4 { font-weight: 600; color: var(--ink); line-height: 1.5; }
html[lang="en"] h1, html[lang="en"] h2 { line-height: 1.2; }

:focus-visible { outline: 2px solid var(--plum); outline-offset: 2px; border-radius: 4px; }
.ftr :focus-visible, .ann :focus-visible { outline-color: var(--gold); }

.wrap { width: min(100% - 2 * var(--gutter), 1200px); margin-inline: auto; }
.wrap--narrow { width: min(100% - 2 * var(--gutter), 760px); }

.skip {
  position: absolute; inset-inline-start: 16px; top: -64px; z-index: 100;
  background: var(--plum); color: #fff; padding: 12px 20px; border-radius: var(--r-1); font-weight: 600;
}
.skip:focus { top: 12px; }

.arr { width: 18px; height: 18px; flex: none; }
[dir="rtl"] .arr { transform: scaleX(-1); }

/* ───────── الأزرار ───────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 8px 20px;
  border: 1px solid transparent; border-radius: var(--r-1);
  font-weight: 600; font-size: 1rem; line-height: 1.4; text-align: center;
  transition: background-color .15s, border-color .15s, color .15s;
}
.btn svg { width: 20px; height: 20px; }
.btn .arr { width: 18px; height: 18px; }
.btn--lg { min-height: 52px; padding-inline: 24px; }
.btn--primary { background: var(--plum); color: #fff; }
.btn--primary:hover { background: var(--plum-deep); }
.btn--ghost { background: var(--bg); color: var(--ink); border-color: var(--line-2); }
.btn--ghost:hover { border-color: var(--plum); color: var(--plum); }
.btn--text { background: none; color: var(--plum); text-decoration: underline; text-underline-offset: 4px; padding-inline: 8px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.more {
  display: inline-flex; align-items: center; min-height: 44px;
  font-weight: 600; color: var(--plum); text-decoration: underline; text-underline-offset: 4px;
}
.more:hover { color: var(--plum-deep); }

/* ───────── شريط الإعلانات ───────── */
.ann { background: var(--plum-ink); color: #F3E8F0; font-size: .9375rem; }
.ann__in { display: flex; align-items: center; gap: 8px; min-height: 44px; }
.ann__list { flex: 1; min-width: 0; }
.ann__item { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 12px; padding-block: 6px; line-height: 1.5; }
.ann__tag { color: var(--gold); font-weight: 600; }
.ann__link { display: inline-flex; align-items: center; min-height: 44px; color: #fff; text-decoration: underline; text-underline-offset: 3px; font-weight: 600; }
.ann__ctl { display: flex; gap: 0; flex: none; }
.ann__btn {
  width: 44px; height: 44px; display: grid; place-items: center;
  background: none; border: 0; color: #F3E8F0; border-radius: 50%;
}
.ann__btn:hover { background: rgba(255, 255, 255, .1); }
.ann__btn svg { width: 20px; height: 20px; }
.ann .i-play { display: none; }
.ann.is-paused .i-play { display: block; }
.ann.is-paused .i-pause { display: none; }

/* ───────── الترويسة ───────── */
.hdr { position: sticky; top: 0; z-index: 50; background: var(--bg); border-bottom: 1px solid var(--line); }
.hdr__in { display: flex; align-items: center; gap: 12px; min-height: var(--hdr-h); }
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; margin-inline-end: auto; }
.brand__logo { width: 44px; height: 44px; flex: none; }
.brand__t { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.brand__t strong { font-size: 1rem; font-weight: 600; color: var(--ink); }
.brand__t small { font-size: .75rem; color: var(--muted); }
@media (max-width: 519px) { .brand__t small { display: none; } }
.hdr__end { display: flex; align-items: center; gap: 8px; }
.hdr__cta { display: none; min-height: 44px; }

.burger {
  flex: none; width: 44px; height: 44px; display: grid; align-content: center; justify-items: center; gap: 5px;
  background: none; border: 1px solid var(--line-2); border-radius: var(--r-1);
}
.burger span { display: block; width: 20px; height: 2px; background: var(--ink); transition: transform .2s, opacity .2s; }
.hdr.is-open .burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hdr.is-open .burger span:nth-child(2) { opacity: 0; }
.hdr.is-open .burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* قائمة التنقل — قائمة منسدلة على الهاتف */
.nav {
  position: absolute; inset-inline: 0; top: 100%;
  background: var(--bg); border-bottom: 1px solid var(--line);
  max-height: calc(100dvh - var(--hdr-h)); overflow-y: auto;
  display: none;
}
.hdr.is-open .nav { display: block; }
.nav ul { width: min(100% - 2 * var(--gutter), 1200px); margin-inline: auto; padding-block: 8px; }
.nav a { display: flex; align-items: center; min-height: 52px; padding-inline: 4px; font-weight: 500; color: var(--ink); border-bottom: 1px solid var(--line); }
.nav li:last-child a { border-bottom: 0; }
.nav a.is-cur { color: var(--plum); font-weight: 600; }
/* بلا جافاسكربت: القائمة صف عادي تحت الشعار */
html:not(.js) .hdr__in { flex-wrap: wrap; padding-block: 8px; }
html:not(.js) .burger { display: none; }
html:not(.js) .nav { display: block; position: static; order: 5; flex-basis: 100%; border: 0; }
html:not(.js) .nav ul { width: 100%; display: flex; flex-wrap: wrap; gap: 0 20px; padding: 0; }
html:not(.js) .nav a { border: 0; min-height: 44px; }

/* اللغات */
.lang { position: relative; }
.lang summary {
  display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; min-width: 44px; padding-inline: 12px;
  border: 1px solid var(--line-2); border-radius: var(--r-1); cursor: pointer;
  font-weight: 500; color: var(--ink); list-style: none; white-space: nowrap;
}
.lang summary::-webkit-details-marker { display: none; }
.lang summary svg { width: 20px; height: 20px; color: var(--plum); }
.lang[open] summary { border-color: var(--plum); }
.lang ul {
  position: absolute; inset-inline-end: 0; top: calc(100% + 8px); z-index: 60;
  min-width: 168px; padding: 8px; background: var(--bg);
  border: 1px solid var(--line); border-radius: var(--r-2); box-shadow: var(--shadow);
}
.lang a { display: flex; align-items: center; min-height: 44px; padding-inline: 12px; border-radius: var(--r-1); font-weight: 500; color: var(--ink); }
.lang a:hover { background: var(--tint); }
.lang a[aria-current] { color: var(--plum); font-weight: 600; background: var(--plum-tint); }
@media (max-width: 420px) { .lang summary span { display: none; } .lang summary { padding-inline: 10px; } }

@media (min-width: 1200px) {
  .burger { display: none; }
  .hdr__cta { display: inline-flex; }
  .nav { position: static; display: block; border: 0; max-height: none; overflow: visible; background: none; }
  .nav ul { width: auto; display: flex; gap: 4px; padding: 0; }
  .nav a { min-height: 44px; min-width: 44px; justify-content: center; padding-inline: 12px; border: 0; border-radius: var(--r-1); font-size: .9375rem; white-space: nowrap; }
  .nav a:hover { background: var(--tint); }
  .nav a[href$="/admission/"] { display: none; }   /* زرّ التسجيل بجانبه */
  .hdr__in { gap: 20px; }
  .brand { margin-inline-end: 0; }
  .hdr__end { margin-inline-start: auto; }
  html:not(.js) .nav a[href$="/admission/"] { display: flex; }
}

/* ───────── أقسام عامة ───────── */
.sec { padding-block: clamp(40px, 6vw, 80px); }
.sec--tint { background: var(--tint); }
.sec:not(.sec--tint) + .sec:not(.sec--tint) { border-top: 1px solid var(--line); }
.sec-head { max-width: 62ch; margin-bottom: clamp(24px, 4vw, 40px); }
.sec-head::before { content: ""; display: block; width: 40px; height: 3px; background: var(--gold); margin-bottom: 16px; }
.sec-head h2, .admission__intro h2 { font-size: clamp(1.625rem, 1.1rem + 1.7vw, 2.375rem); }
.sec-sub { margin-top: 12px; color: var(--text); font-size: 1.0625rem; max-width: 62ch; }
.sec-act { margin-top: 32px; }
.note, .credit { margin-top: 24px; font-size: .9375rem; color: var(--muted); max-width: 70ch; }
.prose { display: grid; gap: 16px; max-width: 66ch; font-size: 1.0625rem; }
.prose a { color: var(--plum); text-decoration: underline; text-underline-offset: 3px; }
.plain { display: grid; gap: 8px; }
.plain li { position: relative; padding-inline-start: 20px; }
.plain li::before { content: ""; position: absolute; inset-inline-start: 0; top: .8em; width: 8px; height: 2px; background: var(--gold); }

.split { display: grid; gap: 24px; }
.split__head { margin-bottom: 0; }
@media (min-width: 960px) {
  .split { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 64px; align-items: start; }
  .split__head { position: sticky; top: calc(var(--hdr-h) + 24px); }
}

.checks { display: grid; gap: 12px; margin-top: 24px; }
.checks li { position: relative; padding-inline-start: 32px; color: var(--ink); }
.checks li::before {
  content: ""; position: absolute; inset-inline-start: 0; top: .45em; width: 20px; height: 20px; border-radius: 50%;
  background: var(--plum) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12.5 4 4 8-9'/%3E%3C/svg%3E") center / 14px no-repeat;
}

.badge {
  display: inline-block; padding: 2px 12px; border-radius: 999px;
  background: var(--plum-tint); color: var(--plum-deep); font-size: .8125rem; font-weight: 600; line-height: 1.8;
}

/* ───────── البطل (الرئيسية) ───────── */
.hero { padding-block: clamp(32px, 5vw, 64px) clamp(40px, 6vw, 72px); }
.hero__in { display: grid; gap: 32px; align-items: center; }
.hero__eyebrow { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; color: var(--muted); font-weight: 500; }
.hero__eyebrow::before { content: ""; width: 24px; height: 3px; background: var(--gold); flex: none; }
.hero h1 { font-size: clamp(2.125rem, 1.3rem + 3.6vw, 3.75rem); font-weight: 600; }
.hero__line { display: block; }
.hero__line.hl { color: var(--plum); }
.hero__lead { margin-top: 20px; font-size: 1.125rem; max-width: 52ch; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero__cta .btn { flex: 1 1 200px; }
.hero__img img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r-3); background: var(--tint); }
@media (min-width: 960px) {
  .hero__in { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 64px; }
  .hero__cta .btn { flex: 0 0 auto; }
}

/* ───────── أرقام ───────── */
.facts { border-block: 1px solid var(--line); }
.facts__list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.fact { display: flex; flex-direction: column; gap: 4px; padding: 24px 16px; border-bottom: 1px solid var(--line); }
.fact:nth-child(odd) { border-inline-end: 1px solid var(--line); }
.fact:nth-last-child(-n+2) { border-bottom: 0; }
.fact__n { font-family: var(--display); font-weight: 600; font-size: clamp(2rem, 1.4rem + 2.4vw, 3rem); line-height: 1.2; color: var(--plum); }
.fact__n--word { font-size: clamp(1.5rem, 0.9rem + 2.4vw, 2.25rem); white-space: nowrap; }
.fact__l { color: var(--text); font-size: .9375rem; line-height: 1.6; }
@media (min-width: 768px) {
  .facts__list { display: flex; }
  .fact { flex: 1 1 0; border-bottom: 0; border-inline-end: 1px solid var(--line); padding: 32px 24px; }
  .fact:last-child { border-inline-end: 0; }
}

/* ───────── صفوف مرتّبة (لماذا التكامل) ───────── */
.rows { border-top: 1px solid var(--line); }
.row { display: grid; grid-template-columns: 44px 1fr; gap: 16px; padding-block: 24px; border-bottom: 1px solid var(--line); }
.row__ico, .cell__ico { width: 44px; height: 44px; display: grid; place-items: center; border-radius: var(--r-2); background: var(--plum-tint); color: var(--plum); }
.row__ico svg, .cell__ico svg { width: 24px; height: 24px; }
.row h3 { font-size: 1.1875rem; }
.row p { margin-top: 4px; }

/* شريط الخصال */
.ticks { border-bottom: 1px solid var(--line); background: var(--tint); }
.ticks__list { display: flex; flex-wrap: wrap; gap: 4px 32px; padding-block: 16px; }
.ticks__list li { position: relative; padding-inline-start: 20px; color: var(--ink); font-weight: 500; font-size: .9375rem; }
.ticks__list li::before { content: ""; position: absolute; inset-inline-start: 0; top: .75em; width: 8px; height: 8px; background: var(--gold); border-radius: 2px; }

/* فهرس الصفحات */
.idx-list { display: grid; border-top: 1px solid var(--line); }
.idx { display: flex; align-items: center; gap: 16px; padding: 20px 8px; border-bottom: 1px solid var(--line); transition: background-color .15s; }
.idx:hover { background: var(--bg); }
.idx__t { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.idx__t strong { font-size: 1.125rem; font-weight: 600; color: var(--ink); }
.idx__t span { color: var(--text); font-size: .9375rem; }
.idx .arr { color: var(--plum); transition: translate .15s; }
.idx:hover .arr { translate: 4px 0; }
[dir="rtl"] .idx:hover .arr { translate: -4px 0; }
@media (min-width: 768px) {
  .idx-list { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 48px; }
  .idx { padding-inline: 12px; }
}

/* خلايا مرتّبة: مجالات التعليم، الذكاء الاصطناعي، المزايا */
.cells, .merits, .vmv { display: grid; gap: 0 40px; }
.cell, .merit, .vmv__col { display: block; padding-block: 24px 28px; border-top: 1px solid var(--line-2); }
.cell .cell__ico, .vmv__col .cell__ico { margin-bottom: 16px; }
.cell h3, .merit h3, .vmv__col h3 { font-size: 1.1875rem; }
.cell p, .merit p, .vmv__col > p { margin-top: 8px; }
.vmv__col .plain { margin-top: 12px; }
@media (min-width: 640px) { .cells, .merits { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) {
  .cells, .merits, .vmv { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ───────── المسيرة ───────── */
.tl { border-top: 1px solid var(--line); }
.tl__item { display: grid; gap: 8px; padding-block: 28px; border-bottom: 1px solid var(--line); }
.tl__tag { font-family: var(--display); font-weight: 600; font-size: 1.375rem; line-height: 1.4; color: var(--plum); }
.tl__tag.is-gold { color: var(--ink); padding-inline-start: 12px; border-inline-start: 3px solid var(--gold); }
.tl__body h3 { font-size: 1.1875rem; }
.tl__body p { margin-top: 8px; max-width: 66ch; }
@media (min-width: 768px) {
  .tl__item { grid-template-columns: 200px minmax(0, 1fr); gap: 40px; }
}

/* ───────── المراحل ───────── */
.stages { display: grid; gap: 0 40px; border-top: 1px solid var(--line); }
.stage { display: grid; grid-template-columns: 44px 1fr; gap: 16px; padding-block: 24px; border-bottom: 1px solid var(--line); }
.stage__n { width: 44px; height: 44px; display: grid; place-items: center; border: 2px solid var(--plum); border-radius: 50%; color: var(--plum); font-family: var(--display); font-weight: 600; font-size: 1.125rem; }
.stage h3 { font-size: 1.1875rem; }
.stage p { margin-top: 4px; }
@media (min-width: 960px) { .stages { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ───────── الفروع ───────── */
.camps { display: grid; gap: 0 48px; }
.camp { padding-block: 24px 28px; border-top: 1px solid var(--line-2); }
.camp h3 { font-size: 1.25rem; margin-bottom: 12px; }
.camp > p { margin-top: 12px; color: var(--muted); font-size: .9375rem; }
@media (min-width: 768px) { .camps { grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); } }

.campuses { display: grid; gap: 24px; }
.campus { display: flex; flex-direction: column; gap: 16px; padding: 24px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-3); }
.campus__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.campus__head h3 { font-size: 1.375rem; font-family: var(--display); }
.campus__list { display: grid; gap: 4px; }
.campus__list li { display: flex; align-items: flex-start; gap: 12px; padding-block: 8px; border-top: 1px solid var(--line); }
.campus__list li:first-child { border-top: 0; }
.campus__list svg { width: 20px; height: 20px; margin-top: 6px; color: var(--plum); flex: none; }
.campus__note { color: var(--muted); font-size: .9375rem; }
.campus__act { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; margin-top: auto; }
@media (min-width: 900px) { .campuses { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.map { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.map__qr { display: grid; justify-items: center; gap: 4px; width: 112px; color: var(--muted); font-size: .8125rem; text-align: center; line-height: 1.5; }
.map__qr svg { width: 96px; height: 96px; }
.locs { display: grid; gap: 24px; }
.loc { padding: 24px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-3); display: grid; gap: 16px; }
.loc h3 { display: flex; align-items: center; gap: 12px; font-size: 1.125rem; }
.loc h3 svg { width: 22px; height: 22px; color: var(--plum); flex: none; }
@media (min-width: 768px) { .locs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ───────── أبرز الأنشطة ───────── */
.shots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.shot figure { display: grid; gap: 8px; }
.shot img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r-2); background: var(--tint); }
.shot figcaption { display: grid; gap: 2px; }
.shot figcaption strong { color: var(--ink); font-weight: 600; font-size: .9375rem; line-height: 1.5; }
.shot figcaption time { color: var(--muted); font-size: .875rem; }
.shot figcaption span { color: var(--text); font-size: .9375rem; }
.shot--lead { grid-column: 1 / -1; }
.shot--lead figcaption strong { font-size: 1.125rem; }
@media (min-width: 900px) {
  .shots { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
  .shot--lead { grid-column: 1 / span 2; grid-row: 1 / span 2; }
  .shot--lead img { aspect-ratio: 1 / 1; }
}

/* ───────── المعرض ───────── */
.chips { display: flex; align-items: center; gap: 8px; margin-bottom: 24px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: thin; }
.chip {
  flex: none; min-height: 44px; padding: 8px 16px; border: 1px solid var(--line-2); border-radius: 999px;
  background: var(--bg); color: var(--ink); font-weight: 500; white-space: nowrap;
  transition: background-color .15s, border-color .15s;
}
.chip:hover { border-color: var(--plum); }
.chip.is-on { background: var(--plum); border-color: var(--plum); color: #fff; }
.chips__group { flex: none; margin-inline-start: 12px; color: var(--muted); font-size: .875rem; font-weight: 600; white-space: nowrap; }
@media (min-width: 900px) { .chips { flex-wrap: wrap; overflow: visible; } }

.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.tile button { display: block; width: 100%; padding: 0; border: 0; border-radius: var(--r-1); overflow: hidden; background: var(--tint); aspect-ratio: 4 / 3; }
.tile img { width: 100%; height: 100%; object-fit: cover; transition: opacity .15s; }
.tile button:hover img { opacity: .88; }
.js .tile[data-more]:not(.is-shown), .tile.is-off { display: none; }
@media (min-width: 640px) { .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; } }
@media (min-width: 1024px) { .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.lb {
  width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: #17091A; color: #fff;
}
.lb::backdrop { background: #17091A; }
.lb[open] { display: grid; place-items: center; }
.lb__fig { display: grid; justify-items: center; gap: 12px; width: 100%; max-height: 100%; padding: 72px 16px 24px; }
.lb__fig img { max-width: 100%; max-height: calc(100dvh - 160px); width: auto; height: auto; object-fit: contain; border-radius: var(--r-1); }
.lb__fig figcaption { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 16px; max-width: 70ch; text-align: center; color: #E9DDE7; font-size: .9375rem; line-height: 1.6; }
.lb__fig figcaption bdi { color: #BFAEBB; }
.lb__btn {
  position: absolute; width: 48px; height: 48px; display: grid; place-items: center;
  border: 1px solid rgba(255, 255, 255, .28); border-radius: 50%; background: rgba(23, 9, 26, .6); color: #fff; z-index: 2;
}
.lb__btn:hover { background: rgba(255, 255, 255, .16); }
.lb__btn svg { width: 22px; height: 22px; }
.lb__close { top: 12px; inset-inline-end: 12px; }
.lb__prev, .lb__next { top: 50%; translate: 0 -50%; }
.lb__prev { inset-inline-start: 12px; }
.lb__next { inset-inline-end: 12px; }
.lb__prev .arr { transform: scaleX(-1); }
[dir="rtl"] .lb__prev .arr { transform: none; }
.lb :focus-visible { outline-color: var(--gold); }

/* ───────── الأخبار ───────── */
.posts { display: grid; gap: 24px; }
.post a { display: grid; align-content: start; height: 100%; background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-3); overflow: hidden; transition: border-color .15s; }
.post a:hover { border-color: var(--plum); }
.post__media { position: relative; }
.post__media img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; background: var(--tint); }
.post__media .badge { position: absolute; top: 12px; inset-inline-start: 12px; background: var(--bg); }
.post__body { display: grid; gap: 8px; align-content: start; padding: 20px; }
.post__body time { color: var(--muted); font-size: .875rem; }
.post__body h3 { font-size: 1.125rem; }
.post__body .more { margin-top: 4px; min-height: 32px; }
.follow { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line-2); }
.follow p { color: var(--ink); font-weight: 500; }
.follow__links { display: flex; flex-wrap: wrap; gap: 8px; }
.follow__links a { display: inline-flex; align-items: center; min-height: 44px; padding-inline: 16px; border: 1px solid var(--line-2); border-radius: var(--r-1); background: var(--bg); font-weight: 600; color: var(--ink); }
.follow__links a:hover { border-color: var(--plum); color: var(--plum); }
@media (min-width: 640px) { .posts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .posts { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ───────── الأسئلة الشائعة ───────── */
.faq { border-top: 1px solid var(--line-2); }
.faq__item { border-bottom: 1px solid var(--line-2); }
.faq__item summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 60px; padding-block: 12px; cursor: pointer; list-style: none;
  font-weight: 600; color: var(--ink); line-height: 1.6;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: ""; flex: none; width: 20px; height: 20px; background: var(--plum);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform .2s;
}
.faq__item[open] summary::after { transform: rotate(180deg); }
.faq__a { padding-bottom: 20px; max-width: 66ch; }
.faq__a a { color: var(--plum); text-decoration: underline; text-underline-offset: 3px; }

/* ───────── التسجيل ───────── */
.admission { background: var(--tint); }
.admission__in { display: grid; gap: 32px; }
.admission__intro { display: grid; gap: 16px; align-content: start; }
.admission__intro .checks { margin-top: 0; }
.admission__intro .btn { justify-self: start; }
@media (min-width: 960px) {
  .admission__in { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 64px; align-items: start; }
  .admission__intro { position: sticky; top: calc(var(--hdr-h) + 24px); }
}
.form { padding: 24px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-3); display: grid; gap: 20px; }
@media (min-width: 640px) { .form { padding: 32px; } }
.form__title { font-size: 1.25rem; font-family: var(--display); }
.field { display: grid; gap: 6px; }
.field label { font-size: .9375rem; font-weight: 600; color: var(--ink); }
.req { color: var(--danger); margin-inline-start: 2px; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 10px 14px;
  background: var(--bg); border: 1px solid var(--line-2); border-radius: var(--r-1);
  color: var(--ink); font-size: 1rem; line-height: 1.5;
}
.field textarea { resize: vertical; min-height: 96px; }
.field input::placeholder, .field textarea::placeholder { color: #7A6E78; opacity: 1; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--plum); }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 2px solid var(--plum); outline-offset: 1px; border-color: var(--plum); }
.field select {
  appearance: none; -webkit-appearance: none; padding-inline-end: 40px;
  background: var(--bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236F6470' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat;
  background-size: 20px;
}
[dir="rtl"] .field select { background-position: left 12px center; }
[dir="ltr"] .field select { background-position: right 12px center; }
.field .invalid { border-color: var(--danger); box-shadow: 0 0 0 1px var(--danger); }
.field-row { display: grid; gap: 20px; }
@media (min-width: 560px) { .field-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.form__err { padding: 12px 16px; border-inline-start: 4px solid var(--danger); background: #FCEDEC; color: #8C1D18; font-weight: 500; border-radius: var(--r-1); }
.form__act { display: flex; flex-wrap: wrap; gap: 12px; }
.form__act .btn { flex: 1 1 200px; }
.form__hint { color: var(--muted); font-size: .9375rem; }
.form__done { display: grid; gap: 16px; }
.form__done h3 { font-size: 1.375rem; font-family: var(--display); }
.form__done textarea { width: 100%; padding: 14px; border: 1px solid var(--line-2); border-radius: var(--r-1); background: var(--tint); color: var(--ink); font-size: .9375rem; line-height: 1.8; resize: vertical; }
.form.is-done > :not(.form__done) { display: none; }

/* ───────── التواصل ───────── */
.reaches { border-top: 1px solid var(--line-2); }
.reach { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 0 16px; padding: 18px 8px; border-bottom: 1px solid var(--line-2); transition: background-color .15s; }
.reach:hover { background: var(--tint); }
.reach__l { grid-column: 1; color: var(--muted); font-size: .9375rem; line-height: 1.5; }
.reach__v { grid-column: 1; font-family: var(--display); font-size: clamp(1.25rem, 1rem + 1vw, 1.625rem); font-weight: 600; color: var(--ink); line-height: 1.4; overflow-wrap: anywhere; }
.reach .arr { grid-column: 2; grid-row: 1 / span 2; color: var(--plum); }
.phones, .app, .social { margin-top: 40px; }
.phones h3, .social h3 { font-size: 1.125rem; margin-bottom: 12px; }
.phones__grid { display: grid; gap: 24px; }
.phones h4 { font-size: .9375rem; color: var(--muted); margin-bottom: 4px; }
.phones li { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 48px; border-bottom: 1px solid var(--line); }
.phones li a { font-weight: 600; color: var(--plum); min-height: 44px; display: inline-flex; align-items: center; }
@media (min-width: 640px) { .phones__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; } }
.app { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; padding: 24px; background: var(--tint); border-radius: var(--r-3); }
.app h3 { font-size: 1.125rem; }
.social ul { display: flex; flex-wrap: wrap; gap: 8px; }
.social a { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding-inline: 16px; border: 1px solid var(--line-2); border-radius: var(--r-1); background: var(--bg); font-weight: 600; color: var(--ink); }
.social a:hover { border-color: var(--plum); color: var(--plum); }
.social svg { width: 20px; height: 20px; }
.contact--compact { background: var(--tint); }

/* ───────── ترويسة الصفحات الداخلية ───────── */
.phero { padding-block: clamp(24px, 4vw, 48px); border-bottom: 1px solid var(--line); }
.phero__in { display: grid; gap: 24px; align-items: center; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 4px; color: var(--muted); font-size: .9375rem; }
.crumbs a { color: var(--plum); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; }
.phero h1 { font-size: clamp(1.875rem, 1.2rem + 2.6vw, 3rem); }
.phero__sub { margin-top: 12px; font-size: 1.125rem; max-width: 56ch; }
.phero__img img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--r-3); background: var(--tint); }
@media (min-width: 900px) {
  .phero__in { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 56px; }
  .phero__img img { aspect-ratio: 4 / 3; }
}

/* ───────── التذييل ───────── */
.ftr { background: var(--plum-ink); color: #E3D3DF; padding-top: 56px; }
.ftr a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.ftr__in { display: grid; gap: 40px; padding-bottom: 40px; }
.ftr__brand { display: flex; gap: 16px; align-items: flex-start; }
.ftr__brand img { width: 56px; height: 56px; background: #fff; padding: 4px; border-radius: var(--r-2); flex: none; }
.ftr__brand strong { color: #fff; font-size: 1.125rem; font-weight: 600; }
.ftr__brand p { margin-top: 8px; font-size: .9375rem; max-width: 40ch; }
.ftr__col h2 { font-family: var(--ui); font-size: .9375rem; font-weight: 600; color: #fff; margin-bottom: 12px; line-height: 1.5; }
.ftr__col ul { display: grid; gap: 0; }
.ftr__col a { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; }
.ftr__soc { margin-top: 8px; }
.ftr__lang[aria-current] { color: #fff; font-weight: 600; }
.ftr__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-block: 20px; border-top: 1px solid rgba(255, 255, 255, .16); font-size: .875rem; color: #C9B8C5; }
.ftr__bottom a { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; }
@media (min-width: 768px) {
  .ftr__in { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .ftr__in { grid-template-columns: 1.6fr 1fr 1.2fr .8fr; gap: 48px; }
}

/* شريط سفلي ثابت على الهاتف */
.dock {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 40;
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
  padding: 8px var(--gutter) calc(8px + env(safe-area-inset-bottom));
  background: var(--bg); border-top: 1px solid var(--line);
}
.dock .btn { min-height: 48px; padding-inline: 12px; font-size: .9375rem; }
body { padding-bottom: 65px; }
@media (min-width: 768px) { .dock { display: none; } body { padding-bottom: 0; } }

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