/* ============================================================
   RTL + Arabic typography
   Scoped to [dir="rtl"] so it only affects the Arabic site.
   Loaded on every page; rules are inert under LTR.
   ============================================================ */

[dir="rtl"] body {
  font-family: 'Cairo', 'Manrope', system-ui, -apple-system, sans-serif;
}

[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3, [dir="rtl"] h4, [dir="rtl"] h5, [dir="rtl"] h6,
[dir="rtl"] .brand, [dir="rtl"] .btn, [dir="rtl"] .eyebrow, [dir="rtl"] .nav-links,
[dir="rtl"] .mobile-menu a, [dir="rtl"] .lang-switch, [dir="rtl"] .nav-dd-menu {
  font-family: 'Cairo', 'Space Grotesk', sans-serif;
}

/* Arabic reads better with a touch more line-height on long copy */
[dir="rtl"] p, [dir="rtl"] li { line-height: 1.85; }

/* Eyebrow rule grows from the inline-start (right in RTL) */
[dir="rtl"] .eyebrow {
  letter-spacing: 0.06em;
}
[dir="rtl"] .eyebrow::before {
  background: linear-gradient(270deg, var(--blue), transparent);
}

/* Directional arrows should point the other way */
[dir="rtl"] .arrow { display: inline-block; transform: scaleX(-1); }

/* Nav underline grows from the right */
[dir="rtl"] .nav-links a::after { left: auto; right: 0; }

/* Hover paddings mirror */
[dir="rtl"] .nav-dd-menu a:hover { padding-left: 14px; padding-right: 18px; }
[dir="rtl"] .mobile-menu a:hover { padding-left: 0; padding-right: 10px; }
[dir="rtl"] .foot-col a:hover { padding-left: 0; padding-right: 6px; }

/* Breadcrumb chevrons read naturally RTL */
[dir="rtl"] .crumb { direction: rtl; }

/* Keep the dropdown panel anchored under its trigger */
[dir="rtl"] .nav-dd-menu { left: 50%; right: auto; }

/* Modal close button */
[dir="rtl"] .modal .m-close { right: auto; left: 22px; }
[dir="rtl"] .mm-close { right: auto; left: var(--gutter); }

/* ============================================================
   HERO — home editorial layout
   motion.css pins stats/actions with physical left/right; mirror here.
   ============================================================ */

[dir="rtl"] .hero h1,
[dir="rtl"] .page-hero h1 {
  letter-spacing: 0;
  line-height: 1.18;
}

[dir="rtl"] .heroC h1 {
  font-size: clamp(34px, 6.5vw, 92px);
  text-align: start;
}

/* Word-split animation uses inline-block per word — breaks Arabic bidi */
[dir="rtl"] .heroC h1 .h-word,
[dir="rtl"] .heroC h1 .h-word-in {
  display: inline;
  overflow: visible;
  padding-bottom: 0;
  margin-bottom: 0;
}

[dir="rtl"] .heroC .eyebrow,
[dir="rtl"] .heroC .status-pill {
  letter-spacing: 0;
}

[dir="rtl"] .status-pill {
  flex-direction: row-reverse;
}

/* Lower hero row: CTAs + stat rail */
[dir="rtl"] .heroC .row {
  direction: rtl;
}

[dir="rtl"] .heroC .hero-actions {
  justify-content: flex-start;
}

[dir="rtl"] .heroC .stat-rail {
  text-align: start;
  justify-content: flex-start;
  border-left: none;
  padding-left: 0;
}

[dir="rtl"] .heroC .stat-rail > * {
  padding-left: 0;
  padding-right: clamp(26px, 5vw, 64px);
}

[dir="rtl"] .heroC .stat-rail > *:first-child {
  padding-right: 0;
}

[dir="rtl"] .heroC .stat-rail > *:not(:first-child)::before {
  left: auto;
  right: 0;
}

@media (max-width: 640px) {
  [dir="rtl"] .heroC .stat-rail > * {
    padding-right: 0;
  }
  [dir="rtl"] .heroC .stat-rail > *:not(:first-child)::before {
    display: none;
  }
}

/* Rotating headline word — anchor to inline-start */
[dir="rtl"] .rotator { direction: rtl; }
[dir="rtl"] .rot-out {
  left: auto;
  right: 0;
}

/* Decorative hero cards + ambient glows — mirror corners */
[dir="rtl"] .hero-bg .g1 {
  right: auto;
  left: -120px;
}
[dir="rtl"] .hero-bg .g2 {
  left: auto;
  right: -160px;
}

[dir="rtl"] .hero-shot.g1 {
  right: auto;
  left: 0;
}
[dir="rtl"] .hero-shot.g2 {
  left: auto;
  right: 0;
}

@media (max-width: 980px) {
  [dir="rtl"] .hero-shot.g1 { right: auto; left: 0; }
  [dir="rtl"] .hero-shot.g2 { left: auto; right: 0; }
}

[dir="rtl"] .heroC-scrim {
  background:
    linear-gradient(270deg, rgba(8,16,39,0.92) 0%, rgba(8,16,39,0.60) 38%, rgba(8,16,39,0.12) 100%),
    linear-gradient(0deg, var(--navy-950) 0%, rgba(8,16,39,0) 32%);
}

[dir="rtl"] .scroll-cue {
  letter-spacing: 0.08em;
}

/* Logo marquee — scroll toward inline-start in RTL */
[dir="rtl"] .marquee-track {
  animation-name: marquee-rtl;
}
@keyframes marquee-rtl {
  to { transform: translateX(50%); }
}

/* ============================================================
   INNER PAGES — page hero + feature rows
   ============================================================ */

[dir="rtl"] .page-hero h1 {
  letter-spacing: 0;
}

[dir="rtl"] .feature-row:nth-child(even) {
  direction: rtl;
}

[dir="rtl"] .proc {
  border-right: none;
  border-left: 1px solid var(--line);
}
[dir="rtl"] .proc:last-child {
  border-left: none;
}

[dir="rtl"] .svc .num {
  right: auto;
  left: 28px;
}
