/* ==========================================================
   Agroindustrias GES S.A.
   Archivo: css/styles.css
   HTML5 + CSS puro, responsive, Core Web Vitals friendly
========================================================== */

:root {
    --green-dark: #26351e;
    --green: #587239;
    --green-soft: #8fa765;
    --earth: #b8844d;
    --kraft: #d7b883;
    --cream: #f7f1e6;
    --cream-2: #fff8ed;
    --white: #ffffff;
    --ink: #1f241b;
    --muted: #68725e;
    --line: rgba(38, 53, 30, .12);
    --shadow: 0 24px 70px rgba(38, 53, 30, .14);
    --radius: 26px;
    --header-h: 86px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 92px; }
body {
    margin: 0;
    color: var(--ink);
    background: var(--cream);
    font-family: "Segoe UI", Roboto, Arial, Helvetica, sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}
body, button, input, textarea { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
.container { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }

/* Preloader */
.preloader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: grid;
    place-items: center;
    background: radial-gradient(circle at 25% 20%, rgba(143, 167, 101, .22), transparent 30%), linear-gradient(135deg, #fbf7ef 0%, #efe2c9 100%);
    transition: opacity .6s ease, visibility .6s ease;
}
.preloader.is-hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.preloader-card {
    width: min(360px, calc(100% - 46px));
    padding: 34px;
    border-radius: 32px;
    text-align: center;
    background: rgba(255,255,255,.72);
    box-shadow: var(--shadow);
    border: 1px solid rgba(255,255,255,.65);
    backdrop-filter: blur(14px);
}
.preloader-logo { width: 180px; height: auto; margin: 0 auto 22px; opacity: 0; animation: logoFade 1.2s ease forwards, logoBreath 2.3s ease-in-out infinite 1.2s; }
.preloader-line { height: 8px; overflow: hidden; border-radius: 50px; background: rgba(38, 53, 30, .12); }
.preloader-line span { display: block; height: 100%; width: 100%; border-radius: 50px; background: linear-gradient(90deg, var(--green), var(--earth)); transform-origin: left; animation: loadLine 1.55s ease-in-out infinite; }
.preloader p { margin: 14px 0 0; color: var(--muted); font-size: 14px; }
@keyframes logoFade { from { opacity: 0; transform: translateY(10px) scale(.92); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes logoBreath { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.035); } }
@keyframes loadLine { 0% { transform: scaleX(.06); } 55% { transform: scaleX(1); } 100% { transform: scaleX(.06); transform-origin: right; } }

/* Header */
.site-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 80;
    height: var(--header-h);
    display: flex;
    align-items: center;
    background: rgba(247, 241, 230, .94);
    border-bottom: 1px solid rgba(38, 53, 30, .08);
    transition: background .28s ease, box-shadow .28s ease, height .28s ease;
}
.site-header.is-scrolled { height: 74px; background: rgba(255, 255, 255, .78); backdrop-filter: blur(18px); box-shadow: 0 12px 35px rgba(38, 53, 30, .08); }
.nav-wrap { display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.brand { display: inline-flex; align-items: center; flex: 0 0 auto; }
.brand img { width: 160px; max-height: 64px; object-fit: contain; }
.main-menu { display: flex; align-items: center; gap: 8px; }
.main-menu a { padding: 10px 14px; border-radius: 999px; color: var(--green-dark); font-weight: 700; font-size: 14px; transition: background .2s ease, color .2s ease, transform .2s ease; }
.main-menu a:hover { background: rgba(88, 114, 57, .12); transform: translateY(-1px); }
.hamburger { display: none; width: 46px; height: 46px; border: 0; border-radius: 16px; background: var(--green-dark); cursor: pointer; padding: 12px; }
.hamburger span { display: block; height: 2px; width: 100%; margin: 5px 0; background: var(--white); border-radius: 999px; transition: transform .25s ease, opacity .25s ease; }
.hamburger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.is-open span:nth-child(2) { opacity: 0; }
.hamburger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Hero */
.hero { position: relative; min-height: 100vh; padding: calc(var(--header-h) + 78px) 0 84px; overflow: hidden; }
.section-tone-hero { background: radial-gradient(circle at 85% 15%, rgba(143,167,101,.20), transparent 28%), linear-gradient(120deg, rgba(247,241,230,.96), rgba(237,223,195,.88)); }
.hero-bg { position: absolute; inset: auto -15% -30% auto; width: 620px; height: 620px; border-radius: 50%; background: rgba(88, 114, 57, .16); filter: blur(6px); }
.hero-grid { position: relative; display: grid; grid-template-columns: 1.05fr .95fr; gap: 58px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 16px; color: var(--green); font-size: 13px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.eyebrow::before { content: ""; width: 34px; height: 2px; border-radius: 50px; background: var(--earth); }
.hero h2, .section-title h2, .center-title h2, .split-head h2, .history-content h2, .contact-copy h2, .catalog-intro h2 { margin: 0; color: var(--green-dark); font-size: clamp(34px, 5vw, 66px); line-height: 1.02; letter-spacing: -0.05em; }
.hero p { max-width: 650px; margin: 24px 0 0; color: var(--muted); font-size: 19px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }
.compact-actions { margin-top: 24px; }
.btn { display: inline-flex; justify-content: center; align-items: center; min-height: 52px; padding: 13px 22px; border-radius: 999px; font-weight: 900; transition: transform .2s ease, box-shadow .2s ease, background .2s ease; }
.btn:hover { transform: translateY(-2px); }
.btn-primary { color: var(--white); background: linear-gradient(135deg, var(--green), var(--green-dark)); box-shadow: 0 14px 28px rgba(88,114,57,.24); }
.btn-secondary { color: var(--green-dark); background: rgba(255,255,255,.74); border: 1px solid rgba(38, 53, 30, .14); }
.hero-points { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.hero-points span { padding: 8px 13px; border-radius: 999px; background: rgba(255, 255, 255, .66); color: var(--green-dark); font-size: 13px; font-weight: 800; }
.media-card { position: relative; padding: 14px; border-radius: 38px; background: rgba(255,255,255,.58); box-shadow: var(--shadow); border: 1px solid rgba(255,255,255,.7); }
.media-card > img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 28px; }
.floating-badge { position: absolute; left: -20px; bottom: 34px; width: min(260px, 78%); padding: 18px; border-radius: 24px; background: rgba(38, 53, 30, .92); color: var(--white); box-shadow: 0 18px 40px rgba(38,53,30,.26); }
.floating-badge strong { display: block; font-size: 26px; line-height: 1; }
.floating-badge small { display: block; margin-top: 6px; color: rgba(255,255,255,.82); }

/* Product catalog */
.products-wrap { background: var(--cream); }
.catalog-intro { padding: 92px 0 48px; text-align: center; }
.catalog-intro .eyebrow { justify-content: center; }
.catalog-intro .eyebrow::after { content: ""; width: 34px; height: 2px; border-radius: 50px; background: var(--earth); }
.catalog-intro h2 { max-width: 900px; margin: 0 auto; font-size: clamp(32px, 4.5vw, 54px); }
.catalog-intro p { max-width: 760px; margin: 22px auto 0; color: var(--muted); font-size: 18px; }
.catalog-section { padding: 84px 0 92px; overflow: hidden; }
.catalog-head { text-align: center; margin-bottom: 34px; }
.catalog-head h2 { margin: 0; color: var(--green-dark); font-size: clamp(30px, 4vw, 46px); line-height: 1.08; letter-spacing: -.035em; }
.catalog-head p { max-width: 700px; margin: 14px auto 0; color: var(--muted); font-size: 17px; }
.bg1 { background: #f7f7f3; }
.bg2 { background: #fff7e8; }
.bg3 { background: #f4f9f3; }
.bg4 { background: #fffdf8; }
.bg5 { background: #f8f1e5; }
.gallery-slider { position: relative; width: min(1440px, 100%); margin: 0 auto; }
.catalog-slider {
    display: flex;
    gap: 28px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    padding: 20px max(24px, calc((100vw - 1180px) / 2)) 34px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.catalog-slider::-webkit-scrollbar { display: none; }
.slide-card {
    flex: 0 0 clamp(280px, 30vw, 380px);
    scroll-snap-align: center;
    background: rgba(255,255,255,.92);
    border: 1px solid rgba(38, 53, 30, .08);
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 18px 45px rgba(38, 53, 30, .10);
    transition: transform .35s ease, box-shadow .35s ease;
}
.slide-card:hover { transform: translateY(-8px); box-shadow: 0 28px 70px rgba(38, 53, 30, .15); }
.slide-card img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; background: #fbf7ef; }
.slide-card h3 { margin: 0; padding: 22px 18px 24px; text-align: center; color: #cdbb91; background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(255,250,241,.98)); font-size: clamp(20px, 2vw, 27px); line-height: 1.1; font-weight: 900; }
.gallery-arrow {
    position: absolute;
    top: 42%;
    z-index: 4;
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255,255,255,.9);
    border-radius: 50%;
    background: rgba(255,255,255,.82);
    color: var(--green-dark);
    box-shadow: 0 14px 34px rgba(38, 53, 30, .12);
    cursor: pointer;
    font-size: 24px;
    transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
    backdrop-filter: blur(10px);
}
.gallery-arrow:hover { transform: scale(1.08); background: var(--white); box-shadow: 0 18px 42px rgba(38,53,30,.16); }
.gallery-prev { left: max(12px, calc((100vw - 1180px) / 2 - 18px)); }
.gallery-next { right: max(12px, calc((100vw - 1180px) / 2 - 18px)); }
.gallery-dots { display: flex; justify-content: center; align-items: center; gap: 11px; margin-top: 18px; padding: 0 20px; }
.gallery-dots button { width: 12px; height: 12px; padding: 0; border: 0; border-radius: 999px; background: #cbd3c4; cursor: pointer; transition: width .25s ease, transform .25s ease, background .25s ease; }
.gallery-dots button.active { width: 34px; background: #cdbb91; transform: scale(1.05); }

/* Sections */
.section { padding: 96px 0; }
.section-light { background: var(--white); }
.section-earth { background: linear-gradient(135deg, #f0dfc0, #dac296); }
.section-white { background: #fffaf2; }
.section-green { background: radial-gradient(circle at 10% 10%, rgba(215,184,131,.18), transparent 32%), linear-gradient(135deg, var(--green-dark), #40572c); color: var(--white); }
.section-cream { background: var(--cream); }
.section-contact { background: linear-gradient(135deg, #ffffff, #f2e7d3); }
.two-col { display: grid; grid-template-columns: .85fr 1.15fr; gap: 52px; align-items: start; }
.section-title h2, .center-title h2, .split-head h2, .history-content h2, .contact-copy h2 { font-size: clamp(30px, 4vw, 48px); }
.section-text p, .center-title p, .split-head p, .history-content p, .contact-copy p { margin: 0 0 16px; color: var(--muted); font-size: 17px; }
.center-title { max-width: 760px; margin: 0 auto 44px; text-align: center; }
.center-title .eyebrow { justify-content: center; }
.center-title .eyebrow::after { content: ""; width: 34px; height: 2px; border-radius: 50px; background: var(--earth); }
.section-green .eyebrow, .section-green h2, .section-green .center-title p { color: var(--white); }
.cards-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.feature-card, .service-item, .contact-card, .diff { border: 1px solid rgba(38, 53, 30, .1); box-shadow: 0 18px 45px rgba(38, 53, 30, .08); }
.feature-card { padding: 30px; border-radius: var(--radius); background: rgba(255,255,255,.68); }
.feature-card .icon { display: inline-flex; width: 48px; height: 48px; align-items: center; justify-content: center; margin-bottom: 20px; border-radius: 16px; background: var(--green-dark); color: var(--white); font-weight: 900; }
.feature-card h3, .service-item h3 { margin: 0 0 10px; color: var(--green-dark); font-size: 22px; line-height: 1.2; }
.feature-card p, .service-item p { margin: 0; color: var(--muted); }
.split-head { display: grid; grid-template-columns: 1.1fr .9fr; gap: 38px; align-items: end; margin-bottom: 38px; }
.service-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.service-item { padding: 26px; border-radius: 24px; background: var(--white); transition: transform .2s ease, box-shadow .2s ease; }
.service-item:hover { transform: translateY(-4px); box-shadow: 0 24px 55px rgba(38, 53, 30, .12); }
.differentials { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.diff { padding: 24px; border-radius: 24px; background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.16); backdrop-filter: blur(12px); }
.diff strong { display: block; margin-bottom: 6px; color: var(--white); font-size: 18px; }
.diff span { color: rgba(255,255,255,.75); }
.history-grid { display: grid; grid-template-columns: 1fr; gap: 24px; align-items: center; }
.history-image img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 34px; box-shadow: var(--shadow); }
.contact-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 40px; align-items: start; }
.contact-card { padding: 34px; border-radius: 30px; background: rgba(255,255,255,.82); }
.contact-row { padding: 18px 0; border-bottom: 1px solid var(--line); }
.contact-row:first-child { padding-top: 0; }
.contact-row:last-child { border-bottom: 0; padding-bottom: 0; }
.contact-row strong { display: block; margin-bottom: 6px; color: var(--green-dark); }
.contact-row a, .contact-row span { display: block; color: var(--muted); margin-top: 3px; }
.contact-row a:hover { color: var(--green); }

/* WhatsApp */
.whatsapp-float { position: fixed; right: 22px; bottom: 22px; z-index: 70; width: 64px; height: 64px; display: grid; place-items: center; border-radius: 50%; background: #25D366; box-shadow: 0 16px 36px rgba(37, 211, 102, .38); animation: whatsappPulse 1.8s ease-in-out infinite; }
.whatsapp-float::before, .whatsapp-float::after { content: ""; position: absolute; inset: -7px; border-radius: inherit; border: 1px solid rgba(37, 211, 102, .48); animation: ringPulse 1.8s ease-out infinite; }
.whatsapp-float::after { animation-delay: .45s; }
.whatsapp-float svg { position: relative; z-index: 2; width: 36px; height: 36px; fill: #fff; }
@keyframes whatsappPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.07); } }
@keyframes ringPulse { from { opacity: .8; transform: scale(.86); } to { opacity: 0; transform: scale(1.35); } }

/* Footer */
.site-footer { color: rgba(255,255,255,.82); background: #172111; }
.footer-grid { display: grid; grid-template-columns: 1.1fr .7fr 1.1fr; gap: 34px; padding: 56px 0 34px; }
.footer-brand img { width: 150px; margin-bottom: 16px; filter: brightness(1.08); }
.footer-brand p, .footer-contact span { margin: 0; color: rgba(255,255,255,.68); }
.footer-nav, .footer-contact { display: flex; flex-direction: column; gap: 9px; }
.footer-nav a, .footer-contact a { color: rgba(255,255,255,.78); }
.footer-nav a:hover, .footer-contact a:hover, .footer-bottom a:hover { color: var(--kraft); }
.footer-contact strong { color: var(--white); }
.footer-bottom { display: flex; justify-content: space-between; gap: 14px; padding: 18px 40px; border-top: 1px solid rgba(255,255,255,.1); color: rgba(255,255,255,.62); font-size: 14px; }
.footer-bottom a { color: var(--white); font-weight: 800; }

/* Animations */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .65s ease, transform .65s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .001ms !important; }
}

/* Responsive */
@media (max-width: 1100px) {
    .main-menu a { padding: 10px 10px; font-size: 13px; }
}
@media (max-width: 920px) {
    :root { --header-h: 78px; }
    .hamburger { display: block; }
    .main-menu { position: absolute; top: calc(100% + 10px); left: 20px; right: 20px; display: grid; gap: 4px; padding: 14px; border-radius: 22px; background: rgba(255,255,255,.96); box-shadow: var(--shadow); opacity: 0; transform: translateY(-8px); pointer-events: none; transition: opacity .2s ease, transform .2s ease; }
    .main-menu.is-open { opacity: 1; transform: translateY(0); pointer-events: auto; }
    .main-menu a { padding: 13px 14px; font-size: 15px; }
    .hero-grid, .two-col, .split-head, .history-grid, .contact-grid { grid-template-columns: 1fr; }
    .hero { min-height: auto; padding-top: calc(var(--header-h) + 46px); }
    .hero-media { order: -1; }
    .media-card > img { aspect-ratio: 16 / 10; }
    .cards-grid, .differentials { grid-template-columns: 1fr; }
    .service-list { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .footer-bottom { flex-direction: column; padding-inline: 20px; }
    .gallery-arrow { display: none; }
    .catalog-slider { padding-inline: 22px; }
}
@media (max-width: 560px) {
    html { scroll-padding-top: 82px; }
    .container { width: min(100% - 28px, 1180px); }
    .brand img { width: 132px; max-height: 58px; }
    .hero h2 { font-size: 38px; }
    .hero p { font-size: 17px; }
    .section, .catalog-section { padding: 72px 0; }
    .catalog-intro { padding: 72px 0 30px; }
    .slide-card { flex-basis: 82vw; border-radius: 22px; }
    .slide-card h3 { padding: 18px 14px 20px; }
    .floating-badge { left: 12px; bottom: 24px; }
    .whatsapp-float { right: 16px; bottom: 16px; width: 58px; height: 58px; }
    .footer-bottom { font-size: 13px; }
}

.history-content--full{max-width:980px;margin:0 auto;}
