/* ----------------------
   Variables
   ---------------------- */
:root {
  --bg-header: #fff;
  --blue-dark: #0b2a66;
  --blue-mid: #1350a8;
  --gap: 12px;
  --header-h: 64px;
  --header-h-mobile: 56px;
  --z-navmovil: 120000;
  --z-header: 110000;
  --z-menu: 130000;
  --z-top: 1500000;
}

/* ----------------------
   Reset / base
   ---------------------- */
* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto;
  background: #fff;
  color: #111;
}

a {
  color: inherit;
  text-decoration: none;
}

.visually-hidden {
  position: absolute !important;
  height: 1px;
  width: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
}

/* ----------------------
   Header layout
   ---------------------- */
header.cabecera {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--bg-header);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
  height: var(--header-h);
  z-index: var(--z-header);
  display: flex;
  align-items: center;
  padding: 0 12px;
  gap: var(--gap);
}

/* Contenedor centrado */
.cabecera-contenido {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  padding: 0 12px;
  gap: var(--gap);
}

/* Estructura */
.cabecera-nav {
  flex: 1;
  display: flex;
  justify-content: center;
}

.nav-lista {
  display: flex;
  gap: 12px;
  list-style: none;
  margin: 0 auto;
  padding: 0;
  align-items: center;
}

.cabecera-der {
  display: flex;
  gap: 12px;
  align-items: center;
}

/* Botones */
.language-btn,
.accesibilidad-btn {
  background: transparent;
  border: 0;
  padding: 0.35rem 0.7rem;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  color: var(--blue-dark);
}

.language-btn:hover,
.accesibilidad-btn:hover {
  color: var(--blue-mid);
  background: rgba(0, 0, 0, 0.04);
}

.accesibilidad-btn img {
  width: 30px;
  height: 30px;
  color: var(--blue-mid);
  fill: currentColor;
  transition: transform 0.15s ease, color 0.15s ease;
}

.accesibilidad-btn:hover img {
  transform: scale(1.1);
  color: var(--blue-dark);
}
.btn-login {
    padding: 8px 14px;
    font-size: 0.9rem;
}

/* ===== BOTÓN USUARIO CON AVATAR ===== */

.user-btn-avatar {
  display: flex;
  align-items: center;
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  box-shadow: none !important;
  cursor: pointer;
}

.user-avatar-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  background: transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.user-btn-avatar:hover .user-avatar-btn {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Wrappers */
.language-wrapper,
.accesibilidad-wrapper,
.user-wrapper {
  position: relative;
  display: inline-block;
}

/* ===== BOTÓN SALIR ===== */

.user-dropdown form {
  margin-top: 8px;
}

.user-dropdown .btn-salir {
  display: block;
  width: 100%;
  padding: 10px 12px;
  background: #1171ee;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
}

.user-dropdown .btn-salir:hover {
  background: #003c8d;
  transform: translateY(-1px);
}

/* ----------------------
   Dropdowns (base)
   ---------------------- */
.language-menu,
.accesibilidad-menu,
.user-dropdown {
  min-width: 140px;
  padding: 8px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  list-style: none;
  margin: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.16s, transform 0.16s;
}

/* 🔥 AQUI ESTÁ EL FIX */
.user-dropdown {
  z-index: var(--z-menu);
}

.language-menu.abierto,
.accesibilidad-menu.abierto,
.user-dropdown.abierto {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.eqavet-header + * {
    margin-bottom: 0;
}

/* HEADER EQAVET CENTRADO REAL */
.eqavet-header .cabecera-contenido {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}

.eqavet-header .cabecera-nav {
  justify-self: center;
}

.eqavet-header .cabecera-der {
  justify-self: end;
}

.eqavet-header .cabecera-izq {
  justify-self: start;
}

.user-dropdown[hidden] {
  display: none !important;
}

/* =========================
   🔥 BOTONES USUARIO PRO
   ========================= */

.user-wrapper > div {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Avatar */
.user-wrapper img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.user-wrapper img:hover {
  transform: scale(1.08);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* Botones base */
.user-wrapper a,
.user-wrapper button {
  font-size: 14px;
  padding: 8px 16px;
  border-radius: 10px; /* 🔥 más cuadrado redondeado */
  border: none;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s ease;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* PERFIL */
.user-wrapper a {
  background: #e7eef9;
  color: var(--blue-dark);
}

.user-wrapper a:hover {
  background: #d6e4fb;
}

/* SALIR */
.user-wrapper button {
  background: var(--blue-mid);
  color: #fff;
}

.user-wrapper button:hover {
  background: var(--blue-dark);
}

/* limpiar cosas raras */
.user-wrapper form {
  margin: 0;
}



/* Desktop */
@media (min-width: 992px) {
  .language-menu,
  .accesibilidad-menu {
    position: fixed !important;
    top: calc(var(--header-h) + 8px) !important;
    right: 12px !important;
    z-index: var(--z-top);
  }
}

/* Usuario */
@media (min-width: 992px) {
  .user-menu {
    position: relative;
  }

  .user-dropdown {
    position: absolute !important;
    top: calc(100% + 10px) !important;
    right: 0 !important;
    left: auto !important;
  }
}

/* Mobile */
@media (max-width: 991px) {
  .language-menu,
  .accesibilidad-menu,
  .user-dropdown {
    position: fixed !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    top: calc(var(--header-h-mobile) + 8px) !important;
    width: min(92%, 360px) !important;
    z-index: var(--z-top);
  }
}

/* Hamburger */
.btn-hamburguesa {
  display: none;
}

@media (max-width: 992px) {
  .btn-hamburguesa {
    display: inline-flex;
  }

  .cabecera-nav {
    display: none !important;
  }
}