/* ============================================
   ESTILOS DEL SIMULADOR DE CREDITO COOINDEGABO
   ============================================
   
   INDICE DE SECCIONES:
   1. Variables CSS (colores, espaciados, fuentes)
   2. Reset y estilos base
   3. Hero Banner con Parallax
   4. Seccion Introductoria
   5. Particulas Animadas
   6. Calculadora (formulario y resultados)
   7. Animaciones
   8. Responsive Design
   
   COMO CAMBIAR COLORES:
   - Modificar las variables en :root
   - --color-primary: verde principal
   - --color-secondary: naranja de acento
   
============================================ */

/* ============================================
   1. VARIABLES CSS
   ============================================
   Modifica estos valores para cambiar colores
   en toda la pagina de forma consistente
============================================ */
:root {
    /* COLORES PRINCIPALES - MODIFICAR AQUI */
    --color-primary: #388e3c;           /* Verde principal COOINDEGABO */
    --color-primary-dark: #2e7d32;      /* Verde oscuro para hover */
    --color-primary-light: #4caf50;     /* Verde claro para acentos */
    --color-secondary: #e65100;         /* Naranja para destacados */
    --color-secondary-light: #ff6d00;   /* Naranja claro */
    
    /* COLORES DE FONDO */
    --color-bg-dark: #1a1a2e;           /* Fondo oscuro de calculadora */
    --color-bg-light: #f5f5f5;          /* Fondo claro */
    --color-white: #ffffff;
    
    /* COLORES DE TEXTO */
    --color-text-dark: #212121;
    --color-text-light: #757575;
    --color-text-white: #ffffff;
    
    /* ESPACIADOS */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-xxl: 4rem;
    
    /* BORDES Y SOMBRAS */
    --border-radius-sm: 8px;
    --border-radius-md: 12px;
    --border-radius-lg: 20px;
    --box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    --box-shadow-hover: 0 15px 50px rgba(0, 0, 0, 0.25);
    
    /* TRANSICIONES */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* FUENTES */
    --font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

/* ============================================
   2. RESET Y ESTILOS BASE
============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--color-text-dark);
    background-color: var(--color-bg-light);
    overflow-x: hidden;
}

/* ============================================
   3. HERO BANNER CON PARALLAX
   ============================================
   PARA CAMBIAR IMAGEN DE FONDO:
   - Modificar background-image en .hero-credito
   
   PARA CAMBIAR COLOR DEL OVERLAY:
   - Modificar background en .hero-overlay
   
   PARA AJUSTAR VELOCIDAD PARALLAX:
   - Modificar en JavaScript la variable parallaxSpeed
============================================ */
.hero-credito {
    position: relative;
    min-height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
    
    /* IMAGEN DE FONDO - Cambiar URL aqui */
    background-image: url('imagens-web/heros/hero-simula-credito.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed; /* Efecto parallax */
    
    /* Color de respaldo si no hay imagen */
    background-color: var(--color-primary);
}

/* Overlay verde semi-transparente */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* CAMBIAR COLOR/OPACIDAD DEL OVERLAY AQUI */
    background: linear-gradient(
        135deg,
        rgba(56, 142, 60, 0.50) 0%,
        rgba(46, 125, 50, 0.9) 100%
    );
    z-index: 1;
}

/* Contenido del hero */
.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: var(--spacing-xl);
    max-width: 800px;
}

/* Titulo del hero */
.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    color: var(--color-text-white);
    margin-bottom: var(--spacing-md);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

/* Descripcion del hero */
.hero-description {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.8;
    max-width: 600px;
    margin: 0 auto;
}

/* ============================================
   4. SECCION INTRODUCTORIA
============================================ */
.intro-credito {
    padding: var(--spacing-xl) var(--spacing-md);
    background-color: var(--color-white);
}

.intro-container {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.intro-text {
    font-size: 1.15rem;
    line-height: 1.9;
    color: var(--color-text-dark);
}

/* Texto resaltado en verde */
.highlight-green {
    color: var(--color-primary);
    font-weight: 700;
}

/* Texto resaltado en naranja */
.highlight-orange {
    color: var(--color-secondary);
    font-weight: 700;
}

/* ============================================
   5. PARTICULAS ANIMADAS DE FONDO
   ============================================
   PARA AGREGAR MAS PARTICULAS:
   - Agregar mas .particle-N en HTML
   - Agregar estilos correspondientes aqui
   
   PARA CAMBIAR COLOR DE PARTICULAS:
   - Modificar background en .particle
   
   PARA CAMBIAR TAMANO:
   - Modificar width/height en cada .particle-N
============================================ */
.calculadora-section {
    position: relative;
    padding: var(--spacing-xxl) var(--spacing-md);
    /* FONDO OSCURO DE LA SECCION */
    background: linear-gradient(180deg, #1a1a2e 0%, #16213e 100%);
    min-height: 100vh;
    overflow: hidden;
}

/* Contenedor de particulas */
.particles-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

/* Estilo base de particulas */
.particle {
    position: absolute;
    border-radius: 50%;
    /* COLOR DE LAS PARTICULAS - Modificar aqui */
    background: rgba(56, 142, 60, 0.3);
    animation: floatParticle 15s infinite ease-in-out;
}

/* ============================================
   PARTICULAS INDIVIDUALES
   - Cada una tiene posicion, tamano y delay unicos
   - PARA CAMBIAR TAMANO: modificar width y height
   - PARA CAMBIAR POSICION: modificar top y left
   - PARA CAMBIAR VELOCIDAD: modificar animation-duration
============================================ */
.particle-1 {
    width: 80px;
    height: 80px;
    top: 10%;
    left: 5%;
    animation-delay: 0s;
    animation-duration: 20s;
}

.particle-2 {
    width: 120px;
    height: 120px;
    top: 60%;
    left: 10%;
    animation-delay: 2s;
    animation-duration: 25s;
    background: rgba(76, 175, 80, 0.2);
}

.particle-3 {
    width: 60px;
    height: 60px;
    top: 30%;
    left: 80%;
    animation-delay: 4s;
    animation-duration: 18s;
}

.particle-4 {
    width: 100px;
    height: 100px;
    top: 70%;
    left: 75%;
    animation-delay: 1s;
    animation-duration: 22s;
    background: rgba(56, 142, 60, 0.25);
}

.particle-5 {
    width: 50px;
    height: 50px;
    top: 20%;
    left: 40%;
    animation-delay: 3s;
    animation-duration: 16s;
}

.particle-6 {
    width: 90px;
    height: 90px;
    top: 80%;
    left: 40%;
    animation-delay: 5s;
    animation-duration: 24s;
    background: rgba(76, 175, 80, 0.15);
}

.particle-7 {
    width: 70px;
    height: 70px;
    top: 5%;
    left: 60%;
    animation-delay: 2.5s;
    animation-duration: 19s;
}

.particle-8 {
    width: 40px;
    height: 40px;
    top: 45%;
    left: 95%;
    animation-delay: 4.5s;
    animation-duration: 17s;
}

.particle-9 {
    width: 110px;
    height: 110px;
    top: 90%;
    left: 20%;
    animation-delay: 1.5s;
    animation-duration: 26s;
    background: rgba(56, 142, 60, 0.2);
}

.particle-10 {
    width: 55px;
    height: 55px;
    top: 15%;
    left: 25%;
    animation-delay: 3.5s;
    animation-duration: 21s;
}

.particle-11 {
    width: 85px;
    height: 85px;
    top: 50%;
    left: 5%;
    animation-delay: 0.5s;
    animation-duration: 23s;
    background: rgba(76, 175, 80, 0.18);
}

.particle-12 {
    width: 65px;
    height: 65px;
    top: 35%;
    left: 90%;
    animation-delay: 2s;
    animation-duration: 20s;
}

/* ============================================
   6. CALCULADORA - CONTENEDOR Y CARDS
============================================ */
.calculadora-container {
    position: relative;
    z-index: 1;
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    /* DOS COLUMNAS: Formulario y Resultados */
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xl);
    align-items: start;
}

/* Cards de la calculadora */
.calculadora-card,
.resultado-card {
    background: var(--color-white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.calculadora-card:hover,
.resultado-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow-hover);
}

/* Header de las cards */
.card-header {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    padding: var(--spacing-lg);
    color: var(--color-text-white);
}

.card-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: var(--spacing-xs);
}

.card-header p {
    font-size: 0.95rem;
    opacity: 0.9;
}

/* ============================================
   FORMULARIO DE LA CALCULADORA
============================================ */
.calculadora-form {
    padding: var(--spacing-lg);
}

/* Grupo de campo */
.form-group {
    margin-bottom: var(--spacing-md);
}

/* Etiquetas */
.form-group label {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    font-weight: 600;
    color: var(--color-text-dark);
    margin-bottom: var(--spacing-xs);
}

.label-icon {
    color: var(--color-primary);
}

/* Campos de entrada */
.form-group input,
.form-group select {
    width: 100%;
    padding: var(--spacing-sm) var(--spacing-md);
    font-size: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: var(--border-radius-sm);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    background-color: var(--color-white);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(56, 142, 60, 0.15);
}

/* Texto de ayuda */
.input-hint {
    display: block;
    font-size: 0.8rem;
    color: var(--color-text-light);
    margin-top: 4px;
}

/* Boton calcular */
.btn-calcular {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-md);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-text-white);
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    border: none;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
    margin-top: var(--spacing-md);
}

.btn-calcular:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(56, 142, 60, 0.4);
}

.btn-calcular:active {
    transform: translateY(0);
}

/* ============================================
   SECCION DE RESULTADOS
============================================ */
.resultado-content {
    padding: var(--spacing-lg);
}

/* Display de la cuota */
.cuota-display {
    text-align: center;
    padding: var(--spacing-lg);
    background: linear-gradient(135deg, #f5f5f5 0%, #e8f5e9 100%);
    border-radius: var(--border-radius-md);
    margin-bottom: var(--spacing-lg);
    border: 2px solid var(--color-primary);
}

.cuota-label {
    display: block;
    font-size: 0.9rem;
    color: var(--color-text-light);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: var(--spacing-xs);
}

.cuota-valor {
    display: block;
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    color: var(--color-primary);
    line-height: 1.2;
}

/* ============================================
   BENEFICIOS DEL CREDITO (Mensajes destacados)
============================================ */
.beneficios-credito {
    margin-bottom: var(--spacing-lg);
}

.beneficio-item {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
    border-radius: var(--border-radius-sm);
    background: #f5f5f5;
    transition: background var(--transition-fast);
}

.beneficio-item:hover {
    background: #e8f5e9;
}

/* MENSAJE DESTACADO - Seguro de vida */
.beneficio-destacado {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    border-left: 4px solid var(--color-primary);
    padding: var(--spacing-md);
}

.beneficio-destacado .beneficio-texto strong {
    color: var(--color-primary);
    font-size: 1.05rem;
}

.beneficio-icon {
    flex-shrink: 0;
    color: var(--color-primary);
}

.beneficio-texto {
    font-size: 0.95rem;
    color: var(--color-text-dark);
    line-height: 1.5;
}

.beneficio-texto strong {
    font-weight: 700;
}

/* Nota informativa */
.resultado-nota {
    font-size: 0.85rem;
    color: var(--color-text-light);
    text-align: center;
    padding: var(--spacing-sm);
    background: #fafafa;
    border-radius: var(--border-radius-sm);
    margin-bottom: var(--spacing-lg);
    font-style: italic;
}

/* ============================================
   BOTON DE SOLICITUD
   ============================================
   - Oculto por defecto (display: none)
   - Se muestra con JavaScript despues de calcular
   - PARA CAMBIAR ESTILO: modificar aqui
============================================ */
.btn-solicitar {
    display: none; /* OCULTO POR DEFECTO */
    width: 100%;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-md);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-text-white);
    background: linear-gradient(135deg, var(--color-secondary) 0%, var(--color-secondary-light) 100%);
    border: none;
    border-radius: var(--border-radius-sm);
    text-decoration: none;
    cursor: pointer;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
    animation: pulseButton 2s infinite;
}

.btn-solicitar:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(230, 81, 0, 0.4);
}

/* Clase para mostrar el boton */
.btn-solicitar.visible {
    display: flex;
}

/* ============================================
   7. ANIMACIONES
============================================ */

/* Animacion de particulas flotantes */
@keyframes floatParticle {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
        opacity: 0.3;
    }
    25% {
        transform: translate(30px, -50px) rotate(90deg);
        opacity: 0.5;
    }
    50% {
        transform: translate(-20px, -100px) rotate(180deg);
        opacity: 0.3;
    }
    75% {
        transform: translate(40px, -50px) rotate(270deg);
        opacity: 0.4;
    }
}

/* Animacion de pulso para el boton */
@keyframes pulseButton {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(230, 81, 0, 0.4);
    }
    50% {
        box-shadow: 0 0 0 15px rgba(230, 81, 0, 0);
    }
}

/* Animacion de entrada */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.calculadora-card,
.resultado-card {
    animation: fadeInUp 0.6s ease-out;
}

.resultado-card {
    animation-delay: 0.2s;
}

/* ============================================
   8. RESPONSIVE DESIGN
   ============================================
   BREAKPOINTS:
   - 992px: Tablets y pantallas medianas
   - 768px: Tablets pequenas
   - 576px: Moviles
============================================ */

/* TABLETS Y PANTALLAS MEDIANAS */
@media (max-width: 992px) {
    .calculadora-container {
        grid-template-columns: 1fr;
        max-width: 600px;
    }
    
    .hero-credito {
        min-height: 40vh;
    }
}

/* TABLETS PEQUENAS */
@media (max-width: 768px) {
    .hero-content {
        padding: var(--spacing-lg);
    }
    
    .calculadora-section {
        padding: var(--spacing-xl) var(--spacing-sm);
    }
    
    .card-header {
        padding: var(--spacing-md);
    }
    
    .calculadora-form,
    .resultado-content {
        padding: var(--spacing-md);
    }
    
    /* Reducir tamano de particulas en movil */
    .particle {
        transform: scale(0.7);
    }
}

/* MOVILES */
@media (max-width: 576px) {
    .hero-credito {
        min-height: 35vh;
        background-attachment: scroll; /* Desactivar parallax en movil */
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .intro-text {
        font-size: 1rem;
    }
    
    .cuota-valor {
        font-size: 1.8rem;
    }
    
    .beneficio-item {
        flex-direction: column;
        text-align: center;
    }
    
    .beneficio-icon {
        margin: 0 auto;
    }
    
    /* Ocultar algunas particulas en movil para rendimiento */
    .particle-7,
    .particle-8,
    .particle-11,
    .particle-12 {
        display: none;
    }
}
#header-container {
    position: sticky;
    top: 0;
    z-index: 1000;
} 

/* ============================================
   FIN DE ESTILOS
   ============================================
   RESUMEN DE PERSONALIZACION:
   
   1. COLORES: Modificar variables en :root
   2. PARTICULAS: Agregar/quitar en HTML y CSS
   3. PARALLAX: Cambiar background-image en .hero-credito
   4. BOTON SOLICITAR: Se muestra con clase .visible
   5. TASAS: Modificar en archivo JavaScript
============================================ */
