


/* Por defecto el hamburger siempre existe, pero oculto en pantallas grandes */
.custom-hamburger {
  display: none; /* oculto por defecto */
  position: fixed;
  top: 20px;
  right: 20px;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
  width: 30px;
  height: 22px;
  cursor: pointer;
   z-index: 10000; /* siempre sobre el menú */
  transition: transform 0.4s ease, right 0.4s ease; /* agregamos right para movimiento */
}

/* Overlay oscuro cuando se abre el menú */
.menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.6); /* opacidad del negro */
  z-index: 9998; /* debajo del menú y hamburger */
  opacity: 0;
  pointer-events: none; /* no bloquea clics cuando está oculto */
  transition: opacity 0.4s ease;
}

/* Cuando el menú está activo, mostrar overlay */
.menu-overlay.active {
  opacity: 1;
  pointer-events: auto; /* bloquea clics debajo del overlay */
}

.custom-hamburger span {
  display: block;
  height: 3px;
  background-color: white;
  border-radius: 3px;
  transition: all 0.4s ease;
}

/* Diferentes longitudes */
.custom-hamburger span:nth-child(1) { width: 100%; }
.custom-hamburger span:nth-child(2) { width: 75%; }
.custom-hamburger span:nth-child(3) { width: 50%; }

/* Transformación a X */
.custom-hamburger.active span:nth-child(1) {
  transform: rotate(45deg);
  width: 100%;
  position: relative;
  top: 9px;
}
.custom-hamburger.active span:nth-child(2) { opacity: 0; }
.custom-hamburger.active span:nth-child(3) {
  transform: rotate(-45deg);
  width: 100%;
  position: relative;
  top: -9px;
}

/* Mover hamburger a la izquierda cuando el menú se abre */
.custom-hamburger.active {
  right: 260px; /* ancho del menú + margen extra */
}

/* Mostrar hamburger solo si la pantalla es menor a 1230px */
@media (max-width: 1230px) {
  .custom-hamburger {
    display: flex;
  }
}

/* Menu-right */
/* Menu-right siempre arriba de todo */
.custom-menu {
  position: fixed;
  top: 0;
  right: -300px; /* oculto al inicio */
  width: 250px;
  box-sizing: border-box; /* asegura que padding no aumente el ancho */
  max-width: 100%; 
  height: 100%;
  background-color: #f3f3f3;
  padding: 50px 20px;
  z-index: 9999; /* ahora está realmente arriba */
  transition: right 0.4s ease;
  overflow-y: auto;
  overflow-x: hidden;
}

.custom-menu.active { right: 0; }

.custom-menu .close-menu {
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: 30px;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
}

.custom-menu ul {
  list-style: none;
  padding: 0;
  margin-top: 30px;
}

.custom-menu ul li {
  position: relative;
  margin: 15px 0;
}

.custom-menu.active ul li {
  opacity: 1;
  transform: translateX(0);
}


/* El link solo para el texto */
.custom-menu ul li a {
  display: block;
  padding-left: 35px; /* espacio para el icono */
  color: #222;
  text-decoration: none;
  font-size: 18px;
  line-height: 1.5;
}

/* Iconos siempre a la izquierda */
.custom-menu ul li i {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 20px;
  color: #052a51;
  width: 25px; /* asegura espacio */
  text-align: center;
}

/* Hacer que el menú se vea por encima de todo (opcional extra) */
body.menu-open {
  overflow: hidden; /* bloquea scroll cuando el menú está abierto */
}

/* Botón de idioma dentro del menú */
.custom-menu .language-btn {
  width: 100%;
  padding: 10px 15px;
  font-size: 1rem;
  margin-top: 20px;
  color: #222;
  cursor: pointer;
  text-align: center;
  transition: all 0.3s ease;
}

.custom-menu ul li,
.custom-menu .extra-content {
  opacity: 0;
  transform: translateX(50px); /* se moverán desde la derecha */
  transition: transform 0.4s ease, opacity 0.4s ease;
}

/* Botón de idioma dentro del menú */
.custom-menu.active .extra-content {
  transition-delay: 0.4s;
  opacity: 1;
  transform: translateX(0);
}

.custom-menu.active ul li {
  transition-delay: calc(var(--i) * 0.1s);
}

.hidden {
  display: none !important;
}




