/* ======== CONFIGURACIÓN GLOBAL Y VARIABLES CORPORATIVAS ======== */
:root {
    /* Tus colores corporativos */
    --primary-color: #4086F4;   /* Tu azul principal */
    --secondary-color: #90D647; /* Tu verde para acentos */
    --white-color: #FFFFFF;     /* Tu blanco */

    /* Colores de soporte */
    --dark-color: #1A1A1A;      /* Gris oscuro para texto */
    --grey-color: #555;
    --light-grey-bg: #F8F9FA;
    
    /* Estilos de diseño */
    --shadow-soft: 0 5px 15px rgba(0, 0, 0, 0.05);
    --shadow-medium: 0 8px 24px rgba(0, 0, 0, 0.08);
    --border-radius-main: 6px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Dongle', sans-serif;
    font-weight: 400;
    line-height: 1.3;
    color: var(--dark-color);
    background-color: var(--white-color);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-size: 22px; 
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
 
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: color 0.3s ease;
}

a:hover {
    color: var(--secondary-color);
}

h1, h2, h3 {
    line-height: 1.1;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--dark-color);
}

h1 { font-size: 4.5rem; }
h2 { font-size: 3.5rem; text-align: center; margin-bottom: 3.5rem; }
h3 { font-size: 2.5rem; color: var(--primary-color); }

p {
    margin-bottom: 1rem;
    color: var(--grey-color);
    font-size: 1.3rem;
}

/* ======== HEADER / NAVEGACIÓN ======== */
header {
    background: var(--white-color);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    padding: 0.5rem 0; /* Padding vertical */
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
    border-bottom: 1px solid #EAEAEA;
}

header .nav {
    display: flex;
    justify-content: space-between;
    align-items: center; /* Centrado vertical */
    position: relative; 
}

.logo {
    color: var(--primary-color);
    z-index: 1001; 
    line-height: 0; 
    flex-shrink: 0; 
    display: flex; 
    align-items: center; 
   
}

.logo img {
    height: 50px; /* Altura del logo */
    width: auto; 
    display: block; 
}

/* Wrapper para la parte derecha */
.nav-right {
    display: flex;
    align-items: center;
    gap: 1.5rem; 
}

/* Menú principal */
.main-nav { display: flex; list-style: none; align-items: center; margin: 0; padding: 0; }
.main-nav li { margin-left: 2rem; }
.main-nav li a { font-weight: 700; color: var(--dark-color); font-size: 1.5rem; }

/* Selector de idioma */
.lang-selector { display: flex; gap: 0.5rem; margin-left: auto; }
.lang-switch { font-size: 1.2rem; font-weight: 700; color: var(--grey-color); padding: 0.2rem 0.5rem; border-radius: 4px; display: flex; align-items: center; line-height: 1; }
.lang-switch.active { background-color: var(--primary-color); color: var(--white-color); }
.lang-switch:hover { background-color: var(--light-grey-bg); }
.flag-img { width: 20px; height: 20px; margin-right: 0.5rem; vertical-align: middle; border-radius: 50%; object-fit: cover; }

/* Botón Contacto */
.btn-contacto { background-color: var(--secondary-color); color: var(--white-color); padding: 0.2rem 1.3rem; border-radius: var(--border-radius-main); transition: all 0.2s ease-in-out; font-weight: 700; font-size: 1.5rem; flex-shrink: 0; }
.btn-contacto:hover { background-color: #7DB839; color: var(--white-color); transform: translateY(-2px); box-shadow: var(--shadow-medium); }

/* --- BOTÓN HAMBURGUESA --- */
.hamburger-btn {
    display: none; 
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px; 
    flex-direction: column; 
    gap: 5px;
    z-index: 1001; 
    margin-top: -40px;
}
.hamburger-btn .line { display: block; width: 28px; height: 3px; background-color: var(--dark-color); transition: all 0.3s ease-in-out; border-radius: 3px; }
.hamburger-btn.active .line:nth-child(1) { transform: rotate(45deg) translate(6px, 6px); }
.hamburger-btn.active .line:nth-child(2) { opacity: 0; }
.hamburger-btn.active .line:nth-child(3) { transform: rotate(-45deg) translate(6px, -6px); }

/* ======== SECCIÓN HERO ======== */
.hero { background: linear-gradient(rgba(64, 134, 244, 0.8), rgba(64, 134, 244, 0.8)), url('https://images.unsplash.com/photo-1522202176988-66273c2fd55f?q=80&w=1742&auto=format=fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%D'); background-size: cover; background-position: center; color: var(--white-color); min-height: 480px; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 5rem 0; }
.hero h1 { font-size: 5.5rem; font-weight: 700; color: var(--white-color); }
.hero p { font-size: 2rem; color: rgba(255, 255, 255, 0.95); max-width: 650px; margin-bottom: 2.5rem; font-weight: 400; }

/* Botón principal */
.cta-button { background: var(--secondary-color); color: var(--white-color); padding: 0.5rem 2.2rem; font-size: 1.8rem; font-weight: 700; border-radius: var(--border-radius-main); transition: all 0.2s ease-in-out; box-shadow: 0 4px 10px rgba(0,0,0,0.1); border: none; cursor: pointer; font-family: 'Dongle', sans-serif; }
.cta-button:hover { background-color: #7DB839; color: var(--white-color); transform: translateY(-3px); box-shadow: var(--shadow-medium); }

/* ======== SECCIÓN SERVICIOS ======== */
.services { padding: 6rem 0; background-color: var(--light-grey-bg); }
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 2rem; }
.service-card { background: var(--white-color); border-radius: var(--border-radius-main); box-shadow: var(--shadow-soft); padding: 2.5rem; transition: transform 0.3s ease, box-shadow 0.3s ease; border: 1px solid #EAEAEA; display: flex; flex-direction: column; }
.service-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-medium); }
.service-card .icon { font-size: 2rem; width: 60px; height: 60px; background-color: var(--primary-color); color: var(--white-color); border-radius: 50%; display: flex; align-items: center; justify-content: center; margin-bottom: 1.5rem; flex-shrink: 0; }
.service-card p { font-size: 1.3rem; font-weight: 400; }
.service-card ul { margin-top: 1rem; margin-left: 20px; color: var(--grey-color); font-size: 1.3rem; flex-grow: 1; font-weight: 400; }
.service-card ul li { margin-bottom: 0.5rem; }

/* ======== "NOSOTROS" ======== */
.about-us { padding: 6rem 0; background-color: var(--white-color); }
.about-us .container { display: flex; align-items: center; gap: 3rem; }
.about-text { flex: 2; }
.about-visual { flex: 1; height: 350px; background-image: url('https://images.unsplash.com/photo-1523240795612-9a054b0db644?q=80&w=1740&auto=format=fit=crop'); background-size: cover; background-position: center; border-radius: var(--border-radius-main); box-shadow: var(--shadow-medium); }
.about-us h2 { text-align: left; }
.about-us h3 { font-size: 2rem; color: var(--primary-color); margin-top: 1rem; }
.about-us p { font-size: 1.4rem; font-weight: 400; }


/* ======== FORMULARIO DE CONTACTO ======== */
.contact-form { padding: 6rem 0; background: linear-gradient(rgba(64, 134, 244, 0.9), rgba(64, 134, 244, 0.9)), url('https://images.unsplash.com/photo-1487017159836-4e23ece2e4cf?q=80&w=1740&auto=format=fit=crop'); background-size: cover; background-position: center; background-attachment: fixed; border-top: 1px solid #EAEAEA; font-family: Arial, "Helvetica Neue", Helvetica, sans-serif; font-size: 16px; line-height: 1.6; }
.contact-form h2, .contact-form p { font-family: 'Dongle', sans-serif; line-height: 1.1; font-weight: 700; color: var(--white-color); }
.contact-form h2 { font-size: 3.5rem; }
.contact-form p { text-align: center; font-size: 1.6rem; font-weight: 400; margin-bottom: 3rem; color: rgba(255, 255, 255, 0.9); }
.contact-form form { max-width: 700px; margin: 0 auto; display: flex; flex-direction: column; gap: 1.2rem; }
.form-group { display: flex; flex-direction: column; }
.form-group label { font-size: 0.9rem; font-weight: 700; color: var(--white-color); opacity: 0.9; margin-bottom: 0.3rem; text-transform: uppercase; letter-spacing: 0.5px; }
.form-group input, .form-group textarea { font-family: Arial, "Helvetica Neue", Helvetica, sans-serif; font-size: 1rem; font-weight: 400; padding: 0.8rem 1rem; border: 1px solid #CCC; border-radius: var(--border-radius-main); background-color: var(--white-color); }
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--primary-color); box-shadow: 0 0 0 3px rgba(64, 134, 244, 0.2); }
.contact-form .cta-button { align-self: center; margin-top: 1rem; }

/* ======== ESTILOS PARA MENSAJES DEL FORMULARIO (MEJORADOS) ======== */
.form-message {
    max-width: 700px; 
    margin: 0 auto 1.5rem auto; 
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius-main);
    text-align: center;
    font-family: Arial, "Helvetica Neue", Helvetica, sans-serif; 
    font-size: 1.1rem; 
    font-weight: 500; 
    line-height: 1.5;
    border: 1px solid transparent; 
    box-shadow: 0 2px 5px rgba(0,0,0,0.1); 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    gap: 0.75rem; 
}

.form-message.success {
    background-color: #E6F4EA; 
    color: #1E4620; 
    border-color: #B7E1BF; 
}

.form-message.error {
    background-color: #FDECEA; 
    color: #611A15; 
    border-color: #F5C6CB; 
}

/* Icono para el mensaje de éxito */
.form-message.success::before {
    content: '✔'; 
    font-size: 1.3rem;
    line-height: 1; 
    color: #28A745; 
}

/* Icono para el mensaje de error */
.form-message.error::before {
    content: '✖'; 
    font-size: 1.3rem;
    line-height: 1;
    color: #DC3545; 
}


/* ======== CAPTCHA ======== */
.captcha-placeholder { display: flex; align-items: center; gap: 12px; background-color: var(--white-color); padding: 1rem; border: 1px solid #CCC; border-radius: var(--border-radius-main); }
.captcha-placeholder label { font-size: 1rem; font-weight: 400; color: var(--dark-color); margin-bottom: 0; text-transform: none; letter-spacing: 0; }
.captcha-placeholder input[type="checkbox"] { width: 24px; height: 24px; }
.captcha-placeholder .captcha-logo { margin-left: auto; width: 40px; height: 40px; background-image: url('https://www.gstatic.com/recaptcha/api2/logo_48.png'); background-size: contain; background-repeat: no-repeat; background-position: center; opacity: 0.7; }

/* ======== BOTÓN WHATSAPP ======== */
.whatsapp-float { position: fixed; width: 60px; height: 60px; bottom: 30px; right: 30px; background-color: #25D366; color: var(--white-color); border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2); z-index: 1000; transition: all 0.3s ease; }
.whatsapp-float:hover { transform: scale(1.1) translateY(-5px); box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3); }

/* ======== FOOTER ======== */
footer { background: var(--dark-color); color: #AAB; text-align: center; padding: 4rem 0; font-size: 1.2rem; }
footer p { color: #AAB; margin: 0.5rem 0; font-weight: 400; }
footer a { color: var(--white-color); font-weight: 700; }
footer a:hover { color: var(--primary-color); }

/* ======== ADAPTACIÓN A MÓVILES (Responsive) ======== */
@media (max-width: 768px) {
    h1 { font-size: 3.5rem; }
    .hero h1 { font-size: 4rem; }
    h2 { font-size: 3rem; }
    h3 { font-size: 2.2rem; }

    /* --- CAMBIOS PARA MENÚ HAMBURGUESA --- */
    
    header {
        padding: 0.5rem 0; 
    }

    header .nav {
        display: flex; 
        flex-direction: row; 
        justify-content: space-between; 
        align-items: center; /* Centra verticalmente */
        padding-top: 0; 
        padding-bottom: 0;
        width: 100%;
        position: relative; 
    }
    
    .logo {
        display: flex;
        align-items: center; 
    }

    .hamburger-btn {
        display: flex; /* Mostrar el botón */
        margin-left: auto; /* Empujarlo a la derecha */
        order: 1; /* Asegurar que esté después del logo */
        padding: 10px; /* Padding original */
        height: auto; /* Altura automática */
        align-self: center; /* <<< NUEVO: Forzar alineación vertical explícita */
    }

    /* Ocultamos el .nav-right y lo convertimos en overlay */
    .nav-right {
        display: none; 
        position: absolute;
        top: 61px; /* 50px logo + (0.5rem * 2 padding) + 1px border */
        left: 0;
        right: 0; 
        width: 100%;
        background-color: var(--white-color);
        box-shadow: 0 10px 15px rgba(0,0,0,0.1);
        
        flex-direction: column; 
        align-items: center;
        gap: 2rem;
        padding: 2rem;
        
        flex-grow: 0;
        justify-content: flex-start;
    }

    /* Clase .open para mostrar el menú */
    .nav-right.open {
        display: flex;
    }
    
    /* Estilos de los items DENTRO del menú abierto */
    .main-nav { flex-direction: column; gap: 2rem; width: 100%; text-align: center; order: 1; }
    .main-nav li { margin-left: 0; }
    .main-nav li a { font-size: 1.8rem; }
    .btn-contacto { width: 90%; text-align: center; padding: 0.5rem; order: 2; }
    .lang-selector { margin-left: 0; width: 100%; justify-content: center; gap: 1.5rem; order: 3; }
    /* --- FIN CAMBIOS HAMBURGUESA --- */

    .services, .contact-form, .about-us { padding: 4rem 0; }
    .contact-form { background-attachment: scroll; }
    .about-us .container { flex-direction: column; }
    .about-visual { height: 250px; width: 100%; }
    .about-us h2, .about-us h3 { text-align: center; }
}

@media (max-width: 480px) {
    body { font-size: 20px; } 
    .hero h1 { font-size: 3.5rem; }
    .hero p { font-size: 1.8rem; }
    
    .whatsapp-float { width: 50px; height: 50px; bottom: 20px; right: 20px; }
    .whatsapp-float svg { width: 24px; height: 24px; }
}