/*--------------------------------------------------------------
# RTL (Right-to-Left) Overrides for Arabic
--------------------------------------------------------------*/

/* Arabic Typography */
[dir="rtl"] body,
[dir="rtl"] {
  font-family: 'Cairo', 'Tajawal', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

[dir="rtl"] h1,
[dir="rtl"] h2,
[dir="rtl"] h3,
[dir="rtl"] h4,
[dir="rtl"] h5,
[dir="rtl"] h6,
[dir="rtl"] .logo span,
[dir="rtl"] .hero-title,
[dir="rtl"] .stat-number,
[dir="rtl"] .stat-suffix,
[dir="rtl"] .btn-primary-custom,
[dir="rtl"] .btn-outline-custom,
[dir="rtl"] .hero-card span,
[dir="rtl"] .preloader-text,
[dir="rtl"] .why-card-number {
  font-family: 'Cairo', 'Tajawal', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Improve Arabic line height and spacing */
[dir="rtl"] body {
  line-height: 1.85;
  letter-spacing: 0;
}

[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3 {
  line-height: 1.5;
  letter-spacing: 0;
}

[dir="rtl"] .hero-title {
  letter-spacing: 0;
  line-height: 1.4;
}

[dir="rtl"] .section-subtitle {
  letter-spacing: 1px;
}

/* ---- Top Bar RTL ---- */
[dir="rtl"] #topbar .contact-info i {
  margin-right: 0;
  margin-left: 6px;
}

[dir="rtl"] #topbar .contact-info a + a {
  margin-right: 16px;
  margin-left: 0;
}

/* Language Switch Button */
.lang-switch {
  font-weight: 700 !important;
  font-size: 12px !important;
  letter-spacing: 1px;
  border: 1px solid rgba(255,255,255,0.2) !important;
  border-radius: 4px !important;
  padding: 2px 10px !important;
  margin-left: 8px;
}

.lang-switch:hover {
  background: rgba(255,255,255,0.1) !important;
  border-color: rgba(255,255,255,0.4) !important;
  color: #fff !important;
}

[dir="rtl"] .lang-switch {
  margin-left: 0;
  margin-right: 8px;
}

/* ---- Navigation RTL ---- */
[dir="rtl"] .navbar .cta-link {
  margin-left: 0;
  margin-right: 8px;
}

[dir="rtl"] .navbar a i {
  margin-left: 0;
  margin-right: 5px;
}

/* ---- Hero RTL ---- */
[dir="rtl"] .hero-badge {
  direction: rtl;
}

[dir="rtl"] .hero-card-1 {
  left: auto;
  right: 10%;
}

[dir="rtl"] .hero-card-2 {
  right: auto;
  left: 5%;
}

[dir="rtl"] .hero-card-3 {
  left: auto;
  right: 20%;
}

/* Flip arrows in RTL */
[dir="rtl"] .btn-primary-custom:hover i {
  transform: translateX(-3px);
}

[dir="rtl"] .product-card:hover .product-link i {
  transform: translateX(-4px);
}

/* ---- About Badge RTL ---- */
[dir="rtl"] .about-experience-badge {
  right: auto;
  left: -20px;
}

@media (max-width: 768px) {
  [dir="rtl"] .about-experience-badge {
    right: auto;
    left: -10px;
  }
}

/* ---- About Feature Items RTL ---- */
[dir="rtl"] .about-feature-item {
  text-align: right;
}

/* ---- Why Card Number RTL ---- */
[dir="rtl"] .why-card-number {
  right: auto;
  left: 24px;
}

/* ---- Product Card RTL ---- */
[dir="rtl"] .product-card-inner::before {
  transform-origin: right;
}

/* ---- Feature List RTL ---- */
[dir="rtl"] .feature-list li {
  text-align: right;
}

/* ---- Footer RTL ---- */
[dir="rtl"] .footer-links ul a:hover {
  padding-left: 0;
  padding-right: 4px;
}

[dir="rtl"] .footer-contact p {
  text-align: right;
}

/* ---- Back to Top RTL ---- */
[dir="rtl"] .back-to-top {
  right: auto;
  left: 20px;
}

/* ---- Mobile Nav RTL ---- */
[dir="rtl"] .navbar-mobile .mobile-nav-toggle {
  right: auto;
  left: 20px;
}

[dir="rtl"] body.mobile-nav-active #header {
  direction: rtl;
}

/* ---- CTA Section RTL ---- */
[dir="rtl"] .cta-inner::before {
  right: auto;
  left: -10%;
}

/* ---- Breadcrumbs RTL ---- */
[dir="rtl"] .breadcrumbs ol li + li {
  padding-left: 0;
  padding-right: 10px;
}

[dir="rtl"] .breadcrumbs ol li + li::before {
  padding-right: 0;
  padding-left: 10px;
}

/* ---- Contact Form RTL ---- */
[dir="rtl"] .contact-form .form-control,
[dir="rtl"] .contact-form textarea {
  text-align: right;
}

/* ---- Preloader RTL ---- */
[dir="rtl"] .preloader-text {
  letter-spacing: 2px;
}

/* ---- General Spacing Fixes ---- */
[dir="rtl"] .ms-4 {
  margin-left: 0 !important;
  margin-right: 1.5rem !important;
}

/* ---- Stat value RTL — suffix before number ---- */
[dir="rtl"] .stat-value {
  direction: ltr;
}
