/* =========================================================
   AGROSANTI - HOJA DE ESTILOS PRINCIPAL
   ========================================================= */

/* 1. Variables y configuración general */

:root {
    --verde-principal: #0b5d2a;
    --verde-oscuro: #08451f;
    --verde-texto: #1b5e20;
    --verde-claro: #eaf4e2;
    --verde-whatsapp: #25d366;
    --verde-whatsapp-hover: #1ebe5d;
    --fondo-general: #f4f7f1;
    --blanco: #ffffff;
    --texto-principal: #222222;
    --texto-secundario: #555555;
    --borde-suave: #cccccc;
    --sombra-suave: 0 3px 10px rgba(0, 0, 0, 0.08);
}

html {
    scroll-behavior: smooth;
}

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

body {
    font-family: Arial, Helvetica, sans-serif;
    background-color: var(--fondo-general);
    color: var(--texto-principal);
}

img {
    max-width: 100%;
}

/* 2. Encabezado y logo */

.encabezado {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px 8%;
    background-color: var(--blanco);
}

.contenedor-logo {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: center;
}

.enlace-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.logo {
    display: block;
    width: min(380px, 80vw);
    height: auto;
}

/* 3. Navegación */

.menu {
    padding: 14px;
    text-align: center;
    background-color: var(--verde-principal);
}

.menu a {
    margin: 0 18px;
    color: var(--blanco);
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
}

.menu a:hover,
.menu a:focus-visible {
    text-decoration: underline;
}

/* 4. Portada principal */

.hero {
    position: relative;
    display: flex;
    min-height: 620px;
    align-items: center;
    padding: 0;
    color: var(--blanco);
    background-image:
        linear-gradient(
            90deg,
            rgba(8, 42, 23, 0.92) 0%,
            rgba(8, 42, 23, 0.75) 48%,
            rgba(8, 42, 23, 0.20) 100%
        ),
        url("img/hero/hero-terreno.jpg");
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

.hero-contenido {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 95px 8%;
}

.hero-etiqueta {
    display: inline-block;
    margin-bottom: 18px;
    padding: 8px 14px;
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 999px;
    background-color: rgba(255, 255, 255, 0.10);
    color: var(--blanco);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.hero h1 {
    max-width: 760px;
    margin: 0 0 22px;
    color: var(--blanco);
    font-size: clamp(42px, 5vw, 68px);
    line-height: 1.08;
    text-align: left;
}

.hero-descripcion {
    max-width: 680px;
    margin: 0;
    color: rgba(255, 255, 255, 0.92);
    font-size: 19px;
    line-height: 1.65;
    text-align: left;
}

.hero-acciones {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 32px;
}

.boton-hero {
    display: inline-flex;
    min-height: 50px;
    align-items: center;
    justify-content: center;
    padding: 13px 24px;
    border: 2px solid transparent;
    border-radius: 7px;
    font-weight: 700;
    text-decoration: none;
    transition:
        transform 0.2s ease,
        background-color 0.2s ease,
        border-color 0.2s ease;
}

.boton-hero:hover {
    transform: translateY(-2px);
}

.boton-hero-principal {
    background-color: var(--blanco);
    color: #145c30;
}

.boton-hero-principal:hover {
    background-color: #e8f3e9;
    color: #0b4b25;
}

.boton-hero-secundario {
    border-color: rgba(255, 255, 255, 0.85);
    background-color: transparent;
    color: var(--blanco);
}

.boton-hero-secundario:hover {
    background-color: rgba(255, 255, 255, 0.14);
    color: var(--blanco);
}

.hero-cobertura {
    margin-top: 25px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 14px;
    text-align: left;
}

/* 5. Sección Nosotros */

.nosotros {
    padding: 70px 8%;
    background-color: var(--blanco);
}

.contenedor {
    display: flex;
    max-width: 1100px;
    align-items: center;
    gap: 40px;
    margin: auto;
}

.texto-nosotros {
    flex: 2;
}

.texto-nosotros h2 {
    margin-bottom: 20px;
    color: var(--verde-principal);
    font-size: 30px;
}

.texto-nosotros p {
    margin-bottom: 15px;
    font-size: 17px;
    line-height: 1.7;
}

.caja-destacada {
    flex: 1;
    padding: 30px;
    border-left: 5px solid var(--verde-principal);
    border-radius: 8px;
    background-color: var(--verde-claro);
}

.caja-destacada h3 {
    margin-bottom: 15px;
    color: var(--verde-principal);
}

.caja-destacada p {
    line-height: 1.6;
}

/* 6. Servicios */

.servicios {
    padding: 80px 8%;
    background-color: var(--fondo-general);
    text-align: center;
}

.servicios h2 {
    margin-bottom: 50px;
    color: var(--verde-principal);
    font-size: 32px;
}

.contenedor-servicios {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 25px;
}

.tarjeta-servicio {
    padding: 35px 25px;
    border-radius: 10px;
    background-color: var(--blanco);
    box-shadow: var(--sombra-suave);
    transition: transform 0.3s ease;
}

.tarjeta-servicio:hover {
    transform: translateY(-5px);
}

.icono {
    margin-bottom: 15px;
    font-size: 45px;
}

.tarjeta-servicio h3 {
    margin-bottom: 15px;
    color: var(--verde-principal);
}

.tarjeta-servicio p {
    line-height: 1.6;
}

/* 7. Trabajos realizados */

.trabajos {
    padding: 80px 8%;
    background-color: var(--blanco);
    text-align: center;
}

.trabajos h2 {
    margin-bottom: 15px;
    color: var(--verde-principal);
    font-size: 32px;
}

.descripcion-seccion {
    max-width: 750px;
    margin: 0 auto 45px;
    font-size: 17px;
    line-height: 1.6;
}

.galeria-trabajos {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 25px;
}

.trabajo {
    overflow: hidden;
    border-radius: 10px;
    background-color: var(--fondo-general);
    box-shadow: var(--sombra-suave);
}

.trabajo img {
    display: block;
    width: 100%;
    height: 260px;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.trabajo:hover img {
    transform: scale(1.05);
}

.trabajo h3 {
    margin: 20px 15px 10px;
    color: var(--verde-principal);
}

.trabajo p {
    padding: 0 20px 25px;
    line-height: 1.6;
}

/* 8. Preguntas frecuentes */

.faq {
    padding: 80px 8%;
    background-color: var(--fondo-general);
}

.faq h2 {
    margin-bottom: 40px;
    color: var(--verde-principal);
    font-size: 32px;
    text-align: center;
}

.contenedor-faq {
    max-width: 850px;
    margin: auto;
}

.pregunta {
    overflow: hidden;
    margin-bottom: 15px;
    border-radius: 8px;
    background-color: var(--blanco);
    box-shadow: var(--sombra-suave);
}

.pregunta-btn {
    width: 100%;
    padding: 20px;
    border: none;
    background-color: var(--blanco);
    color: var(--verde-principal);
    font-size: 17px;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
}

.respuesta {
    display: none;
    padding: 0 20px 20px;
    line-height: 1.6;
}

.pregunta.activa .respuesta {
    display: block;
}

/* 9. Contacto y mensajes */

.contacto {
    padding: 80px 8%;
    background-color: var(--blanco);
    text-align: center;
}

.contacto h2 {
    margin-bottom: 15px;
    color: var(--verde-principal);
    font-size: 32px;
}

.texto-contacto {
    margin-bottom: 35px;
    font-size: 17px;
}

.formulario-contacto {
    max-width: 700px;
    margin: auto;
}

.formulario-contacto input,
.formulario-contacto textarea {
    width: 100%;
    margin-bottom: 15px;
    padding: 15px;
    border: 1px solid var(--borde-suave);
    border-radius: 6px;
    font-family: inherit;
    font-size: 15px;
}

.formulario-contacto input:focus,
.formulario-contacto textarea:focus {
    border-color: var(--verde-principal);
    outline: 2px solid rgba(11, 93, 42, 0.12);
}

.formulario-contacto button {
    padding: 15px 35px;
    border: none;
    border-radius: 6px;
    background-color: var(--verde-principal);
    color: var(--blanco);
    font-size: 16px;
    cursor: pointer;
}

.formulario-contacto button:hover {
    background-color: var(--verde-oscuro);
}

.alerta {
    max-width: 700px;
    margin: 20px auto;
    padding: 14px 18px;
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
}

.alerta-exito {
    border: 1px solid #2e7d32;
    background-color: #e8f5e9;
    color: var(--verde-texto);
}

.alerta-error {
    border: 1px solid #c62828;
    background-color: #ffebee;
    color: #b71c1c;
}

/* 10. Pie de página */

.footer {
    margin-top: 50px;
    background-color: var(--verde-principal);
    color: var(--blanco);
}

.footer-contenido {
    display: flex;
    max-width: 1100px;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 40px;
    margin: auto;
    padding: 45px 8%;
    text-align: left;
}

.footer-columna {
    min-width: 250px;
    flex: 1;
}

.footer-columna h3 {
    margin-bottom: 15px;
    font-size: 20px;
}

.footer-columna p {
    font-size: 15px;
    line-height: 1.7;
}

.footer a {
    color: var(--blanco);
    font-weight: 600;
    text-decoration: none;
}

.footer a:hover {
    color: #c8e6c9;
    text-decoration: underline;
}

.footer-copy {
    padding: 15px;
    background-color: var(--verde-oscuro);
    font-size: 14px;
    text-align: center;
}

/* 11. Botón flotante de WhatsApp */

.whatsapp-flotante {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 13px 17px;
    border-radius: 999px;
    background-color: var(--verde-whatsapp);
    color: var(--blanco);
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.22);
    transition:
        transform 0.2s ease,
        background-color 0.2s ease,
        box-shadow 0.2s ease;
}

.whatsapp-flotante svg {
    width: 26px;
    height: 26px;
    flex-shrink: 0;
    fill: currentColor;
}

.whatsapp-flotante:hover {
    transform: translateY(-3px);
    background-color: var(--verde-whatsapp-hover);
    color: var(--blanco);
    box-shadow: 0 11px 27px rgba(0, 0, 0, 0.27);
}

.whatsapp-flotante:focus-visible {
    outline: 3px solid var(--blanco);
    outline-offset: 3px;
}

/* 12. Diseño responsivo */

@media (max-width: 768px) {
    html,
    body {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    .encabezado {
        padding: 16px 20px;
    }

    .logo {
        width: min(300px, 85vw);
    }

    .menu {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px 14px;
        padding: 14px 10px;
    }

    .menu a {
        margin: 0;
        font-size: 13px;
        line-height: 1.3;
    }

    .hero {
        min-height: 570px;
        background-image:
            linear-gradient(
                rgba(8, 42, 23, 0.82),
                rgba(8, 42, 23, 0.82)
            ),
            url("img/hero/hero-terreno.jpg");
        background-position: center;
        background-size: cover;
    }

    .hero-contenido {
        padding: 72px 22px;
    }

    .hero-etiqueta {
        font-size: 12px;
    }

    .hero h1 {
        font-size: 39px;
        line-height: 1.1;
    }

    .hero-descripcion {
        font-size: 17px;
        line-height: 1.55;
    }

    .hero-acciones {
        flex-direction: column;
        align-items: stretch;
    }

    .boton-hero {
        width: 100%;
    }

    .hero-cobertura {
        font-size: 13px;
    }

    .nosotros,
    .servicios,
    .trabajos,
    .faq,
    .contacto {
        padding: 55px 20px;
    }

    .contenedor {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 25px;
    }

    .texto-nosotros,
    .caja-destacada {
        width: 100%;
        flex: none;
    }

    .texto-nosotros h2 {
        font-size: 27px;
    }

    .texto-nosotros p,
    .texto-contacto {
        font-size: 16px;
    }

    .caja-destacada {
        padding: 24px;
    }

    .servicios h2,
    .trabajos h2,
    .faq h2,
    .contacto h2 {
        font-size: 28px;
    }

    .servicios h2,
    .faq h2 {
        margin-bottom: 30px;
    }

    .contenedor-servicios,
    .galeria-trabajos {
        width: 100%;
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .tarjeta-servicio {
        width: 100%;
        padding: 28px 22px;
    }

    .trabajo {
        width: 100%;
    }

    .trabajo img {
        height: 230px;
    }

    .contenedor-faq,
    .formulario-contacto {
        width: 100%;
        max-width: 100%;
    }

    .pregunta-btn {
        padding: 18px;
        font-size: 15px;
    }

    .texto-contacto {
        line-height: 1.5;
    }

    .formulario-contacto input,
    .formulario-contacto textarea {
        font-size: 16px;
    }

    .formulario-contacto button {
        width: 100%;
    }

    .footer {
        margin-top: 0;
    }

    .footer-contenido {
        width: 100%;
        flex-direction: column;
        gap: 25px;
        padding: 40px 20px;
    }

    .footer-columna {
        width: 100%;
        min-width: 0;
    }

    .whatsapp-flotante {
        right: 16px;
        bottom: 16px;
        width: 58px;
        height: 58px;
        justify-content: center;
        padding: 0;
        border-radius: 50%;
    }

    .whatsapp-flotante span {
        display: none;
    }

    .whatsapp-flotante svg {
        width: 31px;
        height: 31px;
    }
}
