/* Design tokens. Logical properties throughout so the Arabic (RTL) pages are a
   mirror of the English ones without a second stylesheet. */

:root {
  --ink: #0f172a;
  --ink-2: #1e293b;
  --muted: #64748b;
  --line: #e2e8f0;
  --bg: #ffffff;
  --alt: #f8fafc;
  --brand: #4f46e5;
  --brand-ink: #3730a3;
  --accent: #059669;
  --warn: #b91c1c;
  --radius: 16px;
  --shadow: 0 1px 2px rgb(15 23 42 / 0.04), 0 8px 30px rgb(15 23 42 / 0.06);
  --max: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body.lang-ar {
  font-family: "Segoe UI", "Noto Naskh Arabic", "Geeza Pro", Tahoma, ui-sans-serif, system-ui, sans-serif;
}

img { max-width: 100%; display: block; }

a { color: var(--brand-ink); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { line-height: 1.18; letter-spacing: -0.02em; margin: 0 0 12px; }
h1 { font-size: clamp(2rem, 1.2rem + 3vw, 3.1rem); font-weight: 800; }
h2 { font-size: clamp(1.4rem, 1rem + 1.4vw, 2rem); font-weight: 800; margin-bottom: 18px; }
h3 { font-size: 1.05rem; font-weight: 700; }
p { margin: 0 0 12px; }
ul { margin: 0; padding: 0; }

.wrap { max-width: var(--max); margin: 0 auto; padding-inline: 24px; }
.wrap.narrow { max-width: 760px; }
.center { text-align: center; }
.muted { color: var(--muted); font-size: 0.92rem; }

.skip { position: absolute; inset-inline-start: -9999px; }
.skip:focus { inset-inline-start: 12px; top: 12px; background: #fff; padding: 8px; z-index: 99; }

/* ── header ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgb(255 255 255 / 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 800; color: var(--ink); font-size: 1.02rem; letter-spacing: -0.01em; }
.brand:hover { text-decoration: none; }
.brand-mark {
  display: grid; place-items: center;
  width: 30px; height: 30px; border-radius: 9px;
  background: linear-gradient(135deg, var(--brand), #7c3aed);
  color: #fff; font-weight: 800; font-size: 0.95rem;
}
.brand.small { font-size: 0.95rem; }
.nav { display: flex; align-items: center; gap: 22px; font-size: 0.9rem; font-weight: 600; }
.nav a { color: var(--ink-2); }
.nav .nav-wa { color: var(--accent); }
@media (max-width: 620px) {
  .nav a:not(.nav-wa) { display: none; }
}

/* ── hero ── */
.hero { padding: 64px 0 48px; background: radial-gradient(1200px 420px at 80% -10%, #eef2ff 0%, transparent 60%); }
.hero.simple { padding: 72px 0 40px; }
.hero-inner { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 48px; align-items: start; }
.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brand-ink);
  background: #eef2ff;
  border: 1px solid #e0e7ff;
  padding: 5px 11px;
  border-radius: 999px;
  margin: 0 0 18px;
}
.lede { font-size: 1.12rem; color: #334155; max-width: 56ch; }
.hero-trust { list-style: none; display: grid; gap: 8px; margin: 22px 0 0; }
.hero-trust li { position: relative; padding-inline-start: 24px; color: #334155; font-size: 0.95rem; }
.hero-trust li::before {
  content: "✓";
  position: absolute; inset-inline-start: 0; top: 0;
  color: var(--accent); font-weight: 800;
}
.hero-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 26px;
  box-shadow: var(--shadow);
}
.hero-card h2 { font-size: 1.25rem; margin-bottom: 6px; }
.hero-card .muted { margin-bottom: 18px; }

/* ── buttons ── */
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.cta-row.center { justify-content: center; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 11px;
  border: 1px solid transparent;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 0.06s ease, box-shadow 0.15s ease, background 0.15s ease;
  text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--brand); color: #fff; box-shadow: 0 6px 18px rgb(79 70 229 / 0.25); }
.btn.primary:hover { background: var(--brand-ink); }
.btn.ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { border-color: #c7d2fe; background: #f8fafc; }
.btn.block { width: 100%; margin-top: 14px; }
.btn.small { padding: 8px 14px; font-size: 0.85rem; }

/* ── sections ── */
.section { padding: 56px 0; }
.section.alt { background: var(--alt); border-block: 1px solid var(--line); }
.section.links { padding-top: 32px; }

.cards { display: grid; gap: 16px; }
.cards.three { grid-template-columns: repeat(3, 1fr); }
.cards.two { grid-template-columns: repeat(2, 1fr); }
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}
.card h3 { margin-bottom: 4px; }
.card.pain { position: relative; padding-inline-start: 52px; }
.pin {
  position: absolute; inset-inline-start: 18px; top: 18px;
  display: grid; place-items: center;
  width: 22px; height: 22px; border-radius: 50%;
  background: #fef2f2; color: var(--warn); font-weight: 800; font-size: 0.8rem;
}
.num { display: block; font-size: 0.75rem; font-weight: 800; color: var(--brand); letter-spacing: 0.1em; margin-bottom: 8px; }
.emoji { font-size: 1.5rem; display: block; margin-bottom: 10px; }
.link-card { display: block; color: inherit; transition: border-color 0.15s ease, box-shadow 0.15s ease; }
.link-card:hover { text-decoration: none; border-color: #c7d2fe; box-shadow: var(--shadow); }

/* ── pricing ── */
.price-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin-bottom: 24px; }
.price-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px;
}
.price-card.featured { border-color: #a5b4fc; box-shadow: 0 10px 40px rgb(79 70 229 / 0.12); }
.price-card .price { font-size: 1.9rem; font-weight: 800; letter-spacing: -0.02em; margin: 6px 0 2px; }
.price-card ul { list-style: none; margin-top: 16px; display: grid; gap: 8px; }
.price-card li { padding-inline-start: 22px; position: relative; font-size: 0.93rem; color: #334155; }
.price-card li::before { content: "✓"; position: absolute; inset-inline-start: 0; color: var(--accent); font-weight: 800; }

.compliance {
  background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: var(--radius); padding: 22px;
}
.compliance h3 { color: #065f46; }

/* ── faq ── */
.faq details {
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 16px 18px; margin-bottom: 10px;
}
.faq summary { font-weight: 700; cursor: pointer; }
.faq summary::marker { color: var(--brand); }
.faq p { margin: 12px 0 0; color: #334155; }

/* ── forms ── */
.lead-form { display: grid; gap: 12px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid-2 > *, .menu-row > * { min-width: 0; }
label { display: grid; gap: 6px; font-size: 0.85rem; font-weight: 600; color: #334155; }
input, textarea, select {
  width: 100%;
  min-width: 0; /* grid children default to min-width:auto, which lets an input's
                   intrinsic size push the whole page wider than the phone */
  padding: 11px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  font: inherit;
  font-size: 0.95rem;
  background: #fff;
  color: var(--ink);
}
input:focus, textarea:focus, select:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgb(79 70 229 / 0.15);
}
textarea { resize: vertical; }
label.check { grid-template-columns: auto 1fr; align-items: start; gap: 10px; font-weight: 400; font-size: 0.82rem; color: var(--muted); }
label.check input { width: 16px; height: 16px; margin-top: 3px; }
.hp { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.form-status { font-size: 0.85rem; margin: 4px 0 0; min-height: 1.2em; }
.form-status.ok { color: var(--accent); font-weight: 600; }
.form-status.err { color: var(--warn); font-weight: 600; }

.panel {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; margin: 24px 0; box-shadow: var(--shadow);
}
.menu-items { display: grid; gap: 10px; margin: 14px 0; }
.menu-row { display: grid; grid-template-columns: 1fr 120px 32px; gap: 8px; align-items: center; }
.menu-row button { background: #fff; border: 1px solid var(--line); border-radius: 8px; height: 38px; cursor: pointer; color: var(--muted); }
.result { background: #f8fafc; }
.result img { width: 220px; height: 220px; margin: 14px auto; border: 1px solid var(--line); border-radius: 12px; background: #fff; }

/* ── public menu ── */
.menu-hero { padding: 56px 0 24px; background: radial-gradient(900px 320px at 50% -20%, #eef2ff, transparent 70%); }
.menu-list { list-style: none; display: grid; gap: 2px; margin: 0 0 12px; }
.menu-list li {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 16px 18px; background: #fff; border: 1px solid var(--line); border-radius: 12px;
}
.menu-list li + li { margin-top: 8px; }
.menu-list strong { display: block; }
.menu-list .muted { display: block; margin-top: 2px; }
.menu-list .price { font-weight: 700; white-space: nowrap; color: var(--brand-ink); }
.menu-cta { background: #eef2ff; border-color: #e0e7ff; }

/* ── links / pills ── */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.pill-list { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.pill-list a {
  display: inline-block; padding: 7px 13px; border-radius: 999px;
  border: 1px solid var(--line); background: #fff; font-size: 0.86rem; font-weight: 600; color: var(--ink-2);
}
.pill-list a:hover { border-color: #c7d2fe; background: #f8fafc; text-decoration: none; }

/* ── footer ── */
.site-footer { border-top: 1px solid var(--line); background: var(--alt); padding: 32px 0; margin-top: 40px; }
.footer-inner { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer-links { display: flex; flex-wrap: wrap; gap: 18px; font-size: 0.87rem; }

/* ── admin ── */
.admin .wrap { padding-block: 24px; }
.stat-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin: 18px 0 24px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.stat strong { display: block; font-size: 1.5rem; letter-spacing: -0.02em; }
.stat span { color: var(--muted); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; }
.filters { display: flex; gap: 10px; margin-bottom: 14px; }
.filters input, .filters select { max-width: 280px; }
.table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; font-size: 0.86rem; }
.table th, .table td { text-align: start; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { background: var(--alt); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.tag { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; }
.tag.hot { background: #fee2e2; color: #991b1b; }
.tag.warm { background: #fef3c7; color: #92400e; }
.tag.cold { background: #e2e8f0; color: #334155; }

/* ── responsive ── */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; gap: 28px; }
  .cards.three, .price-grid, .two-col { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 620px) {
  .cards.two { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .section { padding: 40px 0; }
  .hero { padding: 40px 0 32px; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .menu-row { grid-template-columns: 1fr 86px 32px; }
}

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