/* ==========================================================================
   PALETA DE COLORES EXACTA WIFINET Y RESET BASE
   ========================================================================== */
:root {
    --primary-blue: #00499a;     /* Azul Corporativo Wifinet */
    --brand-orange: #fe7b31;     /* Naranja Wifinet */
    --brand-orange-hover: #e06622;
    --primary-blue-hover: #003675;
    --bg-gray: #f8faff;          /* Fondo gris azulado ultra limpio */
    --text-dark: #1e293b;        /* Texto principal */
    --white: #ffffff;
}

body {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    margin: 0; 
    padding: 0;
    background-color: var(--bg-gray);
    color: var(--text-dark);
    line-height: 1.6;
}

.container { 
    max-width: 1200px; 
    margin: 0 auto; 
    padding: 0 20px; 
}

a { text-decoration: none; }
.text-orange { color: var(--brand-orange); }

/* Títulos principales */
.section-heading { text-align: center; margin-bottom: 60px; }
.section-title { 
    text-align: center; 
    font-size: 2.8rem; 
    margin-bottom: 20px; 
    color: var(--primary-blue); 
    font-weight: 900; 
    text-transform: uppercase;
}
.section-title span { color: var(--brand-orange); }
.section-subtitle { 
    text-align: center; 
    font-size: 1.2rem; 
    color: #64748b; 
    margin-bottom: 60px; 
}

/* Clases utilitarias para páginas internas */
.page-section { padding: 80px 0; min-height: 60vh; }

/* ==========================================================================
   NAVBAR Y MENÚ DESPLEGABLE (ESCRITORIO)
   ========================================================================== */
.navbar { 
    background: var(--white); 
    border-bottom: 4px solid var(--brand-orange); 
    padding: 12px 0; 
    position: sticky; 
    top: 0; 
    z-index: 1000; 
    box-shadow: 0 4px 20px rgba(0, 73, 154, 0.15); 
}
.nav-container { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    position: relative; 
}
.logo img { transition: transform 0.3s ease; }
.logo img:hover { transform: scale(1.05); }

.nav-list { list-style: none; display: flex; gap: 35px; margin: 0; padding: 0; align-items: center; }
.nav-list > li > a { 
    color: var(--primary-blue); 
    font-weight: 700; 
    font-size: 1.05rem; 
    transition: all 0.3s ease; 
    padding: 10px 0; 
    display: block; 
}
.nav-list a:hover { color: var(--brand-orange); }

/* Botón Hamburguesa oculto en PC */
.menu-toggle {
    display: none;
    font-size: 1.8rem;
    color: var(--primary-blue);
    cursor: pointer;
    transition: color 0.3s;
}
.menu-toggle:hover {
    color: var(--brand-orange);
}

/* Menú Dropdown en Escritorio */
.dropdown { position: relative; }
.dropdown-menu { 
    display: none; 
    position: absolute; 
    top: 100%; 
    left: 0; 
    background: var(--white); 
    box-shadow: 0 10px 30px rgba(0, 73, 154, 0.15); 
    list-style: none; 
    padding: 15px 0; 
    min-width: 220px; 
    border-radius: 0 0 12px 12px; 
    border-top: 3px solid var(--primary-blue); 
}
.dropdown-menu li a { padding: 12px 25px; font-weight: 600; color: var(--text-dark); transition: 0.2s; }
.dropdown-menu li a:hover { background: var(--bg-gray); color: var(--primary-blue); padding-left: 30px; }

/* Abre por Hover solo en computadoras */
.dropdown:hover .dropdown-menu { display: block; animation: fadeIn 0.3s ease; }

@keyframes fadeIn { 
    from { opacity: 0; transform: translateY(10px); } 
    to { opacity: 1; transform: translateY(0); } 
}

/* ==========================================================================
   BOTONES
   ========================================================================== */
.btn-pill-orange { 
    background: var(--brand-orange); color: var(--white); padding: 12px 30px; 
    border-radius: 50px; font-weight: bold; display: inline-flex; align-items: center; gap: 8px; 
    transition: all 0.3s ease; box-shadow: 0 5px 15px rgba(254, 123, 49, 0.3); 
}
.btn-pill-orange:hover { background: var(--brand-orange-hover); transform: translateY(-3px); box-shadow: 0 8px 20px rgba(254, 123, 49, 0.5); color: var(--white);}

.btn-pill-orange-full { 
    display: block; background: var(--brand-orange); color: var(--white); 
    padding: 15px; border-radius: 50px; font-weight: bold; font-size: 1.1rem; text-align: center;
    transition: 0.3s; box-shadow: 0 5px 15px rgba(254, 123, 49, 0.4); 
}
.btn-pill-orange-full:hover { background: var(--brand-orange-hover); color: var(--white); transform: translateY(-2px); }

.btn-pill-blue { 
    display: block; background: var(--white); color: var(--primary-blue); 
    border: 2px solid var(--primary-blue); padding: 15px; border-radius: 50px; text-align: center;
    font-weight: bold; font-size: 1.1rem; transition: 0.3s; 
}
.btn-pill-blue:hover { background: var(--primary-blue); color: var(--white); }

.btn-pill-outline { 
    border: 2px solid var(--white); color: var(--white); background: transparent; 
    padding: 12px 30px; border-radius: 50px; font-weight: bold; 
    display: inline-block; transition: all 0.3s ease; 
}
.btn-pill-outline:hover { background: var(--white); color: var(--primary-blue); }

.btn-details {
    background-color: var(--brand-orange);
    color: var(--white) !important;
    padding: 15px 30px;
    border-radius: 5px; 
    font-weight: 900;
    font-size: 1.1rem;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border: none;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(254, 123, 49, 0.4); 
    cursor: pointer;
}
.btn-details:hover {
    background-color: var(--brand-orange-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(254, 123, 49, 0.6);
}

/* ==========================================================================
   SECCIÓN HERO (INICIO)
   ========================================================================== */
.hero { 
    background-size: cover; 
    background-position: center; 
    background-attachment: fixed; 
    min-height: 85vh; 
    display: flex; 
    align-items: center; 
    text-align: center; 
    color: var(--white); 
}
.hero-content { max-width: 850px; margin: 0 auto; padding: 40px 0; }
.hero-badge { 
    display: inline-block; background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.3); 
    padding: 8px 20px; border-radius: 50px; font-weight: bold; letter-spacing: 1px; 
    margin-bottom: 20px; text-transform: uppercase; font-size: 0.9rem; backdrop-filter: blur(5px); 
}
.hero h1 { font-size: 4.5rem; margin-bottom: 20px; text-shadow: 2px 2px 15px rgba(0,0,0,0.4); line-height: 1.1; }
.hero p { font-size: 1.4rem; margin-bottom: 40px; text-shadow: 1px 1px 10px rgba(0,0,0,0.5); font-weight: 400; color: #e2e8f0; }
.hero-buttons { display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; }

/* ==========================================================================
   ESTADÍSTICAS Y TARJETAS (Mantenidas de tu versión original)
   ========================================================================== */
.stats-bar { background: var(--brand-orange); color: var(--white); padding: 40px 0; margin-top: 0; position: relative; z-index: 10; box-shadow: 0 10px 30px rgba(0,0,0,0.15); }
.stats-grid { display: flex; justify-content: space-around; flex-wrap: wrap; gap: 30px; text-align: center; }
.stat-number { display: block; font-size: 2.5rem; font-weight: 900; line-height: 1; margin-bottom: 5px; }
.stat-text { font-size: 1.1rem; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; opacity: 0.9; }

.pricing-section { padding: 80px 0; background: var(--bg-gray); }
.pricing-grid { display: flex; gap: 35px; justify-content: center; flex-wrap: wrap; align-items: center; }
.plan-card { background: var(--white); border-radius: 20px; width: 330px; box-shadow: 0 10px 30px rgba(0,0,0,0.08); transition: all 0.3s ease; overflow: hidden; border: 1px solid #e2e8f0; text-align: center; }
.plan-card:hover { transform: translateY(-15px); box-shadow: 0 20px 40px rgba(0, 73, 154, 0.15); }
.premium-card { transform: scale(1.08); border: 3px solid var(--brand-orange); position: relative; box-shadow: 0 15px 40px rgba(254, 123, 49, 0.15); z-index: 5;}
.premium-card:hover { transform: scale(1.08) translateY(-15px); }
.badge-popular { background: var(--brand-orange); color: var(--white); padding: 8px 0; font-weight: 800; font-size: 0.9rem; letter-spacing: 2px; }
.card-header { background: var(--primary-blue); color: var(--white); font-size: 1.6rem; font-weight: bold; padding: 25px 0; }
.card-body { padding: 40px 30px; }
.price-box { color: var(--primary-blue); margin-bottom: 15px; font-size: 4.5rem; font-weight: 900; line-height: 1; }
.currency { font-size: 2.2rem; font-weight: bold; vertical-align: super; }
.period { font-size: 1.2rem; font-weight: normal; color: #64748b; }
.megas-badge { display: inline-block; background: #eef2ff; color: var(--primary-blue); padding: 10px 20px; border-radius: 50px; font-weight: 900; font-size: 1.3rem; margin-bottom: 30px; border: 2px solid var(--primary-blue); }
.premium-badge { background: #fff5f0; color: var(--brand-orange); border-color: var(--brand-orange); }
.plan-details { list-style: none; padding: 0; margin: 0 0 35px 0; text-align: left; }
.plan-details li { margin-bottom: 15px; font-size: 1.1rem; color: #475569; padding-bottom: 10px; border-bottom: 1px dashed #cbd5e1; }
.plan-details i { color: var(--brand-orange); margin-right: 12px; font-size: 1.2rem; }

.blog-card { background: var(--white); border-radius: 12px; overflow: hidden; box-shadow: 0 10px 30px rgba(0, 73, 154, 0.1); transition: all 0.3s ease; border: 1px solid #e1e8f0; }
.blog-card:hover { transform: translateY(-5px); box-shadow: 0 15px 40px rgba(0, 73, 154, 0.15); }
.blog-card-body { padding: 30px; }
.blog-card-meta { display: inline-block; background: #eef2ff; color: var(--primary-blue); padding: 5px 15px; border-radius: 50px; font-weight: bold; font-size: 0.8rem; margin-bottom: 15px; }

.coverage-section { padding: 80px 0; background: var(--white); }
.coverage-wrapper { display: flex; align-items: center; gap: 50px; flex-wrap: wrap; }
.coverage-text { flex: 1; min-width: 300px; }
.coverage-text p { font-size: 1.15rem; color: #475569; margin-bottom: 30px; }
.coverage-locations { list-style: none; padding: 0; margin-bottom: 40px; }
.coverage-locations li { font-size: 1.2rem; margin-bottom: 15px; padding: 15px; background: var(--bg-gray); border-radius: 10px; border-left: 4px solid var(--brand-orange); }
.coverage-locations i { color: var(--brand-orange); margin-right: 15px; font-size: 1.3rem; }
.coverage-map-container { flex: 1; min-width: 300px; width: 100%; background: var(--white); padding: 10px; border-radius: 20px; box-shadow: 0 15px 40px rgba(0,73,154,0.15); border: 1px solid #e2e8f0; }
.coverage-map-container iframe { width: 100%; height: 400px; border-radius: 15px; border: none; }

.steps-section { padding: 80px 0; background: var(--primary-blue); color: var(--white); }
.steps-section .section-title { color: var(--white); margin-bottom: 10px; }
.steps-grid { display: flex; gap: 30px; justify-content: center; flex-wrap: wrap; margin-top: 50px; }
.step-card { flex: 1; min-width: 250px; text-align: center; background: rgba(255,255,255,0.05); padding: 40px 20px; border-radius: 15px; border: 1px solid rgba(255,255,255,0.1); }
.step-number { width: 60px; height: 60px; background: var(--brand-orange); color: white; font-size: 2rem; font-weight: 900; border-radius: 50%; display: flex; justify-content: center; align-items: center; margin: 0 auto 20px auto; box-shadow: 0 5px 15px rgba(254,123,49,0.5); }
.step-card h3 { font-size: 1.5rem; margin-bottom: 15px; }
.step-card p { color: #e2e8f0; }

.whatsapp-float { position: fixed; width: 65px; height: 65px; bottom: 40px; right: 40px; background-color: #25d366; border-radius: 50%; display: flex; justify-content: center; align-items: center; box-shadow: 0 5px 20px rgba(37, 211, 102, 0.5); z-index: 9999; transition: transform 0.3s ease; text-decoration: none; }
.whatsapp-float:hover { transform: scale(1.15); }
.whatsapp-float i { color: white; font-size: 2.5rem; }

.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(10, 19, 58, 0.9); z-index: 2000; display: none; align-items: center; justify-content: center; opacity: 0; transition: opacity 0.3s ease; backdrop-filter: blur(8px); }
.modal-overlay.active { display: flex; opacity: 1; animation: fadeInModal 0.3s forwards; }
.modal-content { background: var(--white); width: 90%; max-width: 800px; max-height: 90vh; border-radius: 15px; overflow-y: auto; position: relative; box-shadow: 0 25px 50px rgba(0,0,0,0.5); transform: translateY(-20px); transition: transform 0.3s ease; }
.modal-overlay.active .modal-content { transform: translateY(0); }
.close-btn { position: absolute; top: 15px; right: 15px; background: var(--brand-orange); color: white !important; width: 45px; height: 45px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; cursor: pointer; z-index: 10; box-shadow: 0 4px 10px rgba(254, 123, 49, 0.4); transition: 0.3s; }
.close-btn:hover { background: var(--brand-orange-hover); transform: scale(1.1); }
@keyframes fadeInModal { from { opacity: 0; } to { opacity: 1; } }

/* ==========================================================================
   MEDIA QUERIES (RESPONSIVE SEGURO PARA CELULARES)
   ========================================================================== */
@media (max-width: 900px) {
    /* Ajustes visuales de secciones */
    .hero h1 { font-size: 3rem; }
    .premium-card { transform: scale(1); }
    .premium-card:hover { transform: translateY(-10px); }
    .coverage-wrapper { flex-direction: column; }
    .stats-bar { margin-top: 0; padding: 30px 0; }
    .whatsapp-float { bottom: 20px; right: 20px; width: 55px; height: 55px; }
    .whatsapp-float i { font-size: 2rem; }

    /* --- SOLUCIÓN ERROR DE ALINEACIÓN (Hamburguesa derecha fija) --- */
    .menu { 
        display: contents; /* Hace que el contenedor <nav> no ocupe espacio físico molesto */
    }
    
    .menu-toggle { 
        display: block; 
    }
    
    /* Configuración de la lista desplegable vertical */
    .nav-list { 
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--white);
        flex-direction: column; 
        gap: 0;
        box-shadow: 0 10px 20px rgba(0, 73, 154, 0.15);
        border-top: 2px solid var(--brand-orange);
        display: none; /* Oculto inicialmente */
    }

    /* Clase que activa el JS para mostrar el menú */
    .nav-list.active {
        display: flex;
    }

    .nav-list > li {
        width: 100%;
    }

    .nav-list > li > a {
        padding: 15px 20px;
        border-bottom: 1px solid #e1e8f0;
        width: 100%;
        box-sizing: border-box;
    }

    /* --- SOLUCIÓN ERROR DE SOPORTE TÉCNICO (Acordeón de un click) --- */
    .dropdown-menu {
        position: static; /* Cambia de flotante a bloque integrado */
        box-shadow: none;
        border: none;
        background: var(--bg-gray);
        border-radius: 0;
        padding: 0;
        width: 100%;
        display: none; /* Oculto por defecto en móvil */
    }
    
    .dropdown-menu li a {
        padding: 12px 35px;
        display: block;
    }

    /* Cuando el JS detecta un toque común, abre el submenú de forma natural */
    .dropdown.dropdown-open .dropdown-menu {
        display: block;
    }
    
    /* Desactivamos el efecto hover clásico en móvil para evitar bugs */
    .dropdown:hover .dropdown-menu {
        display: none;
    }
    .dropdown.dropdown-open:hover .dropdown-menu {
        display: block;
    }
}