/* =========================================================
   أفق تك | UfuqTek — Shared Stylesheet
   Dark minimal • RTL • Glass • Static (Cloudflare Pages)
   ========================================================= */

/* ---------- Tokens ---------- */
:root {
  --bg: #0A0A0F;
  --bg-2: #0E0F17;
  --surface: rgba(255, 255, 255, 0.035);
  --surface-2: rgba(255, 255, 255, 0.065);
  --border: rgba(255, 255, 255, 0.08);
  --border-2: rgba(255, 255, 255, 0.15);
  --text: #FFFFFF;
  --muted: rgba(228, 236, 255, 0.68);
  --dim: rgba(228, 236, 255, 0.45);
  --blue: #007AFF;
  --cyan: #00D4FF;
  --wa: #25D366;
  --danger: #FF5A6A;
  --grad: linear-gradient(135deg, #007AFF 0%, #00D4FF 100%);
  --radius: 20px;
  --radius-sm: 14px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --max: 1160px;
  --header-h: 70px;
  --section: clamp(56px, 7vw, 96px);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', 'IBM Plex Sans Arabic', system-ui, -apple-system, 'Segoe UI', Tahoma, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
body.no-scroll { overflow: hidden; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 { margin: 0; line-height: 1.3; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
.en { font-family: 'Inter', sans-serif; direction: ltr; unicode-bidi: isolate; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 8px; }
.icon { width: 20px; height: 20px; flex-shrink: 0; }

.container { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: 20px; }
.section { padding-block: var(--section); }
.section + .section { padding-top: 0; }

/* Ambient background */
.ambient {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60vw 40vw at 85% -10%, rgba(0, 122, 255, 0.13), transparent 60%),
    radial-gradient(50vw 40vw at 0% 45%, rgba(0, 212, 255, 0.05), transparent 60%),
    var(--bg);
}
.ambient::after {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 28px 28px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 70%);
  mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 70%);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 48px; padding: 11px 24px;
  border-radius: 999px; border: 1px solid transparent; background: none;
  font-weight: 600; font-size: 15.5px; white-space: nowrap;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), background .35s var(--ease), border-color .35s var(--ease), opacity .3s;
}
.btn:active { transform: scale(0.97); }
.btn[disabled] { opacity: .6; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 8px 28px -10px rgba(0, 122, 255, 0.7), inset 0 1px 0 rgba(255,255,255,0.25); }
.btn-primary:not([disabled]):hover { transform: translateY(-2px); box-shadow: 0 14px 36px -10px rgba(0, 160, 255, 0.85), inset 0 1px 0 rgba(255,255,255,0.25); }
.btn-ghost { background: var(--surface-2); border-color: var(--border-2); color: var(--text); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.btn-ghost:hover { background: rgba(255,255,255,0.1); border-color: rgba(0, 212, 255, 0.45); transform: translateY(-2px); }
.btn-wa { background: rgba(37, 211, 102, 0.12); border-color: rgba(37, 211, 102, 0.45); color: #fff; }
.btn-wa svg { color: var(--wa); }
.btn-wa:hover { background: rgba(37, 211, 102, 0.2); border-color: var(--wa); transform: translateY(-2px); }
.btn-sm { min-height: 40px; padding: 7px 18px; font-size: 14.5px; }
.btn-block { width: 100%; }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; color: var(--cyan); font-weight: 600; font-size: 15px; transition: gap .3s var(--ease); }
.link-arrow svg { width: 16px; height: 16px; }
.link-arrow:hover { gap: 10px; }
.spinner { display: none; width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.35); border-top-color: #fff; animation: spin .8s linear infinite; }
.is-loading .spinner { display: inline-block; }
.is-loading .btn-ico { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Header ---------- */
.header {
  position: fixed; inset-inline: 0; top: 0; z-index: 50; height: var(--header-h);
  border-bottom: 1px solid transparent;
  transition: background .4s var(--ease), border-color .4s var(--ease);
}
/* Glass layer lives on ::before so the logo's blend mode still sees the dark backdrop */
.header::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; pointer-events: none;
  background: rgba(10, 10, 15, 0.8);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  transition: opacity .4s var(--ease);
}
.header.scrolled::before, .menu-open .header::before { opacity: 1; }
.header.scrolled, .menu-open .header { border-bottom-color: var(--border); }
.header .container { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 18px; }

/* Logo — blends the dark JPEG-style background into the page */
.brand { display: inline-flex; align-items: center; flex-shrink: 0; position: relative; }
.brand img {
  height: 40px; width: auto;
  mix-blend-mode: lighten;
  filter: saturate(1.1);
  /* Feather all four edges so the logo's dark box never shows a hard border */
  -webkit-mask-image: linear-gradient(to left, transparent 0, #000 7%, #000 93%, transparent 100%), linear-gradient(to bottom, transparent 0, #000 12%, #000 90%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to left, transparent 0, #000 7%, #000 93%, transparent 100%), linear-gradient(to bottom, transparent 0, #000 12%, #000 90%, transparent 100%);
  mask-composite: intersect;
  transition: filter .3s;
}
.brand:hover img { filter: saturate(1.25) brightness(1.12); }
.brand-fallback { display: none; font-weight: 700; font-size: 20px; }
.brand-fallback b { color: var(--cyan); font-family: 'Inter', sans-serif; }
.brand.logo-missing img { display: none; }
.brand.logo-missing .brand-fallback { display: block; }

.nav { display: flex; align-items: center; gap: 2px; }
.nav a { padding: 8px 15px; border-radius: 999px; font-size: 15px; color: var(--muted); transition: color .25s, background .25s; }
.nav a:hover { color: var(--text); background: var(--surface-2); }
.nav a[aria-current="page"] { color: var(--text); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--border); }
.header-actions { display: flex; align-items: center; gap: 10px; }
.menu-toggle {
  display: none; width: 44px; height: 44px; border-radius: 12px;
  background: var(--surface-2); border: 1px solid var(--border);
  align-items: center; justify-content: center;
}
.menu-toggle span, .menu-toggle span::before, .menu-toggle span::after {
  display: block; width: 18px; height: 2px; background: #fff; border-radius: 2px; position: relative;
  transition: transform .35s var(--ease), background .2s;
}
.menu-toggle span::before, .menu-toggle span::after { content: ""; position: absolute; inset-inline-start: 0; }
.menu-toggle span::before { top: -6px; }
.menu-toggle span::after { top: 6px; }
.menu-open .menu-toggle span { background: transparent; }
.menu-open .menu-toggle span::before { transform: translateY(6px) rotate(45deg); }
.menu-open .menu-toggle span::after { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Hero (home) ---------- */
.hero {
  position: relative; overflow: hidden; text-align: center;
  min-height: clamp(560px, 86svh, 820px);
  display: flex; align-items: center;
  padding-top: calc(var(--header-h) + 24px); padding-bottom: 120px;
}
.hero-inner { position: relative; z-index: 2; max-width: 820px; margin-inline: auto; }
.hero h1 { font-size: clamp(38px, 6.6vw, 74px); line-height: 1.18; }
.hero h1 .grad {
  background: linear-gradient(90deg, #ffffff 0%, #bfe9ff 25%, var(--cyan) 55%, var(--blue) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero .lead { margin: 22px auto 0; max-width: 560px; font-size: clamp(16.5px, 2vw, 19px); color: var(--muted); }
.hero-actions { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.horizon { position: absolute; inset-inline: 0; bottom: 0; height: 200px; pointer-events: none; z-index: 1; }
.horizon::before {
  content: ""; position: absolute; left: 50%; top: 60px;
  width: max(1600px, 170vw); height: 1200px; transform: translateX(-50%);
  border-radius: 50%;
  border-top: 2px solid rgba(0, 212, 255, 0.85);
  box-shadow: 0 -12px 60px rgba(0, 212, 255, 0.32), inset 0 30px 80px rgba(0, 122, 255, 0.14);
  animation: horizonIn 1.6s var(--ease) both .15s;
}
.horizon::after {
  content: ""; position: absolute; left: 50%; top: 10px; width: 60%; height: 120px; transform: translateX(-50%);
  background: radial-gradient(ellipse at center, rgba(0, 212, 255, 0.22), transparent 70%); filter: blur(20px);
}
@keyframes horizonIn { from { opacity: 0; transform: translateX(-50%) translateY(50px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }

/* ---------- Page head (inner pages) ---------- */
.page-head { position: relative; text-align: center; padding-top: calc(var(--header-h) + clamp(32px, 5vw, 60px)); padding-bottom: clamp(28px, 4vw, 44px); }
.page-head h1 { font-size: clamp(30px, 5vw, 50px); }
.page-head h1 span { background: linear-gradient(90deg, #fff, var(--cyan) 60%, var(--blue)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.page-head p { margin: 12px auto 0; max-width: 600px; color: var(--muted); font-size: 17px; }
.page-head::after {
  content: ""; position: absolute; left: 50%; bottom: 0; transform: translateX(-50%);
  width: min(680px, 88%); height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.7), transparent);
  box-shadow: 0 0 24px rgba(0, 212, 255, 0.6);
}
.page-head + .section { padding-top: clamp(36px, 5vw, 56px); }
.back-link {
  display: inline-flex; align-items: center; gap: 6px; margin-bottom: 18px; color: var(--muted); font-size: 14px;
  padding: 5px 14px 5px 10px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface);
  transition: color .25s, border-color .25s;
}
.back-link svg { width: 15px; height: 15px; transform: scaleX(-1); }
.back-link:hover { color: #fff; border-color: rgba(0, 212, 255, 0.4); }

/* ---------- Section heads ---------- */
.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; margin-bottom: clamp(24px, 3.5vw, 36px); }
.section-head.center { flex-direction: column; align-items: center; text-align: center; }
.kicker { display: block; color: var(--cyan); font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.section-head h2 { font-size: clamp(26px, 3.6vw, 38px); }
.section-head p { margin-top: 8px; color: var(--muted); font-size: 16.5px; max-width: 560px; }

/* ---------- Card base ---------- */
.card {
  position: relative;
  background: linear-gradient(180deg, rgba(255,255,255,0.055), rgba(255,255,255,0.02));
  border: 1px solid var(--border); border-radius: var(--radius);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  transition: transform .5s var(--ease), border-color .5s var(--ease), box-shadow .5s var(--ease);
}
.is-clickable { cursor: pointer; }
.is-clickable:hover, .is-clickable:focus-visible { transform: translateY(-5px); border-color: rgba(0, 212, 255, 0.32); box-shadow: 0 28px 56px -30px rgba(0, 122, 255, 0.5); }

.ico-box {
  width: 50px; height: 50px; border-radius: 14px; display: grid; place-items: center; flex-shrink: 0;
  background: linear-gradient(135deg, rgba(0,122,255,0.22), rgba(0,212,255,0.08));
  border: 1px solid rgba(0, 212, 255, 0.25); color: var(--cyan);
  box-shadow: 0 0 26px -8px rgba(0, 212, 255, 0.5);
}
.ico-box svg { width: 25px; height: 25px; }

/* ---------- Services: compact (home) ---------- */
.svc-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.svc { padding: 24px 22px; display: flex; flex-direction: column; gap: 14px; }
.svc h3 { font-size: 17.5px; }
.svc p { color: var(--muted); font-size: 14.5px; line-height: 1.7; flex: 1; }
.svc .more { color: var(--cyan); font-size: 14px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.svc .more svg { width: 15px; height: 15px; transition: transform .3s var(--ease); }
.svc:hover .more svg { transform: translateX(-4px); }

/* ---------- Services: detailed (services page) ---------- */
.svc-detail-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.svc-detail { padding: clamp(24px, 3vw, 32px); display: flex; flex-direction: column; }
.svc-detail .top { display: flex; align-items: center; gap: 14px; }
.svc-detail h2 { font-size: 21px; }
.svc-detail > p { margin-top: 14px; color: var(--muted); font-size: 15.5px; }
.checks { margin-top: 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; }
.checks li { display: flex; gap: 9px; align-items: flex-start; font-size: 14.5px; color: rgba(255,255,255,0.88); line-height: 1.6; }
.checks li::before, .modal-features li::before {
  content: ""; flex-shrink: 0; width: 18px; height: 18px; margin-top: 2px; border-radius: 50%;
  background: rgba(0, 212, 255, 0.14) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2300D4FF' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 11px no-repeat;
}
.svc-detail .actions { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--border); display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }

/* ---------- Offer (laptop package) ---------- */
.offer {
  position: relative; overflow: hidden; border-radius: 28px; padding: clamp(26px, 4.5vw, 52px);
  background:
    radial-gradient(80% 120% at 100% 0%, rgba(0, 122, 255, 0.32), transparent 55%),
    radial-gradient(60% 100% at 0% 100%, rgba(0, 212, 255, 0.16), transparent 60%),
    linear-gradient(180deg, #10131f, #0b0c14);
  border: 1px solid rgba(0, 212, 255, 0.25);
  display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(24px, 4vw, 48px); align-items: center;
}
.badge { display: inline-flex; align-items: center; gap: 7px; padding: 5px 13px; border-radius: 999px; background: var(--grad); font-size: 13px; font-weight: 600; }
.badge svg { width: 15px; height: 15px; }
.offer h2 { margin-top: 14px; font-size: clamp(26px, 3.8vw, 38px); }
.offer p { margin-top: 10px; color: var(--muted); font-size: 16.5px; }
.offer .actions { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 10px; }
.offer .note { margin-top: 12px; color: var(--dim); font-size: 13.5px; }
.offer-steps { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.offer-step { padding: 16px; border-radius: 16px; background: rgba(255,255,255,0.045); border: 1px solid var(--border); }
.offer-step .n { font-family: 'Inter', sans-serif; font-weight: 700; color: var(--cyan); font-size: 13px; }
.offer-step b { display: block; margin-top: 4px; font-size: 15.5px; }
.offer-step small { display: block; color: var(--muted); font-size: 13.5px; line-height: 1.6; margin-top: 2px; }

/* ---------- Why strip ---------- */
.why-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.why { padding: 22px; }
.why .num { font-family: 'Inter', sans-serif; font-weight: 800; font-size: 34px; line-height: 1; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; direction: ltr; display: inline-block; }
.why h3 { margin-top: 12px; font-size: 16.5px; }
.why p { margin-top: 4px; color: var(--muted); font-size: 14.5px; line-height: 1.65; }
.why .ico-box { width: 42px; height: 42px; border-radius: 12px; }
.why .ico-box svg { width: 21px; height: 21px; }

/* ---------- Media + placeholder ---------- */
.media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: #0f1220; }
.media img { width: 100%; height: 100%; object-fit: cover; object-position: top center; transition: transform .8s var(--ease); }
.media.is-missing img { display: none; }
.media.is-missing {
  display: grid; place-items: center; text-align: center;
  background:
    radial-gradient(120% 90% at 50% 120%, rgba(0, 122, 255, 0.35), transparent 60%),
    repeating-linear-gradient(135deg, rgba(255,255,255,0.025) 0 12px, transparent 12px 24px),
    linear-gradient(180deg, #11152a, #0a0b12);
}
.media.is-missing::before {
  content: ""; width: 52px; height: 52px; border-radius: 16px; margin-bottom: 64px;
  border: 1px solid rgba(0, 212, 255, 0.35); background: rgba(0, 212, 255, 0.08)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2300D4FF' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='16' rx='3'/%3E%3Ccircle cx='9' cy='10' r='2'/%3E%3Cpath d='M21 16l-5-5-9 9'/%3E%3C/svg%3E") center / 24px no-repeat;
  box-shadow: 0 0 30px -6px rgba(0, 212, 255, 0.5);
  grid-area: 1 / 1;
}
.media.is-missing::after {
  content: attr(data-label); grid-area: 1 / 1; margin-top: 46px; padding-inline: 16px;
  color: var(--muted); font-size: 14px; font-weight: 600; line-height: 1.5;
}

/* ---------- Project cards ---------- */
.proj-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.proj { overflow: hidden; display: flex; flex-direction: column; }
.proj .media { border-bottom: 1px solid var(--border); }
.proj:hover .media img { transform: scale(1.04); }
.proj .media .count {
  position: absolute; bottom: 10px; left: 10px; z-index: 2; display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 999px; font-size: 12px; background: rgba(10,10,15,0.75); border: 1px solid var(--border-2);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); font-family: 'Inter', sans-serif;
}
.proj .media .count svg { width: 13px; height: 13px; }
.proj-body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: 12px; padding: 2px 11px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); color: var(--muted); }
.tag.accent { background: rgba(0, 212, 255, 0.1); border-color: rgba(0, 212, 255, 0.3); color: var(--cyan); }
.proj h3 { margin-top: 10px; font-size: 17.5px; line-height: 1.45; }
.proj p { margin-top: 6px; color: var(--muted); font-size: 14.5px; line-height: 1.7; flex: 1; }
.proj .more { margin-top: 14px; color: var(--cyan); font-size: 14px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.proj .more svg { width: 15px; height: 15px; transition: transform .3s var(--ease); }
.proj:hover .more svg { transform: translateX(-4px); }
.proj[hidden] { display: none; }
.proj.fade-in { animation: fadeUp .5s var(--ease) both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* Filters */
.filters { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 28px; }
.filter-btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 18px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border); color: var(--muted); font-size: 15px;
  transition: background .3s, color .3s, border-color .3s;
}
.filter-btn small { font-family: 'Inter', sans-serif; font-size: 12px; padding: 0 7px; border-radius: 999px; background: rgba(255,255,255,0.08); }
.filter-btn:hover { color: #fff; border-color: var(--border-2); }
.filter-btn[aria-pressed="true"] { background: rgba(0, 122, 255, 0.16); border-color: rgba(0, 212, 255, 0.45); color: #fff; }
.filter-btn[aria-pressed="true"] small { background: var(--grad); }
.empty-state { text-align: center; color: var(--muted); padding: 40px 0; }

/* ---------- CTA band ---------- */
.cta-band {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px;
  padding: clamp(24px, 4vw, 40px); border-radius: 24px;
  background: radial-gradient(70% 140% at 0% 0%, rgba(0, 122, 255, 0.22), transparent 60%), linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
  border: 1px solid rgba(0, 212, 255, 0.22);
}
.cta-band h2 { font-size: clamp(22px, 3vw, 30px); }
.cta-band p { margin-top: 6px; color: var(--muted); }
.cta-band .actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- Modal ---------- */
.modal {
  position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 20px;
  visibility: hidden; opacity: 0; transition: opacity .35s var(--ease), visibility .35s;
}
.modal.open { visibility: visible; opacity: 1; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(4, 5, 9, 0.78); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.modal-dialog {
  position: relative; width: 100%; max-width: 900px; max-height: calc(100svh - 40px); overflow-y: auto; overscroll-behavior: contain;
  background: linear-gradient(180deg, #121520, #0c0d14); border: 1px solid var(--border-2); border-radius: 24px;
  box-shadow: 0 40px 100px -20px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(0, 212, 255, 0.06);
  transform: translateY(24px) scale(.98); transition: transform .45s var(--ease);
}
.modal.open .modal-dialog { transform: none; }
.modal-close {
  position: absolute; top: 14px; left: 14px; z-index: 5; width: 40px; height: 40px; border-radius: 12px;
  display: grid; place-items: center; background: rgba(10,10,15,0.7); border: 1px solid var(--border-2);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); transition: background .25s;
}
.modal-close:hover { background: rgba(255,255,255,0.12); }
.modal-close svg { width: 18px; height: 18px; }
.gallery { position: relative; }
.gallery .media { aspect-ratio: 16 / 10; border-radius: 24px 24px 0 0; }
.gallery .media img { object-position: center; object-fit: contain; background: #0b0d16; }
.gallery-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; background: rgba(10,10,15,0.7); border: 1px solid var(--border-2);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); transition: background .25s;
}
.gallery-nav:hover { background: rgba(0, 122, 255, 0.4); }
.gallery-nav svg { width: 18px; height: 18px; }
.gallery-nav[hidden], .thumbs[hidden] { display: none; }
.gallery-nav.prev { right: 12px; }
.gallery-nav.next { left: 12px; }
.gallery-nav.prev svg { transform: scaleX(-1); }
.thumbs { display: flex; gap: 8px; padding: 12px 20px 0; overflow-x: auto; scrollbar-width: none; }
.thumbs::-webkit-scrollbar { display: none; }
.thumb { flex: 0 0 88px; aspect-ratio: 16 / 10; border-radius: 10px; overflow: hidden; border: 2px solid transparent; padding: 0; background: #0f1220; opacity: .6; transition: opacity .25s, border-color .25s; }
.thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.thumb[aria-current="true"] { opacity: 1; border-color: var(--cyan); }
.thumb:hover { opacity: 1; }
.thumb.is-missing { background: linear-gradient(135deg, #16203a, #0b0d16); }
.thumb.is-missing img { display: none; }
.modal-body { padding: 22px clamp(20px, 3.5vw, 34px) 30px; }
.modal-body h2 { margin-top: 10px; font-size: clamp(22px, 3vw, 28px); line-height: 1.4; }
.modal-body .desc { margin-top: 10px; color: var(--muted); font-size: 16px; }
.modal-cols { margin-top: 22px; display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; }
.modal-cols h3 { font-size: 15px; color: rgba(255,255,255,0.92); margin-bottom: 10px; }
.modal-features { display: grid; gap: 8px; }
.modal-features li { display: flex; gap: 9px; align-items: flex-start; font-size: 15px; color: rgba(255,255,255,0.88); line-height: 1.6; }
.tech { display: flex; flex-wrap: wrap; gap: 7px; }
.tech span { font-size: 13px; padding: 5px 12px; border-radius: 10px; background: rgba(0, 122, 255, 0.1); border: 1px solid rgba(0, 212, 255, 0.22); color: #d6f6ff; }
.modal-actions { margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--border); display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- Support form ---------- */
.support-layout { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.form-card { padding: clamp(22px, 3.6vw, 38px); }
.form-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 24px; }
.form-top h2 { font-size: 22px; }
.form-top p { color: var(--muted); font-size: 14px; margin-top: 2px; }
.ticket-pill { display: inline-flex; align-items: center; gap: 8px; padding: 7px 13px; border-radius: 12px; background: rgba(0, 212, 255, 0.08); border: 1px dashed rgba(0, 212, 255, 0.4); font-size: 13.5px; color: var(--muted); }
.ticket-pill b { color: var(--cyan); font-family: 'Inter', sans-serif; letter-spacing: .06em; direction: ltr; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field.full { grid-column: 1 / -1; }
.field label, .field .label { font-size: 14.5px; font-weight: 600; color: rgba(255,255,255,0.92); display: flex; align-items: center; gap: 6px; }
.req { color: var(--cyan); }
.opt { color: var(--dim); font-weight: 400; font-size: 13px; }
.input {
  width: 100%; min-height: 50px; padding: 12px 15px;
  background: rgba(255,255,255,0.04); border: 1px solid var(--border-2); border-radius: var(--radius-sm);
  color: #fff; font-size: 16px; outline: none; -webkit-appearance: none; appearance: none;
  transition: border-color .25s, background .25s, box-shadow .25s;
}
.input::placeholder { color: rgba(228, 236, 255, 0.35); }
.input:hover { border-color: rgba(255,255,255,0.24); }
.input:focus { border-color: var(--cyan); background: rgba(0, 122, 255, 0.06); box-shadow: 0 0 0 4px rgba(0, 212, 255, 0.12); }
.input[type="tel"], .input[type="email"] { direction: ltr; text-align: right; }
textarea.input { min-height: 140px; resize: vertical; line-height: 1.7; }
select.input {
  padding-inline-end: 44px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2300D4FF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: left 15px center; background-size: 18px;
}
select.input option { background: #12141d; color: #fff; }
.field.invalid .input { border-color: var(--danger); box-shadow: 0 0 0 4px rgba(255, 90, 106, 0.12); }
.error-msg { display: none; color: var(--danger); font-size: 13px; }
.field.invalid .error-msg { display: block; }
.field-foot { display: flex; justify-content: space-between; gap: 10px; }
.counter { margin-inline-start: auto; color: var(--dim); font-size: 12.5px; font-family: 'Inter', sans-serif; }
.segment { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; padding: 4px; background: rgba(255,255,255,0.04); border: 1px solid var(--border-2); border-radius: var(--radius-sm); }
.segment input { position: absolute; opacity: 0; pointer-events: none; }
.segment label { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; border-radius: 10px; cursor: pointer; font-weight: 500; color: var(--muted); transition: background .3s var(--ease), color .3s; }
.segment label .pdot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; opacity: .7; }
.segment input:checked + label { background: rgba(255,255,255,0.1); color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.12); }
.segment input[value="عاجل"]:checked + label { background: rgba(255, 90, 106, 0.16); color: #ff8f9a; box-shadow: inset 0 0 0 1px rgba(255, 90, 106, 0.4); }
.segment input:focus-visible + label { outline: 2px solid var(--cyan); outline-offset: 2px; }
.botcheck { position: absolute; top: 0; right: 0; width: 1px; height: 1px; overflow: hidden; opacity: 0; clip-path: inset(50%); pointer-events: none; }
.form-submit { margin-top: 24px; padding-top: 22px; border-top: 1px solid var(--border); display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.form-submit .hint { color: var(--dim); font-size: 13.5px; }

.notice { display: none; margin-top: 18px; padding: 16px; border-radius: var(--radius-sm); font-size: 14.5px; }
.notice.show { display: block; animation: fadeUp .4s var(--ease) both; }
.notice.error { background: rgba(255, 90, 106, 0.08); border: 1px solid rgba(255, 90, 106, 0.35); }
.notice .notice-head { display: flex; gap: 10px; align-items: flex-start; color: #ffb3bb; font-weight: 600; }
.notice .notice-head svg { width: 20px; height: 20px; flex-shrink: 0; margin-top: 3px; }
.notice p { margin-top: 4px; color: var(--muted); font-weight: 400; }
.notice .btn { margin-top: 12px; }

.success { display: none; text-align: center; padding: clamp(8px, 2vw, 24px) 0; }
.success.show { display: block; animation: fadeUp .7s var(--ease) both; }
.success-ico { width: 78px; height: 78px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center; background: var(--grad); box-shadow: 0 0 0 10px rgba(0, 212, 255, 0.08), 0 0 60px rgba(0, 212, 255, 0.45); }
.success-ico svg { width: 38px; height: 38px; color: #fff; }
.success-ico svg path { stroke-dasharray: 30; stroke-dashoffset: 30; animation: draw .7s var(--ease) .3s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.success h2 { margin-top: 22px; font-size: clamp(22px, 3vw, 28px); }
.success > p { margin-top: 8px; color: var(--muted); }
.ticket-box { margin: 22px auto 0; max-width: 340px; padding: 16px 18px; border-radius: 18px; background: rgba(0, 212, 255, 0.07); border: 1px dashed rgba(0, 212, 255, 0.45); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ticket-box small { display: block; color: var(--dim); font-size: 13px; text-align: right; }
.ticket-box strong { display: block; font-family: 'Inter', sans-serif; font-size: 25px; letter-spacing: .08em; color: var(--cyan); direction: ltr; }
.copy-btn { background: rgba(255,255,255,0.08); border: 1px solid var(--border-2); border-radius: 10px; padding: 7px 14px; font-size: 13.5px; transition: background .25s; }
.copy-btn:hover { background: rgba(255,255,255,0.14); }
.success-actions { margin-top: 24px; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }

.sidebar { display: grid; gap: 18px; position: sticky; top: calc(var(--header-h) + 18px); }
.side-card { padding: 24px; }
.side-card h3 { font-size: 19px; }
.side-card > p { margin-top: 4px; color: var(--muted); font-size: 14.5px; }
.contact-links { margin-top: 16px; display: grid; gap: 10px; }
.contact-link { display: flex; align-items: center; gap: 13px; padding: 12px 14px; border-radius: 14px; background: rgba(255,255,255,0.04); border: 1px solid var(--border); transition: background .3s, border-color .3s; }
.contact-link:hover { background: rgba(255,255,255,0.07); border-color: rgba(0, 212, 255, 0.35); }
.contact-link .ci { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: rgba(0, 122, 255, 0.14); color: var(--cyan); flex-shrink: 0; }
.contact-link small { display: block; color: var(--dim); font-size: 12.5px; }
.contact-link strong { font-weight: 600; font-size: 15px; word-break: break-all; }
.hours { margin-top: 12px; }
.hours-row { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; padding: 9px 0; border-bottom: 1px dashed var(--border); }
.hours-row:last-child { border-bottom: 0; }
.hours-row span:first-child { color: var(--muted); }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--border); padding-block: 44px 26px; margin-top: var(--section); background: linear-gradient(180deg, transparent, rgba(0, 122, 255, 0.04)); }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 32px; }
.footer .brand img { height: 46px; }
.footer-about { margin-top: 12px; color: var(--muted); font-size: 14.5px; max-width: 360px; }
.footer h4 { font-size: 15px; margin-bottom: 12px; }
.footer-links { display: grid; gap: 8px; }
.footer-links a, .footer-links span { color: var(--muted); font-size: 14.5px; transition: color .25s; }
.footer-links a:hover { color: var(--cyan); }
.footer-links .en { text-align: right; }
.socials { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 8px; }
.social { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: rgba(255,255,255,0.05); border: 1px solid var(--border); color: rgba(255,255,255,0.85); transition: transform .3s var(--ease), background .3s, border-color .3s; }
.social:hover { transform: translateY(-3px); background: rgba(0, 122, 255, 0.18); border-color: rgba(0, 212, 255, 0.4); color: #fff; }
.social svg { width: 17px; height: 17px; }
.footer-bottom { margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--border); display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; color: var(--dim); font-size: 13.5px; }

/* ---------- Floating WhatsApp (single, unobtrusive) ---------- */
.fab-wa {
  position: fixed; z-index: 60; left: 20px; bottom: max(20px, env(safe-area-inset-bottom));
  display: inline-flex; align-items: center; gap: 0; height: 52px; padding: 0 14px; border-radius: 999px;
  color: #fff; background: rgba(18, 22, 30, 0.82); border: 1px solid rgba(37, 211, 102, 0.45);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.7), 0 0 24px -8px rgba(37, 211, 102, 0.5);
  transition: gap .4s var(--ease), background .3s, transform .35s var(--ease), opacity .3s;
}
.fab-wa svg { width: 24px; height: 24px; color: var(--wa); }
.fab-wa .fab-label { max-width: 0; overflow: hidden; white-space: nowrap; font-size: 14.5px; font-weight: 600; transition: max-width .45s var(--ease); }
.fab-wa:hover, .fab-wa:focus-visible { gap: 9px; background: rgba(37, 211, 102, 0.16); transform: translateY(-2px); }
.fab-wa:hover .fab-label, .fab-wa:focus-visible .fab-label { max-width: 160px; }
.modal-open .fab-wa { opacity: 0; pointer-events: none; }

/* Toast */
.toast { position: fixed; z-index: 120; left: 50%; bottom: 26px; transform: translate(-50%, 20px); padding: 11px 20px; border-radius: 14px; background: rgba(20, 22, 32, 0.96); border: 1px solid var(--border-2); font-size: 14.5px; opacity: 0; pointer-events: none; transition: opacity .35s, transform .35s var(--ease); max-width: calc(100% - 32px); text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: .08s; }
.reveal[data-delay="2"] { transition-delay: .16s; }
.reveal[data-delay="3"] { transition-delay: .24s; }
.no-js .reveal { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .svc-grid, .why-grid { grid-template-columns: repeat(2, 1fr); }
  .proj-grid { grid-template-columns: repeat(2, 1fr); }
  .support-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .menu-toggle { display: inline-flex; }
  .header-actions .btn { display: none; }
  .nav {
    position: fixed; top: calc(var(--header-h) + 6px); inset-inline: 12px;
    flex-direction: column; align-items: stretch; gap: 2px; padding: 10px;
    background: rgba(14, 15, 22, 0.97); border: 1px solid var(--border); border-radius: 18px;
    -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px);
    opacity: 0; visibility: hidden; transform: translateY(-8px); pointer-events: none;
    transition: opacity .3s var(--ease), transform .3s var(--ease), visibility .3s;
  }
  .menu-open .nav { opacity: 1; visibility: visible; transform: none; pointer-events: auto; }
  .nav a { padding: 13px 16px; font-size: 16px; border-radius: 12px; }
  .nav .nav-cta { display: block; margin-top: 6px; text-align: center; background: var(--grad); color: #fff; font-weight: 600; }
  .svc-detail-grid, .offer { grid-template-columns: 1fr; }
  .modal-cols { grid-template-columns: 1fr; gap: 18px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > :first-child { grid-column: 1 / -1; }
}
@media (min-width: 861px) { .nav .nav-cta { display: none; } }
@media (max-width: 640px) {
  :root { --header-h: 62px; }
  .container { padding-inline: 16px; }
  .brand img { height: 34px; }
  .hero { min-height: auto; padding-top: calc(var(--header-h) + 56px); padding-bottom: 130px; }
  .hero-actions .btn { flex: 1 1 100%; }
  .svc-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .svc { padding: 18px 16px; }
  .svc p { display: none; }
  .proj-grid, .why-grid, .grid-2, .sidebar, .checks, .offer-steps { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .modal { padding: 0; align-items: flex-end; }
  .modal-dialog { max-height: 92svh; border-radius: 22px 22px 0 0; }
  .gallery .media { border-radius: 22px 22px 0 0; }
  .cta-band .actions, .cta-band .actions .btn, .offer .actions .btn { width: 100%; }
  .form-submit .btn { width: 100%; }
  .fab-wa { left: 14px; height: 50px; padding: 0 13px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
  .success-ico svg path { stroke-dashoffset: 0; }
}
