/* Language flags in the top bar (layouts/partials/language-switch.html) */
.language-switch {
  margin: 0 0.6em 0 0.4em;
}

.language-switch ul {
  display: flex;
  align-items: center;
  gap: 0.5em;
  margin: 0;
  padding: 0;
  list-style: none;
}

.language-switch__item {
  display: inline-flex;
  align-items: center;
}

.language-switch .fi {
  font-size: 1.1em;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(127, 127, 127, 0.35);
}

/* Not-current languages are dimmed until hovered/focused. */
.language-switch a.language-switch__item {
  opacity: 0.55;
  transition: opacity 0.15s;
}

.language-switch a.language-switch__item:hover,
.language-switch a.language-switch__item:focus-visible {
  opacity: 1;
}

/* Keep nav labels on one line ("Sobre mí") now that the flags share the bar.
   The header is 760px wide (theme), so the menu spacing is tightened to fit the
   Spanish labels + flags + theme toggle. Below 685px the theme's hamburger
   menu takes over. */
.menu__inner a {
  white-space: nowrap;
}

@media (min-width: 800px) {
  .menu__inner > li {
    margin: 0 7px;
  }
}

@media (min-width: 685px) and (max-width: 799px) {
  .header {
    padding-left: 16px;
    padding-right: 16px;
  }

  .menu__inner {
    padding: 0 6px;
    font-size: 0.9em;
  }

  .menu__inner > li {
    margin: 0 3px;
  }

  .language-switch {
    margin: 0 0.5em 0 0.25em;
  }

  .language-switch ul {
    gap: 0.35em;
  }
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
