/* Global RTL overrides for RTL direction */
html[dir="rtl"] body {
  direction: rtl;
  text-align: right;
}

/* تصحيح موضع القائمة الجانبية للموبايل في RTL */
html[dir="rtl"] .mobile-menu {
  right: auto !important;
  left: 0 !important;
}

html[dir="rtl"] .mobile-menu.show {
  transform: translateX(0) !important;
}

/* تصحيح موضع زر الإغلاق في RTL */
html[dir="rtl"] .mobile-menu .close-button {
  right: auto !important;
  left: 0 !important;
  margin-right: 0 !important;
  margin-left: 0.5rem !important;
}

/* Prevent Swiper & Carousel arrows from flipping positions in RTL */
/* Swiper adds .swiper-rtl when container is RTR; override to keep arrows as LTR layout */
html[dir="rtl"] .swiper-rtl .swiper-button-next {
  right: 10px;
  left: auto;
}
html[dir="rtl"] .swiper-rtl .swiper-button-prev {
  left: 10px;
  right: auto;
}

/* Bootstrap carousel controls: keep default LTR positions */
html[dir="rtl"] .carousel .carousel-control-next {
  right: 0;
  left: auto;
}
html[dir="rtl"] .carousel .carousel-control-prev {
  left: 0;
  right: auto;
}

/* استثناء العناصر المحددة من تأثير RTL */
/* شاشة التحميل مع السيارة والطريق - الحفاظ على الأنيميشن */
html[dir="rtl"] .preloader,
html[dir="rtl"] .preloader .car-road,
html[dir="rtl"] .preloader .car,
html[dir="rtl"] .preloader .road {
  direction: ltr;
  /* الحفاظ على الأنيميشن الأصلي */
  animation: none; /* إعادة تعيين أي أنيميشن RTL */
  /* الحفاظ على الموقع الأصلي */
  left: 0 !important;
  right: auto !important;
  /* السماح للأنيميشن بالعمل */
  transform-origin: center;
}

/* قسم المشاريع مع Swiper - الحفاظ على الأنيميشن */
html[dir="rtl"] .project,
html[dir="rtl"] .project .project-slider,
html[dir="rtl"] .project .swiper,
html[dir="rtl"] .project .swiper-wrapper,
html[dir="rtl"] .project .swiper-slide {
  direction: ltr;
  /* الحفاظ على الأنيميشن الأصلي */
  animation: none; /* إعادة تعيين أي أنيميشن RTL */
  /* الحفاظ على الموقع الأصلي */
  left: 0 !important;
  right: auto !important;
  /* السماح للأنيميشن بالعمل */
  transform-origin: center;
}

/*
html[dir="rtl"] .banner-three-plane {
  direction: ltr;
  /* الحفاظ على الأنيميشن الأصلي 
  animation: none; /* إعادة تعيين أي أنيميشن RTL 
  /* الحفاظ على الموقع الأصلي 
  right: 0 !important;
  left: auto !important;
  /* السماح للأنيميشن بالعمل 
  transform-origin: center; 
}*/

/* المسار - الحفاظ على الأنيميشن والموقع */
/*html[dir="rtl"] .only-track {
  direction: ltr;
  /* الحفاظ على الأنيميشن الأصلي */
  /*animation: none; /* إعادة تعيين أي أنيميشن RTL */
  /* الحفاظ على الموقع الأصلي */
  /*left: 0 !important;
  /*right: auto !important;
  /* السماح للأنيميشن بالعمل */
 /* transform-origin: center;
}*/

/* أزرار التنقل في Swiper - استثناء جميع الأنواع */
html[dir="rtl"] .service-three-button-prev,
html[dir="rtl"] .service-three-button-next,
html[dir="rtl"] .blog-three-button-prev,
html[dir="rtl"] .blog-three-button-next,
html[dir="rtl"] .testimonials-three-btn-prev,
html[dir="rtl"] .testimonials-three-btn-next,
html[dir="rtl"] .testimonials-two-button-prev,
html[dir="rtl"] .testimonials-two-button-next,
html[dir="rtl"] .banner-two-swiper-button-prev,
html[dir="rtl"] .banner-two-swiper-button-next {
  direction: ltr;
}

/* استثناء أي عنصر يحتوي على "button-prev" أو "button-next" */
html[dir="rtl"] [class*="button-prev"],
html[dir="rtl"] [class*="button-next"] {
  direction: ltr;
}

/* Normalize lists alignment */
html[dir="rtl"] ul,
html[dir="rtl"] ol {
  padding-right: 1rem;
  padding-left: 0;
}


