/* =========================================================
   MENÚ FLOTANTE - HUNMEN
   =========================================================
   Compatible con cabecera transparente y adaptable a móvil
   ========================================================= */

/* Contenedor principal del menú */
.menu {
  position: relative;
  z-index: 1000;
}

/* Botón del menú (ícono de 3 líneas o palabra “MENÚ”) */
#btn-menu {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  transition: transform 0.3s ease;
}

#btn-menu:hover {
  transform: scale(1.1);
}

/* ======== PANEL LATERAL ======== */
.menu-lateral {
  position: fixed;
  top: 0;
  right: -100%; /* oculto inicialmente */
  width: 30%;
  max-width: none;
  height: 100vh;
  max-height: 100dvh; /* 🔥 asegura que se adapte al alto real del dispositivo */
  background: rgba(255, 255, 255, 0.95); /* semitransparente */
  backdrop-filter: blur(8px); /* efecto vidrio esmerilado */
  box-shadow: -2px 0 10px rgba(0, 0, 0, 0.15);
  transition: right 0.4s ease;
  z-index: 1200;
  display: flex;
  flex-direction: column;
}

/* Panel visible */
.menu-lateral.activo {
  right: 0;
}

/* Contenedor interno del menú */
.menu-contenido {
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow-y: auto;           /* 🔥 permite desplazamiento vertical */
  scrollbar-width: thin;      /* Estilo del scroll (para Firefox) */
  scrollbar-color: #94b551 transparent; /* color del scroll */
}

/* Scroll personalizado para navegadores basados en WebKit (Chrome, Safari, Edge) */
.menu-contenido::-webkit-scrollbar {
  width: 8px;
}

.menu-contenido::-webkit-scrollbar-thumb {
  background-color: #94b551;
  border-radius: 4px;
}

.menu-contenido::-webkit-scrollbar-track {
  background: transparent;
}

/* Botón “cerrar” (la X) */
#cerrar-menu {
  align-self: flex-end;
  font-size: 2rem;
  background: none;
  border: none;
  color: #6c2eb9; /* tono morado principal */
  cursor: pointer;
  transition: transform 0.3s ease;
}

#cerrar-menu:hover {
  transform: rotate(90deg);
}

/* Lista del menú */
.menu-contenido ul {
  list-style: none;
  margin-top: 3rem;
  padding: 0;
}

.menu-contenido li {
  margin-bottom: 1.2rem;
}

.menu-contenido a {
  font-family: "Lora", serif;
  font-size: 1.4rem;
  font-weight: bold; 
  color: #94b551;
  text-decoration: none;
  transition: color 0.3s ease, transform 0.3s ease;
}

.menu-contenido a:hover {
  color: #86008f;
  transform: translateX(5px);
}

/* ======== OVERLAY (fondo oscuro detrás del menú) ======== */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  z-index: 1100;
}

/* Activo */
.overlay.activo {
  opacity: 1;
  pointer-events: all;
}

/* ======================== SEPARADOR DECORATIVO ======================== */
.separador-menu {
  display: flex;
  justify-content: center;
  margin-top: 2rem;
}

.separador-menu img {
  width: 240px;
  opacity: 1;
  filter: none !important;
  transition: opacity 0.3s ease !important;
  transform: none !important;
}

.separador-menu img:hover {
  opacity: 1;
}

/* ======================== RESPONSIVE ======================== */
@media (max-width: 768px) {
  .menu-lateral {
    width: 50%;
  }

  .menu-contenido a {
    font-size: 1.1rem;
  }

  #menu-lateral ul li a {
    font-size: 1rem;
  }

  #cerrar-menu {
    font-size: 1.5rem;
  }

  .separador-menu img {
    width: 180px;
  }
}

/* ======================== SEGURIDAD EXTRA PARA CELULAR HORIZONTAL ======================== */
@media (orientation: landscape) and (max-height: 500px) {
  .menu-lateral {
    height: 100dvh;
    overflow-y: auto;
  }
}
