/* RTL/LTR Enhanced Support */

/* Font families for different languages */
body.rtl {
  font-family: "Tajawal", "Almarai", -apple-system, BlinkMacSystemFont,
    sans-serif;
}

body.ltr {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Direction-aware utility classes */
.text-start-dir {
  text-align: left;
}

body.rtl .text-start-dir {
  text-align: right;
}

.text-end-dir {
  text-align: right;
}

body.rtl .text-end-dir {
  text-align: left;
}

/* Language button styles */
.lang-btn {
  min-width: 50px;
  transition: all 0.3s ease;
  border-radius: 20px !important;
}

.lang-btn.active {
  background-color: #6366f1 !important;
  color: white !important;
  border-color: #6366f1 !important;
}

/* Bootstrap RTL fixes */
body.rtl .navbar-nav {
  text-align: right;
}

body.rtl .navbar-brand {
  margin-right: 0;
  margin-left: auto;
}

body.rtl .me-3 {
  margin-right: 0 !important;
  margin-left: 1rem !important;
}

body.rtl .ms-1 {
  margin-left: 0 !important;
  margin-right: 0.25rem !important;
}

body.rtl .ms-2 {
  margin-left: 0 !important;
  margin-right: 0.5rem !important;
}

/* Arrow direction fix for RTL */
body.rtl .fa-arrow-left {
  transform: rotate(180deg);
}

body.rtl .fas.fa-arrow-left:before {
  content: "\f061"; /* arrow-right */
}

/* Flexbox direction fixes */
body.rtl .d-flex {
  direction: rtl;
}

body.rtl .justify-content-end {
  justify-content: flex-start !important;
}

/* Form controls RTL support */
body.rtl input,
body.rtl textarea,
body.rtl select {
  text-align: right;
}

/* Navigation dropdown RTL */
body.rtl .dropdown-menu {
  right: 0;
  left: auto;
}

/* Hero section text alignment */
body.rtl .hero-content {
  text-align: right !important;
}

body.ltr .hero-content {
  text-align: left !important;
}

/* Button spacing RTL */
body.rtl .hero-buttons .btn:not(:last-child) {
  margin-right: 0;
  margin-left: 1rem;
}

/* Responsive RTL adjustments */
@media (max-width: 767.98px) {
  body.rtl .text-center,
  body.ltr .text-center {
    text-align: center !important;
  }

  body.rtl .hero-content,
  body.ltr .hero-content {
    text-align: center !important;
  }
}
.lang-btn {
  min-width: 45px;
  transition: all 0.3s ease;
}

.lang-btn.active {
  background-color: #007bff;
  color: white;
  border-color: #007bff;
}

/* Direction-aware margins */
.me-dir-2 {
  margin-right: 0.5rem;
}
body.rtl .me-dir-2 {
  margin-right: 0;
  margin-left: 0.5rem;
}

.ms-dir-2 {
  margin-left: 0.5rem;
}
body.rtl .ms-dir-2 {
  margin-left: 0;
  margin-right: 0.5rem;
}

/* Direction-aware padding */
.pe-dir-3 {
  padding-right: 1rem;
}
body.rtl .pe-dir-3 {
  padding-right: 0;
  padding-left: 1rem;
}

.ps-dir-3 {
  padding-left: 1rem;
}
body.rtl .ps-dir-3 {
  padding-left: 0;
  padding-right: 1rem;
}

/* Form inputs RTL support */
body.rtl input,
body.rtl textarea,
body.rtl select {
  text-align: right;
}

/* Navigation RTL support */
body.rtl .navbar-nav {
  text-align: right;
}

/* Bootstrap RTL overrides */
body.rtl .dropdown-menu {
  right: 0;
  left: auto;
}

body.rtl .navbar-brand {
  margin-right: 0;
  margin-left: auto;
}
