/* ===== الألوان والمقاسات: غيّر هنا عشان يتغير الموقع كله ===== */
:root {
  --navy: #0b1f3a;
  --navy-2: #12305a;
  --teal: #2dd4bf;
  --brand: #0f766e;
  --brand-strong: #115e59;
  --on-brand: #ffffff;
  --bg: #ffffff;
  --bg-alt: #f2f6f9;
  --surface: #ffffff;
  --text: #0b1f3a;
  --muted: #4b5b70;
  --border: #dbe3ec;
  --danger: #b42318;
  --success: #067647;
  --radius: 14px;
  --shadow: 0 1px 2px rgb(0 0 0 / .05), 0 6px 20px rgb(0 0 0 / .06);
  --font: "Tajawal", system-ui, "Segoe UI", Tahoma, sans-serif;
  --header-h: 64px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --brand: #2dd4bf;
    --brand-strong: #5eead4;
    --on-brand: #04201d;
    --bg: #081629;
    --bg-alt: #0b1f3a;
    --surface: #10294a;
    --text: #e8f0f8;
    --muted: #a3b4c8;
    --border: #1d3a63;
    --danger: #f97066;
    --success: #47cd89;
    --shadow: 0 1px 2px rgb(0 0 0 / .4);
  }
}

:root[data-theme="dark"] {
  --brand: #2dd4bf;
  --brand-strong: #5eead4;
  --on-brand: #04201d;
  --bg: #081629;
  --bg-alt: #0b1f3a;
  --surface: #10294a;
  --text: #e8f0f8;
  --muted: #a3b4c8;
  --border: #1d3a63;
  --danger: #f97066;
  --success: #47cd89;
  --shadow: 0 1px 2px rgb(0 0 0 / .4);
}

/* ===== الأساس ===== */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--text);
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

h1, h2, h3 { line-height: 1.35; margin: 0 0 .6em; }
h1 { font-size: clamp(1.9rem, 6vw, 3rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 4.5vw, 2.1rem); font-weight: 800; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1em; }
a { color: var(--brand); }
img, svg { max-width: 100%; }

.container {
  width: 100%;
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: 16px;
}

.skip-link {
  position: absolute;
  inset-inline-start: 16px;
  top: -100px;
  background: var(--brand);
  color: var(--on-brand);
  padding: 8px 14px;
  border-radius: 8px;
  z-index: 100;
}
.skip-link:focus { top: 8px; }

:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }

/* ===== الأزرار ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  border: 2px solid transparent;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s;
}
.btn-primary { background: var(--brand); color: var(--on-brand); }
.btn-primary:hover { background: var(--brand-strong); }
.btn-ghost { border-color: var(--border); color: var(--text); background: transparent; }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}
.icon-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* أيقونة الوضع: الشمس في الداكن، والقمر في الفاتح */
.icon-sun { display: none; }
:root[data-theme="dark"] .icon-sun { display: block; }
:root[data-theme="dark"] .icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .icon-sun { display: block; }
  :root:not([data-theme="light"]) .icon-moon { display: none; }
}

/* ===== الرأس والقائمة (الجوال أولاً) ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; gap: 12px; min-height: var(--header-h); }

.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 800; font-size: 1.15rem; }
.brand-mark { width: 38px; height: 38px; }
.brand-mark rect { fill: var(--navy); }
.brand-mark path { fill: none; stroke: var(--teal); stroke-width: 3; stroke-linecap: round; }
:root[data-theme="dark"] .brand-mark rect { fill: var(--navy-2); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .brand-mark rect { fill: var(--navy-2); }
}

.header-actions { display: flex; gap: 8px; margin-inline-start: auto; }

.site-nav {
  position: absolute;
  inset-inline: 0;
  top: 100%;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  display: none;
}
.site-nav.is-open { display: block; }
.site-nav ul { list-style: none; margin: 0; padding: 8px 16px 16px; }
.site-nav a {
  display: block;
  padding: 12px 8px;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  border-radius: 8px;
}
.site-nav a:hover { background: var(--bg-alt); color: var(--brand); }

@media (min-width: 768px) {
  .menu-toggle { display: none; }
  .site-nav { position: static; display: block; background: none; border: 0; margin-inline-start: 24px; }
  .site-nav ul { display: flex; gap: 4px; padding: 0; }
  .site-nav a { padding: 8px 12px; }
}

/* ===== القسم الافتتاحي ===== */
/* كحلي في الوضعين، مثل تصاميم كانفا */
.hero {
  padding: 56px 0 64px;
  color: #ffffff;
  background:
    radial-gradient(60% 80% at 0% 100%, rgb(45 212 191 / .28), transparent 70%),
    radial-gradient(50% 60% at 100% 0%, rgb(45 212 191 / .12), transparent 70%),
    var(--navy);
}
.hero h1 { font-weight: 800; }
.lead { font-size: 1.15rem; color: #c9d6e6; max-width: 40ch; }
.hero .btn-primary { background: var(--teal); color: #04201d; }
.hero .btn-primary:hover { background: #5eead4; }
.hero .btn-ghost { border-color: rgb(255 255 255 / .35); color: #ffffff; }
.hero .btn-ghost:hover { border-color: var(--teal); color: var(--teal); }
.hero :focus-visible { outline-color: var(--teal); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.hero-actions .btn { flex: 1 1 200px; white-space: nowrap; }

@media (min-width: 768px) {
  .hero { padding: 96px 0 104px; }
  .hero-actions .btn { flex: 0 0 auto; }
}

/* ===== الأقسام ===== */
.section { padding: 56px 0; }
.section-alt { background: var(--bg-alt); }
.section-intro { color: var(--muted); margin-bottom: 28px; }
@media (min-width: 768px) { .section { padding: 88px 0; } }

/* ===== بطاقات الخدمات ===== */
.cards { display: grid; gap: 16px; }
@media (min-width: 640px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .cards { grid-template-columns: repeat(3, 1fr); gap: 24px; } }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}
.card p { color: var(--muted); margin: 0; }
.card-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 16px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--brand) 14%, transparent);
  color: var(--brand);
}
.card-icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ===== التذييل ===== */
.site-footer { border-top: 1px solid var(--border); padding: 28px 0; color: var(--muted); font-size: .95rem; }
.footer-inner { display: flex; flex-direction: column; gap: 12px; align-items: center; text-align: center; }
.footer-inner p { margin: 0; }
@media (min-width: 768px) { .footer-inner { flex-direction: row; justify-content: space-between; text-align: start; } }

/* ===== طريقة الطلب ===== */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; counter-reset: step; }
@media (min-width: 720px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .steps { grid-template-columns: repeat(4, 1fr); } }
.steps li {
  counter-increment: step;
  position: relative;
  padding: 24px 20px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.steps li::before {
  content: counter(step, arabic-indic);
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: 12px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--teal);
  font-weight: 800;
  font-size: 1.2rem;
}
.steps p { margin: 0; color: var(--muted); }

/* ===== الباقات ===== */
.packages { display: grid; gap: 16px; }
@media (min-width: 680px) { .packages { grid-template-columns: repeat(2, 1fr); gap: 20px; align-items: stretch; } }
@media (min-width: 1100px) { .packages { grid-template-columns: repeat(4, 1fr); } }
.package {
  display: flex;
  flex-direction: column;
  padding: 24px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 5px solid var(--teal);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.package h3 { font-size: 1.45rem; font-weight: 800; margin-bottom: .2em; }
.package-summary { font-weight: 700; color: var(--brand); margin-bottom: .3em; }
.package-fits { color: var(--muted); font-size: .95rem; }
.package-price { margin: 4px 0 16px; padding: 12px 14px; border-radius: 12px; background: var(--bg-alt); }
.package-price strong { font-size: 2rem; font-weight: 800; color: var(--text); line-height: 1.2; }
.package-price strong.price-text { font-size: 1.25rem; color: var(--brand); }
.package-price span { font-weight: 700; color: var(--muted); }
.package-price small { display: block; color: var(--muted); font-size: .88rem; line-height: 1.6; }

/* شريط العرض */
.offer {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 24px 0 0;
  padding: 14px 18px;
  border-radius: 14px;
  background: var(--navy);
  color: #ffffff;
  font-weight: 800;
  font-size: 1.1rem;
  box-shadow: inset 0 0 0 2px var(--teal);
}
.package-points { list-style: none; margin: 0 0 16px; padding: 0; }
.package-points li { position: relative; padding: 6px 28px 6px 0; border-bottom: 1px dashed var(--border); }
.package-points li::before {
  content: "";
  position: absolute;
  inset-inline-start: 4px;
  top: 15px;
  width: 12px;
  height: 7px;
  border-inline-start: 2.5px solid var(--brand);
  border-bottom: 2.5px solid var(--brand);
  transform: rotate(-45deg);
}
/* الخانتين جنب بعض لو فيه مكان، وإلا وحدة تحت الثانية */
.package-meta { margin: 0 0 20px; display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; }
.package-meta div { padding: 10px; border-radius: 10px; background: var(--bg-alt); text-align: center; }
.package-meta dt { font-size: .85rem; color: var(--muted); }
.package-meta dd { margin: 0; font-weight: 700; }
.package .btn { margin-top: auto; }

/* ===== نماذج الأعمال ===== */
.work-card {
  display: grid;
  gap: 24px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
@media (min-width: 860px) {
  .work-card { grid-template-columns: 300px 1fr; align-items: center; gap: 40px; padding: 32px; }
}
.work-preview {
  display: grid;
  place-items: center;
  padding: 24px 0;
  border-radius: 12px;
  background: radial-gradient(70% 70% at 50% 40%, rgb(45 212 191 / .25), transparent 70%), var(--navy);
}
.work-preview img {
  display: block;
  width: 220px;
  height: auto;
  border: 7px solid #04101f;
  border-radius: 28px;
  box-shadow: 0 12px 30px rgb(0 0 0 / .35);
}
.demo-badge {
  display: inline-block;
  margin-bottom: 8px;
  padding: 4px 14px;
  border-radius: 999px;
  background: #fef3c7;
  color: #78350f;
  font-weight: 800;
}
.demo-note {
  padding: 10px 14px;
  border: 1px dashed #d97706;
  border-radius: 10px;
  font-weight: 700;
}

/* ===== الأسئلة الشائعة ===== */
.faq { max-width: 820px; }
.faq details {
  margin-bottom: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.faq summary {
  position: relative;
  padding: 14px 18px 14px 44px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  inset-inline-end: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--brand);
  font-size: 1.4rem;
  font-weight: 800;
}
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 0; padding: 0 18px 16px; color: var(--muted); }

.btn .wa-icon { width: 22px; height: 22px; margin-inline-end: 8px; }
.footer-line { font-weight: 800; font-size: 1.2rem; color: var(--text); }

/* ===== زر الواتساب الثابت ===== */
.wa-float {
  position: fixed;
  inset-inline-end: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom));
  z-index: 40;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 56px;
  padding: 0 20px 0 18px;
  border-radius: 999px;
  background: #177a42;
  color: #ffffff;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 6px 20px rgb(0 0 0 / .25);
}
.wa-float svg { width: 26px; height: 26px; }
.wa-float:hover { filter: brightness(1.08); }
/* مساحة تحت التذييل عشان الزر ما يغطي آخر سطر */
.site-footer { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }

/* ===== من نحن ===== */
.about { max-width: 760px; }
.about p { font-size: 1.1rem; margin-bottom: .5em; }

/* الخدمات الأربع: عمودين ثم أربعة */
@media (min-width: 960px) { .cards-4 { grid-template-columns: repeat(4, 1fr); } }

/* الترحيب: الاسم كبير */
.hero h1 { font-size: clamp(2.6rem, 12vw, 4.5rem); margin-bottom: .2em; color: var(--teal); }
.hero .lead { color: #ffffff; font-size: 1.3rem; font-weight: 700; max-width: 30ch; }

.packages-note { margin: 20px 0 0; color: var(--muted); font-size: .95rem; }

.package-small { margin: -8px 0 16px; font-size: .9rem; color: var(--muted); }

.footer-email { color: var(--muted); text-decoration: none; font-weight: 700; }
.footer-email:hover { color: var(--brand); }

/* ===== مشاريع المالك ===== */
.projects { display: grid; gap: 16px; margin-bottom: 24px; }
@media (min-width: 680px) { .projects { grid-template-columns: repeat(2, 1fr); gap: 20px; } }
.project {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.project img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-bottom: 1px solid var(--border); }
.project-body { display: flex; flex-direction: column; flex: 1; padding: 18px 20px 20px; }
.project-body h3 { margin-bottom: .2em; }
.project-body p { color: var(--muted); }
.project-body .btn { margin-top: auto; align-self: flex-start; }

/* بطاقة مشروع بدون صورة */
.project-ph {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  aspect-ratio: 16 / 9; border-bottom: 1px solid var(--border);
  background: radial-gradient(70% 70% at 50% 40%, rgb(45 212 191 / .22), transparent 70%), var(--navy);
  color: #ffffff; font-weight: 800; font-size: 1.3rem;
}
.project-ph svg { width: 48px; height: 48px; padding: 12px; border-radius: 12px; background: rgb(45 212 191 / .18); fill: none; stroke: var(--teal); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
