@import url('https://fonts.googleapis.com/css2?family=Amiri:wght@400;700&family=IBM+Plex+Sans+Arabic:wght@300;400;500;600;700&display=swap');

/* ============================================================
   جليس — نظام التصميم
   لغة بصرية: وقار وفخامة هادئة.
   بنفسجي الشعار أساسًا · بني للتفاصيل · أخضر للتأكيدات · عاج دافئ · زخرفة هندسية.
   كل الألوان والمسافات والخطوط متغيرات، تُستبدل بالهوية المعتمدة من مكان واحد.
   ============================================================ */

/* الهوية مبنية على لون الشعار البنفسجي، مع الأخضر والبني اللذين طلبهما العميل
   كلونين مساندين: البني للتفاصيل والخيوط، والأخضر للتأكيدات والمقاعد المتاحة. */
:root {
  /* البنفسجي — لون الشعار، وهو اللون الأساسي */
  --brand:        #301267;
  --brand-2:      #472A8C;
  --brand-dark:   #24104E;
  --brand-soft:   #EFEAF7;

  /* الأخضر — مساند: النجاح والتوافر */
  --green:        #2E6B47;
  --green-soft:   #E7F1EA;

  /* البني — اللون الثاني: خيوط، وعناوين صغيرة، وتفاصيل.
     أسماء المتغيرات بقيت gold لتفادي تغيير مئات المواضع. */
  --gold:         #8B5E34;
  --gold-2:       #C89B6A;
  --gold-soft:    #F6EFE6;

  /* البنفسجي — لون الشعار، يُستعمل بخِسّة شديدة في تفاصيل مختارة */
  --plum:         #301267;
  --plum-2:       #4B2A8A;
  --plum-soft:    #EFEAF7;

  /* الحبر والخلفيات */
  --ink:          #1A2420;
  --ink-2:        #5C6C66;
  --ink-3:        #8A9691;
  --line:         #E6DFD1;
  --line-2:       #F0EBE0;
  --bg:           #FCFAF6;
  --bg-2:         #F5F1E8;
  --bg-3:         #EFE9DC;
  --surface:      #FFFFFF;

  --ok:           #1B6B45;
  --danger:       #9B2C2C;

  /* ألوان الرسوم البيانية */
  --chart-1: #301267; --chart-2: #2E6B47; --chart-3: #8B5E34; --chart-4: #C89B6A; --chart-5: #6B4A9E;

  /* الشكل */
  --radius:       16px;
  --radius-lg:    26px;
  --radius-sm:    10px;
  --shadow:       0 1px 1px rgba(26,36,32,.03), 0 10px 30px -18px rgba(26,36,32,.30);
  --shadow-lg:    0 2px 4px rgba(26,36,32,.04), 0 30px 70px -32px rgba(26,36,32,.40);
  --ring:         0 0 0 1px var(--line);

  --maxw:         1200px;

  /* الخط والمقاس بطلب جليس: Times New Roman مقاس ١٦ (≈ ٢١ بكسل).
     TNR غير مثبّت على أندرويد وأغلب الجوالات، ولا يدعم العربية دعمًا جيدًا،
     فوُضع خط أميري العربي بديلًا يتولّى العرض تلقائيًا عند غيابه. */
  --fs-base:      21px;
  --font-display: "Times New Roman", "Amiri", serif;
  --font-body:    "Times New Roman", "Amiri", "Segoe UI", serif;

  /* الطبقة الزخرفية الهندسية أُزيلت بطلب العميل:
     صُمّمت للهوية الخضراء السابقة، وبدت دخيلة بعد اعتماد بنفسجي الشعار.
     تُركت المتغيرات لتُعاد بقيمة واحدة إن طُلبت لاحقًا. */
  --pattern: none;
  --medallion: none;
  --band: none;
}

/* تعريفات الزخرفة السابقة — معطّلة */
:root.legacy-ornament {

  /* 1 · الشبكة الدقيقة: نجمة ثمانية + دائرة مركزية + معيّنات على التقاطعات */
  --pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='72' viewBox='0 0 72 72'%3E%3Cg fill='none' stroke='%238B5E34' stroke-width='.9'%3E%3Crect x='18' y='18' width='36' height='36'/%3E%3Crect x='18' y='18' width='36' height='36' transform='rotate(45 36 36)'/%3E%3Ccircle cx='36' cy='36' r='6.5'/%3E%3C/g%3E%3Cg fill='%238B5E34'%3E%3Cpath d='M0 -5L5 0L0 5L-5 0Z'/%3E%3Cpath d='M72 -5L77 0L72 5L67 0Z'/%3E%3Cpath d='M0 67L5 72L0 77L-5 72Z'/%3E%3Cpath d='M72 67L77 72L72 77L67 72Z'/%3E%3C/g%3E%3C/svg%3E");

  /* 2 · ميدالية كبيرة تُستخدم مرة واحدة كعلامة مائية */
  --medallion: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='520' height='520' viewBox='0 0 520 520'%3E%3Cg fill='none' stroke='%23C89B6A' stroke-width='1.4'%3E%3Ccircle cx='260' cy='260' r='250'/%3E%3Ccircle cx='260' cy='260' r='214'/%3E%3Crect x='110' y='110' width='300' height='300'/%3E%3Crect x='110' y='110' width='300' height='300' transform='rotate(45 260 260)'/%3E%3Crect x='152' y='152' width='216' height='216'/%3E%3Crect x='152' y='152' width='216' height='216' transform='rotate(45 260 260)'/%3E%3Ccircle cx='260' cy='260' r='76'/%3E%3Ccircle cx='260' cy='260' r='40'/%3E%3C/g%3E%3C/svg%3E");

  /* 3 · شريط زخرفي أفقي للفواصل */
  --band: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='16' viewBox='0 0 48 16'%3E%3Cg fill='none' stroke='%238B5E34' stroke-width='1'%3E%3Cpath d='M0 8h8'/%3E%3Crect x='16' y='2' width='12' height='12' transform='rotate(45 22 8)'/%3E%3Cpath d='M36 8h12'/%3E%3C/g%3E%3C/svg%3E");
}

/* وضع التباين العالي — يتقدّم على كل ما عداه */
html[data-contrast="high"] {
  --brand: #1A0A38; --brand-2: #1A0A38; --brand-dark: #12062A; --brand-soft: #FFFFFF;
  --gold: #6B4A15; --gold-2: #6B4A15; --gold-soft: #FFFFFF;
  --ink: #000000; --ink-2: #141414; --ink-3: #333333;
  --line: #000000; --line-2: #000000;
  --bg: #FFFFFF; --bg-2: #FFFFFF; --bg-3: #FFFFFF; --surface: #FFFFFF;
  --shadow: 0 0 0 2px #000; --shadow-lg: 0 0 0 3px #000; --ring: 0 0 0 2px #000;
  --pattern: none; --medallion: none; --band: none;
  --plum: #2A0F5A; --plum-2: #2A0F5A; --plum-soft: #FFFFFF;
  --chart-1: #000000; --chart-2: #2B2B2B; --chart-3: #4D4D4D; --chart-4: #6B6B6B; --chart-5: #1A1A1A;
}
html[data-contrast="high"] .card,
html[data-contrast="high"] .panel,
html[data-contrast="high"] .site-header { border: 2px solid #000; }

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { font-size: var(--fs-base); scroll-behavior: smooth; }
html[data-font="1"]  { --fs-base: 24px; }
html[data-font="2"]  { --fs-base: 27px; }
html[data-font="-1"] { --fs-base: 18px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.9;
  letter-spacing: .002em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---------- الطباعة ---------- */
h1, h2, h3, h4 { margin: 0 0 .55em; color: var(--brand-dark); font-weight: 700; text-wrap: balance; }
h1, h2 { font-family: var(--font-display); line-height: 1.32; letter-spacing: 0; }
h1 { font-size: clamp(2.25rem, 1.5rem + 3vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 1.25rem + 1.9vw, 2.5rem); }
h3 { font-size: 1.2rem; line-height: 1.5; font-weight: 600; }
h4 { font-size: 1.02rem; font-weight: 600; }
p  { margin: 0 0 1.05em; }
a  { color: var(--brand-2); text-decoration-thickness: 1px; text-underline-offset: .28em; }
a:hover { color: var(--gold); }
img { max-width: 100%; display: block; }
ul, ol { padding-inline-start: 1.35em; }
li { margin-bottom: .45em; }
strong { font-weight: 600; }
code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .86em; }

.lead {
  font-size: 1.12rem;
  line-height: 1.95;
  color: var(--ink-2);
  font-weight: 300;
}

:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; border-radius: 4px; }

.wrap { width: min(100% - 2.5rem, var(--maxw)); margin-inline: auto; }
.muted { color: var(--ink-2); }
.center { text-align: center; }

/* يُخفى بإزاحته للأعلى لا للجانب: في RTL تعني الإزاحة الجانبية right:-9999px،
   فيتّسع عرض الصفحة على الجوال ويُقصّ طرفها الأيمن حيث يبدأ النص العربي. */
.skip-link {
  position: absolute; inset-inline-start: 1.5rem; top: 0; z-index: 99;
  transform: translateY(-120%); transition: transform .15s ease;
  background: var(--brand-dark); color: #fff; padding: .8rem 1.4rem; border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}
.skip-link:focus { transform: translateY(0); color: #fff; }

/* ---------- عناصر زخرفية مشتركة ---------- */

/* عنوان صغير بخيط ذهبي */
.eyebrow {
  display: inline-flex; align-items: center; gap: .6rem;
  font-size: .76rem; font-weight: 600; letter-spacing: .18em;
  color: var(--gold); text-transform: none; margin-bottom: 1rem;
}
.eyebrow::before {
  content: ""; width: 34px; height: 1px; background: linear-gradient(90deg, transparent, var(--gold));
}

/* فاصل بسيط: خيط رفيع متلاشٍ، بلا أي شكل هندسي */
.ornament {
  display: block; height: 1px; max-width: 220px; margin: 0 auto 2.4rem;
  background: linear-gradient(90deg, transparent, var(--gold), transparent); opacity: .45;
}
.ornament svg, .ornament::before, .ornament::after { display: none; }
.ornament::before, .ornament::after {
  content: ""; flex: 1; height: 9px;
  background-image: var(--band); background-size: 48px 16px; background-repeat: repeat-x;
  background-position: center; opacity: .5;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 45%, #000 55%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 45%, #000 55%, transparent);
}
.ornament svg { display: block; flex: none; opacity: .85; }

/* رقعة زخرفية خافتة مع تلاشٍ عند الحواف */
.pattern-bg { position: relative; isolation: isolate; }
.pattern-bg::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image: var(--pattern); background-size: 72px 72px;
  opacity: .055; pointer-events: none;
  -webkit-mask-image: radial-gradient(120% 80% at 50% 0%, #000 0%, transparent 78%);
  mask-image: radial-gradient(120% 80% at 50% 0%, #000 0%, transparent 78%);
}

/* ---------- أدوات تسهيل القراءة: زر عائم + لوحة منسدلة ---------- */
.a11y-dock { position: fixed; inset-inline-start: 1.1rem; bottom: 1.1rem; z-index: 70; }
.a11y-fab {
  width: 50px; height: 50px; border-radius: 50%; cursor: pointer;
  display: grid; place-items: center; color: #fff;
  background: var(--brand); border: 1px solid rgba(255,255,255,.18);
  box-shadow: 0 12px 28px -12px rgba(36,16,78,.8); transition: transform .2s ease, background .2s ease;
}
.a11y-fab:hover { background: var(--brand-2); transform: translateY(-2px); }
.a11y-panel {
  position: absolute; bottom: calc(100% + .6rem); inset-inline-start: 0;
  display: flex; align-items: center; gap: .5rem; flex-wrap: wrap;
  width: max-content; max-width: 78vw;
  background: var(--brand-dark); color: rgba(255,255,255,.85);
  border: 1px solid rgba(200,155,106,.35); border-radius: 999px;
  padding: .5rem .8rem; box-shadow: 0 18px 40px -18px rgba(0,0,0,.65);
}
.a11y-panel .a11y-label { color: rgba(255,255,255,.6); font-size: .78rem; }
@media print { .a11y-dock { display: none; } }

/* الشريط العلوي القديم — لم يعد مستخدمًا، وتُركت أنماطه للرجوع إن طُلب */
.a11y-bar {
  background: var(--brand-dark); color: rgba(255,255,255,.78);
  font-size: .78rem; letter-spacing: .01em;
  border-bottom: 1px solid rgba(217,188,126,.22);
}
.a11y-inner { display: flex; align-items: center; gap: .65rem; flex-wrap: wrap; padding: .5rem 0; }
.a11y-label { color: rgba(255,255,255,.55); }
.a11y-group { display: flex; gap: .25rem; }
.a11y-btn {
  background: transparent; color: rgba(255,255,255,.85);
  border: 1px solid rgba(217,188,126,.3); border-radius: 7px;
  padding: .28rem .72rem; cursor: pointer; font: inherit;
  min-height: 34px; min-width: 42px; transition: all .18s ease;
}
.a11y-btn:hover { border-color: var(--gold-2); color: #fff; background: rgba(217,188,126,.12); }
.a11y-btn[aria-pressed="true"] { background: var(--gold-2); border-color: var(--gold-2); color: var(--brand-dark); font-weight: 600; }
.a11y-note { margin-inline-start: auto; color: rgba(255,255,255,.4); font-size: .74rem; }

/* ---------- الترويسة (صفّان: هوية + قائمة) ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(16px) saturate(1.25);
  border-bottom: 1px solid var(--line);
}
.header-top-inner { display: flex; align-items: center; gap: 1.2rem; padding: .95rem 0; }

.brand { display: flex; align-items: center; gap: .85rem; text-decoration: none; color: inherit; }
.brand-mark { display: block; flex: none; }
/* شعار جليس الرسمي */
.brand-logo { display: block; height: 58px; width: auto; flex: none; }
.brand-text strong {
  display: block; font-family: var(--font-display); font-size: 1.6rem;
  color: var(--brand-dark); line-height: 1.1; font-weight: 700;
}
.brand-text small {
  display: block; font-size: .62rem; color: var(--gold);
  letter-spacing: .1em; font-weight: 500; margin-top: .2rem; white-space: nowrap;
}

.header-aside { margin-inline-start: auto; display: flex; align-items: center; gap: 1.4rem; }
.header-contact {
  display: flex; flex-direction: column; align-items: flex-end;
  font-size: .8rem; line-height: 1.5; color: var(--ink-2); text-align: end;
}
.header-contact b { color: var(--brand-dark); font-weight: 600; letter-spacing: .02em; }
.header-contact span { color: var(--ink-3); font-size: .74rem; }

/* صف القائمة */
.header-nav { border-top: 1px solid var(--line-2); }
.header-nav > .wrap { display: flex; justify-content: center; }
.main-nav ul { display: flex; flex-wrap: nowrap; gap: 0; list-style: none; margin: 0; padding: 0; }
.main-nav li { margin: 0; }
/* مقاس ثابت لا يتبع مقاس النص (٢١ بكسل) وإلا لم تتسع القائمة لاثني عشر رابطًا */
.main-nav a {
  position: relative; display: block; padding: .8rem .6rem;
  text-decoration: none; color: var(--ink-2); font-size: 15px; font-weight: 500;
  white-space: nowrap; transition: color .18s ease;
}
.main-nav a::after {
  content: ""; position: absolute; inset-inline: .6rem; bottom: .42rem; height: 1px;
  background: var(--gold); transform: scaleX(0); transform-origin: right; transition: transform .25s ease;
}
.main-nav a:hover { color: var(--brand-dark); }
.main-nav a:hover::after { transform: scaleX(1); }
.main-nav a[aria-current="page"] { color: var(--brand-dark); font-weight: 600; }
.main-nav a[aria-current="page"]::after { transform: scaleX(1); }

.nav-toggle { display: none; }

@media (max-width: 1180px) {
  .header-contact { display: none; }
}
@media (max-width: 1060px) {
  .nav-toggle {
    display: inline-flex; align-items: center; gap: .55rem;
    background: transparent; border: 1px solid var(--line); color: var(--brand-dark);
    border-radius: var(--radius-sm); padding: .55rem 1rem; font: inherit; font-size: .88rem;
    cursor: pointer; min-height: 46px;
  }
  .nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
    display: block; width: 18px; height: 1.5px; background: currentColor; content: ""; position: relative;
  }
  .nav-toggle-bars::before { top: -6px; } .nav-toggle-bars::after { top: 4.5px; }
  .header-nav { display: none; }
  .header-nav.open { display: block; }
  .header-nav > .wrap { display: block; }
  .main-nav ul { flex-wrap: wrap; flex-direction: column; padding: .4rem 0 .9rem; }
  .main-nav a { padding: .8rem .3rem; font-size: 1rem; border-bottom: 1px solid var(--line-2); }
  .main-nav a::after { display: none; }
}
@media (max-width: 560px) {
  /* مُحدِّد أعلى من .btn الذي يأتي لاحقًا في الملف ويفرض display:inline-flex */
  .header-aside .header-cta { display: none; }
  .brand-text strong { font-size: 1.55rem; }
}

/* ---------- الأزرار ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  min-height: 52px; padding: .78rem 1.9rem; border-radius: 999px;
  font: inherit; font-size: .95rem; font-weight: 600; text-decoration: none;
  cursor: pointer; border: 1px solid transparent; letter-spacing: .01em;
  white-space: nowrap; line-height: 1.2; text-align: center;
  transition: background .2s ease, color .2s ease, border-color .2s ease, transform .15s ease, box-shadow .25s ease;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: linear-gradient(160deg, var(--brand-2), var(--brand) 60%, var(--brand-dark));
  color: #fff; box-shadow: 0 10px 28px -14px rgba(14,59,51,.85);
}
.btn-primary:hover { color: #fff; box-shadow: 0 16px 34px -14px rgba(14,59,51,.9); }

.btn-ghost { background: transparent; color: var(--brand-dark); border-color: var(--gold); }
.btn-ghost:hover { background: var(--gold-soft); color: var(--brand-dark); border-color: var(--gold); }

.btn-accent { background: var(--gold); color: #fff; }
.btn-accent:hover { background: #8E6C36; color: #fff; }

.btn-sm { min-height: 42px; padding: .45rem 1.15rem; font-size: .85rem; }

/* ---------- الأقسام ---------- */
.section { padding: clamp(3.2rem, 2rem + 4.5vw, 6rem) 0; }
.section-alt { background: var(--bg-2); position: relative; isolation: isolate; }
.section-alt::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: var(--pattern); background-size: 72px 72px; opacity: .05;
  -webkit-mask-image: radial-gradient(130% 100% at 50% 0%, #000 0%, transparent 82%);
  mask-image: radial-gradient(130% 100% at 50% 0%, #000 0%, transparent 82%);
}
.section-alt > .wrap { position: relative; }
.section-head { max-width: 64ch; margin-bottom: 2.8rem; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head.center .eyebrow { justify-content: center; }
.section-head.center .eyebrow::after {
  content: ""; width: 34px; height: 1px; background: linear-gradient(270deg, transparent, var(--gold));
}
.section-head p { color: var(--ink-2); font-weight: 300; }

/* ---------- الواجهة الرئيسية ---------- */
.hero {
  position: relative;
  background:
    radial-gradient(120% 90% at 85% 0%, rgba(71,42,140,.45) 0%, transparent 55%),
    linear-gradient(170deg, var(--brand-dark) 0%, var(--brand) 55%, #24104E 100%);
  color: #fff;
  padding: clamp(3.4rem, 2rem + 5vw, 6rem) 0 clamp(3rem, 2rem + 3vw, 4.5rem);
  overflow: hidden;
}
/* الشبكة الدقيقة، متلاشية نحو الأسفل */
.hero::before {
  content: ""; position: absolute; inset: 0;
  background-image: var(--pattern); background-size: 72px 72px; opacity: .085; pointer-events: none;
  -webkit-mask-image: linear-gradient(190deg, #000 0%, rgba(0,0,0,.35) 55%, transparent 92%);
  mask-image: linear-gradient(190deg, #000 0%, rgba(0,0,0,.35) 55%, transparent 92%);
}
/* الميدالية الكبيرة كعلامة مائية + خيط ذهبي في الأسفل */
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: var(--medallion);
  background-repeat: no-repeat;
  background-position: calc(100% + 170px) -150px;
  background-size: 520px 520px;
  opacity: .16;
}
.hero-rule {
  position: absolute; inset-inline: 0; bottom: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-2), transparent); opacity: .5;
}
.hero > .wrap { position: relative; z-index: 1; }
.hero h1 { color: #fff; margin-bottom: .5em; }
.hero .eyebrow { color: var(--gold-2); }
.hero .eyebrow::before { background: linear-gradient(90deg, transparent, var(--gold-2)); }
.hero .lead { color: rgba(255,255,255,.82); max-width: 50ch; }
.hero-grid { display: grid; grid-template-columns: 1.08fr .92fr; gap: 3.5rem; align-items: center; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: 2.1rem; }

/* أزرار الواجهة — محصورة في .hero-actions حتى لا تتسرّب إلى البطاقة البيضاء */
.hero-actions .btn-primary { background: var(--gold-2); color: var(--brand-dark); box-shadow: 0 14px 34px -16px rgba(217,188,126,.9); }
.hero-actions .btn-primary:hover { background: #E7CE96; color: var(--brand-dark); }
.hero-actions .btn-ghost { color: #fff; border-color: rgba(217,188,126,.55); }
.hero-actions .btn-ghost:hover { background: rgba(217,188,126,.12); color: #fff; border-color: var(--gold-2); }

@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .hero::after { background-position: calc(100% + 240px) -220px; opacity: .1; }
}

/* ---------- دعم الصور: مواضع جاهزة تظهر فور توفّر صور حقيقية ---------- */

/* صورة خلفية للواجهة، والنص يبقى مقروءًا فوقها بتدرّج من جهة القراءة */
.hero.has-photo {
  background-image:
    linear-gradient(to left, var(--brand-dark) 0%, rgba(36,16,78,.92) 38%, rgba(36,16,78,.30) 100%),
    var(--hero-photo);
  background-size: cover, cover;
  background-position: center, 22% center;
}
@media (max-width: 960px) {
  /* على الجوال يغطي التدرّج الصورة كلها حتى لا يضيع النص فوق وجه أو تفصيل */
  .hero.has-photo {
    background-image:
      linear-gradient(to bottom, rgba(36,16,78,.93), rgba(36,16,78,.97)),
      var(--hero-photo);
  }
}

/* صورة داخل البطاقة */
.card-photo {
  display: block; aspect-ratio: 16 / 10; width: 100%; overflow: hidden;
  border-radius: 12px; margin-bottom: 1.1rem; background: var(--bg-3);
}
.card-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s cubic-bezier(.22,1,.36,1); }
.card:hover .card-photo img { transform: scale(1.04); }

/* شريط صورة عريض بين الأقسام */
.photo-band {
  position: relative; min-height: 340px; display: grid; place-items: center;
  background-size: cover; background-position: center; color: #fff; text-align: center;
}
.photo-band::before { content: ""; position: absolute; inset: 0; background: rgba(36,16,78,.72); }
.photo-band .wrap { position: relative; padding: 3.5rem 0; }
.photo-band h2 { color: #fff; }
.photo-band p { color: rgba(255,255,255,.85); max-width: 58ch; margin-inline: auto; }
figure.photo { margin: 0; }
figure.photo figcaption { font-size: .82rem; color: var(--ink-3); margin-top: .6rem; text-align: center; }

/* بطاقة الجلسات داخل الواجهة */
.hero-card {
  position: relative; color: var(--ink);
  background: linear-gradient(175deg, #FFFFFF 0%, #FBF7EE 100%);
  border: 1px solid rgba(217,188,126,.45); border-radius: var(--radius-lg);
  padding: 2.1rem 2rem; box-shadow: 0 44px 90px -44px rgba(0,0,0,.72);
}
/* أقواس ذهبية في الزوايا الأربع بدل الإطار الكامل */
.hero-card::before {
  content: ""; position: absolute; inset: 11px; pointer-events: none; opacity: .8;
  background:
    linear-gradient(var(--gold), var(--gold)) top left    / 16px 1px no-repeat,
    linear-gradient(var(--gold), var(--gold)) top left    / 1px 16px no-repeat,
    linear-gradient(var(--gold), var(--gold)) top right   / 16px 1px no-repeat,
    linear-gradient(var(--gold), var(--gold)) top right   / 1px 16px no-repeat,
    linear-gradient(var(--gold), var(--gold)) bottom left / 16px 1px no-repeat,
    linear-gradient(var(--gold), var(--gold)) bottom left / 1px 16px no-repeat,
    linear-gradient(var(--gold), var(--gold)) bottom right/ 16px 1px no-repeat,
    linear-gradient(var(--gold), var(--gold)) bottom right/ 1px 16px no-repeat;
}
.hero-card h3 {
  font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; margin-bottom: .1rem;
}
.hero-card .hero-card-sub { font-size: .85rem; color: var(--ink-3); margin-bottom: 1.3rem; }

/* أزرار البطاقة تعود إلى نمط الصفحة العادي */
.hero-card .btn-ghost { color: var(--brand-dark); border-color: var(--gold); background: transparent; }
.hero-card .btn-ghost:hover { background: var(--gold-soft); color: var(--brand-dark); }

.session-row { padding: 1rem 0; border-top: 1px solid var(--line-2); }
.session-row:first-of-type { border-top: 1px solid rgba(169,131,70,.3); }
.session-row strong { display: block; font-size: .99rem; color: var(--brand-dark); }
.session-row .meta { font-size: .83rem; color: var(--ink-2); margin: .15rem 0 .55rem; }
.session-row .row-actions { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }

/* الأرقام */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  margin-top: 3.4rem; border-top: 1px solid rgba(217,188,126,.28);
}
.stat { padding: 1.6rem 1.2rem .4rem; text-align: center; position: relative; }
.stat + .stat::before {
  content: ""; position: absolute; inset-block: 1.8rem 1rem; inset-inline-end: 0;
  width: 1px; background: rgba(217,188,126,.22);
}
.stat b {
  display: block; font-family: var(--font-display); font-size: 2.5rem; font-weight: 700;
  color: var(--gold-2); line-height: 1.15;
}
.stat span { font-size: .82rem; color: rgba(255,255,255,.6); }
@media (max-width: 800px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(odd)::before { display: none; }
}

/* ---------- الشبكات والبطاقات ---------- */
.grid { display: grid; gap: 1.6rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1000px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 700px)  { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card {
  position: relative; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 2rem 1.8rem; box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: .2rem;
  transition: border-color .25s ease, box-shadow .3s ease, transform .3s ease;
}
.card::after {
  content: ""; position: absolute; inset-inline: 1.8rem; top: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0; transition: opacity .3s ease;
}
.card:hover { border-color: rgba(169,131,70,.45); box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.card:hover::after { opacity: .8; }
.card h3 { margin-bottom: .45rem; color: var(--brand-dark); }
.card .card-icon {
  width: 54px; height: 54px; border-radius: 14px;
  background: linear-gradient(150deg, var(--gold-soft), var(--brand-soft));
  border: 1px solid rgba(169,131,70,.25);
  display: grid; place-items: center; font-size: 1.45rem; margin-bottom: 1.1rem;
}
.card-foot { margin-top: auto; padding-top: 1.2rem; }

.panel {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: clamp(1.6rem, 1rem + 1.6vw, 2.6rem);
  box-shadow: var(--shadow);
}
.panel-gold { border-color: rgba(169,131,70,.35); }

/* الخطوات */
.steps { display: grid; gap: 1.6rem; grid-template-columns: repeat(3, 1fr); counter-reset: step; }
.step {
  position: relative; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 2.1rem 1.8rem 1.7rem;
}
.step::before {
  counter-increment: step; content: counter(step);
  display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%;
  background: var(--brand-dark); color: var(--gold-2);
  font-family: var(--font-display); font-size: 1.3rem; font-weight: 700;
  margin-bottom: 1.1rem; box-shadow: 0 0 0 1px rgba(169,131,70,.35), 0 0 0 6px var(--bg);
}
@media (max-width: 900px) { .steps { grid-template-columns: 1fr; } }

/* الاقتباس */
.quote {
  margin: 0; padding: 0 0 0 0; font-family: var(--font-display);
  font-size: 1.16rem; line-height: 1.85; color: var(--ink);
}
.quote::before {
  content: "”"; display: block; font-family: var(--font-display);
  font-size: 3rem; line-height: .6; color: var(--plum); opacity: .45; margin-bottom: .5rem;
}
.quote cite {
  display: block; font-family: var(--font-body); font-style: normal;
  font-size: .86rem; font-weight: 600; color: var(--gold); letter-spacing: .04em; margin-top: 1rem;
}

/* الوسوم */
.pill {
  display: inline-block; font-size: .74rem; font-weight: 500; letter-spacing: .03em;
  padding: .25rem .8rem; border-radius: 999px;
  background: var(--brand-soft); color: var(--brand-dark); border: 1px solid transparent;
}
.pill-accent { background: var(--gold-soft); color: #7D5E27; border-color: rgba(169,131,70,.25); }
.pill-ok { background: var(--green-soft); color: var(--green); }
.tag-row { display: flex; flex-wrap: wrap; gap: .4rem; margin: .5rem 0 1rem; }

/* ---------- الجداول ---------- */
.table-wrap {
  overflow-x: auto; border: 1px solid var(--line);
  border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow);
}
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
caption { text-align: start; }
th, td { padding: 1rem 1.15rem; text-align: start; border-bottom: 1px solid var(--line-2); vertical-align: top; }
th {
  background: var(--bg-2); font-weight: 600; color: var(--brand-dark);
  font-size: .82rem; letter-spacing: .05em; white-space: nowrap;
  border-bottom: 1px solid var(--line);
}
tbody tr:last-child td { border-bottom: 0; }
tbody tr { transition: background .18s ease; }
tbody tr:hover { background: var(--gold-soft); }

/* ---------- النماذج ---------- */
.form-grid { display: grid; gap: 1.3rem; grid-template-columns: repeat(2, 1fr); }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 700px) { .form-grid { grid-template-columns: 1fr; } }

.field label { display: block; font-weight: 600; margin-bottom: .5rem; font-size: .95rem; color: var(--brand-dark); }
.field .hint { font-size: .82rem; color: var(--ink-3); margin: -.3rem 0 .5rem; }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--ink);
  padding: .8rem 1rem; min-height: 56px;
  /* حدّ أوضح وخلفية عاجية: الخانة يجب أن تُرى كخانة من نظرة واحدة */
  border: 1.5px solid #D8CFBC; border-radius: var(--radius-sm);
  background: var(--bg);
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.field input::placeholder, .field textarea::placeholder { color: var(--ink-3); opacity: 1; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--gold-2); }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--brand); outline: none; background: var(--surface);
  box-shadow: 0 0 0 4px var(--brand-soft);
}
.field textarea { min-height: 140px; resize: vertical; line-height: 1.8; }

/* سهم القائمة المنسدلة — بدل السهم الافتراضي الباهت */
.field select {
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%23301267' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 1.1rem center;
  padding-inline-end: 1rem; padding-inline-start: 2.6rem;
}

/* مربعات الاختيار بلون الهوية وبحجم يسهل ضغطه */
.field input[type="checkbox"], .field input[type="radio"] {
  accent-color: var(--brand); min-height: 0; width: 24px; height: 24px;
}
.field .err { color: var(--danger); font-size: .82rem; margin-top: .35rem; display: none; }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: var(--danger); }
.field.invalid .err { display: block; }

.choice-grid { display: grid; gap: 1rem; grid-template-columns: repeat(3, 1fr); }
@media (max-width: 800px) { .choice-grid { grid-template-columns: 1fr; } }
.choice {
  position: relative; display: block; cursor: pointer;
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.3rem 1.4rem; background: var(--surface);
  transition: border-color .2s ease, background .2s ease, box-shadow .25s ease;
}
.choice input { position: absolute; opacity: 0; }
.choice strong { display: block; color: var(--brand-dark); font-size: 1rem; margin-bottom: .15rem; }
.choice small { color: var(--ink-2); font-size: .86rem; line-height: 1.7; display: block; }
.choice:hover { border-color: rgba(169,131,70,.4); }
.choice:has(input:checked) {
  border-color: var(--gold); background: var(--gold-soft);
  box-shadow: 0 0 0 1px var(--gold), var(--shadow);
}
.choice:has(input:focus-visible) { outline: 2px solid var(--gold); outline-offset: 3px; }

.note {
  background: var(--gold-soft); border: 1px solid rgba(169,131,70,.25);
  border-inline-start: 3px solid var(--gold);
  border-radius: var(--radius-sm); padding: 1.05rem 1.25rem; font-size: .92rem; color: var(--ink);
}
.note-ok { background: var(--green-soft); border-color: rgba(27,107,69,.25); border-inline-start-color: var(--ok); }
.note.warn { border-inline-start-color: var(--danger); }

/* خطوات التسجيل */
.stepper { display: flex; gap: .6rem; margin-bottom: 2.2rem; flex-wrap: wrap; }
.stepper div {
  flex: 1 1 0; min-width: 130px; padding: .7rem .9rem; border-radius: var(--radius-sm);
  background: transparent; color: var(--ink-3); font-size: .88rem;
  border: 1.5px solid var(--line); text-align: center; transition: all .25s ease;
}
.stepper div[data-on="1"] {
  background: var(--brand); color: #fff;
  border-color: var(--brand); font-weight: 600;
}
/* الخطوة المكتملة: خضراء بعلامة صح — لون الإنجاز لا لون الزينة */
.stepper div[data-done="1"] {
  background: var(--green-soft); color: var(--green);
  border-color: rgba(46,107,71,.3); font-weight: 600;
}
.stepper div[data-done="1"]::before { content: "✓ "; }

/* ---------- الأسئلة الشائعة ---------- */
.faq details {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 0 1.5rem; margin-bottom: .8rem;
  transition: border-color .25s ease, box-shadow .25s ease;
}
.faq details:hover { border-color: rgba(169,131,70,.4); }
.faq summary {
  cursor: pointer; padding: 1.25rem 0; font-weight: 600; font-size: 1.02rem;
  color: var(--brand-dark); list-style: none; display: flex; justify-content: space-between; gap: 1.2rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; font-size: 1.5rem; font-weight: 400; color: var(--gold); line-height: 1; flex: none;
  transition: transform .25s ease;
}
.faq details[open] { box-shadow: var(--shadow); border-color: rgba(169,131,70,.4); }
.faq details[open] summary::after { content: "−"; }
.faq p { padding-bottom: 1rem; color: var(--ink-2); margin: 0; }

/* ---------- الصفحات الداخلية ---------- */
.page-head {
  position: relative; background: var(--bg-2);
  border-bottom: 1px solid var(--line);
  padding: clamp(2.6rem, 2rem + 2vw, 4rem) 0 clamp(2.2rem, 1.6rem + 2vw, 3.2rem);
  overflow: hidden;
}
.page-head::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: var(--medallion), var(--pattern);
  background-repeat: no-repeat, repeat;
  background-position: calc(100% + 190px) -180px, 0 0;
  background-size: 460px 460px, 72px 72px;
  opacity: .085;
}
.page-head::after {
  content: ""; position: absolute; inset-inline: 0; bottom: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent); opacity: .5;
}
.page-head .wrap { position: relative; }
.page-head h1 { margin-bottom: .35em; }
.breadcrumb { font-size: .82rem; color: var(--ink-3); margin-bottom: .9rem; letter-spacing: .02em; }
.breadcrumb a { color: var(--ink-2); text-decoration: none; }
.breadcrumb a:hover { color: var(--gold); }

.prose { max-width: 70ch; }
.prose h2 { margin-top: 1.9em; }
.prose h2:first-child { margin-top: 0; }
.prose > p:first-of-type { font-size: 1.08rem; color: var(--ink-2); font-weight: 300; }

/* ---------- شريط الدعوة ---------- */
.cta-band {
  position: relative; overflow: hidden; text-align: center;
  background: linear-gradient(165deg, var(--brand-2), var(--brand) 55%, var(--brand-dark));
  color: #fff; border-radius: var(--radius-lg);
  padding: clamp(2.6rem, 1.6rem + 3vw, 4.2rem) clamp(1.5rem, 1rem + 2vw, 3rem);
}
.cta-band::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: var(--medallion), var(--pattern);
  background-repeat: no-repeat, repeat;
  background-position: center, 0 0;
  background-size: 520px 520px, 72px 72px;
  opacity: .12;
}
.cta-band::after {
  content: ""; position: absolute; inset: 14px; border: 1px solid rgba(217,188,126,.25);
  border-radius: calc(var(--radius-lg) - 14px); pointer-events: none;
}
.cta-band > * { position: relative; }
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255,255,255,.78); max-width: 58ch; margin-inline: auto; font-weight: 300; }
.cta-band .btn-primary { background: var(--gold-2); color: var(--brand-dark); box-shadow: none; }
.cta-band .btn-primary:hover { background: #E7CE96; color: var(--brand-dark); }
.cta-band .btn-ghost { color: #fff; border-color: rgba(217,188,126,.5); }
.cta-band .btn-ghost:hover { background: rgba(217,188,126,.14); color: #fff; }

/* ---------- الأشخاص ---------- */
.person { text-align: center; }
.person .avatar {
  width: 96px; height: 96px; border-radius: 50%; margin: 0 auto 1.1rem;
  background: linear-gradient(150deg, var(--brand-soft), var(--gold-soft));
  color: var(--brand-dark); font-family: var(--font-display); font-size: 1.6rem; font-weight: 700;
  display: grid; place-items: center;
  box-shadow: 0 0 0 1px rgba(169,131,70,.3), 0 0 0 7px var(--surface), 0 0 0 8px var(--line-2);
}

/* ---------- شريط التصفية ---------- */
.toolbar { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; margin-bottom: 1.8rem; }
.toolbar select, .toolbar input {
  font: inherit; font-size: .9rem; color: var(--ink);
  padding: .55rem .9rem; min-height: 48px;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface);
}
.toolbar select:focus, .toolbar input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }

/* ---------- بطاقة شخص ---------- */
.person-card { padding: 1.7rem; }
.person-card-top { display: flex; gap: 1rem; align-items: flex-start; margin-bottom: 1.1rem; }
.person-card .avatar { width: 66px; height: 66px; font-size: 1.15rem; margin: 0; flex: none; box-shadow: 0 0 0 1px rgba(169,131,70,.3), 0 0 0 5px var(--surface), 0 0 0 6px var(--line-2); }
.person-card h3 { margin: 0 0 .1rem; font-size: 1.12rem; }
.person-card h3 a { text-decoration: none; color: var(--brand-dark); }
.person-card h3 a:hover { color: var(--gold); }
.person-title { margin: 0; font-size: .88rem; color: var(--ink-2); line-height: 1.55; }
.person-meta { margin: .2rem 0 0; font-size: .8rem; color: var(--ink-3); }
.person-headline { font-size: .93rem; margin-bottom: .8rem; }

.person-stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: .4rem; margin: .4rem 0 0;
  padding-top: 1rem; border-top: 1px solid var(--line-2);
}
.person-stats div { text-align: center; }
.person-stats dt { font-size: .68rem; color: var(--ink-3); letter-spacing: .02em; }
.person-stats dd {
  margin: 0; font-family: var(--font-display); font-size: 1.15rem;
  font-weight: 700; color: var(--brand-dark); line-height: 1.3;
}

/* ---------- صفحة الملف التعريفي ---------- */
.profile-head { display: flex; gap: 1.6rem; align-items: center; flex-wrap: wrap; }
.avatar-lg {
  width: 128px !important; height: 128px !important;
  font-size: 2.1rem !important; margin: 0 !important; flex: none;
}
.profile-title {
  margin: 0; font-size: 1.05rem; color: var(--ink-2); font-weight: 300;
}
.profile-head h1 { margin-bottom: .18em; font-size: clamp(2rem, 1.4rem + 2.2vw, 2.9rem); }

.profile-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 1.8rem; align-items: start; }
@media (max-width: 1000px) { .profile-grid { grid-template-columns: 1fr; } }
.profile-aside { position: sticky; top: 130px; }
@media (max-width: 1000px) { .profile-aside { position: static; } }
.profile-aside h3 { font-size: .82rem; letter-spacing: .14em; color: var(--gold); margin-bottom: 1rem; }

/* قائمة تعريفات */
.spec-list { margin: 0; }
.spec-list div {
  display: flex; justify-content: space-between; gap: 1rem;
  padding: .65rem 0; border-top: 1px solid var(--line-2);
}
.spec-list div:first-child { border-top: 0; padding-top: 0; }
.spec-list dt { font-size: .86rem; color: var(--ink-2); flex: none; }
.spec-list dd { margin: 0; font-size: .9rem; font-weight: 600; color: var(--brand-dark); text-align: end; }

/* مسيرة زمنية */
.timeline { list-style: none; margin: 1.2rem 0 0; padding: 0 1.4rem 0 0; border-inline-start: 0; position: relative; }
.timeline::before {
  content: ""; position: absolute; inset-block: .5rem; inset-inline-start: auto; inset-inline-end: 4px;
  width: 1px; background: linear-gradient(180deg, var(--gold), transparent);
}
.timeline li { position: relative; padding-bottom: 1.4rem; margin: 0; }
.timeline li::before {
  content: ""; position: absolute; inset-inline-end: -1.4rem; top: .72rem;
  width: 9px; height: 9px; transform: rotate(45deg);
  background: var(--gold); box-shadow: 0 0 0 3px var(--surface);
}
.timeline li:last-child { padding-bottom: 0; }
.tl-period { display: block; font-size: .78rem; color: var(--gold); letter-spacing: .04em; }
.timeline strong { display: block; color: var(--brand-dark); font-size: 1rem; }
.timeline .muted { font-size: .88rem; }

/* قائمة بعلامات صح */
.check-list { list-style: none; padding: 0; margin: .8rem 0 0; }
.check-list li { position: relative; padding-inline-start: 1.7rem; margin-bottom: .55rem; }
.check-list li::before {
  content: ""; position: absolute; inset-inline-start: 0; top: .62em;
  width: 8px; height: 8px; transform: rotate(45deg);
  border: 1px solid var(--gold); background: var(--gold-soft);
}

/* ---------- التذييل ---------- */
.site-footer {
  position: relative; background: var(--brand-dark); color: rgba(255,255,255,.7);
  margin-top: 0; padding: clamp(3rem, 2rem + 3vw, 4.5rem) 0 1.6rem; overflow: hidden;
}
.site-footer::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: var(--medallion), var(--pattern);
  background-repeat: no-repeat, repeat;
  background-position: -170px calc(100% + 150px), 0 0;
  background-size: 460px 460px, 72px 72px;
  opacity: .07;
}
.site-footer .wrap { position: relative; }
.site-footer h3 {
  color: #fff; font-size: .82rem; font-weight: 600; letter-spacing: .16em;
  margin-bottom: 1.2rem; padding-bottom: .8rem; position: relative;
}
.site-footer h3::after {
  content: ""; position: absolute; inset-inline-start: 0; bottom: 0; width: 34px; height: 1px; background: var(--gold);
}
.site-footer a { color: rgba(255,255,255,.72); text-decoration: none; transition: color .2s ease; }
.site-footer a:hover { color: var(--gold-2); }
.site-footer .muted { color: rgba(255,255,255,.55); font-weight: 300; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1.2fr; gap: 3rem; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr; gap: 2.2rem; } }
.footer-brand { font-family: var(--font-display); font-size: 2rem; color: #fff; margin-bottom: .6rem; display: block; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: .55rem; font-size: .92rem; }
.social { display: flex; gap: .55rem; margin-top: 1.3rem; }
.social a {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid rgba(217,188,126,.3); font-size: .78rem; font-weight: 600;
  color: rgba(255,255,255,.8); transition: all .22s ease;
}
.social a:hover { background: var(--gold-2); border-color: var(--gold-2); color: var(--brand-dark); }
.footer-bottom {
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  border-top: 1px solid rgba(255,255,255,.1); margin-top: 3rem; padding-top: 1.4rem;
  font-size: .82rem; color: rgba(255,255,255,.5);
}
.footer-bottom p { margin: 0; }

/* ---------- شارة النسخة التجريبية ---------- */
.demo-flag {
  position: fixed; inset-inline-end: 1.2rem; bottom: 1.2rem; z-index: 60;
  background: var(--brand-dark); color: var(--gold-2);
  border: 1px solid rgba(217,188,126,.4);
  font-size: .75rem; letter-spacing: .02em;
  padding: .55rem 1rem; border-radius: 999px;
  box-shadow: 0 18px 40px -18px rgba(0,0,0,.7); max-width: 80vw;
}

/* ---------- ظهور لطيف عند التمرير ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ============================================================
   الطبقة الجمالية: حركة دخول، وبطاقات أعمق، وحالات تحميل أنيقة.
   كل حركة هنا مشروطة بأمرين: أن يفضّل الجهاز الحركة، وأن تعمل الجافاسكربت
   (فئة .motion تُضاف من app.js) — فلا يختفي محتوى لو تعطّل السكربت.
   ============================================================ */

::selection { background: var(--brand-soft); color: var(--brand-dark); }

/* شريط تمرير رفيع متناسق */
* { scrollbar-width: thin; scrollbar-color: var(--gold-2) transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: var(--gold-2); border-radius: 999px; border: 3px solid var(--bg); }
*::-webkit-scrollbar-track { background: transparent; }

/* ---------- بطاقات أعمق ---------- */
.card { transition: border-color .3s ease, box-shadow .35s ease, transform .35s cubic-bezier(.22,1,.36,1); }
.card .card-icon { transition: transform .35s cubic-bezier(.22,1,.36,1), box-shadow .3s ease; }
.card:hover .card-icon { transform: scale(1.06) rotate(-3deg); box-shadow: 0 8px 20px -10px rgba(48,18,103,.45); }

/* بطاقة الجلسة: شريط جانبي يدل على التوافر قبل قراءة أي كلمة */
.session-card { position: relative; overflow: hidden; }
.session-card::before {
  content: ""; position: absolute; inset-block: 0; inset-inline-start: 0; width: 4px;
  background: linear-gradient(180deg, var(--green), transparent 85%);
}
.session-card.is-full::before { background: linear-gradient(180deg, var(--gold), transparent 85%); }
.session-card.is-closed::before { background: linear-gradient(180deg, var(--ink-3), transparent 85%); }

/* صفوف الجلسات في الواجهة */
.session-row { transition: background .25s ease; border-radius: 10px; }
.session-row:hover { background: var(--bg-2); }

/* ---------- لمعة خفيفة على الزر الأساسي ---------- */
.btn-primary { position: relative; overflow: hidden; }
.btn-primary > * { position: relative; z-index: 1; }

/* ---------- هيكل تحميل بدل كلمة «جارٍ التحميل» ---------- */
.skeleton { display: grid; gap: .7rem; }
.skel-line { height: 13px; border-radius: 999px; background: var(--bg-3); }
.skel-line.w-40 { width: 40%; } .skel-line.w-60 { width: 60%; } .skel-line.w-80 { width: 80%; }

/* ---------- حالة فارغة ---------- */
.empty-state { text-align: center; padding: 2.4rem 1.4rem; }
.empty-state .empty-mark {
  width: 64px; height: 64px; margin: 0 auto 1.1rem; border-radius: 50%;
  display: grid; place-items: center; color: var(--gold);
  background: var(--gold-soft); border: 1px solid rgba(139,94,52,.25);
}

@media (prefers-reduced-motion: no-preference) {
  /* دخول الواجهة: تتابع قصير لا يتجاوز نصف ثانية */
  .motion .hero .eyebrow,
  .motion .hero h1,
  .motion .hero .lead,
  .motion .hero .hero-actions,
  .motion .hero .hero-card { animation: riseIn .75s cubic-bezier(.22,1,.36,1) backwards; }
  .motion .hero h1            { animation-delay: .06s; }
  .motion .hero .lead         { animation-delay: .12s; }
  .motion .hero .hero-actions { animation-delay: .18s; }
  .motion .hero .hero-card    { animation-delay: .1s; }

  /* تتابع بطاقات الأقسام عند ظهورها */
  .motion .reveal .card,
  .motion .reveal .step,
  .motion .reveal .panel {
    opacity: 0; transform: translateY(16px);
    transition: opacity .6s ease, transform .6s cubic-bezier(.22,1,.36,1);
  }
  .motion .reveal.in .card,
  .motion .reveal.in .step,
  .motion .reveal.in .panel { opacity: 1; transform: none; }
  .motion .reveal.in .card:nth-child(2),
  .motion .reveal.in .step:nth-child(2) { transition-delay: .07s; }
  .motion .reveal.in .card:nth-child(3),
  .motion .reveal.in .step:nth-child(3) { transition-delay: .14s; }
  .motion .reveal.in .card:nth-child(4) { transition-delay: .21s; }
  .motion .reveal.in .card:nth-child(5) { transition-delay: .28s; }
  .motion .reveal.in .card:nth-child(6) { transition-delay: .35s; }

  /* لمعة تمرّ مرة واحدة عند المرور على الزر */
  .btn-primary::after {
    content: ""; position: absolute; inset: 0; z-index: 0;
    background: linear-gradient(115deg, transparent 35%, rgba(255,255,255,.22) 50%, transparent 65%);
    transform: translateX(-130%); transition: transform .7s ease;
  }
  .btn-primary:hover::after { transform: translateX(130%); }

  /* وميض هيكل التحميل */
  .skel-line {
    background: linear-gradient(90deg, var(--bg-3) 25%, var(--bg-2) 37%, var(--bg-3) 63%);
    background-size: 400% 100%; animation: shimmer 1.5s ease-in-out infinite;
  }

  .card:hover { transform: translateY(-4px); }
}

@keyframes riseIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }

/* ---------- الوضع الداكن ---------- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not([data-contrast="high"]) {
    --brand: #A78BE8; --brand-2: #BCA6F0; --brand-dark: #EFE9DC; --brand-soft: #251742;
    --gold: #C89B6A; --gold-2: #DEB98C; --gold-soft: #2B2118;
    --plum: #B9A0E8; --plum-2: #CDBAF0; --plum-soft: #1E1630;
    --ink: #EDE7DA; --ink-2: #A9B7B1; --ink-3: #7E8D87;
    --line: #253632; --line-2: #1D2C28;
    --bg: #0B1513; --bg-2: #0F1D1A; --bg-3: #13221F; --surface: #10201C;
    --ok: #5FD19B; --danger: #F08585;
  --chart-1: #5FBE88; --chart-2: #3E9166; --chart-3: #C89B6A; --chart-4: #DEB98C; --chart-5: #B9A0E8;
    --shadow: 0 1px 1px rgba(0,0,0,.3), 0 10px 30px -18px rgba(0,0,0,.9);
    --shadow-lg: 0 2px 4px rgba(0,0,0,.4), 0 30px 70px -32px rgba(0,0,0,1);
  }
  :root:not([data-theme="light"]):not([data-contrast="high"]) .a11y-bar,
  :root:not([data-theme="light"]):not([data-contrast="high"]) .site-footer { background: #120827; }
  :root:not([data-theme="light"]):not([data-contrast="high"]) .hero {
    background: radial-gradient(120% 90% at 85% 0%, rgba(71,42,140,.4) 0%, transparent 55%),
                linear-gradient(170deg, #150A2B 0%, #2A1257 55%, #150A2B 100%);
  }
  :root:not([data-theme="light"]):not([data-contrast="high"]) .cta-band {
    background: linear-gradient(165deg, #2E1560, #1C0D3C 55%, #150A2B);
  }
  :root:not([data-theme="light"]):not([data-contrast="high"]) .btn-primary {
    background: linear-gradient(160deg, #4B2A8A, #38206B); color: #F3EFE4;
  }
  :root:not([data-theme="light"]):not([data-contrast="high"]) .step::before { background: #1C0D3C; }
  :root:not([data-theme="light"]):not([data-contrast="high"]) .hero-card { background: linear-gradient(175deg, #1D1430, #171027); border-color: rgba(217,188,126,.3); }
  :root:not([data-theme="light"]):not([data-contrast="high"]) .admin-top { background: #120827; }
  :root:not([data-theme="light"]):not([data-contrast="high"]) .pill { background: #261B45; color: #DCD2F0; }
  :root:not([data-theme="light"]):not([data-contrast="high"]) .pill-ok { background: #123326; }
  :root:not([data-theme="light"]):not([data-contrast="high"]) tbody tr:hover { background: #1E1533; }
  :root:not([data-theme="light"]):not([data-contrast="high"]) .note-ok { background: #102A20; }
  :root:not([data-theme="light"]):not([data-contrast="high"]) .demo-flag { background: #120827; }
}

:root[data-theme="dark"]:not([data-contrast="high"]) {
  --brand: #A78BE8; --brand-2: #BCA6F0; --brand-dark: #EFE9DC; --brand-soft: #251742;
  --gold: #C89B6A; --gold-2: #DEB98C; --gold-soft: #2B2118;
    --plum: #B9A0E8; --plum-2: #CDBAF0; --plum-soft: #1E1630;
  --ink: #EDE7DA; --ink-2: #A9B7B1; --ink-3: #7E8D87;
  --line: #253632; --line-2: #1D2C28;
  --bg: #0B1513; --bg-2: #0F1D1A; --bg-3: #13221F; --surface: #10201C;
  --ok: #5FD19B; --danger: #F08585;
  --chart-1: #5FBE88; --chart-2: #3E9166; --chart-3: #C89B6A; --chart-4: #DEB98C; --chart-5: #B9A0E8;
  --shadow: 0 1px 1px rgba(0,0,0,.3), 0 10px 30px -18px rgba(0,0,0,.9);
  --shadow-lg: 0 2px 4px rgba(0,0,0,.4), 0 30px 70px -32px rgba(0,0,0,1);
}
:root[data-theme="dark"]:not([data-contrast="high"]) .a11y-bar,
:root[data-theme="dark"]:not([data-contrast="high"]) .site-footer { background: #120827; }
:root[data-theme="dark"]:not([data-contrast="high"]) .hero {
  background: radial-gradient(120% 90% at 85% 0%, rgba(71,42,140,.4) 0%, transparent 55%),
              linear-gradient(170deg, #150A2B 0%, #2A1257 55%, #150A2B 100%);
}
:root[data-theme="dark"]:not([data-contrast="high"]) .cta-band {
  background: linear-gradient(165deg, #2E1560, #1C0D3C 55%, #150A2B);
}
:root[data-theme="dark"]:not([data-contrast="high"]) .btn-primary {
  background: linear-gradient(160deg, #4B2A8A, #38206B); color: #F3EFE4;
}
:root[data-theme="dark"]:not([data-contrast="high"]) .step::before { background: #1C0D3C; }
:root[data-theme="dark"]:not([data-contrast="high"]) .hero-card { background: linear-gradient(175deg, #1D1430, #171027); border-color: rgba(217,188,126,.3); }
:root[data-theme="dark"]:not([data-contrast="high"]) .admin-top { background: #120827; }
:root[data-theme="dark"]:not([data-contrast="high"]) .pill { background: #261B45; color: #DCD2F0; }
:root[data-theme="dark"]:not([data-contrast="high"]) .pill-ok { background: #123326; }
:root[data-theme="dark"]:not([data-contrast="high"]) tbody tr:hover { background: #1E1533; }
:root[data-theme="dark"]:not([data-contrast="high"]) .note-ok { background: #102A20; }
:root[data-theme="dark"]:not([data-contrast="high"]) .demo-flag { background: #120827; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

@media print {
  .a11y-bar, .site-header, .site-footer, .demo-flag, .btn { display: none !important; }
  .reveal { opacity: 1; transform: none; }
}
