/* ============================================================================
   صفحة التعريف (الرئيسية)
   ----------------------------------------------------------------------------
   ملف منفصل عن style.css — زي legal.css بالضبط — ويعتمد على نفس متغيرات
   الألوان المعرّفة هناك، فالمظهر الداكن والفاتح يشتغلان بلا تكرار.

   ⚠️ style.css يثبّت ارتفاع الصفحة على ١٠٠٪ لأن التطبيق واجهة ثابتة
   تتمرّر من داخلها. وهذي صفحة طويلة تُقرأ بالتمرير، فنرجّع السلوك الطبيعي.
   ========================================================================= */

html,
body.site {
  height: auto;
  min-height: 100%;
  overflow-y: visible;
}

/* ⚠️ عجلة الماوس: style.css يحط overscroll-behavior:none على body، وهنا
   body يصير «صندوق تمرير» ما يتمرر (طوله بطول محتواه)، فالعجلة توقف عنده
   وما توصل للصفحة نفسها. النتيجة: الصفحة ما تنزل بالماوس أبدًا (شريط
   التمرير والكيبورد يشتغلون). نرجّعها لـ auto هنا بس — التطبيق يبقى كما هو. */
body.site {
  overscroll-behavior: auto;
}

body.site {
  background: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.9;
}

/* ---------- الترويسة ---------- */
.site-top {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 18px;
  max-width: 1080px;
  margin: 0 auto;
  padding: 14px 20px;
  background: var(--bg-dark);
  border-bottom: 1px solid var(--border-color);
}

.site-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 18px;
  color: var(--text-main);
  text-decoration: none;
}
.site-brand-icon {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
  overflow: hidden;
}
.site-brand-icon img { width: 100%; height: 100%; object-fit: cover; }

.site-nav {
  display: flex;
  gap: 18px;
  margin-inline-start: auto;
}
.site-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14.5px;
}
.site-nav a:hover { color: var(--text-main); }

.site-cta {
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: var(--on-accent);
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
}
.site-cta:hover { background: var(--accent-hover); }

/* ---------- الواجهة الأولى ---------- */
.hero {
  max-width: 820px;
  margin: 0 auto;
  padding: 64px 20px 54px;
  text-align: center;
}
.hero h1 {
  font-family: var(--font-heading);
  font-size: clamp(28px, 5vw, 44px);
  line-height: 1.45;
  margin: 0 0 18px;
  text-wrap: balance;
}
.hero h1 span {
  display: block;
  font-size: clamp(16px, 2.6vw, 22px);
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 8px;
}
.hero-sub {
  font-size: 16.5px;
  color: var(--text-muted);
  margin: 0 auto 28px;
  max-width: 640px;
}
.hero-cta {
  display: flex;
  gap: 14px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  margin: 0 0 14px;
}
.hero-note { font-size: 13.5px; color: var(--text-muted); margin: 0; }

.btn-lg {
  display: inline-block;
  padding: 14px 32px;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: var(--on-accent);
  text-decoration: none;
  font-weight: 700;
  font-size: 16px;
}
.btn-lg:hover { background: var(--accent-hover); }
.btn-ghost {
  display: inline-block;
  padding: 14px 24px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- الأقسام ---------- */
.section {
  max-width: 1080px;
  margin: 0 auto;
  padding: 46px 20px;
  border-top: 1px solid var(--border-color);
}
.section h2 {
  font-family: var(--font-heading);
  font-size: clamp(21px, 3.2vw, 27px);
  margin: 0 0 8px;
}
.section-sub { color: var(--text-muted); margin: 0 0 24px; }
.section-cta { margin: 26px 0 0; text-align: center; }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
  margin-top: 20px;
}

.card-feat {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  padding: 18px 18px 16px;
}
.card-feat h3 {
  font-size: 16px;
  margin: 0 0 6px;
  color: var(--text-main);
}
.card-feat p { margin: 0; color: var(--text-muted); font-size: 14.5px; }

.why { margin: 18px 0 0; padding: 0; list-style: none; }
.why li {
  color: var(--text-muted);
  margin-bottom: 14px;
  padding-inline-start: 16px;
  border-inline-start: 2px solid var(--border-color);
}
.why b { color: var(--text-main); }

/* ---------- الباقات ---------- */
.card-plan {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  padding: 22px 20px;
  text-align: center;
}
.card-plan.featured { border-color: var(--accent); background: var(--accent-soft); }
.card-plan h3 { font-size: 17px; margin: 0 0 8px; }
.card-plan .price {
  font-size: 32px;
  font-weight: 800;
  margin: 0 0 14px;
  color: var(--text-main);
}
.card-plan .price-free { font-size: 26px; }
.card-plan .price span {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}
.card-plan ul { margin: 0; padding: 0; list-style: none; color: var(--text-muted); font-size: 14.5px; }
.card-plan li { margin-bottom: 6px; }

/* ---------- الأسئلة ---------- */
.faq details {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  padding: 12px 15px;
  margin-bottom: 9px;
}
.faq summary { cursor: pointer; font-weight: 700; font-size: 15px; }
.faq details p { margin: 10px 0 0; color: var(--text-muted); }

/* ---------- الخاتمة ---------- */
.final {
  max-width: 1080px;
  margin: 0 auto;
  padding: 56px 20px 64px;
  text-align: center;
  border-top: 1px solid var(--border-color);
}
.final h2 { font-family: var(--font-heading); font-size: clamp(20px, 3vw, 26px); margin: 0 0 8px; }
.final p { color: var(--text-muted); margin: 0 0 18px; }

.site-foot {
  border-top: 1px solid var(--border-color);
  padding: 24px 20px 40px;
  text-align: center;
}
.site-foot nav {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.site-foot a { color: var(--text-muted); text-decoration: none; font-size: 14px; }
.site-foot a:hover { color: var(--accent); }
.site-foot p { color: var(--text-muted); font-size: 13px; margin: 0; }

@media (max-width: 640px) {
  /* روابط التنقّل تختفي بالجوال: الزر هو المهم، وثلاثة روابط صغيرة
     جنبه تزاحمه وتُضغط بالغلط. */
  .site-nav { display: none; }
  .site-cta { margin-inline-start: auto; }
  .hero { padding: 40px 18px 36px; }
  .section { padding: 36px 18px; }
  .final { padding: 40px 18px 48px; }
  .btn-lg, .btn-ghost { width: 100%; text-align: center; }
}

/* ---------- صفحات الأدلة (تلخيص PDF، الصورة لنص...) ---------- */
.crumbs {
  max-width: 1080px;
  margin: 0 auto;
  padding: 18px 20px 0;
  font-size: 13.5px;
  color: var(--text-muted);
}
.crumbs a { color: var(--text-muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent); }

/* خطوات مرقّمة بدوائر: الرقم من counter عشان يطلع بالأرقام العربية */
.steps { list-style: none; margin: 20px 0 0; padding: 0; counter-reset: step; display: grid; gap: 12px; }
.steps li {
  counter-increment: step;
  position: relative;
  padding: 14px 18px;
  padding-inline-start: 58px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  color: var(--text-muted);
}
.steps li::before {
  content: counter(step, arabic-indic);
  position: absolute;
  inset-inline-start: 16px;
  top: 14px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
  display: grid;
  place-items: center;
}
.steps b { display: block; color: var(--text-main); margin-bottom: 2px; }

.limits { margin: 16px 0 0; padding-inline-start: 20px; color: var(--text-muted); }
.limits li { margin-bottom: 8px; }

.related { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.related-link {
  border: 1px solid var(--border-color);
  border-radius: 999px;
  padding: 8px 16px;
  color: var(--text-main);
  text-decoration: none;
  font-size: 14.5px;
  background: var(--bg-card);
}
.related-link:hover { border-color: var(--accent); color: var(--accent); }

@media (max-width: 640px) {
  .crumbs { padding: 14px 18px 0; }
}
