/* Right-to-left overrides, applied only under [dir="rtl"] (Arabic).
   The theme predates logical properties and pins things with physical left/right
   everywhere, so each of those has to be mirrored explicitly. Anything written
   for this project already uses logical properties and needs nothing here. */

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

/* --- header ------------------------------------------------------------- */

[dir="rtl"] .header-top-item .header-top-right {
  text-align: left;
}

[dir="rtl"] .header-top-item .header-top-left ul li {
  margin-right: 0;
  margin-left: 10px;
}

[dir="rtl"] .header-top-item .header-top-left ul li a i,
[dir="rtl"] .header-top-item .header-top-left ul li i {
  margin-right: 0;
  margin-left: 2px;
}

[dir="rtl"] .header-top-item .header-top-right ul li {
  margin-right: 0;
  margin-left: 5px;
}

/* Floating WhatsApp button sits on the opposite edge. */
[dir="rtl"] .fixed {
  right: auto;
  left: 30px;
}

[dir="rtl"] .fixed .call-us i {
  margin-right: 0;
  margin-left: 5px;
}

[dir="rtl"] .back-to-top-btn {
  right: auto;
  left: 20px;
}

/* --- navigation --------------------------------------------------------- */

[dir="rtl"] .main-nav nav .navbar-nav .nav-item .dropdown-menu {
  border-left: 0;
  border-right: 3px solid #0046c0;
  text-align: right;
}

/* Second-level menus open to the left of their parent. */
[dir="rtl"] .main-nav nav .navbar-nav .nav-item .dropdown-menu .dropdown-menu {
  left: auto;
  right: 100%;
}

[dir="rtl"] .mean-bar-toggle {
  right: auto;
  left: 15px;
}

[dir="rtl"] .mobile-drawer .mobile-submenu {
  padding: 0 16px 0 0;
}

[dir="rtl"] .language-select {
  text-align: right;
}

/* --- content ------------------------------------------------------------ */

[dir="rtl"] ul,
[dir="rtl"] ol {
  padding-right: 1rem;
  padding-left: 0;
}

[dir="rtl"] .service-details-inner,
[dir="rtl"] .card-body,
[dir="rtl"] .sidebar-box,
[dir="rtl"] .treatment-box a,
[dir="rtl"] .post-item,
[dir="rtl"] .blog-details-item,
[dir="rtl"] .footer-item {
  text-align: right;
}

/* Bootstrap's accordion chevron is pinned right; move it and flip the row. */
[dir="rtl"] .accordion-button {
  text-align: right;
  flex-direction: row-reverse;
}

[dir="rtl"] .accordion-button::after {
  margin-right: auto;
  margin-left: 0;
}

[dir="rtl"] .doctor-card .doctor-name,
[dir="rtl"] .doctor-card .doctor-designation,
[dir="rtl"] .doctor-card .doctor-description {
  text-align: right;
}

[dir="rtl"] .contact-form label {
  text-align: right;
}

/* Carousel arrows swap sides so "next" still points forward in reading order. */
[dir="rtl"] .owl-nav .owl-prev {
  transform: scaleX(-1);
}

[dir="rtl"] .owl-nav .owl-next {
  transform: scaleX(-1);
}

/* The logo, doctor photography and icons must not be mirrored. */
[dir="rtl"] img,
[dir="rtl"] .logo,
[dir="rtl"] .navbar-brand {
  transform: none;
}

/* --- fonts -------------------------------------------------------------- */
/* System stacks rather than webfonts: no extra network request, and Windows,
   macOS, Android and iOS all ship faces covering these scripts. */

html[lang="ar"] body,
html[lang="ar"] .language-select {
  font-family: "Noto Sans Arabic", "Segoe UI", Tahoma, "Geeza Pro", "Arial", sans-serif;
}

html[lang="hi"] body {
  font-family: "Noto Sans Devanagari", "Nirmala UI", "Mangal", sans-serif;
}

/* Mirror the offset appointment panel so it stays inside the RTL page. */
@media (min-width: 992px) {
  [dir="rtl"] .speciality-right .speciality-emergency {
    left: auto;
    right: -70px;
  }
}
[dir="rtl"] .copyright-area .row.w-100 {
  margin-left: 0;
  margin-right: 0;
}
