/* =========================================================
   Languages: switcher + Arabic (right-to-left) adjustments
========================================================= */

/* ---------- language switcher (navigation bar) ---------- */
.nav-inner { position: relative; }
.lang-switch { position: relative; flex-shrink: 0; margin-inline-start: 18px; order: 5; }
.lang-current {
  display: inline-flex; align-items: center; gap: 7px;
  height: 40px; padding: 0 12px;
  border: 1px solid #dfe5ee; border-radius: 8px; background: #fff;
  color: #061b48; font: 700 13px/1 Inter, Cairo, sans-serif; letter-spacing: .5px;
  cursor: pointer; transition: border-color .2s ease, box-shadow .2s ease;
}
.lang-current:hover, .lang-switch.open .lang-current { border-color: #45b82a; box-shadow: 0 4px 14px rgba(6, 27, 72, .1); }
.lang-current .fa-globe { color: #45b82a; font-size: 15px; }
.lang-caret { font-size: 10px; opacity: .6; transition: transform .2s ease; }
.lang-switch.open .lang-caret { transform: rotate(180deg); }
.lang-menu {
  position: absolute; top: calc(100% + 8px); inset-inline-end: 0; z-index: 1200;
  min-width: 160px; padding: 6px;
  background: #fff; border: 1px solid #e5eaf2; border-radius: 10px;
  box-shadow: 0 18px 40px rgba(6, 27, 72, .16);
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s;
}
.lang-switch.open .lang-menu { opacity: 1; visibility: visible; transform: none; }
.lang-menu button {
  display: block; width: 100%; padding: 10px 12px;
  border: 0; border-radius: 7px; background: none;
  color: #17243e; font: 600 14px/1.2 Inter, Cairo, sans-serif; text-align: start; cursor: pointer;
}
.lang-menu button:hover { background: #f1f6fb; color: #061b48; }
.lang-menu button.active { background: #e9f7ee; color: #2f8f1c; }
@media (max-width: 1000px) {
  .lang-switch { margin-inline-start: auto; margin-inline-end: 12px; }
  .lang-current { height: 38px; padding: 0 10px; }
}

/* ---------- Arabic font ---------- */
html[lang="ar"] body,
html[lang="ar"] button, html[lang="ar"] input, html[lang="ar"] select, html[lang="ar"] textarea {
  font-family: "Cairo", Inter, system-ui, sans-serif;
}
/* Oswald has no Arabic letters: headings use Cairo bold instead */
html[lang="ar"] h1, html[lang="ar"] h2, html[lang="ar"] h3, html[lang="ar"] h4,
html[lang="ar"] [class*="title"], html[lang="ar"] .cv-number, html[lang="ar"] .cv-stat strong {
  font-family: "Cairo", Inter, sans-serif !important;
  letter-spacing: 0 !important;
}
html[lang="ar"] body * { letter-spacing: 0 !important; }
html[lang="ar"] body { line-height: 1.75; }

/* ---------- right-to-left layout ---------- */
html[dir="rtl"] body { text-align: right; }
/* arrows point the other way */
html[dir="rtl"] .fa-arrow-right, html[dir="rtl"] .fa-arrow-left,
html[dir="rtl"] .fa-chevron-right, html[dir="rtl"] .fa-chevron-left,
html[dir="rtl"] .fa-angle-right, html[dir="rtl"] .fa-angle-left,
html[dir="rtl"] .fa-long-arrow-right, html[dir="rtl"] .fa-arrow-right-long { transform: scaleX(-1); }
/* hover nudges go towards the reading direction */
html[dir="rtl"] .footer-col > a:hover { transform: translateX(-3px); }
/* phone numbers, emails and links stay left-to-right inside Arabic text */
html[dir="rtl"] a[href^="tel:"], html[dir="rtl"] a[href^="mailto:"],
html[dir="rtl"] .topbar-contact span { direction: ltr; unicode-bidi: isolate; }
html[dir="rtl"] .topbar-contact span i { margin-inline-end: 6px; }
html[dir="rtl"] input[type="email"], html[dir="rtl"] input[type="tel"] { direction: ltr; text-align: right; }
html[dir="rtl"] .logo-image { object-position: right center; }
html[dir="rtl"] .footer-logo-image { object-position: right center; }

/* footer contact column: icon on the right like the locations column; only the value is left-to-right */
html[dir="rtl"] .footer-col.contact-info a { direction: rtl; unicode-bidi: normal; justify-content: flex-start; }
html[dir="rtl"] .footer-col.contact-info a .ltr { direction: ltr; unicode-bidi: isolate; }

/* sliders: "previous" sits on the right and "next" on the left */
html[dir="rtl"] .events-arrow.prev { left: auto; right: 0; }
html[dir="rtl"] .events-arrow.next { right: auto; left: 0; }
html[dir="rtl"] .events-arrow { transform: translateY(-50%) scaleX(-1); }
html[dir="rtl"] .gallery-nav.prev { left: auto; right: 14px; }
html[dir="rtl"] .gallery-nav.next { right: auto; left: 14px; }
html[dir="rtl"] .lightbox-nav.prev { left: auto; right: 18px; }
html[dir="rtl"] .lightbox-nav.next { right: auto; left: 18px; }
html[dir="rtl"] .gallery-zoom { right: auto; left: 14px; }
html[dir="rtl"] .gallery-counter { left: auto; right: 14px; }
html[dir="rtl"] .gallery-nav.prev:hover { transform: translateY(-50%) translateX(3px); }
html[dir="rtl"] .gallery-nav.next:hover { transform: translateY(-50%) translateX(-3px); }
