/* ============================================================================
   AI-ENG Exams - site.css : تنسيق موقع التعريف بالنظام (الصفحة الرئيسية ومركز المساعدة والأدلة)
   EN: Styles for the product website (landing page, help center and guide pages)
   ----------------------------------------------------------------------------
   - هوية النظام نفسها (system-info.json): ذهبي #C9A227 على أسود دافئ، وأخضر/أحمر دلاليان فقط (قاعدة 8):
     الأخضر = اكتمال/متاح، الذهبي = جزئي/قيد التطوير، الأحمر = غير متاح. لا تدرّج لوني للزينة.
   - مظهران: غامق (الافتراضي) وفاتح عبر html[data-theme]، والتبديل زر واحد مباشر كما في النظام.
     الفاتح أبيض محايد (خلفيات بيضاء ورمادية فاتحة ونقوش رمادية)، والذهبي فيه للهوية فقط لا للخلفيات.
   - الاتجاه منطقي (inline-start/end) فيعمل التخطيط نفسه بالعربية (rtl) والإنجليزية (ltr).
   - الخطوط: Reem Kufi للعناوين العربية، Marcellus للعناوين الإنجليزية، Cairo للنص والأرقام.
   ============================================================================ */

/* ---------- 1) الرموز اللونية والمقاسات ---------- */
:root {
  --radius: 16px;
  --radius-sm: 10px;
  --wrap: 1200px;
  --f-display: "Reem Kufi", "Cairo", Tahoma, sans-serif;
  --f-body: "Cairo", "Segoe UI", Tahoma, sans-serif;
}
:root:lang(en) { --f-display: "Marcellus", Georgia, serif; }

/* ألوان الغامق - وتُطبَّق أيضاً على أقسام النجوم (.bg-stars) في المظهر الفاتح فتبقى "شريط ليل" */
:root,
:root[data-theme="dark"],
:root[data-theme="light"] .bg-stars {
  --bg: #0B0B0C;
  --bg-2: #111113;
  --surface: #151518;
  --surface-2: #1C1C20;
  --line: #2C2820;
  --line-strong: #4A3F22;
  --text: #ECE7DA;
  --text-soft: #C9C3B4;
  --mute: #9D978A;
  --gold: #C9A227;
  --gold-text: #E6C75A;
  --gold-soft: rgba(201, 162, 39, .12);
  --on-gold: #0B0B0C;
  --green: #22A862;
  --green-soft: rgba(34, 168, 98, .14);
  --red: #E0574B;
  --red-soft: rgba(224, 87, 75, .14);
  --plate: #FBF8F1;
  --shadow: 0 18px 40px rgba(0, 0, 0, .45);
  color-scheme: dark;
}
/* الفاتح: خلفية بيضاء وحدود ونصوص رمادية محايدة - الذهبي للهوية فقط (أزرار، عناوين صغيرة، أيقونات) لا للخلفيات */
:root[data-theme="light"] {
  --bg: #FFFFFF;
  --bg-2: #F7F7F8;
  --surface: #FFFFFF;
  --surface-2: #F4F4F5;
  --line: #E4E4E7;
  --line-strong: #D4D4D8;
  --text: #18181B;
  --text-soft: #3F3F46;
  --mute: #71717A;
  --gold: #C9A227;
  --gold-text: #8A6B0F;
  --gold-soft: rgba(201, 162, 39, .10);
  --on-gold: #0B0B0C;
  --green: #0E7A40;
  --green-soft: rgba(14, 122, 64, .10);
  --red: #B83A2F;
  --red-soft: rgba(184, 58, 47, .10);
  --plate: #FFFFFF;
  --shadow: 0 16px 36px rgba(15, 23, 42, .08);
  color-scheme: light;
}

/* ---------- 2) الأساس ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--f-body);
  font-size: 16.5px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg, video { max-width: 100%; display: block; }
a { color: var(--gold-text); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3, h4 { font-family: var(--f-display); font-weight: 600; line-height: 1.3; margin: 0; text-wrap: balance; }
:lang(en) h1, :lang(en) h2, :lang(en) h3 { font-weight: 400; letter-spacing: .01em; }
p { margin: 0; }
ul { margin: 0; padding: 0; }
:focus-visible { outline: 2px solid var(--gold-text); outline-offset: 3px; border-radius: 6px; }
.ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }
.num { font-family: "Cairo", sans-serif; font-variant-numeric: tabular-nums; }
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 20px; }
.skip { position: absolute; inset-inline-start: 12px; top: -60px; z-index: 100; background: var(--gold); color: var(--on-gold); padding: 8px 14px; border-radius: 8px; font-weight: 700; }
.skip:focus { top: 12px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- 3) الأزرار والشارات ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 10px 22px; border-radius: 999px;
  font: 700 16px/1.2 var(--f-body); cursor: pointer; white-space: nowrap;
  border: 1.5px solid transparent; transition: transform .2s ease, background-color .2s ease, border-color .2s ease, color .2s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn i { font-size: 1.15em; }
.btn-gold { background: var(--gold); color: var(--on-gold); }
.btn-gold:hover { background: #D8B23A; }
.btn-ghost { border-color: var(--line-strong); color: var(--text); background: transparent; }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold-text); }
.btn-sm { min-height: 40px; padding: 6px 16px; font-size: 14.5px; }
.icon-btn {
  width: 42px; height: 42px; display: inline-grid; place-items: center; border-radius: 12px;
  border: 1px solid var(--line); background: transparent; color: var(--text); cursor: pointer; font: 700 14px var(--f-body);
}
.icon-btn:hover { border-color: var(--gold); color: var(--gold-text); }
.chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--text-soft); font-size: 14px; background: var(--surface);
}
.chip i { color: var(--gold-text); }
.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px;
  font-size: 12.5px; font-weight: 700; white-space: nowrap;
}
.badge-full { background: var(--green-soft); color: var(--green); }
.badge-partial { background: var(--gold-soft); color: var(--gold-text); }
.badge-none { background: var(--red-soft); color: var(--red); }

/* ---------- 4) الشريط العلوي ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: saturate(1.2) blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar .wrap { display: flex; align-items: center; gap: 18px; min-height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--text); flex: none; }
.brand:hover { text-decoration: none; }
.plate { background: var(--plate); border-radius: 10px; padding: 6px 10px; border: 1px solid var(--line); display: inline-grid; place-items: center; flex: none; }
.plate img { height: 26px; width: auto; max-width: none; }
/* الشعار <picture> (WebP ثم PNG بمقاسَي 218 و435): كتلة بلا فراغ سطر تحت الصورة */
.plate picture { display: block; line-height: 0; }
.top-actions { flex: none; }
.brand-name { display: grid; line-height: 1.25; }
.brand-name b { font-family: var(--f-display); font-weight: 600; font-size: 16px; white-space: nowrap; }
.brand-name small { color: var(--mute); font-size: 12px; letter-spacing: .04em; }
.nav { display: flex; gap: 2px; margin-inline-start: auto; }
.nav a { color: var(--text-soft); padding: 8px 10px; border-radius: 10px; font-weight: 600; font-size: 14.5px; white-space: nowrap; }
.nav a:hover, .nav a.is-active { color: var(--gold-text); background: var(--gold-soft); text-decoration: none; }
.top-actions { display: flex; align-items: center; gap: 8px; }
.menu-btn { display: none; }
@media (max-width: 1240px) {
  .nav { position: fixed; inset: 72px 0 auto 0; flex-direction: column; gap: 0; padding: 10px 20px 18px; background: var(--bg); border-bottom: 1px solid var(--line); display: none; }
  .nav.is-open { display: flex; }
  .nav a { padding: 12px; font-size: 16px; }
  .menu-btn { display: inline-grid; }
  .top-actions { margin-inline-start: auto; }
}
@media (max-width: 560px) {
  .brand-name { display: none; }
  .top-actions .btn-cta .txt { display: none; }
  .top-actions .btn-cta { width: 42px; min-height: 42px; padding: 0; }
}

/* ---------- 5) البطل (Hero) ---------- */
.hero { padding: 72px 0 56px; border-bottom: 1px solid var(--line); position: relative; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; color: var(--gold-text); font-weight: 700; font-size: 14px; letter-spacing: .04em;
}
.eyebrow::before { content: ""; width: 9px; height: 9px; background: var(--gold); transform: rotate(45deg); flex: none; }
.hero h1 { font-size: clamp(36px, 5.2vw, 62px); margin-top: 14px; }
.hero .tagline { font-family: var(--f-display); color: var(--gold-text); font-size: clamp(22px, 2.6vw, 30px); margin-top: 10px; }
.hero .lead { color: var(--text-soft); font-size: 18.5px; margin-top: 18px; max-width: 60ch; }
.hero .ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero .chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
@media (max-width: 960px) { .hero .wrap { grid-template-columns: 1fr; gap: 40px; } .hero { padding-top: 48px; } }

/* ---------- 6) لقطة توضيحية للنظام (HTML/CSS لا صورة، فتتبع اللغة والمظهر) ---------- */
.shot { background: var(--surface); border: 1px solid var(--line-strong); border-radius: 20px; box-shadow: var(--shadow); overflow: hidden; }
.shot-bar { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.shot-tab { font-size: 13.5px; font-weight: 700; color: var(--gold-text); padding: 4px 12px; border-radius: 8px; background: var(--gold-soft); }
.shot-tab.dim { color: var(--mute); background: transparent; }
.shot-body { padding: 18px; display: grid; gap: 14px; }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.kpi { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: var(--bg-2); min-width: 0; }
.kpi small { display: block; color: var(--mute); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi b { display: block; font-family: "Cairo", sans-serif; font-size: 18px; direction: ltr; text-align: end; }
.kpi b.pos { color: var(--green); }
.todo { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: grid; gap: 8px; }
.todo h4 { font-family: var(--f-body); font-size: 13.5px; color: var(--mute); font-weight: 700; }
.todo ul { list-style: none; display: grid; gap: 8px; }
.todo li { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.dot.r { background: var(--red); } .dot.g { background: var(--gold); } .dot.ok { background: var(--green); }
.jv { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: grid; gap: 6px; font-size: 13.5px; }
.jv-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.jv-head b { font-family: "Cairo", sans-serif; direction: ltr; }
.jv-row { display: grid; grid-template-columns: 1fr 90px 90px; gap: 8px; color: var(--text-soft); }
.jv-row span:not(:first-child) { text-align: end; direction: ltr; font-family: "Cairo", sans-serif; }
.jv-row.tot { color: var(--green); font-weight: 700; border-top: 1px solid var(--line); padding-top: 6px; }
.shot-note { text-align: center; color: var(--mute); font-size: 12.5px; margin-top: 10px; }

/* ---------- 7) شريط الأرقام ---------- */
.stats { border-bottom: 1px solid var(--line); background: var(--bg-2); }
.stats .wrap { display: grid; grid-template-columns: repeat(5, 1fr); }
.stat { padding: 26px 16px; text-align: center; border-inline-start: 1px solid var(--line); }
.stat:first-child { border-inline-start: 0; }
.stat b { display: block; font-family: "Cairo", sans-serif; font-weight: 800; font-size: clamp(30px, 3.6vw, 42px); color: var(--gold-text); line-height: 1.1; }
.stat span { color: var(--text-soft); font-size: 14.5px; }
@media (max-width: 860px) { .stats .wrap { grid-template-columns: repeat(2, 1fr); } .stat { border-inline-start: 0; border-top: 1px solid var(--line); } .stat:last-child { grid-column: 1 / -1; } }

/* ---------- 8) الأقسام ---------- */
.section { padding: 88px 0; border-bottom: 1px solid var(--line); }
.section.alt { background-color: var(--bg-2); }
.sec-head { max-width: 760px; margin-bottom: 44px; }
.sec-head.center { margin-inline: auto; text-align: center; }
.sec-head.center .eyebrow { justify-content: center; }
.sec-head h2 { font-size: clamp(28px, 3.6vw, 42px); margin-top: 10px; }
.sec-head p { color: var(--text-soft); margin-top: 14px; font-size: 17.5px; }
.ornament { display: flex; align-items: center; gap: 12px; color: var(--gold); margin: 18px auto 0; width: min(280px, 70%); }
.ornament::before, .ornament::after { content: ""; flex: 1; height: 1px; background: var(--line-strong); }
.ornament i { width: 8px; height: 8px; background: var(--gold); transform: rotate(45deg); }

.grid { display: grid; gap: 18px; }
.g-2 { grid-template-columns: repeat(2, 1fr); }
.g-3 { grid-template-columns: repeat(3, 1fr); }
.g-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1024px) { .g-4 { grid-template-columns: repeat(2, 1fr); } .g-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 680px) { .g-2, .g-3, .g-4 { grid-template-columns: 1fr; } }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px;
  transition: border-color .25s ease, transform .25s ease;
  min-width: 0;
}
.card:hover { border-color: var(--line-strong); }
.card .ico {
  width: 50px; height: 50px; border-radius: 14px; display: grid; place-items: center; font-size: 24px;
  color: var(--gold-text); background: var(--gold-soft); border: 1px solid var(--line-strong); margin-bottom: 16px;
}
.card h3 { font-size: 21px; }
.card p { color: var(--text-soft); margin-top: 8px; font-size: 15.5px; }
.ticks { list-style: none; display: grid; gap: 9px; margin-top: 16px; }
.ticks li { display: grid; grid-template-columns: 18px 1fr; gap: 10px; font-size: 15px; color: var(--text-soft); line-height: 1.65; }
.ticks li::before { content: ""; width: 7px; height: 7px; margin-top: 10px; background: var(--gold); transform: rotate(45deg); justify-self: center; }

/* خدمات النظام: بطاقة الفئة الأولى أعرض */
.services { grid-template-columns: repeat(3, 1fr); }
.services .card.wide { grid-column: span 2; }
.services .card.wide .ticks { grid-template-columns: 1fr 1fr; column-gap: 26px; }
@media (max-width: 1024px) { .services { grid-template-columns: repeat(2, 1fr); } .services .card.wide { grid-column: 1 / -1; } }
@media (max-width: 680px) { .services { grid-template-columns: 1fr; } .services .card.wide .ticks { grid-template-columns: 1fr; } }

/* الذكاء في التفاصيل */
.smart .card { padding: 22px; }
.smart .card .ico { width: 44px; height: 44px; font-size: 21px; border-radius: 12px; }
.smart .card h3 { font-size: 18px; }
.smart .card p { font-size: 14.8px; }

/* الفوائد: رقم/نتيجة بارزة */
.benefit { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: start; }
.benefit .ico { margin: 0; }

/* لماذا AI-ENG: ترقيم تحريري */
.why { counter-reset: why; }
.why .card { position: relative; padding-top: 30px; }
.why .card::before {
  counter-increment: why; content: counter(why, decimal-leading-zero);
  font: 800 44px/1 "Cairo", sans-serif; color: var(--gold-soft); -webkit-text-stroke: 1px var(--line-strong);
  position: absolute; inset-inline-end: 22px; top: 18px;
}

/* ---------- 9) ما يميزنا: بطاقات توقيعية + جدول مقارنة ---------- */
.signature .card { display: grid; gap: 6px; }
.signature .card .k { color: var(--gold-text); font-weight: 700; font-size: 13.5px; }
.compare-wrap { margin-top: 36px; border: 1px solid var(--line); border-radius: var(--radius); overflow-x: auto; background: var(--surface); }
.compare { width: 100%; border-collapse: collapse; min-width: 560px; }
.compare th, .compare td { padding: 14px 18px; text-align: start; border-bottom: 1px solid var(--line); font-size: 15.5px; }
.compare thead th { background: var(--surface-2); font-family: var(--f-display); font-weight: 600; font-size: 16.5px; }
.compare thead th.us { color: var(--gold-text); }
.compare td:not(:first-child), .compare th:not(:first-child) { text-align: center; width: 190px; }
.compare tr:last-child td { border-bottom: 0; }
.mark { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 14px; }
.mark.full { color: var(--green); } .mark.partial { color: var(--gold-text); } .mark.none { color: var(--red); }

/* ---------- 10) الإعلان ---------- */
.film { display: grid; grid-template-columns: .8fr 1.2fr; gap: 44px; align-items: center; }
.film video { width: 100%; aspect-ratio: 16 / 9; border-radius: var(--radius); border: 1px solid var(--line-strong); background: #000; box-shadow: var(--shadow); }
@media (max-width: 960px) { .film { grid-template-columns: 1fr; } }
/* زر "تشغيل الصوت" فوق الإعلان حين يمنع المتصفح التشغيل التلقائي بالصوت فيبدأ كاتماً */
.film-media { position: relative; }
.vid-sound {
  position: absolute; top: 14px; inset-inline-end: 14px; z-index: 2;
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px;
  border: 1px solid #C9A227; background: rgba(11, 11, 12, .8); color: #F1D77A; font: 700 14px var(--f-body); cursor: pointer;
}
.vid-sound:hover { background: rgba(201, 162, 39, .25); }
.vid-sound:focus-visible { outline: 2px solid #F1D77A; outline-offset: 3px; }
.vid-sound[hidden] { display: none; }

/* ---------- 11) الأدلة والمعايير ---------- */
.docs-band { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
.doc-list { display: grid; gap: 10px; }
.doc-item { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.doc-item i { color: var(--gold-text); font-size: 20px; }
.doc-item span { flex: 1; font-weight: 600; }
.mini-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 26px; }
.mini-stats div { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; background: var(--surface); }
.mini-stats b { display: block; font: 800 28px/1.2 "Cairo", sans-serif; color: var(--gold-text); }
.mini-stats span { color: var(--text-soft); font-size: 14px; }
@media (max-width: 960px) { .docs-band { grid-template-columns: 1fr; } }

/* ---------- 12) خارطة الطريق ---------- */
.roadmap { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.roadmap li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: grid; gap: 8px; align-content: start; }
.roadmap .st { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.roadmap .st b { font: 800 15px "Cairo", sans-serif; color: var(--gold-text); }
.roadmap h3 { font-size: 18px; }
.roadmap p { color: var(--text-soft); font-size: 14.5px; }
@media (max-width: 1024px) { .roadmap { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .roadmap { grid-template-columns: 1fr; } }
.note { margin-top: 22px; color: var(--mute); font-size: 14.5px; display: flex; gap: 10px; align-items: flex-start; }
.note i { color: var(--gold-text); margin-top: 3px; }

/* ---------- 13) طلب عرض السعر (يُرسل عبر واتساب) ---------- */
.quote { display: grid; grid-template-columns: .85fr 1.15fr; gap: 44px; align-items: start; }
.quote-form { background: var(--surface); border: 1px solid var(--line-strong); border-radius: 20px; padding: 28px; display: grid; gap: 18px; }
.field { display: grid; gap: 8px; }
.field label, .field legend { font-weight: 700; font-size: 15px; color: var(--gold-text); padding: 0; }
.field label i, .field legend i { font-size: .9em; margin-inline-end: 6px; opacity: .85; }
.req::after { content: " *"; color: var(--red); }
.input, .select, .textarea {
  width: 100%; min-height: 48px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--bg-2); color: var(--text); font: 500 16px var(--f-body);
}
.textarea { min-height: 96px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
.input[aria-invalid="true"] { border-color: var(--red); }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 680px) { .quote { grid-template-columns: 1fr; } .row-2 { grid-template-columns: 1fr; } }
fieldset.field { border: 0; margin: 0; padding: 0; min-width: 0; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { position: relative; }
.pill input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.pill > span {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--bg-2); color: var(--text-soft); font-weight: 600; font-size: 14.5px; cursor: pointer;
}
.pill input:checked + span { border-color: var(--gold); color: var(--gold-text); background: var(--gold-soft); }
.pill input:focus-visible + span { outline: 2px solid var(--gold-text); outline-offset: 2px; }
.pill input:checked + span .soon { color: var(--gold-text); }
.pill .soon { font-size: 11.5px; color: var(--mute); font-weight: 700; }
.form-msg { min-height: 1.5em; font-size: 14.5px; color: var(--red); }
.privacy { color: var(--mute); font-size: 13.5px; }

/* ---------- 14) الأسئلة الشائعة ---------- */
.faq { display: grid; gap: 12px; max-width: 900px; margin-inline: auto; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.faq summary {
  list-style: none; cursor: pointer; padding: 18px 22px; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  font-weight: 700; font-size: 16.5px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 400 26px/1 "Cairo", sans-serif; color: var(--gold-text); transition: transform .2s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details[open] { border-color: var(--line-strong); }
.faq .a { padding: 0 22px 20px; color: var(--text-soft); }

/* ---------- 15) التواصل والتذييل ---------- */
.cta-band { padding: 80px 0; text-align: center; }
.cta-band h2 { font-size: clamp(28px, 3.6vw, 44px); }
.cta-band p { color: var(--text-soft); margin: 14px auto 0; max-width: 60ch; font-size: 17.5px; }
.cta-band .ctas { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 28px; }
.phone { font: 700 20px "Cairo", sans-serif; color: var(--text); margin-top: 18px; }
.footer { border-top: 1px solid var(--line); padding: 40px 0 28px; background: var(--bg-2); }
.footer .cols { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 28px; }
.footer h4 { font-family: var(--f-body); font-size: 15px; color: var(--gold-text); margin-bottom: 12px; }
.footer ul { list-style: none; display: grid; gap: 8px; }
.footer a { color: var(--text-soft); }
.footer a:hover { color: var(--gold-text); }
.footer p { color: var(--mute); font-size: 14.5px; margin-top: 12px; }
.copy { border-top: 1px solid var(--line); margin-top: 28px; padding-top: 18px; color: var(--mute); font-size: 13.5px; text-align: center; }
@media (max-width: 760px) { .footer .cols { grid-template-columns: 1fr; } }

/* زر واتساب العائم */
.wa-float {
  position: fixed; inset-inline-end: 20px; bottom: 20px; z-index: 60;
  width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center;
  background: var(--gold); color: var(--on-gold); font-size: 28px; box-shadow: var(--shadow);
  transition: transform .2s ease;
}
.wa-float:hover { transform: scale(1.06); text-decoration: none; }

/* ---------- 16) الظهور عند التمرير (يحترم تقليل الحركة) ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .card, .wa-float { transition: none; }
}
.no-js .reveal { opacity: 1; transform: none; }

/* ---------- 17) خلفيات الأقسام: نجوم تضيء، أو نقش ثابت (Fixed) يناسب موضوع القسم ---------- */
/* أقسام النجوم "شريط ليل" في المظهرين (رموزها من كتلة الغامق أعلاه)، واللوحة يرسمها js/stars.js خلف المحتوى */
.bg-stars { position: relative; isolation: isolate; background-color: #08080A; color: var(--text); }
.bg-stars > canvas.stars { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
/* النقش يثبت مكانه والمحتوى يمر فوقه (في iOS يتمرر مع الصفحة - تراجع مقبول) */
.bg-fixed { background-image: var(--pat); background-attachment: fixed; background-repeat: repeat; background-position: center top; }
.pat-blueprint { --pat: url("../img/patterns/blueprint.svg"); }
.pat-ledger { --pat: url("../img/patterns/ledger.svg"); }
.pat-geometric { --pat: url("../img/patterns/geometric.svg"); }
.pat-circuit { --pat: url("../img/patterns/circuit.svg"); }
.pat-mapgrid { --pat: url("../img/patterns/mapgrid.svg"); }
.pat-hex { --pat: url("../img/patterns/hex.svg"); }
/* في الفاتح النقوش رمادية محايدة (img/patterns/light) حتى تبقى الخلفية بيضاء لا ذهبية */
:root[data-theme="light"] .pat-blueprint { --pat: url("../img/patterns/light/blueprint.svg"); }
:root[data-theme="light"] .pat-ledger { --pat: url("../img/patterns/light/ledger.svg"); }
:root[data-theme="light"] .pat-geometric { --pat: url("../img/patterns/light/geometric.svg"); }
:root[data-theme="light"] .pat-circuit { --pat: url("../img/patterns/light/circuit.svg"); }
:root[data-theme="light"] .pat-mapgrid { --pat: url("../img/patterns/light/mapgrid.svg"); }
:root[data-theme="light"] .pat-hex { --pat: url("../img/patterns/light/hex.svg"); }

/* ---------- 18) قلب النظام: مكونات تدور حول الأستاذ العام وتتحدث وتضيء (js/engine.js) ---------- */
.engine-wrap { display: grid; grid-template-columns: .85fr 1.15fr; gap: 48px; align-items: center; }
@media (max-width: 960px) { .engine-wrap { grid-template-columns: 1fr; gap: 28px; } }
.engine-copy h2 { font-size: clamp(28px, 3.6vw, 42px); margin-top: 10px; }
.engine-copy > p { color: var(--text-soft); margin-top: 14px; font-size: 17.5px; }
.talk-box { margin-top: 24px; border: 1px solid var(--line-strong); border-radius: 16px; padding: 16px 18px; background: var(--surface); min-height: 132px; }
.talk-who { display: flex; align-items: center; gap: 10px; color: var(--gold-text); font-weight: 700; font-size: 15px; }
.talk-who i { font-size: 19px; }
.talk-line { margin-top: 8px; color: var(--text); font-size: 16.5px; }
.engine-ctrls { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.engine-ctrls .btn[aria-pressed="true"] { border-color: var(--gold); color: var(--gold-text); background: var(--gold-soft); }

.engine { position: relative; width: min(100%, 600px); aspect-ratio: 1; margin-inline: auto; container-type: inline-size; }
.engine svg.rings, .engine .orbit > svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.engine .rot { transform-box: view-box; transform-origin: 50% 50%; }
.engine .rot.cw { animation: eng-spin 120s linear infinite; }
.engine .rot.ccw { animation: eng-spin-rev 80s linear infinite; }
.engine .rot.gear { animation: eng-spin 48s linear infinite; }
.engine .orbit { position: absolute; inset: 0; --R: 38cqi; animation: eng-spin 150s linear infinite; }
.engine .node {
  position: absolute; left: 50%; top: 50%; width: 17cqi; height: 17cqi; margin: -8.5cqi 0 0 -8.5cqi; padding: 0;
  transform: rotate(var(--a)) translateY(calc(-1 * var(--R))) rotate(calc(-1 * var(--a)));
  border-radius: 50%; border: 1.5px solid var(--line-strong); background: #121215; color: var(--text-soft);
  font: inherit; cursor: pointer; transition: border-color .35s ease, box-shadow .35s ease, background-color .35s ease, color .35s ease;
}
.engine .node-in { display: grid; place-items: center; align-content: center; gap: 1px; width: 100%; height: 100%; animation: eng-spin-rev 150s linear infinite; transition: scale .35s ease; }
.engine .node i { font-size: 5.4cqi; color: var(--gold-text); line-height: 1; }
.engine .node b { font-size: clamp(9.5px, 2.25cqi, 13px); font-weight: 700; line-height: 1.25; max-width: 92%; }
.engine .node:hover { border-color: var(--gold); color: var(--text); }
.engine .node:focus-visible { outline: 2px solid var(--gold-text); outline-offset: 4px; }
.engine .node.is-talking { border-color: var(--gold); color: var(--text); background: #1E1A0E; box-shadow: 0 0 0 5px rgba(201, 162, 39, .16), 0 0 34px rgba(230, 199, 90, .55); }
.engine .node.is-talking .node-in { scale: 1.07; }
.engine .core { position: absolute; left: 50%; top: 50%; width: 24cqi; height: 24cqi; transform: translate(-50%, -50%); display: grid; place-items: center; align-content: center; gap: 2px; text-align: center; pointer-events: none; }
.engine .core i { font-size: 6.4cqi; color: var(--gold-text); line-height: 1; }
.engine .core b { font-family: var(--f-display); font-size: clamp(11px, 2.9cqi, 17px); font-weight: 600; line-height: 1.3; }
.engine .core small { font-size: clamp(9px, 2cqi, 12px); color: var(--green); font-weight: 700; opacity: 0; transition: opacity .3s ease; min-height: 1.3em; }
.engine.core-flash .core small { opacity: 1; }
.engine .hexcore { fill: #101013; stroke: #C9A227; stroke-width: 2.5; transition: stroke .3s ease; }
.engine.core-flash .hexcore { stroke: #F1D77A; filter: url(#eng-glow); }
.engine .spoke { stroke: rgba(201, 162, 39, .26); stroke-width: 1.6; stroke-dasharray: 3 9; transition: stroke .3s ease; }
.engine .spoke.is-on { stroke: rgba(241, 215, 122, .9); stroke-dasharray: none; stroke-width: 2.4; }
.engine .pulse { fill: #E6C75A; }
.engine .tpulse { fill: #FFF3C4; filter: url(#eng-glow); opacity: 0; }
.engine .tpulse.is-on { opacity: 1; }
.eng-bubble {
  position: absolute; z-index: 3; left: 0; top: 0; max-width: min(270px, 74cqi); padding: 10px 14px; border-radius: 14px;
  background: #FBF8F1; color: #1C1A16; border: 1px solid #C9A227; box-shadow: 0 12px 28px rgba(0, 0, 0, .45);
  font-size: 14px; line-height: 1.6; font-weight: 600; pointer-events: none; opacity: 0; transition: opacity .3s ease;
}
.eng-bubble.is-on { opacity: 1; }
.eng-bubble::after {
  content: ""; position: absolute; left: calc(var(--tail, 50%) - 7px); top: -7px; width: 12px; height: 12px;
  background: #FBF8F1; border-left: 1px solid #C9A227; border-top: 1px solid #C9A227; transform: rotate(45deg);
}
.eng-bubble.above::after { top: auto; bottom: -7px; transform: rotate(225deg); }
.engine.is-paused .orbit, .engine.is-paused .node-in, .engine.is-paused .rot { animation-play-state: paused; }
@keyframes eng-spin { to { transform: rotate(360deg); } }
@keyframes eng-spin-rev { to { transform: rotate(-360deg); } }
@media (prefers-reduced-motion: reduce) {
  .engine .orbit, .engine .node-in, .engine .rot { animation: none; }
}

/* ---------- 19) الطباعة ---------- */
@media print {
  .topbar, .wa-float, .menu-btn, .quote-form, video { display: none !important; }
  body { background: #fff; color: #000; }
  .section { padding: 24px 0; }
}

/* ---------- الشعار صورةً: نسخة لكل مظهر (الغامق: حروف AI فاتحة على الأسود؛ الفاتح: حروف داكنة) بلا لوح أبيض ----------
   كلمة AI-ENG في الرأس والتذييل والعنوان الكبير هي الشعار نفسه لا خطاً مكتوباً؛ والاسم بجواره بلا تكرار الكلمة. */
html[data-theme="light"] .on-dark, html:not([data-theme="light"]) .on-light { display: none; }
.logo-art, .brand-word { display: inline-flex; align-items: center; flex: none; line-height: 0; }
.logo-art picture, .brand-word picture { display: block; }
.logo-art img { height: 30px; width: auto; max-width: none; }
.logo-foot img { height: 36px; }
.hero-title { display: grid; justify-items: start; gap: 6px; }
.brand-word img { height: clamp(58px, 7.4vw, 104px); width: auto; max-width: 100%; }
html:not([data-theme="light"]) .brand-word img { filter: drop-shadow(0 6px 22px rgba(201, 162, 39, .22)); }
.hero-title-text { font-size: clamp(30px, 4.2vw, 50px); }
@media (max-width: 600px) { .logo-art img { height: 26px; } }
