/* Arabic RTL overrides — load only on lang=ar pages after styles.css / pages.css */

@font-face {
  font-family: "IBM Plex Sans Arabic";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/ibm-plex-sans-arabic-400.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF;
}

@font-face {
  font-family: "IBM Plex Sans Arabic";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/ibm-plex-sans-arabic-500.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF;
}

@font-face {
  font-family: "IBM Plex Sans Arabic";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/ibm-plex-sans-arabic-600.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF;
}

@font-face {
  font-family: "IBM Plex Sans Arabic";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/ibm-plex-sans-arabic-700.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF;
}

html[dir="rtl"] {
  --font-sans: "Segoe UI", Tahoma, "IBM Plex Sans Arabic", ui-sans-serif, system-ui, sans-serif;
}

html[dir="rtl"] body {
  font-family: var(--font-sans);
  letter-spacing: 0;
}

/* Kickers / mono labels: no Latin uppercase treatment on Arabic */
html[dir="rtl"] .home-kicker,
html[dir="rtl"] .section-label,
html[dir="rtl"] .section-label span,
html[dir="rtl"] .comparison-chrome,
html[dir="rtl"] .comparison-map p,
html[dir="rtl"] .constraint-strip li,
html[dir="rtl"] .audience-strip,
html[dir="rtl"] .mini-label,
html[dir="rtl"] .laptop-mini-label,
html[dir="rtl"] .order-preview-chips span,
html[dir="rtl"] .order-preview-note span,
html[dir="rtl"] .order-stop-kicker,
html[dir="rtl"] .pricing-launch-offer strong {
  letter-spacing: 0.02em;
  text-transform: none;
}

html[dir="rtl"] .section-label span {
  border-left: 0;
  border-right: 1px solid var(--hairline-strong, #c5d2e5);
  padding-left: 0;
  padding-right: 0.65rem;
}

html[dir="rtl"] .skip-link {
  left: auto;
  right: 1rem;
}

html[dir="rtl"] .nav-toggle {
  margin-left: 0;
  margin-right: 0;
}

/* Hero: same strength wash as EN, mirrored so copy side stays darkest */
html[dir="rtl"] .home-hero::after {
  background:
    linear-gradient(
      180deg,
      rgba(11, 30, 56, 0.16) 0%,
      rgba(11, 30, 56, 0.88) 100%
    ),
    linear-gradient(
      270deg,
      rgba(11, 30, 56, 0.98) 0%,
      rgba(11, 30, 56, 0.94) 38%,
      rgba(11, 30, 56, 0.58) 70%,
      rgba(11, 30, 56, 0.82) 100%
    );
}

html[dir="rtl"] .home-hero-photo {
  transform: scaleX(-1);
}

html[dir="rtl"] .home-hero-assurance li::before {
  margin-left: 0.45rem;
  margin-right: 0;
}

html[dir="rtl"] .lead-form-row {
  padding: 0.28rem 1rem 0.28rem 0.28rem;
}

html[dir="rtl"] .lead-phone {
  direction: ltr;
}

html[dir="rtl"] .ss-content {
  text-align: right;
}

html[dir="rtl"] .savings-copy .savings-example {
  border-left: 0;
  border-right: 2px solid var(--accent, #2563eb);
  padding-left: 0;
  padding-right: 0.9rem;
}

html[dir="rtl"] .whitelabel-note {
  border-left: 0;
  border-right: 2px solid var(--hairline-strong, #c5d2e5);
  padding-left: 0;
  padding-right: 0.9rem;
}

/* Horizontal process rails */
html[dir="rtl"] .contrast-row li {
  padding-left: 0.85rem;
  padding-right: 0;
}

html[dir="rtl"] .contrast-row li:last-child {
  padding-left: 0;
}

html[dir="rtl"] .contrast-row li::before {
  left: auto;
  right: 0;
}

html[dir="rtl"] .contrast-old li:not(:last-child)::after {
  left: 8px;
  right: 16px;
}

html[dir="rtl"] .contrast-route-optima li:not(:last-child)::after {
  left: -6px;
  right: 5px;
}

html[dir="rtl"] .busy-day-process > ol li {
  border-left: 0;
  border-right: 1px solid var(--hairline, #dce5f2);
  padding-left: 0;
  padding-right: 1.25rem;
}

html[dir="rtl"] .busy-day-process > ol li:first-child {
  border-right: 0;
  padding-right: 0;
}

/* Comparison maps stay LTR for chronology; do not flip the arrow */
html[dir="rtl"] .comparison-maps:not(.preserve-ltr)::after {
  content: "←";
}

html[dir="rtl"] .comparison-link {
  margin-left: 0;
  margin-right: auto;
}

html[dir="rtl"] .pricing-compare-table th,
html[dir="rtl"] .pricing-compare-table td {
  text-align: right;
}

html[dir="rtl"] .pricing-compare-table thead th:not(:first-child),
html[dir="rtl"] .pricing-compare-table td {
  text-align: center;
}

html[dir="rtl"] .home-faq summary::after {
  left: 0;
  right: auto;
}

html[dir="rtl"] .home-faq details p {
  padding: 0 0 1.4rem 3rem;
}

html[dir="rtl"] .platform-facts h3::before,
html[dir="rtl"] .platform-pair h3::before {
  margin-left: 0.45rem;
  margin-right: 0;
}

html[dir="rtl"] .platform-copy ul {
  padding-left: 0;
  padding-right: 1.15rem;
}

html[dir="rtl"] .order-preview-chips span,
html[dir="rtl"] .order-preview-note span {
  margin-left: 0.35rem;
  margin-right: 0;
}

html[dir="rtl"] .order-preview-stops::before {
  left: auto;
  right: 1.55rem;
}

html[dir="rtl"] .public-track-timeline li:not(:last-child)::after {
  left: auto;
  right: 0.42rem;
}

html[dir="rtl"] .portal-table th,
html[dir="rtl"] .portal-table td,
html[dir="rtl"] .report-table th,
html[dir="rtl"] .report-table td,
html[dir="rtl"] .page-hero .hero-grid {
  text-align: start;
}

html[dir="rtl"] .policy ul {
  padding-left: 0;
  padding-right: 1.25rem;
}

html[dir="rtl"] .text-link .chevron,
html[dir="rtl"] .comparison-link .chevron {
  display: inline-block;
  transform: scaleX(-1);
}

@media (max-width: 900px) {
  html[dir="rtl"] .onboarding-steps p {
    grid-column: 1 / -1;
  }
}

@media (max-width: 1200px) {
  html[dir="rtl"] .nav-drawer {
    border-left: 0;
    border-right: 1px solid var(--border, #dce5f2);
    left: 0;
    right: auto;
    transform: translateX(-100%);
  }

  html[dir="rtl"] body.nav-open .nav-drawer {
    transform: translateX(0);
  }
}

@media (max-width: 760px) {
  html[dir="rtl"] .lead-form-row {
    padding: 0.22rem 0.85rem 0.22rem 0.22rem;
  }

  html[dir="rtl"] .console-stage {
    transform-origin: top right;
  }

  html[dir="rtl"] .contrast-row li::before {
    left: auto;
    right: 0;
  }

  html[dir="rtl"] .contrast-old li:not(:last-child)::after,
  html[dir="rtl"] .contrast-route-optima li:not(:last-child)::after {
    left: auto;
    right: 0.35rem;
  }

  html[dir="rtl"] .busy-day-process > ol li {
    border-right: 0;
    padding-right: 0;
  }

  html[dir="rtl"] .comparison-maps:not(.preserve-ltr)::after {
    content: "↓";
  }

  html[dir="rtl"] .comparison-link {
    margin-right: 0;
  }

  html[dir="rtl"] .home-faq details p {
    padding-left: 0;
  }

}
