/* ==========================================
   NAVIGATION.CSS - Estilos completos para navegación móvil
   AGREGAR ESTE ARCHIVO A TODAS TUS PÁGINAS HTML
   ========================================== */

/* ESTILOS BASE DEL MENÚ MÓVIL */
@media (max-width: 768px) {
    /* Ocultar el botón Cotizar en móvil */
    .nav-container .cta-button {
        display: none !important;
    }

    /* Botón hamburguesa */
    .mobile-menu-btn {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        background: transparent;
        border: none;
        cursor: pointer;
        padding: 10px;
        z-index: 1001;
        position: relative;
    }

    .mobile-menu-btn span {
        display: block;
        width: 25px;
        height: 3px;
        background: #0f172a;
        margin: 5px 0;
        transition: all 0.3s ease;
        transform-origin: center;
    }

    /* Animación del botón hamburguesa */
    .mobile-menu-btn.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .mobile-menu-btn.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-btn.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    /* MENÚ MÓVIL - ESTILOS PRINCIPALES */
    .nav-links {
        position: fixed !important;
        top: 70px !important;
        right: -100% !important;
        width: 80% !important;
        max-width: 300px !important;
        height: calc(100vh - 70px) !important;
        background: white !important;
        display: flex !important;
        flex-direction: column !important;
        padding: 2rem 1rem !important;
        transition: right 0.3s ease !important;
        box-shadow: -5px 0 15px rgba(0,0,0,0.1) !important;
        overflow-y: auto !important;
        z-index: 999 !important;
    }

    /* MENÚ ACTIVO - Se muestra */
    .nav-links.active {
        right: 0 !important;
    }

    /* Estilos de los items del menú */
    .nav-links li {
        width: 100%;
        margin: 0.5rem 0;
        padding: 0;
    }

    .nav-links a {
        display: block;
        width: 100%;
        padding: 0.8rem 1rem;
        color: #0f172a;
        font-weight: 600;
        font-size: 1rem;
        text-decoration: none;
        border-radius: 8px;
        transition: all 0.3s ease;
    }

    .nav-links a:hover {
        background: rgba(37, 99, 235, 0.1);
        color: #2563eb;
        padding-left: 1.5rem;
    }

    /* Prevenir scroll del body cuando el menú está abierto */
    body.menu-open {
        overflow: hidden;
    }
}

/* DROPDOWN DE EQUIPOS */
.dropdown {
    position: relative;
    width: 100%;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.3rem;
    cursor: pointer;
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
    width: 100%;
    padding: 0.8rem 1rem;
}

.dropdown-toggle:hover {
    color: #2563eb;
}

.dropdown-arrow {
    font-size: 0.7rem;
    transition: transform 0.3s ease;
    display: inline-block;
}

.dropdown-arrow.rotate {
    transform: rotate(180deg);
}

/* Dropdown menu en desktop */
@media (min-width: 769px) {
    .dropdown-menu {
        position: absolute;
        top: 100%;
        left: 50%;
        transform: translateX(-50%);
        background: white;
        min-width: 200px;
        border-radius: 12px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
        opacity: 0;
        visibility: hidden;
        transform: translateX(-50%) translateY(-10px);
        transition: all 0.3s ease;
        margin-top: 1rem;
        z-index: 1000;
        border: 1px solid rgba(0, 0, 0, 0.08);
    }

    .dropdown-menu.show {
        opacity: 1;
        visibility: visible;
        transform: translateX(-50%) translateY(0);
    }

    .dropdown-item {
        display: flex;
        align-items: center;
        gap: 0.6rem;
        padding: 0.8rem 1.2rem;
        color: #0f172a;
        text-decoration: none;
        transition: all 0.3s ease;
        font-weight: 500;
        font-size: 0.95rem;
    }

    .dropdown-item:not(:last-child) {
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    }

    .dropdown-item:hover {
        background: linear-gradient(135deg, #2563eb 0%, #06b6d4 100%);
        color: white;
        padding-left: 1.6rem;
    }
}

/* Dropdown menu en móvil */
@media (max-width: 768px) {
    .dropdown {
        width: 100%;
    }

    .dropdown-toggle {
        padding: 0.8rem 1rem;
        width: 100%;
        justify-content: space-between;
    }

    .dropdown-menu {
        position: static !important;
        transform: none !important;
        margin: 0 !important;
        opacity: 1 !important;
        visibility: visible !important;
        box-shadow: none !important;
        border: none !important;
        background: transparent !important;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease;
        padding: 0;
        width: 100%;
    }

    .dropdown-menu.show {
        max-height: 400px;
        padding: 0.5rem 0;
    }

    .dropdown-item {
        display: flex;
        align-items: center;
        gap: 0.6rem;
        background: rgba(37, 99, 235, 0.05);
        border-radius: 8px;
        margin: 0.3rem 0.5rem;
        padding: 0.7rem 1rem;
        color: #0f172a;
        text-decoration: none;
        font-size: 0.9rem;
        transition: all 0.3s ease;
    }

    .dropdown-item:hover {
        background: rgba(37, 99, 235, 0.15);
        padding-left: 1.3rem;
    }
}

.brand-icon {
    font-size: 1rem;
    min-width: 20px;
    text-align: center;
}

/* FIX IMPORTANTE - Asegurar visibilidad del menú */
@media (max-width: 768px) {
    /* Forzar display del menú móvil */
    .nav-links {
        display: flex !important;
    }
    
    /* El navbar debe tener position fixed o relative */
    #navbar, nav {
        position: fixed;
        top: 0;
        width: 100%;
        z-index: 1000;
        background: white;
    }
    
    /* Ajustar el padding del body para compensar el navbar fixed */
    body {
        padding-top: 70px;
    }
}