/* ===== RTL GLOBAL OVERRIDES ===== */
html[lang="ar"] {
  direction: rtl;
}
html[lang="ar"] body {
  text-align: right;
}

/* ===== Arabic Font Family ===== */
html[lang="ar"] .home-page,
html[lang="ar"] .home-page [class^="text-"],
html[lang="ar"] .home-page [class*="text-wrapper"],
html[lang="ar"] .home-page [class^="body-text"],
html[lang="ar"] .home-page h1,
html[lang="ar"] .home-page h2,
html[lang="ar"] .home-page h3,
html[lang="ar"] .home-page h4,
html[lang="ar"] .home-page p,
html[lang="ar"] .home-page a,
html[lang="ar"] .home-page span,
html[lang="ar"] .home-page button,
html[lang="ar"] .home-page .custom-innovation,
html[lang="ar"] .home-page .our-mission-is-to,
html[lang="ar"] .home-page .our-vision-is-to,
html[lang="ar"] .home-page .jump-on-a-membership,
html[lang="ar"] .home-page .we-collaborate-with,
html[lang="ar"] .home-page .text-enjoy-the,
html[lang="ar"] .home-page .body-text-text-our,
html[lang="ar"] .home-page .body-text-text,
html[lang="ar"] .home-page .email-link-info,
html[lang="ar"] .home-page .email-link,
html[lang="ar"] .home-page .email-moon-tower-al,
html[lang="ar"] .home-page .email-p-o-box,
html[lang="ar"] .home-page .email-link-sun-thu,
html[lang="ar"] .home-page .text-buisness-hours,
html[lang="ar"] .home-page .text-heading-our,
html[lang="ar"] .home-page .text-heading-our-2,
html[lang="ar"] .home-page .text-heading-quick,
html[lang="ar"] .home-page .text-heading,
html[lang="ar"] .home-page .text-heading-worry,
html[lang="ar"] .home-page .link-in-active-home,
html[lang="ar"] .home-page .link-in-active-about,
html[lang="ar"] .home-page .link-in-active-our,
html[lang="ar"] .home-page .link-in-active,
html[lang="ar"] .home-page .link-in-active-2 {
  font-family: "IBM Plex Sans Arabic", Helvetica, sans-serif;
}

/* Arabic letter-spacing: tighter */
html[lang="ar"] .home-page .custom-innovation,
html[lang="ar"] .home-page .text-wrapper,
html[lang="ar"] .home-page .span {
  letter-spacing: 0;
}
html[lang="ar"] .home-page .text-wrapper-18 {
  letter-spacing: -1px;
}

/* ===== Navigation RTL ===== */

/* Keep nav layout same as English (logo left, links center, controls right) */
html[lang="ar"] .home-page .frame-25 {
  direction: ltr;
}
/* Restore RTL direction on individual text elements inside nav */
html[lang="ar"] .home-page .navbar {
  direction: rtl;
}
html[lang="ar"] .home-page .text-get-in-touch {
  direction: rtl;
}

/* CTA arrow icon flips */
html[lang="ar"] .home-page .vector {
  transform: scaleX(-1);
}

/* Lang switch indicator positions
   NOTE: .frame-25 has direction:ltr so button order is same as English:
   [ع](left) [EN](right). No position swap needed — base theme.css handles it. */

/* Theme toggle knob RTL */
html[lang="ar"] .home-page .theme-toggle .knob {
  left: auto;
  right: 3px;
}
html[lang="ar"] .home-page .theme-toggle[data-theme="light"] .knob {
  transform: translateX(-24px);
}

/* ===== Hero Section RTL ===== */
html[lang="ar"] .home-page .pattern-hero-right {
  right: auto;
  left: 0;
  transform: scaleX(-1) translateY(var(--pattern-enter-offset, 140px));
}
html[lang="ar"] .home-page .pattern-hero-right.active {
  transform: scaleX(-1) translateY(0);
}
html[lang="ar"] .home-page .pattern-hero-left {
  left: auto;
  right: 0;
  transform: scaleX(-1) translateY(var(--pattern-enter-offset, 140px));
}
html[lang="ar"] .home-page .pattern-hero-left.active {
  transform: scaleX(-1) translateY(0);
}

/* ===== About Section RTL ===== */
html[lang="ar"] .home-page .content {
  align-items: flex-start;
}
html[lang="ar"] .home-page .pattern {
  right: auto;
  left: 0;
}
/* Higher specificity to override .home-page .frame-6 .content .pattern */
html[lang="ar"] .home-page .frame-6 .content .pattern {
  transform: scaleX(-1) translateX(0);
}
html[lang="ar"] .home-page .frame-6 .content:hover .pattern {
  transform: scaleX(-1) translateX(22px);
}

/* About card entrance: swap directions for RTL */
html[lang="ar"] .home-page .frame-6 .content.enter-left {
  transform: translateX(var(--about-card-enter-offset, 160px));
}
html[lang="ar"] .home-page .frame-6 .content.enter-right {
  transform: translateX(calc(-1 * var(--about-card-enter-offset, 160px)));
}
/* Ensure active state resets properly */
html[lang="ar"] .home-page .frame-6 .content.enter-left.active,
html[lang="ar"] .home-page .frame-6 .content.enter-right.active {
  transform: translateX(0);
}

/* Decorative ellipse */
html[lang="ar"] .home-page .ellipse-2 {
  right: auto;
  left: 0;
}

/* ===== Partners Marquee RTL ===== */
/* Force marquee to behave like English (logos don't need RTL) */
html[lang="ar"] .home-page .partners-marquee {
  direction: ltr;
}
html[lang="ar"] .home-page .marquee-track {
  animation-name: partners-marquee;
  animation-direction: normal;
}

/* ===== Services Section RTL ===== */
html[lang="ar"] .home-page .frame-14,
html[lang="ar"] .home-page .frame-15 {
  align-items: flex-start;
}
/* Flip service card icons for RTL */
html[lang="ar"] .home-page .frame-11 .frame-7 {
  transform: scaleX(-1);
}

/* Decorative ellipses swap sides */
html[lang="ar"] .home-page .ellipse-5,
html[lang="ar"] .home-page .ellipse-7,
html[lang="ar"] .home-page .ellipse-8 {
  right: auto;
  left: -80px;
}
html[lang="ar"] .home-page .ellipse-6 {
  right: auto;
  left: -40px;
}
html[lang="ar"] .home-page .ellipse-4 {
  left: auto;
  right: 35px;
}

/* Glow patterns swap + flip */
html[lang="ar"] .home-page .pattern-gaming-glow {
  right: auto;
  left: -160px;
  transform: scaleX(-1);
}
html[lang="ar"] .home-page .pattern-change-glow {
  left: auto;
  right: -140px;
  transform: scaleX(-1);
}
/* Combine scaleX with animation translateY states */
html[lang="ar"] .home-page .pattern-gaming-glow.pre-enter,
html[lang="ar"] .home-page .pattern-change-glow.pre-enter {
  transform: scaleX(-1) translateY(60px);
}
html[lang="ar"] .home-page .pattern-gaming-glow.active,
html[lang="ar"] .home-page .pattern-change-glow.active {
  transform: scaleX(-1) translateY(0);
}

/* ===== Contact Section RTL ===== */
html[lang="ar"] .home-page .pattern-artboard {
  left: auto;
  right: 0;
  border-radius: 0 35px 35px 0;
  transform: scaleX(-1);
}
html[lang="ar"] .home-page .pattern-6 {
  right: auto;
  left: 0;
  transform: scaleX(-1);
}

/* ===== News Section RTL ===== */
html[lang="ar"] .home-page .image {
  left: auto;
  right: 20px;
}
html[lang="ar"] .home-page .border-wrapper {
  left: auto;
  right: 20px;
}
html[lang="ar"] .home-page .div-wrapper {
  left: auto;
  right: 20px;
}
html[lang="ar"] .home-page .text-content-2 {
  left: auto;
  right: 20px;
}

/* Glow positions mirror */
html[lang="ar"] .home-page .glow {
  left: auto;
  right: -74px;
}
html[lang="ar"] .home-page .glow-2 {
  left: auto;
  right: -260px;
}
html[lang="ar"] .home-page .glow-3 {
  left: auto;
  right: -16px;
}
html[lang="ar"] .home-page .glow-4 {
  left: auto;
  right: -73px;
}

/* NEW tag position */
html[lang="ar"] .home-page .text-NEW {
  left: auto;
  right: 10px;
}

/* Body text in news cards */
html[lang="ar"] .home-page .text-wrapper-20 {
  left: 12px;
  right: 12px;
}
html[lang="ar"] .home-page .body-text-text-our,
html[lang="ar"] .home-page .body-text-text {
  left: 12px;
  right: 12px;
}

/* ===== Footer RTL ===== */
/* Keep footer layout same as English (logo left, links right) */
html[lang="ar"] .home-page .frame-17 {
  direction: ltr;
}
/* Restore RTL for text content inside footer */
html[lang="ar"] .home-page .frame-18 {
  direction: rtl;
  align-items: flex-start;
}
html[lang="ar"] .home-page .frame-19 {
  direction: ltr;
}
html[lang="ar"] .home-page .pages {
  direction: rtl;
}
html[lang="ar"] .home-page .frame-20 {
  direction: ltr;
}
html[lang="ar"] .home-page .frame-21 {
  direction: rtl;
  align-items: flex-start;
}
html[lang="ar"] .home-page .BG-gradient {
  left: auto;
  right: 319px;
}

/* ===== Ellipse in hero ===== */
html[lang="ar"] .home-page .ellipse-3 {
  right: auto;
  left: 100px;
}
