@font-face {
  font-family: "Cairo";
  font-style: normal;
  font-weight: 200 1000;
  font-display: swap;
  src: url(fonts/cairo-arabic-wght-normal.woff2) format("woff2");
  unicode-range: U+0600-06FF,U+0750-077F,U+0870-088E,U+0890-0891,U+0897-08E1,U+08E3-08FF,U+200C-200E,U+2010-2011,U+204F,U+2E41,U+FB50-FDFF,U+FE70-FE74,U+FE76-FEFC;
}
@font-face {
  font-family: "Cairo";
  font-style: normal;
  font-weight: 200 1000;
  font-display: swap;
  src: url(fonts/cairo-latin-wght-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

:root {
  --teal: #0e7c9b;
  --teal-dark: #0a5f78;
  --teal-soft: #e6f4f8;
  --green: #2e9e5b;
  --green-soft: #e8f6ee;
  --amber-soft: #fff4e0;
  --amber-line: #f0d29a;
  --bg: #f2f7f9;
  --card: #ffffff;
  --text: #17262e;
  --muted: #5d7480;
  --line: #dbe8ee;
  --shadow: 0 10px 34px rgba(10, 95, 120, .10);
}

@media (prefers-color-scheme: dark) {
  :root {
    --teal-soft: #12323d;
    --green-soft: #12301f;
    --amber-soft: #3a2f16;
    --amber-line: #6b5522;
    --bg: #0d1b21;
    --card: #14262e;
    --text: #e6f0f4;
    --muted: #93aab5;
    --line: #23404c;
    --shadow: 0 10px 34px rgba(0, 0, 0, .35);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Cairo", "Segoe UI", Tahoma, "Noto Naskh Arabic", system-ui, -apple-system, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.95;
  text-rendering: optimizeLegibility;
}
html[lang="en"] body { line-height: 1.75; }

a { color: var(--teal); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--teal-dark); }

/* ---------- الرأس ---------- */
.hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(160deg, #12a0c4 0%, var(--teal) 42%, var(--teal-dark) 100%);
  padding: 22px 20px 74px;
}
.hero::before, .hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, .09);
  pointer-events: none;
}
.hero::before { width: 360px; height: 360px; inset-inline-start: -120px; top: -150px; }
.hero::after { width: 260px; height: 260px; inset-inline-end: -80px; bottom: -130px; background: rgba(255, 255, 255, .07); }
.hero-inner { position: relative; z-index: 1; max-width: 860px; margin: 0 auto; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 800; font-size: 21px; }
.brand img { width: 44px; height: 44px; border-radius: 11px; border: 2px solid rgba(255, 255, 255, .85); box-shadow: 0 4px 14px rgba(0, 0, 0, .22); }
.lang {
  color: #fff; text-decoration: none; font-weight: 700; font-size: 15px;
  padding: 6px 18px; border: 1.5px solid rgba(255, 255, 255, .55); border-radius: 999px;
  background: rgba(255, 255, 255, .12); transition: background .2s;
}
.lang:hover { background: rgba(255, 255, 255, .26); color: #fff; }
.hero h1 { margin: 34px 0 4px; font-size: clamp(28px, 6vw, 40px); font-weight: 800; line-height: 1.35; letter-spacing: -.2px; }
.hero .sub { margin: 0; font-size: 18px; opacity: .92; }
.tabs { display: flex; gap: 8px; margin-top: 24px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a {
  flex: 0 0 auto; color: #fff; text-decoration: none; font-weight: 600; font-size: 15px;
  padding: 7px 18px; border-radius: 999px; background: rgba(255, 255, 255, .14); transition: background .2s;
}
.tabs a:hover { background: rgba(255, 255, 255, .28); color: #fff; }
.tabs a.active { background: #fff; color: var(--teal-dark); }

/* ---------- المحتوى ---------- */
main {
  position: relative;
  z-index: 2;
  max-width: 860px;
  margin: -40px auto 40px;
  background: var(--card);
  border-radius: 26px;
  padding: 30px clamp(18px, 5vw, 42px) 40px;
  box-shadow: var(--shadow);
  counter-reset: sec;
}
main > :first-child { margin-top: 0; }
p { margin: 10px 0; }
.meta { color: var(--muted); font-size: 15px; margin: 0 0 6px; }
.lead p { font-size: 19px; line-height: 2; margin-top: 0; }
html[lang="en"] .lead p { line-height: 1.85; }

.sec { margin-top: 34px; }
.sec h2 {
  display: flex; align-items: center; gap: 12px;
  margin: 0 0 10px; font-size: 22px; font-weight: 800; color: var(--teal-dark); line-height: 1.5;
}
@media (prefers-color-scheme: dark) { .sec h2 { color: #6fd0ea; } }
.numbered .sec h2::before {
  counter-increment: sec;
  content: counter(sec);
  flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 11px; line-height: 1;
  background: linear-gradient(140deg, var(--teal), var(--teal-dark));
  color: #fff; font-size: 16px; font-weight: 700;
}
h3 { font-size: 18px; margin: 6px 0; }
ul, ol { margin: 10px 0; padding-inline-start: 1.5em; }
li { margin: 6px 0; }
li::marker { color: var(--teal); font-weight: 700; }
b, strong { font-weight: 700; }

.callout {
  margin: 20px 0; padding: 14px 18px; border-radius: 16px; font-size: 16.5px; line-height: 1.9;
  border-inline-start: 5px solid var(--teal); background: var(--teal-soft);
}
.callout ul { margin: 6px 0 2px; }
.callout.ok { border-color: var(--green); background: var(--green-soft); }
.callout.warn { border-color: #e0a12b; background: var(--amber-soft); }

.card { border: 1px solid var(--line); border-radius: 18px; padding: 6px 20px; margin: 14px 0; background: var(--bg); }

.table-wrap { overflow-x: auto; margin: 14px 0; border: 1px solid var(--line); border-radius: 16px; }
table { width: 100%; border-collapse: collapse; font-size: 15.5px; }
th, td { padding: 11px 14px; text-align: start; vertical-align: top; line-height: 1.8; }
thead th { background: var(--teal-soft); color: var(--teal-dark); font-weight: 700; }
@media (prefers-color-scheme: dark) { thead th { color: #6fd0ea; } }
tbody tr + tr td { border-top: 1px solid var(--line); }
tbody tr:nth-child(even) td { background: rgba(14, 124, 155, .04); }

/* ---------- الرئيسية ---------- */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; margin: 22px 0; }
.feature { border: 1px solid var(--line); border-radius: 20px; padding: 18px 18px 14px; background: var(--bg); transition: transform .2s, box-shadow .2s; }
.feature:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.feature .ico { width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; font-size: 25px; border-radius: 15px; background: var(--card); box-shadow: 0 4px 14px rgba(10, 95, 120, .12); }
.feature h3 { margin: 12px 0 2px; font-size: 18px; color: var(--teal-dark); }
@media (prefers-color-scheme: dark) { .feature h3 { color: #6fd0ea; } }
.feature p { margin: 0 0 6px; font-size: 15.5px; color: var(--muted); line-height: 1.8; }

.links-row { display: flex; flex-wrap: wrap; gap: 10px; }
.btn {
  display: inline-block; text-decoration: none; font-weight: 700; font-size: 16px;
  padding: 10px 24px; border-radius: 999px; color: #fff; background: linear-gradient(140deg, var(--teal), var(--teal-dark));
  box-shadow: 0 6px 16px rgba(10, 95, 120, .25); transition: transform .15s, box-shadow .15s;
}
.btn:hover { transform: translateY(-2px); color: #fff; box-shadow: 0 10px 22px rgba(10, 95, 120, .3); }
.btn.ghost { color: var(--teal-dark); background: transparent; border: 1.5px solid var(--teal); box-shadow: none; }
.btn.ghost:hover { background: var(--teal-soft); color: var(--teal-dark); }
@media (prefers-color-scheme: dark) { .btn.ghost { color: #6fd0ea; border-color: #2d7f96; } }

a.wa bdi { direction: ltr; unicode-bidi: isolate; white-space: nowrap; }
a.wa { color: #1c8c4c; font-weight: 700; text-decoration: none; border-bottom: 1.5px solid rgba(28, 140, 76, .35); }
a.wa:hover { color: #14703c; border-bottom-color: currentColor; }
@media (prefers-color-scheme: dark) { a.wa { color: #58d68d; } }

/* ---------- التذييل ---------- */
footer { text-align: center; color: var(--muted); font-size: 15px; padding: 0 20px 48px; }
footer p { margin: 6px 0; }
.foot-links a { color: var(--muted); text-decoration: none; }
.foot-links a:hover { color: var(--teal); text-decoration: underline; }
.copy { font-size: 14px; opacity: .85; }

@media (max-width: 560px) {
  body { font-size: 16.5px; }
  .hero { padding-bottom: 66px; }
  main { border-radius: 22px; margin-inline: 10px; }
}

@media print {
  .hero { background: none !important; color: #000; padding: 0 0 10px; }
  .hero::before, .hero::after, .tabs, .lang, footer .foot-links { display: none; }
  .brand, .hero h1, .hero .sub { color: #000; }
  main { box-shadow: none; margin: 0; padding: 0; }
  body { background: #fff; color: #000; font-size: 12pt; }
}
