/* ======================================================= */
/* 0. VARIABLES Y RESET BÁSICO */
/* ======================================================= */

:root {
    --color-primary: #003366;       /* Azul Oscuro (Principal) */
    --color-secondary: #9ACD32;     /* Verde Lima (Acento) */
    --color-cta: #9ACD32;           /* Verde Lima */
    --color-cta-hover: #79B42A;     /* Verde más oscuro */
    --color-background: #F8F8F8;    /* Fondo muy claro de secciones */
    --color-text: #1A1A1A;          /* Texto principal */
    --color-white: #ffffff;         /* Blanco */
    --font-family: 'Montserrat', sans-serif;
    --font-speed: 'Oswald', sans-serif; /* Nueva fuente para la velocidad */
    --transition-speed: 0.3s;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family);
    color: var(--color-text);
    line-height: 1.6;
    background-color: var(--color-background);
    scroll-behavior: smooth;
    overflow-x: hidden; 
    /* El scroll está activado */
}

/* ======================================================= */
/* 1. LOADER */
/* ======================================================= */
#loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--color-primary);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    transition: opacity 0.5s, visibility 0.5s;
}

#loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-logo-spin {
    width: 120px;
    height: auto;
    animation: spin 1.5s linear infinite;
    max-width: 80%;
}

.loader-text {
    color: var(--color-white);
    margin-top: 15px;
    font-size: 1.2rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ======================================================= */
/* 2. ENCABEZADO Y NAVEGACIÓN */
/* ======================================================= */

header {
    background-color: var(--color-white);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    position: sticky;
    top: 0;
    z-index: 50;
    height: 65px;
}

.header-logo {
    height: 40px;
    width: auto;
    max-width: 180px;
}

#nav a {
    text-decoration: none;
    color: var(--color-text);
    margin-left: 25px;
    font-weight: 500;
    transition: color var(--transition-speed);
}

#nav a:hover {
    color: var(--color-secondary);
}

#menu-toggle {
    display: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--color-primary);
    border: none;
    background: none;
}

/* ======================================================= */
/* 3. ESTILOS GLOBALES, BOTONES Y ANIMACIONES SUTILES */
/* ======================================================= */

section {
    padding: 6rem 5%;
    max-width: 1200px;
    margin: auto;
    text-align: center;
    transition: background-color var(--transition-speed);
}

section h2 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: var(--color-primary);
}

.subtitle {
    font-size: 1.2rem;
    margin-bottom: 3rem;
    color: #444;
}

/* Botones */
.btn-primary, .btn-secondary, .btn-conatel {
    display: inline-block;
    padding: 14px 35px;
    text-decoration: none;
    font-weight: 700;
    border-radius: 50px;
    transition: all var(--transition-speed) ease;
    margin-top: 1.5rem;
    letter-spacing: 0.5px;
}

.btn-primary {
    background-color: var(--color-cta);
    color: var(--color-white);
    box-shadow: 0 6px 15px rgba(154, 205, 50, 0.5);
}

.btn-primary:hover {
    background-color: var(--color-cta-hover);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(154, 205, 50, 0.7);
}

.btn-secondary {
    background-color: var(--color-primary);
    color: var(--color-white);
    border: 1px solid var(--color-primary);
}

.btn-secondary:hover {
    background-color: #002244;
    transform: scale(1.05);
}

/* Animación de parpadeo sutil para el precio */
@keyframes blink-subtle {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.85; }
}

.blink {
    animation: blink-subtle 3s ease-in-out infinite;
}

/* ======================================================= */
/* 4. SCROLL REVEAL */
/* ======================================================= */

.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* ======================================================= */
/* 5. SECCIONES ESPECÍFICAS */
/* ======================================================= */

/* HERO SECTION */
.hero {
    background: linear-gradient(135deg, var(--color-primary) 0%, #0055a5 100%);
    color: var(--color-white);
    padding: 8rem 5%;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 900;
}

.hero .subtitle {
    color: rgba(255, 255, 255, 0.9);
}

/* TARJETAS DE BENEFICIOS */
#beneficios .cards {
    display: flex;
    justify-content: space-between;
    gap: 30px;
    margin-top: 3rem;
    flex-wrap: wrap;
}

#beneficios .card {
    background: var(--color-white);
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    flex: 1;
    min-width: 280px;
    transition: transform var(--transition-speed);
}

#beneficios .card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.15);
}

.card .icon {
    display: block;
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: var(--color-secondary);
}

/* PLANES */
#planes {
    background-color: var(--color-white);
}

#planes .cards {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin-top: 3rem;
    flex-wrap: wrap;
}

.plan-card {
    background: var(--color-background);
    padding: 35px 25px;
    border-radius: 16px;
    width: 320px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: 3px solid transparent;
    transition: all var(--transition-speed);
    position: relative;
}

.plan-card:hover {
    border-color: var(--color-secondary);
}

/* Plan Destacado (Power Stream) */
.plan-card.featured {
    background: var(--color-primary);
    color: var(--color-white);
    transform: scale(1.05);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
    border-color: var(--color-cta);
    order: -1; 
}

/* Estilo para el nombre del plan */
.plan-card .plan-name {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 25px;
    color: var(--color-primary);
    line-height: 1.2;
}

.plan-card.featured .plan-name {
    color: var(--color-cta); /* Verde en el plan destacado */
}

/* Contenedor de Velocidad */
.speed-container {
    display: flex;
    align-items: baseline;
    justify-content: center;
    margin-bottom: 15px;
}

/* Valor de la velocidad (200, 400, 600) */
.speed-value {
    font-family: var(--font-speed); /* Fuente Diferente */
    font-size: 4rem; 
    font-weight: 700;
    color: var(--color-secondary); /* Color Acento */
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.1); /* Sombreado */
    line-height: 1;
}

.plan-card.featured .speed-value {
    color: var(--color-white); /* Blanco en el plan destacado */
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.3);
}

/* Unidad de velocidad (Mbps) */
.speed-unit {
    font-family: var(--font-family);
    font-size: 1.5rem;
    font-weight: 700;
    color: #555;
    margin-left: 5px;
}

.plan-card.featured .speed-unit {
    color: rgba(255, 255, 255, 0.8);
}

.plan-card .price {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--color-primary);
    margin: 15px 0 25px 0;
}

.plan-card.featured .price {
    color: var(--color-cta);
}

.plan-card ul {
    list-style: none;
    padding: 0;
    margin-bottom: 30px;
    text-align: left;
}

.plan-card li {
    padding: 10px 0;
    border-bottom: 1px dashed rgba(0, 0, 0, 0.1);
}

.plan-card.featured li {
    border-bottom: 1px dashed rgba(255, 255, 255, 0.3);
}

.badge {
    position: absolute;
    top: -15px;
    right: -15px;
    background-color: var(--color-secondary);
    color: var(--color-primary);
    padding: 5px 15px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.8rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transform: rotate(5deg);
}

/* PRUEBA DE VELOCIDAD */
.speedtest-bg {
    background-color: var(--color-background);
    padding: 4rem 5%;
}

.speedtest-cta {
    background-color: var(--color-primary) !important;
    color: var(--color-white) !important;
    box-shadow: 0 4px 10px rgba(0, 51, 102, 0.5) !important;
}

.speedtest-cta:hover {
    background-color: #0055a5 !important;
    transform: translateY(-4px) scale(1.02);
}

/* COBERTURA (MODIFICADO PARA MAPA INTERACTIVO) */
#cobertura .map-container {
    width: 100%;
    max-width: 900px; 
    margin: 3rem auto 2rem auto;
    display: block;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    overflow: hidden; 
    transition: transform 0.5s;
    position: relative;
    /* Técnica para hacer el iframe responsivo manteniendo la proporción 16:9 */
    padding-bottom: 56.25%; 
    height: 0;
}

#cobertura .cobertura-map {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* CONTACTO Y REGULACIÓN */
#contacto, #regulacion {
    background-color: var(--color-primary);
    color: var(--color-white);
    padding: 4rem 5%;
}

#contacto h2, #regulacion h2 {
    color: var(--color-white);
}

.social-text {
    color: rgba(255, 255, 255, 0.8);
    margin-top: 1rem;
}

.link-social {
    color: var(--color-cta);
    text-decoration: none;
    font-weight: 700;
    transition: color var(--transition-speed);
}
.link-social:hover {
    color: var(--color-white);
}

.btn-conatel {
    background-color: transparent;
    border: 2px solid var(--color-white);
    color: var(--color-white);
    font-size: 0.9rem;
    padding: 8px 20px;
}

.btn-conatel:hover {
    background-color: var(--color-white);
    color: var(--color-primary);
}

/* ======================================================= */
/* 6. FOOTER Y SCROLL TOP */
/* ======================================================= */

footer {
    background-color: #111;
    color: #ccc;
    text-align: center;
    padding: 1.5rem 5%;
    font-size: 0.9rem;
}

footer a {
    color: var(--color-secondary);
    transition: color var(--transition-speed);
}
footer a:hover {
    color: var(--color-white);
}

#scrollTop {
    position: fixed;
    bottom: 25px;
    right: 25px;
    background-color: var(--color-cta);
    color: var(--color-primary);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
    display: none;
    z-index: 100;
    transition: all var(--transition-speed);
    font-weight: 700;
}
#scrollTop:hover {
    background-color: var(--color-cta-hover);
    transform: translateY(-2px);
}

/* ======================================================= */
/* 7. RESPONSIVIDAD (MÓVILES) */
/* ======================================================= */

@media (max-width: 1024px) {
    /* Ajuste de planes para tablet */
    #planes .cards {
        gap: 20px;
    }
    .plan-card.featured {
        transform: scale(1.03); 
    }
}

@media (max-width: 768px) {
    
    header { height: 60px; }
    .hero h1 { font-size: 2.5rem; }
    section { padding: 4rem 5%; }
    section h2 { font-size: 2rem; }
    .subtitle { margin-bottom: 2rem; }

    /* NAVIGACIÓN MÓVIL */
    #nav {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 60px;
        left: 0;
        width: 100%;
        background-color: var(--color-white);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        padding-bottom: 10px;
    }
    #nav.open { display: flex; }
    #nav a { margin: 10px 5%; padding: 5px 0; border-bottom: 1px solid var(--color-background); text-align: left; }
    #menu-toggle { display: block; }
    
    /* TARJETAS DE BENEFICIOS */
    #beneficios .cards {
        flex-direction: column;
        gap: 20px;
    }
    #beneficios .card {
        width: 100%;
        min-width: unset;
    }
    
    /* TARJETAS DE PLANES */
    #planes .cards {
        flex-direction: column;
        align-items: center;
    }
    .plan-card {
        width: 90%;
        max-width: 350px;
    }
    .plan-card.featured {
        transform: scale(1.0);
        order: 0; 
    }

    /* Ajuste de fuente de velocidad en móvil */
    .speed-value {
        font-size: 3.5rem;
    }
    .speed-unit {
        font-size: 1.2rem;
    }

    /* CTA */
    .btn-primary, .btn-secondary {
        padding: 12px 25px;
        width: 100%;
        max-width: 300px;
        margin-left: auto;
        margin-right: auto;
    }
}
