/* أنماط الموقع العام: الصفحة الرئيسية والباقات والتسجيل */
:root {
  --bg: #f2f4f1; --surface: #fff; --surface-2: #e9ede7; --line: #d5dcd2;
  --fg: #17221c; --muted: #5b6a61; --accent: #1d6a4d; --accent-fg: #fff; --accent-soft: #dcebe3;
  --board: #1e6a4e; --chalk: #f3f0e4; --chalk-dim: #c4d6cb; --gold: #f0cd5a;
  --display: "Reem Kufi", "IBM Plex Sans Arabic", Tahoma, sans-serif;
  --body: "IBM Plex Sans Arabic", "Geeza Pro", Tahoma, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0f1612; --surface: #151f1a; --surface-2: #1c2922; --line: #2a3a31;
    --fg: #e3ebe5; --muted: #92a499; --accent: #5cbd92; --accent-fg: #0c1410; --accent-soft: #1e3a2d;
    --board: #173f30; color-scheme: dark; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--body); font-size: 16px; line-height: 1.75; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.3; margin: 0; text-wrap: balance; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }

/* ── الترويسة ── */
.nav { display: flex; align-items: center; gap: 16px; padding: 14px 0; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--display); font-size: 20px; font-weight: 600; }
.logo img { width: 38px; height: 38px; border-radius: 10px; }
.wordmark { display: flex; flex-direction: column; line-height: 1.1; }
.wordmark small { font-family: "IBM Plex Sans Arabic", sans-serif; font-size: 12px; font-weight: 500; letter-spacing: .08em; opacity: .75; text-align: end; margin-top: 2px; }
.nav nav { margin-inline-start: auto; display: flex; gap: 6px; flex-wrap: wrap; }
.nav nav a { text-decoration: none; color: var(--chalk-dim); padding: 6px 10px; border-radius: 8px; font-size: 15px; }
.nav nav a:hover { color: var(--chalk); background: rgb(255 255 255 / .08); }

/* ── الواجهة ── */
.hero { background: var(--board); color: var(--chalk); padding-bottom: 72px; }
.hero .logo { color: var(--chalk); }
.hero-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 48px; align-items: center; padding-top: 48px; }
.eyebrow { color: var(--gold); font-weight: 500; font-size: 15px; margin-bottom: 12px; }
.hero h1 { font-size: clamp(32px, 5vw, 52px); font-weight: 700; }
.hero p.lead { color: var(--chalk-dim); font-size: 18px; margin: 18px 0 30px; max-width: 34em; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; border-radius: 10px; text-decoration: none; font-weight: 600; border: 1px solid transparent; }
.btn-gold { background: var(--gold); color: #1a2a20; }
.btn-gold:hover { filter: brightness(1.05); }
.btn-ghost { border-color: rgb(243 240 228 / .35); color: var(--chalk); }
.btn-ghost:hover { background: rgb(255 255 255 / .08); }
.btn svg { width: 18px; height: 18px; flex: none; }

/* معاينة شاشة العرض */
.screen { background: #12382a; border: 1px solid rgb(243 240 228 / .14); border-radius: 16px; padding: 18px; box-shadow: 0 24px 60px rgb(0 0 0 / .28); }
.screen-head { display: flex; justify-content: space-between; color: var(--chalk-dim); font-size: 13px; margin-bottom: 12px; }
.screen-head b { color: var(--chalk); font-family: var(--display); font-weight: 600; font-size: 15px; }
.call { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 10px; background: rgb(243 240 228 / .06); margin-top: 8px; }
.call:first-of-type { background: rgb(240 205 90 / .14); outline: 1px solid rgb(240 205 90 / .45); }
.call .name { font-family: var(--display); font-size: 20px; color: var(--chalk); }
.call .grade { font-size: 13px; color: var(--chalk-dim); white-space: nowrap; }
.call:first-of-type .grade { color: var(--gold); }

/* ── الأقسام ── */
section { padding: 72px 0; }
.sec-title { max-width: 40em; margin-bottom: 36px; }
.sec-title h2 { font-size: clamp(26px, 3.4vw, 34px); }
.sec-title p { color: var(--muted); margin: 8px 0 0; }
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 22px; }
.card .ic { width: 42px; height: 42px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; margin-bottom: 14px; }
.card .ic svg { width: 22px; height: 22px; }
.card h3 { font-size: 18px; margin-bottom: 6px; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: s; }
.step { counter-increment: s; padding: 22px; border-top: 3px solid var(--accent); background: var(--surface); border-radius: 0 0 14px 14px; }
.step::before { content: counter(s, arabic-indic); font-family: var(--display); font-size: 30px; color: var(--accent); display: block; line-height: 1; margin-bottom: 10px; }
.step h3 { font-size: 18px; margin-bottom: 6px; }
.step p { margin: 0; color: var(--muted); font-size: 15px; }

/* التحميل */
.alt { background: var(--surface-2); }
.downloads { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.dl { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 24px; display: flex; gap: 24px; align-items: center; }
.dl .qr { width: 148px; height: 148px; flex: none; background: #fff; border-radius: 12px; padding: 10px; border: 1px solid var(--line); }
.dl .qr img { width: 100%; height: 100%; display: block; image-rendering: pixelated; }
.dl h3 { font-size: 22px; }
.dl p { color: var(--muted); margin: 4px 0 14px; font-size: 15px; }
.store { display: inline-flex; align-items: center; gap: 10px; background: var(--fg); color: var(--bg); text-decoration: none; padding: 10px 16px; border-radius: 10px; font-weight: 600; }
.store svg { width: 20px; height: 20px; }
.store[aria-disabled="true"] { background: var(--surface-2); color: var(--muted); pointer-events: none; }
.soon { display: inline-block; font-size: 13px; color: var(--muted); margin-top: 8px; }

/* لوحة المدرسة والدليل */
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 28px; display: flex; flex-direction: column; gap: 10px; }
.panel h3 { font-size: 22px; }
.panel p { margin: 0 0 8px; color: var(--muted); }
.panel .btn { align-self: flex-start; background: var(--accent); color: var(--accent-fg); }
.panel .btn.outline { background: transparent; color: var(--accent); border-color: var(--accent); }

footer { border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--muted); font-size: 14px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }
footer a { color: var(--accent); }
.ltr { direction: ltr; unicode-bidi: isolate; }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 36px; padding-top: 24px; }
  .features { grid-template-columns: 1fr 1fr; }
  .downloads, .duo, .steps { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  /* على الجوال تختفي روابط الترويسة ويبقى زر اللغة */
  .nav nav a:not([data-lang-toggle]) { display: none; }
  .features { grid-template-columns: 1fr; }
  .dl { flex-direction: column; align-items: flex-start; }
  section { padding: 52px 0; }
}

/* ── صفحات الباقات والتسجيل ── */
.note-end { color: var(--muted); font-size: 14px; padding-block: 0 32px; }
.page-hero { padding-bottom: 44px; }
.page-hero h1 { font-size: clamp(28px, 4.4vw, 42px); font-weight: 700; margin-top: 28px; }
.page-hero p.lead { color: var(--chalk-dim); font-size: 17px; margin: 12px 0 0; max-width: 40em; }
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: stretch; }
.plan { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 26px 22px; display: flex; flex-direction: column; gap: 14px; }
.plan.featured { border: 2px solid var(--accent); box-shadow: 0 14px 40px rgb(29 106 77 / .12); }
.plan .tag { align-self: flex-start; font-size: 13px; font-weight: 600; color: var(--accent); background: var(--accent-soft); border-radius: 999px; padding: 2px 12px; }
.plan h2 { font-size: 26px; }
.plan .for { color: var(--muted); margin: -6px 0 0; font-size: 15px; }
.price { border-block: 1px solid var(--line); padding: 14px 0; }
.price .main { font-family: var(--display); font-size: 30px; font-weight: 700; color: var(--fg); }
.price .main small { font-family: var(--body); font-size: 15px; font-weight: 500; color: var(--muted); }
.price .per { color: var(--fg); font-weight: 600; }
.price .per small { color: var(--muted); font-weight: 400; }
.plan ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; flex: 1; }
.plan li { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; }
.plan li::before { content: ""; flex: none; width: 18px; height: 18px; margin-top: 4px; border-radius: 50%;
  background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231d6a4d' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12l4 4 8-8'/%3E%3C/svg%3E") center / 12px no-repeat; }
.plan li.off { color: var(--muted); }
.plan li.off::before { background: var(--surface-2); }
.plan .btn { justify-content: center; background: var(--accent); color: var(--accent-fg); }
.plan:not(.featured) .btn { background: transparent; color: var(--accent); border-color: var(--accent); }
.plans-extra { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
.plans-extra .plan { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 24px; }
.plans-extra .plan > div { flex: 1 1 260px; }
.plans-extra .plan h2 { font-size: 22px; }
.plans-extra .plan .btn { flex: none; }
.common { margin-top: 28px; color: var(--muted); font-size: 15px; }

.form { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 28px; max-width: 760px; display: grid; gap: 16px; }
.form .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form label { display: block; font-weight: 600; font-size: 15px; margin-bottom: 6px; }
.form label small { font-weight: 400; color: var(--muted); }
.form input, .form select, .form textarea { width: 100%; font: inherit; color: var(--fg); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.form textarea { min-height: 140px; resize: vertical; }
.form .hint { display: block; margin-top: 6px; color: var(--muted); font-size: 13px; }
.form input:focus, .form select:focus, .form textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
.form fieldset { border: 0; padding: 0; margin: 0; }
.form legend { font-weight: 600; font-size: 15px; margin-bottom: 8px; padding: 0; }
.choices { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; }
.choice span { display: block; text-align: center; border: 1px solid var(--line); border-radius: 12px; padding: 12px 8px; cursor: pointer; background: var(--bg); line-height: 1.4; }
.choice span small { display: block; color: var(--muted); font-size: 12.5px; }
.choice input:checked + span { border: 2px solid var(--accent); background: var(--accent-soft); padding: 11px 7px; }
.choice input:focus-visible + span { outline: 3px solid var(--gold); outline-offset: 2px; }
.form .submit { justify-self: start; background: var(--accent); color: var(--accent-fg); border: 0; font: inherit; font-weight: 600; padding: 12px 28px; border-radius: 10px; cursor: pointer; }
.form .submit[disabled] { opacity: .6; cursor: wait; }
.form .err { color: #b3261e; font-size: 14px; }
.done { background: var(--accent-soft); border-radius: 18px; padding: 28px; max-width: 760px; }
.done h2 { font-size: 24px; margin-bottom: 8px; }
@media (prefers-color-scheme: dark) { .form .err { color: #f2b8b5; } }
@media (max-width: 900px) {
  .plans, .plans-extra { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .form { padding: 20px 16px; }
  .form .row2 { grid-template-columns: 1fr; }
  .choices { grid-template-columns: 1fr 1fr; }
}

.btn-wa { background: var(--accent); color: var(--accent-fg); }
.btn-wa:hover { filter: brightness(1.08); }

/* English (ltr): أرقام لاتينية في الخطوات، وخط الواجهة اللاتيني */
html[lang="en"] .step::before { content: counter(s); }
html[lang="en"] { --display: "IBM Plex Sans Arabic", system-ui, sans-serif; }
html[lang="en"] .wordmark small { display: none; }
