:root {
    --negro: #111111;
    --verde: #009640;
    --verde-oscuro: #007a34;
    --gris: #f2f2f2;
    --blanco: #ffffff;
}

/* ==============================
   CONFIGURACIÓN GENERAL
   ============================== */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

#inicio {
    scroll-margin-top: 90px;
}

#nosotros,
#servicios,
#proyectos,
#contacto {
    scroll-margin-top: 18px;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    color: #222;
}


/* ==============================
   HEADER
   ============================== */

header {
    background-color: var(--blanco);
    padding: 8px 35px;
    border-bottom: 2px solid var(--verde);
}

nav {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo img {
    width: 130px;
    height: auto;
    display: block;
}

.menu {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 30px;
    margin-left: auto;
}

.menu a {
    color: var(--negro);
    text-decoration: none;
    font-size: 17px;
    transition: color 0.3s ease;
}

.menu a:hover {
    color: var(--verde);
}


/* ==============================
   SERVICIOS
   ============================== */

.servicios {
    padding: 48px 50px 52px;
    background-color: var(--blanco);
}

.servicios h2 {
    text-align: center;
    color: var(--negro);
    font-size: 42px;
    line-height: 1.15;
    margin: 0 0 18px;
    position: relative;
}

.servicios h2::after {
    content: "";
    display: block;
    width: 60px;
    height: 4px;
    background-color: var(--verde);
    margin: 10px auto 0;
}

.servicios-intro {
    max-width: 750px;
    margin: 14px auto 0;
    text-align: center;
    color: #333;
    font-size: 17px;
    line-height: 1.5;
}


/* ==============================
   TARJETAS DE SERVICIOS
   ============================== */

.tarjetas {
    width: 100%;
    max-width: 1100px;
    margin: 24px auto 4px;

    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 25px;
}

.tarjeta {
    background-color: var(--gris);

    border-top: 3px solid var(--verde);
    border-radius: 6px;

    padding: 26px 22px;

    text-align: center;

    min-height: 200px;

    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);

    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease;
}

.tarjeta:hover {
    transform: translateY(-4px);

    box-shadow: 0 7px 18px rgba(0, 0, 0, 0.12);
}

.icono {
    width: 44px;
    height: 44px;
    margin-right: auto;
    margin-bottom: 15px;
    margin-left: auto;
    color: var(--verde);
}

.icono svg {
    display: block;
    width: 100%;
    height: 100%;
}

.tarjeta h3 {
    margin: 0 0 15px;

    color: var(--negro);

    font-size: 19px;
}

.tarjeta p {
    margin: 0;

    color: #333;

    font-size: 15px;
    line-height: 1.5;
}


/* ==============================
   PORTADA / HERO
   ============================== */

.hero {
    background-image:
        linear-gradient(rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0.58)),
        url("imagenes/Proyectos/Estadio Nacional 15_ok.jpeg");
    background-size: cover;
    background-position: center 48%;
    background-repeat: no-repeat;

    min-height: clamp(500px, calc(100svh - 86px), 680px);

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;

    padding: 70px 50px;

    text-align: center;
}

.hero h1 {
    color: var(--blanco);

    font-size: 55px;

    max-width: 700px;

    margin: 0 0 15px;
}

.hero p {
    color: var(--blanco);

    font-size: 21px;

    max-width: 650px;

    line-height: 1.5;

    margin: 0 0 20px;
}

.hero-cta {
    display: inline-block;

    background-color: var(--verde);

    color: var(--blanco);

    text-decoration: none;

    border: none;
    border-radius: 5px;

    padding: 15px 30px;

    font-size: 18px;

    cursor: pointer;

    transition: background-color 0.3s ease;
}

.hero-cta:hover {
    background-color: var(--verde-oscuro);
}


/* ==============================
   QUIÉNES SOMOS
   ============================== */

.nosotros {
    padding: 48px 50px 52px;
    background-color: var(--blanco);
}

.nosotros-contenido {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
}

.nosotros h2 {
    text-align: center;
    color: var(--negro);
    font-size: 42px;
    line-height: 1.15;
    margin: 0 0 24px;
    position: relative;
}

.nosotros h2::after {
    content: "";
    display: block;
    width: 60px;
    height: 4px;
    background-color: var(--verde);
    margin: 10px auto 0;
}

.nosotros-texto {
    max-width: 800px;
    margin: 0 auto;
    color: #333;
    font-size: 17px;
    line-height: 1.7;
}

.nosotros-texto p {
    margin: 0 0 16px;
}

.nosotros-texto p:last-child {
    margin-bottom: 0;
}


/* ==============================
   PROYECTOS DESTACADOS
   ============================== */

.proyectos {
    padding: 50px 50px 56px;
    background-color: var(--gris);
}

.proyectos-contenido {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
}

.proyectos h2,
.contacto h2 {
    text-align: center;
    color: var(--negro);
    font-size: 42px;
    line-height: 1.15;
    margin: 0 0 25px;
    position: relative;
}

.proyectos h2::after,
.contacto h2::after {
    content: "";
    display: block;
    width: 60px;
    height: 4px;
    background-color: var(--verde);
    margin: 10px auto 0;
}

.proyectos-intro {
    max-width: 750px;
    margin: 20px auto 40px;
    text-align: center;
    color: #333;
    font-size: 17px;
    line-height: 1.5;
}

.proyectos-lista {
    display: grid;
    gap: 45px;
}

.proyecto {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
    align-items: center;
    gap: 45px;
    padding: 30px;
    background-color: var(--blanco);
    border-radius: 8px;
    box-shadow: 0 5px 18px rgba(0, 0, 0, 0.09);
}

.proyecto-invertido {
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
}

.proyecto-invertido .proyecto-galeria {
    order: 2;
}

.proyecto-invertido .proyecto-informacion {
    order: 1;
}

.proyecto-imagen-principal {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: 6px;
    background-color: #ddd;
}

.proyecto-miniaturas {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.proyecto-miniatura {
    padding: 0;
    overflow: hidden;
    border: 3px solid transparent;
    border-radius: 5px;
    background: none;
    cursor: pointer;
    transition: border-color 0.2s ease, opacity 0.2s ease;
}

.proyecto-miniatura:hover {
    opacity: 0.82;
}

.proyecto-miniatura:focus-visible {
    outline: 3px solid rgba(0, 150, 64, 0.35);
    outline-offset: 2px;
}

.proyecto-miniatura.is-active {
    border-color: var(--verde);
}

.proyecto-miniatura img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

.proyecto-categoria {
    margin: 0 0 10px;
    color: var(--verde-oscuro);
    font-size: 14px;
    font-weight: bold;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.proyecto-informacion h3 {
    margin: 0 0 18px;
    color: var(--negro);
    font-size: 31px;
    line-height: 1.15;
}

.proyecto-informacion > p:last-child {
    margin: 0;
    color: #333;
    font-size: 16px;
    line-height: 1.7;
}


/* ==============================
   CONTACTO
   ============================== */

.contacto {
    padding: 40px 50px 48px;
    background-color: var(--blanco);
}

.contacto-contenido {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
}

.contacto-intro {
    max-width: 750px;
    margin: 12px auto 26px;
    text-align: center;
}

.contacto-intro h3 {
    margin: 0 0 8px;
    color: var(--negro);
    font-size: 24px;
}

.contacto-intro p {
    margin: 0;
    color: #333;
    font-size: 17px;
    line-height: 1.6;
}

.contacto-columnas {
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    gap: 35px;
    align-items: stretch;
}

.contacto-informacion,
.contacto-formulario {
    padding: 26px;
    border-radius: 8px;
    box-shadow: 0 5px 18px rgba(0, 0, 0, 0.08);
}

.contacto-informacion {
    display: flex;
    flex-direction: column;
    background-color: var(--gris);
}

.contacto-formulario {
    background-color: var(--blanco);
    border: 1px solid #e2e2e2;
}

.contacto-area {
    padding-bottom: 25px;
    margin-bottom: 25px;
    border-bottom: 1px solid #d8d8d8;
}

.contacto-area h3 {
    margin: 0 0 16px;
    color: var(--negro);
    font-size: 21px;
}

.contacto-contactos {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.contacto-dato + .contacto-dato {
    padding-left: 24px;
    border-left: 1px solid #d8d8d8;
}

.contacto-area p {
    margin: 0 0 12px;
    line-height: 1.5;
}

.contacto-area p:last-child {
    margin-bottom: 0;
}

.contacto-area span {
    display: block;
    margin-bottom: 2px;
    color: #555;
    font-size: 14px;
    font-weight: bold;
}

.contacto-area a {
    color: var(--negro);
    text-decoration: none;
}

.contacto-area a:hover {
    color: var(--verde);
}

.contacto-ubicacion {
    margin-bottom: 25px;
    color: #333;
    line-height: 1.5;
}

.boton-whatsapp {
    display: inline-block;
    align-self: flex-start;
    margin-top: auto;
    margin-bottom: 40px;
    padding: 13px 25px;
    border-radius: 5px;
    background-color: var(--verde);
    color: var(--blanco);
    text-decoration: none;
    font-size: 16px;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.boton-whatsapp:hover {
    background-color: var(--verde-oscuro);
}

.campo-formulario {
    margin-bottom: 13px;
}

.campo-formulario label {
    display: block;
    margin-bottom: 7px;
    color: var(--negro);
    font-size: 15px;
    font-weight: bold;
}

.campo-formulario input,
.campo-formulario select,
.campo-formulario textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #cfcfcf;
    border-radius: 5px;
    background-color: var(--blanco);
    color: #222;
    font: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.campo-formulario textarea {
    resize: vertical;
    min-height: 96px;
}

.campo-formulario input:focus,
.campo-formulario select:focus,
.campo-formulario textarea:focus {
    outline: none;
    border-color: var(--verde);
    box-shadow: 0 0 0 3px rgba(0, 150, 64, 0.14);
}

.contacto-formulario button {
    padding: 14px 28px;
    border: none;
    border-radius: 5px;
    background-color: var(--verde);
    color: var(--blanco);
    font-size: 17px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.contacto-formulario button:hover {
    background-color: var(--verde-oscuro);
}

.contacto-formulario button:disabled {
    cursor: wait;
    opacity: 0.7;
}

.formulario-estado {
    min-height: 24px;
    margin: 16px 0 0;
    color: #555;
    font-size: 14px;
    line-height: 1.5;
}

.formulario-estado.es-exito {
    color: var(--verde-oscuro);
    font-weight: bold;
}

.formulario-estado.es-error {
    color: #a12622;
    font-weight: bold;
}


/* ==============================
   PIE DE PÁGINA
   ============================== */

footer {
    padding: 35px 25px;
    background-color: var(--negro);
    color: var(--blanco);
    text-align: center;
}

footer img {
    width: 130px;
    height: auto;
    margin: 0 auto 18px;
    display: block;
    padding: 6px;
    border-radius: 4px;
    background-color: var(--blanco);
}

footer p {
    margin: 6px 0;
    font-size: 14px;
    line-height: 1.5;
}


/* ==============================
   TABLET
   ============================== */

@media (max-width: 900px) {

    .tarjetas {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero {
        min-height: clamp(460px, calc(100svh - 86px), 620px);
        background-position: center center;
    }

    .proyecto,
    .proyecto-invertido {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .proyecto-invertido .proyecto-galeria,
    .proyecto-invertido .proyecto-informacion {
        order: initial;
    }

    .contacto-columnas {
        grid-template-columns: 1fr;
    }

    .boton-whatsapp {
        margin-bottom: 0;
    }

}


/* ==============================
   CELULARES
   ============================== */

@media (max-width: 600px) {

    #inicio {
        scroll-margin-top: 120px;
    }

    #nosotros,
    #servicios,
    #proyectos,
    #contacto {
        scroll-margin-top: 12px;
    }

    header {
        padding: 10px 20px;
    }

    nav {
        flex-direction: column;
        gap: 14px;
    }

    .menu {
        width: 100%;
        justify-content: center;
        gap: 15px;
        flex-wrap: wrap;
        margin-left: 0;
    }

    .menu a {
        font-size: 15px;
    }

    .logo img {
        width: 110px;
    }

    .servicios {
        padding: 40px 20px 44px;
    }

    .proyectos {
        padding: 42px 20px 46px;
    }

    .contacto {
        padding: 38px 20px 44px;
    }

    .nosotros {
        padding: 40px 20px 44px;
    }

    .nosotros h2 {
        font-size: 32px;
    }

    .nosotros-texto {
        font-size: 16px;
        line-height: 1.65;
    }

    .servicios h2 {
        font-size: 32px;
    }

    .proyectos h2,
    .contacto h2 {
        font-size: 32px;
    }

    .proyectos-intro {
        font-size: 16px;
        margin-bottom: 30px;
    }

    .proyectos-lista {
        gap: 30px;
    }

    .proyecto {
        padding: 18px;
        gap: 24px;
    }

    .proyecto-informacion h3 {
        font-size: 26px;
    }

    .proyecto-informacion > p:last-child {
        font-size: 15px;
    }

    .contacto-intro {
        margin-bottom: 24px;
    }

    .contacto-intro h3 {
        font-size: 21px;
    }

    .contacto-intro p {
        font-size: 16px;
    }

    .contacto-informacion,
    .contacto-formulario {
        padding: 21px;
    }

    .contacto-contactos {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .contacto-dato + .contacto-dato {
        padding-top: 18px;
        padding-left: 0;
        border-top: 1px solid #d8d8d8;
        border-left: none;
    }

    .tarjetas {
        grid-template-columns: 1fr;
        max-width: 500px;
        gap: 20px;
    }

    .tarjeta {
        min-height: auto;
    }

    .hero {
        padding: 40px 25px;
        min-height: 430px;
        background-position: 44% center;
    }

    .hero h1 {
        font-size: 38px;
    }

    .hero p {
        font-size: 18px;
    }
}
