/* ==========================================================================
   rtl.css — mirrored layout for the Arabic site (/ar/)
   --------------------------------------------------------------------------
   Loaded *after* site.css and pages.css, and only when lang_dir() === 'rtl'
   (see inc/seo.php). Nothing in the shared sheets is touched, so the English,
   Spanish, Portuguese and Russian sites cannot regress.

   Rules of thumb applied here:
   * every physical left/right property is flipped — accent bars, indents,
     dropdown panels, floating buttons, the FAQ "+", absolute badges;
   * Arabic is a connected script: letter-spacing inserts gaps *between*
     the joined letters and visibly breaks words, so it is reset globally;
   * Latin runs inside an RTL paragraph (model codes, e-mail addresses,
     phone numbers, numeric ranges) get direction:ltr so "3–150 mm" and
     "HPY1250" keep their internal order;
   * line-height is opened up — Arabic glyphs are taller than Latin ones.
   ========================================================================== */

[dir="rtl"] body {
  font-family: 'IBM Plex Sans Arabic', 'Noto Sans Arabic', 'Segoe UI',
               Tahoma, 'Geeza Pro', 'Arial', sans-serif;
  line-height: 1.95;
}

[dir="rtl"] .display,
[dir="rtl"] .brand-name,
[dir="rtl"] .nm-head,
[dir="rtl"] .lang-cur,
[dir="rtl"] .lm-code,
[dir="rtl"] .stat-n,
[dir="rtl"] .flow-node .nm,
[dir="rtl"] .stage-body h3,
[dir="rtl"] .specs .v,
[dir="rtl"] .str-nums .v,
[dir="rtl"] .p-body h3,
[dir="rtl"] .app-row h3,
[dir="rtl"] .n-item h4,
[dir="rtl"] .cta-form .t {
  font-family: 'IBM Plex Sans Arabic', 'Noto Sans Arabic', 'Segoe UI',
               Tahoma, 'Geeza Pro', 'Arial', sans-serif;
}

/* Connected script: letter-spacing must go, or words fall apart. */
[dir="rtl"] :where(*) { letter-spacing: 0 !important; }
[dir="rtl"] .brand-name { letter-spacing: .02em !important; }

/* Arabic has no italic face worth using; oblique looks broken. */
[dir="rtl"] .prose blockquote { font-style: normal; }

/* ---------- header / navigation ---------- */

/* underline that grows out of the link */
[dir="rtl"] .nav-links > a::after,
[dir="rtl"] .nav-item > a::after { left: auto; right: 0; }

/* hover nudge on dropdown entries */
[dir="rtl"] .nm-link:hover { padding-left: 0; padding-right: 5px; }

/* ---------- home · answer-first block ---------- */

[dir="rtl"] .answer {
  border-left: 0;
  border-right: 2px solid var(--amber);
}
[dir="rtl"] .hero .answer {
  border-left-color: transparent;
  border-right-color: var(--amber);
}

/* ---------- home · stat strip ---------- */

[dir="rtl"] .stat {
  border-right: 0;
  border-left: 1px solid var(--line);
  padding-right: 0;
  padding-left: 28px;
}
[dir="rtl"] .stat:last-child { border-left: none; }
[dir="rtl"] .stat:not(:first-child) { padding-left: 0; padding-right: 36px; }
[dir="rtl"] .stat:nth-child(2) { border-left: none; }
[dir="rtl"] .stat:nth-child(3) { padding-right: 0; }

/* ---------- home · process flow ---------- */

[dir="rtl"] .flow-node {
  border-right: 0;
  border-left: 1px solid var(--line);
  text-align: right;
}
[dir="rtl"] .flow-node:last-child { border-left: none; }

/* ---------- home · process stages ---------- */

[dir="rtl"] .stage-media .badge { left: auto; right: 24px; }

[dir="rtl"] .specs div {
  border-right: 0;
  border-left: 1px solid var(--line-dk);
  padding-right: 0;
  padding-left: 16px;
}
[dir="rtl"] .specs div:last-child { border-left: none; }
[dir="rtl"] .specs .v { direction: ltr; unicode-bidi: isolate; }

/* ---------- home · strength / application rows ---------- */

[dir="rtl"] .p-arrow { right: auto; left: 20px; }

[dir="rtl"] .app-row::before { left: auto; right: 0; }
[dir="rtl"] .app-row:hover { padding-left: 0; padding-right: 22px; }

/* ---------- about ---------- */

[dir="rtl"] .about-copy .mission {
  border-left: 0;
  border-right: 2px solid var(--amber);
  padding: 2px 18px 2px 0;
}
[dir="rtl"] .tick-list li { padding-left: 0; padding-right: 28px; }
[dir="rtl"] .tick-list li::before { left: auto; right: 0; }

[dir="rtl"] .side-card dd { text-align: left; direction: ltr; unicode-bidi: isolate; }
[dir="rtl"] .side-note {
  border-left: 0;
  border-right: 2px solid var(--amber);
  padding: 6px 20px 6px 0;
}

/* ---------- product / insight cards ---------- */

[dir="rtl"] .badge-static { left: auto; right: 0; }

[dir="rtl"] .prose ul,
[dir="rtl"] .prose ol { padding-left: 0; padding-right: 0; }
[dir="rtl"] .prose ul li { padding-left: 0; padding-right: 26px; }
[dir="rtl"] .prose ul li::before { left: auto; right: 0; }
[dir="rtl"] .prose blockquote {
  border-left: 0;
  border-right: 2px solid var(--amber);
  padding-left: 0;
  padding-right: 22px;
}

/* Specification tables: labels read right-aligned, values keep LTR order. */
[dir="rtl"] .spec-table th,
[dir="rtl"] .spec-table td { text-align: right; }
[dir="rtl"] .spec-table td { direction: ltr; unicode-bidi: isolate; }

/* ---------- forms ---------- */

[dir="rtl"] .form-done {
  border-left: 0;
  border-right: 2px solid #4CAF7D;
}
[dir="rtl"] .form-err {
  border-left: 0;
  border-right: 2px solid #DC3C28;
}
[dir="rtl"] .form-result.ok,
[dir="rtl"] .form-result.err {
  border-left: 0;
  border-right: 2px solid currentColor;
}
[dir="rtl"] .req { margin-left: 0; margin-right: 2px; }

/* honeypot: keep it off-screen on the correct side */
[dir="rtl"] .hp { left: auto !important; right: -9999px !important; }

/* ---------- FAQ ---------- */

[dir="rtl"] .faq-item summary::after { right: auto; left: 6px; }
[dir="rtl"] .faq-item summary { padding-left: 28px; padding-right: 0; }

/* ---------- solutions ---------- */

[dir="rtl"] .sol-facts > div {
  border-right: 0;
  border-left: 1px solid var(--line);
}
[dir="rtl"] .sol-facts > div:last-child { border-left: 0; }
[dir="rtl"] .timeline li { padding-left: 0; padding-right: 0; }

/* ---------- mobile menu ---------- */

[dir="rtl"] .m-toggle { margin-right: 0; margin-left: -10px; }
[dir="rtl"] .m-sub-link {
  padding: 5px 12px 5px 0;
  border-left: 0;
  border-right: 1px solid rgba(23, 28, 33, .14);
}

/* ---------- floating contact bar ---------- */

[dir="rtl"] .float-bar { right: auto; left: 20px; }

/* ---------- responsive ---------- */

@media (max-width: 680px) {
  [dir="rtl"] .about-copy .mission { padding-left: 0; padding-right: 14px; }
}

@media (max-width: 560px) {
  [dir="rtl"] .float-bar { right: auto; left: 12px; }
  [dir="rtl"] .sol-facts > div { border-left: 0; }
}
