/* ===========================================
   ESTILOS PARA MENÚ MÓVIL HAMBURGUESA
   =========================================== */

/* Icono hamburguesa */
.hamburger-menu-toggle {
  display: flex !important;
  align-items: center;
  justify-content: center;
  margin-left: 10px;
  z-index: 10000;
  position: relative;
}

.hamburger-btn {
  background: rgba(255, 255, 255, 0.9) !important;
  border: 2px solid #02648f !important;
  border-radius: 4px !important;
  cursor: pointer;
  padding: 8px;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 30px;
  transition: all 0.3s ease;
  z-index: 10001;
  position: relative;
}

.hamburger-line {
  width: 100%;
  height: 3px;
  background-color: #02648f;
  border-radius: 2px;
  transition: all 0.3s ease;
  transform-origin: center;
}

/* Animación del hamburguesa cuando está activo */
.hamburger-btn.active .hamburger-line:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.hamburger-btn.active .hamburger-line:nth-child(2) {
  opacity: 0;
}

.hamburger-btn.active .hamburger-line:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* Overlay del menú móvil */
.mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  display: block;
}

.mobile-menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Contenedor del menú móvil */
.mobile-menu-container {
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  max-width: 400px;
  height: 100%;
  background-color: #ffffff;
  box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
  transform: translateX(100%);
  transition: transform 0.3s ease;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.mobile-menu-overlay.active .mobile-menu-container {
  transform: translateX(0);
}

/* Header del menú móvil */
.mobile-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 20px;
  border-bottom: 1px solid #e0e0e0;
  background-color: #f8f9fa;
  flex-shrink: 0;
}

.mobile-menu-logo {
  flex: 1;
}

.mobile-menu-logo img {
  max-height: 40px;
  width: auto;
}

.mobile-menu-close {
  background: none;
  border: none;
  font-size: 24px;
  color: #02648f;
  cursor: pointer;
  padding: 5px;
  width: 35px;
  height: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color 0.3s ease;
}

.mobile-menu-close:hover {
  background-color: #e9ecef;
}

.close-icon {
  font-size: 20px;
  font-weight: bold;
}

/* Contenido del menú móvil */
.mobile-menu-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 0;
}

.mobile-menu-items {
  flex: 1;
  padding: 20px;
}

.mobile-menu-actions {
  padding: 20px;
  border-top: 1px solid #e0e0e0;
  background-color: #f8f9fa;
  flex-shrink: 0;
}

/* Estilos específicos para elementos del menú en móvil */
.mobile-menu-items .main-menu {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.mobile-menu-items .menu-item.level-1 {
  border-bottom: 1px solid #e0e0e0;
  margin: 0;
  padding: 0;
}

.mobile-menu-items .menu-link {
  display: block;
  padding: 15px 0;
  font-size: 18px;
  color: #02648f;
  text-decoration: none;
  font-weight: 500;
  border-bottom: none;
  transition: color 0.3s ease;
}

.mobile-menu-items .menu-link:hover {
  color: #fe5000;
  background-color: transparent;
}

.mobile-menu-items .submenu-level-2 {
  display: none;
  padding: 0 0 0 20px;
  background-color: #f8f9fa;
  border-top: 1px solid #e0e0e0;
}

.mobile-menu-items .submenu-level-2.active {
  display: block;
}

.mobile-menu-items .submenu-container {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 10px 0;
}

.mobile-menu-items .submenu-item.level-2 {
  border-bottom: 1px solid #e0e0e0;
  margin: 0;
  padding: 0;
}

.mobile-menu-items .submenu-link {
  display: block;
  padding: 12px 0;
  font-size: 16px;
  color: #333;
  text-decoration: none;
  transition: color 0.3s ease;
}

.mobile-menu-items .submenu-link:hover {
  color: #fe5000;
  background-color: transparent;
}

/* Submenús nivel 3 en móvil */
.mobile-menu-items .submenu-level-3 {
  display: none;
  padding: 0 0 0 20px;
  background-color: #ffffff;
  border-top: 1px solid #e0e0e0;
}

.mobile-menu-items .submenu-level-3.active {
  display: block;
}

.mobile-menu-items .submenu-level-3 .menu-column {
  padding: 10px 0;
}

.mobile-menu-items .submenu-level-3 .menu-link {
  padding: 10px 0;
  font-size: 14px;
  color: #666;
}

/* Acciones del menú móvil */
.mobile-search-container,
.mobile-contact-container,
.mobile-personal-area {
  margin-bottom: 15px;
}

.mobile-search-container:last-child,
.mobile-contact-container:last-child,
.mobile-personal-area:last-child {
  margin-bottom: 0;
}

/* Botones en el menú móvil */
.mobile-menu-actions .btn {
  width: 100%;
  margin-bottom: 10px;
  padding: 12px;
  font-size: 16px;
  border-radius: 8px;
}

.mobile-menu-actions .btn:last-child {
  margin-bottom: 0;
}

/* Responsive: Mostrar hamburguesa solo en móvil/tablet */
@media (max-width: 992px) {
  .hamburger-menu-toggle {
    display: flex !important;
  }
  
  /* Ocultar el mega menú original en móvil */
  .mega-menu-row {
    display: none !important;
  }
  
  /* Asegurar que el menú móvil esté disponible */
  .mobile-menu-overlay {
    display: block !important;
  }
}

/* Responsive: Ajustes para pantallas muy pequeñas */
@media (max-width: 576px) {
  .mobile-menu-container {
    max-width: 100%;
  }
  
  .mobile-menu-header {
    padding: 10px 15px;
  }
  
  .mobile-menu-items,
  .mobile-menu-actions {
    padding: 15px;
  }
  
  .mobile-menu-items .menu-link {
    font-size: 16px;
    padding: 12px 0;
  }
  
  .mobile-menu-items .submenu-link {
    font-size: 14px;
    padding: 10px 0;
  }
  
  .hamburger-btn {
    width: 25px;
    height: 25px;
  }
  
  .hamburger-line {
    height: 2px;
  }
}

/* Ocultar hamburguesa en pantallas grandes */
@media (min-width: 993px) {
  .hamburger-menu-toggle {
    display: none !important;
  }
  
  .mobile-menu-overlay {
    display: none !important;
  }
}

/* Estilos de debug - remover en producción */
/* .hamburger-menu-toggle {
  background-color: rgba(255, 0, 0, 0.1) !important;
  border: 1px solid red !important;
}

.mobile-menu-overlay {
  border: 2px solid blue !important;
}

.mobile-menu-container {
  border: 2px solid green !important;
} */
