/*
  ESTILO DEL MENÚ Y DEL PIE COMUNES DE juanjovergara.com
  Lo usan todas las páginas. Se carga al final del <head>:
    <link rel="stylesheet" href="/comun/menu.css">
  Hasta 900 px de ancho (móviles y iPad en vertical) se ve el menú hamburguesa.
*/
:root { --header-height: 70px; }

/* ── CABECERA ── */
.cabecera-sitio {
  position: sticky;
  top: 0;
  z-index: 5000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: 100%;
  height: 70px;
  margin: 0;
  padding: 0 60px;
  background: #fff;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
  font-family: 'Roboto', sans-serif;
  box-sizing: border-box;
}
.cabecera-sitio *, .pie-sitio * { box-sizing: border-box; }

.cabecera-sitio .logo-sitio {
  display: block;
  flex-shrink: 0;
  margin: 0;
  padding: 0;
  background: none;
  line-height: 0;
}
.cabecera-sitio .logo-sitio img {
  display: block;
  height: 52px !important;
  width: auto !important;
  max-width: none;
  margin: 0;
}

.menu-sitio {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
}

.menu-sitio .menu-enlace {
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 6px 10px;
  border: none;
  border-radius: 4px;
  background: none;
  box-shadow: none;
  color: #555;
  font-family: 'Roboto', sans-serif;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s ease, background 0.2s ease;
}
.menu-sitio .menu-enlace:hover,
.menu-sitio .menu-enlace.actual { color: #e60000; background: #fdf0f0; }

/* Contacto: rojo con recuadro */
.menu-sitio .menu-enlace.menu-contacto {
  margin-left: 6px;
  padding: 6px 14px;
  border: 1.5px solid #e60000;
  color: #e60000;
  background: none;
  font-weight: 700;
}
.menu-sitio .menu-enlace.menu-contacto:hover { background: #e60000; color: #fff; }

.boton-menu { display: none; }

/* Pantallas medianas: un poco más compacto para que quepa todo en una línea */
@media (max-width: 1150px) and (min-width: 901px) {
  .cabecera-sitio { padding: 0 24px; }
  .cabecera-sitio .logo-sitio img { height: 40px !important; }
  .menu-sitio { gap: 2px; }
  .menu-sitio .menu-enlace { padding: 6px 7px; letter-spacing: 0.5px; }
  .menu-sitio .menu-enlace.menu-contacto { padding: 6px 10px; }
}

@media (max-width: 1000px) and (min-width: 901px) {
  .cabecera-sitio { gap: 12px; }
  .cabecera-sitio .logo-sitio img { height: 34px !important; }
  .menu-sitio .menu-enlace { padding: 6px 5px; font-size: 11px; }
  .menu-sitio .menu-enlace.menu-contacto { margin-left: 4px; padding: 6px 8px; }
}

/* ── MÓVIL Y TABLET (hasta 900 px): menú hamburguesa ── */
@media (max-width: 900px) {
  .cabecera-sitio { padding: 0 16px; }
  .cabecera-sitio .logo-sitio img { height: 44px !important; }

  .boton-menu {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 6px;
    background: #eee;
    color: #111;
    cursor: pointer;
  }

  .menu-sitio {
    display: none;
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    max-height: calc(100vh - 70px);
    max-height: calc(100dvh - 70px);
    overflow-y: auto;
    padding: 6px 20px 22px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
    z-index: 5000;
  }
  .menu-sitio.abierto { display: flex; }

  .menu-sitio .menu-enlace {
    display: flex;
    padding: 14px 6px;
    border-bottom: 1px solid #f0f0f0;
    border-radius: 0;
    font-size: 14px;
  }
  .menu-sitio .menu-enlace.actual { background: none; }

  .menu-sitio .menu-enlace.menu-contacto {
    justify-content: center;
    margin: 18px 0 0;
    padding: 12px;
    border: 1.5px solid #e60000;
    border-radius: 6px;
  }
}

/* ── CABECERA SOBRE UN VÍDEO (móvil) ──
   La portada añade la clase «sobre-video» cuando la sección de vídeos ocupa la pantalla:
   la cabecera se vuelve transparente y el logo y el botón se ven en blanco sobre el vídeo. */
.cabecera-sitio .logo-sitio .logo-blanco { display: none; }
@media (max-width: 900px) {
  .cabecera-sitio { transition: background .3s ease, box-shadow .3s ease; }
  .cabecera-sitio.sobre-video:not(:has(.menu-sitio.abierto)) { background: transparent; box-shadow: none; }
  .cabecera-sitio.sobre-video:not(:has(.menu-sitio.abierto)) .logo-sitio .logo-normal { display: none; }
  .cabecera-sitio.sobre-video:not(:has(.menu-sitio.abierto)) .logo-sitio .logo-blanco { display: block; }
  .cabecera-sitio.sobre-video:not(:has(.menu-sitio.abierto)) .boton-menu { background: rgba(0, 0, 0, .35); color: #fff; }
}

/* ── PIE DE PÁGINA ── */
.pie-sitio {
  margin: 0;
  padding: 28px 20px 34px;
  border-top: 1px solid #eee;
  background: #fff;
  font-family: 'Roboto', sans-serif;
  font-size: 13px;
  color: #999;
  text-align: center;
  scroll-snap-align: end;
}
.pie-sitio nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 28px;
  margin: 0 0 8px;
}
.pie-sitio .pie-enlace {
  display: inline-block;
  padding: 4px 0;
  background: none;
  color: #555;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-decoration: none;
}
.pie-sitio .pie-enlace:hover,
.pie-sitio .pie-enlace.actual { color: #e60000; }
.pie-sitio p { margin: 0; font-size: 12px; color: #aaa; }
