/* ============================================================
   Flou Media, right-to-left layer (Arabic).
   Loaded only on /ar/ pages, after styles.css, animations.css and
   mobile.css; the build adds the <link> and the IBM Plex Sans Arabic
   Google Font. Everything is scoped to html[dir="rtl"], so even if it
   were loaded on an LTR page it would do nothing.

   Approach: flex and grid already mirror with the document direction, and
   text aligns to the start edge on its own. This file mirrors what is
   written with physical left/right (positions, one-sided borders and
   paddings, slide-in offsets, arrow icons) and keeps marquees, carousels
   and image strips running left to right so their animations still work.
   ============================================================ */

/* ---- Type ---- */
html[dir="rtl"] {
  --font-sans: "IBM Plex Sans Arabic", "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", "Geeza Pro", "Noto Sans Arabic", Tahoma, Arial, sans-serif;
  --font-display: "IBM Plex Sans Arabic", "Inter", ui-sans-serif, system-ui, "Geeza Pro", Tahoma, Arial, sans-serif;
}
/* Arabic letters join: no tracking, and uppercase has no meaning. The giant
   footer wordmark and the stat numerals are Latin display type and keep theirs. */
html[dir="rtl"] body *:not(.footer-giant):not(.stat-num):not(.pf-stat-num) {
  letter-spacing: 0 !important;
  text-transform: none !important;
}
html[dir="rtl"] .hero-title,
html[dir="rtl"] .section-title,
html[dir="rtl"] .footer-cta h2 { line-height: 1.3; }
html[dir="rtl"] .hero-desc,
html[dir="rtl"] .section-subtitle,
html[dir="rtl"] .faq-a,
html[dir="rtl"] .benefit p { line-height: 1.8; }
/* Latin-only fields stay left to right but sit on the right edge. */
html[dir="rtl"] input[type="email"],
html[dir="rtl"] input[type="url"],
html[dir="rtl"] input[type="tel"] { direction: ltr; text-align: right; }

/* ---- Marquees, carousels, image strips: keep running left to right ---- */
html[dir="rtl"] .hero-marquee-wrap,
html[dir="rtl"] .results-marquee-wrap,
html[dir="rtl"] .footer-clients,
html[dir="rtl"] .benefits-carousel,
html[dir="rtl"] .bc-arrows,
html[dir="rtl"] .bc-dots { direction: ltr; }
html[dir="rtl"] .bc-card { direction: rtl; }

/* ---- Absolute positions ---- */
html[dir="rtl"] .skip-link { left: auto; right: 16px; }
html[dir="rtl"] .video-card .brand { left: auto; right: 16px; }
html[dir="rtl"] .video-card .case-chip { left: auto; right: 12px; }
html[dir="rtl"] .featured-chip { left: auto; right: 20px; }
html[dir="rtl"] .featured-card-hero .featured-chip { left: auto; right: 24px; }
html[dir="rtl"] .lightbox-close { right: auto; left: 24px; }
html[dir="rtl"] .pkg-badge { left: auto; right: 28px; }
html[dir="rtl"] .process-strip .process-step::before { left: auto; right: 0; }
html[dir="rtl"] .section.dark::before { right: auto; left: -200px; }
/* Centred with left: 50% plus a -50% shift. Its inset also sets right: 0, which
   a left-to-right page ignores (over-constrained) but a right-to-left one obeys,
   pushing the glow off the left edge and adding a horizontal scroll. */
html[dir="rtl"] .case-cta::before { right: auto; }

/* ---- One-sided borders and paddings ---- */
html[dir="rtl"] .stat-cell + .stat-cell { border-left: 0; border-right: 1px solid var(--border-subtle); }
html[dir="rtl"] .logo-cell { border-right: 0; border-left: 1px solid var(--border-subtle); }
html[dir="rtl"] .logo-cell:nth-child(4n) { border-left: none; }
html[dir="rtl"] .logo-cloud-section.is-compact .logo-cell { border-right: 0; border-left: 1px solid rgba(15,15,15,0.06); }
html[dir="rtl"] .logo-cloud-section.is-compact .logo-cell:nth-child(5n) { border-left: none; }
html[dir="rtl"] .faq-q { text-align: right; }
html[dir="rtl"] .contact-steps { padding: 0 20px 0 0; }
html[dir="rtl"] .pkg-card li { padding-left: 0; padding-right: 22px; }
html[dir="rtl"] .pkg-card li::before { left: auto; right: 2px; }
html[dir="rtl"] .header-burger { margin-left: 0; margin-right: 8px; }
/* Form honeypot is parked off screen; on the left it would add a scrollable
   area in a right-to-left page, so park it on the right instead. */
html[dir="rtl"] .contact-form > [aria-hidden="true"] { left: auto !important; right: -9999px !important; }

/* ---- Package toggle: thumb starts on the right ---- */
html[dir="rtl"] .pill-toggle-thumb { left: auto; right: 5px; }
html[dir="rtl"] .pill-toggle.is-oneoff .pill-toggle-thumb { transform: translateX(-100%); }

/* ---- Slide-ins and sweeps come from the mirrored side ---- */
html[dir="rtl"] .compare-row:not(.in-view) .compare-card.others { transform: translateX(24px); }
html[dir="rtl"] .compare-row:not(.in-view) .compare-card.flou { transform: translateX(-24px); }
html[dir="rtl"] .btn:not(:hover)::before { transform: translateX(101%); }

/* ---- Directional arrows ---- */
html[dir="rtl"] .featured-cta svg { transform: scaleX(-1); }
html[dir="rtl"] .featured-card:hover .featured-cta svg { transform: scaleX(-1) translateX(3px); }

/* ---- Mobile drawer slides in from the left ---- */
html[dir="rtl"] .mobile-drawer-panel {
  right: auto; left: 0;
  transform: translateX(-100%);
  box-shadow: 20px 0 40px -10px rgba(15,15,15,0.18);
}
html[dir="rtl"] .mobile-drawer.open .mobile-drawer-panel { transform: translateX(0); }
html[dir="rtl"] .mobile-drawer .m-link { transition: color 0.2s var(--ease-premium), padding-right 0.3s var(--ease-premium); }
html[dir="rtl"] .mobile-drawer .m-link:hover,
html[dir="rtl"] .mobile-drawer .m-link.active { padding-left: 0; padding-right: 6px; }

/* ---- Tablet and phone ---- */
@media (max-width: 900px) {
  html[dir="rtl"] .logo-cloud-section.is-compact .logo-cell:nth-child(5n) { border-left: 1px solid rgba(15,15,15,0.06); }
  html[dir="rtl"] .logo-cloud-section.is-compact .logo-cell:nth-child(2n) { border-left: none; }
}
@media (max-width: 640px) {
  html[dir="rtl"] .stat-cell.alt { border-right: 0; }
  html[dir="rtl"] .result-count { text-align: right; }
  html[dir="rtl"] .video-card .brand { right: 12px; }
  html[dir="rtl"] .lightbox-close { left: 12px; }
}
@media (max-width: 480px) {
  html[dir="rtl"] .featured-chip { right: 12px; }
  html[dir="rtl"] .featured-card-hero .featured-chip { right: 16px; }
}
