/* ======== 1. VARIABLES Y ESTILOS GLOBALES ======== */
:root {
    --primary-blue: #0d47a1;
    --secondary-blue: #1565c0;
    --accent-blue: #42a5f5;
    --dark-bg: #1a1a1a;
    --light-bg: #f4f7f6;
    --text-light: #ffffff;
    --text-dark: #333333;
    --font-main: Arial, sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    margin: 0;
    padding: 0;
    background-color: var(--text-light);
    color: var(--text-dark);
    line-height: 1.6;
    font-size: 18px;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ======== 2. BARRA DE NAVEGACIÓN (NAVBAR) ======== */
.navbar {
    background-color: var(--text-light);
    border-bottom: 1px solid #e0e0e0;
    padding: 10px 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--primary-blue);
    font-weight: bold;
    font-size: 1.5em;
}

.logo img {
    width: 90px;
    margin-right: 8px;
}

.nav-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
}

.nav-menu li {
    margin-left: 30px;
    position: relative;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: bold;
    transition: color 0.3s ease;
}

.nav-menu a:hover {
    color: var(--primary-blue);
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: white;
    list-style: none;
    padding: 10px 0;
    margin: 10px 0 0 0;
    border-radius: 5px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    width: 300px;
}
.dropdown:hover .dropdown-menu {
    display: block;
}
.dropdown-menu li { margin: 0; }
.dropdown-menu a { 
    display: block; 
    padding: 10px 20px; 
    white-space: normal;
}

/* ======== 3. SECCIÓN PRINCIPAL (HERO) ======== */
#hero {
    background-image: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('https://images.unsplash.com/photo-1521737604893-d14cc237f11d?q=80&w=2084&auto=format&fit=crop');
    background-size: cover;
    background-position: center;
    color: var(--text-light);
    text-align: center;
    padding: 100px 0 60px 0;
    margin-top: 60px;
}

.hero-logo {
    width: 400px !important; 
    margin-bottom: -20px;
}

#hero h1 { 
    font-size: 3em; 
    margin-bottom: 20px;
    line-height: 1.2;
}
#hero p { font-size: 1.1em; max-width: 600px; margin: 0 auto 30px auto; }

.cta-button {
    background-color: var(--primary-blue);
    color: var(--text-light);
    padding: 15px 30px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease;
    cursor: pointer;
    display: inline-block;
}
.cta-button:hover { background-color: var(--secondary-blue); }

/* ======== OTRAS SECCIONES ======== */
.content-section { 
    padding: 20px 0;
}
.content-section h2 { 
    font-size: 2.5em; 
    margin-bottom: 40px;
    color: var(--primary-blue); 
    text-align: center;
}
#nosotros p { max-width: 1000px; margin: 0 auto; text-align: justify; }
.bg-light { background-color: var(--light-bg); }

/* --- AJUSTES DE ESPACIADO ESPECÍFICOS --- */
#nosotros, #clientes {
    padding-top: 10px; 
}

#beneficios {
    padding-bottom: 0;
}

#nosotros h2, #clientes h2 {
    margin-bottom: 10px;
}

/* --- ESPACIO AÑADIDO DEBAJO DE LA SECCIÓN CLIENTES --- */
#clientes {
    padding-bottom: 80px; /* <--- PUEDES AJUSTAR ESTE VALOR */
}

/* ======== NUEVA SECCIÓN: MISIÓN Y VISIÓN ======== */
.mision-vision-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    text-align: left;
}
.mision-vision-grid .card {
    background-color: #ffffff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}
.mision-vision-grid h3 {
    margin-top: 0;
    color: var(--primary-blue);
    margin-bottom: 0;
}

/* ======== SERVICIOS (AJUSTADO A 4 COLUMNAS) ======== */
.services-grid-four { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; text-align: center; }
.service-card { background-color: #ffffff; padding: 30px; border-radius: 8px; box-shadow: 0 4px 15px rgba(0,0,0,0.08); transition: transform 0.3s ease, box-shadow 0.3s ease; height: 100%; box-sizing: border-box; }
.service-card:hover { transform: translateY(-10px); box-shadow: 0 8px 25px rgba(0,0,0,0.12); }
.service-icon { font-size: 3em; color: var(--primary-blue); margin-bottom: 20px; }

/* ======== BENEFICIOS (AJUSTADO A 5 COLUMNAS) ======== */
.benefits-grid-five {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
}
.benefit-item { text-align: center; }
.benefit-item h4 {
    height: 40px;
}
.benefit-icon { font-size: 2.5em; color: var(--secondary-blue); margin-bottom: 15px; }

/* ======== NUEVA SECCIÓN: CLIENTES ======== */
.sectors-list {
    margin-top: 30px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}
.sectors-list span {
    background-color: var(--light-bg);
    padding: 10px 20px;
    border-radius: 20px;
    font-weight: bold;
    color: var(--secondary-blue);
}
.sectors-list i {
    margin-right: 8px;
}
#clientes p {
    text-align: center;
}

/* ======== FOOTER ======== */
footer { background-color: var(--dark-bg); color: var(--text-light); padding: 60px 0 20px 0; text-align: center; }
footer h2 { color: var(--text-light); margin-top: 0; margin-bottom: 20px; }
footer .cta-button { margin-bottom: 30px; }
.contact-info { margin-top: 20px; }
.contact-info p { margin: 10px 0; }
.contact-info i { margin-right: 10px; color: var(--accent-blue); }
.contact-info a { color: var(--text-light); text-decoration: none; }
.contact-info a:hover { text-decoration: underline; }
.footer-bottom { border-top: 1px solid #444; padding-top: 20px; margin-top: 40px; font-size: 0.9em; color: #aaa; }

/* ======== PÁGINA DEL FORMULARIO ======== */
.form-page-background { background-color: var(--light-bg); }
.form-container { display: flex; justify-content: center; align-items: center; padding: 40px 20px; }
.modal-content { background-color: white; padding: 40px; border-radius: 8px; box-shadow: 0 5px 20px rgba(0,0,0,0.1); width: 100%; max-width: 600px; position: relative; font-size: 16px; }
.modal-content h3 { text-align: center; margin-top: 0; margin-bottom: 30px; }
.form-row { display: flex; gap: 20px; width: 100%; }
.form-row input { width: 100%; }
form input, form select, form textarea { width: 100%; padding: 12px; margin-bottom: 20px; border: 1px solid #ccc; border-radius: 4px; box-sizing: border-box; font-size: 1em; }
.form-consent { display: flex; align-items: flex-start; font-size: 0.8em; color: #666; margin-bottom: 20px; }
.form-consent input { width: auto; margin-right: 10px; margin-top: 4px; }
.submit-button { width: 100%; padding: 15px; background-color: #e80069; color: white; border: none; border-radius: 4px; font-size: 1.1em; font-weight: bold; cursor: pointer; transition: background-color 0.3s ease; }
.submit-button:hover { background-color: #c40058; }

/* ======== BOTÓN DE WHATSAPP ======== */
#whatsapp-button { position: fixed; bottom: 20px; right: 20px; background-color: #00E510; width: 60px; height: 60px; border-radius: 50%; box-shadow: 0 4px 8px rgba(0,0,0,0.2); display: flex; justify-content: center; align-items: center; z-index: 1000; transition: transform 0.3s ease; }
#whatsapp-button:hover { transform: scale(1.1); }
.whatsapp-icon { width: 47px; height: 47px; object-fit: contain; border-radius: 50%; }

/* --- REGLA AÑADIDA PARA CORREGIR EL SALTO DE LOS HIPERVÍNCULOS --- */
section[id] {
    scroll-margin-top: 130px;
}

/* ======== ESTILOS PARA MÓVILES (RESPONSIVE) ======== */
@media (max-width: 992px) {
    .services-grid-four, .benefits-grid-five {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    body { font-size: 16px; }
    .mision-vision-grid, .services-grid-four, .benefits-grid-five {
        grid-template-columns: 1fr;
    }
    .navbar .container { 
        flex-direction: column; 
    }
    .nav-menu { 
        margin-top: 15px;
        flex-wrap: wrap;
        justify-content: center;
    }
    #hero { 
        margin-top: 130px;
        padding: 60px 20px;
    }
    .form-row { flex-direction: column; gap: 0; }
    
    .hero-logo {
        width: 200px !important;
        margin-bottom: -10px;
    }

    #hero h1 {
        font-size: 2.2em;
        line-height: 1.3;
    }
    
    .nav-menu a {
        font-size: 0.8em;
    }
    .nav-menu li {
        margin-left: 10px;
        margin-right: 10px;
    }
}
