/* ============================================================================
   FinNovaTech — RTL overrides (loaded only when the active language is Arabic)
   Most layout is flexbox/grid and mirrors automatically under dir="rtl";
   this file fixes the physical properties that don't.
   ============================================================================ */

/* Arabic type: Cairo for headings + body, keep Space Grotesk for numerals feel */
[dir="rtl"] {
  --font-head: "Cairo", "Segoe UI", Tahoma, sans-serif;
  --font-body: "Cairo", "Segoe UI", Tahoma, sans-serif;
}
[dir="rtl"] body { letter-spacing: 0; }
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3 { letter-spacing: 0; line-height: 1.25; }

/* Flip directional arrows (trailing icons in buttons/links, card arrows) */
[dir="rtl"] .btn .ico:last-child,
[dir="rtl"] .textlink .ico,
[dir="rtl"] .card-arrow,
[dir="rtl"] .mega-foot .ico,
[dir="rtl"] .crumb .sep { transform: scaleX(-1); }

/* Card hover arrow sits top-left in RTL */
[dir="rtl"] .card .card-arrow { right: auto; left: 1.5rem; }
[dir="rtl"] .card-link:hover .card-arrow { transform: scaleX(-1) translate(3px,-3px); }

/* Lists: swap left padding to right */
[dir="rtl"] .article ul { padding-left: 0; padding-right: 1.3rem; }
[dir="rtl"] .m-acc-body a { padding: .6rem 1rem .6rem .3rem; }

/* Left-aligned tables → right */
[dir="rtl"] .uc-table th, [dir="rtl"] .uc-table td,
[dir="rtl"] .tbl th, [dir="rtl"] .tbl td { text-align: right; }

/* Eyebrow bar sits to the right of the label (before it in reading order) */
[dir="rtl"] .eyebrow::before { /* inline-flex already mirrors; keep spacing */ }

/* Blockquote border side */
[dir="rtl"] .article blockquote { border-left: 0; border-right: 3px solid var(--orange); padding: .4rem 1.4rem .4rem 0; }
[dir="rtl"] .step .step-n,
[dir="rtl"] .acc-num { } /* fine */

/* Hero: keep copy on the right, visual on the left (natural grid mirror) */
[dir="rtl"] .float-badge.one { left: auto; right: -22px; }
[dir="rtl"] .float-badge.two { right: auto; left: -14px; }

/* Sticky product rail: number/latin content stays LTR inside dashboards */
[dir="rtl"] .dash, [dir="rtl"] .mock-app, [dir="rtl"] .dash-tile .val,
[dir="rtl"] .pts-row .pv, [dir="rtl"] .stat .num { direction: ltr; }
[dir="rtl"] .stat { }
[dir="rtl"] .stat .lab { direction: rtl; }

/* Feature-item / contact icons: margin handled by flex gap, but fix first-icon nudge */
[dir="rtl"] .feature-item .fi-ico,
[dir="rtl"] .ticklist .ico,
[dir="rtl"] .contact-info .ci-ico { }

/* Marquee scrolls the other way for a natural RTL feel */
[dir="rtl"] .marquee-track { animation-direction: reverse; }

/* Mega menu: keep grid, but align text right */
[dir="rtl"] .mega-col h5,
[dir="rtl"] .mega-link b,
[dir="rtl"] .mega-link small { text-align: right; }

/* Language switch keeps Latin label readable */
[dir="rtl"] .lang-switch { direction: ltr; }
.lang-switch { display: inline-flex; align-items: center; gap: .4em; }
.lang-switch .ico { width: 14px; height: 14px; }

/* Footer contact numbers/emails LTR */
[dir="rtl"] .footer-contact a[href^="tel"],
[dir="rtl"] .footer-contact a[href^="mailto"],
[dir="rtl"] .topbar a[href^="tel"],
[dir="rtl"] .topbar a[href^="mailto"] { direction: ltr; }

/* Form fields: labels right-aligned (default via dir), inputs keep LTR for email/phone */
[dir="rtl"] input[type="email"],
[dir="rtl"] input[type="tel"],
[dir="rtl"] input[type="url"] { direction: ltr; text-align: right; }

/* Buttons with leading icon (mail/phone) shouldn't flip — handled by :last-child rule.
   Ensure hero trust check icons stay upright */
[dir="rtl"] .hero-trust .ico,
[dir="rtl"] .chip .ico,
[dir="rtl"] .ticklist .ico { transform: none; }

/* Skip link to the right */
[dir="rtl"] .skip { left: auto; right: -9999px; border-radius: 0 0 0 8px; }
[dir="rtl"] .skip:focus { right: 0; left: auto; }
