/* ============================================
   RTL (Arabic) Overrides
   ============================================ */

/* ---------- Base RTL ---------- */
html[dir="rtl"] {
  font-family: 'Tajawal', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Force LTR for phone numbers & emails so digits don't reverse */
html[dir="rtl"] a[href^="tel:"],
html[dir="rtl"] a[href^="mailto:"],
html[dir="rtl"] .btn--hero-phone span,
html[dir="rtl"] .sd__widget-phone a,
html[dir="rtl"] .sd__widget-email a,
html[dir="rtl"] .footer__contact a[href^="tel:"],
html[dir="rtl"] .contact__detail a[href^="tel:"] {
  direction: ltr;
  unicode-bidi: isolate;
  display: inline-block;
}

html[dir="rtl"] body,
html[dir="rtl"] .btn,
html[dir="rtl"] input,
html[dir="rtl"] textarea,
html[dir="rtl"] select {
  font-family: 'Tajawal', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

html[dir="rtl"] h1,
html[dir="rtl"] h2,
html[dir="rtl"] h3,
html[dir="rtl"] h4,
html[dir="rtl"] h5,
html[dir="rtl"] h6,
html[dir="rtl"] .hero__title,
html[dir="rtl"] .section-header__title {
  font-family: 'Tajawal', 'Playfair Display', Georgia, serif;
}

/* ---------- Header ---------- */
html[dir="rtl"] .header__nav {
  direction: rtl;
}

html[dir="rtl"] .header__inner {
  /* flex-direction: row-reverse; */
}

html[dir="rtl"] .header__nav {
  margin-left: 0;
  margin-right: auto;
}

html[dir="rtl"] .header__actions {
  /* flex-direction: row-reverse; */
}

html[dir="rtl"] .header__burger {
  margin-left: 0;
  margin-right: 1rem;
}

/* ---------- Hero ---------- */
html[dir="rtl"] .hero__center {
  direction: rtl;
}

html[dir="rtl"] .hero__bottom-bar {
  direction: rtl;
}

html[dir="rtl"] .hero__beam::after {
  animation-name: beamSweepRtl;
}

@keyframes beamSweepRtl {
  0%   { right: -30%; left: auto; opacity: 0; }
  15%  { opacity: 1; }
  85%  { opacity: 1; }
  100% { right: 120%; left: auto; opacity: 0; }
}

/* ---------- Hero Search RTL ---------- */
html[dir="rtl"] .hero-search {
  direction: rtl;
}

html[dir="rtl"] .hero-search__icon {
  left: auto;
  right: 18px;
}

html[dir="rtl"] .hero-search__input {
  padding: 16px 46px 16px 16px;
  text-align: right;
}

html[dir="rtl"] .hero-search__btn {
  border-radius: 16px 0 0 16px;
}

html[dir="rtl"] .hero-search__item {
  /* flex-direction: row-reverse; */
  text-align: right;
}

@media (max-width: 768px) {
  html[dir="rtl"] .hero-search__btn {
    border-radius: 0 0 14px 14px;
  }
}

/* ---------- Section Headers ---------- */
html[dir="rtl"] .section-header {
  text-align: center;
}

/* ---------- Cards & Grid Items ---------- */
html[dir="rtl"] .help-card,
html[dir="rtl"] .service-card,
html[dir="rtl"] .testimonial-card,
html[dir="rtl"] .blog-card,
html[dir="rtl"] .career-card,
html[dir="rtl"] .careers-perk {
  text-align: right;
}

/* ---------- Features Section ---------- */
html[dir="rtl"] .features__inner {
  /* flex-direction: row-reverse; */
}

html[dir="rtl"] .features__content {
  text-align: right;
}

html[dir="rtl"] .feature-item {
  /* flex-direction: row-reverse; */
  text-align: right;
}

html[dir="rtl"] .feature-item__icon {
  margin-right: 0;
  margin-left: 1rem;
}

html[dir="rtl"] .features__float-card--1 {
  left: auto;
  right: -20px;
}

html[dir="rtl"] .features__float-card--2 {
  right: auto;
  left: -20px;
}

/* ---------- About Intro ---------- */
html[dir="rtl"] .about-intro__grid {
  direction: rtl;
}

html[dir="rtl"] .about-intro__content {
  text-align: right;
}

/* ---------- Contact Section ---------- */
html[dir="rtl"] .contact__inner {
  /* flex-direction: row-reverse; */
}

html[dir="rtl"] .contact__info {
  text-align: right;
}

html[dir="rtl"] .contact__detail {
  /* flex-direction: row-reverse; */
  text-align: right;
}

html[dir="rtl"] .contact__detail-icon {
  margin-right: 0;
  margin-left: 1rem;
}

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

/* ---------- Form ---------- */
html[dir="rtl"] .contact__form label {
  text-align: right;
}

html[dir="rtl"] .contact__form input,
html[dir="rtl"] .contact__form textarea,
html[dir="rtl"] .contact__form select {
  text-align: right;
  direction: rtl;
}

/* ---------- Service Card Features ---------- */
html[dir="rtl"] .service-card__features li {
  /* flex-direction: row-reverse; */
  text-align: right;
}

html[dir="rtl"] .service-card__features li i {
  margin-right: 0;
  margin-left: 0.5rem;
}

html[dir="rtl"] .service-card__link {
  /* flex-direction: row-reverse; */
}

html[dir="rtl"] .service-card__link i {
  transform: scaleX(-1);
}

html[dir="rtl"] .service-card__actions .fa-chevron-right {
  transform: scaleX(-1);
}

/* ---------- Blog Card ---------- */
html[dir="rtl"] .blog-card__body {
  text-align: right;
}

html[dir="rtl"] .blog-card__link i {
  transform: scaleX(-1);
}

/* ---------- Help Card ---------- */
html[dir="rtl"] .help-card__link i {
  transform: scaleX(-1);
}

/* ---------- Testimonials ---------- */
html[dir="rtl"] .testimonial-card__author {
  /* flex-direction: row-reverse; */
  text-align: right;
}

html[dir="rtl"] .testimonial-card__avatar {
  margin-right: 0;
  margin-left: 1rem;
}

/* ---------- Career Card ---------- */
html[dir="rtl"] .career-card__header {
  /* flex-direction: row-reverse; */
}

html[dir="rtl"] .career-card__meta {
  direction: rtl;
}

html[dir="rtl"] .career-card__meta span i {
  margin-right: 0;
  margin-left: 0.4rem;
}

/* ---------- Footer ---------- */
html[dir="rtl"] .footer__grid {
  direction: rtl;
}

html[dir="rtl"] .footer__brand {
  text-align: right;
}

html[dir="rtl"] .footer__col {
  text-align: right;
}

html[dir="rtl"] .footer__contact li {
  /* flex-direction: row-reverse; */
  text-align: right;
}

html[dir="rtl"] .footer__contact li i {
  margin-right: 0;
  margin-left: 0.75rem;
}

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

/* ---------- Page Banner ---------- */
html[dir="rtl"] .page-banner__inner {
  text-align: center;
}

html[dir="rtl"] .page-banner__breadcrumb {
  justify-content: center;
}

html[dir="rtl"] .page-banner__breadcrumb i {
  transform: scaleX(-1);
}

/* ---------- Stats ---------- */
html[dir="rtl"] .stats-grid {
  direction: rtl;
}

/* ---------- CTA Section ---------- */
html[dir="rtl"] .cta-section__inner {
  text-align: center;
}

/* ---------- Back to Top RTL position ---------- */
html[dir="rtl"] .back-to-top {
  right: auto;
  left: 2rem;
}

/* ---------- WhatsApp Float RTL ---------- */
html[dir="rtl"] .whatsapp-float {
  left: auto;
  right: 30px;
}

/* ---------- Career Form RTL ---------- */
html[dir="rtl"] .career-form-wrap {
  text-align: right;
}

html[dir="rtl"] .file-upload__content {
  direction: rtl;
}

/* ---------- Service Card RTL ---------- */
html[dir="rtl"] .service-card {
  text-align: right;
}

html[dir="rtl"] .service-card::before {
  left: auto;
  right: 0;
}

html[dir="rtl"] .service-card__features li {
  /* flex-direction: row-reverse; */
  justify-content: flex-end;
}

/* ---------- Service Detail RTL ---------- */
html[dir="rtl"] .sd__main { text-align: right; }
html[dir="rtl"] .sd__subtitle { flex-direction: row-reverse; justify-content: flex-end; }
html[dir="rtl"] .sd__checklist li { flex-direction: row-reverse; justify-content: flex-end; }
html[dir="rtl"] .sd__step { flex-direction: row-reverse; text-align: right; }
html[dir="rtl"] .sd__faq-item summary { flex-direction: row-reverse; text-align: right; }
html[dir="rtl"] .sd__widget { text-align: right; }
html[dir="rtl"] .sd__widget h4 { flex-direction: row-reverse; justify-content: flex-end; }
html[dir="rtl"] .sd__widget-list li { flex-direction: row-reverse; }
html[dir="rtl"] .sd__widget-phone a,
html[dir="rtl"] .sd__widget-email a { flex-direction: row-reverse; justify-content: flex-end; }

/* ---------- Inquiry Form RTL ---------- */
html[dir="rtl"] .inquiry__form-wrap {
  text-align: right;
}

html[dir="rtl"] .inquiry-form__heading i {
  margin-right: 0;
  margin-left: 8px;
}

html[dir="rtl"] .inquiry__feature {
  /* flex-direction: row-reverse; */
  text-align: right;
}

/* ---------- Booking Popup RTL ---------- */
html[dir="rtl"] .booking-popup__close {
  right: auto;
  left: 16px;
}
html[dir="rtl"] .booking-popup__field label {
  /* flex-direction: row-reverse; */
  justify-content: flex-end;
}
html[dir="rtl"] .booking-popup__field input,
html[dir="rtl"] .booking-popup__field textarea {
  text-align: right;
}
/* Step connector RTL */
html[dir="rtl"] .booking-step + .booking-step::before {
  left: auto;
  right: -18px;
}
/* Back button arrow */
html[dir="rtl"] .booking-popup__back i.fa-arrow-left {
  transform: scaleX(-1);
}
html[dir="rtl"] #bookingStep1Next i.fa-arrow-right {
  transform: scaleX(-1);
}
/* Inquiry form arrows */
html[dir="rtl"] .inquiry-form__next i.fa-arrow-right {
  transform: scaleX(-1);
}
html[dir="rtl"] .inquiry-form__prev i.fa-arrow-left {
  transform: scaleX(-1);
}
/* Submit button – keep paper-plane icon on left in RTL */
html[dir="rtl"] .inquiry-form__submit {
  display: inline-flex;
  flex-direction: row-reverse;
  align-items: center;
  gap: 8px;
}
/* Nurse card scroll */
html[dir="rtl"] .nurse-list {
  padding-right: 0;
  padding-left: 4px;
}
/* Nurse card text */
html[dir="rtl"] .nurse-card__name,
html[dir="rtl"] .nurse-card__meta {
  text-align: right;
}
/* Nurse detail description RTL */
html[dir="rtl"] .nurse-profile__summary {
  border-left: none;
  border-right: 4px solid var(--color-primary);
  border-radius: var(--radius-sm, 8px) 0 0 var(--radius-sm, 8px);
}
/* Blog detail RTL */
html[dir="rtl"] .blog-detail__body ul,
html[dir="rtl"] .blog-detail__body ol {
  padding-left: 0;
  padding-right: 24px;
}
html[dir="rtl"] .blog-card__link i {
  transform: scaleX(-1);
}
/* Step pane animation RTL */
html[dir="rtl"] .booking-pane.active {
  animation-name: bookingFadeInRtl;
}
@keyframes bookingFadeInRtl {
  from { opacity: 0; transform: translateX(-12px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ---------- Tag Page RTL ---------- */
html[dir="rtl"] .agency-card__area {
  /* flex-direction: row-reverse; */
}

html[dir="rtl"] .agency-card__actions {
  /* flex-direction: row-reverse; */
}

html[dir="rtl"] .tag-desc__main {
  text-align: right;
}

html[dir="rtl"] .tag-pill {
  /* flex-direction: row-reverse; */
}

/* ---------- Mobile RTL Responsive ---------- */
@media (max-width: 768px) {
  html[dir="rtl"] .header__inner {
    flex-direction: row;
  }

  html[dir="rtl"] .features__inner {
    flex-direction: column;
  }

  html[dir="rtl"] .contact__inner {
    flex-direction: column;
  }

  html[dir="rtl"] .about-intro__grid {
    direction: ltr;
  }

  html[dir="rtl"] .about-intro__content {
    text-align: right;
  }
}
