:root {
  --bg: #f6f4ef;
  --surface: #ffffff;
  --text: #14202e;
  --muted: #55606e;
  --border: #e3ddd0;
  --navy: #0b2545;
  --navy-2: #13315c;
  --gold: #c9a227;
  --gold-2: #e0bc4f;
  --brand: #8a6400;
  --brand-dark: #6b4d00;
  --accent-bg: #f7f0dc;
  --warn-bg: #fef9e7;
  --warn-border: #e9c46a;
  --radius: 12px;
  --max: 1100px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a1220;
    --surface: #111c2e;
    --text: #e9edf3;
    --muted: #a5afbd;
    --border: #22324a;
    --brand: #e0b84a;
    --brand-dark: #f0cf72;
    --accent-bg: #1c2a40;
    --warn-bg: #2a2516;
    --warn-border: #8a6d1f;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Cairo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.85;
  font-size: 18px;
}
a { color: var(--brand); }
a:hover { color: var(--brand-dark); }
img { max-width: 100%; height: auto; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }

/* Header */
.site-header { background: var(--navy); border-bottom: 3px solid var(--gold); position: sticky; top: 0; z-index: 10; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; flex-wrap: wrap; }
.logo { font-weight: 800; font-size: 1.4rem; text-decoration: none; color: #fff; }
.logo span { color: var(--gold); }
.nav { display: flex; gap: 20px; flex-wrap: wrap; }
.nav a { text-decoration: none; color: #d7dfea; font-weight: 600; font-size: .98rem; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--gold-2); }

/* Hero */
.hero { margin: 20px 0 8px; padding: 44px 24px 0; text-align: center; color: #fff; border-radius: 18px; overflow: hidden;
  background: linear-gradient(180deg, var(--navy) 0%, var(--navy-2) 70%, #2a4a7a 100%); }
.hero h1 { font-size: clamp(1.9rem, 5vw, 3rem); font-weight: 800; line-height: 1.3; margin: 0 0 12px; }
.hero h1 span { color: var(--gold-2); }
.hero p { color: #d7dfea; max-width: 660px; margin: 0 auto 24px; font-size: 1.08rem; }
.hero-art { display: block; width: 100%; max-width: 900px; margin: 24px auto 0; }
.search { display: flex; max-width: 580px; margin: 0 auto; gap: 8px; }
.search input { flex: 1; min-width: 0; padding: 14px 16px; font-size: 1.05rem; border: 2px solid transparent; border-radius: var(--radius); background: #fff; color: #14202e; font-family: inherit; }
.search input:focus { outline: none; border-color: var(--gold); }
.btn { display: inline-block; padding: 12px 22px; background: var(--gold); color: var(--navy); border: 0; border-radius: var(--radius); font-weight: 800; font-size: 1.05rem; cursor: pointer; text-decoration: none; font-family: inherit; }
.btn:hover { background: var(--gold-2); color: var(--navy); }
.section h2, .article h2 { position: relative; padding-inline-start: 14px; }
.section h2::before, .article h2::before { content: ""; position: absolute; inset-inline-start: 0; top: .35em; bottom: .35em; width: 5px; border-radius: 3px; background: var(--gold); }

/* Grid / cards */
.section { padding: 32px 0; }
.section h2 { font-size: 1.5rem; margin: 0 0 16px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; text-decoration: none; color: var(--text); display: block; transition: border-color .15s; }
.card:hover { border-color: var(--gold); color: var(--text); box-shadow: 0 6px 18px rgba(11,37,69,.10); }
.card .tag { display: inline-block; font-size: .78rem; color: var(--navy); background: var(--accent-bg); border-radius: 999px; padding: 0 10px; font-weight: 700; }
@media (prefers-color-scheme: dark) { .card .tag { color: var(--gold-2); } }
.card h3 { margin: 8px 0 6px; font-size: 1.15rem; font-weight: 800; }
.card p { margin: 0; color: var(--muted); font-size: .93rem; }
.meta { font-size: .85rem; color: var(--muted); }
.hidden { display: none !important; }

/* Article layout */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 32px; padding: 32px 0; }
@media (max-width: 900px) { .layout { grid-template-columns: 1fr; } }
.article { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; }
@media (max-width: 600px) { .article { padding: 18px; } }
.article h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); line-height: 1.25; margin: 0 0 8px; }
.article h2 { margin-top: 32px; font-size: 1.35rem; }
.article ol li, .article ul li { margin-bottom: 6px; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin: 20px 0; }
.facts div { background: var(--accent-bg); border-radius: 8px; padding: 10px 12px; }
.facts b { display: block; font-size: .75rem; text-transform: uppercase; color: var(--muted); letter-spacing: .04em; }
.callout { background: var(--warn-bg); border-inline-start: 4px solid var(--warn-border); padding: 12px 16px; border-radius: 6px; margin: 20px 0; }
.breadcrumb { font-size: .85rem; color: var(--muted); margin-bottom: 12px; }
.breadcrumb a { color: var(--muted); }
table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: .95rem; }
th, td { text-align: start; padding: 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { background: var(--accent-bg); }
.table-scroll { overflow-x: auto; }
.sidebar > * { margin-bottom: 20px; }
.sidebar .box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.sidebar .box h3 { margin: 0 0 10px; font-size: 1rem; }
.sidebar ul { padding-inline-start: 18px; margin: 0; }

/* Ads */
.ad-slot { margin: 24px 0; min-height: 100px; text-align: center; }
.ad-slot::before { content: "إعلان"; display: block; font-size: .75rem; color: var(--muted); margin-bottom: 4px; }
.sidebar .ad-slot { position: sticky; top: 80px; min-height: 250px; }

/* Forms */
.form label { display: block; font-weight: 600; margin: 14px 0 6px; }
.form input, .form select, .form textarea { width: 100%; padding: 10px 12px; font-size: 1rem; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); font-family: inherit; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 600px) { .form .row { grid-template-columns: 1fr; } }
.status-due { color: #b91c1c; font-weight: 700; }
.status-soon { color: #b45309; font-weight: 700; }
.status-ok { color: #15803d; font-weight: 700; }
@media (prefers-color-scheme: dark) {
  .status-due { color: #f87171; } .status-soon { color: #fbbf24; } .status-ok { color: #4ade80; }
}

/* Footer */
.site-footer { border-top: 3px solid var(--gold); background: var(--navy); color: #c3cdda; margin-top: 40px; padding: 28px 0; font-size: .9rem; }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.site-footer a { color: #e0e6ee; margin-inline-end: 14px; }
.ad-slot ins.adsbygoogle { width: 100%; min-width: 250px; }
.models { columns: 2 220px; column-gap: 24px; padding-inline-start: 18px; font-size: .9rem; }
.models li { break-inside: avoid; text-align: start; }
.brands { line-height: 2.2; }
figure.diagram { margin: 24px 0; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 10px; }
figure.diagram img { display: block; width: 100%; height: auto; }
figure.diagram figcaption { font-size: .88rem; color: #5d6166; text-align: center; padding-top: 6px; }

/* WhatsApp */
.wa-float { position: fixed; bottom: 18px; inset-inline-end: 18px; z-index: 20; display: flex; align-items: center; gap: 8px;
  background: #1f9e55; color: #fff; text-decoration: none; font-weight: 700; padding: 10px 16px; border-radius: 999px;
  box-shadow: 0 6px 18px rgba(0,0,0,.25); }
.wa-float:hover { background: #178046; color: #fff; }
@media (max-width: 600px) { .wa-float span { display: none; } .wa-float { padding: 12px; } }
.wa-cta { display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-top: 32px;
  padding: 18px 20px; border-radius: var(--radius); background: var(--accent-bg); border-inline-start: 5px solid #1f9e55; }
.wa-cta p { margin: 4px 0 0; color: var(--muted); font-size: .95rem; }
.wa-cta > div { flex: 1 1 280px; }
.btn.wa-btn { background: #1f9e55; color: #fff; }
.btn.wa-btn:hover { background: #178046; color: #fff; }

/* Diagnosis flow: numbered step cards (diag guides) */
.steps { list-style: none; counter-reset: step; padding: 0; margin: 18px 0 26px; display: grid; gap: 10px; }
.steps li { counter-increment: step; position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; padding-inline-start: 64px; }
.steps li::before { content: counter(step); position: absolute; inset-inline-start: 14px; top: 14px; width: 36px; height: 36px; border-radius: 50%; background: var(--navy); color: var(--gold-2); font-weight: 800; display: grid; place-items: center; }
.steps li b { display: block; color: var(--text); margin-bottom: 2px; }
.steps li span { color: var(--muted); font-size: .95rem; }
.steps li + li::after { content: ""; position: absolute; inset-inline-start: 31px; top: -11px; height: 10px; border-inline-start: 2px dashed var(--gold); }

/* Full-width responsive AdSense units size themselves to the viewport; let layout columns shrink and keep ads inside them so phones don't scroll sideways */
.layout > * { min-width: 0; }
.ad-slot { max-width: 100%; overflow: hidden; }
