/* Language switcher (header). Colours follow the existing header palette. */
.lang-switch { position: relative; }

.lang-switch-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  height: 2.75rem;
  padding: 0 .75rem;
  border: 1px solid #2D6A4F;
  border-radius: 9999px;
  background: transparent;
  color: inherit;
  font-size: .8125rem;
  font-weight: 600;
  letter-spacing: .04em;
  white-space: nowrap;
  cursor: pointer;
  transition: color .2s ease, border-color .2s ease;
}
.lang-switch-btn:hover,
.lang-switch-btn[aria-expanded="true"] { color: #D4A843; border-color: #D4A843; }
.lang-switch-chevron { transition: transform .2s ease; }
.lang-switch-btn[aria-expanded="true"] .lang-switch-chevron { transform: rotate(180deg); }

.lang-switch-menu {
  position: absolute;
  right: 0;
  top: calc(100% + .5rem);
  z-index: 80;
  min-width: 11rem;
  margin: 0;
  padding: .4rem;
  list-style: none;
  background: #1B4332;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 1rem;
  box-shadow: 0 18px 40px -12px rgba(11, 38, 32, .45);
}
.lang-switch-menu[hidden] { display: none; }

.lang-switch-menu a {
  display: flex;
  align-items: center;
  gap: .75rem;
  min-height: 2.5rem;
  padding: .45rem .75rem;
  border-radius: .6rem;
  color: #FDFAF6;
  font-size: .875rem;
  text-decoration: none;
  transition: background .15s ease, color .15s ease;
}
.lang-switch-menu a:hover,
.lang-switch-menu a:focus-visible { background: rgba(255, 255, 255, .07); color: #D4A843; }
.lang-switch-menu a[aria-current="true"] { color: #D4A843; }
.lang-switch-menu a svg { margin-left: auto; }

.lang-switch-code {
  width: 1.75rem;
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .12em;
  color: rgba(253, 250, 246, .55);
}

/* Desktop (nav visible from 1280px): compact control in the top utility bar,
   so the primary navigation keeps its full width. Below that: in the header
   bar next to the menu button. */
.lang-switch--bar { display: none; }
.lang-switch--bar .lang-switch-btn {
  height: auto;
  min-height: 1.75rem;
  padding: .15rem .5rem;
  border-color: transparent;
  font-size: .75rem;
}
.lang-switch--bar .lang-switch-menu { z-index: 90; }

@media (min-width: 1280px) {
  .lang-switch--bar { display: block; }
  .lang-switch--header { display: none; }
}

/* Narrow phones: keep the header on one line next to the logo and menu button. */
@media (max-width: 400px) {
  .lang-switch--header .lang-switch-btn { padding: 0 .55rem; gap: .3rem; }
  .lang-switch--header .lang-switch-btn > svg:first-child { display: none; }
}
