/* Language switcher dropdown in nav */
.lang-switcher {
  display: flex;
  align-items: center;
}

.lang-switcher-toggle {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  min-width: 2rem;
  justify-content: center;
  padding: 0.15rem 0.25rem;
}

.lang-switcher-menu {
  min-width: 9.5rem;
  left: auto;
  right: 0;
  padding: 0.35rem;
}

.lang-switcher-menu li {
  list-style: none;
}

.lang-switcher-option {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  padding: 0.55rem 0.7rem;
  border: none;
  border-radius: 8px;
  background: transparent;
  font-family: inherit;
  font-size: 0.875rem;
  color: var(--blue-900, #0a2540);
  cursor: pointer;
  text-align: left;
  transition: background 0.15s, color 0.15s;
}

.lang-switcher-option:hover {
  background: var(--blue-50, #eef4fb);
  color: var(--blue-800, #0a2540);
}

.lang-switcher-option.active {
  background: var(--blue-100, #dce8f5);
  color: var(--blue-800, #0a2540);
  font-weight: 600;
}

.lang-switcher-code {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.75rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--blue-700, #0d3a6e);
}

.lang-switcher-name {
  flex: 1;
}

body.page-home .header:not(.scrolled) .lang-switcher-toggle {
  color: rgba(255, 255, 255, 0.9);
}

body.page-home .header:not(.scrolled) .lang-switcher-toggle:hover,
body.page-home .header:not(.scrolled) .lang-switcher.open .lang-switcher-toggle {
  color: #fff;
}

@media (max-width: 900px) {
  .nav-links.open .lang-switcher {
    width: 100%;
  }

  .nav-links.open .lang-switcher-toggle {
    width: 100%;
    justify-content: center;
    padding: 0.65rem 0;
    font-size: 0.95rem;
  }

  .nav-links.open .lang-switcher-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    background: transparent;
    padding: 0 0 0.5rem;
    min-width: 0;
    width: 100%;
  }

  .nav-links.open .lang-switcher:not(.open) .lang-switcher-menu {
    display: none;
  }

  .nav-links.open .lang-switcher-option {
    justify-content: center;
  }
}
