/* ==========================================================================
   LuMatrix — RTL overrides (Arabic + Sorani Kurdish)
   Loaded only when dir="rtl" (see includes/header.php).
   ========================================================================== */

html[dir="rtl"] body {
  font-family: "Noto Kufi Arabic", "Noto Naskh Arabic", Tahoma, Arial, sans-serif;
}

/* Headings use the same display font stack but need the Arabic-script
   fallback added too, otherwise Arabic/Kurdish text in <h1>-<h3> falls back
   to the browser default font instead of matching the Latin headings. */
html[dir="rtl"] .font-display {
  font-family: "Noto Kufi Arabic", "Space Grotesk", "Outfit", Arial, sans-serif;
}

/* ---------- Header / nav ---------- */
html[dir="rtl"] .lm-lang-switcher {
  order: -1; /* keep switcher visually first (right edge) before Contact button */
}

/* ---------- Mobile sidebar ---------- */
/* Sidebar itself is positioned inline per-request in header.php (left vs
   right based on $dir); this just mirrors the accent border to the inner
   edge that faces the page content. */
html[dir="rtl"] #mobileSidebar {
  border-left: none;
  border-right: 1px solid rgb(30 41 59 / 1); /* matches Tailwind border-slate-800 */
}

/* ---------- Hero content: known LTR-coded utility spots ---------- */
html[dir="rtl"] .hero-content .ml-2 {
  margin-left: 0;
  margin-right: 0.5rem;
}
html[dir="rtl"] .hero-content svg[viewBox="0 0 24 24"] path[d^="M6 18L18 6"] {
  transform: scaleX(-1);
  transform-origin: center;
}

/* ---------- "Why choose us" mission/about-style content blocks ---------- */
/* These classes (.lm-about-block etc.) live inside translated page/product
   HTML stored in the database, not in this theme's own templates — see
   sql/001_multilingual_schema_and_content.sql. Kept here so the override
   ships with the rest of the RTL pass. */
html[dir="rtl"] .lm-about-block {
  border-left: none;
  border-right: 6px solid #1f2d3a;
}
html[dir="rtl"] .lm-contact-wrap {
  grid-template-columns: 1.1fr 0.9fr;
}
html[dir="rtl"] .lm-contact-wrap > .lm-contact-info { order: 1; }
html[dir="rtl"] .lm-contact-wrap > .lm-map { order: 2; }
html[dir="rtl"] .lm-kicker {
  letter-spacing: 0;
}
html[dir="rtl"] .pdf-toolbar {
  direction: ltr; /* page-number controls read more naturally LTR even on RTL pages */
}

/* ---------- Pricing / CTA card (Aqara, Epoxy) ---------- */
html[dir="rtl"] .lm-pricing-cta-text li {
  padding-inline-start: 0;
  padding-inline-end: 22px;
}
html[dir="rtl"] .lm-pricing-cta-text li::before {
  inset-inline-start: auto;
  inset-inline-end: 0;
}

/* ---------- WhatsApp floating button ---------- */
/* Intentionally NOT mirrored — bottom-right is a globally recognized
   convention for chat widgets regardless of page direction. */
