/* Right-to-left (Arabic) adjustments — loaded after the theme CSS */
html[dir="rtl"] {
  --font-display: "Cairo", system-ui, sans-serif;
  --font-body: "Cairo", system-ui, sans-serif;
}
html[dir="rtl"] body { line-height: 1.85; }
html[dir="rtl"] *,
html[dir="rtl"] *::before { letter-spacing: 0 !important; }
html[dir="rtl"] .eyebrow,
html[dir="rtl"] .btn,
html[dir="rtl"] .nav-links a,
html[dir="rtl"] .cat-age,
html[dir="rtl"] .crumbs,
html[dir="rtl"] .age-pills a,
html[dir="rtl"] .field label,
html[dir="rtl"] .cat-body small,
html[dir="rtl"] .pager small { text-transform: none !important; }
html[dir="rtl"] h1, html[dir="rtl"] h2, html[dir="rtl"] h3 { line-height: 1.3; font-style: normal !important; }
html[dir="rtl"] em { font-style: normal; }
html[dir="rtl"] .hero h1 { line-height: 1.2; }

/* Mirror arrows */
html[dir="rtl"] .flip { transform: scaleX(-1); }
html[dir="rtl"] .cat-card:hover .cat-arrow { transform: rotate(45deg); }

/* Hero collage: swap sides */
html[dir="rtl"] .arch-1 { left: auto; right: 0; }
html[dir="rtl"] .arch-2 { right: auto; left: 2%; }
html[dir="rtl"] .arch-3 { right: auto; left: 0; }
html[dir="rtl"] .deco-star { left: auto; right: 52%; }
html[dir="rtl"] .deco-blob { left: auto; right: 38%; }
html[dir="rtl"] .deco-squig { right: auto; left: 40%; }

/* Marquee must keep scrolling in a fixed direction */
html[dir="rtl"] .marquee { direction: ltr; }
html[dir="rtl"] .marquee-track { direction: rtl; }

/* Offset decorations */
html[dir="rtl"] .about-photo::before { inset: 24px 24px -22px -22px; }
html[dir="rtl"] .theme-editorial .about-photo::before { inset: 22px 22px -22px -22px; }
html[dir="rtl"] .cat-hero-img { margin-left: 0; margin-right: auto; }
html[dir="rtl"] .pager a.next { text-align: left; }
html[dir="rtl"] .contact-list a:hover { transform: translateX(-6px); }
html[dir="rtl"] .cat-hero::after { left: auto; right: -120px; }
html[dir="rtl"] .wa-float { right: auto; left: 20px; }
html[dir="rtl"] .lb-count { left: auto; right: 28px; }
html[dir="rtl"] .lb-close { right: auto; left: 20px; }

@media (max-width: 980px) {
  html[dir="rtl"] .cat-hero-img { margin: 10px auto 0; }
}
@media (max-width: 760px) {
  html[dir="rtl"] .nav-links { text-align: right; }
}

/* The wavy underline collides with Arabic line spacing */
html[dir="rtl"] .hero h1 em::after { display: none; }

html[dir="rtl"] { --hero-dir: 270deg; }
