/* ============================================================
   DASTAGIR MACHINES — RTL.CSS
   Arabic RTL layout overrides. Loaded globally; only applies
   when <html dir="rtl"> is set by i18n.js.
   ============================================================ */

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

/* ---- Header ------------------------------------------------ */
[dir="rtl"] .c-header__inner {
  flex-direction: row-reverse;
}
[dir="rtl"] .c-nav__list {
  flex-direction: row-reverse;
}
[dir="rtl"] .c-header__actions {
  flex-direction: row-reverse;
}

/* ---- Language selector in header -------------------------- */
[dir="rtl"] .c-lang-selector__dropdown {
  left: auto;
  right: 0;
}

/* ---- Mega menu -------------------------------------------- */
[dir="rtl"] .c-mega__inner {
  flex-direction: row-reverse;
}

/* ---- Mobile sheet ----------------------------------------- */
[dir="rtl"] .c-mob-sheet__link svg {
  transform: scaleX(-1);
}

/* ---- Breadcrumbs ------------------------------------------ */
[dir="rtl"] .s-page-hero__breadcrumb {
  direction: rtl;
}
[dir="rtl"] .s-page-hero__breadcrumb-sep {
  transform: scaleX(-1);
  display: inline-block;
}

/* ---- Page Hero -------------------------------------------- */
[dir="rtl"] .s-page-hero__inner {
  text-align: right;
}

/* ---- Homepage hero ---------------------------------------- */
[dir="rtl"] .s-hero__content {
  text-align: right;
}
[dir="rtl"] .s-hero__actions {
  justify-content: flex-end;
  flex-direction: row-reverse;
}

/* ---- Machine cards ---------------------------------------- */
[dir="rtl"] .c-machine-card__content {
  text-align: right;
}
[dir="rtl"] .c-machine-card__cta {
  flex-direction: row-reverse;
}
[dir="rtl"] .c-machine-card__cta svg {
  transform: scaleX(-1);
}

/* ---- Machine listing (machines page) --------------------- */
[dir="rtl"] .c-machine-listing-item {
  flex-direction: row-reverse;
}
[dir="rtl"] .c-machine-listing-item__body {
  text-align: right;
}
[dir="rtl"] .c-machine-listing-item__cta {
  justify-content: flex-start;
  flex-direction: row-reverse;
}

/* ---- Specs table ------------------------------------------ */
[dir="rtl"] .c-specs-table__row {
  flex-direction: row-reverse;
}

/* ---- Timeline --------------------------------------------- */
[dir="rtl"] .c-timeline {
  border-left: none;
  border-right: 2px solid var(--c-n30);
  padding-left: 0;
  padding-right: var(--sp-xl);
}
[dir="rtl"] .c-timeline__dot {
  left: auto;
  right: -9px;
}

/* ---- Capability grid items -------------------------------- */
[dir="rtl"] .c-capability-item {
  text-align: right;
}

/* ---- Buttons with arrows ---------------------------------- */
[dir="rtl"] .btn svg,
[dir="rtl"] .btn-link svg {
  transform: scaleX(-1);
}

/* ---- CTA band -------------------------------------------- */
[dir="rtl"] .s-cta-band__actions {
  flex-direction: row-reverse;
}

/* ---- Solutions section ------------------------------------ */
[dir="rtl"] .s-solutions__item {
  text-align: right;
}

/* ---- Contact form ---------------------------------------- */
[dir="rtl"] .c-form__field label {
  text-align: right;
}
[dir="rtl"] .c-form__field input,
[dir="rtl"] .c-form__field select,
[dir="rtl"] .c-form__field textarea {
  text-align: right;
  direction: rtl;
}

/* ---- Footer ----------------------------------------------- */
[dir="rtl"] .c-footer__main {
  direction: rtl;
  text-align: right;
}
[dir="rtl"] .c-footer__nav {
  text-align: right;
}

/* ---- Mobile bottom nav ------------------------------------ */
[dir="rtl"] .c-mob-nav {
  flex-direction: row-reverse;
}

/* ---- Mobile header ---------------------------------------- */
@media (max-width: 1024px) {
  [dir="rtl"] .c-header__inner {
    flex-direction: row-reverse;
  }
}

/* ---- Logical property overrides for RTL ------------------- */
/* Ensure margin/padding that used directional values flip correctly */
[dir="rtl"] .s-machine-detail-hero__content {
  padding-inline-start: var(--sp-2xl);
  padding-inline-end: var(--sp-xl);
}

/* Numbers: keep LTR for specs */
[dir="rtl"] .c-specs-table__value,
[dir="rtl"] .c-timeline__year,
[dir="rtl"] [data-count] {
  direction: ltr;
  display: inline-block;
}

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

/* Keep non-text elements normal */
[dir="rtl"] img,
[dir="rtl"] video,
[dir="rtl"] .c-logo img,
[dir="rtl"] .c-logo__img {
  transform: none !important;
}
