/* ==========================================================================
   Darium — Arabic / RTL overrides
   Loaded after style.css on ar/index.html (together with bootstrap.rtl.css).
   Only direction-specific rules live here; everything else is shared.
   ========================================================================== */

/* Typography -------------------------------------------------------------- */
[dir="rtl"] body,
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3,
[dir="rtl"] h4, [dir="rtl"] h5, [dir="rtl"] h6,
[dir="rtl"] .btn, [dir="rtl"] input, [dir="rtl"] select,
[dir="rtl"] textarea, [dir="rtl"] button {
  font-family: var(--font-arabic);
}

/* Arabic letters must never be spaced apart — it breaks letter joining */
[dir="rtl"] *:not(.marquee-track span):not(.dash-pills span) { letter-spacing: 0 !important; }

[dir="rtl"] body { line-height: 1.85; }
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3 { line-height: 1.35; }
[dir="rtl"] .hero-title { line-height: 1.25; font-size: clamp(2.4rem, 5.6vw, 4.4rem); }
[dir="rtl"] .eyebrow { text-transform: none; font-size: .98rem; }

/* No italics in Arabic: accent words keep the brand gradient instead */
[dir="rtl"] em {
  font-family: var(--font-arabic);
  font-style: normal;
  font-weight: 500;
}
[dir="rtl"] .step-no { font-family: var(--font-sans); font-style: normal; }

/* Keep Latin snippets (numbers, KWD, emails) left-to-right */
[dir="rtl"] .ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }

/* Directional icons ------------------------------------------------------- */
[dir="rtl"] .bi-arrow-up-right,
[dir="rtl"] .bi-arrow-right,
[dir="rtl"] .bi-chevron-left,
[dir="rtl"] .bi-chevron-right { display: inline-block; transform: scaleX(-1); }
[dir="rtl"] .btn:hover .bi-arrow-up-right { transform: scaleX(-1) translate(3px, -3px); }
[dir="rtl"] .btn:hover .bi-arrow-right { transform: scaleX(-1) translateX(4px); }

/* Scroll progress grows from the right */
[dir="rtl"] .scroll-progress span { transform-origin: 100% 50%; }

/* Navigation -------------------------------------------------------------- */
[dir="rtl"] .navbar .nav-link::after { transform-origin: left; }
[dir="rtl"] .navbar .nav-link:hover::after,
[dir="rtl"] .navbar .nav-link.active::after { transform-origin: right; }
[dir="rtl"] .nav-toggle span:last-child { margin-left: 0; margin-right: auto; }

/* Hero -------------------------------------------------------------------- */
[dir="rtl"] .hero-overlay {
  background:
    linear-gradient(260deg, rgba(14, 22, 34, .72) 0%, rgba(14, 22, 34, .38) 45%, rgba(14, 22, 34, .05) 75%),
    linear-gradient(0deg, rgba(14, 22, 34, .35), transparent 40%);
}
[dir="rtl"] .float-a { right: auto; left: 6%; }
[dir="rtl"] .float-b { right: auto; left: 12%; }
[dir="rtl"] [data-reveal="fade-left"]  { transform: translateX(-40px); }
[dir="rtl"] [data-reveal="fade-right"] { transform: translateX(40px); }
[dir="rtl"] [data-reveal].is-visible   { transform: none; }

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

/* Cards & lists ----------------------------------------------------------- */
[dir="rtl"] .platform-tag { left: auto; right: 26px; }
[dir="rtl"] .feature::after { transform-origin: right; }
[dir="rtl"] .feature:hover i { transform: translateY(-4px) rotate(6deg); }
[dir="rtl"] .role-chips span:hover { transform: translateX(-6px); }
[dir="rtl"] .step:hover { padding-left: 0; padding-right: 12px; }
[dir="rtl"] .step:hover .step-icon { transform: rotate(12deg) scale(1.05); }

/* Dashboard mock */
[dir="rtl"] .dash-side { border-right: 0; border-left: 1px solid var(--line); }
[dir="rtl"] .legend i { margin-left: 0; margin-right: 8px; }

/* How it works badge */
[dir="rtl"] .spin-badge { right: auto; left: -30px; }
/* SVG text on a path must run LTR along the path; Arabic still shapes correctly */
[dir="rtl"] .spin-badge svg { direction: ltr; }
[dir="rtl"] .spin-badge text { font-family: var(--font-arabic); font-size: 11px; letter-spacing: 0; unicode-bidi: plaintext; }

/* FAQ */
[dir="rtl"] .faq-acc .accordion-button { text-align: right; }
[dir="rtl"] .faq-acc .accordion-body { padding: 0 0 26px 60px; }

/* Contact */
[dir="rtl"] .cta-overlay { background: linear-gradient(270deg, rgba(10,14,20,.92) 0%, rgba(10,14,20,.75) 55%, rgba(10,14,20,.6)); }
[dir="rtl"] .cta-contact i { margin-right: 0; margin-left: 10px; }

/* Back to top sits on the left in RTL */
[dir="rtl"] .to-top { right: auto; left: 24px; }

/* Responsive -------------------------------------------------------------- */
@media (max-width: 991.98px) {
  [dir="rtl"] .float-b { left: 24px; }
  [dir="rtl"] .spin-badge { left: 10px; }
}
@media (max-width: 767.98px) {
  [dir="rtl"] .faq-acc .accordion-body { padding-left: 0; }
}

/* Footer email: keep icon + address on one line */
[dir="rtl"] .footer-mail.ltr { display: inline-flex; }
