/* Cambridge Learn — RTL overrides. Loaded only on ar/ and he/ pages, after main.css. */

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

[dir="rtl"] .site-header .container {
  flex-direction: row-reverse;
}

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

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

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

/* The header rows are reversed above, so the switcher still sits at the
   right edge in RTL; keep the menu anchored right so it stays on screen. */
[dir="rtl"] .lang-switcher__list {
  right: 0;
  left: auto;
}

[dir="rtl"] .lang-switcher__list a {
  text-align: right;
}

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

[dir="rtl"] .filter-group__options label {
  flex-direction: row-reverse;
}

[dir="rtl"] .footer-grid {
  direction: rtl;
}

@media (max-width: 820px) {
  [dir="rtl"] .main-nav {
    left: auto;
    right: 0;
  }
}
