/* =========================================================
   بيجات — تصميم الموقع
   الهوية: سماوي #0EA5FF · برتقالي #FF8A00 · كحلي #0F172A · أبيض
   ========================================================= */

@font-face { font-family: 'Alexandria'; src: url('../fonts/alexandria-regular.woff') format('woff'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Alexandria'; src: url('../fonts/alexandria-medium.woff') format('woff'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Alexandria'; src: url('../fonts/alexandria-bold.woff') format('woff'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Alexandria'; src: url('../fonts/alexandria-extrabold.woff') format('woff'); font-weight: 800; font-display: swap; }

:root {
  --navy: #0F172A;
  --navy-2: #1E293B;
  --navy-3: #334155;
  --sky: #0EA5FF;
  --sky-ink: #0270B0;      /* السماوي للنصوص الصغيرة (تباين كافي على الأبيض) */
  --sky-soft: #E8F6FF;
  --sky-line: #BFE6FF;
  --orange: #FF8A00;
  --orange-hover: #F07F00;
  --orange-soft: #FFF3E3;
  --orange-ink: #A85600;
  --bg: #FFFFFF;
  --tint: #F4F8FC;
  --line: #E3E9F1;
  --text: #0F172A;
  --muted: #556074;
  --danger: #C2281D;

  --radius: 18px;
  --radius-sm: 12px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06), 0 1px 1px rgba(15, 23, 42, .04);
  --shadow: 0 10px 30px -12px rgba(15, 23, 42, .18), 0 2px 6px rgba(15, 23, 42, .05);
  --shadow-lg: 0 30px 60px -20px rgba(15, 23, 42, .35);

  --container: 1160px;
  --gutter: clamp(16px, 4vw, 32px);
  --header-h: 72px;

  --font: 'Alexandria', system-ui, -apple-system, 'Segoe UI', Tahoma, sans-serif;
  color-scheme: light;
}

/* ---------- أساسيات ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
html.nav-locked { overflow: hidden; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.85;
  color: var(--text);
  background: var(--bg);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--sky-ink); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 4px; }
h1, h2, h3, h4 { line-height: 1.4; margin: 0 0 .5em; font-weight: 800; letter-spacing: 0; }
p { margin: 0 0 1em; }
button { font: inherit; }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--sky-line); }

.icon { width: 1.25em; height: 1.25em; flex: none; }
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }

.skip {
  position: absolute; inset-inline-start: 12px; top: -60px; z-index: 100;
  background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 10px;
}
.skip:focus { top: 12px; }

/* ---------- أزرار ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 48px; padding: 0 22px; border-radius: 999px; border: 0;
  font-weight: 700; font-size: .95rem; cursor: pointer; white-space: nowrap;
  transition: background-color .15s, transform .15s, box-shadow .15s;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--orange); color: var(--navy); box-shadow: 0 6px 18px -8px rgba(255, 138, 0, .8); }
.btn-primary:hover { background: var(--orange-hover); }
.btn-soft { background: var(--sky-soft); color: var(--navy); }
.btn-soft:hover { background: var(--sky-line); }
.btn-ghost-light { background: transparent; color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .35); }
.btn-ghost-light:hover { box-shadow: inset 0 0 0 1.5px #fff; }

.link-arrow { display: inline-flex; align-items: center; gap: .4em; font-weight: 700; color: var(--sky-ink); }
.link-arrow .icon { transition: transform .15s; }
.link-arrow:hover .icon { transform: translateX(-4px); }

/* أزرار المتجرين */
.stores { display: flex; flex-wrap: wrap; gap: 12px; }
.store {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 56px; padding: 8px 18px 8px 20px; border-radius: 14px;
  background: var(--navy); color: #fff; line-height: 1.25;
  transition: transform .15s, background-color .15s;
}
.store:hover { text-decoration: none; background: var(--navy-2); transform: translateY(-1px); }
.store .icon { width: 26px; height: 26px; color: var(--sky); }
.store small { display: block; font-size: .72rem; opacity: .75; font-weight: 500; }
.store b { display: block; font-size: 1.02rem; font-weight: 700; white-space: nowrap; }
.store.is-soon { cursor: default; background: var(--navy-2); }
.store.is-soon:hover { transform: none; }
.store.is-soon small { color: var(--orange); opacity: 1; }
.store-light { background: #fff; color: var(--navy); }
.store-light:hover { background: var(--sky-soft); }
.store-light.is-soon { background: rgba(255, 255, 255, .08); color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .18); }
.store-dark { background: var(--navy-2); }

/* ---------- الهيدر ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .86);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s, box-shadow .2s;
}
.site-header.is-scrolled { border-bottom-color: var(--line); box-shadow: var(--shadow-sm); }
.header-inner { display: flex; align-items: center; gap: 24px; height: var(--header-h); }
.brand img { width: 118px; height: auto; }
.nav { display: flex; align-items: center; gap: 28px; margin-inline-start: auto; }
.nav ul { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; }
.nav ul a {
  display: block; padding: 8px 12px; border-radius: 10px;
  color: var(--navy-3); font-weight: 500; font-size: .95rem;
}
.nav ul a:hover, .nav ul a[aria-current] { color: var(--navy); background: var(--tint); text-decoration: none; }
.nav-cta { min-height: 44px; padding: 0 18px; }
.nav-toggle {
  display: none; margin-inline-start: auto;
  width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line);
  background: #fff; color: var(--navy); cursor: pointer; align-items: center; justify-content: center;
}
.nav-toggle .i-close { display: none; }

@media (max-width: 899px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    position: fixed; inset: var(--header-h) 0 0 0; z-index: 49;
    flex-direction: column; align-items: stretch; gap: 20px;
    padding: 20px var(--gutter) 32px; background: #fff;
    border-top: 1px solid var(--line);
    visibility: hidden; opacity: 0; transform: translateY(-8px);
    transition: opacity .2s, transform .2s, visibility 0s .2s;
    overflow-y: auto;
  }
  .nav ul { flex-direction: column; gap: 4px; }
  .nav ul a { padding: 14px 12px; font-size: 1.05rem; border-bottom: 1px solid var(--line); border-radius: 0; }
  .nav-cta { min-height: 52px; }
  .site-header.is-open { background: #fff; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .site-header.is-open .nav { visibility: visible; opacity: 1; transform: none; transition: opacity .2s, transform .2s; }
  .site-header.is-open .i-open { display: none; }
  .site-header.is-open .i-close { display: block; }
}

/* ---------- الواجهة الرئيسية (Hero) ---------- */
.hero {
  position: relative; overflow: hidden;
  padding: clamp(40px, 7vw, 88px) 0 clamp(56px, 8vw, 104px);
  background:
    radial-gradient(900px 480px at 85% -10%, rgba(14, 165, 255, .16), transparent 60%),
    radial-gradient(700px 420px at 0% 110%, rgba(255, 138, 0, .10), transparent 60%),
    linear-gradient(180deg, #fff, var(--tint));
}
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(32px, 5vw, 64px); align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; margin-bottom: 20px; border-radius: 999px;
  background: #fff; box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--line);
  color: var(--navy-3); font-size: .85rem; font-weight: 500;
}
.eyebrow .icon { color: var(--orange); width: 1.1em; height: 1.1em; }
.hero h1 { font-size: clamp(2.1rem, 5.2vw, 3.6rem); line-height: 1.3; margin-bottom: 18px; }
.hl { position: relative; white-space: nowrap; color: var(--navy); z-index: 0; }
.hl::after {
  content: ''; position: absolute; z-index: -1;
  inset-inline: -6px; bottom: .02em; height: .3em; border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 138, 0, .45), rgba(14, 165, 255, .4));
}
.lead { font-size: clamp(1.02rem, 1.6vw, 1.18rem); color: var(--muted); max-width: 40em; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; margin: 28px 0 24px; }
.checks { display: flex; flex-wrap: wrap; gap: 10px 22px; list-style: none; margin: 0; padding: 0; color: var(--navy-3); font-weight: 500; font-size: .95rem; }
.checks li { display: inline-flex; align-items: center; gap: 8px; }
.checks .icon { color: #fff; background: var(--sky); border-radius: 50%; padding: 3px; width: 20px; height: 20px; stroke-width: 3; }

/* هاتف توضيحي */
.hero-visual { position: relative; display: flex; justify-content: center; padding: 20px 0; }
.hero-visual::before {
  content: ''; position: absolute; width: 78%; aspect-ratio: 1; border-radius: 50%;
  top: 50%; left: 50%; transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(14, 165, 255, .22), transparent 68%);
}
.phone {
  position: relative; width: min(300px, 78vw); padding: 12px; border-radius: 44px;
  background: var(--navy); box-shadow: var(--shadow-lg), inset 0 0 0 2px var(--navy-3);
  transform: rotate(-3deg);
}
.phone-notch { position: absolute; top: 20px; left: 50%; width: 84px; height: 22px; margin-left: -42px; border-radius: 12px; background: var(--navy); z-index: 2; }
.phone-screen { border-radius: 34px; background: var(--tint); padding: 52px 16px 18px; display: grid; gap: 12px; font-size: .82rem; }
.ps-top { display: flex; align-items: center; justify-content: space-between; font-weight: 700; font-size: .95rem; }
.ps-top .icon { color: var(--sky-ink); }
.ps-product { display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 16px; padding: 10px; box-shadow: var(--shadow-sm); }
.ps-thumb { width: 52px; height: 52px; border-radius: 12px; background: var(--sky-soft); color: var(--sky-ink); display: grid; place-items: center; }
.ps-lines { flex: 1; display: grid; gap: 8px; }
.ps-lines i { display: block; height: 9px; border-radius: 6px; background: var(--line); }
.ps-lines i.short { width: 55%; }
.ps-qty { font-weight: 700; color: var(--muted); }
.ps-sum { margin: 0; background: #fff; border-radius: 16px; padding: 6px 14px; box-shadow: var(--shadow-sm); }
.ps-sum div { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px dashed var(--line); }
.ps-sum div:last-child { border-bottom: 0; }
.ps-sum dt { color: var(--muted); }
.ps-sum dd { margin: 0; font-weight: 700; }
.ps-sum .total dt, .ps-sum .total dd { color: var(--navy); font-weight: 800; }
.ps-profit { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-radius: 16px; background: var(--navy); color: #fff; }
.ps-profit b { color: var(--orange); font-size: 1.1rem; }
.ps-btn { text-align: center; padding: 12px; border-radius: 999px; background: var(--orange); color: var(--navy); font-weight: 800; }
.float-chip {
  position: absolute; display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 14px; border-radius: 14px; background: #fff;
  box-shadow: var(--shadow); font-weight: 700; font-size: .85rem; white-space: nowrap;
}
.float-chip .icon { width: 30px; height: 30px; padding: 6px; border-radius: 9px; }
.chip-a { top: 14%; inset-inline-end: -2%; }
.chip-a .icon { background: var(--sky-soft); color: var(--sky-ink); }
.chip-b { bottom: 12%; inset-inline-start: -4%; }
.chip-b .icon { background: var(--orange-soft); color: var(--orange-ink); }

@media (prefers-reduced-motion: no-preference) {
  .float-chip { animation: float 6s ease-in-out infinite; }
  .chip-b { animation-delay: -3s; }
  @keyframes float { 50% { transform: translateY(-8px); } }
}

/* ---------- الأرقام ---------- */
.facts { background: var(--navy); color: #fff; }
.facts-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.fact { padding: 28px 20px; text-align: center; border-inline-start: 1px solid rgba(255, 255, 255, .1); }
.fact:first-child { border-inline-start: 0; }
.fact b { display: block; font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 800; color: #fff; line-height: 1.4; }
.fact b small { font-size: .55em; color: var(--sky); font-weight: 700; }
.fact b.fact-text { font-size: clamp(1.05rem, 2vw, 1.3rem); padding-block: .35em; color: var(--orange); }
.fact span { color: #B6C2D3; font-size: .9rem; }

/* ---------- الأقسام ---------- */
.section { padding: clamp(64px, 9vw, 112px) 0; }
.section-tight { padding-top: 24px; }
.section-tint { background: var(--tint); }
.section-head { max-width: 680px; margin: 0 auto clamp(32px, 5vw, 56px); text-align: center; }
.section-head h2 { font-size: clamp(1.6rem, 3.4vw, 2.4rem); }
.section-head p { color: var(--muted); margin: 0; }
.section-head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; max-width: none; text-align: start; flex-wrap: wrap; }
.section-head-row h2 { margin: 0; }
.kicker, .section-head .kicker { color: var(--sky-ink); font-weight: 700; font-size: .9rem; margin-bottom: 8px; letter-spacing: 0; }
.card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--line); }

/* الخطوات */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; counter-reset: none; }
.step { position: relative; padding: 24px 20px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); }
.step-num {
  position: absolute; top: 16px; inset-inline-end: 18px;
  font-size: 2.2rem; font-weight: 800; line-height: 1; color: var(--sky-soft);
  -webkit-text-stroke: 1px var(--sky-line);
}
.step-icon { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 16px; border-radius: 14px; background: var(--navy); color: var(--sky); }
.step h3 { font-size: 1.05rem; margin-bottom: 6px; }
.step p { color: var(--muted); font-size: .92rem; margin: 0; line-height: 1.8; }
.step:nth-child(4) .step-icon, .step:nth-child(5) .step-icon { color: var(--orange); }

/* المميزات */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature { padding: 28px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); transition: transform .2s, box-shadow .2s; }
.feature:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.feature-icon { display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 18px; border-radius: 16px; background: var(--sky-soft); color: var(--sky-ink); }
.feature-icon .icon { width: 26px; height: 26px; }
.feature:nth-child(3n+2) .feature-icon { background: var(--orange-soft); color: var(--orange-ink); }
.feature h3 { font-size: 1.12rem; }
.feature p { color: var(--muted); margin: 0; font-size: .95rem; }

/* الحاسبة */
.calc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.calc-copy h2 { font-size: clamp(1.6rem, 3.4vw, 2.4rem); }
.calc-copy > p { color: var(--muted); }
.calc-notes { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 12px; }
.calc-notes li { display: flex; gap: 10px; align-items: flex-start; color: var(--navy-3); }
.calc-notes .icon { color: var(--sky-ink); margin-top: .3em; stroke-width: 2.6; }
.calc { padding: clamp(20px, 3vw, 32px); display: grid; gap: 18px; }
.field label { display: block; font-weight: 700; margin-bottom: 6px; font-size: .95rem; }
.field label small { color: var(--muted); font-weight: 500; }
.input-iqd { display: flex; align-items: center; border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: #fff; transition: border-color .15s, box-shadow .15s; }
.input-iqd:focus-within { border-color: var(--sky); box-shadow: 0 0 0 4px rgba(14, 165, 255, .15); }
.input-iqd input {
  flex: 1; min-width: 0; border: 0; background: transparent; outline: 0;
  padding: 14px 16px; font: inherit; font-size: 1.1rem; font-weight: 700; color: var(--navy);
  direction: ltr; text-align: right;
}
.input-iqd span { padding-inline: 14px; color: var(--muted); font-weight: 500; border-inline-start: 1px solid var(--line); }
.calc-out { display: grid; gap: 10px; margin-top: 6px; padding-top: 18px; border-top: 1px dashed var(--line); }
.calc-out > div { display: flex; justify-content: space-between; align-items: center; }
.calc-out span { color: var(--muted); }
.calc-out b { font-size: 1.15rem; }
.calc-profit { padding: 14px 18px; border-radius: var(--radius-sm); background: var(--navy); }
.calc-profit span { color: #CBD5E1 !important; }
.calc-profit b { color: var(--orange); font-size: 1.5rem; }
.calc.is-bad .calc-profit b { color: #FF9C91; }
.calc-msg { margin: 0; color: var(--danger); font-size: .9rem; }

/* بطاقات المقالات */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.a-card { border-radius: var(--radius); background: #fff; border: 1px solid var(--line); overflow: hidden; transition: transform .2s, box-shadow .2s; }
.a-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.a-card-link { display: flex; flex-direction: column; height: 100%; color: inherit; }
.a-card-link:hover { text-decoration: none; }
.a-card-cover { aspect-ratio: 1200 / 630; overflow: hidden; background: var(--sky-soft); }
.a-card-cover img { width: 100%; height: 100%; object-fit: cover; }
.cover-ph {
  width: 100%; height: 100%; display: grid; place-items: center;
  background:
    linear-gradient(135deg, transparent 0 60%, rgba(255, 138, 0, .25) 60% 62%, transparent 62%),
    linear-gradient(135deg, var(--navy), var(--navy-2));
}
.cover-ph img { width: 56px; height: 56px; filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .3)); }
.a-card-body { padding: 20px 22px 22px; display: flex; flex-direction: column; flex: 1; }
.a-card-body h3 { font-size: 1.1rem; margin: 10px 0 8px; line-height: 1.6; }
.a-card-body p { color: var(--muted); font-size: .93rem; margin: 0 0 16px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tag { display: inline-block; align-self: flex-start; padding: 2px 12px; border-radius: 999px; background: var(--sky-soft); color: var(--sky-ink); font-size: .8rem; font-weight: 700; }
a.tag:hover { background: var(--sky-line); text-decoration: none; }
.a-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: auto; color: var(--muted); font-size: .84rem; }
.a-meta > span { display: inline-flex; align-items: center; gap: 6px; }
.a-meta .icon { width: 1.05em; height: 1.05em; }

/* الأسئلة */
.faq-wrap { max-width: 860px; }
.faq { display: grid; gap: 12px; }
.faq details { border-radius: var(--radius-sm); background: #fff; border: 1px solid var(--line); transition: box-shadow .2s, border-color .2s; }
.faq details[open] { border-color: var(--sky-line); box-shadow: var(--shadow); }
.faq summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 22px; font-weight: 700; font-size: 1.02rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq-mark { position: relative; width: 28px; height: 28px; flex: none; border-radius: 50%; background: var(--sky-soft); }
.faq-mark::before, .faq-mark::after { content: ''; position: absolute; top: 50%; left: 50%; width: 12px; height: 2px; margin: -1px 0 0 -6px; border-radius: 2px; background: var(--sky-ink); transition: transform .2s; }
.faq-mark::after { transform: rotate(90deg); }
.faq details[open] .faq-mark::after { transform: rotate(0); }
.faq details p { margin: 0; padding: 0 22px 20px; color: var(--muted); }

/* شريط التحميل */
.cta { background: var(--navy); color: #fff; padding: clamp(64px, 9vw, 104px) 0; position: relative; overflow: hidden; }
.cta::before, .cta::after { content: ''; position: absolute; border-radius: 999px; height: 18px; opacity: .9; }
.cta::before { width: 220px; top: 22%; inset-inline-start: -60px; background: var(--sky); }
.cta::after { width: 140px; bottom: 24%; inset-inline-end: -40px; background: var(--orange); }
.cta-inner { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 16px; }
.cta-icon { width: 72px; height: 72px; border-radius: 20px; box-shadow: 0 0 0 6px rgba(255, 255, 255, .06); }
.cta h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); margin: 8px 0 0; }
.cta p { color: #B6C2D3; margin: 0 0 8px; font-size: 1.08rem; }
.cta .stores { justify-content: center; }

/* ---------- صفحات المقالات ---------- */
.page-hero { padding: clamp(32px, 5vw, 56px) 0 8px; background: linear-gradient(180deg, var(--tint), #fff); }
.page-hero h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); margin-top: 12px; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; font-size: .86rem; color: var(--muted); }
.crumbs li { display: inline-flex; align-items: center; gap: 6px; }
.crumbs li + li::before { content: '‹'; color: var(--line); font-size: 1.1em; }
.crumbs a { color: var(--muted); }
.crumbs [aria-current] { color: var(--navy); font-weight: 500; max-width: 40ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tagbar ul { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 24px 0 0; padding: 0; }
.chip { display: inline-block; padding: 6px 16px; border-radius: 999px; background: #fff; border: 1px solid var(--line); color: var(--navy-3); font-size: .9rem; font-weight: 500; }
.chip:hover { border-color: var(--sky); text-decoration: none; }
.chip.is-on { background: var(--navy); border-color: var(--navy); color: #fff; }
.pager { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 40px; }
.pager-info { color: var(--muted); font-size: .92rem; }
.empty { max-width: 560px; margin: 16px auto 40px; padding: clamp(32px, 5vw, 56px) 24px; text-align: center; display: flex; flex-direction: column; align-items: center; }
.empty-icon { display: grid; place-items: center; width: 72px; height: 72px; margin-bottom: 20px; border-radius: 22px; background: var(--sky-soft); color: var(--sky-ink); }
.empty-icon .icon { width: 34px; height: 34px; }
.empty h1, .empty h2 { font-size: 1.5rem; }
.empty p { color: var(--muted); }
.row-gap { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.notfound { min-height: 60vh; display: flex; align-items: center; }

/* المقالة */
.article-head { padding: clamp(32px, 5vw, 56px) 0 24px; background: linear-gradient(180deg, var(--tint), #fff); }
.article-tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 20px 0 12px; padding: 0; }
.article-head h1 { font-size: clamp(1.8rem, 4.2vw, 2.7rem); line-height: 1.45; }
.article-head .lead { margin-bottom: 18px; }
.article-width { max-width: calc(760px + 2 * var(--gutter)); }
.article-width.has-toc { max-width: calc(760px + 220px + 56px + 2 * var(--gutter)); }
.article-head-inner { max-width: 760px; }
.article-cover { margin: 8px 0 32px; max-width: 760px; }
.article-cover img { width: 100%; border-radius: var(--radius); aspect-ratio: 1200 / 630; object-fit: cover; box-shadow: var(--shadow); }
/* بالـ RTL العمود الأول يمين: المقالة يمين (محاذية للعنوان) والفهرس يسار */
.article-layout { display: grid; grid-template-columns: minmax(0, 760px); grid-template-areas: "prose"; gap: 56px; padding-bottom: clamp(56px, 8vw, 96px); }
.article-layout.has-toc { grid-template-columns: minmax(0, 760px) 220px; grid-template-areas: "prose toc"; }
.article-layout .prose { grid-area: prose; }
.article-layout .toc { grid-area: toc; }
.toc { position: sticky; top: calc(var(--header-h) + 24px); align-self: start; font-size: .9rem; }
.toc summary { font-weight: 800; margin-bottom: 10px; cursor: pointer; list-style: none; }
.toc summary::-webkit-details-marker { display: none; }
.toc ol { list-style: none; margin: 0; padding: 0; border-inline-start: 2px solid var(--line); }
.toc a { display: block; padding: 6px 14px; margin-inline-start: -2px; border-inline-start: 2px solid transparent; color: var(--muted); line-height: 1.6; }
.toc a:hover { color: var(--navy); text-decoration: none; }
.toc a[aria-current] { color: var(--navy); border-inline-start-color: var(--sky); font-weight: 700; }

.prose { font-size: 1.07rem; line-height: 2; color: #1E293B; }
.prose h2 { font-size: 1.6rem; margin: 2em 0 .6em; }
.prose h3 { font-size: 1.25rem; margin: 1.6em 0 .5em; }
.prose h4 { font-size: 1.08rem; margin: 1.4em 0 .4em; }
.prose > :first-child { margin-top: 0; }
.prose p, .prose ul, .prose ol, .prose blockquote, .prose figure, .prose pre, .prose .table-wrap { margin: 0 0 1.3em; }
.prose ul, .prose ol { padding-inline-start: 1.4em; }
.prose li { margin-bottom: .4em; }
.prose li::marker { color: var(--sky-ink); font-weight: 700; }
.prose a { text-decoration: underline; text-decoration-color: var(--sky-line); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.prose a:hover { text-decoration-color: var(--sky); }
.prose strong { color: var(--navy); }
.prose img { border-radius: var(--radius-sm); }
.prose figure img { width: 100%; }
.prose figcaption { margin-top: 8px; color: var(--muted); font-size: .9rem; text-align: center; }
.prose blockquote { padding: 4px 20px; border-inline-start: 4px solid var(--sky); color: var(--navy-3); font-weight: 500; }
.prose blockquote p:last-child { margin-bottom: 0; }
.prose code { padding: .1em .4em; border-radius: 6px; background: var(--tint); font-size: .92em; }
.prose pre { padding: 18px; border-radius: var(--radius-sm); background: var(--navy); color: #E2E8F0; overflow-x: auto; line-height: 1.6; font-size: .9rem; }
.prose pre code { background: none; padding: 0; }
.prose hr { border: 0; height: 1px; background: var(--line); margin: 2.4em 0; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.prose table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.prose th, .prose td { padding: 12px 16px; text-align: start; border-bottom: 1px solid var(--line); }
.prose th { background: var(--tint); font-weight: 700; }
.prose tr:last-child td { border-bottom: 0; }
.prose .ta-center { text-align: center; }
.prose .ta-left { text-align: left; }
.prose .ta-right { text-align: right; }
.callout { padding: 18px 22px; border-radius: var(--radius-sm); background: var(--sky-soft); border-inline-start: 4px solid var(--sky); margin: 0 0 1.4em; }
.prose .callout > :last-child { margin-bottom: 0; }
.prose .callout-title { font-weight: 800; color: var(--navy); margin-bottom: .3em; }
.callout-warning { background: var(--orange-soft); border-color: var(--orange); }
.callout-note { background: var(--tint); border-color: var(--navy-3); }
.callout-cta { background: var(--navy); color: #E2E8F0; border-color: var(--orange); }
.callout-cta .callout-title, .callout-cta strong { color: #fff; }
.callout-cta a { color: var(--orange); text-decoration-color: rgba(255, 138, 0, .4); }

.share { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 40px 0 0; padding-top: 24px; border-top: 1px solid var(--line); }
.share > span { font-weight: 700; margin-inline-end: 6px; }
.share-btn { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--tint); color: var(--navy); border: 1px solid var(--line); cursor: pointer; transition: background-color .15s; }
.share-btn:hover { background: var(--sky-soft); text-decoration: none; }
.share-btn.is-done { background: var(--navy); color: var(--sky); }
.article-cta { display: flex; gap: 20px; align-items: flex-start; margin-top: 32px; padding: 28px; border-radius: var(--radius); background: var(--navy); color: #fff; }
.article-cta img { width: 56px; height: 56px; border-radius: 16px; flex: none; }
.article-cta h2 { font-size: 1.3rem; margin: 0 0 4px; color: #fff; }
.article-cta p { color: #B6C2D3; font-size: .98rem; margin-bottom: 16px; line-height: 1.8; }

/* ---------- الفوتر ---------- */
.site-footer { background: #0B1222; color: #B6C2D3; padding-top: 56px; font-size: .95rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1.2fr; gap: 40px; padding-bottom: 40px; }
.footer-about img { width: 132px; margin-bottom: 16px; }
.footer-about p { max-width: 36ch; line-height: 1.9; }
.site-footer h2 { color: #fff; font-size: 1rem; margin-bottom: 14px; }
.footer-links ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.site-footer a { color: #B6C2D3; }
.site-footer a:hover { color: #fff; }
.social { display: flex; gap: 10px; list-style: none; padding: 0; margin: 20px 0 0; }
.social a { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: rgba(255, 255, 255, .06); }
.social a:hover { background: rgba(255, 255, 255, .12); text-decoration: none; }
.footer-app .stores { flex-direction: column; align-items: flex-start; }
.footer-app .store { min-width: 200px; justify-content: flex-start; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .08); padding-block: 20px; font-size: .85rem; }
.footer-bottom p { margin: 0; }

/* ---------- المقاسات ---------- */
@media (max-width: 1080px) {
  .steps { grid-template-columns: repeat(3, 1fr); }
  .article-width.has-toc { max-width: calc(760px + 2 * var(--gutter)); }
  .article-layout.has-toc { grid-template-columns: minmax(0, 760px); grid-template-areas: "toc" "prose"; gap: 24px; }
  .toc { position: static; padding: 16px 18px; border-radius: var(--radius-sm); background: var(--tint); }
  .toc details:not([open]) summary { margin-bottom: 0; }
}
@media (max-width: 899px) {
  .hero-grid, .calc-grid { grid-template-columns: 1fr; }
  .hero-copy { text-align: center; }
  .hero-copy .lead { margin-inline: auto; }
  .hero-actions, .checks, .stores { justify-content: center; }
  .features, .cards { grid-template-columns: repeat(2, 1fr); }
  .facts-grid { grid-template-columns: repeat(2, 1fr); }
  .fact:nth-child(3) { border-inline-start: 0; }
  .fact:nth-child(n+3) { border-top: 1px solid rgba(255, 255, 255, .1); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-about { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  :root { --header-h: 64px; }
  body { font-size: .97rem; }
  .brand img { width: 104px; }
  .steps, .features, .cards { grid-template-columns: 1fr; }
  .step { display: grid; grid-template-columns: 48px 1fr; column-gap: 16px; }
  .step-icon { grid-row: span 2; margin: 0; }
  .step h3 { margin-top: 2px; }
  .float-chip { font-size: .78rem; padding: 8px 10px; }
  .chip-a { inset-inline-end: 0; }
  .chip-b { inset-inline-start: 0; }
  .store { flex: 1 1 140px; justify-content: center; padding-inline: 12px; }
  .chip-a { top: 8%; }
  .chip-b { bottom: 0; }
  .feature { display: grid; grid-template-columns: 48px 1fr; column-gap: 16px; padding: 20px; }
  .feature-icon { grid-row: span 2; width: 48px; height: 48px; margin: 0; }
  .feature h3 { margin: 2px 0 4px; }
  .fact b.fact-text { font-size: 1rem; }
  .footer-grid { grid-template-columns: 1fr; }
  .article-cta { flex-direction: column; }
  .prose { font-size: 1.02rem; }
  .section-head-row { align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

@media print {
  .site-header, .site-footer, .share, .article-cta, .toc, .cta { display: none !important; }
  .prose { font-size: 12pt; }
}

/* سهم فتح/طي الفهرس */
.toc summary { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.toc summary::after { content: ''; width: 8px; height: 8px; border-inline-start: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(-45deg); transition: transform .2s; margin-inline-end: 4px; }
.toc details[open] summary::after { transform: rotate(135deg); }
@media (min-width: 1081px) { .toc summary::after { display: none; } .toc summary { pointer-events: none; } }
