.site-header {
  background: #ffffff;
  padding: 28px 16px 24px;
  text-align: center;
}

.site-logo-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 14px;
}

.site-logo-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.site-logo {
  display: block;
  width: 320px;
  max-width: 90vw;
  height: auto;
}

.site-nav {
  max-width: 1120px;
  margin: 0 auto;
  background: #b82922;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 0;
  padding: 10px 18px;
}

.site-nav-link {
  color: #ffffff;
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
  padding: 12px 18px;
  border-radius: 8px;
  line-height: 1;
  transition:
    background 0.2s ease,
    transform 0.2s ease;
}

.site-nav-link:hover,
.site-nav-link.is-active {
  background: rgba(255, 255, 255, 0.18);
}

.site-nav-link:hover {
  transform: translateY(-1px);
}

@media (max-width: 768px) {
  .site-header {
    padding: 20px 10px 18px;
  }

  .site-logo {
    width: 260px;
  }

  .site-nav {
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 10px;
    border-radius: 0;
    scrollbar-width: thin;
  }

  .site-nav-link {
    flex: 0 0 auto;
    font-size: 14px;
    padding: 11px 14px;
    white-space: nowrap;
  }
}
/* =========================
   Header compacto con logo flotante
   ========================= */

.site-header {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.header-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 10px 14px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

/* Logo más chico, inclinado y superpuesto */
.logo-link {
  position: relative;
  z-index: 3;
  display: inline-flex;
  justify-content: center;
  margin-bottom: -18px;
  transform: rotate(-2deg);
}

.site-logo {
  width: 165px;
  max-width: 70vw;
  height: auto;
  filter: drop-shadow(0 8px 10px rgba(0, 0, 0, 0.22));
}

/* Barra roja más arriba y compacta */
.nav {
  width: 100%;
  background: rgba(184, 41, 34, 0.96);
  padding: 24px 18px 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.1);
}

/* Botones más chicos */
.nav-link,
.nav-user {
  min-height: 28px;
  padding: 7px 11px;
  font-size: 13px;
  font-weight: 800;
  border-radius: 999px;
  line-height: 1;
  white-space: nowrap;
}

.nav-link {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.22);
  text-decoration: none;
}

.nav-link:hover,
.nav-link.is-active {
  background: #ffffff;
  color: #b82922;
}

.nav-user {
  background: rgba(255, 255, 255, 0.88);
  color: #1f2937;
}

/* Mobile */
@media (max-width: 768px) {
  .header-inner {
    padding-top: 8px;
  }

  .site-logo {
    width: 150px;
  }

  .logo-link {
    margin-bottom: -15px;
    transform: rotate(-1.5deg);
  }

  .nav {
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 22px 10px 10px;
    gap: 7px;
    scrollbar-width: thin;
  }

  .nav-link,
  .nav-user {
    flex: 0 0 auto;
    font-size: 12px;
    padding: 7px 10px;
  }
}
/* =========================
   Header con logo centrado incrustado
   ========================= */

.site-header {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.header-inner {
  position: relative;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 14px;
  display: block;
}

/* Logo centrado sobre/dentro de la barra */
.logo-link {
  position: absolute;
  top: -6px;
  left: 50%;
  z-index: 10;
  margin: 0;
  display: inline-flex;
  transform: translateX(-50%) rotate(-1deg);
}

.site-logo {
  width: 150px;
  max-width: 70vw;
  height: auto;
  filter: drop-shadow(0 7px 9px rgba(0, 0, 0, 0.28));
}

/* Barra roja centrada */
.nav {
  position: relative;
  z-index: 2;
  width: 100%;
  margin-top: 24px;

  /* espacio superior para que entre el logo */
  padding: 36px 18px 12px;

  background: rgba(184, 41, 34, 0.96);
  display: flex;
  justify-content: center;
  align-items: center;
  align-content: center;
  flex-wrap: wrap;
  gap: 7px;

  text-align: center;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.1);
}

/* Botones compactos y centrados */
.nav-link,
.nav-user {
  min-height: 28px;
  padding: 7px 11px;
  font-size: 13px;
  font-weight: 800;
  border-radius: 999px;
  line-height: 1;
  white-space: nowrap;
}

.nav-link {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.22);
  text-decoration: none;
}

.nav-link:hover,
.nav-link.is-active {
  background: #ffffff;
  color: #b82922;
}

.nav-user {
  background: rgba(255, 255, 255, 0.88);
  color: #1f2937;
}

/* Cinta publicitaria pegada abajo */
.ad-ticker {
  margin-top: 0;
}

/* Mobile */
@media (max-width: 768px) {
  .header-inner {
    padding: 0;
  }

  .logo-link {
    position: absolute;
    top: -4px;
    left: 50%;
    transform: translateX(-50%) rotate(-1deg);
  }

  .site-logo {
    width: 135px;
  }

  .nav {
    margin-top: 20px;
    padding: 32px 10px 10px;
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 7px;
    scrollbar-width: thin;
  }

  .nav-link,
  .nav-user {
    flex: 0 0 auto;
    font-size: 12px;
    padding: 7px 10px;
  }
}
/* =========================
   Corrección logo transparente
   ========================= */

.logo-link {
  position: absolute;
  top: -13px;
  left: 50%;
  z-index: 50;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  transform: translateX(-50%) rotate(-1deg);

  background: #ffffff !important;
  padding: 4px 9px 5px;
  border-radius: 3px;

  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.25);
  overflow: hidden;
}

.logo-link img,
.site-logo {
  display: block;
  width: 155px;
  height: auto;

  background: #ffffff !important;
}

/* Barra roja */
.nav {
  position: relative;
  z-index: 2;

  width: 100%;
  margin-top: 26px;
  padding: 43px 18px 12px;

  background: rgba(184, 41, 34, 0.96);

  display: flex;
  justify-content: center;
  align-items: center;
  align-content: center;
  flex-wrap: wrap;
  gap: 7px;

  text-align: center;
}
/* =========================
   Logo sin bordes y 5% más grande
   ========================= */

.logo-link {
  position: absolute;
  top: -14px;
  left: 50%;
  z-index: 50;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  transform: translateX(-50%) rotate(-1deg);

  background: transparent !important;
  padding: 0 !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  overflow: visible !important;
}

.logo-link img,
.site-logo {
  display: block;

  /* antes era 155px, 5% más grande = 163px */
  width: 163px;
  height: auto;

  background: #ffffff !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

/* Barra roja ajustada para el logo más grande */
.nav {
  margin-top: 27px;
  padding: 46px 18px 12px;
}
.logo-link {
  top: 12px !important;
}
/* =========================
   Menú: ítems más chicos y menos redondeados
   ========================= */

.nav {
  gap: 5px !important;
}

/* Botones del menú */
.nav-link,
.nav-user {
  min-height: 24px !important;
  padding: 6px 9px !important;

  font-size: 12px !important;
  font-weight: 700 !important;
  line-height: 1 !important;

  border-radius: 8px !important;

  letter-spacing: -0.2px;
}

/* Fondo apenas más suave */
.nav-link {
  background: rgba(255, 255, 255, 0.2) !important;
}

/* Activo / hover */
.nav-link:hover,
.nav-link.is-active {
  background: #ffffff !important;
  color: #b82922 !important;
}

/* Usuario logueado */
.nav-user {
  background: rgba(255, 255, 255, 0.9) !important;
  color: #1f2937 !important;
}

/* Botón salir */
.nav-link[href*="logout"] {
  background: rgba(255, 255, 255, 0.24) !important;
}
/* =========================
   Distribución pareja del menú
   ========================= */

.nav {
  display: flex !important;
  flex-wrap: wrap !important;

  justify-content: space-evenly !important;
  align-items: center !important;
  align-content: center !important;

  column-gap: 6px !important;
  row-gap: 8px !important;

  width: 100% !important;
  padding-left: 22px !important;
  padding-right: 22px !important;

  text-align: center !important;
}

/* Cada botón ocupa un espacio razonable */
.nav-link,
.nav-user {
  flex: 0 1 auto !important;

  min-width: auto !important;
  max-width: none !important;

  padding: 6px 10px !important;
  font-size: 12px !important;
  border-radius: 7px !important;

  text-align: center !important;
  white-space: nowrap !important;
}
/* =========================
   Menú repartido con botones de ancho parejo
   ========================= */

.nav {
  display: flex !important;
  flex-wrap: wrap !important;

  justify-content: center !important;
  align-items: center !important;
  align-content: center !important;

  column-gap: 7px !important;
  row-gap: 8px !important;

  width: 100% !important;
  padding-left: 22px !important;
  padding-right: 22px !important;
}

.nav-link,
.nav-user {
  flex: 1 1 80px !important;

  max-width: 135px !important;
  min-height: 24px !important;

  padding: 6px 8px !important;
  font-size: 12px !important;
  border-radius: 7px !important;

  text-align: center !important;
  white-space: nowrap !important;
}
