/* =========================================================
   PROAGRO S.A.S. — Hoja de estilos
   Colores tomados del logo (verde hoja y naranja fruto)
   ========================================================= */

:root {
    --palma: #15361f;        /* verde palma profundo: fondos oscuros */
    --palma-2: #1f4a2b;
    --hoja: #7ab648;         /* verde del logo */
    --hoja-oscura: #3f7a1f;  /* verde legible sobre blanco */
    --fruto: #ec7a2c;        /* naranja del logo */
    --fruto-oscuro: #b8521a;
    --tierra: #6b4a33;
    --papel: #f6f7f2;
    --tinta: #1a2117;
    --gris: #5a6355;
    --linea: #dce2d3;
    --blanco: #ffffff;

    --fuente: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --ancho: 1200px;
    --radio: 6px;
}

*,
*::before,
*::after { box-sizing: border-box; }

* { margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--fuente);
    font-size: 1.0625rem;
    line-height: 1.65;
    color: var(--tinta);
    background: var(--blanco);
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--hoja-oscura); }

:focus-visible {
    outline: 3px solid var(--fruto);
    outline-offset: 3px;
    border-radius: 2px;
}

.contenedor {
    width: 100%;
    max-width: var(--ancho);
    margin: 0 auto;
    padding: 0 24px;
}

.saltar {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--palma);
    color: var(--blanco);
    padding: 10px 16px;
    z-index: 2000;
}
.saltar:focus { left: 12px; top: 12px; }

/* ---------- Tipografía ---------- */
h1, h2, h3, h4 {
    font-stretch: 115%;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.01em;
    color: var(--palma);
}

h1 { font-size: clamp(2.25rem, 5.2vw, 4.25rem); }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.6rem); }
h3 { font-size: 1.3rem; line-height: 1.25; }
h4 { font-size: 1rem; font-stretch: 100%; font-weight: 700; }

p + p { margin-top: 1em; }

.texto { max-width: 68ch; }
.intro { font-size: 1.2rem; color: var(--gris); max-width: 60ch; }

/* ---------- Botones ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 26px;
    border-radius: var(--radio);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    border: 2px solid transparent;
    cursor: pointer;
    transition: background-color .2s, color .2s, border-color .2s;
}

.btn-primario { background: var(--fruto); color: var(--palma); }
.btn-primario:hover { background: #f59a55; }

.btn-borde { border-color: rgba(255,255,255,.55); color: var(--blanco); }
.btn-borde:hover { border-color: var(--blanco); background: rgba(255,255,255,.08); }

.btn-oscuro { background: var(--palma); color: var(--blanco); }
.btn-oscuro:hover { background: var(--palma-2); }

.enlace {
    font-weight: 700;
    color: var(--hoja-oscura);
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
}
.enlace:hover { color: var(--palma); }

/* ---------- Encabezado ---------- */
.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255,255,255,.96);
    backdrop-filter: blur(6px);
    border-bottom: 1px solid var(--linea);
}

.header .contenedor {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 78px;
}

.logo { display: block; flex-shrink: 0; }
.logo img { height: 46px; width: auto; }

.menu ul {
    display: flex;
    gap: 6px;
    list-style: none;
}

.menu a {
    display: block;
    padding: 8px 14px;
    font-weight: 600;
    color: var(--tinta);
    text-decoration: none;
    border-radius: var(--radio);
}
.menu a:hover { background: var(--papel); color: var(--palma); }
.menu a[aria-current="page"] {
    color: var(--palma);
    box-shadow: inset 0 -3px 0 var(--fruto);
    border-radius: 0;
}

.menu-toggle {
    display: none;
    background: none;
    border: 0;
    padding: 10px;
    cursor: pointer;
    color: var(--palma);
}
.menu-toggle svg { width: 28px; height: 28px; display: block; }

/* ---------- Hero (inicio) ---------- */
.hero {
    background: var(--palma);
    color: var(--blanco);
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    min-height: min(88vh, 760px);
}

.hero-texto {
    padding: clamp(48px, 8vw, 110px) clamp(24px, 5vw, 72px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 760px;
    margin-left: auto;
}

.hero-lugar {
    color: var(--hoja);
    font-weight: 600;
    margin-bottom: 20px;
}

.hero h1 { color: var(--blanco); margin-bottom: 24px; }

.hero p.hero-desc {
    font-size: 1.2rem;
    color: rgba(255,255,255,.82);
    max-width: 52ch;
    margin-bottom: 36px;
}

.hero-botones { display: flex; flex-wrap: wrap; gap: 14px; }

.hero-foto { position: relative; overflow: hidden; }
.hero-foto img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 70%;
}
.hero-foto figcaption {
    position: absolute;
    left: 20px;
    bottom: 20px;
    background: rgba(21,54,31,.85);
    color: var(--blanco);
    font-size: .9rem;
    padding: 8px 14px;
    border-radius: var(--radio);
}

/* ---------- Secciones ---------- */
.seccion { padding: clamp(64px, 9vw, 112px) 0; }
.seccion-papel { background: var(--papel); }

.encabezado-seccion { margin-bottom: 48px; max-width: 760px; }
.encabezado-seccion h2 { margin-bottom: 16px; }

/* ---------- Ciclo productivo (inicio) ---------- */
.ciclo {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 20px;
    counter-reset: paso;
}

.ciclo li { counter-increment: paso; position: relative; }

.ciclo .foto {
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: var(--radio);
    margin-bottom: 18px;
}
.ciclo img { width: 100%; height: 100%; object-fit: cover; }

.ciclo h3 {
    display: flex;
    align-items: baseline;
    gap: 10px;
    font-size: 1.15rem;
    margin-bottom: 6px;
}
.ciclo h3::before {
    content: counter(paso);
    font-size: 2.2rem;
    font-weight: 900;
    color: var(--fruto);
    line-height: 1;
}
.ciclo p { font-size: .97rem; color: var(--gris); }

/* ---------- Bloque texto + foto ---------- */
.dividido {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(32px, 6vw, 80px);
    align-items: center;
}
.dividido h2 { margin-bottom: 20px; }
.dividido .btn, .dividido .enlace { margin-top: 28px; }
.dividido figure img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    border-radius: var(--radio);
}
.dividido figcaption { font-size: .9rem; color: var(--gris); margin-top: 10px; }

/* ---------- Impacto ---------- */
.impacto {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 32px;
}
.impacto img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: var(--radio);
    margin-bottom: 20px;
}
.impacto h3 {
    margin-bottom: 8px;
    padding-top: 14px;
    border-top: 3px solid var(--hoja);
}
.impacto p { color: var(--gris); }

/* ---------- Llamado a la acción ---------- */
.cta { background: var(--fruto); padding: clamp(56px, 7vw, 88px) 0; }
.cta .contenedor {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    flex-wrap: wrap;
}
.cta h2 { color: var(--palma); max-width: 22ch; }
.cta p { color: var(--palma); font-size: 1.15rem; margin-top: 10px; }

/* ---------- Banner interno ---------- */
.banner-interno {
    position: relative;
    color: var(--blanco);
    background: var(--palma);
    padding: clamp(72px, 10vw, 128px) 0 clamp(48px, 6vw, 72px);
    overflow: hidden;
}
.banner-interno img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: .38;
}
.banner-interno .contenedor { position: relative; }
.banner-interno h1 { color: var(--blanco); margin-bottom: 14px; max-width: 18ch; }
.banner-interno p { font-size: 1.2rem; color: rgba(255,255,255,.88); max-width: 55ch; }

/* ---------- Misión / visión ---------- */
.mision-vision {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    background: var(--palma);
    color: var(--blanco);
    border-radius: var(--radio);
    overflow: hidden;
}
.mision-vision > div { padding: clamp(32px, 5vw, 56px); }
.mision-vision > div + div { border-left: 1px solid rgba(255,255,255,.15); }
.mision-vision h2 { color: var(--hoja); font-size: 1.6rem; margin-bottom: 16px; }
.mision-vision p { color: rgba(255,255,255,.88); font-size: 1.1rem; }

/* ---------- Valores ---------- */
.valores {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 32px;
    list-style: none;
}
.valores li { border-top: 3px solid var(--hoja); padding-top: 18px; }
.valores h3 { margin-bottom: 8px; }
.valores p { color: var(--gris); }

/* ---------- Galería ---------- */
.galeria {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-auto-rows: 220px;
    grid-auto-flow: dense;
    gap: 12px;
    list-style: none;
}
.galeria li:nth-child(6n+1) { grid-row: span 2; }
.galeria li:nth-child(6n+4) { grid-column: span 2; }
.galeria button {
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: var(--linea);
    cursor: zoom-in;
    border-radius: var(--radio);
    overflow: hidden;
}
.galeria img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.galeria button:hover img { transform: scale(1.04); }

.visor {
    border: 0;
    padding: 0;
    background: transparent;
    max-width: 94vw;
    max-height: 92vh;
    margin: auto;
}
.visor::backdrop { background: rgba(10, 25, 14, .9); }
.visor img { max-width: 94vw; max-height: 84vh; width: auto; border-radius: var(--radio); }
.visor p { color: var(--blanco); text-align: center; margin-top: 10px; }
.visor-cerrar {
    position: fixed;
    top: 16px;
    right: 16px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 0;
    background: var(--blanco);
    color: var(--palma);
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
}

/* ---------- Portafolio ---------- */
.etapa {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(32px, 6vw, 80px);
    align-items: center;
}
.etapa + .etapa { margin-top: clamp(64px, 9vw, 112px); }
.etapa.invertida .etapa-foto { order: -1; }

.etapa-num {
    display: block;
    font-size: clamp(3.5rem, 7vw, 5.5rem);
    font-weight: 900;
    font-stretch: 125%;
    line-height: .9;
    color: var(--hoja);
    margin-bottom: 14px;
}
.etapa h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 18px; }
.etapa-foto img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    border-radius: var(--radio);
}

.lista-check { list-style: none; margin-top: 24px; }
.lista-check li {
    position: relative;
    padding: 10px 0 10px 34px;
    border-bottom: 1px solid var(--linea);
    font-weight: 500;
}
.lista-check li::before {
    content: "";
    position: absolute;
    left: 4px;
    top: 17px;
    width: 14px;
    height: 8px;
    border-left: 3px solid var(--hoja-oscura);
    border-bottom: 3px solid var(--hoja-oscura);
    transform: rotate(-45deg);
}

.ambiental {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    grid-template-rows: auto auto;
    gap: 12px;
    margin-top: 40px;
}
.ambiental img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radio); }
.ambiental figure:first-child { grid-row: span 2; }
.ambiental figure { position: relative; min-height: 220px; }

/* ---------- Noticias ---------- */
.noticias {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 32px;
}
.noticia img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: var(--radio);
    margin-bottom: 18px;
}
.noticia time { display: block; color: var(--fruto-oscuro); font-weight: 600; font-size: .95rem; margin-bottom: 8px; }
.noticia h2 { font-size: 1.25rem; line-height: 1.3; margin-bottom: 10px; }
.noticia p { color: var(--gris); }
.nota-fuente { margin-top: 56px; color: var(--gris); }

/* ---------- Contacto ---------- */
.contacto {
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
    gap: clamp(32px, 6vw, 80px);
    align-items: start;
}
.contacto h2 { font-size: 1.6rem; margin-bottom: 14px; }

.datos { list-style: none; margin-top: 32px; }
.datos li {
    display: grid;
    grid-template-columns: 44px 1fr;
    gap: 14px;
    padding: 18px 0;
    border-top: 1px solid var(--linea);
}
.datos li:last-child { border-bottom: 1px solid var(--linea); }
.datos svg { width: 26px; height: 26px; color: var(--hoja-oscura); margin-top: 2px; }
.datos h3 { font-size: 1rem; font-stretch: 100%; font-weight: 700; margin-bottom: 2px; }
.datos p { color: var(--gris); }
.datos a { color: var(--tinta); font-weight: 600; }

.formulario {
    background: var(--papel);
    border: 1px solid var(--linea);
    border-radius: var(--radio);
    padding: clamp(24px, 4vw, 44px);
}
.campo { margin-bottom: 20px; }
.campo label { display: block; font-weight: 600; margin-bottom: 6px; }
.campo input,
.campo select,
.campo textarea {
    width: 100%;
    font: inherit;
    padding: 12px 14px;
    border: 1.5px solid #c3cbb8;
    border-radius: var(--radio);
    background: var(--blanco);
    color: var(--tinta);
}
.campo input:focus,
.campo select:focus,
.campo textarea:focus {
    outline: none;
    border-color: var(--hoja-oscura);
    box-shadow: 0 0 0 3px rgba(122,182,72,.3);
}
.campo textarea { resize: vertical; min-height: 140px; }
.campo-oculto { position: absolute; left: -9999px; }
.nota-form { font-size: .9rem; color: var(--gris); margin-top: 14px; }

.estado-form { margin-top: 16px; padding: 12px 16px; border-radius: var(--radio); font-weight: 600; }
.estado-form:empty { display: none; }
.estado-form.ok { background: #e3f1d6; color: #24501a; }
.estado-form.error { background: #fbe2d3; color: #7a2f08; }

/* ---------- Pie de página ---------- */
.footer { background: var(--palma); color: rgba(255,255,255,.8); padding-top: 72px; }
.footer .contenedor {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 40px;
}
.footer-logo {
    display: inline-block;
    background: var(--blanco);
    padding: 10px 14px;
    border-radius: var(--radio);
    margin-bottom: 18px;
}
.footer-logo img { height: 40px; width: auto; }
.footer h2 { color: var(--blanco); font-size: 1rem; font-stretch: 100%; margin-bottom: 14px; }
.footer ul { list-style: none; }
.footer li + li { margin-top: 6px; }
.footer a { color: var(--blanco); text-decoration: none; }
.footer a:hover { color: var(--hoja); text-decoration: underline; }
.footer-bottom {
    margin-top: 56px;
    border-top: 1px solid rgba(255,255,255,.14);
    padding: 22px 0;
    font-size: .9rem;
}
.footer-bottom .contenedor { display: block; }

/* ---------- Página 404 ---------- */
.pagina-404 { min-height: 60vh; display: flex; align-items: center; }
.pagina-404 h1 { margin-bottom: 16px; }
.pagina-404 .btn { margin-top: 28px; }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1024px) {
    .ciclo {
        grid-template-columns: none;
        grid-auto-flow: column;
        grid-auto-columns: 42%;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        padding-bottom: 12px;
    }
    .ciclo li { scroll-snap-align: start; }
    .valores { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .galeria { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
    .menu-toggle { display: block; }
    .menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--blanco);
        border-bottom: 1px solid var(--linea);
        box-shadow: 0 12px 24px rgba(21,54,31,.12);
        display: none;
    }
    .menu.abierto { display: block; }
    .menu ul { flex-direction: column; padding: 8px 16px 16px; gap: 0; }
    .menu a { padding: 14px 8px; border-bottom: 1px solid var(--linea); border-radius: 0; }
    .menu a[aria-current="page"] { box-shadow: inset 4px 0 0 var(--fruto); padding-left: 16px; }

    .hero { grid-template-columns: 1fr; min-height: 0; }
    .hero-foto { order: -1; height: 46vh; min-height: 280px; }
    .hero-texto { margin: 0; max-width: none; }

    .dividido,
    .etapa,
    .contacto,
    .mision-vision { grid-template-columns: 1fr; }
    .etapa.invertida .etapa-foto { order: 0; }
    .mision-vision > div + div { border-left: 0; border-top: 1px solid rgba(255,255,255,.15); }
    .dividido figure img, .etapa-foto img { aspect-ratio: 4 / 3; }

    .impacto, .noticias { grid-template-columns: 1fr; gap: 44px; }
    .footer .contenedor { grid-template-columns: 1fr; gap: 32px; }
}

@media (max-width: 560px) {
    body { font-size: 1rem; }
    .contenedor { padding: 0 16px; }
    .logo img { height: 38px; }
    .ciclo { grid-auto-columns: 72%; }
    .valores { grid-template-columns: 1fr; }
    .galeria { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 160px; }
    .galeria li:nth-child(6n+4) { grid-column: span 2; }
    .ambiental { grid-template-columns: 1fr; }
    .ambiental figure:first-child { grid-row: auto; }
    .hero-botones .btn { width: 100%; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { transition: none !important; animation: none !important; }
}

/* ---------- Botón flotante de WhatsApp ---------- */
.whatsapp {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 900;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 18px 12px 14px;
    border-radius: 999px;
    background: #25d366;
    color: #0b3d1f;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 6px 18px rgba(21,54,31,.28);
}
.whatsapp svg { width: 26px; height: 26px; }
.whatsapp:hover { background: #3be07a; }
@media (max-width: 560px) {
    .whatsapp { padding: 14px; right: 16px; bottom: 16px; }
    .whatsapp span { display: none; }
}
