/* css/styles.css */
:root {
    --primary: #5884D4;
    --primary-dark: #3f6bb8;
    --dark: #1a1a1a;
    --grey: #6c757d;
    --light-grey: #f8f9fa;
    --white: #ffffff;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --container-width: 1140px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    color: var(--dark);
    line-height: 1.6;
    background-color: var(--white);
    overflow-x: hidden;
}

a { text-decoration: none; color: inherit; transition: 0.3s ease; }
ul { list-style: none; }
img { max-width: 100%; height: auto; display: block; }

/* --- UTILIDADES --- */
.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}
.btn-primary {
    background-color: var(--primary);
    color: var(--white);
}
.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(88, 132, 212, 0.3);
}
.btn-secondary {
    background-color: var(--light-grey);
    color: var(--dark);
    border-color: #ddd;
}
.btn-secondary:hover {
    background-color: #e2e6ea;
}
.btn-lg { padding: 14px 32px; font-size: 1.1rem; }
.btn-block { width: 100%; }
.btn-nav-cta { background-color: var(--dark); border: none; }
.btn-nav-cta:hover { background-color: #333; box-shadow: none; transform: none; }

.section-tag {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}
.section-tag.light { color: var(--white); }

.section-header {
    text-align: center;
    max-width: 650px;
    margin: 0 auto 50px;
}
.section-header h2 { font-size: 2.5rem; font-weight: 700; margin-bottom: 15px; }
.section-header p { color: var(--grey); font-size: 1.1rem; }

/* --- HEADER --- */
.header {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 15px 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}
.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.main-nav {
    display: flex;
    align-items: center;
    gap: 30px;
}
.nav-list {
    display: flex;
    gap: 25px;
}
.nav-link {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--dark);
}
.nav-link:hover { color: var(--primary); }
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
}
.menu-toggle .hamburger {
    width: 25px; height: 3px; background: var(--dark); border-radius: 2px;
}

/* --- HERO --- */
/* --- HERO --- */
.hero {
    padding: 140px 0 80px;
    position: relative;
    background: var(--white);
    overflow: hidden;
}

/* NUEVO: Gradiente sutil en la parte inferior en lugar de la ola */
.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px; /* Altura muy baja y elegante */
    background: linear-gradient(to bottom, rgba(255,255,255,0) 0%, rgba(248,249,250,0.8) 100%); /* Transición suave a gris muy claro */
    pointer-events: none; /* Para no estorbar los botones */
    z-index: 2; /* Justo encima de la ola, tapándola */
}

/* Ahora ocultamos la ola SVG de forma definitiva */
.hero-wave {
    display: none !important;
}
.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 50px;
}
.hero-badge {
    display: inline-block;
    background: rgba(88, 132, 212, 0.1);
    color: var(--primary);
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: 500;
    font-size: 0.9rem;
    margin-bottom: 20px;
}
.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 20px;
}
.hero-title .highlight { color: var(--primary); }
.hero-description {
    font-size: 1.2rem;
    color: var(--grey);
    margin-bottom: 30px;
}
.hero-cta { display: flex; gap: 15px; }
.hero-visual { position: relative; display: flex; justify-content: center; align-items: center; }
/* Ajuste para que la imagen decorativa no estorbe los botones */
.hero-symbol {
    position: absolute;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    pointer-events: none; /* Para que no interfiera con los clics del ratón */
    z-index: 0;
}
.hero-symbol img { 
    width: 300px; 
    opacity: 0.1; 
    animation: float 6s ease-in-out infinite; 
}
@keyframes float {
    0% { transform: translateY(0px) rotate(-5deg); }
    50% { transform: translateY(-15px) rotate(5deg); }
    100% { transform: translateY(0px) rotate(-5deg); }
}
.floating-element {
    position: absolute;
    background: white;
    padding: 15px;
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    color: var(--primary);
    font-size: 1.5rem;
    animation: floatBox 4s ease-in-out infinite;
}
.floating-1 { top: 10%; left: 0%; animation-delay: 0s; }
.floating-2 { bottom: 20%; right: 0%; animation-delay: 1s; }
.floating-3 { top: 30%; right: 20%; animation-delay: 2s; }
@keyframes floatBox { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.hero-wave {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    line-height: 0;
    z-index: 1;          /* Asegura que la ola esté debajo del texto */
    pointer-events: none; /* Permite hacer clic a través de la ola hacia los botones */
}

/* --- SERVICIOS --- */
.services { padding: 80px 0; background: var(--light-grey); }
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}
.service-card {
    background: var(--white);
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.04);
    transition: all 0.3s ease;
    position: relative;
}
.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.08);
}
.service-icon {
    width: 50px; height: 50px;
    background: rgba(88, 132, 212, 0.1);
    color: var(--primary);
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; margin-bottom: 20px;
}
.service-card h3 { font-size: 1.3rem; margin-bottom: 15px; }
.service-card p { color: var(--grey); margin-bottom: 20px; }
.service-link { font-weight: 600; color: var(--primary); }
.service-link:hover { color: var(--dark); }

/* --- ABOUT --- */
.about { padding: 80px 0; }
.about-container {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 50px;
    align-items: center;
}
.about-image-placeholder {
    background: #eee; border-radius: 12px; overflow: hidden;
}
.about-subtitle { color: var(--grey); font-weight: 500; margin-bottom: 20px; font-size: 1.1rem; }
.about-text p { color: var(--grey); margin-bottom: 15px; text-align: justify; }
.about-stats {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 30px;
}
.stat-item { text-align: center; }
.stat-number { display: block; font-size: 2rem; font-weight: 700; color: var(--primary); }
.stat-label { font-size: 0.9rem; color: var(--grey); }

/* --- RESOURCES (LEAD MAGNET) --- */
.resources { padding: 80px 0; background: var(--light-grey); }
.resources-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px;
}
.resource-card {
    background: var(--white); border-radius: 12px; overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.04);
    text-align: center; padding-bottom: 25px;
}
.resource-image img { width: 100%; height: 200px; object-fit: cover; background: #eee; }
.resource-card h3 { margin: 20px 0 10px; }
.resource-card p { color: var(--grey); padding: 0 20px 20px; }
.resource-card .btn-download { margin: 0 20px; }

/* --- BLOG --- */
.blog { padding: 80px 0; }
.blog-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px;
}
.blog-card { border-radius: 12px; overflow: hidden; box-shadow: 0 2px 10px rgba(0,0,0,0.04); }
.blog-image img { width: 100%; height: 220px; object-fit: cover; background: #eee; }
.blog-content { padding: 20px; }
.blog-date { font-size: 0.85rem; color: var(--grey); }
.blog-content h3 { font-size: 1.2rem; margin: 10px 0; }
.blog-content p { color: var(--grey); font-size: 0.95rem; }
.blog-link { font-weight: 600; color: var(--primary); display: inline-flex; align-items: center; gap: 5px; margin-top: 10px;}
.blog-cta { text-align: center; margin-top: 40px; }

/* --- SUPPORT CTA (CORREGIDO) --- */
.support-cta {
    background-color: #1a1a1a;
    padding: 80px 0;
    overflow: hidden;
}

.support-container {
    display: flex;           /* Fuerza a poner texto e imagen en la misma fila */
    justify-content: space-between;
    align-items: center;     /* Centra verticalmente ambos elementos */
    gap: 40px;               /* Espacio entre el texto y la imagen */
}

.support-content {
    flex: 1;                 /* Ocupa el 50% del espacio */
    color: #ffffff;
}

.support-content h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: #ffffff;
}

.support-content p {
    font-size: 1.1rem;
    margin-bottom: 25px;
    opacity: 0.9;
    color: #dddddd;
}

.support-content .btn-primary {
    background-color: #ffffff;
    color: #1a1a1a;
    border-color: #ffffff;
}

.support-content .btn-primary:hover {
    background-color: #f0f0f0;
    color: #1a1a1a;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.2);
}

.support-image {
    flex: 1;                 /* Ocupa el 50% del espacio */
    display: flex;
    justify-content: center;
    align-items: center;
}

.support-image img {
    max-width: 350px;       /* Limita el tamaño máximo de la imagen */
    width: 100%;
    height: auto;
    filter: brightness(0) invert(1); /* Convierte la imagen a blanco */
}

/* --- RESPONSIVE DE ESTA SECCIÓN --- */
@media (max-width: 768px) {
    .support-container {
        flex-direction: column-reverse; /* En móvil, la imagen va arriba y el texto abajo (o viceversa) */
        text-align: center;
    }
    .support-image img {
        max-width: 200px;
        margin-bottom: 20px;
    }
}

/* --- RESPONSIVE DE ESTA SECCIÓN --- */
@media (max-width: 768px) {
    .support-container {
        flex-direction: column-reverse; /* En móvil, la imagen va arriba y el texto abajo (o viceversa) */
        text-align: center;
    }
    .support-image img {
        max-width: 200px;
        margin-bottom: 20px;
    }
}
/* --- CONTACTO --- */
.contact { padding: 80px 0; }
.contact-container {
    display: grid; grid-template-columns: 1fr 1fr; gap: 50px;
}
.contact-details { margin: 20px 0; }
.contact-details li { display: flex; align-items: center; gap: 15px; margin-bottom: 15px; color: var(--grey); }
.contact-details a:hover { color: var(--primary); }
.contact-social { display: flex; gap: 15px; }
.social-link {
    width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
    background: var(--light-grey); border-radius: 50%; color: var(--dark);
}
.social-link:hover { background: var(--primary); color: white; }
.contact-form {
    background: var(--light-grey); padding: 30px; border-radius: 12px;
}
/* --- ESTILOS DEL FORMULARIO --- */
.form-group { margin-bottom: 20px; }

.form-group label { 
    display: block; 
    font-weight: 600; 
    margin-bottom: 8px; 
    font-size: 0.9rem; 
}

/* Unificamos inputs y textarea (NO incluimos el select aquí para no arruinar otros selects) */
.form-group input, 
.form-group textarea {
    width: 100%; 
    padding: 12px; 
    border: 1px solid #eaeaea; 
    border-radius: 6px; 
    font-family: inherit; 
    font-size: 1rem; 
    background: white; 
    transition: border 0.3s;
    box-sizing: border-box;
}

.form-group input:focus, 
.form-group textarea:focus { 
    outline: none; 
    border-color: var(--primary); 
}

/* --- ESTILO EXCLUSIVO Y ELEGANTE PARA EL SELECT DE CONTACTO --- */
.form-group select.styled-select {
    width: 100%; 
    padding: 12px 35px 12px 12px; /* Dejamos espacio a la derecha para el icono */
    border: 1px solid #eaeaea; 
    border-radius: 6px; 
    font-family: inherit; 
    font-size: 1rem; 
    background: white; 
    transition: border 0.3s;
    box-sizing: border-box;
    
    /* Eliminamos la flecha fea por defecto del navegador */
    appearance: none; 
    -webkit-appearance: none; 
    -moz-appearance: none;
    
    /* Color gris para el texto cuando no se ha seleccionado nada */
    color: #6c757d; 
}

/* Cuando el usuario selecciona una opción válida, el texto se vuelve negro */
.form-group select.styled-select:valid {
    color: #1a1a1a; 
}

.form-group select.styled-select:focus { 
    outline: none; 
    border-color: var(--primary); 
}

/* Contenedor Wrapper para poder poner el icono de flecha usando FontAwesome */
.select-wrapper {
    position: relative;
    width: 100%;
}

.select-wrapper i {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    pointer-events: none; /* Permite hacer clic "a través" del icono hacia el select */
    font-size: 0.9rem;
}
/* --- FOOTER --- */
.footer { background: #111; color: #aaa; padding: 60px 0 20px; }
.footer-container {
    display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 40px;
}
.footer-brand p { margin-top: 15px; line-height: 1.6; max-width: 300px; }
.footer h4 { color: white; margin-bottom: 20px; font-size: 1.1rem; }
.footer-links ul li, .footer-legal ul li { margin-bottom: 10px; }
.footer-links a:hover, .footer-legal a:hover { color: white; }
.social-icons { display: flex; gap: 15px; }
.social-icons a { font-size: 1.2rem; }
.footer-bottom { border-top: 1px solid #222; padding-top: 20px; text-align: center; font-size: 0.9rem; }

/* --- MODAL --- */
.modal {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    z-index: 2000; align-items: center; justify-content: center;
}
.modal.active { display: flex; }
.modal-overlay {
    position: absolute; width: 100%; height: 100%; background: rgba(0,0,0,0.7);
}
.modal-content {
    position: relative; background: white; padding: 40px; border-radius: 12px;
    width: 90%; max-width: 450px; z-index: 10; animation: fadeIn 0.3s ease;
}
@keyframes fadeIn { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }
.modal-close {
    position: absolute; top: 15px; right: 15px; background: none; border: none;
    font-size: 1.5rem; color: #aaa; cursor: pointer; transition: 0.3s;
}
.modal-close:hover { color: var(--dark); }
.modal-content h3 { margin-bottom: 10px; }
.modal-content p { color: var(--grey); margin-bottom: 20px; }

/* --- WHATSAPP FLOTANTE --- */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 25px;
    right: 25px;
    background-color: #25D366;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.2);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    text-decoration: none;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    color: #FFF;
    box-shadow: 2px 2px 20px rgba(37, 211, 102, 0.5);
}

/* --- BOTÓN DE WHATSAPP EN LA ZONA DE CONTACTO --- */
.btn-whatsapp-contact {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background-color: #25D366;
    color: white;
    padding: 12px 25px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 25px; /* Separación del resto del contenido */
    border: 2px solid transparent;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-whatsapp-contact:hover {
    background-color: #1ebd5a;
    transform: translateY(-3px);
    color: white;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

/* --- MICRO ANIMACIÓN DE LATIDO (Opcional) --- */
@keyframes pulse-wa {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}
.whatsapp-float {
    animation: pulse-wa 2s infinite;
}

/* --- RESPONSIVE --- */
@media (max-width: 992px) {
    .hero-title { font-size: 2.8rem; }
    .hero-container { grid-template-columns: 1fr; text-align: center; }
    .hero-cta { justify-content: center; }
    .about-container { grid-template-columns: 1fr; text-align: center; }
    .about-text p { text-align: center; }
    .support-container { grid-template-columns: 1fr; text-align: center; }
    .contact-container { grid-template-columns: 1fr; }
    .footer-container { grid-template-columns: 1fr 1fr; }
    .hero-visual { display: none; } /* Oculta el símbolo decorativo en tablets y móviles */
}

@media (max-width: 768px) {
    .header { padding: 10px 0; }
    .main-nav {
        position: absolute; top: 100%; left: 0; width: 100%; background: white;
        flex-direction: column; padding: 20px; box-shadow: 0 4px 10px rgba(0,0,0,0.1);
        display: none;
    }
    .main-nav.active { display: flex; }
    .nav-list { flex-direction: column; align-items: center; width: 100%; }
    .menu-toggle { display: flex; }
    .btn-nav-cta { width: 100%; justify-content: center; margin-top: 10px; }
    
    .hero { padding: 120px 0 60px; }
    .hero-title { font-size: 2.2rem; }
    .hero-symbol img { width: 180px; }
    .hero-cta { flex-direction: column; align-items: center; }
    .btn-lg { width: 100%; justify-content: center; }
    .floating-element { display: none; }
    
    .section-header h2 { font-size: 2rem; }
    .support-content h2 { font-size: 2rem; }
    
    .about-stats { grid-template-columns: 1fr; }
    .footer-container { grid-template-columns: 1fr; text-align: center; }
    .footer-social { justify-content: center; display: flex; flex-direction: column; align-items: center; }
    .social-icons { justify-content: center; }
}