/* --- VARIABLES Y RESET (Estilo Apple) --- */
:root {
    --bg-color: #ffffff;
    --text-main: #1d1d1f;
    --text-secondary: #86868b;
    --accent: #0071e3;
    --accent-hover: #0077ed;
    --card-bg: rgba(245, 245, 247, 0.9);
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
    --font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-shadow: none !important;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-main);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* --- UTILIDADES DE ANIMACIÓN (Entrada) --- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* --- BOTONES GLOBALES --- */
.cta-button {
    display: inline-block;
    background-color: var(--accent);
    color: white;
    padding: 12px 24px;
    border-radius: 980px;
    font-size: 17px;
    font-weight: 500;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s var(--ease), transform 0.2s var(--ease);
}

.cta-button:hover {
    background-color: var(--accent-hover);
    transform: scale(1.02);
}

.cta-button:active {
    transform: scale(0.98);
}

/* --- ESTILOS PARALLAX GLOBALES --- */
.parallax-section {
    position: relative;
    overflow: hidden;
    width: 100%;
}

.parallax-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 130%;
    background-size: cover;
    background-position: center;
    z-index: -2;
    will-change: transform;
}

.parallax-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.85);
    z-index: -1;
}

/* =========================================
   HERO SECTION RENOVADO (Cálido y Dinámico)
   ========================================= */
.hero {
    min-height: 95vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 100px 20px 40px;
    background: none;
}

/* Animación Ken Burns para el Fondo */
@keyframes kenBurns {
    0% {
        transform: scale(1);
    }

    100% {
        transform: scale(1.1);
    }
}

.hero-animated-bg {
    background-image: url('https://images.unsplash.com/photo-1511895426328-dc8714191300?q=80&w=2070&auto=format&fit=crop') !important;
    animation: kenBurns 20s infinite alternate ease-in-out;
    will-change: transform;
}

/* Overlay Cálido (Sepia suave) */
.hero-warm-overlay {
    background: linear-gradient(to bottom,
            rgba(29, 29, 31, 0.4),
            rgba(60, 40, 30, 0.5)) !important;
    z-index: 1;
}

/* Contenedor del Texto del Hero */
.hero-content {
    position: relative;
    z-index: 10;
    max-width: 850px;
    margin: 0 auto;
    width: 100%;
}

.hero h1 {
    font-size: 72px;
    font-weight: 700;
    letter-spacing: -3px;
    color: #ffffff;
    line-height: 1.05;
    margin-bottom: 25px;
}

.hero p {
    font-size: 24px;
    color: rgba(255, 255, 255, 0.95);
    max-width: 600px;
    margin: 0 auto 40px auto;
    line-height: 1.4;
    font-weight: 400;
}

.pulse-button {
    box-shadow: 0 0 0 0 rgba(0, 113, 227, 0.7);
    transition: transform 0.3s var(--ease), background-color 0.3s var(--ease);
}

.pulse-button:hover {
    transform: scale(1.05) translateY(-2px) !important;
    background-color: var(--accent-hover);
}

/* --- SECCIÓN FUNCIONAL: SIMULADOR --- */
.simulator {
    padding: 120px 20px;
    background: none;
    position: relative;
    z-index: 1;
}

#simulatorBg {
    background-image: url('https://images.unsplash.com/photo-1497366754035-f200968a6e72?q=80&w=2069&auto=format&fit=crop');
}

.simulator-overlay {
    background: rgba(15, 20, 25, 0.75);
}

.section-container {
    width: 100%;
    max-width: 980px;
    margin: 0 auto;
}

.section-title {
    font-size: 48px;
    font-weight: 700;
    letter-spacing: -1.5px;
    margin-bottom: 60px;
    text-align: center;
    color: var(--text-main);
}

.text-white {
    color: #ffffff !important;
}

/* --- TARJETA CON EFECTO GLASSMORPHISM --- */
.calc-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: saturate(200%) blur(30px);
    -webkit-backdrop-filter: saturate(200%) blur(30px);
    padding: 50px;
    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3);
    display: flex;
    gap: 50px;
    align-items: center;
}

.inputs-col {
    flex: 1.2;
}

.outputs-col {
    flex: 1;
    background: rgba(245, 245, 247, 0.5);
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.4);
    width: 100%;
    /* Prevención en responsivo */
}

.slider-group {
    margin-bottom: 35px;
}

.slider-label {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
}

.current-val {
    font-size: 21px;
    color: var(--text-main);
    font-weight: 600;
}

input[type=range] {
    -webkit-appearance: none;
    width: 100%;
    background: transparent;
}

input[type=range]::-webkit-slider-runnable-track {
    width: 100%;
    height: 6px;
    cursor: pointer;
    background: #e0e0e0;
    border-radius: 3px;
}

input[type=range]::-webkit-slider-thumb {
    height: 22px;
    width: 22px;
    border-radius: 50%;
    background: var(--accent);
    cursor: pointer;
    -webkit-appearance: none;
    margin-top: -8px;
    transition: transform 0.2s var(--ease);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

input[type=range]:active::-webkit-slider-thumb {
    transform: scale(1.15);
}

.pago-mensual {
    font-size: 64px;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -3px;
    margin: 15px 0;
}

.cat-text {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 20px;
    opacity: 0.8;
}

/* --- SECCIÓN BENEFICIOS (NOSOTROS) --- */
.features {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 100px 20px;
    position: relative;
    overflow: hidden;
    margin: 0 !important;
}

.features .parallax-bg {
    background-image: url('https://images.unsplash.com/photo-1556155092-490a1ba16284?q=80&w=2070&auto=format&fit=crop');
    background-position: top center;
}

.features .parallax-overlay {
    background: rgba(0, 0, 0, 0.7);
}

.features .section-title,
.features h3,
.features p {
    color: #ffffff;
}

.features .feature-item p {
    color: rgba(255, 255, 255, 0.8);
}

.features-grid {
    display: grid;
    /* Reducido ligeramente para mejor apilamiento en móvil */
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
    width: 100%;
}

.feature-item {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    padding: 40px;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s var(--ease), background 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-8px);
    background: rgba(255, 255, 255, 0.15);
}

.icon {
    font-size: 44px;
    margin-bottom: 25px;
    display: block;
}

.feature-item h3 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.feature-item p {
    font-size: 17px;
    line-height: 1.5;
    font-weight: 400;
}

#nosotros .feature-item {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    justify-content: center !important;
    padding: 30px !important;
}

#nosotros .feature-item .icon svg {
    fill: #ffffff !important;
    color: #ffffff !important;
    width: 40px !important;
    height: 40px !important;
    display: block !important;
    margin: 0 auto 20px auto !important;
}

#nosotros .feature-item h3,
#nosotros .feature-item p {
    color: #ffffff !important;
    max-width: 280px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* --- SECCIÓN SERVICIOS --- */
.services {
    padding: 120px 20px;
    background-color: #ffffff;
}

.services-grid {
    display: grid;
    /* Reducido para evitar scroll horizontal en celulares muy angostos */
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 20px;
}

.service-card {
    background: #f5f5f7;
    border-radius: 24px;
    padding: 40px;
    border: 1px solid rgba(0, 0, 0, 0.02);
    display: flex;
    flex-direction: column;
    height: 100%;
    justify-content: flex-start;
    transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), background 0.4s var(--ease) !important;
}

.service-card:hover {
    transform: translateY(-10px) scale(1.02) !important;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.08) !important;
    background: #ffffff;
}

.icon-box {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 25px;
    color: white;
}

.s-blue {
    background: #0071e3;
}

.s-orange {
    background: #ff9f0a;
}

.s-green {
    background: #34c759;
}

.s-brown {
    background: #ac8e68;
}

.s-teal {
    background: #30b0c7;
}

.s-gold {
    background: #af8b2c;
}

.card-content h3 {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 5px;
    color: #1d1d1f;
}

.tagline {
    font-size: 14px;
    font-weight: 600;
    color: #bf4800;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.description {
    font-size: 16px;
    color: #86868b;
    line-height: 1.5;
    margin-bottom: 30px;
}

.service-card .icon-box svg {
    fill: #ffffff !important;
    width: 26px;
    height: 26px;
    display: block;
}

.global-cta .cta-button {
    box-shadow: 0 10px 30px rgba(0, 113, 227, 0.2);
    transition: all 0.4s var(--ease);
}

.global-cta .cta-button:hover {
    transform: translateY(-3px) scale(1.02) !important;
    box-shadow: 0 15px 40px rgba(0, 113, 227, 0.3);
}

.section-title {
    margin-bottom: 80px;
}

/* --- FOOTER --- */
.main-footer {
    background-color: #2d8be8;
    /* Gris casi blanco como la imagen */
    padding: 80px 0 40px 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #666;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    max-width: 1100px;
    margin: 0 auto 60px auto;
    padding: 0 20px;
}

.footer-col h4 {
    color: #d1d1d1;
    /* Texto de encabezado claro */
    font-size: 1.4rem;
    margin-bottom: 15px;
    font-weight: bold;
}

.footer-col .blue-line {
    width: 40px;
    height: 3px;
    background-color: #007bff;
    /* Línea azul de la imagen */
    margin-bottom: 20px;
}

.footer-col ul {
    list-style: none;
    padding: 0;
}

.footer-col ul li {
    margin-bottom: 15px;
}

.footer-col ul li a {
    color: #b0b0b0;
    /* Gris claro para los links */
    text-decoration: none;
    font-size: 15px;
    transition: color 0.3s;
}

.footer-col ul li a:hover {
    color: #007bff;
}

.social-desc {
    font-size: 14px;
    color: #d1d1d1;
    margin-bottom: 20px;
}

.social-icons {
    display: flex;
    gap: 20px;
}

.social-icons svg {
    fill: #e0e0e0;
    /* Iconos gris muy claro */
    transition: fill 0.3s;
}

.social-icons a:hover svg {
    fill: #007bff;
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid #eeeeee;
    padding-top: 40px;
    max-width: 900px;
    margin: 0 auto;
}

.legal-text {
    font-size: 13px;
    color: #999;
    line-height: 1.6;
    margin-bottom: 20px;
    padding: 0 20px;
}

.copyright {
    font-size: 13px;
    color: #999;
}

/* =========================================
   MEDIA QUERIES (Responsividad Total)
   ========================================= */

/* Tablets y Pantallas Medianas (hasta 992px) */
@media (max-width: 992px) {
    .calc-card {
        flex-direction: column;
        gap: 40px;
    }

    .inputs-col,
    .outputs-col {
        width: 100%;
        flex: none;
    }

    .hero h1 {
        font-size: 56px;
    }
}

/* Celulares (hasta 768px) */
@media (max-width: 768px) {

    /* Ajustes Navegación */
    nav {
        height: auto;
        padding: 12px 0;
    }

    .nav-container {
        flex-direction: column;
        gap: 15px;
    }

    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 12px;
    }

    .nav-links a {
        margin-left: 0;
        /* Quita el margen izquierdo en móvil */
        font-size: 13px;
    }

    /* Ajustes Hero */
    .hero {
        padding-top: 140px;
        /* Compensa la barra de nav más grande */
        min-height: 85vh;
    }

    .hero h1 {
        font-size: 42px;
        letter-spacing: -1.5px;
    }

    .hero p {
        font-size: 19px;
    }

    /* Ajustes Simulador */
    .simulator {
        padding: 80px 20px;
    }

    .calc-card {
        padding: 30px 20px;
        border-radius: 20px;
    }

    .outputs-col {
        padding: 30px 20px;
    }

    .pago-mensual {
        font-size: 44px;
        letter-spacing: -1.5px;
    }

    /* Ajustes Títulos Globales */
    .section-title {
        font-size: 34px;
        margin-bottom: 40px;
    }

    /* Ajustes Grid Servicios */
    .services {
        padding: 80px 20px;
    }

    .service-card {
        padding: 30px !important;
    }

    .card-content h3 {
        font-size: 20px;
    }

    /* Ajustes Grid Beneficios */
    .features {
        padding: 80px 20px;
    }

    .feature-item {
        padding: 30px 20px;
    }
}

/* Celulares muy pequeños (hasta 380px - ej. iPhone SE) */
@media (max-width: 380px) {
    .hero h1 {
        font-size: 36px;
    }

    .section-title {
        font-size: 28px;
    }

    .pago-mensual {
        font-size: 36px;
    }

    .nav-links a {
        font-size: 12px;
    }

    .btn-login {
        padding: 4px 10px;
    }
}