/* ============================================================
  PWADCsystem — ملف التنسيقات الرئيسي
  pwadcteam.com | تصميم داكن عصري بلمسات مطورين
  ------------------------------------------------------------
  الفهرس:
  01. المتغيرات والأساسيات
  02. عناصر مشتركة (أزرار، عناوين، حركات)
  03. شاشة التحميل وشريط التقدم
  04. الترويسة والقائمة
  05. القسم الرئيسي (Hero)
  06. أعمالنا (البورتفوليو)
  07. خدماتنا
  08. لماذا نحن
  09. تواصل معنا
  10. التذييل
  11. عناصر عائمة (زر أعلى، واتساب، إشعارات)
  12. التجاوب مع الشاشات المختلفة
============================================================ */

/* ---------- 01. المتغيرات والأساسيات ---------- */
:root {
  --bg: #070b10;
  --bg-2: #0a1017;
  --surface: #0e1620;
  --surface-2: #131d2a;
  --border: #1c2836;
  --border-light: #27394e;

  --text: #e9eff7;
  --muted: #8fa1b5;
  --muted-2: #64778c;

  --accent: #10d97e;
  --accent-2: #7cf5bd;
  --accent-dark: #0aa95f;
  --accent-glow: rgba(16, 217, 126, 0.16);
  --accent-glow-strong: rgba(16, 217, 126, 0.35);

  --red: #ff5f57;
  --yellow: #febc2e;
  --green: #28c840;

  --sans: 'Tajawal', 'Segoe UI', Tahoma, system-ui, sans-serif;
  --mono: 'JetBrains Mono', 'Courier New', monospace;

  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.6);
  --glow: 0 0 45px var(--accent-glow);
  --header-h: 76px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

body {
  font-family: var(--sans);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.75;
  font-size: 16px;
  overflow-x: hidden;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column; /* يجعل التذييل لاصقًا بأسفل الصفحة دائمًا */
}

main {
  flex: 1 0 auto;
}

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

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

input,
select,
textarea {
  font-family: inherit;
}

::selection {
  background: var(--accent);
  color: #04120a;
}

/* شريط تمرير مخصص */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--bg-2);
}
::-webkit-scrollbar-thumb {
  background: var(--border-light);
  border-radius: 20px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-dark);
}

.mono {
  font-family: var(--mono);
}

.accent {
  color: var(--accent);
}

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

.section {
  padding: clamp(70px, 9vw, 110px) 0;
}

.skip-link {
  position: absolute;
  top: -60px;
  right: 16px;
  z-index: 200;
  background: var(--accent);
  color: #04120a;
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 700;
  transition: top 0.25s ease;
}
.skip-link:focus {
  top: 12px;
}

/* ---------- 02. عناصر مشتركة ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 13px 26px;
  border-radius: 12px;
  border: 1px solid transparent;
  transition: transform var(--transition), box-shadow var(--transition),
    background var(--transition), border-color var(--transition), color var(--transition);
  white-space: nowrap;
}

.btn svg {
  width: 18px;
  height: 18px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #04120a;
  box-shadow: 0 8px 24px -8px var(--accent-glow-strong);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px -8px var(--accent-glow-strong);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--border-light);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  border-color: var(--border-light);
  color: var(--accent);
}

.btn-outline:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #04120a;
}

.btn-sm {
  padding: 9px 18px;
  font-size: 0.88rem;
  border-radius: 10px;
}

.btn-lg {
  padding: 15px 32px;
  font-size: 1.05rem;
}

.btn-block {
  width: 100%;
}

.btn .prompt {
  font-weight: 700;
}

.gradient-text {
  background: linear-gradient(120deg, var(--accent) 20%, var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.section-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto clamp(40px, 6vw, 64px);
}

.section-label {
  display: inline-block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-glow);
  border: 1px solid rgba(16, 217, 126, 0.25);
  padding: 5px 14px;
  border-radius: 8px;
  margin-bottom: 18px;
}

.section-title {
  font-size: clamp(1.7rem, 4vw, 2.5rem);
  font-weight: 800;
  line-height: 1.4;
  margin-bottom: 14px;
}

.section-sub {
  color: var(--muted);
  font-size: 1.02rem;
}

/* حركة الظهور عند التمرير */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal[data-delay="1"] { transition-delay: 0.12s; }
.reveal[data-delay="2"] { transition-delay: 0.24s; }
.reveal[data-delay="3"] { transition-delay: 0.36s; }
.reveal[data-delay="4"] { transition-delay: 0.48s; }
.reveal[data-delay="5"] { transition-delay: 0.6s; }
.reveal[data-delay="6"] { transition-delay: 0.72s; }

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

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

/* ---------- 03. شاشة التحميل وشريط التقدم ---------- */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.preloader.hidden {
  opacity: 0;
  visibility: hidden;
}

.preloader-logo {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 1px;
}

.preloader-logo span {
  color: var(--accent);
}

.preloader-bar {
  width: 180px;
  height: 4px;
  background: var(--surface-2);
  border-radius: 10px;
  overflow: hidden;
}

.preloader-bar span {
  display: block;
  height: 100%;
  width: 40%;
  background: linear-gradient(90deg, var(--accent-dark), var(--accent));
  border-radius: 10px;
  animation: loading 1.1s ease-in-out infinite;
}

@keyframes loading {
  0% { transform: translateX(140%); }
  100% { transform: translateX(-320%); }
}

.scroll-progress {
  position: fixed;
  top: 0;
  right: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-dark), var(--accent));
  z-index: 160;
  transition: width 0.08s linear;
}

/* ---------- 04. الترويسة والقائمة ---------- */
.site-header {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 150;
  height: var(--header-h);
  display: flex;
  align-items: center;
  transition: background var(--transition), border-color var(--transition),
    box-shadow var(--transition);
  border-bottom: 1px solid transparent;
}

.site-header.scrolled {
  background: rgba(7, 11, 16, 0.82);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--border);
  box-shadow: 0 10px 30px -18px rgba(0, 0, 0, 0.7);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 28px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  flex-shrink: 0;
}

.logo-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(16, 217, 126, 0.16), rgba(16, 217, 126, 0.05));
  border: 1px solid rgba(16, 217, 126, 0.35);
  border-radius: 12px;
  color: var(--accent);
  box-shadow: var(--glow);
}

.logo-icon svg {
  width: 22px;
  height: 22px;
}

.logo-text {
  font-size: 1.22rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  direction: ltr;
}

.main-nav {
  margin-inline-start: auto;
}

.main-nav ul {
  display: flex;
  gap: 6px;
}

.nav-link {
  position: relative;
  display: inline-block;
  padding: 9px 15px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--muted);
  border-radius: 8px;
  transition: color var(--transition);
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: 4px;
  right: 15px;
  left: 15px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform var(--transition);
}

.nav-link:hover,
.nav-link.active {
  color: var(--text);
}

.nav-link:hover::after,
.nav-link.active::after {
  transform: scaleX(1);
}

.header-cta {
  flex-shrink: 0;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  align-items: center;
  border-radius: 10px;
  border: 1px solid var(--border-light);
  background: rgba(255, 255, 255, 0.02);
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

.nav-toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}
.nav-toggle.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.mobile-nav {
  display: none;
  position: absolute;
  top: var(--header-h);
  right: 0;
  left: 0;
  background: rgba(8, 13, 19, 0.97);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 18px 4vw 26px;
  flex-direction: column;
  gap: 8px;
  transform: translateY(-12px);
  opacity: 0;
  visibility: hidden;
  transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;
  max-height: calc(100dvh - var(--header-h));
  overflow-y: auto;
}

.mobile-nav.open {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}

.mobile-nav ul {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 14px;
}

.mobile-nav .nav-link {
  display: block;
  padding: 13px 12px;
  font-size: 1.05rem;
  border-radius: 10px;
}

.mobile-nav .nav-link::after {
  display: none;
}

.mobile-nav .nav-link:hover,
.mobile-nav .nav-link.active {
  background: var(--accent-glow);
  color: var(--accent);
}

.mobile-cta {
  width: 100%;
}

.mobile-contact {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  direction: ltr;
  text-align: center;
}

.mobile-contact a {
  color: var(--muted);
}

.mobile-contact a:hover {
  color: var(--accent);
}

/* ---------- 05. القسم الرئيسي (Hero) ---------- */
.hero {
  position: relative;
  padding: calc(var(--header-h) + clamp(48px, 8vw, 90px)) 0 clamp(60px, 8vw, 96px);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(124, 245, 189, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124, 245, 189, 0.045) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 30%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 90% 70% at 50% 30%, #000 30%, transparent 75%);
}

.bg-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
}

.glow-1 {
  width: 480px;
  height: 480px;
  background: rgba(16, 217, 126, 0.13);
  top: -160px;
  inset-inline-start: -120px;
}

.glow-2 {
  width: 380px;
  height: 380px;
  background: rgba(16, 217, 126, 0.09);
  bottom: -120px;
  inset-inline-end: -80px;
}

.floating-symbol {
  position: absolute;
  font-size: 1.3rem;
  font-weight: 700;
  color: rgba(16, 217, 126, 0.16);
  animation: floatSym 7s ease-in-out infinite;
}

.sym-1 { top: 22%; inset-inline-start: 6%; animation-delay: 0s; }
.sym-2 { top: 62%; inset-inline-start: 12%; font-size: 1rem; animation-delay: 1.6s; }
.sym-3 { top: 30%; inset-inline-end: 8%; animation-delay: 0.8s; }
.sym-4 { top: 72%; inset-inline-end: 14%; font-size: 1.1rem; animation-delay: 2.4s; }

@keyframes floatSym {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-18px) rotate(6deg); }
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: clamp(36px, 5vw, 64px);
}

.hero-badge {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  background: rgba(16, 217, 126, 0.08);
  border: 1px solid rgba(16, 217, 126, 0.28);
  padding: 7px 16px;
  border-radius: 100px;
  margin-bottom: 22px;
}

.hero h1 {
  font-size: clamp(2rem, 4.6vw, 3.2rem);
  font-weight: 900;
  line-height: 1.45;
  margin-bottom: 20px;
}

.hero-desc {
  color: var(--muted);
  font-size: 1.06rem;
  max-width: 560px;
  margin-bottom: 32px;
}

.hero-desc strong {
  color: var(--text);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 44px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, auto);
  justify-content: start;
  gap: clamp(22px, 4vw, 44px);
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  position: relative;
  padding-inline-start: 16px;
}

.stat::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 6px;
  bottom: 6px;
  width: 3px;
  border-radius: 4px;
  background: linear-gradient(180deg, var(--accent), transparent);
}

.stat-num {
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--accent);
  direction: ltr;
  text-align: end;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--muted);
}

/* نافذة الطرفية */
.terminal {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow), var(--glow);
  direction: ltr;
}

.terminal-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 13px 18px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}

.t-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.t-dot.red { background: var(--red); }
.t-dot.yellow { background: var(--yellow); }
.t-dot.green { background: var(--green); }

.terminal-title {
  margin-inline-start: 8px;
  font-size: 0.78rem;
  color: var(--muted);
}

.terminal-body {
  padding: 22px 20px 26px;
  font-size: 0.86rem;
  line-height: 2.1;
  min-height: 300px;
  color: #c8d6e5;
  white-space: pre-wrap;
  word-break: break-word;
}

.terminal.small .terminal-body {
  min-height: 0;
  font-size: 0.8rem;
}

.t-line-cmd { color: #e9eff7; font-weight: 600; }
.t-line-ok { color: var(--accent-2); }
.t-line-done { color: var(--accent); font-weight: 700; }

.t-caret {
  display: inline-block;
  width: 9px;
  height: 1.15em;
  background: var(--accent);
  vertical-align: text-bottom;
  animation: blink 0.9s steps(1) infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

/* تلوين كود JSON في قسم لماذا نحن */
.c-key { color: #7cf5bd; }
.c-str { color: #f0c674; }
.c-bool { color: #10d97e; font-weight: 700; }
.c-comment { color: #5b6b7d; font-style: italic; }

/* ---------- 06. أعمالنا (البورتفوليو) ---------- */
.works {
  background: var(--bg-2);
  border-block: 1px solid var(--border);
}

.works-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}

.work-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform var(--transition), border-color var(--transition),
    box-shadow var(--transition);
  display: flex;
  flex-direction: column;
}

.work-card:hover {
  transform: translateY(-8px);
  border-color: rgba(16, 217, 126, 0.45);
  box-shadow: var(--shadow), var(--glow);
}

.work-media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--surface-2);
}

.work-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.work-card:hover .work-media img {
  transform: scale(1.06);
}

.work-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(7, 11, 16, 0.75));
}

.work-tag {
  position: absolute;
  top: 14px;
  inset-inline-start: 14px;
  z-index: 2;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--accent);
  background: rgba(7, 11, 16, 0.8);
  border: 1px solid rgba(16, 217, 126, 0.4);
  padding: 5px 12px;
  border-radius: 100px;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.work-body {
  padding: 22px 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.work-body h3 {
  font-size: 1.18rem;
  font-weight: 800;
}

.work-body p {
  color: var(--muted);
  font-size: 0.93rem;
  line-height: 1.8;
  flex: 1;
}

.work-link {
  align-self: flex-start;
  margin-top: 6px;
}

/* ---------- 07. خدماتنا ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}

.service-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 22px;
  transition: transform var(--transition), border-color var(--transition),
    box-shadow var(--transition);
}

.service-card:hover {
  transform: translateY(-6px);
  border-color: rgba(16, 217, 126, 0.45);
  box-shadow: var(--glow);
}

.service-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(16, 217, 126, 0.16), rgba(16, 217, 126, 0.04));
  border: 1px solid rgba(16, 217, 126, 0.3);
  color: var(--accent);
  margin-bottom: 18px;
  transition: transform var(--transition), background var(--transition);
}

.service-card:hover .service-icon {
  transform: scale(1.08) rotate(-4deg);
  background: var(--accent);
  color: #04120a;
}

.service-icon svg {
  width: 24px;
  height: 24px;
}

.service-card h3 {
  font-size: 1.05rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.service-card p {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.85;
}

/* ---------- 08. لماذا نحن ---------- */
.why {
  background: var(--bg-2);
  border-block: 1px solid var(--border);
  overflow: hidden;
  position: relative;
}

.why::before {
  content: "";
  position: absolute;
  inset-inline-end: -140px;
  top: 50%;
  transform: translateY(-50%);
  width: 420px;
  height: 420px;
  background: rgba(16, 217, 126, 0.07);
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
}

.why-inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(40px, 6vw, 72px);
  align-items: center;
  position: relative;
}

.why .section-sub {
  margin-bottom: 30px;
}

.features-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px 24px;
}

.features-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.96rem;
  font-weight: 500;
  line-height: 1.6;
}

.check-icon {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--accent-glow);
  border: 1px solid rgba(16, 217, 126, 0.35);
  color: var(--accent);
  margin-top: 2px;
}

.check-icon svg {
  width: 13px;
  height: 13px;
}

.why-code {
  position: relative;
}

.why-badge {
  position: absolute;
  bottom: -20px;
  inset-inline-start: -18px;
  background: var(--surface-2);
  border: 1px solid rgba(16, 217, 126, 0.4);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 12px 18px;
  border-radius: 12px;
  box-shadow: var(--shadow);
  animation: floatSym 6s ease-in-out infinite;
  direction: ltr;
}

/* ---------- 09. تواصل معنا ---------- */
.contact-inner {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(32px, 5vw, 56px);
  align-items: start;
}

.contact-info {
  display: grid;
  gap: 16px;
}

.info-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  transition: border-color var(--transition), transform var(--transition);
}

.info-card:hover {
  border-color: rgba(16, 217, 126, 0.45);
  transform: translateX(-4px);
}

.info-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--accent-glow);
  border: 1px solid rgba(16, 217, 126, 0.3);
  color: var(--accent);
}

.info-icon svg {
  width: 22px;
  height: 22px;
}

.info-text h3 {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 3px;
}

.info-text a,
.info-text p {
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--text);
  transition: color var(--transition);
}

.info-text a:hover {
  color: var(--accent);
}

.contact-form-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(22px, 3.5vw, 36px);
  box-shadow: var(--shadow);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.required {
  color: var(--accent);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  background: var(--bg-2);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  color: var(--text);
  padding: 13px 16px;
  font-size: 0.95rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--muted-2);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-group input.invalid,
.form-group textarea.invalid {
  border-color: #ff6b6b;
  box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.12);
}

select.form-group option,
.form-group select option {
  background: var(--surface-2);
  color: var(--text);
}

.hp-field {
  position: absolute;
  inset-inline-start: -9999px;
  opacity: 0;
  height: 0;
  overflow: hidden;
}

.form-note {
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 14px;
}

.form-note a {
  color: var(--accent);
  font-weight: 700;
}

.btn .btn-spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(4, 18, 10, 0.3);
  border-top-color: #04120a;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.btn.loading .btn-spinner {
  display: inline-block;
}

.btn.loading {
  pointer-events: none;
  opacity: 0.85;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ---------- 10. التذييل ---------- */
.site-footer {
  flex-shrink: 0;
  margin-top: auto; /* لاصق بأسفل الصفحة عندما يكون المحتوى قصيرًا */
  background: #05080c;
  border-top: 1px solid var(--border);
  padding: clamp(48px, 6vw, 72px) 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 1fr 1.1fr;
  gap: clamp(28px, 4vw, 48px);
  padding-bottom: 44px;
}

.footer-brand p {
  color: var(--muted);
  font-size: 0.92rem;
  margin: 16px 0 20px;
  max-width: 320px;
}

.socials {
  display: flex;
  gap: 10px;
}

.socials a {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  border: 1px solid var(--border-light);
  color: var(--muted);
  transition: all var(--transition);
}

.socials a svg {
  width: 17px;
  height: 17px;
}

.socials a:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #04120a;
  transform: translateY(-3px);
}

.footer-col h4 {
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: 18px;
  position: relative;
  padding-bottom: 10px;
}

.footer-col h4::after {
  content: "";
  position: absolute;
  bottom: 0;
  inset-inline-start: 0;
  width: 28px;
  height: 2.5px;
  border-radius: 4px;
  background: var(--accent);
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col a,
.footer-col li > span {
  color: var(--muted);
  font-size: 0.92rem;
  transition: color var(--transition), padding var(--transition);
}

.footer-col li {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-col li svg {
  width: 15px;
  height: 15px;
  color: var(--accent);
  flex-shrink: 0;
}

.footer-col a:hover {
  color: var(--accent);
  padding-inline-end: 5px;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  border-top: 1px solid var(--border);
  padding: 20px 0;
  font-size: 0.85rem;
  color: var(--muted-2);
}

.footer-bottom a {
  color: var(--accent);
  font-weight: 600;
}

.footer-bottom .mono {
  font-size: 0.78rem;
}

/* ---------- 11. عناصر عائمة ---------- */
.back-to-top {
  position: fixed;
  bottom: 26px;
  inset-inline-end: 26px;
  z-index: 120;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border-light);
  color: var(--accent);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: all var(--transition);
  box-shadow: var(--shadow);
}

.back-to-top svg {
  width: 20px;
  height: 20px;
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--accent);
  color: #04120a;
  border-color: var(--accent);
}

.whatsapp-float {
  position: fixed;
  bottom: 26px;
  inset-inline-start: 26px;
  z-index: 120;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #22c55e;
  color: #fff;
  box-shadow: 0 10px 28px -8px rgba(34, 197, 94, 0.55);
  transition: transform var(--transition);
}

.whatsapp-float svg {
  width: 26px;
  height: 26px;
}

.whatsapp-float:hover {
  transform: scale(1.1);
}

.toast {
  position: fixed;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  z-index: 220;
  max-width: min(420px, 90vw);
  background: var(--surface-2);
  border: 1px solid var(--border-light);
  border-inline-start: 4px solid var(--accent);
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 600;
  padding: 14px 22px;
  border-radius: 12px;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transition: all 0.35s ease;
  text-align: center;
}

.toast.show {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.toast.error {
  border-inline-start-color: #ff6b6b;
}

/* ---------- 12. التجاوب مع الشاشات المختلفة ---------- */
@media (max-width: 1024px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .works-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 900px) {
  .main-nav,
  .header-cta {
    display: none;
  }
  .nav-toggle {
    display: flex;
    margin-inline-start: auto;
  }
  .mobile-nav {
    display: flex;
  }
  .hero-inner {
    grid-template-columns: 1fr;
  }
  .terminal {
    margin-top: 8px;
  }
  .terminal-body {
    min-height: 240px;
  }
  .why-inner {
    grid-template-columns: 1fr;
  }
  .why-badge {
    inset-inline-start: 12px;
    bottom: -18px;
    font-size: 0.68rem;
  }
  .contact-inner {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    width: 100%;
  }
  .works-grid {
    grid-template-columns: 1fr;
  }
  .services-grid {
    grid-template-columns: 1fr;
  }
  .features-list {
    grid-template-columns: 1fr;
  }
  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 34px;
  }
  .footer-bottom {
    justify-content: center;
    text-align: center;
  }
  .back-to-top {
    bottom: 20px;
    inset-inline-end: 16px;
    width: 42px;
    height: 42px;
  }
  .whatsapp-float {
    bottom: 20px;
    inset-inline-start: 16px;
    width: 48px;
    height: 48px;
  }
}

/* احترام المنطقة الآمنة في هواتف iPhone */
@supports (padding: env(safe-area-inset-bottom)) {
  .whatsapp-float,
  .back-to-top {
    bottom: calc(20px + env(safe-area-inset-bottom));
  }
}
