/* Language switcher (issue #705). Its own file so no visitor pairs the new
   header markup with a cached copy of nav.css; rename it (-v2, …) if it changes. */
.lang-switch {
  position: relative;
  margin-left: auto;
  z-index: 2;
}

.lang-switch + .nav-cta {
  margin-left: 14px;
}

.lang-switch__button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid #333333;
  border-radius: 8px;
  background: transparent;
  color: var(--nav-link-color, #bbbbbb);
  font: 500 12px/1 var(--font-nav, 'Inter', sans-serif);
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}

.lang-switch__button:hover,
.lang-switch__button[aria-expanded="true"] {
  color: #ffffff;
  border-color: #555555;
}

.lang-switch__button:focus-visible,
.lang-switch__option:focus-visible,
.mobile-menu__lang:focus-visible {
  outline: 2px solid var(--nav-copper-light, #fc9365);
  outline-offset: 2px;
}

.lang-switch__menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 180px;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: #ffffff;
  border: 1px solid #e8e8e8;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
}

.lang-switch__menu[hidden] {
  display: none;
}

.lang-switch__option {
  display: block;
  padding: 9px 12px;
  border-radius: 6px;
  color: #1a1a1a;
  font: 400 13px/1.3 var(--font-nav, 'Inter', sans-serif);
  text-decoration: none;
}

.lang-switch__option:hover {
  background: #f5f5f3;
}

.lang-switch__option[aria-current="true"] {
  color: #b25d42;
  font-weight: 600;
}

/* Mobile menu: a row of the three languages above the CTA. */
.mobile-menu__langs {
  display: flex;
  gap: 8px;
  padding: 20px 24px 0;
}

.mobile-menu__lang {
  flex: 1;
  padding: 10px 6px;
  border: 1px solid #333333;
  border-radius: 8px;
  color: #dddddd;
  font: 500 13px/1.2 var(--font-nav, 'Inter', sans-serif);
  text-align: center;
  text-decoration: none;
}

.mobile-menu__lang[aria-current="true"] {
  border-color: #b25d42;
  color: #ffffff;
}

@media (max-width: 768px) {
  .lang-switch {
    display: none;
  }

  /* Translated pages: longer mode labels on the platform-page hub diagram
     ("Intermediación de carga", "Chargement complet") wrap instead of
     pushing the page wider than the phone. */
  html:not([lang="en"]) .bigpic__mode {
    white-space: normal;
  }
}
