/* Arabic / RTL overrides for Future Lights CMS */
html[dir="rtl"] body,
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"] .navbar,
html[dir="rtl"] .navbar-brand {
  font-family: "Mirza", serif !important;
}

/* Mirza reads smaller than Latin UI fonts — bump Arabic sizes */
html[dir="rtl"] {
  font-size: 20px;
}

html[dir="rtl"] body {
  text-align: right;
  font-size: 1.25rem;
  line-height: 1.55;
}

html[dir="rtl"] p,
html[dir="rtl"] li,
html[dir="rtl"] .stat-extra,
html[dir="rtl"] .testimonial-text p,
html[dir="rtl"] .service-item p {
  font-size: 1.35rem !important;
  line-height: 1.55 !important;
}

html[dir="rtl"] .btn,
html[dir="rtl"] .form-control,
html[dir="rtl"] .form-select,
html[dir="rtl"] .nav-link,
html[dir="rtl"] .dropdown-item,
html[dir="rtl"] .form-floating > label {
  font-size: 1.2rem;
}

html[dir="rtl"] h1 { font-size: calc(1.55rem + 1.6vw); }
html[dir="rtl"] h2 { font-size: calc(1.4rem + 0.9vw); }
html[dir="rtl"] h3 { font-size: 1.7rem; }
html[dir="rtl"] h4 { font-size: 1.5rem; }
html[dir="rtl"] h5 { font-size: 1.35rem; }
html[dir="rtl"] h6 { font-size: 1.25rem; }

/* Home hero banner — Mirza-adjusted display size */
html[dir="rtl"] .hero-header h1.display-1,
html[dir="rtl"] h1.display-1 {
  font-size: clamp(2.35rem, 1.7rem + 4.2vw, 4.75rem) !important;
  line-height: 1.15 !important;
  font-weight: 700 !important;
}

html[dir="rtl"] .hero-header h5 {
  font-size: clamp(1.15rem, 0.95rem + 0.8vw, 1.45rem) !important;
}

html[dir="rtl"] .navbar-nav .nav-link {
  font-size: 1.2rem;
}

/* Match English icon size in “Why People Choose Us” (fa-5x scales with body font) */
html[dir="rtl"] i.fa-5x {
  font-size: 70px !important;
}

/* Why People Choose Us — slightly smaller Arabic copy */
html[dir="rtl"] .features-section h4 {
  font-size: 1.3rem !important;
  line-height: 1.4 !important;
}

html[dir="rtl"] .features-section p {
  font-size: 1.15rem !important;
  line-height: 1.5 !important;
}

/* Footer: smaller than main content */
html[dir="rtl"] .footer {
  font-size: 0.95rem;
}

html[dir="rtl"] .footer p,
html[dir="rtl"] .footer .btn.btn-link,
html[dir="rtl"] .footer a,
html[dir="rtl"] .footer .copyright {
  font-size: 0.95rem !important;
  line-height: 1.45 !important;
}

html[dir="rtl"] .footer h5 {
  font-size: 1.05rem !important;
  line-height: 1.4 !important;
}

html[dir="rtl"] .footer .btn.btn-link::before {
  font-size: 0.85rem;
}

.lang-switch {
  gap: 0.25rem;
  white-space: nowrap;
  flex-shrink: 0;
  z-index: 10;
}

.lang-switch .lang-btn {
  font-size: 0.85rem;
  font-weight: 700;
  color: #03201F;
  text-decoration: none;
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
  opacity: 0.55;
}

.lang-switch .lang-btn.active,
.lang-switch .lang-btn:hover {
  opacity: 1;
  color: var(--bs-primary, #0D6B68);
  background: rgba(13, 107, 104, 0.08);
}

.lang-switch .lang-sep {
  opacity: 0.35;
  font-size: 0.8rem;
}

/* Hero carousel geometry for RTL */
html[dir="rtl"] .header-carousel {
  padding: 45px 0 45px 90px;
}

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

html[dir="rtl"] .header-carousel .owl-dots {
  right: auto;
  left: 38px;
}

/* Owl fade animations leave visibility:hidden on active slides in RTL */
.testimonial-carousel .owl-item,
.header-carousel .owl-item {
  visibility: visible !important;
}

.testimonial-carousel .owl-item.active,
.header-carousel .owl-item.active {
  opacity: 1 !important;
}

html[dir="rtl"] .floating-actions {
  left: 1rem;
  right: auto;
}

/* Keep scroll-to-top on the right so it does not overlap chat icons */
html[dir="rtl"] .back-to-top {
  right: 30px;
  left: auto;
}

@media (max-width: 576px) {
  html[dir="rtl"] .back-to-top {
    right: 12px;
    left: auto;
  }
}

html[dir="rtl"] .newsletter .position-absolute.top-0.end-0 {
  left: 0.5rem;
  right: auto !important;
}

html[dir="rtl"] .newsletter input.form-control {
  padding-left: 3.5rem;
  padding-right: 1.25rem;
}

/* Footer link columns: align heading + links */
.footer h5 {
  text-align: start;
}

.footer .btn.btn-link {
  text-align: start !important;
  width: 100%;
}

html[dir="rtl"] .footer .btn.btn-link::before {
  content: "\f104";
  margin-right: 0;
  margin-left: 10px;
}

html[dir="rtl"] .footer .footer-menu a {
  margin-right: 0;
  margin-left: 15px;
  padding-right: 0;
  padding-left: 15px;
  border-right: none;
  border-left: 1px solid rgba(255, 255, 255, .1);
}

html[dir="rtl"] .footer .footer-menu a:last-child {
  margin-left: 0;
  padding-left: 0;
  border-left: none;
}

@media (max-width: 991.98px) {
  .lang-switch {
    margin-inline-end: 0.35rem;
    position: relative;
    z-index: 11;
  }

  .navbar .navbar-toggler {
    position: relative;
    z-index: 11;
  }

  html[dir="rtl"] .header-carousel {
    padding: 45px 0;
  }
}
