/* ─── LANGUAGE SWITCHER ─── */

/* Desktop pill */
.lang-switcher {
  display: none;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: rgba(255,255,255,0.1);
  border: 1.5px solid rgba(255,255,255,0.22);
  border-radius: 50px;
  padding: 4px 5px 4px 10px;
  flex-shrink: 0;
  transition: border-color 0.2s;
    display: none;
}

.lang-switcher:hover {
  border-color: rgba(255,255,255,0.4);
}

/* Globe icon */
.lang-globe {
  color: rgba(255,255,255,0.55);
  flex-shrink: 0;
  margin-right: 4px;
}

/* Divider between EN and AR */
.lang-sep {
  display: inline-block;
  width: 1px;
  height: 14px;
  background: rgba(255,255,255,0.22);
  flex-shrink: 0;
  margin: 0 2px;
}

.lang-btn {
  font-family: 'Zain', sans-serif;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 5px 12px;
  border: none;
  background: transparent;
  color: rgba(255,255,255,0.45);
  border-radius: 40px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  line-height: 1.2;
  white-space: nowrap;
}

.lang-btn.active {
  background: #ffffff;
  color: #344c98;
  box-shadow: 0 1px 6px rgba(0,0,0,0.18);
}

.lang-btn:hover:not(.active) {
  color: rgba(255,255,255,0.9);
}

/* ── Mobile lang switcher ── */
.mobile-lang-wrap {
  display: flex;
  justify-content: center;
  padding: 12px 0 4px;
  margin-top: 6px;
  border-top: 1px solid rgba(255,255,255,0.15);
}

.lang-switcher-mobile {
  background: #f4f6ff;
  border: 1.5px solid rgba(52,76,152,0.18);
  padding: 5px 8px 5px 14px;
  width: 100%;
  justify-content: center;
  gap: 4px;
  border-radius: 14px;
}

.lang-switcher-mobile:hover {
  border-color: rgba(52,76,152,0.35);
}

.lang-switcher-mobile .lang-globe {
  color: rgba(52,76,152,0.45);
  margin-right: 6px;
}

.lang-switcher-mobile .lang-sep {
  background: rgba(52,76,152,0.18);
  height: 16px;
}

.lang-switcher-mobile .lang-btn {
  font-size: 15px;
  padding: 9px 22px;
  color: rgba(52,76,152,0.4);
}

.lang-switcher-mobile .lang-btn.active {
  background: #344c98;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(52,76,152,0.3);
}

.lang-switcher-mobile .lang-btn:hover:not(.active) {
  color: #344c98;
}

/* ─── RTL LAYOUT OVERRIDES ─── */

/* Carousel must always run LTR — slides are positioned with translateX(-N*100%)
   which breaks when the flex container reverses under dir="rtl" */
[dir="rtl"] .carousel,
[dir="rtl"] .carousel-track {
  direction: ltr;
}

/* WHTMA steps — RTL: step 1 on right, dots mirror same order.
   scrollLeft is negative when scrolling left; Math.abs() in JS handles that. */
[dir="rtl"] #whtmaCards {
  direction: rtl;
}
[dir="rtl"] .whtma-step-card {
  text-align: right;
}
[dir="rtl"] .whtma-mobile-tops {
  direction: rtl;
}

/* Navbar */
[dir="rtl"] .navbar-powered {
  border-left: none;
  border-right: 1px solid rgba(255,255,255,.25);
  padding-left: 0;
  padding-right: 10px;
}

/* Form icons — flip from left to right */
[dir="rtl"] .form-input-wrap .fi-icon {
  left: auto;
  right: 14px;
}

[dir="rtl"] .form-input-wrap input,
[dir="rtl"] .form-input-wrap textarea {
  padding-left: 14px;
  padding-right: 40px;
  text-align: right;
}

[dir="rtl"] .form-input-wrap textarea {
  padding-top: 14px;
  padding-bottom: 14px;
  padding-left: 14px;
  padding-right: 40px;
}

[dir="rtl"] .form-char-counter {
  right: auto;
  left: 14px;
}

/* Flip arrow icons on enroll & nav buttons */
[dir="rtl"] .tc-btn svg {
  transform: scaleX(-1);
}

[dir="rtl"] .em-btn-continue svg,
[dir="rtl"] .em-btn-prev svg {
  transform: scaleX(-1);
}

/* Service card list */
[dir="rtl"] .service-card-list {
  padding-right: 20px;
  padding-left: 0;
}

/* Training focus list */
[dir="rtl"] .tc-focus-list {
  padding-right: 18px;
  padding-left: 0;
}

/* WHTMA items — parent is now direction:rtl so icon naturally sits on the
   right and text flows left; no flex-direction override needed */

/* Partners sub text centering */
[dir="rtl"] .partners-sub {
  text-align: center;
}

/* AI feature text */
[dir="rtl"] .ai-feature-text {
  text-align: right;
}

/* Tech tags alignment */
[dir="rtl"] .tech-tags {
  justify-content: flex-end;
}

/* Enroll modal form */
[dir="rtl"] .em-form-group {
  text-align: right;
}

[dir="rtl"] .em-form-group input,
[dir="rtl"] .em-form-group select {
  text-align: right;
}

[dir="rtl"] .em-reg-info {
  text-align: right;
}

[dir="rtl"] .em-summary-info {
  text-align: right;
}

[dir="rtl"] .em-consent-info {
  text-align: right;
}

[dir="rtl"] .conf-email-text {
  text-align: right;
}

/* Footer */
[dir="rtl"] .footer-brand p {
  text-align: right;
}

[dir="rtl"] .footer-col {
  text-align: right;
}

[dir="rtl"] .footer-col ul {
  padding-right: 0;
}

/* Mobile menu */
[dir="rtl"] .mobile-menu {
  text-align: right;
}

/* Contact form label */
[dir="rtl"] .form-group label {
  text-align: right;
  display: block;
}

/* Whtma badge & training badge centering */
[dir="rtl"] .whtma-badge,
[dir="rtl"] .training-badge,
[dir="rtl"] .contact-badge,
[dir="rtl"] .tech-badge,
[dir="rtl"] .partners-badge {
  flex-direction: row-reverse;
}

/* Partners CTA left side */
[dir="rtl"] .partners-cta-left {
  flex-direction: row-reverse;
  text-align: right;
}

/* Contact channels */
[dir="rtl"] .contact-channel {
  flex-direction: row;
  text-align: right;
}

[dir="rtl"] .contact-available {
  flex-direction: row;
  text-align: right;
}

/* TC target row */
[dir="rtl"] .tc-target-row {
  flex-direction: row;
  text-align: right;
}

/* AI feature cards */
[dir="rtl"] .ai-feature-card {
  flex-direction: row-reverse;
}

/* Tech card top row */
[dir="rtl"] .tech-card-top {
  flex-direction: row-reverse;
}

/* Conf detail row */
[dir="rtl"] .conf-detail-row {
  flex-direction: row-reverse;
}

[dir="rtl"] .conf-detail-left {
  flex-direction: row-reverse;
}

/* Em step labels */
[dir="rtl"] .em-steps-inner {
  direction: rtl;
}

/* Em header inner */
[dir="rtl"] .em-header-inner {
  flex-direction: row-reverse;
}

[dir="rtl"] .em-header-left {
  flex-direction: row-reverse;
}

[dir="rtl"] .em-header-info {
  text-align: right;
}

/* Em summary rows */
[dir="rtl"] .em-summary-row {
  flex-direction: row-reverse;
}

[dir="rtl"] .em-summary-header {
  flex-direction: row-reverse;
}

[dir="rtl"] .em-consent-heading {
  flex-direction: row-reverse;
}

[dir="rtl"] .em-consent-item {
  flex-direction: row-reverse;
}

[dir="rtl"] .em-consent-title-row {
  flex-direction: row-reverse;
}

/* Conf hero */
[dir="rtl"] .conf-ref-header {
  flex-direction: row-reverse;
}

[dir="rtl"] .conf-email-banner {
  flex-direction: row-reverse;
}

/* Whtma CTA */
[dir="rtl"] .whtma-cta {
  flex-direction: row;
}

[dir="rtl"] .whtma-cta-text {
  text-align: right;
}

/* Partners carousel — keep LTR so translateX(-offset) scrolls in the correct
   direction and overflow:hidden clips the right side first */
[dir="rtl"] .partners-carousel-wrapper,
[dir="rtl"] .partners-cards {
  direction: ltr;
}

/* Flip prev/next arrows to match RTL reading direction */
[dir="rtl"] .partners-carousel-btn svg {
  transform: scaleX(-1);
}

/* Whtma CTA — stack on mobile */
@media (max-width: 768px) {
  [dir="rtl"] .whtma-cta {
    flex-direction: column;
  }
}

/* Form submit button */
[dir="rtl"] .form-submit {
  flex-direction: row-reverse;
}

/* Em footer */
[dir="rtl"] .em-footer {
  flex-direction: row-reverse;
}

[dir="rtl"] .em-footer-right {
  flex-direction: row-reverse;
}

/* Reg option */
[dir="rtl"] .em-reg-option {
  flex-direction: row-reverse;
  text-align: right;
}

/* Date option */
[dir="rtl"] .em-date-option {
  flex-direction: row-reverse;
}

/* Em tags */
[dir="rtl"] .em-tags {
  flex-direction: row-reverse;
}

[dir="rtl"] .em-tag {
  flex-direction: row-reverse;
}

/* Tech stat */
[dir="rtl"] .tech-stat {
  text-align: center;
}

/* Arabic font size adjustment for better readability */
[dir="rtl"] body {
  font-size: 105%;
}

[dir="rtl"] .service-card-body p,
[dir="rtl"] .whtma-sub,
[dir="rtl"] .ai-powers-header p,
[dir="rtl"] .tech-subtitle,
[dir="rtl"] .tech-subdesc {
  line-height: 1.7;
}
