/* ==========================================================================
   AgReCir Right-to-Left (RTL) Stylesheet — Arabic (العربية)
   ========================================================================== */

html[dir="rtl"] {
  direction: rtl;
  text-align: right;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans Arabic", "Geeza Pro", "Amiri", "Traditional Arabic", Tahoma, sans-serif;
}

html[dir="rtl"] body {
  direction: rtl;
  text-align: right;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans Arabic", "Geeza Pro", "Amiri", "Traditional Arabic", Tahoma, sans-serif;
}

/* Typography Headings & Lead Copy in Arabic */
html[dir="rtl"] h1,
html[dir="rtl"] h2,
html[dir="rtl"] h3,
html[dir="rtl"] h4,
html[dir="rtl"] .lead,
html[dir="rtl"] .hero-title,
html[dir="rtl"] .hero-lead {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans Arabic", "Geeza Pro", "Amiri", Tahoma, sans-serif;
  letter-spacing: normal;
  line-height: 1.45;
}

/* Skip Link & Scroll Progress */
html[dir="rtl"] .skip {
  left: auto;
  right: 16px;
}
html[dir="rtl"] .progress {
  transform-origin: right;
}

/* Header & Navigation Mirroring */
html[dir="rtl"] .head-in {
  flex-direction: row;
}
html[dir="rtl"] .brand {
  margin-left: 0;
  margin-right: 0;
}
html[dir="rtl"] .nav-list {
  padding-right: 0;
}
html[dir="rtl"] .lang-dropdown {
  right: auto;
  left: 0;
}
html[dir="rtl"] .mega {
  text-align: right;
}
html[dir="rtl"] .mega-list a {
  padding-right: 12px;
  padding-left: 18px;
}
@media (max-width: 1100px) {
  html[dir="rtl"] .nav-btn.is-current::after,
  html[dir="rtl"] .nav-link.is-current::after {
    left: auto;
    right: 4px;
  }
}

/* --------------------------------------------------------------------------
   Directional Icons & Interactive Controls Mirroring
   -------------------------------------------------------------------------- */

/* Standard text links, buttons, CTAs, related pills & mega icons in RTL */
html[dir="rtl"] .tlink svg.i,
html[dir="rtl"] .btn svg.i,
html[dir="rtl"] .head-cta svg.i,
html[dir="rtl"] .pcard .tlink svg.i,
html[dir="rtl"] .mega-card svg.i,
html[dir="rtl"] .mi-dot svg.i,
html[dir="rtl"] .rel svg.i {
  transform: scaleX(-1);
}

html[dir="rtl"] .tlink:hover svg.i,
html[dir="rtl"] .pcard:hover .tlink svg.i,
html[dir="rtl"] .btn:hover svg.i,
html[dir="rtl"] .head-cta:hover svg.i,
html[dir="rtl"] .mega-card:hover svg.i {
  translate: -4px 0 !important;
}

/* Carousel Rail Navigation Buttons in RTL */
html[dir="rtl"] .rail-btn[data-dir="-1"] svg.i {
  rotate: 0deg !important;
  transform: none !important;
}
html[dir="rtl"] .rail-btn[data-dir="1"] svg.i {
  rotate: 180deg !important;
}

/* Lightbox Modal Navigation & Layout in RTL */
html[dir="rtl"] .lb-btn.lb-prev svg.i {
  rotate: 0deg !important;
  transform: none !important;
}
html[dir="rtl"] .lb-btn.lb-next svg.i {
  rotate: 180deg !important;
}
html[dir="rtl"] .lightbox figcaption {
  padding: 16px 22px 18px 86px;
}
html[dir="rtl"] .lb-count {
  right: auto;
  left: 22px;
  direction: ltr;
}

/* Service Bento Card Explore Buttons in RTL */
html[dir="rtl"] .svc-go {
  right: auto !important;
  left: 22px !important;
  rotate: -135deg !important;
}
html[dir="rtl"] .svc:hover .svc-go {
  rotate: 180deg !important;
  background: var(--forest-950) !important;
}

/* Feature Link & Download Row Trailing Icons in RTL */
html[dir="rtl"] .feat-go {
  margin-left: 0 !important;
  margin-right: auto !important;
  transform: scaleX(-1);
}
html[dir="rtl"] .feat--link:hover .feat-go {
  translate: -4px 0 !important;
}
html[dir="rtl"] .dl .i:last-child {
  margin-left: 0;
  margin-right: auto;
}

/* Form Fields, Floating Labels & Select Arrow in RTL */
html[dir="rtl"] .field input,
html[dir="rtl"] .field select,
html[dir="rtl"] .field textarea {
  text-align: right;
  direction: rtl;
}
html[dir="rtl"] .field input[type="email"],
html[dir="rtl"] .field input[type="tel"] {
  direction: ltr;
  text-align: right;
}
html[dir="rtl"] .field label:not(.sr-only) {
  left: auto;
  right: 17px;
  transform-origin: right top;
}
html[dir="rtl"] .field select {
  padding: 17px 16px 17px 44px !important;
  background-position: left 14px center !important;
}
html[dir="rtl"] .sel-ico {
  right: auto !important;
  left: 16px !important;
}
html[dir="rtl"] .help,
html[dir="rtl"] .ferr {
  padding-left: 0;
  padding-right: 4px;
}
html[dir="rtl"] .switch input {
  left: auto;
  right: 0;
}

/* Floating "Back to Top" Button & Cookie Banner (Non-Overlapping Corners) */
html[dir="rtl"] .to-top {
  right: auto !important;
  left: 22px !important;
}
html[dir="rtl"] .cookie {
  left: auto;
  right: 20px;
}
html[dir="rtl"] .ck-more {
  margin-left: 0;
  margin-right: 6px;
}

/* Hero Slider Counter & Navigation BiDi Isolation */
html[dir="rtl"] .hero-ctrl,
html[dir="rtl"] .hero-ctrl span {
  direction: ltr !important;
  unicode-bidi: isolate !important;
}

/* Breadcrumbs in RTL */
html[dir="rtl"] .crumbs li + li::before {
  display: inline-block;
  margin-right: 0 !important;
  margin-left: 6px !important;
  transform: scaleX(-1);
}

/* Section Headers, Lists, Badges, Quotes, Timelines, Maps & Sidebars */
html[dir="rtl"] .eyebrow {
  justify-content: flex-start;
}
html[dir="rtl"] .eyebrow span {
  margin-right: 0;
  margin-left: 8px;
}
html[dir="rtl"] .list {
  padding-left: 0;
  padding-right: 1.2em;
}
html[dir="rtl"] .list li {
  padding-left: 0;
  padding-right: .2em;
}
html[dir="rtl"] .zoom-ico {
  right: auto;
  left: 14px;
}
@media (min-width: 901px) {
  html[dir="rtl"] .split-fig .media::after {
    inset: 26px 26px -18px -18px;
  }
  html[dir="rtl"] .split--rev .split-fig .media::after {
    inset: 26px -18px -18px 26px;
  }
}
html[dir="rtl"] .quote::after {
  right: auto;
  left: -60px;
}
html[dir="rtl"] .feat {
  text-align: right;
}
html[dir="rtl"] .pcard-img .badge {
  left: auto;
  right: 14px;
}
html[dir="rtl"] .timeline {
  padding-left: 0;
  padding-right: 34px;
}
html[dir="rtl"] .timeline::before {
  left: auto;
  right: 8px;
}
html[dir="rtl"] .timeline li::before {
  left: auto;
  right: -34px;
}
html[dir="rtl"] .process::before,
html[dir="rtl"] .process::after {
  left: auto;
  right: 31px;
}
html[dir="rtl"] .source {
  border-left: 0;
  border-right: 3px solid var(--gold);
}
html[dir="rtl"] .map .legend span {
  margin-right: 0;
  margin-left: 8px;
}
html[dir="rtl"] .toc a {
  border-left: 0;
  border-right: 2px solid transparent;
}

/* Cards, Stats & Tables in RTL */
html[dir="rtl"] .card,
html[dir="rtl"] .stat,
html[dir="rtl"] .aud,
html[dir="rtl"] .news-body {
  text-align: right;
}
html[dir="rtl"] table,
html[dir="rtl"] th,
html[dir="rtl"] td,
html[dir="rtl"] th.left,
html[dir="rtl"] td.left {
  text-align: right;
}
html[dir="rtl"] .table .right {
  text-align: left;
}
@media (max-width: 640px) {
  html[dir="rtl"] .table th,
  html[dir="rtl"] .table td {
    text-align: right !important;
  }
  html[dir="rtl"] .cookie {
    left: 12px;
    right: 12px;
  }
  html[dir="rtl"] .lightbox figcaption {
    padding: 14px 20px 70px;
  }
  html[dir="rtl"] .lb-count {
    left: 50%;
    right: auto;
  }
}

/* Footer in RTL */
html[dir="rtl"] .site-foot {
  text-align: right;
}
html[dir="rtl"] .foot-top {
  direction: rtl;
}
html[dir="rtl"] .foot-brand {
  text-align: right;
}
html[dir="rtl"] .social,
html[dir="rtl"] .social--foot,
html[dir="rtl"] .site-foot .social--foot {
  justify-content: flex-start !important;
  padding-right: 0 !important;
}
@media (min-width: 769px) {
  html[dir="rtl"] .foot-bottom-in {
    flex-direction: row-reverse;
  }
}
@media (max-width: 768px) {
  html[dir="rtl"] .foot-bottom-in {
    flex-direction: column;
  }
}
html[dir="rtl"] .foot-bottom-in ul {
  padding-right: 0;
}
html[dir="rtl"] .stat-unit,
html[dir="rtl"] .stat-sub {
  margin-left: 0 !important;
  margin-right: 4px !important;
}

/* Marquee in RTL: Force standard LTR physical coordinate flow so all 18 partner cards loop smoothly */
html[dir="rtl"] .marquee {
  direction: ltr !important;
}
html[dir="rtl"] .mq-track {
  direction: ltr !important;
  animation: mq 115s linear infinite !important;
  animation-direction: normal !important;
}
@media (prefers-reduced-motion: reduce) {
  html[dir="rtl"] .mq-track {
    animation: none !important;
  }
}

/* Hero & Section Shades in RTL: Mirrored so dark gradient backs Arabic text on the right */
html[dir="rtl"] .hero-shade {
  background: linear-gradient(260deg, rgb(6 28 11 / .92) 0%, rgb(6 28 11 / .72) 42%, rgb(6 28 11 / .15) 80%),
              linear-gradient(to top, rgb(6 28 11 / .92) 0%, rgb(6 28 11 / .3) 45%, transparent 70%),
              linear-gradient(to bottom, rgb(6 28 11 / .6), transparent 22%) !important;
}
html[dir="rtl"] .band-shade {
  background: linear-gradient(270deg, rgb(6 28 11 / .92), rgb(6 28 11 / .65) 55%, rgb(6 28 11 / .2)) !important;
}

/* Three Syllable Panels & Latin Brand Tokens in RTL */
html[dir="rtl"] .panel-big {
  direction: ltr;
  display: inline-block;
  text-align: right;
  letter-spacing: normal;
}
html[dir="rtl"] .stats--dark .stat {
  text-align: right;
  direction: rtl;
}
html[dir="rtl"] .hero-lead,
html[dir="rtl"] .hero-content,
html[dir="rtl"] .sh,
html[dir="rtl"] .lead {
  text-align: right;
}
