/* ---- Language Switcher ---- */
.lang-switcher {
  position: relative;
  margin-left: 8px;
}

.lang-switcher__toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.12));
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary, #fff);
  font-family: var(--font-body, Inter, sans-serif);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 0.25s ease, background 0.25s ease;
}

.lang-switcher__toggle:hover,
.lang-switcher.is-open .lang-switcher__toggle {
  border-color: rgba(212, 43, 43, 0.45);
  background: rgba(212, 43, 43, 0.08);
}

.lang-switcher__menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 148px;
  padding: 6px;
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.12));
  border-radius: 12px;
  background: rgba(8, 8, 8, 0.96);
  backdrop-filter: blur(12px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
  z-index: 10002;
}

.lang-switcher.is-open .lang-switcher__menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lang-switcher__menu button {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-secondary, #d1d1d1);
  font-family: var(--font-body, Inter, sans-serif);
  font-size: 0.82rem;
  text-align: left;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.lang-switcher__menu button:hover,
.lang-switcher__menu button.is-active {
  background: rgba(212, 43, 43, 0.12);
  color: var(--text-primary, #fff);
}

@media (max-width: 900px) {
  .nav__links .lang-switcher {
    width: 100%;
    margin: 12px 0 0;
  }

  .lang-switcher__menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    display: none;
    margin-top: 8px;
    box-shadow: none;
  }

  .lang-switcher.is-open .lang-switcher__menu {
    display: block;
  }
}
