/* ==================== RTL OVERRIDES (Arabic / العربية) ==================== */

html[dir="rtl"],
body[dir="rtl"],
[dir="rtl"] {
  direction: rtl;
  text-align: right;
}

[dir="rtl"] body {
  font-family: "Noto Sans Arabic", "Poppins", sans-serif;
}

/* Header & Nav */
[dir="rtl"] #header .container {
  flex-direction: row;
}

[dir="rtl"] #header .navbar {
  flex-direction: row;
}

[dir="rtl"] #header .logo {
  flex-grow: 1;
  text-align: right;
}

[dir="rtl"] #header .menu-toggle {
  right: auto;
  left: 20px;
}

[dir="rtl"] #header .dropdown-menu {
  right: 0;
  left: auto;
  text-align: right;
}

[dir="rtl"] #header .lang-switcher {
  position: relative;
  z-index: 1002;
  margin-left: 0;
  margin-right: 10px;
}

[dir="rtl"] #header .lang-dropdown {
  top: calc(100% + 8px);
  right: auto;
  left: 0;
  min-width: 170px;
  direction: rtl;
  text-align: right;
  z-index: 1003;
}

[dir="rtl"] #header .lang-option {
  direction: rtl;
  text-align: right;
  justify-content: flex-start;
}

@media (min-width: 769px) {
  [dir="rtl"] #header .container {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    column-gap: 18px;
  }

  [dir="rtl"] #header .logo {
    flex-grow: 0;
    justify-self: end;
  }

  [dir="rtl"] #header nav {
    justify-self: center;
    min-width: 0;
  }

  [dir="rtl"] #header .navbar {
    justify-content: center;
  }

  [dir="rtl"] #header .lang-switcher {
    justify-self: start;
    margin-right: 0;
  }
}

/* Slider */
[dir="rtl"] .slider {
  justify-content: flex-end;
}

[dir="rtl"] .slider-content {
  flex-direction: row;
}

[dir="rtl"] .slider-dots {
  text-align: center;
}

/* Sections */
[dir="rtl"] .services-section,
[dir="rtl"] .why-us-section,
[dir="rtl"] .reviews-section,
[dir="rtl"] .gallery-section,
[dir="rtl"] .faq-section,
[dir="rtl"] .packages-section,
[dir="rtl"] .birthday-page-header,
[dir="rtl"] .about-container,
[dir="rtl"] .contact-section,
[dir="rtl"] main {
  direction: rtl;
  text-align: right;
}

[dir="rtl"] .services-title,
[dir="rtl"] .why-title,
[dir="rtl"] .section-title-reviews,
[dir="rtl"] .section-title,
[dir="rtl"] .packages-section-title,
[dir="rtl"] .contact-section h2,
[dir="rtl"] #faq-heading,
[dir="rtl"] .birthday-page-header h1 {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

[dir="rtl"] .faq-question {
  flex-direction: row-reverse;
  text-align: right;
}

[dir="rtl"] .review-card {
  text-align: right;
}

[dir="rtl"] .review-name {
  flex-direction: row-reverse;
  justify-content: flex-end;
}

/* Footer */
[dir="rtl"] .site-footer,
[dir="rtl"] .footer-container,
[dir="rtl"] .footer-links,
[dir="rtl"] .footer-contact,
[dir="rtl"] .footer-social {
  direction: rtl;
  text-align: right;
}

[dir="rtl"] .footer-links ul,
[dir="rtl"] .footer-contact ul {
  padding-right: 0;
  padding-left: 0;
}

[dir="rtl"] .footer-contact li {
  flex-direction: row-reverse;
  justify-content: flex-end;
}

[dir="rtl"] .footer-contact li i {
  margin-right: 0;
  margin-left: 8px;
}

[dir="rtl"] .social-icons {
  justify-content: flex-end;
}

/* Back arrow */
[dir="rtl"] .back-arrow {
  transform: scaleX(-1);
}

/* Mobile menu */
@media (max-width: 768px) {
  /* In RTL, flex-direction: row-reverse on .container cancels out with the
     RTL writing direction (two reversals = same as LTR row). Override to row
     so that order:1(logo) lands rightmost and order:3(toggle) lands leftmost. */
  [dir="rtl"] #header .container {
    flex-direction: row;
  }

  [dir="rtl"] #header .navbar {
    order: 4;
    flex-direction: column;
    background: #fff;
    position: absolute;
    top: 80px;
    width: 100%;
    display: none;
    z-index: 1000;
    right: 0;
    left: auto;
    text-align: center;
  }

  [dir="rtl"] #header .navbar li {
    text-align: center;
    padding: 9px 0;
  }

  [dir="rtl"] #header .navbar.active {
    display: flex;
  }

  [dir="rtl"] #header .menu-toggle {
    left: auto;
    right: auto;
  }

  [dir="rtl"] #header .lang-dropdown {
    top: calc(100% + 8px);
    right: auto;
    left: 0;
  }

  [dir="rtl"] #header .lang-switcher {
    position: relative;
    z-index: 1002;
  }

  [dir="rtl"] #header .dropdown-menu {
    text-align: right;
  }
}
