/* =============================================
   RTL (Right-to-Left) Overrides
   Applied for Hebrew (he) and Arabic (ar)
   Loaded AFTER style.css via init.php
   ============================================= */

/* ---- Base direction ---- */
body { direction: rtl; text-align: right; }

/* ---- Fonts ---- */
body.rtl[lang="ar"] {
  font-family: 'Cairo', 'Segoe UI', Tahoma, Arial, sans-serif;
}
body.rtl[lang="he"] {
  font-family: 'Heebo', 'Segoe UI', Tahoma, Arial, sans-serif;
}

/* ---- Navbar ---- */
.navbar-nav {
  flex-direction: row-reverse; /* reverse order for RTL */
}
.navbar .ms-auto { margin-right: auto !important; margin-left: 0 !important; }
.navbar .ms-lg-2 { margin-right: 0.5rem !important; margin-left: 0 !important; }
.lang-menu { text-align: right; }
.lang-selector .dropdown-toggle .lang-flag { margin-left: 6px; margin-right: 0; }

/* ---- Hero ---- */
.hero-cta { flex-direction: row-reverse; }
.btn-outline-cta .fa-arrow-right { transform: scaleX(-1); margin-left: 0; margin-right: 0.5rem; }
.hero-stats { border-top: 1px solid rgba(255,255,255,0.1); flex-direction: row-reverse; }

/* ---- Alert banner ---- */
.alert-band { flex-direction: row-reverse; }
.alert-band .fa-triangle-exclamation { margin-left: 8px; margin-right: 0; }

/* ---- Feature / Service cards ---- */
.feature-icon, .service-icon, .about-icon {
  margin-left: auto;
  margin-right: 0;
}
.service-link { flex-direction: row-reverse; }
.service-link .fa-arrow-right { transform: scaleX(-1); margin-left: 0; margin-right: 6px; }

/* ---- Skills / Tags ---- */
.expertise-tags { flex-direction: row-reverse; }
.tag i { margin-left: 4px; margin-right: 0 !important; }

/* ---- Stats ---- */
.row.g-4.text-center { direction: rtl; }

/* ---- Portfolio ---- */
.portfolio-sectors { flex-direction: row-reverse; }
.sector-tag i { margin-left: 4px; margin-right: 0 !important; }

/* ---- Testimonials ---- */
.testimonial-author { flex-direction: row-reverse; }
.quote-mark { text-align: right; }

/* ---- Contact ---- */
.contact-offices { direction: rtl; }
.office { flex-direction: row-reverse; }
.office .office-icon { margin-left: 14px; margin-right: 0; }
.office strong, .office span { text-align: right; }
.call-invite { text-align: right; }
.call-invite .fa-phone-volume { margin-left: 8px; margin-right: 0; }

.newsletter-form .input-group {
  flex-direction: row-reverse;
}
.newsletter-form .form-control {
  border-radius: 0 10px 10px 0;
}
.btn-accent {
  border-radius: 10px 0 0 10px;
}

.contact-form .text-danger { margin-right: 4px; margin-left: 0; }

/* Alert success/danger icon */
.alert .fa-circle-check { margin-left: 8px; margin-right: 0; }

/* ---- Footer ---- */
.footer-brand { flex-direction: row-reverse; }
.footer-links { text-align: right; }
.footer-social { flex-direction: row-reverse; }
#footer .footer-bottom .d-flex { flex-direction: row-reverse; }

/* ---- Back to top ---- */
#back-to-top { left: 24px; right: auto; }

/* ---- CTA box ---- */
.cta-box .text-lg-end { text-align: start !important; }

/* ---- Section header ---- */
.section-header { direction: rtl; }
.section-label { direction: rtl; }

/* ---- News cards ---- */
.news-footer { flex-direction: row-reverse; }
.news-footer .fa-clock { margin-left: 4px; margin-right: 0; }

/* ---- Bootstrap overrides for RTL ---- */
.me-1, .me-2 { margin-left: 0.25rem !important; margin-right: 0 !important; }
.ms-2 { margin-right: 0.5rem !important; margin-left: 0 !important; }

/* Dropdown RTL */
.dropdown-menu-end {
  right: auto !important;
  left: 0 !important;
}

/* ---- AI Threat section ---- */
.ai-card-header { flex-direction: row-reverse; }
.ai-list { direction: rtl; }
.ai-list li { flex-direction: row-reverse; text-align: right; }

/* ---- Consent banner ---- */
.ts-consent-box { direction: rtl; text-align: right; }
.ts-consent-toggle { flex-direction: row-reverse; }

/* ---- Inner pages (legal / terms / privacy) ---- */
.inner-hero h1, .inner-hero .page-meta { direction: rtl; text-align: right; }
.legal-body { direction: rtl; text-align: right; }
.legal-body h2, .legal-body h3 { direction: rtl; }
.legal-body .info-block { border-left: none; border-right: 3px solid var(--accent2); border-radius: 8px 0 0 8px; }
.legal-body ul { padding-left: 0; padding-right: 1.4rem; }
.legal-back-btn .fa-arrow-left { transform: scaleX(-1); }
