/* صفحات الموقع الثابتة (المرحلة 3 من seo-plan.md). ملف واحد صغير بدل Tailwind CDN،
   فتُرسم الصفحة من أول تحميل. الخصائص المنطقية (inline-start/end) تخدم RTL وLTR معًا. */
:root {
  --ink: #142A47;
  --muted: #4A5B73;
  --bg: #EEF4FB;
  --card: #FFFFFF;
  --line: #DCE6F2;
  --blue: #1A76BC;
  --purple: #6A50A1;
  --yellow: #FCAE17;
  --green: #8FA31C;
  --cta: linear-gradient(135deg, #F97C3B 0%, #F4845F 100%);
  --radius: 20px;
  --shadow: 0 6px 24px rgba(20, 42, 71, 0.07);
  --wrap: 1120px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: 'Cairo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.75;
  font-size: 17px;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-underline-offset: 3px; }
a:hover { color: var(--purple); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3 { line-height: 1.35; margin: 0 0 0.5em; }
h1 { font-size: clamp(1.75rem, 1.2rem + 2.4vw, 2.75rem); font-weight: 800; }
h2 { font-size: clamp(1.35rem, 1.1rem + 1vw, 1.85rem); font-weight: 800; }
h3 { font-size: 1.1rem; font-weight: 700; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: 20px; }
.skip { position: absolute; inset-inline-start: -9999px; }
.skip:focus { inset-inline-start: 12px; top: 12px; z-index: 50; background: #fff; padding: 8px 14px; border-radius: 10px; }

/* ── الرأس ── */
.site-header { position: sticky; top: 0; z-index: 40; padding: 12px 16px 0; }
.nav {
  max-width: var(--wrap); margin-inline: auto; display: flex; align-items: center; gap: 16px;
  background: rgba(255, 255, 255, 0.92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(220, 230, 242, 0.9); border-radius: 999px; padding: 8px 10px 8px 18px;
  box-shadow: 0 4px 18px rgba(20, 42, 71, 0.06);
}
[dir='rtl'] .nav { padding: 8px 18px 8px 10px; }
.brand img { height: 44px; width: auto; }
.nav-links { display: none; list-style: none; margin: 0; padding: 0; gap: 2px; }
.nav-links a {
  display: inline-block; padding: 6px 14px; border-radius: 999px; color: var(--ink);
  text-decoration: none; font-weight: 600; font-size: 0.95rem;
}
.nav-links a:hover { background: var(--bg); }
.nav-links a[aria-current='page'] { background: var(--bg); color: var(--blue); }
.nav-actions { margin-inline-start: auto; display: flex; align-items: center; gap: 10px; }
.lang { font-weight: 700; text-decoration: none; color: var(--ink); font-size: 0.95rem; padding: 6px 10px; }
.menu { position: relative; }
.menu summary {
  list-style: none; cursor: pointer; width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center; background: var(--bg); font-size: 1.2rem;
}
.menu summary::-webkit-details-marker { display: none; }
.menu ul {
  position: absolute; inset-inline-end: 0; top: 52px; min-width: 220px; list-style: none; margin: 0; padding: 8px;
  background: #fff; border-radius: 16px; box-shadow: var(--shadow); border: 1px solid var(--line);
}
.menu a { display: block; padding: 10px 14px; border-radius: 10px; text-decoration: none; color: var(--ink); font-weight: 600; }
.menu a:hover, .menu a[aria-current='page'] { background: var(--bg); }
@media (min-width: 1000px) {
  .nav-links { display: flex; }
  .menu { display: none; }
}

/* ── الأزرار ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--cta); color: #fff; text-decoration: none; font-weight: 800;
  padding: 14px 28px; border-radius: 999px; box-shadow: 0 8px 26px rgba(249, 124, 59, 0.38);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.btn:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 12px 32px rgba(249, 124, 59, 0.5); }
.btn-sm { padding: 9px 18px; font-size: 0.92rem; box-shadow: 0 4px 16px rgba(249, 124, 59, 0.35); }
@media (max-width: 480px) { .nav .btn-sm { display: none; } }

/* ── البطل ── */
.hero { background: linear-gradient(180deg, #E7F2FD 0%, #F3F9FF 65%, var(--bg) 100%); padding: 28px 0 40px; margin-top: -64px; padding-top: 92px; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 18px; padding: 0; font-size: 0.9rem; color: var(--muted); }
.crumbs li + li::before { content: '/'; margin-inline-end: 6px; color: #9AA9BC; }
.crumbs a { color: var(--muted); }
.hero-grid { display: grid; gap: 28px; align-items: center; }
.lead { font-size: 1.12rem; color: var(--muted); max-width: 640px; }
.hero-actions { margin: 22px 0 10px; }
.hero-note { font-size: 0.95rem; color: var(--muted); }
.hero-img { justify-self: center; max-width: 360px; width: 100%; }
@media (min-width: 900px) {
  .hero-grid.has-img { grid-template-columns: 1.4fr 1fr; }
  .hero { padding-bottom: 56px; }
}

/* ── الأقسام ── */
.block { padding: 36px 0; }
.block:nth-of-type(even) { background: #F7FAFE; }
.intro { color: var(--muted); max-width: 720px; }
.cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin-top: 18px; }
.card { background: var(--card); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); border-top: 4px solid var(--blue); }
.card:nth-child(4n + 2) { border-top-color: var(--yellow); }
.card:nth-child(4n + 3) { border-top-color: var(--green); }
.card:nth-child(4n + 4) { border-top-color: var(--purple); }
.card p { margin: 0; color: var(--muted); }
.text p { max-width: 760px; }
.more { font-weight: 700; margin-top: 14px; }
.more a { text-decoration: none; }
.more a::after { content: ' →'; }
[dir='rtl'] .more a::after { content: ' ←'; }

.steps { list-style: none; counter-reset: step; padding: 0; margin: 18px 0 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.steps li { counter-increment: step; background: var(--card); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); position: relative; }
.steps li::before {
  content: counter(step); display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  background: var(--blue); color: #fff; font-weight: 800; margin-bottom: 10px;
}
.steps p { margin: 0; color: var(--muted); }
.note { color: var(--muted); font-size: 0.95rem; margin-top: 14px; }

.groups { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); margin-top: 18px; }
.group { background: var(--card); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { background: var(--bg); border-radius: 999px; padding: 4px 14px; font-weight: 600; font-size: 0.95rem; }

.plans { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); margin-top: 18px; }
.plan { background: var(--card); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); border: 2px solid transparent; position: relative; }
.plan.featured { border-color: var(--yellow); }
.badge { position: absolute; top: -14px; inset-inline-start: 22px; background: var(--yellow); color: #4A3200; font-weight: 800; font-size: 0.85rem; padding: 2px 14px; border-radius: 999px; margin: 0; }
.price { margin: 4px 0 12px; }
.price strong { font-size: 2.2rem; font-weight: 800; color: var(--blue); }
.price span { color: var(--muted); font-weight: 600; margin-inline-start: 6px; }
.ticks { list-style: none; padding: 0; margin: 0; }
.ticks li { padding-inline-start: 28px; position: relative; margin: 6px 0; }
.ticks li::before { content: '✓'; position: absolute; inset-inline-start: 0; color: var(--green); font-weight: 800; }

.table-wrap { overflow-x: auto; margin-top: 18px; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); }
table { border-collapse: collapse; width: 100%; }
th, td { padding: 14px 18px; text-align: start; border-bottom: 1px solid var(--line); }
@media (max-width: 520px) {
  th, td { padding: 10px 10px; font-size: 0.92rem; }
  thead th { font-size: 0.82rem; }
}
thead th { background: #F3F7FC; font-size: 0.95rem; }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
td { font-weight: 800; color: var(--blue); }

.twocol { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); margin-top: 18px; }
.panel { background: var(--card); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }

.callout { background: linear-gradient(135deg, #1A76BC 0%, #6A50A1 100%); color: #fff; border-radius: 28px; padding: 30px; }
.callout p { color: rgba(255, 255, 255, 0.92); max-width: 720px; }
.callout .more a { color: #fff; }

.faq { margin-top: 14px; display: grid; gap: 10px; }
.faq details { background: var(--card); border-radius: 16px; box-shadow: var(--shadow); }
.faq summary { cursor: pointer; list-style: none; padding: 16px 20px; display: flex; gap: 12px; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; margin-inline-start: auto; font-size: 1.4rem; font-weight: 700; color: var(--blue); }
.faq details[open] summary::after { content: '−'; }
.faq summary h3 { margin: 0; font-size: 1.02rem; }
.faq .answer { padding: 0 20px 16px; color: var(--muted); }
.faq .answer p { margin: 0; }
.faq-group + .faq-group { margin-top: 30px; }

/* ── الدعوة الختامية ── */
.cta-band { padding: 44px 0 56px; }
.cta-box { background: #fff; border-radius: 28px; padding: 34px; text-align: center; box-shadow: var(--shadow); border: 2px solid #FDE3D3; }
.cta-box p { color: var(--muted); max-width: 620px; margin-inline: auto; }

/* ── التذييل ── */
.site-footer { background: linear-gradient(135deg, #2d2250 0%, #3b2f6b 50%, #4a3580 100%); color: rgba(255, 255, 255, 0.85); padding: 36px 0 22px; }
.site-footer a { color: rgba(255, 255, 255, 0.85); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-grid { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.f-brand { font-size: 1.4rem; font-weight: 800; color: #fff; margin: 0 0 4px; }
.f-title { font-weight: 800; color: #fff; margin: 0 0 8px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin: 4px 0; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.15); margin-top: 26px; padding-top: 16px; display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 0.9rem; }
.ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }

/* ── صفحات /learn/: الفيديو صورة حتى يُضغط، فلا يحمّل يوتيوب شيئًا قبلها ── */
.video { position: relative; max-width: 820px; aspect-ratio: 16 / 9; margin-top: 18px; border-radius: var(--radius); overflow: hidden; background: #0d1b2e; box-shadow: var(--shadow); }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-play { all: unset; cursor: pointer; position: absolute; inset: 0; display: block; }
.video-play img { width: 100%; height: 100%; object-fit: cover; }
.video-play .play {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 76px; height: 76px; border-radius: 50%;
  display: grid; place-items: center; background: rgba(249, 124, 59, 0.92); color: #fff; font-size: 30px; padding-inline-start: 6px;
}
.video-play:focus-visible .play, .video-play:hover .play { background: #F97C3B; }
.chapters { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 6px; }
.chapters a { text-decoration: none; font-weight: 600; }
.video-card img { border-radius: 14px; margin-bottom: 10px; aspect-ratio: 4 / 3; object-fit: cover; }
.video-card a { text-decoration: none; color: var(--ink); }
.chips a { text-decoration: none; }
