/* --- VARIABLES Y ESTILOS GENERALES --- */
:root {
    --primary-color: #0D2F5F; /* Azul oscuro corporativo */
    --secondary-color: #FDB813; /* Amarillo/Dorado del logo como acento */
    --text-color: #333333;
    --light-gray: #f4f7f6;
    --white-color: #ffffff;
    --header-height: 80px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
    background-color: var(--white-color);
    color: var(--text-color);
    font-family: 'Roboto', sans-serif;
    line-height: 1.7;
    padding-top: var(--header-height);
}

.container { width: 90%; max-width: 1200px; margin: auto; }

/* --- HEADER Y NAVEGACIÓN FIJA --- */
.main-header { position: fixed; top: 0; left: 0; width: 100%; background-color: var(--white-color); box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); z-index: 1000; height: var(--header-height); }
.nav-main { display: flex; justify-content: space-between; align-items: center; height: 100%; width: 90%; max-width: 1200px; margin: auto; }
.nav-brand-link { display: flex; align-items: center; height: 100%; }
.nav-brand { width: 230px; height: auto; display: block; }
.nav-menu { list-style: none; margin: 0; padding: 0; display: flex; }
.nav-main ul li a { padding: 10px 15px; color: var(--text-color); text-transform: uppercase; font-family: 'Oswald', sans-serif; font-weight: 300; font-size: 17px; border-bottom: 2px solid transparent; transition: border-color 0.3s ease, color 0.3s ease; text-decoration: none; }
.nav-main ul li a:hover { color: var(--primary-color); border-bottom-color: var(--secondary-color); }

/* --- ESTILOS GENERALES DE SECCIÓN --- */
.section-padding { padding: 80px 0; }
.section-light-bg { background-color: var(--light-gray); }
.section-title { text-align: center; font-size: 36px; color: var(--primary-color); margin-bottom: 50px; text-transform: uppercase; }

/* --- SHOWCASE (camion completo) --- */
.showcase { 
    width: 100%; 
    height: calc(100vh - var(--header-height)); 
    min-height: 500px; 
    
    /* Asegúrate de mantener la ruta de tu imagen correcta aquí */
    background: url(./img/portada_camion_fondo_oscuro.jpg) no-repeat center bottom; 
    background-size: cover; 
    
    position: relative; 
    display: flex; 
    flex-direction: column; 
    align-items: flex-start; 
    justify-content: flex-end; 
    text-align: left; 
    
    /* CAMBIO AQUÍ: 
       Bajamos de 140px a 40px. 
       Esto hace que el texto "caiga" y deje ver el logo del camión. */
    padding: 0 0 40px 5%; 
    
    color: var(--white-color); 
}

/*MODIFICACION DE ESTILOS DEL TEXTO DEL SHOWCASE*/
/* Contenedor del texto nuevo */
.hero-content-left {
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px; /* Espacio entre el texto de arriba y el de abajo */
}

/* Estilo para "¡HAY EQUIPO!" */
.hero-tagline {
    background-color: var(--white-color);
    color: var(--primary-color); /* Letras azules sobre fondo blanco */
    padding: 5px 15px;
    font-family: 'Oswald', sans-serif;
    font-size: 20px;
    font-weight: 400;
    text-transform: uppercase;
    display: inline-block;
    letter-spacing: 1px;
}

/* Estilo para "INGENIERÍA, OBRAS Y SERVICIOS" */
.hero-title {
    background-color: var(--white-color);
    color: var(--primary-color); /* Letras azules sobre fondo blanco */
    padding: 10px 20px;
    font-family: 'Oswald', sans-serif;
    font-size: 36px;
    font-weight: 700;
    text-transform: uppercase;
    margin: 0;
    line-height: 1.2;
    display: inline-block;
}

/* Ajuste Responsivo para móviles */
@media(max-width: 768px) {
    .showcase {
        padding-bottom: 50px; /* Un poco menos de espacio abajo en móvil */
        padding-left: 20px;
        align-items: flex-start; /* Aseguramos que se mantenga a la izq */
    }

    .hero-tagline {
        font-size: 16px;
        padding: 4px 10px;
    }

    .hero-title {
        font-size: 24px;
        padding: 8px 15px;
    }
}

/* --- SECCIÓN SERVICIOS --- */
.services-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; }
.service-card { background: var(--white-color); padding: 30px; text-align: center; border-radius: 8px; box-shadow: 0 4px 20px rgba(0,0,0,0.08); transition: transform 0.3s ease, box-shadow 0.3s ease; }
.service-card:hover { transform: translateY(-10px); box-shadow: 0 10px 25px rgba(0,0,0,0.12); }
.service-icon { font-size: 48px; color: var(--primary-color); margin-bottom: 20px; }
.service-card h3 { font-size: 22px; margin-bottom: 15px; color: var(--text-color); }
.service-card ul { list-style: none; padding: 0; }
.service-card ul li { margin-bottom: 8px; color: #555; }

/* --- SECCIÓN PROYECTOS --- */
.news-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; padding: 0; }
.news-cards .card { background: var(--white-color); border-radius: 5px; box-shadow: 0 4px 15px rgba(0,0,0,0.08); overflow: hidden; }
.news-cards .card img { width: 100%; height: 220px; object-fit: cover; }
.card-content { padding: 25px; }
.card-content h3 { font-size: 24px; margin: 0 0 15px 0; }
.card-content p { font-size: 16px; color: #555; margin-bottom: 20px; }

/* --- SECCIÓN SOBRE NOSOTROS --- */
.about-section { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; }
.about-text p { margin-bottom: 15px; }
.about-image img { width: 100%; height: auto; border-radius: 8px; box-shadow: 0 10px 30px rgba(0,0,0,0.15); }

/* --- FORMULARIOS (UNIVERSAL) --- */
.form_consulta, .carga_cv { max-width: 700px; margin: 0 auto; padding: 40px; border-radius: 8px; box-shadow: 0 6px 20px rgba(0,0,0,0.1); background-color: var(--white-color); }
.form_consulta h2, .carga_cv h2 { text-align: center; color: var(--primary-color); margin-bottom: 10px; }
.carga_cv h3 { text-align: center; font-weight: 300; color: #666; margin-bottom: 30px; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; font-weight: 700; color: #555; font-size: 14px; }
.form_consulta input, .form_consulta textarea, .carga_cv input, .carga_cv textarea { width: 100%; padding: 15px; border: 1px solid #ccc; border-radius: 5px; font-size: 16px; color: var(--text-color); transition: border-color 0.3s ease, box-shadow 0.3s ease; }
.form_consulta input::placeholder, .form_consulta textarea::placeholder, .carga_cv input::placeholder, .carga_cv textarea::placeholder { color: #aaa; }
.form_consulta input:focus, .form_consulta textarea:focus, .carga_cv input:focus, .carga_cv textarea:focus { outline: none; border-color: var(--primary-color); box-shadow: 0 0 0 3px rgba(13, 47, 95, 0.1); }
.form_consulta textarea, .carga_cv textarea { min-height: 120px; resize: vertical; }
.form_consulta button, .carga_cv button { width: 100%; padding: 15px; border: none; border-radius: 5px; background: var(--primary-color); color: white; font-size: 18px; font-family: 'Oswald', sans-serif; text-transform: uppercase; cursor: pointer; transition: background-color 0.3s ease, transform 0.2s ease; }
.form_consulta button:hover, .carga_cv button:hover { background-color: #0b254d; transform: translateY(-2px); }
.error-message { color: #d93025; font-size: 14px; margin-top: 5px; min-height: 1em; }
.success-message { display: none; color: #1e8e3e; font-size: 16px; text-align: center; margin-top: 15px; padding: 10px; border: 1px solid #1e8e3e; border-radius: 4px; background-color: #e6f4ea; }

/* --- FOOTER Y BOTONES FLOTANTES --- */
.main-footer { background-color: var(--primary-color); color: #a9b3c1; padding: 40px 0; font-size: 14px; }
.footer-content { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px; }
.footer-section { flex: 1; min-width: 250px; }
.footer-section.links { display: flex; flex-direction: column; gap: 10px; }
.footer-section.links a { color: var(--white-color); text-decoration: none; }
.footer-section.links a:hover { text-decoration: underline; }
.footer-section.copyright { text-align: center; }
.footer-section.social-icons { display: flex; justify-content: flex-end; gap: 15px; margin-right: 30px; }
.social-icons a { color: var(--primary-color); background-color: var(--white-color); width: 40px; height: 40px; display: flex; justify-content: center; align-items: center; border-radius: 50%; font-size: 20px; transition: transform 0.3s ease, background-color 0.3s ease; text-decoration: none; }
.social-icons a:hover { transform: scale(1.1); background-color: var(--secondary-color); }
.whatsapp-float { position: fixed; bottom: 20px; right: 20px; background-color: #25D366; color: var(--white-color); width: 60px; height: 60px; border-radius: 50%; display: flex; justify-content: center; align-items: center; font-size: 30px; box-shadow: 0 4px 10px rgba(0,0,0,0.2); z-index: 998; transition: transform 0.3s ease; text-decoration: none; }
.whatsapp-float:hover { transform: scale(1.1); }
.scroll-to-top { position: fixed; bottom: 90px; right: 20px; background-color: #333; color: var(--white-color); width: 50px; height: 50px; border-radius: 5px; display: flex; justify-content: center; align-items: center; font-size: 24px; z-index: 998; transition: opacity 0.4s ease, visibility 0.4s ease, transform 0.3s ease; opacity: 0; visibility: hidden; text-decoration: none; }
.scroll-to-top.visible { opacity: 1; visibility: visible; }
.scroll-to-top:hover { background-color: #555; transform: translateY(-3px); }

/* --- ANIMACIONES --- */
.fade-in-section { opacity: 0; transform: translateY(30px); transition: opacity 0.8s ease-out, transform 0.8s ease-out; }
.fade-in-section.is-visible { opacity: 1; transform: translateY(0); }
/* --- PÁGINA DE GRACIAS --- */
.thank-you-container {
    max-width: 600px;
    margin: 40px auto;
    padding: 50px;
    background-color: var(--white-color);
    text-align: center;
    border-radius: 8px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

.thank-you-icon {
    font-size: 60px;
    color: #25D366; /* Verde éxito */
    margin-bottom: 20px;
}

.thank-you-container h1 {
    font-size: 36px;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.thank-you-container p {
    font-size: 18px;
    color: #555;
    margin-bottom: 30px;
}

.btn-primary {
    display: inline-block;
    padding: 12px 30px;
    background-color: var(--primary-color);
    color: var(--white-color);
    border-radius: 5px;
    text-decoration: none;
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
    transition: background-color 0.3s ease;
}

.btn-primary:hover {
    background-color: #0b254d;
    color: var(--white-color);
}
/* --- RESPONSIVIDAD --- */
@media(max-width: 992px) {
    .services-grid { grid-template-columns: repeat(2, 1fr); }
    .about-section { grid-template-columns: 1fr; }
    .about-text { order: 2; }
    .about-image { order: 1; }
}

@media(max-width: 768px) {
    body { padding-top: 0; }
    .main-header { position: relative; height: auto; }
    .nav-main { flex-direction: column; height: auto; padding: 20px 0; }
    .nav-brand { margin-bottom: 15px; }
    .nav-main ul { flex-direction: column; align-items: center; }
    .nav-main ul li { padding: 8px 0; }
    .showcase h2 { font-size: 38px; }
    .showcase p { font-size: 18px; }
    .news-cards { grid-template-columns: 1fr; }
    .form_consulta, .carga_cv { padding: 25px; box-shadow: none; }
    .footer-content { flex-direction: column; text-align: center; }
    .footer-section.social-icons { justify-content: center; margin-right: 0; }
    .services-grid { grid-template-columns: 1fr; }
}