/* ============ رقيم | Raqeem — ثيم فاتح احترافي ============ */
:root {
  --bg: #f6f8fc;
  --bg-alt: #eef2f9;
  --card: #ffffff;
  --card-border: #e3e9f3;
  --text: #14213d;
  --muted: #5b6b84;
  --accent1: #2563eb;
  --accent2: #7c3aed;
  --grad: linear-gradient(120deg, #2563eb, #7c3aed);
  --radius: 18px;
  --shadow: 0 14px 40px rgba(20, 33, 61, 0.08);
  --shadow-hover: 0 20px 50px rgba(37, 99, 235, 0.14);
  --nav-h: 72px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

/* خاصية hidden تتغلب دائماً على أي display في الكلاسات */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 12px); }

body {
  font-family: "Alexandria", "Segoe UI", Tahoma, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.8;
  overflow-x: hidden;
}

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

.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* أيقونات SVG عامة */
svg { display: block; }

/* ============ شريط التنقل ============ */
.navbar {
  position: fixed; inset-inline: 0; top: 0; z-index: 100;
  height: var(--nav-h);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(255, 255, 255, 0.78);
  border-bottom: 1px solid transparent;
  transition: background 0.3s, border-color 0.3s, box-shadow 0.3s;
}
.navbar.scrolled {
  background: rgba(255, 255, 255, 0.94);
  border-color: var(--card-border);
  box-shadow: 0 6px 24px rgba(20, 33, 61, 0.06);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 100%; }

.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-weight: 800; font-size: 1.35rem; }
.logo-mark svg { width: 34px; height: 34px; }
.logo-text { font-weight: 900; letter-spacing: 0.5px; }

.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; }
.nav-links a {
  color: var(--muted); text-decoration: none; font-weight: 500; font-size: 0.98rem;
  padding: 8px 14px; border-radius: 10px; transition: color 0.25s, background 0.25s;
}
.nav-links a:hover, .nav-links a.active { color: var(--accent1); background: rgba(37, 99, 235, 0.07); }
.nav-links a.nav-cta {
  background: var(--grad); color: #fff; font-weight: 700;
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.3);
}
.nav-links a.nav-cta:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 10px 24px rgba(37, 99, 235, 0.4); }

.lang-btn {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: inherit; font-size: 0.92rem; font-weight: 700;
  color: var(--text); background: var(--card);
  border: 1px solid var(--card-border); border-radius: 999px;
  padding: 8px 16px; cursor: pointer; transition: 0.25s;
}
.lang-btn svg { width: 17px; height: 17px; }
.lang-btn:hover { border-color: var(--accent1); color: var(--accent1); transform: translateY(-2px); }

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

/* ============ الواجهة الرئيسية ============ */
.hero {
  position: relative; min-height: 100svh;
  display: flex; align-items: center;
  padding: calc(var(--nav-h) + 40px) 0 60px;
  overflow: hidden;
  background:
    radial-gradient(700px 500px at 85% 8%, rgba(124, 58, 237, 0.08), transparent 65%),
    radial-gradient(700px 500px at 10% 90%, rgba(37, 99, 235, 0.08), transparent 65%),
    var(--bg);
}
#particles { position: absolute; inset: 0; z-index: 0; }
.hero-glow { display: none; }
.hero-content { position: relative; z-index: 2; text-align: center; }

.hero-badge {
  display: inline-block; padding: 8px 22px; border-radius: 999px;
  border: 1px solid rgba(37, 99, 235, 0.25); background: rgba(37, 99, 235, 0.06);
  color: var(--accent1); font-size: 0.92rem; font-weight: 600; margin-bottom: 26px;
}

.hero h1 { font-size: clamp(2.1rem, 5.5vw, 3.9rem); font-weight: 900; line-height: 1.3; margin-bottom: 22px; }
.typing { border-left: 3px solid var(--accent1); padding-left: 6px; }

.hero-sub { max-width: 720px; margin: 0 auto 36px; color: var(--muted); font-size: 1.12rem; }

.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-bottom: 64px; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 30px; border-radius: 14px; border: none;
  font-family: inherit; font-size: 1.02rem; font-weight: 700;
  text-decoration: none; cursor: pointer; transition: transform 0.25s, box-shadow 0.25s, background 0.25s;
}
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 8px 24px rgba(37, 99, 235, 0.3); }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 14px 32px rgba(37, 99, 235, 0.4); }
.btn-ghost { background: var(--card); color: var(--text); border: 1px solid var(--card-border); box-shadow: 0 4px 14px rgba(20, 33, 61, 0.05); }
.btn-ghost:hover { border-color: var(--accent1); color: var(--accent1); transform: translateY(-3px); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none !important; box-shadow: none; }
.btn-arrow { transition: transform 0.25s; }
.btn-primary:hover .btn-arrow { transform: translateX(-5px); }
[dir="ltr"] .btn-primary:hover .btn-arrow { transform: translateX(5px); }

.hero-stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px;
  max-width: 860px; margin-inline: auto;
}
.stat {
  padding: 24px 12px; border-radius: var(--radius);
  background: var(--card); border: 1px solid var(--card-border);
  box-shadow: var(--shadow);
}
.stat-num, .stat-plus { font-size: 2.1rem; font-weight: 900; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat p { color: var(--muted); font-size: 0.92rem; margin-top: 4px; }

.scroll-hint {
  position: absolute; bottom: 26px; inset-inline-start: 50%; transform: translateX(50%);
  width: 28px; height: 46px; border: 2px solid #b6c2d6; border-radius: 999px; z-index: 2;
}
.scroll-hint span {
  position: absolute; top: 8px; inset-inline-start: 50%; transform: translateX(50%);
  width: 4px; height: 10px; background: var(--accent1); border-radius: 4px;
  animation: scrollAnim 1.6s infinite;
}
@keyframes scrollAnim { 0% { opacity: 1; top: 8px; } 100% { opacity: 0; top: 26px; } }

/* ============ الأقسام ============ */
.section { padding: 96px 0; }
.section-alt { background: var(--bg-alt); }

.section-head { text-align: center; margin-bottom: 56px; }
.section-tag {
  display: inline-block; padding: 6px 18px; border-radius: 999px;
  background: rgba(37, 99, 235, 0.08); color: var(--accent1);
  font-size: 0.88rem; font-weight: 700; margin-bottom: 14px;
}
.section-head h2 { font-size: clamp(1.7rem, 4vw, 2.5rem); font-weight: 900; margin-bottom: 12px; }
.section-head p { color: var(--muted); max-width: 640px; margin-inline: auto; }

/* ============ التبويبات والبطاقات ============ */
.tabs { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin-bottom: 42px; }
.tab {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 12px 26px; border-radius: 999px; border: 1px solid var(--card-border);
  background: var(--card); color: var(--muted); font-family: inherit;
  font-size: 0.98rem; font-weight: 700; cursor: pointer; transition: 0.25s;
  box-shadow: 0 4px 12px rgba(20, 33, 61, 0.04);
}
.tab .tab-ic svg { width: 19px; height: 19px; }
.tab:hover { color: var(--accent1); border-color: var(--accent1); }
.tab.active { background: var(--grad); color: #fff; border-color: transparent; box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3); }

.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; }

.s-card {
  position: relative; padding: 30px 26px; border-radius: var(--radius);
  background: var(--card); border: 1px solid var(--card-border);
  box-shadow: var(--shadow);
  cursor: pointer; transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
  transform-style: preserve-3d; will-change: transform;
  animation: cardIn 0.5s both;
}
@keyframes cardIn { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
.s-card:hover { border-color: rgba(37, 99, 235, 0.4); box-shadow: var(--shadow-hover); }
.s-card .s-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 54px; height: 54px; border-radius: 14px; margin-bottom: 16px;
  background: rgba(37, 99, 235, 0.08); color: var(--accent1);
}
.s-card .s-icon svg { width: 27px; height: 27px; }
.s-card h3 { font-size: 1.18rem; font-weight: 800; margin-bottom: 8px; }
.s-card p { color: var(--muted); font-size: 0.95rem; margin-bottom: 16px; }
.s-card .s-more {
  max-height: 0; overflow: hidden; transition: max-height 0.4s ease;
  color: var(--muted); font-size: 0.92rem;
}
.s-card.open .s-more { max-height: 240px; }
.s-card .s-more ul { padding-inline-start: 20px; margin-bottom: 14px; }
.s-card .s-more li { margin-bottom: 4px; }
.s-card .s-cta {
  display: inline-block; color: var(--accent1); font-weight: 700; font-size: 0.93rem;
  text-decoration: none; margin-top: 4px;
}
.s-card .s-cta:hover { text-decoration: underline; }
.s-card .s-hint { position: absolute; top: 24px; inset-inline-end: 22px; color: #b6c2d6; font-size: 1.05rem; transition: transform 0.3s, color 0.3s; }
.s-card.open .s-hint { transform: rotate(180deg); color: var(--accent1); }

/* ============ الهاردوير ============ */
.hw-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 48px; align-items: center; }

.hw-visual { display: flex; justify-content: center; }
.circuit-board {
  position: relative; width: 320px; height: 320px;
  background: linear-gradient(145deg, #101c38, #17264a);
  border: 1px solid rgba(37, 99, 235, 0.3); border-radius: 24px;
  box-shadow: 0 24px 60px rgba(20, 33, 61, 0.25), inset 0 0 60px rgba(37, 99, 235, 0.08);
}
.chip {
  position: absolute; top: 50%; inset-inline-start: 50%; transform: translate(50%, -50%);
  width: 92px; height: 92px; border-radius: 14px;
  background: linear-gradient(145deg, #1d2f5c, #14213d);
  border: 1px solid rgba(96, 165, 250, 0.55);
  display: flex; align-items: center; justify-content: center;
  color: #93c5fd; font-weight: 900; letter-spacing: 2px;
  box-shadow: 0 0 30px rgba(59, 130, 246, 0.35);
  animation: chipPulse 2.4s infinite;
}
[dir="ltr"] .chip { transform: translate(-50%, -50%); }
@keyframes chipPulse {
  0%, 100% { box-shadow: 0 0 22px rgba(59, 130, 246, 0.3); }
  50% { box-shadow: 0 0 44px rgba(59, 130, 246, 0.6); }
}
.c-line { position: absolute; background: rgba(96, 165, 250, 0.4); }
.c-line.l1 { top: 25%; inset-inline-start: 10%; width: 26%; height: 2px; }
.c-line.l2 { top: 70%; inset-inline-end: 8%; width: 30%; height: 2px; }
.c-line.l3 { top: 15%; inset-inline-end: 28%; width: 2px; height: 22%; }
.c-line.l4 { bottom: 12%; inset-inline-start: 30%; width: 2px; height: 20%; }
.c-dot { position: absolute; width: 8px; height: 8px; border-radius: 50%; background: #60a5fa; box-shadow: 0 0 10px #60a5fa; animation: dotBlink 1.8s infinite; }
.c-dot.d1 { top: 24%; inset-inline-start: 9%; }
.c-dot.d2 { top: 69%; inset-inline-end: 7%; animation-delay: 0.4s; }
.c-dot.d3 { top: 14%; inset-inline-end: 27%; animation-delay: 0.8s; }
.c-dot.d4 { bottom: 11%; inset-inline-start: 29%; animation-delay: 1.2s; }
@keyframes dotBlink { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }
.led { position: absolute; width: 12px; height: 12px; border-radius: 3px; }
.led1 { top: 14px; inset-inline-start: 16px; background: #34d399; box-shadow: 0 0 12px #34d399; animation: dotBlink 1.2s infinite; }
.led2 { top: 14px; inset-inline-start: 38px; background: #fbbf24; box-shadow: 0 0 12px #fbbf24; animation: dotBlink 1.7s infinite 0.3s; }
.led3 { top: 14px; inset-inline-start: 60px; background: #a78bfa; box-shadow: 0 0 12px #a78bfa; animation: dotBlink 2.1s infinite 0.6s; }

.hw-list { display: flex; flex-direction: column; gap: 20px; }
.hw-item {
  display: flex; gap: 18px; align-items: flex-start;
  padding: 22px; border-radius: var(--radius);
  background: var(--card); border: 1px solid var(--card-border);
  box-shadow: var(--shadow);
  transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
}
.hw-item:hover { transform: translateX(-8px); border-color: rgba(37, 99, 235, 0.4); box-shadow: var(--shadow-hover); }
[dir="ltr"] .hw-item:hover { transform: translateX(8px); }
.hw-icon {
  flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  width: 50px; height: 50px; border-radius: 13px;
  background: rgba(124, 58, 237, 0.08); color: var(--accent2);
}
.hw-icon svg { width: 25px; height: 25px; }
.hw-item h3 { font-size: 1.1rem; font-weight: 800; margin-bottom: 6px; }
.hw-item p { color: var(--muted); font-size: 0.93rem; }

/* ============ كيف نعمل ============ */
.timeline { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; position: relative; }
.t-step {
  text-align: center; padding: 34px 20px; border-radius: var(--radius);
  background: var(--card); border: 1px solid var(--card-border);
  box-shadow: var(--shadow);
  transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
}
.t-step:hover { transform: translateY(-8px); border-color: rgba(124, 58, 237, 0.4); box-shadow: var(--shadow-hover); }
.t-num {
  width: 54px; height: 54px; margin: 0 auto 16px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; background: var(--grad);
  font-size: 1.35rem; font-weight: 900; color: #fff;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3);
}
.t-step h3 { font-weight: 800; margin-bottom: 8px; }
.t-step p { color: var(--muted); font-size: 0.93rem; }

/* ============ الفورم (Wizard) ============ */
.wizard {
  max-width: 820px; margin-inline: auto;
  background: var(--card); border: 1px solid var(--card-border);
  border-radius: 24px; padding: 38px clamp(20px, 4vw, 44px);
  box-shadow: var(--shadow);
}

.wizard-progress { margin-bottom: 34px; }
.wp-bar { height: 6px; background: var(--bg-alt); border-radius: 999px; overflow: hidden; }
.wp-fill { height: 100%; width: 20%; background: var(--grad); border-radius: 999px; transition: width 0.4s ease; }
.wp-steps { display: flex; justify-content: space-between; margin-top: 12px; }
.wp-step { font-size: 0.83rem; color: #a5b1c5; transition: color 0.3s; font-weight: 600; }
.wp-step.active { color: var(--accent1); font-weight: 800; }
.wp-step.done { color: var(--text); }

.w-step { display: none; animation: stepIn 0.45s ease; }
.w-step.active { display: block; }
@keyframes stepIn { from { opacity: 0; transform: translateX(-18px); } to { opacity: 1; transform: none; } }

.w-step > h3 { font-size: 1.3rem; font-weight: 800; margin-bottom: 24px; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-grid .span-2 { grid-column: span 2; }

.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.field label { font-weight: 700; font-size: 0.95rem; }
.field input, .field textarea, .field select {
  font-family: inherit; font-size: 1rem; color: var(--text);
  background: #fbfcfe; border: 1px solid var(--card-border);
  border-radius: 12px; padding: 13px 16px; outline: none; transition: border-color 0.25s, box-shadow 0.25s;
}
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--accent1); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.field textarea { resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: #aab6c9; }

.service-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.pick-card {
  padding: 22px 18px; border-radius: 16px; text-align: center;
  background: #fbfcfe; border: 2px solid var(--card-border);
  cursor: pointer; transition: 0.25s; font-family: inherit; color: var(--text);
}
.pick-card:hover { border-color: rgba(37, 99, 235, 0.45); transform: translateY(-4px); box-shadow: 0 10px 24px rgba(20, 33, 61, 0.07); }
.pick-card.selected { border-color: var(--accent1); background: rgba(37, 99, 235, 0.05); box-shadow: 0 10px 26px rgba(37, 99, 235, 0.13); }
.pick-card .p-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; border-radius: 12px; margin-bottom: 10px;
  background: rgba(37, 99, 235, 0.08); color: var(--accent1);
}
.pick-card .p-icon svg { width: 23px; height: 23px; }
.pick-card .p-name { display: block; font-weight: 800; font-size: 1rem; }
.pick-card .p-desc { color: var(--muted); font-size: 0.83rem; margin-top: 6px; }

.chip-group { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  padding: 10px 20px; border-radius: 999px; font-family: inherit; font-size: 0.95rem;
  background: #fbfcfe; color: var(--muted);
  border: 1px solid var(--card-border); cursor: pointer; transition: 0.25s;
}
.chip:hover { color: var(--accent1); border-color: var(--accent1); }
.chip.selected { background: var(--grad); color: #fff; border-color: transparent; font-weight: 700; box-shadow: 0 6px 16px rgba(37, 99, 235, 0.28); }

.summary-box {
  margin-top: 10px; padding: 20px 24px; border-radius: 14px;
  background: rgba(37, 99, 235, 0.04); border: 1px dashed rgba(37, 99, 235, 0.35);
  font-size: 0.95rem; color: var(--muted);
}
.summary-box strong { color: var(--text); }
.summary-box .sum-row { margin-bottom: 5px; }

.wizard-nav { display: flex; justify-content: space-between; gap: 14px; margin-top: 30px; }
.wizard-error { color: #dc2660; font-weight: 700; margin-top: 14px; min-height: 24px; text-align: center; font-size: 0.95rem; }

.success-screen { text-align: center; padding: 20px 0; }
.success-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 84px; height: 84px; border-radius: 50%; margin-bottom: 18px;
  background: rgba(22, 163, 74, 0.1); color: #16a34a;
  animation: pop 0.5s ease;
}
.success-icon svg { width: 44px; height: 44px; }
@keyframes pop { 0% { transform: scale(0); } 80% { transform: scale(1.15); } 100% { transform: scale(1); } }
.success-screen h3 { font-size: 1.5rem; margin-bottom: 16px; }
.track-id {
  display: inline-block; direction: ltr; font-size: 1.4rem; font-weight: 900;
  letter-spacing: 2px; padding: 12px 30px; margin: 10px 0 16px;
  border-radius: 12px; background: rgba(37, 99, 235, 0.06);
  border: 1px solid rgba(37, 99, 235, 0.35); color: var(--accent1);
}
.success-note { color: var(--muted); max-width: 460px; margin: 0 auto 26px; }
.success-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ============ التتبع ============ */
.track-box {
  background: var(--card); border: 1px solid var(--card-border);
  border-radius: 24px; padding: 34px; box-shadow: var(--shadow);
}
.track-input { display: flex; gap: 12px; }
.track-input input {
  flex: 1; font-family: inherit; font-size: 1.02rem; letter-spacing: 1px;
  color: var(--text); background: #fbfcfe;
  border: 1px solid var(--card-border); border-radius: 12px; padding: 13px 18px; outline: none;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.track-input input:focus { border-color: var(--accent1); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12); }
.track-result { margin-top: 22px; }
.track-card {
  padding: 22px 24px; border-radius: 14px; background: #fbfcfe;
  border: 1px solid var(--card-border); animation: stepIn 0.4s;
}
.track-card .tc-row { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; color: var(--muted); }
.track-card .tc-row strong { color: var(--text); }
.status-badge { padding: 4px 16px; border-radius: 999px; font-weight: 700; font-size: 0.88rem; }
.status-جديد { background: #dbeafe; color: #1d4ed8; }
.status-قيد-المراجعة { background: #fef3c7; color: #b45309; }
.status-قيد-التنفيذ { background: #ede9fe; color: #6d28d9; }
.status-مكتمل { background: #dcfce7; color: #15803d; }
.status-ملغي { background: #ffe4e6; color: #be123c; }
.track-error { color: #dc2660; font-weight: 700; text-align: center; }

/* ============ الفوتر ============ */
.footer { background: #14213d; color: #e6ebf4; padding: 64px 0 0; }
.footer .logo { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1.2fr; gap: 40px; padding-bottom: 44px; }
.footer-about { color: #9fb0ca; margin-top: 14px; max-width: 320px; font-size: 0.95rem; }
.footer h4 { font-size: 1.05rem; margin-bottom: 16px; color: #fff; }
.footer-links { list-style: none; }
.footer-links a { color: #9fb0ca; text-decoration: none; display: block; padding: 5px 0; transition: color 0.25s; font-size: 0.95rem; }
.footer-links a:hover { color: #93c5fd; }
.wa-btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 22px; border-radius: 14px; text-decoration: none;
  background: rgba(37, 211, 102, 0.14); color: #4ade80;
  border: 1px solid rgba(74, 222, 128, 0.35); font-weight: 800; font-size: 1.02rem;
  transition: 0.25s;
}
.wa-btn:hover { background: rgba(37, 211, 102, 0.24); transform: translateY(-3px); }
.footer-note { color: #9fb0ca; font-size: 0.88rem; margin-top: 12px; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.1); padding: 20px 0; text-align: center; color: #9fb0ca; font-size: 0.9rem; }

/* ============ زر العودة للأعلى ============ */
.to-top {
  position: fixed; bottom: 26px; inset-inline-start: 26px; z-index: 90;
  width: 48px; height: 48px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--grad); color: #fff; font-size: 1.25rem; font-weight: 900;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.35);
  opacity: 0; pointer-events: none; transform: translateY(14px);
  transition: opacity 0.3s, transform 0.3s;
}
.to-top.show { opacity: 1; pointer-events: auto; transform: none; }

/* ============ شبكة الواجهة + محرر الكود الحي ============ */
.hero-grid {
  display: grid; grid-template-columns: 1.04fr 0.96fr; gap: 48px;
  align-items: center; text-align: start; margin-bottom: 64px;
}
.hero-copy .hero-sub { margin: 0 0 36px; }
.hero-copy .hero-actions { justify-content: flex-start; margin-bottom: 0; }

.code-window {
  background: #0f172a; border-radius: 16px; overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.16);
  box-shadow: 0 30px 70px rgba(15, 23, 42, 0.3);
  font-family: "SF Mono", ui-monospace, Menlo, Consolas, monospace;
}
.code-bar { display: flex; align-items: center; gap: 8px; padding: 12px 16px; background: #1e293b; }
.cdot { width: 12px; height: 12px; border-radius: 50%; }
.cdot.cr { background: #ff5f57; }
.cdot.cy { background: #febc2e; }
.cdot.cg { background: #28c840; }
.code-title { margin-left: 10px; color: #94a3b8; font-size: 0.78rem; letter-spacing: 0.3px; }
.code-body {
  padding: 18px 16px 8px; margin: 0; min-height: 318px;
  font-size: 0.83rem; line-height: 1.8; counter-reset: ln; overflow: hidden;
}
.cl { min-height: 1.5em; counter-increment: ln; padding-left: 36px; position: relative; white-space: pre; }
.cl::before {
  content: counter(ln); position: absolute; left: 0; width: 24px;
  text-align: right; color: #475569; font-size: 0.72rem; top: 2px;
}
.cl:last-child::after {
  content: ""; display: inline-block; width: 8px; height: 1.05em;
  background: #60a5fa; vertical-align: text-bottom; margin-left: 2px;
  animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
.tk-kw { color: #c084fc; }
.tk-fn { color: #60a5fa; }
.tk-str { color: #34d399; }
.tk-num { color: #fbbf24; }
.tk-cm { color: #64748b; font-style: italic; }
.tk-pl { color: #cbd5e1; }
.tk-vr { color: #e2e8f0; }
.code-status {
  padding: 10px 16px 14px; border-top: 1px solid rgba(148, 163, 184, 0.12);
  color: #94a3b8; font-size: 0.78rem;
}
.cs-prompt { color: #34d399; font-weight: 700; }
#codeStatus { transition: color 0.3s; }
#codeStatus.ok { color: #34d399; font-weight: 600; }

/* ============ زر واتساب العائم ============ */
.wa-float {
  position: fixed; bottom: 100px; inset-inline-end: 24px; z-index: 95;
  display: flex; align-items: center;
  background: #25d366; color: #fff; border-radius: 999px; padding: 16px;
  box-shadow: 0 12px 30px rgba(37, 211, 102, 0.4);
  text-decoration: none; transition: transform 0.3s, box-shadow 0.3s;
}
.wa-float:hover { transform: translateY(-3px); box-shadow: 0 16px 38px rgba(37, 211, 102, 0.5); }
.wa-float-icon { display: flex; position: relative; z-index: 1; }
.wa-float-text {
  max-width: 0; overflow: hidden; white-space: nowrap;
  font-weight: 800; font-size: 0.95rem; position: relative; z-index: 1;
  transition: max-width 0.35s ease, margin 0.35s ease;
}
.wa-float:hover .wa-float-text { max-width: 170px; margin-inline-start: 10px; }
.wa-ring {
  position: absolute; inset: 0; border-radius: 999px;
  border: 2px solid rgba(37, 211, 102, 0.55);
  animation: waPulse 2.6s ease-out infinite; pointer-events: none;
}
.wa-ring2 { animation-delay: 1.3s; }
@keyframes waPulse {
  0% { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(1.55); opacity: 0; }
}

/* ============ الشات المباشر ============ */
.chat-widget { position: fixed; bottom: 24px; inset-inline-end: 24px; z-index: 96; }
.chat-fab {
  width: 60px; height: 60px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--grad); color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.4);
  transition: transform 0.3s, box-shadow 0.3s; position: relative;
}
.chat-fab:hover { transform: translateY(-3px); box-shadow: 0 16px 38px rgba(37, 99, 235, 0.5); }
.chat-fab .fab-close { display: none; }
.chat-fab.open .fab-open { display: none; }
.chat-fab.open .fab-close { display: block; }
.chat-badge {
  position: absolute; top: -3px; inset-inline-end: -3px;
  min-width: 22px; height: 22px; border-radius: 999px;
  background: #ef4444; color: #fff; font-size: 0.72rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  padding: 0 6px; border: 2px solid #fff;
}
.chat-panel {
  position: absolute; bottom: 76px; inset-inline-end: 0;
  width: min(360px, calc(100vw - 48px));
  background: var(--card); border: 1px solid var(--card-border); border-radius: 20px;
  box-shadow: 0 30px 70px rgba(20, 33, 61, 0.25);
  overflow: hidden; display: flex; flex-direction: column;
  animation: chatIn 0.3s ease;
}
@keyframes chatIn { from { opacity: 0; transform: translateY(16px) scale(0.97); } to { opacity: 1; transform: none; } }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: var(--grad); color: #fff; }
.chat-head-mark svg { width: 34px; height: 34px; }
.chat-head-info b { display: block; font-size: 1rem; }
.chat-status { display: flex; align-items: center; gap: 6px; font-size: 0.76rem; opacity: 0.92; }
.chat-status i { width: 8px; height: 8px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 6px #4ade80; }
.chat-close {
  margin-inline-start: auto; background: rgba(255, 255, 255, 0.16); color: #fff;
  border: none; border-radius: 9px; width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.chat-close:hover { background: rgba(255, 255, 255, 0.28); }
.chat-body {
  padding: 16px; height: 290px; overflow-y: auto;
  display: flex; flex-direction: column; gap: 10px; background: #f8faff;
}
.chat-msg {
  max-width: 84%; padding: 10px 14px; border-radius: 14px;
  font-size: 0.9rem; line-height: 1.6; word-break: break-word;
}
.chat-msg.admin { background: #fff; border: 1px solid var(--card-border); align-self: flex-start; border-start-start-radius: 4px; }
.chat-msg.client { background: var(--grad); color: #fff; align-self: flex-end; border-start-end-radius: 4px; }
.chat-startform { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 10px; border-top: 1px solid var(--card-border); background: #fff; }
.chat-startform input {
  font-family: inherit; font-size: 0.93rem; padding: 11px 14px;
  border-radius: 11px; border: 1px solid var(--card-border);
  background: #fbfcfe; color: var(--text); outline: none; transition: border-color 0.25s;
}
.chat-startform input:focus { border-color: var(--accent1); }
.chat-start-btn { justify-content: center; padding: 12px; font-size: 0.95rem; }
.chat-err { color: #dc2660; font-size: 0.83rem; font-weight: 700; min-height: 18px; margin: 0; text-align: center; }
.chat-inputrow { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--card-border); background: #fff; }
.chat-inputrow input {
  flex: 1; font-family: inherit; font-size: 0.93rem; padding: 11px 14px;
  border-radius: 11px; border: 1px solid var(--card-border);
  background: #fbfcfe; color: var(--text); outline: none; transition: border-color 0.25s;
}
.chat-inputrow input:focus { border-color: var(--accent1); }
.chat-send {
  width: 44px; height: 44px; border-radius: 11px; border: none; cursor: pointer;
  background: var(--grad); color: #fff;
  display: flex; align-items: center; justify-content: center; transition: 0.25s;
}
.chat-send:hover { transform: translateY(-2px); }
[dir="rtl"] .chat-send svg { transform: scaleX(-1); }

/* ============ حركات الظهور ============ */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ============ الاستجابة ============ */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; text-align: center; gap: 40px; }
  .hero-copy .hero-sub { margin-inline: auto; }
  .hero-copy .hero-actions { justify-content: center; }
  .hero-code { max-width: 500px; width: 100%; margin-inline: auto; }
  .code-body { min-height: 280px; font-size: 0.78rem; }
  .hw-grid { grid-template-columns: 1fr; }
  .timeline { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 680px) {
  .nav-links {
    position: fixed; top: var(--nav-h); inset-inline: 0;
    flex-direction: column; align-items: stretch; gap: 4px;
    background: rgba(255, 255, 255, 0.98); padding: 18px 6%;
    border-bottom: 1px solid var(--card-border);
    box-shadow: 0 20px 40px rgba(20, 33, 61, 0.1);
    transform: translateY(-130%); transition: transform 0.35s ease;
  }
  .nav-links.open { transform: none; }
  .nav-links a { display: block; text-align: center; padding: 13px; }
  .nav-links .lang-btn { width: 100%; padding: 13px; border-radius: 12px; justify-content: center; }
  .nav-toggle { display: flex; }

  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .timeline { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: span 1; }
  .track-input { flex-direction: column; }
  .wizard-nav { flex-direction: row; }
  .wp-step { font-size: 0.7rem; }
}
