/* Persian (fa) is right-to-left. Loaded only when <html dir="rtl"> — by
   includes/layout.php, index.php and tall_project/templates/base.html.
   Most layout flips on its own from dir="rtl" (flex/grid, logical
   properties); this only fixes what the LTR design hard-codes. */

[dir="rtl"] body {
  font-family: "Vazirmatn", "Tahoma", "Segoe UI", system-ui, sans-serif;
}

/* Letter-spacing breaks the joined Persian script. */
[dir="rtl"] body * {
  letter-spacing: normal !important;
}

/* Latin brand marks, numbers, phone numbers and dates keep their own order. */
[dir="rtl"] .l-brand,
[dir="rtl"] .l-footer-brand,
[dir="rtl"] a[href^="tel:"],
[dir="rtl"] input[type="date"],
[dir="rtl"] input[type="tel"],
[dir="rtl"] input[type="email"] {
  direction: ltr;
  unicode-bidi: isolate;
}

[dir="rtl"] ul,
[dir="rtl"] ol {
  padding-right: 1.25rem;
  padding-left: 0;
}

[dir="rtl"] .l-nav-links,
[dir="rtl"] .l-footer ul,
[dir="rtl"] .l-numbers__grid {
  padding-right: 0;
}

[dir="rtl"] .l-lang a,
[dir="rtl"] .l-footer-langs a {
  unicode-bidi: isolate;
}
