/* ===================================================
   MEJORAS PARA MENÚ MÓVIL - OPTIMIZADO
   Experiencia móvil clara y funcional
   =================================================== */

@media (max-width: 768px) {
    /* ===================================================
       NAVBAR MÓVIL - DISEÑO MEJORADO
       =================================================== */
    
    .navbar-mobile {
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        background: rgba(255, 255, 255, 0.95);
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
        border: 1px solid rgba(255, 255, 255, 0.2);
        border-radius: 16px;
        margin: 10px;
        padding: 20px 0;
        max-height: 85vh;
        overflow-y: auto;
        position: fixed;
        top: 80px;
        left: 0;
        right: 0;
        z-index: 1000;
    }

    /* ===================================================
       ELEMENTOS PRINCIPALES DEL MENÚ
       =================================================== */
    
    .navbar-mobile > ul > li {
        background: rgba(255, 255, 255, 0.8);
        margin: 4px 15px;
        border-radius: 12px;
        transition: all 0.3s ease;
        border: 1px solid rgba(0, 0, 0, 0.05);
    }

    .navbar-mobile > ul > li:hover {
        background: rgba(19, 139, 201, 0.1);
        transform: translateX(5px);
    }

    .navbar-mobile a {
        padding: 12px 20px !important;
        font-size: 15px;
        line-height: 1.4;
        letter-spacing: 0.3px;
        color: #333;
        text-decoration: none;
        display: block;
        transition: all 0.3s ease;
        border-radius: 12px;
    }

    .navbar-mobile a:hover {
        color: #138bc9;
        background: rgba(19, 139, 201, 0.05);
    }

    /* ===================================================
       INDICADORES DE DROPDOWN - SOLO PRIMER NIVEL
       =================================================== */
    
    .navbar-mobile .dropdown > a::after {
        content: '▼';
        background: rgba(19, 139, 201, 0.1);
        padding: 4px 8px;
        border-radius: 6px;
        margin-left: 8px;
        font-size: 10px;
        transition: all 0.3s ease;
    }

    /* ===================================================
       ESTADOS DE DROPDOWN ACTIVO - MANTENER TAMAÑO
       =================================================== */
    
    .navbar-mobile .dropdown-active {
        background: rgba(19, 139, 201, 0.1) !important;
        transform: none !important;
    }

    .navbar-mobile .dropdown-active a {
        color: #138bc9 !important;
        background: rgba(19, 139, 201, 0.05) !important;
        transform: none !important;
    }

    .navbar-mobile .dropdown-active::after {
        transform: rotate(180deg) !important;
        background: rgba(19, 139, 201, 0.2) !important;
    }

    /* ===================================================
       DROPDOWNS DE PRIMER NIVEL
       =================================================== */
    
    .navbar-mobile .dropdown ul {
        padding: 8px 0;
        border-top: 1px solid rgba(0, 0, 0, 0.05);
        margin: 0 15px;
        background: rgba(248, 249, 250, 0.9);
        border-radius: 8px;
        margin-top: 4px;
    }

    .navbar-mobile .dropdown ul li {
        margin: 2px 8px;
        border-radius: 8px;
        background: rgba(255, 255, 255, 0.7);
        transition: all 0.3s ease;
    }

    .navbar-mobile .dropdown ul li:hover {
        background: rgba(19, 139, 201, 0.1);
        transform: translateX(3px);
    }

    .navbar-mobile .dropdown ul a {
        padding: 10px 16px;
        font-size: 14px;
        font-weight: 500;
        border-radius: 8px;
        transition: all 0.3s ease;
    }

    /* ===================================================
       DROPDOWNS ANIDADOS - SEGUNDO NIVEL (ABIERTOS POR DEFECTO)
       =================================================== */
    
    .navbar-mobile .dropdown .dropdown ul {
        margin: 4px 8px;
        padding: 6px 0;
        background: rgba(240, 241, 242, 0.9);
        border-radius: 6px;
        border-left: 3px solid rgba(19, 139, 201, 0.3);
        /* FORZAR VISIBILIDAD */
        display: block !important;
        max-height: none !important;
        opacity: 1 !important;
        overflow: visible !important;
    }

    .navbar-mobile .dropdown .dropdown ul li {
        margin: 1px 6px;
        border-radius: 6px;
        background: rgba(255, 255, 255, 0.8);
    }

    .navbar-mobile .dropdown .dropdown ul a {
        padding: 8px 14px;
        font-size: 13px;
        font-weight: 500;
    }

    /* ELIMINAR ICONOS DE SEGUNDO NIVEL */
    .navbar-mobile .dropdown .dropdown > a::after {
        content: none !important;
        display: none !important;
    }

    /* ===================================================
       DROPDOWNS ANIDADOS - TERCER NIVEL (ABIERTOS POR DEFECTO)
       =================================================== */
    
    .navbar-mobile .dropdown .dropdown .dropdown ul {
        margin: 3px 6px;
        padding: 4px 0;
        background: rgba(235, 236, 237, 0.9);
        border-radius: 4px;
        border-left: 2px solid rgba(19, 139, 201, 0.4);
        /* FORZAR VISIBILIDAD */
        display: block !important;
        max-height: none !important;
        opacity: 1 !important;
        overflow: visible !important;
    }

    .navbar-mobile .dropdown .dropdown .dropdown ul li {
        margin: 1px 4px;
        border-radius: 4px;
        background: rgba(255, 255, 255, 0.9);
    }

    .navbar-mobile .dropdown .dropdown .dropdown ul a {
        padding: 6px 12px;
        font-size: 12px;
        font-weight: 400;
    }

    /* ELIMINAR ICONOS DE TERCER NIVEL */
    .navbar-mobile .dropdown .dropdown .dropdown > a::after {
        content: none !important;
        display: none !important;
    }

    /* ===================================================
       DROPDOWNS ANIDADOS - CUARTO NIVEL (ABIERTOS POR DEFECTO)
       =================================================== */
    
    .navbar-mobile .dropdown .dropdown .dropdown .dropdown ul {
        margin: 2px 4px;
        padding: 3px 0;
        background: rgba(230, 231, 232, 0.9);
        border-radius: 3px;
        border-left: 2px solid rgba(19, 139, 201, 0.5);
        /* FORZAR VISIBILIDAD */
        display: block !important;
        max-height: none !important;
        opacity: 1 !important;
        overflow: visible !important;
    }

    .navbar-mobile .dropdown .dropdown .dropdown .dropdown ul li {
        margin: 1px 3px;
        border-radius: 3px;
        background: rgba(255, 255, 255, 0.95);
    }

    .navbar-mobile .dropdown .dropdown .dropdown .dropdown ul a {
        padding: 5px 10px;
        font-size: 11px;
        font-weight: 400;
    }

    /* ELIMINAR ICONOS DE CUARTO NIVEL */
    .navbar-mobile .dropdown .dropdown .dropdown .dropdown > a::after {
        content: none !important;
        display: none !important;
    }

    /* ===================================================
       ELEMENTOS ESPECIALES
       =================================================== */
    
    .navbar-mobile .dropdown ul a[style*="color: #ff6b6b"] {
        background: linear-gradient(135deg, #ff6b6b, #ff8e8e);
        color: white !important;
        border: 1px solid rgba(255, 107, 107, 0.3);
        box-shadow: 0 2px 8px rgba(255, 107, 107, 0.2);
        font-weight: 600;
    }

    .navbar-mobile .dropdown ul a[style*="color: #ff6b6b"]:hover {
        background: linear-gradient(135deg, #ff5252, #ff7676);
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
    }

    /* ===================================================
       BOTONES DE ACCIÓN
       =================================================== */
    
    .navbar-mobile .getstarted,
    .navbar-mobile .login {
        background: linear-gradient(135deg, #138bc9, #1a9be6);
        color: white !important;
        border: none;
        padding: 12px 24px;
        border-radius: 25px;
        font-weight: 600;
        text-align: center;
        margin: 8px 15px;
        box-shadow: 0 4px 15px rgba(19, 139, 201, 0.3);
        transition: all 0.3s ease;
    }

    .navbar-mobile .getstarted:hover,
    .navbar-mobile .login:hover {
        background: linear-gradient(135deg, #0f7bb8, #138bc9);
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(19, 139, 201, 0.4);
    }

    /* ===================================================
       BOTÓN DE TOGGLE MÓVIL
       =================================================== */
    
    .mobile-nav-toggle {
        background: linear-gradient(135deg, #138bc9, #1a9be6);
        border: none;
        border-radius: 50%;
        width: 50px;
        height: 50px;
        display: flex !important;
        align-items: center;
        justify-content: center;
        box-shadow: 0 4px 15px rgba(19, 139, 201, 0.3);
        transition: all 0.3s ease;
        z-index: 1001;
    }

    .mobile-nav-toggle:hover {
        transform: scale(1.1);
        box-shadow: 0 6px 20px rgba(19, 139, 201, 0.4);
    }

    .mobile-nav-toggle i {
        color: white;
        font-size: 20px;
    }
}

/* ===================================================
   RESPONSIVE ADICIONAL
   =================================================== */

@media (max-width: 480px) {
    .navbar-mobile {
        margin: 5px;
        padding: 15px 0;
    }

    .navbar-mobile a {
        padding: 10px 16px;
        font-size: 14px;
    }

    .navbar-mobile .dropdown ul a {
        padding: 8px 14px;
        font-size: 13px;
    }

    .navbar-mobile .dropdown .dropdown ul a {
        padding: 6px 12px;
        font-size: 12px;
    }

    .navbar-mobile .dropdown .dropdown .dropdown ul a {
        padding: 5px 10px;
        font-size: 11px;
    }

    .navbar-mobile .dropdown .dropdown .dropdown .dropdown ul a {
        padding: 4px 8px;
        font-size: 10px;
    }
}

/* ===================================================
   TABLET RESPONSIVE
   =================================================== */

@media (min-width: 769px) and (max-width: 1024px) {
    .navbar-mobile {
        margin: 8px;
        padding: 18px 0;
    }

    .navbar-mobile a {
        padding: 14px 22px;
        font-size: 16px;
    }

    .navbar-mobile .dropdown ul a {
        padding: 12px 18px;
        font-size: 15px;
    }

    .navbar-mobile .dropdown .dropdown ul a {
        padding: 10px 16px;
        font-size: 14px;
    }

    .navbar-mobile .dropdown .dropdown .dropdown ul a {
        padding: 8px 14px;
        font-size: 13px;
    }

    .navbar-mobile .dropdown .dropdown .dropdown .dropdown ul a {
        padding: 7px 12px;
        font-size: 12px;
    }
} 