/* =====================================================
   أسامة كود — ملف التنسيقات الرئيسي
   الهوية: زمردي داكن + أخضر نعناعي + خلفية فاتحة
   ===================================================== */

/* ---------- المتغيرات ---------- */
:root {
  /* الأخضر الزمردي الداكن (Primary) */
  --emerald-950: #03251b;
  --emerald-900: #05382a;
  --emerald-800: #0a4a38;
  --emerald-700: #0e5c45;
  --emerald-600: #10805d;

  /* الأخضر النعناعي / السايبر (Secondary) */
  --mint: #2ee6a8;
  --mint-strong: #14cf8f;
  --mint-soft: #a7f3d0;
  --mint-glow: rgba(46, 230, 168, 0.35);

  /* الخلفيات */
  --bg: #f6f9f7;
  --surface: #ffffff;
  --tint: #eef4f0;
  --line: #e2eae5;

  /* النصوص */
  --ink: #212d28;        /* رمادي فحمي داكن */
  --muted: #5c6b64;
  --on-dark: #eaf6f0;
  --on-dark-muted: #9db8ac;

  --radius: 16px;
  --radius-lg: 24px;
  --shadow-sm: 0 2px 10px rgba(5, 56, 42, 0.06);
  --shadow-md: 0 10px 30px rgba(5, 56, 42, 0.1);
  --shadow-glow: 0 0 0 1px rgba(46, 230, 168, 0.4), 0 8px 30px var(--mint-glow);

  --font-main: "Tajawal", "Segoe UI", Tahoma, sans-serif;
  --font-code: "Fira Code", Consolas, monospace;

  --header-h: 76px;
}

/* ---------- إعادة الضبط ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
  overflow-x: hidden; /* حماية إضافية من أي تمدد أفقي يسبب شاشة فارغة في RTL */
}

/* إخفاء بصري آمن — بلا أي تمدد للصفحة (بديل left:-9999px الخطِر في RTL) */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

body {
  font-family: var(--font-main);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.8;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; display: block; }
ul, ol { list-style: none; }
a { color: var(--emerald-600); text-decoration: none; transition: color .25s; }
a:hover { color: var(--mint-strong); }

h1, h2, h3 { line-height: 1.35; font-weight: 800; color: var(--emerald-950); }

.container { width: min(1180px, 92%); margin-inline: auto; }
.container-narrow { width: min(820px, 92%); }

/* ---------- أدوات مساعدة ---------- */
.text-gradient {
  background: linear-gradient(120deg, var(--mint) 0%, var(--mint-soft) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.text-gradient-dark {
  background: linear-gradient(120deg, var(--emerald-600), var(--mint-strong));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.skip-link {
  position: absolute;
  inset-inline-start: 12px;
  top: -60px;
  z-index: 200;
  background: var(--emerald-800);
  color: #fff;
  padding: 10px 18px;
  border-radius: 8px;
  transition: top .3s;
}
.skip-link:focus { top: 12px; color: #fff; }

.scroll-progress {
  position: fixed;
  top: 0;
  inset-inline-start: 0;
  height: 3px;
  width: 0;
  background: linear-gradient(90deg, var(--emerald-600), var(--mint));
  z-index: 150;
  transition: width .1s linear;
}

/* ---------- الأزرار ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-weight: 700;
  font-size: 1rem;
  border: 2px solid transparent;
  border-radius: 999px;
  padding: 12px 28px;
  cursor: pointer;
  transition: transform .25s, box-shadow .25s, background .25s, color .25s, border-color .25s;
  white-space: nowrap;
}
.btn:active { transform: scale(.97); }

.btn-primary {
  background: var(--emerald-800);
  color: #fff;
}
.btn-primary:hover {
  background: var(--emerald-700);
  color: #fff;
  box-shadow: 0 8px 24px rgba(10, 74, 56, .35);
  transform: translateY(-2px);
}

.btn-accent {
  background: linear-gradient(120deg, var(--mint), var(--mint-strong));
  color: var(--emerald-950);
}
.btn-accent:hover {
  box-shadow: var(--shadow-glow);
  transform: translateY(-2px);
  color: var(--emerald-950);
}

.btn-ghost {
  background: transparent;
  color: var(--on-dark);
  border-color: rgba(255, 255, 255, .25);
}
.btn-ghost:hover {
  border-color: var(--mint);
  color: var(--mint);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--emerald-800);
  border-color: var(--emerald-800);
}
.btn-outline:hover {
  background: var(--emerald-800);
  color: #fff;
  transform: translateY(-2px);
}

.btn-sm { padding: 9px 20px; font-size: .95rem; }
.btn-lg { padding: 15px 34px; font-size: 1.08rem; }
.btn-block { width: 100%; }

/* ---------- الهيدر ---------- */
.site-header {
  position: fixed;
  top: 0;
  inset-inline: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  transition: background .3s, box-shadow .3s, backdrop-filter .3s;
}
.site-header.scrolled {
  background: rgba(255, 255, 255, .85);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow-sm);
}
/* فوق الهيرو الداكن قبل التمرير */
.site-header:not(.scrolled) .nav-link { color: var(--on-dark); }
.site-header:not(.scrolled) .brand-name { color: #fff; }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.35rem;
  font-weight: 800;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--emerald-800);
  color: var(--mint);
  font-family: var(--font-code);
  font-size: .95rem;
  font-weight: 500;
  box-shadow: inset 0 0 0 1px rgba(46, 230, 168, .35);
}
.brand-name { color: var(--emerald-950); }
.brand-name b { color: var(--mint-strong); }

.main-nav ul { display: flex; gap: 6px; }
.nav-link {
  display: block;
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--ink);
  font-weight: 500;
  transition: color .25s, background .25s;
}
.nav-link:hover { color: var(--mint-strong); }
.nav-link.active {
  color: var(--mint);
  background: rgba(46, 230, 168, .12);
}
.site-header.scrolled .nav-link.active { color: var(--emerald-700); }

.header-actions { display: flex; align-items: center; gap: 12px; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  width: 24px;
  height: 2.5px;
  border-radius: 2px;
  background: var(--mint-strong);
  transition: transform .3s, opacity .3s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ---------- الهيرو ---------- */
.hero {
  position: relative;
  background:
    radial-gradient(1100px 500px at 85% -10%, rgba(46, 230, 168, .12), transparent 60%),
    linear-gradient(160deg, var(--emerald-950) 0%, var(--emerald-900) 55%, var(--emerald-800) 100%);
  color: var(--on-dark);
  padding: calc(var(--header-h) + 70px) 0 110px;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='44'%3E%3Cpath d='M44 0H0v44' fill='none' stroke='rgba(46,230,168,0.06)'/%3E%3C/svg%3E");
  pointer-events: none;
}

.hero-bg .glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: .5;
  pointer-events: none;
}
.glow-1 { width: 420px; height: 420px; background: rgba(46, 230, 168, .25); top: -120px; inset-inline-start: -100px; }
.glow-2 { width: 380px; height: 380px; background: rgba(16, 128, 93, .45); bottom: -140px; inset-inline-end: -80px; }

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 56px;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: .92rem;
  font-weight: 500;
  color: var(--mint-soft);
  background: rgba(46, 230, 168, .1);
  border: 1px solid rgba(46, 230, 168, .3);
  border-radius: 999px;
  padding: 7px 16px;
  margin-bottom: 24px;
}
.pulse-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--mint);
  animation: pulse 1.8s infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 var(--mint-glow); }
  50% { box-shadow: 0 0 0 8px transparent; }
}

.hero h1 {
  font-size: clamp(2.3rem, 5vw, 3.6rem);
  font-weight: 900;
  color: #fff;
  margin-bottom: 22px;
}

.hero-sub {
  font-size: 1.15rem;
  color: var(--on-dark-muted);
  max-width: 34rem;
  margin-bottom: 34px;
}
.hero-sub strong { color: var(--mint); font-weight: 700; }

.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 38px; }

.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  font-size: .95rem;
  color: var(--on-dark-muted);
}

/* نافذة الكود */
.hero-visual { position: relative; }

.code-window {
  background: #04211a;
  border: 1px solid rgba(46, 230, 168, .2);
  border-radius: var(--radius);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .45), 0 0 60px rgba(46, 230, 168, .08);
  overflow: hidden;
  transform: rotate(-1.5deg);
  transition: transform .4s;
}
.code-window:hover { transform: rotate(0deg) scale(1.01); }

.code-titlebar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, .04);
  border-bottom: 1px solid rgba(46, 230, 168, .12);
}
.dot { width: 11px; height: 11px; border-radius: 50%; }
.dot.red { background: #ff5f57; }
.dot.yellow { background: #febc2e; }
.dot.green { background: #28c840; }
.code-filename {
  margin-inline-start: auto;
  font-family: var(--font-code);
  font-size: .78rem;
  color: var(--on-dark-muted);
}

.code-body {
  padding: 22px 20px;
  font-family: var(--font-code);
  font-size: .86rem;
  line-height: 1.9;
  color: #d7efe4;
  min-height: 290px;
  white-space: pre-wrap;
  word-break: break-word;
}
.code-body .tok-kw { color: #66d9ef; }
.code-body .tok-fn { color: #2ee6a8; }
.code-body .tok-str { color: #ffd580; }
.code-body .tok-cm { color: #6f8f83; }
.code-body .tok-pn { color: #9db8ac; }

.caret {
  display: inline-block;
  width: 8px;
  height: 1.1em;
  background: var(--mint);
  vertical-align: text-bottom;
  animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* البطاقات العائمة */
.float-card {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(6, 46, 35, .9);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(46, 230, 168, .3);
  border-radius: 14px;
  padding: 12px 18px;
  box-shadow: var(--shadow-md);
  animation: floaty 5s ease-in-out infinite;
}
.float-card strong { display: block; color: #fff; font-size: .95rem; }
.float-card small { color: var(--on-dark-muted); font-size: .78rem; }
.float-icon { font-size: 1.4rem; }
.float-card-1 { top: -24px; inset-inline-end: -10px; }
.float-card-2 { bottom: -22px; inset-inline-start: -14px; animation-delay: 2.5s; }

@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* ---------- شريط التقنيات ---------- */
.tech-strip {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
  overflow: hidden;
}
.marquee { overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.marquee-track {
  display: flex;
  gap: 34px;
  width: max-content;
  animation: marquee 28s linear infinite;
  font-family: var(--font-code);
  font-size: .95rem;
  font-weight: 500;
  color: var(--muted);
}
.marquee-track span:nth-child(even) { color: var(--mint-strong); }
.marquee:hover .marquee-track { animation-play-state: paused; }

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------- الأقسام العامة ---------- */
.section { padding: 96px 0; }
.section-tint { background: var(--tint); }

.section-head {
  text-align: center;
  max-width: 44rem;
  margin: 0 auto 56px;
}
.section-label {
  display: inline-block;
  font-size: .88rem;
  font-weight: 700;
  color: var(--emerald-600);
  background: rgba(46, 230, 168, .14);
  border: 1px solid rgba(46, 230, 168, .35);
  border-radius: 999px;
  padding: 5px 16px;
  margin-bottom: 16px;
}
.section-head h2 {
  font-size: clamp(1.7rem, 3.5vw, 2.4rem);
  margin-bottom: 14px;
}
.section-head p { color: var(--muted); font-size: 1.06rem; }

/* ---------- الخدمات ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.service-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 34px 28px;
  transition: transform .3s, box-shadow .3s, border-color .3s;
}
.service-card:hover {
  transform: translateY(-8px);
  border-color: var(--mint);
  box-shadow: 0 18px 40px rgba(5, 56, 42, .12), 0 0 0 1px var(--mint);
}

.service-icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--emerald-800), var(--emerald-600));
  color: var(--mint);
  margin-bottom: 20px;
  transition: transform .3s;
}
.service-icon svg { width: 27px; height: 27px; }
.service-card:hover .service-icon { transform: scale(1.08) rotate(-4deg); }

.service-card h3 { font-size: 1.18rem; margin-bottom: 10px; }
.service-card p { color: var(--muted); font-size: .98rem; }

/* ---------- الإحصائيات ---------- */
.stats-band {
  background:
    radial-gradient(700px 300px at 50% 120%, rgba(46, 230, 168, .15), transparent),
    linear-gradient(120deg, var(--emerald-950), var(--emerald-800));
  padding: 64px 0;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
  text-align: center;
}
.stat p { color: var(--on-dark-muted); margin-top: 4px; }
.stat-number, .stat-plus {
  font-size: clamp(2.2rem, 4vw, 3rem);
  font-weight: 900;
  color: #fff;
}
.stat-plus { color: var(--mint); }

/* ---------- الأعمال ---------- */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}

.portfolio-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform .3s, box-shadow .3s;
}
.portfolio-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-md);
}

.portfolio-cover {
  position: relative;
  height: 190px;
  padding: 18px 18px 0;
  overflow: hidden;
}
/* غلاف بصورة حقيقية للمشروع */
.portfolio-cover.cover-image { padding: 0; background: var(--emerald-950); }
.portfolio-cover.cover-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform .5s ease;
}
.portfolio-card:hover .cover-image img { transform: scale(1.05); }

/* غلاف قابل للنقر يفتح موقع المشروع */
a.portfolio-cover.cover-image { display: block; cursor: pointer; }
.cover-visit {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 800;
  color: #fff;
  background: rgba(3, 37, 27, .55);
  opacity: 0;
  transition: opacity .3s;
}
a.cover-image:hover .cover-visit,
a.cover-image:focus-visible .cover-visit { opacity: 1; }
a.cover-image:focus-visible { outline: 3px solid var(--mint); outline-offset: 3px; }

.portfolio-info h3 a { color: inherit; }
.portfolio-info h3 a:hover { color: var(--emerald-600); }

.cover-1 { background: linear-gradient(135deg, #0a4a38, #14cf8f); }
.cover-2 { background: linear-gradient(135deg, #05382a, #10805d); }
.cover-3 { background: linear-gradient(135deg, #0e5c45, #2ee6a8); }
.cover-4 { background: linear-gradient(135deg, #03251b, #0e5c45); }
.cover-5 { background: linear-gradient(135deg, #10805d, #a7f3d0); }
.cover-6 { background: linear-gradient(135deg, #0a4a38, #66d9c4); }

.mock-browser {
  display: flex;
  gap: 5px;
  background: rgba(255, 255, 255, .92);
  border-radius: 10px 10px 0 0;
  padding: 9px 12px;
}
.mock-browser span { width: 8px; height: 8px; border-radius: 50%; background: rgba(10, 74, 56, .35); }

.mock-content {
  background: #fff;
  height: 100%;
  padding: 16px;
  transition: transform .4s;
}
.portfolio-card:hover .mock-content { transform: translateY(-8px); }

.mock-bar { height: 10px; border-radius: 6px; background: var(--tint); margin-bottom: 10px; }
.mock-bar.w-30 { width: 30%; } .mock-bar.w-40 { width: 40%; } .mock-bar.w-50 { width: 50%; }
.mock-bar.w-60 { width: 60%; } .mock-bar.w-70 { width: 70%; } .mock-bar.w-80 { width: 80%; }
.mock-bar:first-child { background: var(--mint-soft); }

.mock-blocks { display: flex; gap: 8px; margin-top: 14px; }
.mock-blocks i { flex: 1; height: 44px; border-radius: 8px; background: var(--tint); }
.mock-blocks i:first-child { background: var(--mint-soft); }

.portfolio-info { padding: 22px 24px 26px; }
.portfolio-tag {
  display: inline-block;
  font-size: .78rem;
  font-weight: 700;
  color: var(--emerald-600);
  background: rgba(46, 230, 168, .13);
  border-radius: 999px;
  padding: 3px 12px;
  margin-bottom: 10px;
}
.portfolio-info h3 { font-size: 1.12rem; margin-bottom: 8px; }
.portfolio-info p { color: var(--muted); font-size: .95rem; }

/* ---------- كيف نعمل ---------- */
.process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  counter-reset: steps;
}

.process-step {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 30px 24px;
  transition: transform .3s, border-color .3s, box-shadow .3s;
}
.process-step:hover {
  transform: translateY(-6px);
  border-color: var(--mint);
  box-shadow: var(--shadow-md);
}

.step-num {
  display: inline-block;
  font-family: var(--font-code);
  font-size: 2rem;
  font-weight: 700;
  background: linear-gradient(120deg, var(--emerald-600), var(--mint));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 14px;
}
.process-step h3 { font-size: 1.08rem; margin-bottom: 8px; }
.process-step p { color: var(--muted); font-size: .93rem; }

/* ---------- آراء العملاء ---------- */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.testimonial-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 30px 26px;
  transition: transform .3s, box-shadow .3s;
}
.testimonial-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }

.stars { color: #f5b942; letter-spacing: 3px; margin-bottom: 14px; }

.testimonial-card blockquote {
  color: var(--ink);
  font-size: .98rem;
  margin-bottom: 20px;
}

.testimonial-card figcaption {
  display: flex;
  align-items: center;
  gap: 12px;
}
.testimonial-card strong { display: block; font-size: .98rem; color: var(--emerald-950); }
.testimonial-card small { color: var(--muted); }

.avatar {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-weight: 800;
  font-size: 1.1rem;
  color: #fff;
  flex-shrink: 0;
}
.av-1 { background: linear-gradient(135deg, var(--emerald-700), var(--mint-strong)); }
.av-2 { background: linear-gradient(135deg, #0e5c45, #66d9c4); }
.av-3 { background: linear-gradient(135deg, var(--emerald-900), var(--emerald-600)); }

/* ---------- الباقات ---------- */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
  align-items: stretch;
}

.price-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 36px 30px;
  transition: transform .3s, box-shadow .3s, border-color .3s;
}
.price-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-md); border-color: var(--mint); }

.price-card.featured {
  background: linear-gradient(160deg, var(--emerald-950), var(--emerald-800));
  border-color: var(--emerald-700);
  color: var(--on-dark);
  box-shadow: 0 24px 60px rgba(5, 56, 42, .35);
  transform: scale(1.04);
}
.price-card.featured:hover { transform: scale(1.04) translateY(-8px); }
.price-card.featured h3, .price-card.featured .amount { color: #fff; }
.price-card.featured .price-desc { color: var(--on-dark-muted); }
.price-card.featured .price-features li { color: var(--on-dark); border-color: rgba(255, 255, 255, .1); }
.price-card.featured .price-features li::before { color: var(--mint); }

.featured-badge {
  position: absolute;
  top: -14px;
  inset-inline-start: 50%;
  transform: translateX(50%);
  background: linear-gradient(120deg, var(--mint), var(--mint-strong));
  color: var(--emerald-950);
  font-size: .82rem;
  font-weight: 800;
  border-radius: 999px;
  padding: 5px 18px;
  white-space: nowrap;
}
[dir="rtl"] .featured-badge { transform: translateX(50%); }

.price-card h3 { font-size: 1.25rem; margin-bottom: 6px; }
.price-desc { color: var(--muted); font-size: .92rem; margin-bottom: 20px; }

.price { display: flex; align-items: baseline; gap: 6px; margin-bottom: 24px; }
.amount { font-size: 2.8rem; font-weight: 900; color: var(--emerald-950); line-height: 1; }
.currency { font-size: 1.3rem; font-weight: 700; color: var(--mint-strong); }
.period { font-size: .85rem; color: var(--muted); margin-inline-start: 4px; }
.price-card.featured .period { color: var(--on-dark-muted); }

.price-features { flex: 1; margin-bottom: 28px; }
.price-features li {
  padding: 10px 0;
  border-bottom: 1px dashed var(--line);
  font-size: .95rem;
  padding-inline-start: 28px;
  position: relative;
}
.price-features li::before {
  content: "✓";
  position: absolute;
  inset-inline-start: 0;
  color: var(--emerald-600);
  font-weight: 800;
}
.price-features li:last-child { border-bottom: 0; }

/* ---------- الأسئلة الشائعة ---------- */
.faq-list { display: grid; gap: 14px; }

.faq-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color .3s, box-shadow .3s;
}
.faq-item[open] { border-color: var(--mint); box-shadow: var(--shadow-sm); }

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  font-weight: 700;
  font-size: 1.02rem;
  cursor: pointer;
  color: var(--emerald-950);
  list-style: none;
  transition: color .25s;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { color: var(--emerald-600); }

.faq-icon {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(46, 230, 168, .14);
  color: var(--emerald-600);
  font-size: 1.2rem;
  font-weight: 500;
  transition: transform .3s, background .3s;
}
.faq-item[open] .faq-icon { transform: rotate(45deg); background: var(--mint); color: var(--emerald-950); }

.faq-item p {
  padding: 0 22px 20px;
  color: var(--muted);
  font-size: .97rem;
}

/* ---------- شريط الدعوة ---------- */
.cta-band {
  background:
    radial-gradient(800px 400px at 50% -40%, rgba(46, 230, 168, .2), transparent),
    linear-gradient(140deg, var(--emerald-950), var(--emerald-800));
  padding: 90px 0;
  text-align: center;
}
.cta-inner h2 {
  color: #fff;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin-bottom: 14px;
}
.cta-inner p {
  color: var(--on-dark-muted);
  font-size: 1.1rem;
  max-width: 36rem;
  margin: 0 auto 32px;
}

/* ---------- التواصل ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 32px;
  align-items: start;
}

.contact-form {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  box-shadow: var(--shadow-sm);
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-group { margin-bottom: 18px; }
.form-group label {
  display: block;
  font-weight: 700;
  font-size: .95rem;
  margin-bottom: 8px;
  color: var(--emerald-950);
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  font-family: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--bg);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 12px 16px;
  transition: border-color .25s, box-shadow .25s;
  resize: vertical;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--mint-strong);
  box-shadow: 0 0 0 4px rgba(46, 230, 168, .15);
}

.form-note { margin-top: 14px; font-weight: 700; color: var(--emerald-600); text-align: center; min-height: 1.5em; }
.form-note[data-state="ok"] { color: var(--emerald-600); }
.form-note[data-state="warn"] { color: #b7791f; }

.contact-card {
  background: linear-gradient(160deg, var(--emerald-950), var(--emerald-800));
  color: var(--on-dark);
  border-radius: var(--radius-lg);
  padding: 34px 30px;
}
.contact-card h3 { color: #fff; font-size: 1.25rem; margin-bottom: 24px; }

.contact-list { display: grid; gap: 20px; margin-bottom: 28px; }
.contact-list li { display: flex; gap: 14px; align-items: center; }
.contact-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border-radius: 14px;
  background: rgba(46, 230, 168, .12);
  border: 1px solid rgba(46, 230, 168, .3);
  font-size: 1.25rem;
}
.contact-list small { display: block; color: var(--on-dark-muted); font-size: .8rem; }
.contact-list a, .contact-list span { color: #fff; font-weight: 500; }
.contact-list a:hover { color: var(--mint); }

.socials { display: flex; gap: 12px; }
.socials a {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .12);
  color: var(--on-dark);
  transition: background .25s, color .25s, transform .25s, border-color .25s;
}
.socials a svg { width: 19px; height: 19px; }
.socials a:hover {
  background: var(--mint);
  border-color: var(--mint);
  color: var(--emerald-950);
  transform: translateY(-3px);
}

/* ---------- الفوتر ---------- */
.site-footer {
  background: var(--emerald-950);
  color: var(--on-dark-muted);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 40px;
  padding: 70px 0 50px;
}

.footer-brand p { margin-top: 18px; font-size: .95rem; max-width: 20rem; }
.brand-light .brand-name { color: #fff; }
.brand-light .brand-mark { background: rgba(46, 230, 168, .12); }

.footer-col h3 {
  color: #fff;
  font-size: 1.02rem;
  margin-bottom: 18px;
}
.footer-col ul { display: grid; gap: 10px; }
.footer-col a { color: var(--on-dark-muted); font-size: .95rem; }
.footer-col a:hover { color: var(--mint); }

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .08);
  padding: 22px 0;
  text-align: center;
  font-size: .9rem;
}
.heart { display: inline-block; animation: heartbeat 1.6s infinite; }
@keyframes heartbeat { 0%, 100% { transform: scale(1); } 15% { transform: scale(1.25); } 30% { transform: scale(1); } }

/* ---------- زر العودة للأعلى ---------- */
.back-to-top {
  position: fixed;
  bottom: 26px;
  inset-inline-start: 26px;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 14px;
  background: var(--emerald-800);
  color: var(--mint);
  font-size: 1.3rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity .3s, transform .3s, visibility .3s, background .3s;
  box-shadow: var(--shadow-md);
  z-index: 90;
}
.back-to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: var(--emerald-700); }

/* ---------- حركات الظهور ---------- */
/* المحتوى ظاهر افتراضياً — ولا يُخفى إلا عند تأكد توفّر JavaScript.
   هكذا لا تظهر صفحة بيضاء أبداً إن تعطّل السكربت أو تأخّر تحميله. */
.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .7s ease, transform .7s ease;
}
.js .reveal.visible { opacity: 1; transform: translateY(0); }

/* تتابع بسيط داخل الشبكات */
.services-grid .reveal:nth-child(2), .portfolio-grid .reveal:nth-child(2),
.process-grid .reveal:nth-child(2), .testimonials-grid .reveal:nth-child(2),
.pricing-grid .reveal:nth-child(2), .stats-grid .reveal:nth-child(2) { transition-delay: .12s; }
.services-grid .reveal:nth-child(3), .portfolio-grid .reveal:nth-child(3),
.process-grid .reveal:nth-child(3), .testimonials-grid .reveal:nth-child(3),
.pricing-grid .reveal:nth-child(3), .stats-grid .reveal:nth-child(3) { transition-delay: .24s; }
.services-grid .reveal:nth-child(4), .portfolio-grid .reveal:nth-child(4),
.process-grid .reveal:nth-child(4), .stats-grid .reveal:nth-child(4) { transition-delay: .36s; }
.services-grid .reveal:nth-child(5), .portfolio-grid .reveal:nth-child(5) { transition-delay: .12s; }
.services-grid .reveal:nth-child(6), .portfolio-grid .reveal:nth-child(6) { transition-delay: .24s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .js .reveal, .reveal { opacity: 1; transform: none; }
}

/* =====================================================
   التجاوب مع الشاشات
   ===================================================== */
@media (max-width: 1024px) {
  .hero-inner { grid-template-columns: 1fr; gap: 70px; }
  .hero-content { text-align: center; }
  .hero-sub, .cta-inner p { margin-inline: auto; }
  .hero-cta, .hero-points { justify-content: center; }
  .hero-visual { max-width: 560px; margin-inline: auto; }

  .services-grid, .portfolio-grid, .testimonials-grid { grid-template-columns: repeat(2, 1fr); }
  .process-grid { grid-template-columns: repeat(2, 1fr); }
  .pricing-grid { grid-template-columns: 1fr; max-width: 480px; margin-inline: auto; }
  .price-card.featured { transform: none; }
  .price-card.featured:hover { transform: translateY(-8px); }

  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  :root { --header-h: 66px; }

  .main-nav {
    position: fixed;
    top: var(--header-h);
    inset-inline: 0;
    background: rgba(3, 37, 27, .97);
    backdrop-filter: blur(12px);
    padding: 18px 6%;
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s, transform .3s, visibility .3s;
    border-bottom: 1px solid rgba(46, 230, 168, .2);
  }
  .main-nav.open { opacity: 1; visibility: visible; transform: translateY(0); }
  .main-nav ul { flex-direction: column; gap: 4px; }
  .main-nav .nav-link { color: var(--on-dark) !important; padding: 12px 14px; }
  .main-nav .nav-link.active { color: var(--mint) !important; }

  .nav-toggle { display: flex; }
  .header-actions .btn { display: none; }

  .site-header.scrolled .nav-toggle span { background: var(--emerald-800); }

  .hero { padding-bottom: 90px; }
  .float-card { display: none; }
  .code-window { transform: none; }

  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .services-grid, .portfolio-grid, .testimonials-grid, .process-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; padding: 50px 0 40px; }
  .section { padding: 70px 0; }
}
