/* Smart Idea — Arabic (RTL) layer over style.css, used by ar/index.html.
   style.css is written for left-to-right with some physical left/right rules;
   this file mirrors those and switches to the Arabic font. Code samples,
   the tool list and phone numbers stay left-to-right in the HTML. */

[dir="rtl"] body,
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3,
[dir="rtl"] .btn, [dir="rtl"] .links a, [dir="rtl"] .mobile-menu a {
  font-family: "Cairo", "Space Grotesk", Inter, Tahoma, sans-serif;
}
[dir="rtl"] body { line-height: 1.8; }
[dir="rtl"] h1, [dir="rtl"] h2 { line-height: 1.35; letter-spacing: 0; }
[dir="rtl"] em { font-style: normal; }

/* Arabic letters must stay joined: no letter-spacing on Arabic text. */
[dir="rtl"] .eyebrow,
[dir="rtl"] .pill,
[dir="rtl"] .scroll-hint,
[dir="rtl"] .marquee .track { letter-spacing: 0; }
[dir="rtl"] .eyebrow { font-size: 14px; }

/* Header: logo on the right, links on the left. */
[dir="rtl"] .nav { padding: 10px 20px 10px 12px; }
[dir="rtl"] .brand { margin-right: 0; margin-left: auto; }
[dir="rtl"] .links { margin-left: 0; margin-right: auto; }
.lang-switch { font-weight: 600 !important; }

/* Hero code card and typing line read left to right. */
[dir="rtl"] .code-card, [dir="rtl"] .typed-line { direction: ltr; text-align: left; }
[dir="rtl"] .typed-line { width: fit-content; }
[dir="rtl"] .orb-ring { left: auto; right: 20px; }
[dir="rtl"] .fc1, [dir="rtl"] .fc2 { right: auto; left: 0; }
[dir="rtl"] .fc3 { left: auto; right: 6%; }

/* Brand strip mirrors. */
[dir="rtl"] .brand-card img { margin-right: 0; margin-left: auto; object-position: right center; }
[dir="rtl"] .brand-card p { margin-left: 0; margin-right: auto; text-align: left; }

/* The marquee keeps scrolling the same way; each run of text stays RTL. */
[dir="rtl"] .marquee { direction: ltr; }
[dir="rtl"] .marquee .track span { direction: rtl; unicode-bidi: isolate; padding-inline: 0; }

[dir="rtl"] .skip-link { left: auto; right: 16px; }

@media (max-width: 640px) {
  [dir="rtl"] .nav { padding: 8px 14px 8px 10px; }
  [dir="rtl"] .burger { margin-left: 0; margin-right: auto; }
  [dir="rtl"] .fc1, [dir="rtl"] .fc2 { right: auto; left: 4px; }
  [dir="rtl"] .fc3 { left: auto; right: 4px; }
  [dir="rtl"] .orb-ring { right: auto; left: 50%; }
  [dir="rtl"] .brand-card { text-align: right; }
  [dir="rtl"] .brand-card img { margin-left: 0; }
  [dir="rtl"] .brand-card p { margin-right: 0; text-align: right; }
}
