/* ============================================================
 * agropecuaria.css
 * Estilo de marca Grupo Araucanía (replica del sitio WordPress)
 * Paleta: verde corporativo + navy oscuro footer.
 * ============================================================ */

:root {
    --agro-green:        #54725B;   /* verde primario */
    --agro-green-dark:   #213A2D;   /* verde profundo */
    --agro-green-deep:   #3D5743;
    --agro-navy:         #04141A;   /* footer / barras oscuras */
    --agro-gold:         #F1C93E;   /* acento */
    --agro-cream:        #F4F4F3;   /* fondo suave */
    --agro-gray:         #D2D3D0;
    --agro-text:         #1f2a25;
    --agro-text-light:   #ffffff;
    --agro-shadow:       0 22px 60px -25px rgba(4,20,26,.35);

    --agro-font: "Montserrat", "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Tipografía global del front (override del base) */
body {
    font-family: var(--agro-font);
    color: var(--agro-text);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--agro-font);
    letter-spacing: -0.005em;
}

/* =====================
 * Botones
 * ===================== */
.agro-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    font-family: var(--agro-font);
    font-weight: 600;
    font-size: .95rem;
    line-height: 1;
    padding: .95rem 1.6rem;
    border-radius: 4px;
    text-decoration: none;
    border: 2px solid transparent;
    cursor: pointer;
    transition: background .18s ease, color .18s ease, border-color .18s ease, transform .12s ease;
}
.agro-btn--solid {
    background: var(--agro-green);
    color: #fff;
    border-color: var(--agro-green);
}
.agro-btn--solid:hover {
    background: var(--agro-green-dark);
    border-color: var(--agro-green-dark);
    color: #fff;
}
.agro-btn--ghost {
    background: transparent;
    color: #fff;
    border-color: #fff;
}
.agro-btn--ghost:hover {
    background: #fff;
    color: var(--agro-green-dark);
}

/* =====================
 * HERO
 * ===================== */
.agro-hero {
    position: relative;
    color: #fff;
    padding: 6rem 1.25rem 7rem;
    text-align: center;
    isolation: isolate;
    overflow: hidden;
}
.agro-hero__slides {
    position: absolute;
    inset: 0;
    z-index: -2;
}
.agro-hero__slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 1.2s ease-in-out;
    will-change: opacity;
}
.agro-hero__slide.is-active { opacity: 1; }
.agro-hero__overlay {
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(4,20,26,.55) 0%, rgba(33,58,45,.55) 100%);
    z-index: -1;
}
.agro-hero__inner {
    max-width: 980px;
    margin: 0 auto;
}
.agro-hero__title {
    font-size: clamp(2rem, 4.4vw, 3.6rem);
    font-weight: 700;
    letter-spacing: .02em;
    margin: 0 0 2rem;
    color: #fff;
    text-shadow: 0 2px 10px rgba(0,0,0,.35);
}
.agro-hero__text {
    max-width: 820px;
    margin: 0 auto 2.2rem;
    font-size: 1.02rem;
    line-height: 1.7;
}
.agro-hero__text p { margin: 0 0 1rem; }
.agro-hero__more { animation: agroHeroMoreIn .25s ease-out; }
.agro-hero__more p:last-child { margin-bottom: 0; }
@keyframes agroHeroMoreIn {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}
.agro-hero__more-toggle {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    margin-top: .5rem;
    padding: .35rem .15rem;
    background: transparent;
    border: 0;
    border-bottom: 1px solid rgba(255,255,255,.45);
    color: rgba(255,255,255,.85);
    font-family: var(--agro-font);
    font-size: .85rem;
    font-weight: 500;
    letter-spacing: .02em;
    cursor: pointer;
    transition: color .18s ease, border-color .18s ease;
}
.agro-hero__more-toggle:hover,
.agro-hero__more-toggle:focus-visible {
    color: #fff;
    border-bottom-color: #fff;
    outline: none;
}
.agro-hero__more-icon { transition: transform .2s ease; }
.agro-hero__more-toggle.is-open .agro-hero__more-icon { transform: rotate(180deg); }
.agro-hero__ctas {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* =====================
 * COMPROMISO
 * ===================== */
.agro-compromiso {
    position: relative;
    background: var(--agro-green);
    background-image: linear-gradient(rgba(33,58,45,.85), rgba(33,58,45,.85));
    padding: 4rem 1.25rem 4.5rem;
}
.agro-compromiso__card {
    max-width: 1180px;
    margin: -8rem auto 0;
    background: #fff;
    border-radius: 6px;
    box-shadow: var(--agro-shadow);
    padding: 2.4rem 2rem;
}
.agro-compromiso__grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2.4rem;
    align-items: start;
}
.agro-compromiso__photo img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
    object-fit: cover;
    aspect-ratio: 3/4;
}
.agro-compromiso__title {
    font-size: clamp(1.5rem, 2.6vw, 2.05rem);
    color: var(--agro-text);
    margin: 0 0 1rem;
    font-weight: 700;
    line-height: 1.2;
}
.agro-compromiso__intro {
    font-size: .98rem;
    color: #4a5448;
    line-height: 1.65;
    margin: 0 0 1.6rem;
}
.agro-compromiso__cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.6rem;
}
.agro-contact-card {
    display: flex;
    gap: .9rem;
    align-items: flex-start;
    padding: 1rem 1.1rem;
    border: 1px solid #e6e6e2;
    border-radius: 4px;
    background: #fbfbfa;
}
.agro-contact-card__icon {
    color: var(--agro-green);
    flex-shrink: 0;
    padding-top: .15rem;
}
.agro-contact-card__body { display: flex; flex-direction: column; gap: .12rem; line-height: 1.35; }
.agro-contact-card__title { font-weight: 700; font-size: .98rem; color: var(--agro-text); }
.agro-contact-card__sub   { font-size: .82rem; color: #7a8377; }
.agro-contact-card__body a {
    color: #46504b;
    font-size: .92rem;
    text-decoration: none;
    margin-top: .2rem;
}
.agro-contact-card__body a:hover { color: var(--agro-green); }

.agro-compromiso__map {
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid #e6e6e2;
}
.agro-compromiso__map iframe { display: block; }

/* =====================
 * SERVICES (Desarrollo y Gestión)
 * ===================== */
.agro-services {
    background: #fff;
    padding: 5rem 1.25rem;
}
.agro-services__inner {
    max-width: 1180px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}
.agro-services__media {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 5;
    border-radius: 4px;
    overflow: hidden;
    box-sizing: border-box;
}
.agro-services__media img,
.agro-services__media .agro-services__slide {
    width: 100%;
    height: auto;
    border-radius: 0;
    display: block;
    object-fit: cover;
}
.agro-services__media .agro-services__slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1.2s ease-in-out;
    will-change: opacity;
    border-radius: 0;
}
.agro-services__media .agro-services__slide.is-active { opacity: 1; }
.agro-services__title {
    font-size: clamp(1.4rem, 2.4vw, 1.95rem);
    color: var(--agro-text);
    font-weight: 700;
    margin: 0 0 1.2rem;
    line-height: 1.25;
}
.agro-services__intro {
    font-size: .98rem;
    color: #4a5448;
    line-height: 1.65;
    margin: 0 0 1.8rem;
}
.agro-feature-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1.3rem;
}
.agro-feature {
    display: flex;
    gap: 1.1rem;
    align-items: flex-start;
}
.agro-feature__check {
    width: 42px;
    height: 42px;
    border-radius: 4px;
    background: var(--agro-green);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.agro-feature__body h3 {
    margin: 0 0 .25rem;
    font-size: 1.08rem;
    font-weight: 700;
    color: var(--agro-text);
}
.agro-feature__body p {
    margin: 0;
    font-size: .94rem;
    line-height: 1.6;
    color: #4a5448;
}

/* =====================
 * CTA BAND
 * ===================== */
.agro-cta-band {
    background: var(--agro-green-dark);
    color: #fff;
    padding: 4rem 1.25rem;
    text-align: center;
}
.agro-cta-band__inner {
    max-width: 880px;
    margin: 0 auto;
}
.agro-cta-band h2 {
    color: #fff;
    font-size: clamp(1.4rem, 2.4vw, 1.95rem);
    font-weight: 700;
    margin: 0 0 1.2rem;
}
.agro-cta-band p {
    margin: 0 0 1rem;
    font-size: 1rem;
    line-height: 1.7;
    opacity: .92;
}
.agro-cta-band strong { color: var(--agro-gold); }

/* =====================
 * CONTACT FORM
 * ===================== */
.agro-contact {
    background: var(--agro-cream);
    padding: 4.5rem 1.25rem;
}
.agro-contact__inner {
    max-width: 760px;
    margin: 0 auto;
    background: #fff;
    border-radius: 6px;
    padding: 2.5rem 2rem;
    box-shadow: 0 18px 50px -30px rgba(4,20,26,.35);
}
.agro-contact__title {
    text-align: center;
    color: var(--agro-text);
    font-size: 1.7rem;
    font-weight: 700;
    margin: 0 0 .6rem;
}
.agro-contact__sub {
    text-align: center;
    color: #6b7468;
    font-size: .93rem;
    margin: 0 0 1.6rem;
}
.agro-alert {
    padding: .8rem 1rem;
    border-radius: 4px;
    margin-bottom: 1.2rem;
    font-size: .94rem;
    text-align: center;
}
.agro-alert--ok  { background: #e8f4ec; color: #1f5e34; border: 1px solid #c8e3d1; }
.agro-alert--err { background: #fdecec; color: #8a2222; border: 1px solid #f0c8c8; }

.agro-form__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}
.agro-form__row:has(> textarea),
.agro-form__row:has(> input:only-child) {
    grid-template-columns: 1fr;
}
.agro-form input,
.agro-form textarea {
    width: 100%;
    padding: .9rem 1rem;
    border: 1px solid #d6d8d3;
    border-radius: 4px;
    background: #fff;
    font-family: var(--agro-font);
    font-size: .95rem;
    color: var(--agro-text);
    transition: border-color .15s, box-shadow .15s;
}
.agro-form input:focus,
.agro-form textarea:focus {
    outline: none;
    border-color: var(--agro-green);
    box-shadow: 0 0 0 3px rgba(84,114,91,.18);
}
.agro-form textarea { resize: vertical; min-height: 120px; }
.agro-form__actions {
    display: flex;
    justify-content: center;
    margin-top: 1.4rem;
}

/* =====================
 * MINIMAL FOOTER (logo centrado + copyright)
 * ===================== */
.site-footer--minimal {
    background: var(--agro-navy);
    color: #cbd3c6;
    margin-top: 0;
    padding-top: 2.6rem;
    padding-bottom: .4rem;
}
.site-footer__minimal {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1.4rem 1.2rem 1rem;
}
.site-footer__logo {
    max-width: 280px;
    width: 100%;
    height: auto;
    display: block;
}
.site-footer__brand-text {
    color: #fff;
    font-weight: 700;
    font-size: 1.4rem;
    letter-spacing: .04em;
}
.site-footer--minimal .site-footer__bottom {
    border-top: none;
    color: #93a09a;
    padding-top: .4rem;
    padding-bottom: 1.6rem;
}

/* =====================
 * MODAL DE CONTACTO
 * ===================== */
.agro-modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding: 4rem 1rem 2rem;
    overflow-y: auto;
}
.agro-modal.is-open { display: flex; }
.agro-modal__backdrop {
    position: fixed;
    inset: 0;
    background: rgba(4, 20, 26, .55);
    backdrop-filter: blur(2px);
    cursor: pointer;
    z-index: 0;
}
.agro-modal__dialog {
    position: relative;
    z-index: 1;
    background: #fff;
    width: min(560px, 100%);
    border-radius: 8px;
    padding: 2.2rem 2rem 2rem;
    box-shadow: 0 30px 70px -20px rgba(4,20,26,.45);
    animation: agroModalIn .22s ease-out;
}
@keyframes agroModalIn {
    from { opacity: 0; transform: translateY(-12px); }
    to   { opacity: 1; transform: translateY(0); }
}
.agro-modal__close {
    position: absolute;
    top: .7rem;
    right: .7rem;
    width: 38px;
    height: 38px;
    border: none;
    background: transparent;
    color: #4a5448;
    border-radius: 50%;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background .15s, color .15s;
}
.agro-modal__close:hover { background: #eef0eb; color: var(--agro-green-dark); }
.agro-modal .agro-contact__title {
    margin: 0 2.4rem .5rem 0;
    text-align: left;
    font-size: 1.45rem;
}
.agro-modal .agro-contact__sub {
    text-align: left;
    margin: 0 0 1.3rem;
}
@media (max-width: 540px) {
    .agro-modal { padding: 1.5rem .8rem; }
    .agro-modal__dialog { padding: 2rem 1.2rem 1.4rem; }
    .agro-modal .agro-contact__title { font-size: 1.25rem; }
}

/* =====================
 * Header overrides — pixel-match con grupoaraucania.cl
 * ===================== */
.site-header {
    --sh-bg: #213A2C;
    padding: 0;
    margin: 0;
    border-bottom: 0;
    /* display:contents saca al header del box tree para que el sticky de la
       navbar funcione respecto al body, no respecto al header */
    display: contents;
}
.site-header .site-navbar {
    background: #213A2C;
    position: sticky;
    top: 0;
    z-index: 80;
}

/* Topbar: fondo blanco, items a la derecha */
.site-header .site-topbar {
    background: #ffffff;
    color: #2a3a30;
    font-size: .82rem;
    border-bottom: 1px solid #eceeea;
}
.site-header .site-topbar__inner {
    max-width: 1400px;
    justify-content: flex-end;
    padding: .7rem 2rem;
}
.site-header .site-topbar__contact {
    margin: 0;
    justify-content: flex-end;
    gap: 2rem;
}
.site-header .site-topbar__contact a,
.site-header .site-topbar__contact > span {
    color: #2a3a30;
    font-weight: 500;
}
.site-header .site-topbar__contact a:hover { color: var(--agro-green); }
.site-header .site-topbar__contact svg {
    color: var(--agro-green-dark);
    opacity: 1;
    width: 16px;
    height: 16px;
}

/* Navbar: más alta, container ancho, logo grande, menú espaciado */
.site-header .site-navbar__inner {
    max-width: 1400px;
    padding: .5rem 2rem;
    gap: 2rem;
}
.site-header .site-navbar__brand img {
    max-height: 64px;
    width: auto;
}
.site-header .site-navbar__menu {
    gap: 2.6rem;
    margin: 0 0 0 auto;
}
.site-header .site-navbar__menu a {
    font-size: 1.02rem;
    font-weight: 500;
    letter-spacing: .005em;
    padding: .4rem 0;
    white-space: nowrap;
}

/* Esconder WhatsApp en navbar (el original no lo tiene) */
.site-header .site-navbar__cta { display: none; }
.site-header .site-navbar__actions { gap: 0; }

@media (max-width: 1200px) {
    .site-header .site-navbar__menu { gap: 1.6rem; }
    .site-header .site-navbar__menu a { font-size: .96rem; }
    .site-header .site-topbar__inner,
    .site-header .site-navbar__inner { padding-left: 1.2rem; padding-right: 1.2rem; }
}
/* Pasamos a hamburguesa antes para evitar que los items del menú
   se rompan a 2 líneas con 5 títulos relativamente largos. */
@media (max-width: 1024px) {
    .site-header .site-navbar__menu { display: none; }
    .site-header .site-navbar__burger { display: inline-flex; }
    .site-header .site-navbar__actions { margin-left: auto; }
    .site-header .site-navbar__inner { gap: .8rem; }
}
@media (max-width: 860px) {
    .site-header .site-navbar__brand img { max-height: 56px; }
    .site-header .site-navbar__inner { padding: .9rem 1.2rem; }
}

/* =====================
 * RESPONSIVE
 * ===================== */
@media (max-width: 900px) {
    .agro-hero { padding: 4.5rem 1.25rem 5.5rem; }
    .agro-compromiso__card { margin-top: -5rem; padding: 1.8rem 1.4rem; }
    .agro-compromiso__grid { grid-template-columns: 1fr; gap: 1.6rem; }
    .agro-compromiso__photo img { max-width: 280px; margin: 0 auto; aspect-ratio: 3/3.5; }
    .agro-compromiso__cards { grid-template-columns: 1fr; }
    .agro-services__inner { grid-template-columns: 1fr; gap: 2rem; }
    .agro-form__row { grid-template-columns: 1fr; }
}

@media (max-width: 540px) {
    .agro-hero { padding: 3.5rem 1rem 4.5rem; }
    .agro-hero__title { font-size: 1.85rem; }
    .agro-hero__text { font-size: .95rem; }
    .agro-btn { padding: .85rem 1.25rem; font-size: .9rem; }
    .agro-compromiso { padding: 3rem 1rem 3.5rem; }
    .agro-services { padding: 3rem 1rem; }
    .agro-cta-band { padding: 3rem 1rem; }
    .agro-contact { padding: 3rem 1rem; }
    .agro-contact__inner { padding: 1.8rem 1.2rem; }
}
