/* Arabic / RTL overrides */
html[dir="rtl"] body {
  font-family: "Cairo", "Manrope", system-ui, sans-serif;
}

/*
 * Home hero (RTL): English crop has Abdelrahman on the RIGHT of the photo.
 * Mirror the background so he sits on the LEFT, clear of Arabic copy on the right.
 */
html[dir="rtl"] .hero-bg,
html[dir="rtl"] .hero-bg.no-grade {
  background-position: right center;
  transform: scaleX(-1) scale(1.08);
  animation: heroZoomRtl 14s var(--ease) forwards;
}
@keyframes heroZoomRtl {
  to { transform: scaleX(-1) scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  html[dir="rtl"] .hero-bg,
  html[dir="rtl"] .hero-bg.no-grade {
    animation: none;
    transform: scaleX(-1) scale(1);
  }
}
html[dir="rtl"] .hero:has(.no-grade) .hero-overlay {
  background:
    linear-gradient(270deg, rgba(10, 11, 11, .97) 0%, rgba(10, 11, 11, .9) 46%, rgba(10, 11, 11, .45) 70%, rgba(10, 11, 11, .14) 100%),
    linear-gradient(0deg, var(--as-black) 0%, transparent 26%);
}
html[dir="rtl"] .hero-overlay {
  background:
    linear-gradient(270deg, rgba(10, 11, 11, .97) 0%, rgba(10, 11, 11, .88) 42%, rgba(10, 11, 11, .4) 72%, rgba(10, 11, 11, .2) 100%),
    linear-gradient(0deg, var(--as-black) 0%, transparent 35%);
}
html[dir="rtl"] .hero .row > [class*="col-"] {
  /* Keep copy on the right (inline-start in RTL); leave the left clear for the portrait */
  margin-inline-end: auto;
  max-width: min(560px, 100%);
}
html[dir="rtl"] .hero-outline-text {
  right: auto;
  left: -2%;
  font-style: normal;
  letter-spacing: 0;
}
html[dir="rtl"] .stripes-hero {
  right: auto;
  left: 9%;
}
html[dir="rtl"] .hero-title,
html[dir="rtl"] .page-hero h1 {
  font-style: normal;
  text-transform: none;
  line-height: 1.35;
  padding-block: .2em .12em;
}
html[dir="rtl"] .hero-title {
  font-size: clamp(1.85rem, 4vw, 3.5rem);
}
html[dir="rtl"] .hero-title .text-gold {
  padding-right: 0;
  padding-left: .08em;
  white-space: nowrap;
}
html[dir="rtl"] .hero-title .cms-line {
  white-space: nowrap;
  display: inline-block;
  max-width: 100%;
}
html[dir="rtl"] .hero-stat {
  padding: 24px 0 0 24px;
}
html[dir="rtl"] .hero-stat + .hero-stat {
  padding-right: 24px;
  padding-left: 0;
  border-left: 0;
  border-right: 1px solid var(--as-border);
}
/*
 * Inner page heroes (About, etc.): same as home — EN crops put the subject
 * on the RIGHT; mirror so he sits on the LEFT, clear of Arabic copy on the right.
 */
html[dir="rtl"] .page-hero-bg.pos-right,
html[dir="rtl"] .page-hero-bg.pos-gym {
  background-position: right 18%;
  transform: scaleX(-1);
}
html[dir="rtl"] .page-hero:has(.pos-right)::before,
html[dir="rtl"] .page-hero:has(.pos-gym)::before {
  background:
    linear-gradient(270deg, rgba(10, 11, 11, .92) 0%, rgba(10, 11, 11, .55) 42%, rgba(10, 11, 11, .16) 100%),
    linear-gradient(0deg, var(--as-black) 0%, transparent 48%);
}
html[dir="rtl"] .page-hero h1,
html[dir="rtl"] .page-hero .lead-text {
  max-width: min(620px, 100%);
  margin-inline-end: auto;
}
html[dir="rtl"] .page-hero-outline {
  right: auto;
  left: -2%;
  letter-spacing: 0;
}
html[dir="rtl"] .page-hero .stripes {
  right: auto;
  left: 9%;
}

@media (max-width: 767.98px) {
  html[dir="rtl"] .page-hero-bg.pos-right,
  html[dir="rtl"] .page-hero-bg.pos-gym {
    background-position: 72% 16%;
    transform: scaleX(-1);
  }
  html[dir="rtl"] .page-hero:has(.pos-right)::before,
  html[dir="rtl"] .page-hero:has(.pos-gym)::before {
    background:
      linear-gradient(270deg, rgba(10, 11, 11, .88) 0%, rgba(10, 11, 11, .5) 55%, rgba(10, 11, 11, .22) 100%),
      linear-gradient(180deg, rgba(10, 11, 11, .2) 0%, rgba(10, 11, 11, .55) 100%);
  }
  html[dir="rtl"] .page-hero h1,
  html[dir="rtl"] .page-hero .lead-text {
    max-width: none;
    margin-inline-end: 0;
  }
}

/* Marquee: keep LTR flex + -50% loop (dir=rtl breaks seamless repeat) */
html[dir="rtl"] .marquee {
  direction: ltr;
}
html[dir="rtl"] .marquee-group span {
  font-style: normal;
  text-transform: none;
}

@media (max-width: 767.98px) {
  /*
   * Same EN mobile crop (72%), then scaleX(-1) so the subject lands on the
   * left. Do not use 28% — that shows empty background after the flip.
   */
  html[dir="rtl"] .hero-bg.no-grade {
    background-size: auto 100%;
    background-position: 72% 12%;
    background-repeat: no-repeat;
    transform: scaleX(-1);
    animation: none;
  }
  html[dir="rtl"] .hero:has(.no-grade) .hero-overlay {
    background:
      linear-gradient(270deg, rgba(10, 11, 11, .72) 0%, rgba(10, 11, 11, .42) 50%, rgba(10, 11, 11, .18) 100%),
      linear-gradient(180deg, rgba(10, 11, 11, .2) 0%, rgba(10, 11, 11, .1) 40%, rgba(10, 11, 11, .68) 100%);
  }
  html[dir="rtl"] .hero .row > [class*="col-"] {
    max-width: none;
    margin-inline-end: 0;
  }
}

html[dir="rtl"] .section-title,
html[dir="rtl"] .page-hero h1,
html[dir="rtl"] .display-title,
html[dir="rtl"] h1, html[dir="rtl"] h2, html[dir="rtl"] h3, html[dir="rtl"] h4 {
  font-family: "Cairo", "Barlow Condensed", sans-serif;
  letter-spacing: 0;
}
html[dir="rtl"] .eyebrow {
  letter-spacing: .08em;
}
html[dir="rtl"] .bi-arrow-up-right::before {
  transform: scaleX(-1);
  display: inline-block;
}
html[dir="rtl"] .header-phone .icon,
html[dir="rtl"] .help-card .icon {
  margin-inline-end: .65rem;
  margin-inline-start: 0;
}
html[dir="rtl"] .site-footer h5 {
  text-transform: none;
}
html[dir="rtl"] .footer-contact li {
  min-width: 0;
}
html[dir="rtl"] .footer-contact a,
html[dir="rtl"] .footer-contact span {
  min-width: 0;
  overflow-wrap: anywhere;
}
html[dir="rtl"] .breadcrumb-as,
html[dir="rtl"] .blog-card__meta,
html[dir="rtl"] .hero-stat {
  letter-spacing: 0;
  text-transform: none;
}
html[dir="rtl"] .breadcrumb-as {
  margin-inline-end: auto;
  align-items: center;
  line-height: 1.4;
  padding-block: 10px;
}
html[dir="rtl"] .breadcrumb-as li {
  display: inline-flex;
  align-items: center;
  line-height: 1.4;
}
html[dir="rtl"] .offcanvas.mobile-menu {
  text-align: right;
}
html[dir="rtl"] .info-item h4,
html[dir="rtl"] .contact-card h3 {
  text-transform: none;
}
html[dir="rtl"] .smart-exp > span,
html[dir="rtl"] .about-badge span {
  text-transform: none;
  letter-spacing: 0;
}
html[dir="rtl"] .video-card .label,
html[dir="rtl"] .support-card h3 {
  text-transform: none;
  letter-spacing: 0;
  font-style: normal;
}
html[dir="rtl"] .form-control,
html[dir="rtl"] .form-select,
html[dir="rtl"] textarea {
  text-align: right;
}
