/* =========================================================
   المشروع الوطني للأتمتة والجباية الإلكترونية — Stylesheet
   Palette derived from the project logo (blue + lime) and
   Al Janoob Islamic Bank navy for the sponsor block.
   ========================================================= */

:root {
  /* Brand */
  --blue-900: #0d3f63;
  --blue-800: #114f7c;
  --blue-700: #15619a;
  --blue-600: #1a72b3;
  --blue-500: #2484c1;
  --blue-200: #bcd9ee;
  --blue-100: #e1eff9;
  --blue-50: #f1f7fc;

  --lime-700: #7d951f;
  --lime-600: #93ad2a;
  --lime-500: #b3ce49;
  --lime-200: #dfe9ac;
  --lime-100: #eff4d8;

  --jib: #004088;

  /* Neutrals */
  --ink: #0f2233;
  --ink-2: #27394b;
  --muted: #5a6b7c;
  --muted-2: #8695a5;
  --line: #dde5ec;
  --line-2: #eaf0f5;
  --bg: #ffffff;
  --bg-alt: #f5f8fb;
  --sand: #f8f6f0;

  /* Type */
  --font: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, Arial, sans-serif;
  --fs-xs: 0.8125rem;
  --fs-sm: 0.9375rem;
  --fs-md: 1.0625rem;
  --fs-lg: 1.25rem;
  --fs-xl: 1.5rem;
  --fs-2xl: clamp(1.75rem, 1.2rem + 2vw, 2.5rem);
  --fs-hero: clamp(2rem, 1.1rem + 4vw, 3.75rem);

  /* Layout */
  --container: 1200px;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --section-y: clamp(3.5rem, 8vw, 6.5rem);
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --shadow-sm: 0 1px 2px rgb(15 34 51 / 0.06), 0 1px 3px rgb(15 34 51 / 0.05);
  --shadow-md: 0 6px 20px -8px rgb(15 34 51 / 0.18);
  --header-h: 76px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  /* اتجاه التدرجات: من حافة البداية (يمين في RTL، يسار في LTR) */
  --grad-dir: to left;
  --flip: 1;
}
[dir="ltr"] { --grad-dir: to right; --flip: -1; }

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--fs-md);
  line-height: 1.75;
  color: var(--ink);
  background: var(--bg);
  overflow-x: hidden;
}
img, picture, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3, h4 { line-height: 1.3; font-weight: 700; letter-spacing: -0.005em; }
input, select, textarea { font: inherit; }
:focus-visible { outline: 3px solid var(--lime-500); outline-offset: 2px; border-radius: var(--r-sm); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; inset-inline-start: 1rem; top: -100px; z-index: 200;
  padding: 0.6rem 1rem; background: var(--ink); color: #fff; border-radius: var(--r-sm);
  transition: top 0.2s;
}
.skip-link:focus { top: 1rem; }

.container { width: min(100% - 2 * var(--gutter), var(--container)); margin-inline: auto; }
.section { padding-block: var(--section-y); }
.section--alt { background: var(--bg-alt); }
.section--sand { background: var(--sand); }

/* <picture> must take the frame's size, otherwise img height:100% resolves to auto and leaves a gap */
.hero__media picture, .page-hero__media picture, .band__media picture,
.frame > picture, .gallery figure > picture, .faq__media > picture { display: block; width: 100%; height: 100%; }

/* ---------- Typography helpers ---------- */
.kicker {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: var(--fs-xs); font-weight: 600; color: var(--blue-700);
  letter-spacing: 0.02em;
}
.kicker::before { content: ""; width: 22px; height: 3px; background: var(--lime-500); border-radius: 2px; }
.section-head { max-width: 720px; margin-bottom: clamp(2rem, 4vw, 3rem); }
.section-head h2 { font-size: var(--fs-2xl); margin-top: 0.75rem; color: var(--ink); }
.section-head p { margin-top: 0.85rem; color: var(--muted); font-size: var(--fs-md); }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head--center .kicker { justify-content: center; }
.lead { font-size: var(--fs-lg); color: var(--ink-2); }
.num { font-variant-numeric: tabular-nums lining-nums; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 48px; padding: 0.7rem 1.4rem; border-radius: var(--r-md);
  font-weight: 600; font-size: var(--fs-sm); line-height: 1.2;
  border: 1.5px solid transparent; transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.2s var(--ease);
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn--primary { background: var(--blue-600); color: #fff; }
.btn--primary:hover { background: var(--blue-700); }
.btn--lime { background: var(--lime-500); color: var(--ink); }
.btn--lime:hover { background: var(--lime-600); }
.btn--ghost { background: rgb(255 255 255 / 0.1); color: #fff; border-color: rgb(255 255 255 / 0.45); backdrop-filter: blur(6px); }
.btn--ghost:hover { background: rgb(255 255 255 / 0.2); border-color: #fff; }
.btn--outline { background: transparent; color: var(--blue-700); border-color: var(--blue-200); }
.btn--outline:hover { background: var(--blue-50); border-color: var(--blue-500); }
.btn--sm { min-height: 40px; padding: 0.45rem 1rem; }

/* ---------- Header ---------- */
.header {
  position: fixed; inset-inline: 0; top: 0; z-index: 100;
  height: var(--header-h);
  transition: background 0.3s, box-shadow 0.3s, border-color 0.3s;
  border-bottom: 1px solid transparent;
}
.header__inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.brand { display: flex; align-items: center; gap: 0.75rem; flex: none; }
.brand__logo { height: 48px; width: auto; transition: filter 0.3s; }
.header--transparent .brand__logo { filter: brightness(0) invert(1); }

.nav { display: flex; align-items: center; gap: 0.25rem; }
.nav a {
  padding: 0.5rem 0.8rem; border-radius: var(--r-sm); font-size: var(--fs-sm); font-weight: 500;
  color: var(--ink-2); transition: color 0.2s, background 0.2s;
}
.nav a:hover { color: var(--blue-700); background: var(--blue-50); }
.nav a[aria-current="true"] { color: var(--blue-700); font-weight: 600; }
.header--transparent .nav a { color: rgb(255 255 255 / 0.9); }
.header--transparent .nav a:hover, .header--transparent .nav a[aria-current="true"] { color: #fff; background: rgb(255 255 255 / 0.12); }

.header--solid { background: rgb(255 255 255 / 0.92); backdrop-filter: saturate(160%) blur(10px); border-color: var(--line); box-shadow: 0 1px 0 rgb(15 34 51 / 0.03); }
.header__cta { flex: none; }
.header--transparent .header__cta .btn--primary { background: var(--lime-500); color: var(--ink); }
.header--transparent .header__cta .btn--primary:hover { background: var(--lime-600); }

.menu-btn {
  display: none; width: 44px; height: 44px; border-radius: var(--r-sm);
  align-items: center; justify-content: center; color: var(--ink);
}
.menu-btn svg { width: 26px; height: 26px; }
.header--transparent .menu-btn { color: #fff; }

/* Mobile drawer */
.drawer { position: fixed; inset: 0; z-index: 150; display: none; }
.drawer[data-open="true"] { display: block; }
.drawer__backdrop { position: absolute; inset: 0; background: rgb(15 34 51 / 0.55); }
.drawer__panel {
  position: absolute; top: 0; bottom: 0; inset-inline-end: 0; width: min(88vw, 360px);
  background: #fff; padding: 1.25rem; display: flex; flex-direction: column; gap: 1rem;
  box-shadow: -8px 0 30px rgb(0 0 0 / 0.15); overflow-y: auto;
  animation: slideIn 0.3s var(--ease);
}
@keyframes slideIn { from { transform: translateX(-100%); } to { transform: none; } }
@keyframes slideInLtr { from { transform: translateX(100%); } to { transform: none; } }
[dir="ltr"] .drawer__panel { animation-name: slideInLtr; }
.drawer__head { display: flex; align-items: center; justify-content: space-between; }
.drawer__head img { height: 44px; width: auto; flex: none; }
.drawer__close { flex: none; width: 44px; height: 44px; display: grid; place-items: center; border-radius: var(--r-sm); background: var(--bg-alt); }
.drawer__close svg { flex: none; }
.drawer__close svg { width: 24px; height: 24px; }
.drawer__nav a { display: block; padding: 0.85rem 0.75rem; border-radius: var(--r-sm); font-weight: 500; border-bottom: 1px solid var(--line-2); }
.drawer__nav a:hover { background: var(--blue-50); color: var(--blue-700); }
.drawer__foot { margin-top: auto; display: grid; gap: 0.75rem; }
.drawer__foot .btn { width: 100%; }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100svh; display: flex; align-items: flex-end;
  color: #fff; isolation: isolate; overflow: hidden;
}
.hero__media { position: absolute; inset: 0; z-index: -2; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; object-position: center 40%; transform: scale(1.02); }
.hero__overlay {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(to top, rgb(9 33 53 / 0.94) 0%, rgb(9 33 53 / 0.72) 38%, rgb(9 33 53 / 0.35) 70%, rgb(9 33 53 / 0.25) 100%),
    linear-gradient(var(--grad-dir), rgb(9 33 53 / 0.6), rgb(9 33 53 / 0.15) 60%, transparent);
}
.hero__inner { padding-block: calc(var(--header-h) + 3rem) 4.25rem; flex: none; }
/* الهيرو بعمودين: النص يميناً والجهاز يساراً (في RTL العمود الأول هو الأيمن، وترتيب DOM هو النص ثم الجهاز) */
.hero__grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); align-items: center; gap: clamp(1.5rem, 4vw, 4rem); }
.hero__grid--solo { grid-template-columns: 1fr; }
.hero__content { min-width: 0; }
.hero__device { position: relative; display: grid; place-items: center; isolation: isolate; }
.hero__device::before {
  content: ""; position: absolute; z-index: -1; inset: 8% 6%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgb(174 200 63 / 0.28), rgb(32 128 192 / 0.22) 55%, transparent 75%);
  filter: blur(28px);
}
.hero__device::after {
  content: ""; position: absolute; z-index: -1; left: 18%; right: 18%; bottom: 2%; height: 9%;
  border-radius: 50%; background: rgb(0 0 0 / 0.45); filter: blur(18px);
}
.hero__device img {
  width: min(100%, 540px); max-height: 58svh; object-fit: contain;
  filter: drop-shadow(0 28px 36px rgb(0 0 0 / 0.45));
  animation: heroFloat 7s ease-in-out infinite;
}
@keyframes heroFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
.hero__grid:not(.hero__grid--solo) + .hero__stats { margin-top: clamp(1.5rem, 3.5vw, 2.75rem); }

.hero__badge {
  /* النقطة والنص في صف واحد دائماً؛ النص وحده يلتف داخل عموده، فلا تنفصل النقطة إلى سطر مستقل */
  display: inline-flex; align-items: flex-start; gap: 0.6rem; flex-wrap: nowrap; max-width: min(100%, 46rem);
  padding-block: 0.5rem; padding-inline: 0.8rem 1.1rem; border-radius: 1.1rem;
  background: rgb(255 255 255 / 0.12); border: 1px solid rgb(255 255 255 / 0.25);
  font-size: var(--fs-xs); font-weight: 500; line-height: 1.55; backdrop-filter: blur(8px);
}
.hero__badge .dot { flex: none; width: 8px; height: 8px; margin-top: 0.5em; border-radius: 50%; background: var(--lime-500); box-shadow: 0 0 0 4px rgb(174 200 63 / 0.25); }
.hero__badge-text { min-width: 0; text-wrap: balance; }
.hero h1 { font-size: var(--fs-hero); margin-top: 1.25rem; max-width: 16ch; line-height: 1.2; text-wrap: balance; }
.hero h1 em { font-style: normal; color: var(--lime-500); }
.hero__lead { margin-top: 1.25rem; max-width: 60ch; font-size: clamp(1rem, 0.9rem + 0.5vw, 1.25rem); color: rgb(255 255 255 / 0.88); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }

.hero__stats {
  margin-top: clamp(2.5rem, 6vw, 4rem);
  display: grid; grid-template-columns: repeat(var(--stats, 4), 1fr);
  border-top: 1px solid rgb(255 255 255 / 0.2);
}
.stat { padding: 1.25rem 1rem 0.25rem; border-inline-start: 1px solid rgb(255 255 255 / 0.15); }
.stat:first-child { border-inline-start: 0; padding-inline-start: 0; }
.stat__value { font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2.25rem); font-weight: 700; line-height: 1.1; }
.stat__value small { font-size: 0.5em; font-weight: 600; color: var(--lime-500); margin-inline-start: 0.25rem; }
.stat__label { margin-top: 0.35rem; font-size: var(--fs-xs); color: rgb(255 255 255 / 0.75); }

.hero__scroll {
  position: absolute; bottom: 1.25rem; inset-inline-start: 50%; transform: translateX(calc(50% * var(--flip)));
  color: rgb(255 255 255 / 0.7); font-size: var(--fs-xs); display: grid; justify-items: center; gap: 0.25rem;
}
.hero__scroll svg { width: 18px; height: 18px; animation: bob 1.8s infinite var(--ease); }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(6px); } }

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.about__text p + p { margin-top: 1rem; color: var(--muted); }
.about__media { position: relative; }
.about__media .frame { border-radius: var(--r-lg); overflow: hidden; aspect-ratio: 4 / 4.6; box-shadow: var(--shadow-md); }
.about__media .frame img { width: 100%; height: 100%; object-fit: cover; }
.about__media .float {
  position: absolute; bottom: -1.25rem; inset-inline-start: -1.25rem;
  background: #fff; border-radius: var(--r-md); padding: 1rem 1.15rem; box-shadow: var(--shadow-md);
  display: flex; align-items: center; gap: 0.85rem; max-width: 300px; border: 1px solid var(--line-2);
}
.about__media .float .ico { width: 44px; height: 44px; border-radius: var(--r-sm); background: var(--lime-100); color: var(--lime-700); display: grid; place-items: center; flex: none; }
.about__media .float .ico svg { width: 24px; height: 24px; }
.about__media .float strong { display: block; font-size: var(--fs-sm); }
.about__media .float span { font-size: var(--fs-xs); color: var(--muted); }

.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 2rem; }
.pillar { padding: 1.1rem 1rem; border: 1px solid var(--line); border-radius: var(--r-md); background: #fff; }
.pillar .ico { width: 40px; height: 40px; border-radius: var(--r-sm); background: var(--blue-50); color: var(--blue-600); display: grid; place-items: center; margin-bottom: 0.75rem; }
.pillar .ico svg { width: 22px; height: 22px; }
.pillar h3 { font-size: var(--fs-md); }
.pillar p { font-size: var(--fs-sm); color: var(--muted); margin-top: 0.3rem; }

/* ---------- Benefits ---------- */
.benefits { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.benefit-list { display: grid; gap: 0.75rem; }
.benefit {
  display: grid; grid-template-columns: 52px 1fr; gap: 1rem; padding: 1.1rem 1.15rem;
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-md);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.3s var(--ease);
}
.benefit:hover { border-color: var(--blue-200); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.benefit .ico { width: 52px; height: 52px; border-radius: var(--r-md); background: var(--blue-50); color: var(--blue-600); display: grid; place-items: center; }
.benefit .ico svg { width: 26px; height: 26px; }
.benefit h3 { font-size: var(--fs-md); }
.benefit p { font-size: var(--fs-sm); color: var(--muted); margin-top: 0.25rem; }
.benefit .tags { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.6rem; }
.tag { font-size: var(--fs-xs); font-weight: 600; padding: 0.15rem 0.55rem; border-radius: 999px; background: var(--lime-100); color: var(--lime-700); }
.tag--blue { background: var(--blue-100); color: var(--blue-800); }

.benefits__media { position: sticky; top: calc(var(--header-h) + 1.5rem); display: grid; gap: 1rem; }
.benefits__media .frame { border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-md); }
.benefits__media .frame { aspect-ratio: 1; }
.benefits__media .frame img { width: 100%; height: 100%; object-fit: cover; }
.callout {
  background: var(--blue-800); color: #fff; border-radius: var(--r-md); padding: 1.25rem 1.35rem;
  display: grid; gap: 0.35rem;
  background-image: radial-gradient(circle at 100% 0%, rgb(174 200 63 / 0.25), transparent 40%);
}
.callout strong { font-size: var(--fs-lg); }
.callout span { font-size: var(--fs-sm); color: rgb(255 255 255 / 0.8); }

/* ---------- Pricing ---------- */
.pricing { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); }
.card__head { padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--line-2); display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.card__head h3 { font-size: var(--fs-lg); }
.card__head .note { font-size: var(--fs-xs); color: var(--muted); }
.card__body { padding: 1.5rem; }

.slabs { display: grid; gap: 0.6rem; }
.slab { display: grid; grid-template-columns: 9.5rem 1fr 5.5rem; align-items: center; gap: 0.75rem; font-size: var(--fs-sm); }
.slab__label { color: var(--ink-2); font-weight: 500; }
.slab__bar { height: 12px; border-radius: 999px; background: var(--line-2); overflow: hidden; }
.slab__bar i { display: block; height: 100%; width: var(--w); border-radius: inherit; background: linear-gradient(var(--grad-dir), var(--blue-500), var(--blue-700)); transform: scaleX(0); transform-origin: right; transition: transform 0.9s var(--ease); }
.is-in .slab__bar i { transform: scaleX(1); }
.slab--top .slab__bar i { background: linear-gradient(var(--grad-dir), var(--lime-500), var(--lime-600)); }
.slab__price { font-weight: 700; text-align: start; }
.slab__price small { font-weight: 500; color: var(--muted); }
.slabs-note { margin-top: 1rem; font-size: var(--fs-xs); color: var(--muted); display: flex; gap: 0.4rem; align-items: center; }
.slabs-note svg { width: 16px; height: 16px; color: var(--blue-600); flex: none; }

.calc { margin-top: 1.5rem; border-top: 1px dashed var(--line); padding-top: 1.5rem; }
.calc h4 { font-size: var(--fs-md); margin-bottom: 0.25rem; }
.calc > p { font-size: var(--fs-sm); color: var(--muted); margin-bottom: 1rem; }
.calc__row { display: grid; grid-template-columns: 1fr auto; gap: 1rem; align-items: end; }
.field label { display: block; font-size: var(--fs-sm); font-weight: 600; margin-bottom: 0.4rem; }
.field .hint { font-size: var(--fs-xs); color: var(--muted); margin-top: 0.35rem; }
.input {
  width: 100%; min-height: 48px; padding: 0.6rem 0.9rem; border: 1.5px solid var(--line); border-radius: var(--r-md);
  background: #fff; color: var(--ink); transition: border-color 0.2s, box-shadow 0.2s;
}
.input:focus { outline: none; border-color: var(--blue-500); box-shadow: 0 0 0 4px var(--blue-100); }
.calc__result {
  margin-top: 1rem; padding: 1rem 1.15rem; border-radius: var(--r-md); background: var(--blue-50);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
}
.calc__result .total { font-size: var(--fs-xl); font-weight: 700; color: var(--blue-800); }
.calc__result .total small { font-size: 0.55em; font-weight: 600; margin-inline-start: 0.25rem; }
.calc__result .breakdown { font-size: var(--fs-xs); color: var(--muted); }

.plan { position: sticky; top: calc(var(--header-h) + 1.5rem); }
.plan .card__body { display: grid; gap: 1.25rem; }
.price-big { display: flex; align-items: baseline; gap: 0.4rem; }
.price-big .v { font-size: 2.75rem; font-weight: 700; color: var(--ink); line-height: 1; }
.price-big .u { font-weight: 600; color: var(--muted); }
.price-sub { font-size: var(--fs-sm); color: var(--muted); margin-top: 0.25rem; }
.plan__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.plan__box { border: 1px solid var(--line); border-radius: var(--r-md); padding: 0.9rem 1rem; }
.plan__box .l { font-size: var(--fs-xs); color: var(--muted); }
.plan__box .v { font-size: var(--fs-xl); font-weight: 700; color: var(--blue-700); line-height: 1.2; }
.plan__box .v small { font-size: 0.55em; font-weight: 600; }
.check-list { display: grid; gap: 0.6rem; }
.check-list li { display: flex; gap: 0.6rem; align-items: flex-start; font-size: var(--fs-sm); color: var(--ink-2); }
.check-list svg { width: 20px; height: 20px; color: var(--lime-600); flex: none; margin-top: 0.15rem; }
.plan__segments { border-top: 1px solid var(--line-2); padding-top: 1rem; }
.plan__segments h4 { font-size: var(--fs-sm); margin-bottom: 0.5rem; }
.plan__segments p { font-size: var(--fs-sm); color: var(--muted); }
.plan__segments .tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.6rem; }

/* ---------- Steps / Installation ---------- */
.install { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.install__media { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.install__media .frame { border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-md); }
.install__media .frame img { width: 100%; height: 100%; object-fit: cover; }
.install__media .frame--tall { grid-row: span 2; aspect-ratio: 3 / 4.6; }
.install__media .frame--sq { aspect-ratio: 1; }
.install__media .frame--stat {
  background: var(--lime-500); color: var(--ink); padding: 1.25rem; display: grid; align-content: end; gap: 0.25rem; aspect-ratio: 1; box-shadow: none;
}
.install__media .frame--stat strong { font-size: 2rem; line-height: 1; }
.install__media .frame--stat span { font-size: var(--fs-xs); font-weight: 600; }

.steps { display: grid; gap: 0; position: relative; }
.step { display: grid; grid-template-columns: 56px 1fr; gap: 1.1rem; position: relative; padding-bottom: 1.75rem; }
.step:last-child { padding-bottom: 0; }
.step::before {
  content: ""; position: absolute; top: 56px; bottom: 0; inset-inline-start: 27px; width: 2px;
  background: linear-gradient(var(--blue-200), var(--line-2));
}
.step:last-child::before { display: none; }
.step__n {
  width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center;
  background: #fff; border: 2px solid var(--blue-200); color: var(--blue-700); font-weight: 700; font-size: var(--fs-lg);
  position: relative; z-index: 1;
}
.step:first-child .step__n { background: var(--blue-600); border-color: var(--blue-600); color: #fff; }
.step h3 { font-size: var(--fs-lg); }
.step p { color: var(--muted); font-size: var(--fs-sm); margin-top: 0.3rem; }

/* ---------- Billing band ---------- */
.band { position: relative; color: #fff; isolation: isolate; overflow: hidden; min-height: 100vh; min-height: 100svh; display: flex; align-items: center; }
.band__media { position: absolute; inset: 0; z-index: -2; }
.band__media img { width: 100%; height: 100%; object-fit: cover; object-position: center 35%; }
.band__overlay { position: absolute; inset: 0; z-index: -1; background: linear-gradient(var(--grad-dir), rgb(11 45 72 / 0.95) 0%, rgb(11 45 72 / 0.82) 45%, rgb(11 45 72 / 0.5) 100%), linear-gradient(to top, rgb(9 33 53 / 0.55), transparent 35%, transparent 70%, rgb(9 33 53 / 0.45)); }
.band__inner { flex: none; display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; padding-block: var(--section-y); }
.band .kicker { color: var(--lime-500); }
.band .kicker::before { background: var(--lime-500); }
.band h2 { font-size: var(--fs-2xl); margin-top: 0.75rem; }
.band .lead { color: rgb(255 255 255 / 0.85); margin-top: 1rem; font-size: var(--fs-md); }
.flow { display: grid; gap: 0.75rem; margin-top: 1.75rem; }
.flow__item {
  display: grid; grid-template-columns: 48px 1fr; gap: 1rem; align-items: center;
  background: rgb(255 255 255 / 0.08); border: 1px solid rgb(255 255 255 / 0.15); border-radius: var(--r-md); padding: 0.9rem 1rem;
  backdrop-filter: blur(6px);
}
.flow__item .ico { width: 48px; height: 48px; border-radius: var(--r-sm); background: rgb(174 200 63 / 0.18); color: var(--lime-500); display: grid; place-items: center; }
.flow__item .ico svg { width: 24px; height: 24px; }
.flow__item strong { display: block; font-size: var(--fs-md); }
.flow__item span { font-size: var(--fs-sm); color: rgb(255 255 255 / 0.78); }

.channels { background: #fff; color: var(--ink); border-radius: var(--r-lg); padding: 1.5rem; box-shadow: var(--shadow-md); }
.channels h3 { font-size: var(--fs-lg); }
.channels p { font-size: var(--fs-sm); color: var(--muted); margin-top: 0.35rem; }
.channels__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; margin-top: 1.25rem; }
.channel { border: 1px solid var(--line); border-radius: var(--r-md); padding: 1rem 0.75rem; display: grid; justify-items: center; gap: 0.5rem; text-align: center; }
.channel .ico { width: 44px; height: 44px; border-radius: var(--r-sm); background: var(--blue-50); color: var(--blue-700); display: grid; place-items: center; }
.channel .ico svg { width: 24px; height: 24px; }
.channel strong { font-size: var(--fs-sm); }
.channel span { font-size: var(--fs-xs); color: var(--muted); }
.cards-row { display: flex; gap: 0.5rem; margin-top: 1rem; align-items: center; flex-wrap: wrap; }
.cards-row .pay { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 0.25rem 0.7rem; font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.02em; direction: ltr; }
.cards-row .pay--mc { color: #c2410c; }
.cards-row .pay--visa { color: #1a1f71; }
.cards-row .lbl { font-size: var(--fs-xs); color: var(--muted); }

/* ---------- FAQ / concerns ---------- */
.faq { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; margin-top: 1.5rem; }
.compare__col { border-radius: var(--r-md); padding: 1.15rem; border: 1px solid var(--line); background: #fff; }
.compare__col--good { border-color: var(--lime-200); background: var(--lime-100); }
.compare__col h4 { font-size: var(--fs-sm); display: flex; align-items: center; gap: 0.4rem; margin-bottom: 0.6rem; }
.compare__col h4 svg { width: 18px; height: 18px; }
.compare__col--good h4 { color: var(--lime-700); }
.compare__col--bad h4 { color: var(--muted); }
.compare__col li { font-size: var(--fs-xs); color: var(--ink-2); padding: 0.25rem 0; border-bottom: 1px dashed rgb(15 34 51 / 0.08); }
.compare__col li:last-child { border: 0; }
.faq__media { margin-top: 1.5rem; border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-md); }
.faq__media { aspect-ratio: 16 / 10; }
.faq__media img { width: 100%; height: 100%; object-fit: cover; }

.acc { display: grid; gap: 0.6rem; }
.acc__item { border: 1px solid var(--line); border-radius: var(--r-md); background: #fff; overflow: hidden; transition: border-color 0.2s; }
.acc__item[data-open="true"] { border-color: var(--blue-200); }
.acc__btn {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1rem 1.15rem; text-align: start; font-weight: 600; font-size: var(--fs-md); color: var(--ink);
}
.acc__btn:hover { color: var(--blue-700); }
.acc__btn .chev { width: 32px; height: 32px; flex: none; border-radius: 50%; background: var(--blue-50); color: var(--blue-700); display: grid; place-items: center; transition: transform 0.3s var(--ease), background 0.2s; }
.acc__btn .chev svg { width: 18px; height: 18px; }
.acc__item[data-open="true"] .chev { transform: rotate(180deg); background: var(--blue-600); color: #fff; }
.acc__panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.35s var(--ease); }
.acc__item[data-open="true"] .acc__panel { grid-template-rows: 1fr; }
.acc__panel > div { overflow: hidden; }
.acc__panel p { padding: 0 1.15rem 1.15rem; color: var(--muted); font-size: var(--fs-sm); }

/* ---------- Coverage ---------- */
.coverage { display: grid; grid-template-columns: 1fr 1.4fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.gov-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.6rem; }
.gov { display: flex; align-items: center; gap: 0.5rem; padding: 0.7rem 0.85rem; background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); font-size: var(--fs-sm); font-weight: 500; }
.gov svg { width: 18px; height: 18px; color: var(--blue-600); flex: none; }
.coverage__note { margin-top: 1rem; font-size: var(--fs-xs); color: var(--muted); }

/* ---------- Gallery ---------- */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.gallery figure { margin: 0; border-radius: var(--r-md); overflow: hidden; position: relative; aspect-ratio: 4 / 3; }
.gallery figure:first-child { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease); }
.gallery figure:hover img { transform: scale(1.04); }
.gallery figcaption {
  position: absolute; inset-inline: 0; bottom: 0; padding: 2rem 1rem 0.85rem; font-size: var(--fs-xs); font-weight: 500; color: #fff;
  background: linear-gradient(to top, rgb(9 33 53 / 0.85), transparent);
}

/* ---------- Contact ---------- */
.contact { display: grid; grid-template-columns: 1fr 1.25fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.contact-cards { display: grid; gap: 0.75rem; margin-top: 1.5rem; }
.ccard { display: grid; grid-template-columns: 48px 1fr; gap: 1rem; align-items: center; padding: 1rem 1.15rem; background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); transition: border-color 0.2s, box-shadow 0.2s; }
a.ccard:hover { border-color: var(--blue-200); box-shadow: var(--shadow-md); }
.ccard .ico { width: 48px; height: 48px; border-radius: var(--r-sm); background: var(--blue-50); color: var(--blue-700); display: grid; place-items: center; }
.ccard .ico svg { width: 24px; height: 24px; }
.ccard strong { display: block; font-size: var(--fs-sm); }
.ccard span { font-size: var(--fs-xs); color: var(--muted); }
.ccard span.ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }
.ccard--247 .ico { background: var(--lime-100); color: var(--lime-700); }

.form-card { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); padding: clamp(1.25rem, 3vw, 2rem); }
.form-card h3 { font-size: var(--fs-lg); }
.form-card > p { font-size: var(--fs-sm); color: var(--muted); margin-top: 0.35rem; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1.5rem; }
.form-grid .field--full { grid-column: 1 / -1; }
.field .req { color: #c2410c; }
textarea.input { min-height: 120px; resize: vertical; }
select.input { appearance: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235a6b7c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>"); background-repeat: no-repeat; background-position: left 0.85rem center; padding-inline-start: 2.4rem; }
.form-foot { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-top: 0.25rem; }
.form-foot small { font-size: var(--fs-xs); color: var(--muted); }
.form-msg { grid-column: 1 / -1; padding: 0.8rem 1rem; border-radius: var(--r-md); font-size: var(--fs-sm); display: none; }
.form-msg[data-show="true"] { display: block; }
.form-msg--ok { background: var(--lime-100); color: var(--lime-700); }
.form-msg--err { background: #fdecec; color: #a12626; }
.field.invalid .input { border-color: #d64545; }
.field .err { display: none; font-size: var(--fs-xs); color: #a12626; margin-top: 0.3rem; }
.field.invalid .err { display: block; }

/* ---------- Province offices ---------- */
.offices__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.offices__head p { font-size: var(--fs-sm); color: var(--muted); margin-top: 0.35rem; }
.offices__filter { min-width: 260px; }
.offices__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0.75rem; }
.office { display: grid; grid-template-columns: 1fr auto; gap: 0.25rem 0.75rem; align-items: center; padding: 0.9rem 1rem; background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); transition: border-color 0.2s, box-shadow 0.2s; }
.office:hover { border-color: var(--blue-200); box-shadow: var(--shadow-md); }
.office__name { font-weight: 600; font-size: var(--fs-sm); display: flex; align-items: center; gap: 0.4rem; }
.office__name svg { width: 16px; height: 16px; color: var(--blue-600); flex: none; }
.office__tel { grid-column: 1; font-size: var(--fs-md); font-weight: 700; color: var(--blue-700); direction: ltr; unicode-bidi: isolate; text-align: end; letter-spacing: 0.02em; }
.office__tel:hover { color: var(--blue-800); text-decoration: underline; text-underline-offset: 3px; }
.office__call { grid-column: 2; grid-row: 1 / span 2; width: 42px; height: 42px; border-radius: 50%; background: var(--lime-100); color: var(--lime-700); display: grid; place-items: center; }
.office__call svg { width: 20px; height: 20px; }
.office__hours { grid-column: 1; font-size: var(--fs-xs); color: var(--muted); }
.offices__empty { padding: 1.5rem; text-align: center; color: var(--muted); font-size: var(--fs-sm); border: 1px dashed var(--line); border-radius: var(--r-md); }

/* ---------- Generic heading helper (inner pages) ---------- */
.h2 { font-size: var(--fs-2xl); margin: 0.75rem 0 1rem; }
.section-head--row { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; max-width: none; }
.section-head--row h2 { max-width: 24ch; }

/* ---------- Page hero (inner pages) ---------- */
.page-hero { position: relative; min-height: clamp(380px, 52vh, 560px); display: flex; align-items: flex-end; color: #fff; isolation: isolate; overflow: hidden; }
.page-hero__media { position: absolute; inset: 0; z-index: -2; }
.page-hero__media img { width: 100%; height: 100%; object-fit: cover; object-position: center 35%; }
.page-hero__overlay { position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, rgb(9 33 53 / 0.95) 0%, rgb(9 33 53 / 0.7) 50%, rgb(9 33 53 / 0.45) 100%); }
.page-hero__inner { padding-block: calc(var(--header-h) + 2.5rem) 2.75rem; flex: none; }
.page-hero h1 { font-size: clamp(1.75rem, 1.2rem + 2.6vw, 3rem); margin-top: 0.75rem; max-width: 22ch; line-height: 1.25; text-wrap: balance; }
.page-hero__lead { margin-top: 0.9rem; max-width: 64ch; color: rgb(255 255 255 / 0.85); font-size: clamp(1rem, 0.95rem + 0.3vw, 1.15rem); }
.kicker--light { color: var(--lime-500); }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 0.4rem; font-size: var(--fs-xs); color: rgb(255 255 255 / 0.7); margin-bottom: 1.1rem; }
.breadcrumb li + li::before { content: "/"; margin-inline-end: 0.4rem; color: rgb(255 255 255 / 0.4); }
.breadcrumb a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.breadcrumb [aria-current] { color: #fff; font-weight: 600; }

/* ---------- CTA band ---------- */
.cta { background: var(--blue-800); color: #fff; background-image: radial-gradient(circle at 100% 0%, rgb(174 200 63 / 0.22), transparent 38%), radial-gradient(circle at 0% 100%, rgb(32 128 192 / 0.35), transparent 45%); }
.cta__inner { display: flex; align-items: center; justify-content: space-between; gap: 2rem; flex-wrap: wrap; padding-block: clamp(2.5rem, 5vw, 4rem); }
.cta h2 { font-size: var(--fs-2xl); }
.cta p { margin-top: 0.5rem; color: rgb(255 255 255 / 0.8); max-width: 58ch; }
.cta__actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }

/* ---------- Prev / next page nav ---------- */
.pagenav { border-top: 1px solid var(--line); background: #fff; }
.pagenav__inner { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; padding-block: 1.5rem; }
.pagenav a { display: grid; gap: 0.15rem; padding: 1rem 1.15rem; border: 1px solid var(--line); border-radius: var(--r-md); transition: border-color 0.2s, box-shadow 0.2s; }
.pagenav a:hover { border-color: var(--blue-200); box-shadow: var(--shadow-md); }
.pagenav small { font-size: var(--fs-xs); color: var(--muted); }
.pagenav strong { color: var(--blue-700); }
.pagenav__next { text-align: end; }

/* ---------- Home teasers ---------- */
.more-link { display: inline-flex; align-items: center; gap: 0.4rem; font-weight: 600; color: var(--blue-700); margin-top: 1.25rem; }
.more-link svg { width: 18px; height: 18px; transition: transform 0.2s var(--ease); }
.more-link:hover { color: var(--blue-800); }
.more-link:hover svg { transform: translateX(calc(-4px * var(--flip))); }
.benefit-mini-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1rem; }
.benefit-mini { background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); padding: 1.25rem 1.1rem; transition: border-color 0.2s, box-shadow 0.2s, transform 0.3s var(--ease); }
.benefit-mini:hover { border-color: var(--blue-200); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.benefit-mini .ico { width: 44px; height: 44px; border-radius: var(--r-sm); background: var(--blue-50); color: var(--blue-600); display: grid; place-items: center; }
.benefit-mini .ico svg { width: 24px; height: 24px; }
.benefit-mini h3 { font-size: var(--fs-md); margin-top: 0.85rem; }
.benefit-mini p { font-size: var(--fs-sm); color: var(--muted); margin-top: 0.3rem; }
.mini-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.mini-step { padding: 1.25rem 1.1rem; background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); }
.mini-step .n { width: 40px; height: 40px; border-radius: 50%; background: var(--blue-600); color: #fff; display: grid; place-items: center; font-weight: 700; }
.mini-step h3 { font-size: var(--fs-md); margin-top: 0.85rem; }
.mini-step p { font-size: var(--fs-sm); color: var(--muted); margin-top: 0.3rem; }
.home-pricing { display: grid; grid-template-columns: 1.2fr 1fr; gap: 1.5rem; align-items: start; }

/* ---------- Inner page extras ---------- */
.pillars--lg { margin-top: 0; }
.pillars--lg .pillar { padding: 1.5rem 1.35rem; }
.pillars--lg .pillar .ico { width: 48px; height: 48px; }
.pillars--lg .pillar .ico svg { width: 26px; height: 26px; }
.pillars--lg .pillar h3 { font-size: var(--fs-lg); }
.partners-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.partner-cards { display: grid; gap: 1rem; }
.partner-card { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.5rem; display: grid; gap: 0.6rem; justify-items: start; }
.partner-card .emblem { width: 48px; height: 48px; border-radius: 50%; background: var(--blue-50); color: var(--blue-700); display: grid; place-items: center; }
.partner-card .emblem svg { width: 26px; height: 26px; }
.partner-card h3 { font-size: var(--fs-lg); }
.partner-card p { font-size: var(--fs-sm); color: var(--muted); }
.examples { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.example { background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); padding: 1.35rem 1.25rem; display: grid; gap: 0.35rem; justify-items: start; }
.example__m3 { font-size: var(--fs-lg); font-weight: 600; color: var(--muted); }
.example__m3 small { font-size: 0.7em; }
.example strong { font-size: 1.85rem; color: var(--blue-800); line-height: 1.1; }
.example strong small { font-size: 0.5em; font-weight: 600; color: var(--muted); }
.example__note { font-size: var(--fs-xs); color: var(--muted-2); direction: ltr; unicode-bidi: isolate; }
.example .tag { margin-top: 0.4rem; }
.flow--light { margin-top: 1.5rem; }
.flow--light .flow__item { background: #fff; border-color: var(--line); backdrop-filter: none; color: var(--ink); }
.flow--light .flow__item .ico { background: var(--lime-100); color: var(--lime-700); }
.flow--light .flow__item span { color: var(--muted); }
.check-list--light li { color: rgb(255 255 255 / 0.88); }
.check-list--light svg { color: var(--lime-500); }
.compare--wide { max-width: 900px; margin-inline: auto; }
.offices__head { margin-bottom: 1.5rem; }
.offices__head h2 { margin-top: 0.5rem; }

/* ---------- Custom pages (rich text) ---------- */
.prose { max-width: 820px; }
.prose > * + * { margin-top: 1rem; }
.prose h2 { font-size: var(--fs-2xl); margin-top: 2.5rem; }
.prose h3 { font-size: var(--fs-xl); margin-top: 2rem; }
.prose p, .prose li { color: var(--ink-2); }
.prose ul, .prose ol { padding-inline-start: 1.5rem; list-style: revert; }
.prose a { color: var(--blue-700); text-decoration: underline; text-underline-offset: 3px; }
.prose img { border-radius: var(--r-md); }
.prose blockquote { border-inline-start: 4px solid var(--lime-500); padding: 0.5rem 1rem; background: var(--bg-alt); border-radius: var(--r-sm); }
.btn:disabled { opacity: 0.6; cursor: progress; }

/* =========================================================
   اللغة الإنكليزية (LTR)
   معظم التخطيط يستخدم خصائص منطقية (inline-start/end) فينعكس تلقائياً.
   هنا فقط ما يحتاج معالجة صريحة.
   ========================================================= */
/* transform-origin لا يقبل قيماً منطقية في كل المتصفحات */
.slab__bar i { transform-origin: right; }
[dir="ltr"] .slab__bar i { transform-origin: left; }

/* الخط اللاتيني */
[lang="en"] body { font-family: "IBM Plex Sans", "Segoe UI", system-ui, -apple-system, Arial, sans-serif; line-height: 1.65; }
[lang="en"] h1, [lang="en"] h2, [lang="en"] h3, [lang="en"] h4 { letter-spacing: -0.015em; line-height: 1.2; }
[lang="en"] .kicker { letter-spacing: 0.08em; text-transform: uppercase; font-size: 0.75rem; }
[lang="en"] .sidebar-group-label { letter-spacing: 0.06em; }

/* العنوان الإنكليزي أطول من العربي */
[lang="en"] .hero h1 { max-width: 20ch; font-size: clamp(1.9rem, 1rem + 3.3vw, 3.35rem); }
[lang="en"] .page-hero h1 { max-width: 26ch; }
[lang="en"] .section-head--row h2 { max-width: 28ch; }
[lang="en"] .nav a { font-size: 0.9rem; }
/* كتابة الشعار الإنكليزي أصغر من العربي، فنكبّره قليلاً ليبقى مقروءاً */
[lang="en"] .brand__logo { height: 54px; }
[lang="en"] .footer__brand img { height: 62px; }
@media (max-width: 960px) { [lang="en"] .brand__logo { height: 46px; } }

/* السهم "إلى الأمام": يسار في العربية، يمين في الإنكليزية */
[dir="ltr"] .icon--arrow { transform: scaleX(-1); }
[dir="ltr"] .more-link:hover .icon--arrow { transform: scaleX(-1) translateX(-4px); }

/* سهم القوائم المنسدلة في حافة النهاية */
[dir="ltr"] select.input { background-position: right 0.85rem center; padding-inline-start: 0.9rem; padding-inline-end: 2.4rem; }

/* حقول الأرقام والبريد: اتجاهها LTR دائماً؛ في العربية تُحاذى لحافة البداية (اليمين) */
.input--ltr { direction: ltr; }
[dir="rtl"] .input--ltr { text-align: right; }

/* مبدّل اللغة */
.header__cta { display: flex; align-items: center; gap: 0.6rem; }
.lang-switch {
  display: inline-flex; align-items: center; gap: 0.4rem; min-height: 40px; padding: 0.4rem 0.75rem;
  border-radius: var(--r-md); border: 1.5px solid var(--line); color: var(--ink-2);
  font-size: var(--fs-sm); font-weight: 600; line-height: 1; transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.lang-switch svg { width: 17px; height: 17px; }
.lang-switch:hover { background: var(--blue-50); border-color: var(--blue-200); color: var(--blue-700); }
.header--transparent .lang-switch { color: #fff; border-color: rgb(255 255 255 / 0.4); }
.header--transparent .lang-switch:hover { background: rgb(255 255 255 / 0.14); border-color: #fff; color: #fff; }
.lang-switch[lang="ar"] span { font-family: "IBM Plex Sans Arabic", Tahoma, sans-serif; }
.lang-switch[lang="en"] span { font-family: "IBM Plex Sans", "Segoe UI", sans-serif; }
.drawer__foot .btn svg { width: 18px; height: 18px; }

/* ---------- Footer ---------- */
.footer { background: var(--ink); color: rgb(255 255 255 / 0.85); }
.footer__sponsor { border-bottom: 1px solid rgb(255 255 255 / 0.1); background: #0b1a29; }
.footer__sponsor-inner {
  /* عمودان ثابتان: الداعم يأخذ المساحة المتبقية ونصه يلتف داخل عموده، والجهة المنفذة بعرض محدد.
     بهذا لا ينزل أحدهما تحت الآخر مهما طال النص (كما في الإنكليزية). */
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 21rem); align-items: center;
  gap: clamp(1.5rem, 3vw, 3rem); padding-block: 1.9rem;
}
.sponsor { display: flex; align-items: center; gap: 1.75rem; flex-wrap: nowrap; min-width: 0; }
.sponsor__label { min-width: 0; text-wrap: pretty; }
.sponsor__logo + .sponsor__label { border-inline-start: 1px solid rgb(255 255 255 / 0.18); padding-inline-start: 1.75rem; }
.sponsor__label { font-size: var(--fs-sm); color: rgb(255 255 255 / 0.7); }
.sponsor__label strong { display: block; color: #fff; font-size: var(--fs-lg); }
.sponsor__logo { display: inline-flex; flex: none; }
.sponsor__logo img { height: 54px; width: auto; filter: brightness(0) invert(1); opacity: 0.95; }
.footer__ministry {
  font-size: var(--fs-sm); color: rgb(255 255 255 / 0.7); text-align: start; text-wrap: pretty;
  border-inline-start: 1px solid rgb(255 255 255 / 0.18); padding-inline-start: clamp(1.5rem, 3vw, 3rem);
}
.footer__ministry strong { color: #fff; display: block; margin-bottom: 0.2rem; line-height: 1.45; }

.footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 2rem; padding-block: 3rem; }
.footer__brand img { height: 56px; width: auto; filter: brightness(0) invert(1); }
.footer__brand p { margin-top: 1rem; font-size: var(--fs-sm); color: rgb(255 255 255 / 0.7); max-width: 40ch; }
.footer h4 { color: #fff; font-size: var(--fs-sm); margin-bottom: 0.9rem; }
.footer__links li + li { margin-top: 0.5rem; }
.footer__links a { font-size: var(--fs-sm); color: rgb(255 255 255 / 0.7); transition: color 0.2s; }
.footer__links a:hover { color: var(--lime-500); }
.footer__contact li { font-size: var(--fs-sm); color: rgb(255 255 255 / 0.7); display: flex; gap: 0.5rem; align-items: flex-start; }
.footer__contact li + li { margin-top: 0.5rem; }
.footer__contact svg { width: 18px; height: 18px; flex: none; margin-top: 0.3rem; color: var(--lime-500); }
.footer__contact a:hover { color: #fff; }
.footer__bottom { border-top: 1px solid rgb(255 255 255 / 0.1); padding-block: 1.25rem; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: var(--fs-xs); color: rgb(255 255 255 / 0.55); }

/* ---------- Back to top ---------- */
.to-top {
  position: fixed; bottom: 1.25rem; inset-inline-start: 1.25rem; z-index: 90;
  width: 46px; height: 46px; border-radius: 50%; background: var(--blue-600); color: #fff; display: grid; place-items: center;
  box-shadow: var(--shadow-md); opacity: 0; pointer-events: none; transform: translateY(10px); transition: opacity 0.3s, transform 0.3s var(--ease);
}
.to-top[data-show="true"] { opacity: 1; pointer-events: auto; transform: none; }
.to-top svg { width: 22px; height: 22px; }

/* ---------- Reveal animations ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: 0.1s; }
.reveal[data-delay="2"] { transition-delay: 0.2s; }
.reveal[data-delay="3"] { transition-delay: 0.3s; }
.reveal[data-delay="4"] { transition-delay: 0.4s; }

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

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1240px) {
  .nav a { padding: 0.5rem 0.55rem; font-size: 0.875rem; }
  .header__inner { gap: 1rem; }
}

@media (max-width: 1100px) {
  .footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 1080px) {
  .nav, .header__cta { display: none; }
  .menu-btn { display: inline-flex; }
}

@media (max-width: 960px) {
  :root { --header-h: 68px; }
  .brand__logo { height: 42px; }

  .about, .benefits, .pricing, .install, .band__inner, .faq, .coverage, .contact, .partners-grid, .home-pricing { grid-template-columns: 1fr; }
  .benefit-mini-grid { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
  .mini-steps, .examples { grid-template-columns: 1fr 1fr; }
  .about__media { order: -1; max-width: 560px; }
  .about__media .frame { aspect-ratio: 4 / 3; }
  .benefits__media, .plan { position: static; }
  .benefits__media { grid-template-columns: 1fr 1fr; align-items: stretch; }
  .install__media { max-width: 600px; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .gallery figure:first-child { grid-column: span 2; grid-row: span 1; aspect-ratio: 16 / 9; }
  .hero__grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .hero__device { justify-self: center; }
  .hero__device img { width: min(70vw, 340px); max-height: 38svh; }
  .hero__stats { grid-template-columns: repeat(2, 1fr); gap: 0.5rem 0; }
  .stat:nth-child(odd) { border-inline-start: 0; padding-inline-start: 0; }
  .footer__sponsor-inner { grid-template-columns: 1fr; gap: 1.4rem; }
  .footer__ministry { border-inline-start: 0; padding-inline-start: 0; border-top: 1px solid rgb(255 255 255 / 0.12); padding-top: 1.4rem; }
}

@media (max-width: 640px) {
  .hero { min-height: 92svh; }
  .hero__inner { padding-bottom: 3.5rem; }
  .hero h1 { max-width: none; }
  .hero__actions .btn { flex: 1 1 100%; }
  .hero__scroll { display: none; }
  .hero__device img { width: min(62vw, 260px); max-height: 32svh; }
  .pillars { grid-template-columns: 1fr; }
  .benefits__media { grid-template-columns: 1fr; }
  .benefit { grid-template-columns: 44px 1fr; }
  .benefit .ico { width: 44px; height: 44px; }
  .slab { grid-template-columns: 1fr auto; grid-template-areas: "label price" "bar bar"; gap: 0.35rem 0.75rem; padding-block: 0.35rem; border-bottom: 1px dashed var(--line-2); }
  .slab:last-child { border-bottom: 0; }
  .slab__label { grid-area: label; }
  .slab__price { grid-area: price; }
  .slab__bar { grid-area: bar; height: 10px; }
  .calc__row { grid-template-columns: 1fr; }
  .calc__row .btn { width: 100%; }
  .plan__grid { grid-template-columns: 1fr; }
  .install__media .frame--tall { aspect-ratio: 3 / 4; }
  .channels__grid { grid-template-columns: 1fr; }
  .channel { grid-template-columns: 44px 1fr; justify-items: start; text-align: start; gap: 0.15rem 0.75rem; }
  .channel .ico { grid-row: span 2; }
  .compare { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr; }
  .gallery figure:first-child { grid-column: auto; }
  .form-grid { grid-template-columns: 1fr; }
  .mini-steps, .examples, .pagenav__inner { grid-template-columns: 1fr; }
  .pagenav__next { text-align: start; }
  .cta__actions .btn { flex: 1 1 100%; }
  .page-hero { min-height: 340px; }
  .footer__grid { grid-template-columns: 1fr; gap: 1.75rem; }
  .footer__sponsor-inner { justify-items: center; text-align: center; }
  .sponsor { flex-direction: column; gap: 1rem; }
  .sponsor__logo + .sponsor__label { border-inline-start: 0; padding-inline-start: 0; }
  .sponsor__logo img { height: 46px; }
  .footer__ministry { text-align: center; }
  .about__media .float { position: static; margin-top: 1rem; max-width: none; }
  .drawer__panel { width: 100vw; }
}

@media (max-width: 380px) {
  .install__media { grid-template-columns: 1fr; }
  .install__media .frame--tall { grid-row: auto; aspect-ratio: 4 / 3; }
  .install__media .frame--stat { aspect-ratio: auto; }
}

@media print {
  .header, .drawer, .to-top, .hero__scroll, .form-card { display: none !important; }
  .hero { min-height: auto; color: #000; }
  .hero__media, .hero__overlay { display: none; }
  .band { color: #000; }
  .band__media, .band__overlay { display: none; }
}
