/* MBF — Language toggle
   • Default (hero/top state): tiny text sitting under "Contact Us",
     absolutely positioned, matches the original Figma rest-state design.
   • Scrolled (sticky state): becomes a small inline pill button on the
     same line as the nav links, so it never spills over content sections. */

.nav__links-last {
  position: relative; /* anchor for the absolute toggle in default state */
}

.nav__lang-toggle {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-top: 4px;
  display: inline-block;
  font-family: "Intercom Medium", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 12px;
  line-height: 1;
  letter-spacing: 0;
  color: inherit;
  opacity: 0.85;
  text-decoration: none;
  text-transform: none;
  white-space: nowrap;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  transition: opacity 0.2s ease;
}

.nav__lang-toggle[lang="ar"] {
  font-family: var(--font-ar);
  font-size: 13px;
}

.nav__lang-toggle:hover {
  opacity: 1;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* --- Scrolled (sticky) state: pill button inline with the nav row ------- */
body.is-scrolled .nav__links-last {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
body.is-scrolled .nav__lang-toggle {
  position: static;
  transform: none;
  margin-top: 0;
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 999px;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: #ffffff;
  opacity: 0.9;
  background: transparent;
  transition: opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}
body.is-scrolled .nav__lang-toggle[lang="ar"] {
  font-size: 15px;
  padding: 3px 12px 5px;
}
body.is-scrolled .nav__lang-toggle:hover {
  text-decoration: none;
  background-color: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.6);
}
