/* ============================================
   RTL (Right-to-Left) Support — Arabic
   Only active when html[dir="rtl"] is set
   ============================================ */

/* --- Global direction --- */
html[dir="rtl"] {
  direction: rtl;
  text-align: right;
}

html[dir="rtl"] body {
  text-align: right;
}

/* --- Typography --- */
html[dir="rtl"] {
  font-family: 'Inter', 'Noto Sans Arabic', 'Arial', sans-serif;
}

/* --- Header & Navigation --- */
html[dir="rtl"] .header__inner {
  flex-direction: row-reverse;
}

html[dir="rtl"] .nav {
  flex-direction: row-reverse;
}

html[dir="rtl"] .nav__actions {
  flex-direction: row-reverse;
}

html[dir="rtl"] .lang-switcher {
  flex-direction: row-reverse;
}

/* --- Mobile menu --- */
html[dir="rtl"] .mobile-menu {
  left: 0;
  right: auto;
  transform: translateX(-100%);
}

html[dir="rtl"] .mobile-menu.is-open {
  transform: translateX(0);
}

html[dir="rtl"] .mobile-menu__header {
  flex-direction: row-reverse;
}

html[dir="rtl"] .mobile-menu__nav {
  text-align: right;
}

/* --- Hamburger position --- */
html[dir="rtl"] .hamburger {
  order: -1;
}

/* --- Layout containers --- */
html[dir="rtl"] .container {
  padding-left: var(--space-xl);
  padding-right: var(--space-xl);
}

/* --- Lists & bullets --- */
html[dir="rtl"] ul,
html[dir="rtl"] ol {
  padding-right: var(--space-lg);
  padding-left: 0;
}

/* --- Section content alignment --- */
html[dir="rtl"] .section-label {
  text-align: right;
}

html[dir="rtl"] .section-header {
  text-align: right;
}

/* --- Cards & grid items --- */
html[dir="rtl"] .card {
  text-align: right;
}

html[dir="rtl"] .card__link {
  text-align: right;
}

/* --- CTA buttons with arrows --- */
html[dir="rtl"] .btn--primary,
html[dir="rtl"] .btn--secondary {
  flex-direction: row-reverse;
}

/* --- Trust section stats dividers --- */
html[dir="rtl"] .trust__stat:not(:last-child)::after {
  right: auto;
  left: 0;
}

/* --- Metrics section --- */
html[dir="rtl"] .metrics {
  direction: rtl;
}

/* --- Contact info --- */
html[dir="rtl"] .contact-info {
  text-align: right;
}

html[dir="rtl"] .contact-info__item {
  flex-direction: row-reverse;
}

/* --- Forms --- */
html[dir="rtl"] .form-label {
  text-align: right;
}

html[dir="rtl"] .form-input,
html[dir="rtl"] .form-textarea,
html[dir="rtl"] .form-select {
  text-align: right;
  direction: rtl;
}

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

html[dir="rtl"] .footer__col {
  text-align: right;
}

html[dir="rtl"] .footer__bottom {
  flex-direction: row-reverse;
}

html[dir="rtl"] .footer__bottom-links {
  flex-direction: row-reverse;
}

/* --- Expertise page content --- */
html[dir="rtl"] .page-hero__content {
  text-align: right;
}

html[dir="rtl"] .expertise-content {
  text-align: right;
}

html[dir="rtl"] .service-card {
  text-align: right;
}

/* --- Sector page content --- */
html[dir="rtl"] .sector-content {
  text-align: right;
}

html[dir="rtl"] .sector-list li {
  padding-right: var(--space-md);
  padding-left: 0;
}

html[dir="rtl"] .sector-list li::before {
  right: 0;
  left: auto;
}

/* --- Insights cards --- */
html[dir="rtl"] .insight-card {
  text-align: right;
}

html[dir="rtl"] .insight-card__tag {
  margin-right: 0;
  margin-left: auto;
}

/* --- Featured cards --- */
html[dir="rtl"] .featured-card {
  text-align: right;
}

/* --- AI section --- */
html[dir="rtl"] .ai-card {
  text-align: right;
}

/* --- Breadcrumb-like elements --- */
html[dir="rtl"] .breadcrumb {
  flex-direction: row-reverse;
}

/* --- Scroll animations that slide from left --- */
html[dir="rtl"] [data-animate="slide-left"] {
  transform: translateX(30px);
}

html[dir="rtl"] [data-animate="slide-right"] {
  transform: translateX(-30px);
}

/* --- Letter spacing adjustment for Arabic --- */
html[dir="rtl"] h1,
html[dir="rtl"] h2,
html[dir="rtl"] h3,
html[dir="rtl"] h4 {
  letter-spacing: 0;
}

/* --- Skip to content --- */
html[dir="rtl"] .skip-to-content {
  right: -999px;
  left: auto;
}

html[dir="rtl"] .skip-to-content:focus {
  right: 50%;
  left: auto;
  transform: translateX(50%);
}
