/**
 * A3MEW — RTL Extra Stylesheet
 * Loaded only when lang=ar / rtl body class is active.
 * Uses CSS logical properties wherever possible; pixel tweaks here.
 */

/* ---- Base Direction ---- */
html[dir="rtl"] body { font-family: var(--font-arabic); }

/* ---- Header ---- */
html[dir="rtl"] .header-inner { flex-direction: row-reverse; }
html[dir="rtl"] .site-branding { flex-direction: row-reverse; }
html[dir="rtl"] .header-actions { flex-direction: row-reverse; }
html[dir="rtl"] .main-nav .nav-list { flex-direction: row-reverse; }
html[dir="rtl"] .dropdown-menu { inset-inline-start: auto; inset-inline-end: 0; }

/* ---- Mobile Nav ---- */
html[dir="rtl"] .mobile-nav {
  inset-inline-start: auto;
  inset-inline-end: -320px;
  transition: inset-inline-end 0.22s ease;
}
html[dir="rtl"] .mobile-nav.active {
  inset-inline-end: 0;
}
html[dir="rtl"] .mobile-nav-header { flex-direction: row-reverse; }
html[dir="rtl"] .mobile-sub-list { padding-inline-start: 0; padding-inline-end: 16px; }

/* ---- Typography & Text ---- */
html[dir="rtl"] h1,
html[dir="rtl"] h2,
html[dir="rtl"] h3,
html[dir="rtl"] h4,
html[dir="rtl"] p { text-align: inherit; }

html[dir="rtl"] .section-header:not(.centered) { text-align: right; }
html[dir="rtl"] .section-header:not(.centered) .section-divider { margin-inline-end: auto; margin-inline-start: 0; }

/* ---- Cards ---- */
html[dir="rtl"] .about-feature { flex-direction: row-reverse; text-align: right; }
html[dir="rtl"] .rfq-info-item { flex-direction: row-reverse; text-align: right; }
html[dir="rtl"] .contact-item  { flex-direction: row-reverse; text-align: right; }
html[dir="rtl"] .footer-contact-item { flex-direction: row-reverse; text-align: right; }
html[dir="rtl"] .footer-logo   { flex-direction: row-reverse; }
html[dir="rtl"] .footer-grid   { direction: rtl; }
html[dir="rtl"] .footer-bottom { flex-direction: row-reverse; }
html[dir="rtl"] .footer-social { justify-content: flex-start; }

/* ---- Hero Stats ---- */
html[dir="rtl"] .hero-stats { flex-direction: row-reverse; }

/* ---- WhatsApp Float ---- */
html[dir="rtl"] .whatsapp-float {
  inset-inline-end: auto;
  inset-inline-start: 24px;
  align-items: flex-start;
}
@media (max-width: 600px) {
  html[dir="rtl"] .whatsapp-float {
    inset-inline-start: 16px;
  }
}

/* ---- Forms ---- */
html[dir="rtl"] .form-control { text-align: right; }
html[dir="rtl"] select.form-control {
  background-position: left 12px center;
  padding-inline-start: 36px;
  padding-inline-end: 14px;
}

/* ---- Product card link arrow ---- */
html[dir="rtl"] .product-card-link svg { transform: scaleX(-1); }

/* ---- Breadcrumb ---- */
html[dir="rtl"] .breadcrumb { direction: rtl; }

/* ---- Service detail list ---- */
html[dir="rtl"] .service-detail-item { flex-direction: row-reverse; text-align: right; }
html[dir="rtl"] .product-sub-item    { flex-direction: row-reverse; }

/* ---- About image badge ---- */
html[dir="rtl"] .about-image-badge {
  inset-inline-end: auto;
  inset-inline-start: 24px;
}

/* ---- Quick contact bar ---- */
html[dir="rtl"] .rfq-grid { direction: rtl; }

/* ---- CTA actions ---- */
html[dir="rtl"] .hero-actions,
html[dir="rtl"] .cta-actions { flex-direction: row-reverse; }

/* ---- Lang toggle ---- */
html[dir="rtl"] .lang-toggle { flex-direction: row-reverse; }

/* ---- Why cards ---- */
html[dir="rtl"] .why-card { text-align: right; }
html[dir="rtl"] .why-card-icon { margin-inline-end: auto; margin-inline-start: 0; }

/* Revert centre-aligned sections */
html[dir="rtl"] .section-header.centered,
html[dir="rtl"] .section-header.centered .section-subtitle,
html[dir="rtl"] .section-header.centered .section-divider,
html[dir="rtl"] .why-card,
html[dir="rtl"] .about-highlight-card { text-align: center; }
html[dir="rtl"] .section-header.centered .section-divider { margin-inline: auto; }
html[dir="rtl"] .why-card-icon { margin-inline: auto; }
