/* --------------------------------------------------------------------------
 * Alternador de idioma del encabezado.
 * -------------------------------------------------------------------------- */

/* Agrupa el logotipo y el selector sin afectar al menú de cuenta, que está
 * posicionado de forma absoluta por los estilos existentes del tema. */
#header #header-region > .region-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(2.25rem, 4.5vw, 4.5rem);
  min-height: 7.25rem;
  padding: 1rem 1.5rem;
}

#header #block-anet-basic-branding {
  flex: 0 0 auto;
  align-items: center;
  margin: 0;
  padding: 0;
}

#header #block-anet-basic-branding .site-logo {
  display: block;
  padding: 0;
}

#header #block-anet-basic-branding .site-logo img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
}

#header .region-header > .block-language {
  flex: 0 0 auto;
  margin: 0;
  padding: 0;
}

#header .block-language .links {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin: 0;
  padding: 0.25rem;
  list-style: none;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid #d7cec8;
  border-radius: 0.75rem;
  box-shadow: 0 0.25rem 0.9rem rgba(52, 25, 10, 0.12);
}

#header .block-language .links > li {
  margin: 0;
  padding: 0;
  list-style: none;
}

#header .block-language .links > li > a,
#header .block-language .links > li > span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 2.35rem;
  padding: 0.5rem 0.9rem;
  color: #4b3325;
  background: transparent;
  border-radius: 0.55rem;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: color 150ms ease, background-color 150ms ease,
    box-shadow 150ms ease, transform 150ms ease;
}

#header .block-language .links > li > a:hover {
  color: #34190a;
  background: #f0e7e2;
  text-decoration: none;
  transform: translateY(-1px);
}

#header .block-language .links > li > a:focus-visible {
  outline: 3px solid rgba(107, 158, 38, 0.38);
  outline-offset: 2px;
}

/* Drupal puede colocar is-active en el enlace o en su elemento de lista. Los
 * selectores por lang del documento mantienen el resaltado en ambos casos. */
#header .block-language .links > li.is-active > a,
#header .block-language .links > li.is-active > span,
#header .block-language .links > li > a.is-active,
#header .block-language .links > li > span.is-active,
html[lang="es"] #header .block-language .links > li.es > a,
html[lang="es"] #header .block-language .links > li.es > span,
html[lang="eu"] #header .block-language .links > li.eu > a,
html[lang="eu"] #header .block-language .links > li.eu > span {
  color: #fff;
  background: #6b9e26;
  box-shadow: 0 0.15rem 0.45rem rgba(75, 111, 27, 0.3);
}

#header .block-language .links > li.is-active > a:hover,
#header .block-language .links > li > a.is-active:hover,
html[lang="es"] #header .block-language .links > li.es > a:hover,
html[lang="eu"] #header .block-language .links > li.eu > a:hover {
  color: #fff;
  background: #5d8b20;
}

@media (max-width: 719px) {
  #header #header-region > .region-header {
    flex-direction: column;
    gap: 0.75rem;
    min-height: 0;
    padding: 0.9rem 1rem 1rem;
  }

  #header .region-header > .block-language {
    display: flex;
    justify-content: center;
    width: 100%;
  }

  #header .block-language .links {
    width: min(100%, 20rem);
  }

  #header .block-language .links > li {
    flex: 1 1 50%;
  }

  #header .block-language .links > li > a,
  #header .block-language .links > li > span {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  #header .block-language .links > li > a,
  #header .block-language .links > li > span {
    transition: none;
  }
}
