/* ================================================================
   TrivexaERP Marketing Site — RTL Overrides for Arabic
   Loaded only when lang="ar" is active
   ================================================================ */

html[dir="rtl"] body {
  font-family: 'Tajawal', 'Space Grotesk', system-ui, sans-serif;
  direction: rtl;
  text-align: right;
}

/* ─── Navbar ─── */
html[dir="rtl"] .navbar-nav { margin-left: 0 !important; margin-right: auto !important; }
html[dir="rtl"] .navbar-brand { margin-right: 0; margin-left: 1rem; }
html[dir="rtl"] .ms-auto { margin-left: 0 !important; margin-right: auto !important; }
html[dir="rtl"] .ms-lg-2 { margin-left: 0 !important; margin-right: 0.5rem !important; }
html[dir="rtl"] .me-1 { margin-right: 0 !important; margin-left: 0.25rem !important; }
html[dir="rtl"] .me-2 { margin-right: 0 !important; margin-left: 0.5rem !important; }
html[dir="rtl"] .ms-1 { margin-left: 0 !important; margin-right: 0.25rem !important; }
html[dir="rtl"] .ms-2 { margin-left: 0 !important; margin-right: 0.5rem !important; }

/* ─── Mega menu ─── */
html[dir="rtl"] .mega-menu { min-width: 680px; }
html[dir="rtl"] .mega-menu > .row { direction: ltr; display: flex !important; flex-direction: row-reverse !important; }
html[dir="rtl"] .mega-menu .col-lg-4 { direction: rtl; text-align: right; }
html[dir="rtl"] .mega-menu .dropdown-header { text-align: right; }
html[dir="rtl"] .mega-menu .dropdown-item { text-align: right; }
html[dir="rtl"] .dropdown-menu { left: 0 !important; right: auto !important; }

/* ─── Hero ─── */
html[dir="rtl"] .hero::before {
  background: radial-gradient(ellipse 70% 60% at 25% -5%, var(--primary-glow), transparent 50%),
              radial-gradient(ellipse 50% 50% at 90% 90%, rgba(9,44,76,0.06), transparent 50%);
}
html[dir="rtl"] .hero-pills { justify-content: flex-start; }

/* ─── Feature hero (navy blocks) ─── */
html[dir="rtl"] .feature-hero { text-align: right; }
html[dir="rtl"] .fh-title { justify-content: flex-end; flex-direction: row-reverse; }
html[dir="rtl"] .fh-badge { margin-left: auto; margin-right: 0; }
html[dir="rtl"] .fh-lead { text-align: right; margin-left: auto; margin-right: 0; }
html[dir="rtl"] .feature-hero::before {
  right: auto; left: 0;
  background: radial-gradient(ellipse at top left, var(--primary-glow), transparent 70%);
}
html[dir="rtl"] .page-hero { text-align: right; direction: rtl; }
html[dir="rtl"] .page-hero .d-flex { flex-direction: row-reverse; justify-content: flex-end; }
html[dir="rtl"] .page-hero .page-title { text-align: right; }
html[dir="rtl"] .page-hero .page-lead { text-align: right; }
html[dir="rtl"] .page-hero .breadcrumb { justify-content: flex-end; direction: rtl; }
html[dir="rtl"] .page-hero .module-icon { margin-left: 0; }
html[dir="rtl"] .page-hero::before {
  right: auto; left: 0;
  background: radial-gradient(ellipse at top left, var(--primary-glow), transparent 70%);
}

/* ─── CTA band ─── */
html[dir="rtl"] .cta-band::before {
  right: auto; left: 0;
  background: radial-gradient(ellipse 60% 80% at 20% 50%, rgba(99,102,241,0.2), transparent 60%);
}

/* ─── Feature grid items ─── */
html[dir="rtl"] .fg-item { flex-direction: row-reverse; text-align: right; }
html[dir="rtl"] .fg-item i { margin-left: 0.75rem; margin-right: 0; }

/* ─── Module cards ─── */
html[dir="rtl"] .module-card::before { left: 0; right: 0; }

/* ─── Content section headings ─── */
html[dir="rtl"] .content-section h2 { text-align: right; flex-direction: row-reverse; justify-content: flex-end; direction: rtl; }
html[dir="rtl"] .content-section h2 i { margin-left: 0.5rem; margin-right: 0; }
html[dir="rtl"] .content-section p { text-align: right; }
html[dir="rtl"] .content-section ul { padding-left: 0; padding-right: 1.2rem; text-align: right; }
html[dir="rtl"] .content-section li { text-align: right; }
html[dir="rtl"] .content-section .feature-grid { direction: rtl; }
html[dir="rtl"] .content-section .mini-showcase { justify-content: flex-end; }
html[dir="rtl"] .content-section .report-grid { direction: rtl; }

/* ─── Callout ─── */
html[dir="rtl"] .callout { border-left: none; border-right: 4px solid var(--primary); border-radius: var(--radius) 0 0 var(--radius); }

/* ─── Mini showcase pills ─── */
html[dir="rtl"] .ms-item i { margin-left: 0.4rem; margin-right: 0; }

/* ─── Workflow cards ─── */
html[dir="rtl"] .wf-flow { flex-direction: row-reverse; }
html[dir="rtl"] .wf-arrow i { transform: scaleX(-1); }
html[dir="rtl"] .wf-features { direction: rtl; }
html[dir="rtl"] .wf-features i { margin-left: 0.4rem; margin-right: 0; }
html[dir="rtl"] .wf-header { flex-direction: row-reverse; text-align: right; }
html[dir="rtl"] .wf-link i { transform: scaleX(-1); }

/* ─── Accounting bridge ─── */
html[dir="rtl"] .accounting-bridge { flex-direction: row-reverse; }
html[dir="rtl"] .ab-arrow i { transform: scaleX(-1); }

/* ─── POS cards ─── */
html[dir="rtl"] .pos-feature-mini { flex-direction: row-reverse; }
html[dir="rtl"] .pos-feature-mini i { margin-left: 0.5rem; margin-right: 0; }

/* ─── Enterprise list ─── */
html[dir="rtl"] .enterprise-list li { flex-direction: row-reverse; text-align: right; }
html[dir="rtl"] .enterprise-list li > i { margin-left: 0.75rem; margin-right: 0; }

/* ─── Numbers band ─── */
html[dir="rtl"] .numbers-band { direction: rtl; }

/* ─── Trust pills ─── */
html[dir="rtl"] .trust-pill i { margin-left: 0.25rem; margin-right: 0; }

/* ─── Footer ─── */
html[dir="rtl"] .footer-links { text-align: right; }

/* ─── Why cards ─── */
html[dir="rtl"] .why-card { text-align: right; }

/* ─── Breadcrumb ─── */
html[dir="rtl"] .breadcrumb { direction: rtl; }
html[dir="rtl"] .breadcrumb-item + .breadcrumb-item::before { float: right; padding-left: 0.5rem; padding-right: 0; }

/* ─── Screenshot frame ─── */
html[dir="rtl"] .screenshot-frame figcaption { text-align: right; }

/* ─── Report grid ─── */
html[dir="rtl"] .rg-item { flex-direction: row-reverse; text-align: right; }
html[dir="rtl"] .rg-item i { margin-left: 0.5rem; margin-right: 0; }

/* ─── Block item cards (admin) ─── */
html[dir="rtl"] .block-item-card .item-number { left: auto; right: 12px; }
html[dir="rtl"] .block-item-card .remove-item { right: auto; left: 8px; }

/* ─── Dark stat cards ─── */
html[dir="rtl"] .dark-stat-card { text-align: center; }

/* ─── Dashboard mock ─── */
html[dir="rtl"] .dash-topbar { flex-direction: row-reverse; }
html[dir="rtl"] .dash-sidebar li { flex-direction: row-reverse; text-align: right; }
html[dir="rtl"] .dash-sidebar li i { margin-left: 0.5rem; margin-right: 0; }

/* ─── Language switcher ─── */
.lang-switch { font-size: 0.82rem; font-weight: 600; }
