/* ═══════════════════════════════════════════════════════════
   RTL overrides for Arabic pages (/ar/). Loaded after main.css.
   Flex/grid layouts mirror automatically under dir="rtl";
   this file fixes physical left/right rules and typography.
   ═══════════════════════════════════════════════════════════ */

[dir="rtl"] {
  --font-serif: 'Amiri', 'Playfair Display', Georgia, serif;
  --font-sans: 'IBM Plex Sans Arabic', 'Inter', -apple-system, 'Segoe UI', Tahoma, sans-serif;
}

/* Arabic letters must join: never letter-space, never fake-italicize */
[dir="rtl"] *, [dir="rtl"] *::before, [dir="rtl"] *::after { letter-spacing: 0 !important; }
[dir="rtl"] em, [dir="rtl"] i { font-style: normal; }
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3 { line-height: 1.35; }
[dir="rtl"] body { line-height: 1.85; }
[dir="rtl"] .marquee__item { font-style: normal; }

/* Phone numbers and Latin-only runs stay left-to-right */
[dir="rtl"] a[href^="tel:"]:not(.btn), [dir="rtl"] a[href^="mailto:"]:not(.btn) { direction: ltr; unicode-bidi: isolate; }
/* Mixed Latin/number runs (address, phone, hours values): direction follows their own first letter */
[dir="rtl"] .hero__panel-row span:last-child,
[dir="rtl"] .location__info address,
[dir="rtl"] .footer__col address { unicode-bidi: plaintext; }

/* Buttons: arrow points the reading direction */
[dir="rtl"] .btn::after { content: '←'; }
[dir="rtl"] .btn:hover::after { transform: translateX(-4px); }

/* Header */
[dir="rtl"] .header__logo { margin-right: 0; margin-left: auto; direction: ltr; }
[dir="rtl"] .header__nav-caret { margin-left: 0; margin-right: .3rem; }
[dir="rtl"] .header__nav .header__dropdown a { text-align: right; }
[dir="rtl"] .lang-switch__menu { right: auto; left: 0; }

/* Mobile menu */
[dir="rtl"] .mobile-menu__sublist { padding-left: 0; padding-right: 1.5rem; }
[dir="rtl"] .mobile-menu__sublist a:hover { padding-left: 0 !important; padding-right: .35rem !important; }
[dir="rtl"] .mobile-menu a:hover { padding-left: 0; padding-right: .5rem; }

/* Marquee scrolls the other way */
[dir="rtl"] .marquee__track { animation-name: marquee-rtl; }
@keyframes marquee-rtl { from { transform: translateX(0); } to { transform: translateX(50%); } }

/* Hero / sections */
[dir="rtl"] .hero__panel-row span:last-child { text-align: left; }
[dir="rtl"] .section-head__meta { text-align: left; margin-left: 0; margin-right: auto; }
@media (max-width: 768px) {
  [dir="rtl"] .section-head__meta { text-align: right; margin-right: 0; }
}
[dir="rtl"] .manifesto::before { left: auto; right: 2.5rem; }
[dir="rtl"] .bento-card__arrow { right: auto; left: clamp(1.85rem, 2.5vw, 2.5rem); transform: scaleX(-1); }
[dir="rtl"] .bento-card:hover .bento-card__arrow { transform: scaleX(-1) rotate(-45deg); }
[dir="rtl"] .process-step { text-align: right; }
[dir="rtl"] .hours-table td:last-child { text-align: left; }
[dir="rtl"] .hero__branches { right: auto; left: -12%; transform: scaleX(-1); }
@media (max-width: 1024px) {
  [dir="rtl"] .hero__branches { left: -8%; }
}

/* Notices & accents with a leading border */
[dir="rtl"] .appt-notice,
[dir="rtl"] .form-status.success,
[dir="rtl"] .form-status.error,
[dir="rtl"] .prose address { border-left: none; border-right: 2px solid var(--gold); }
[dir="rtl"] .form-status.error { border-right-color: #dc2626; }

/* FAQ */
[dir="rtl"] .faq-item summary { padding-right: 0; padding-left: 3.85rem; }
[dir="rtl"] .faq-item summary::after { right: auto; left: 1.65rem; }
[dir="rtl"] .faq-sidebar a { border-left: none; border-right: 2px solid transparent; }
[dir="rtl"] .faq-sidebar a:hover, [dir="rtl"] .faq-sidebar a.active { border-right-color: var(--gold); }

/* Contact */
[dir="rtl"] .contact-info { padding-right: 0; padding-left: 2rem; }
@media (max-width: 1024px) { [dir="rtl"] .contact-info { padding-left: 0; } }

/* Prose (privacy-style pages) */
[dir="rtl"] .prose-toc { padding-right: 0; padding-left: 1rem; }
[dir="rtl"] .prose-toc a { border-left: none; border-right: 2px solid transparent; }
[dir="rtl"] .prose-toc a:hover, [dir="rtl"] .prose-toc a.active { border-right-color: var(--gold); }
[dir="rtl"] .prose ul { padding-left: 0; padding-right: 1.5rem; }

/* Reviews widgets (if present) */
[dir="rtl"] .rev-hero-score__meta { text-align: left; }
[dir="rtl"] .rev-filter__label { margin-right: 0; margin-left: .5rem; }
[dir="rtl"] .rev-card__quote::before { margin-right: 0; margin-left: .1rem; }
[dir="rtl"] .rev-card__quote::after { margin-left: 0; margin-right: .1rem; }
