/* =====================================
   Tema: Agro Colombia (Versión 2 - Amarillo/Oliva)
   Base HEX primario: #FFC107 (Amarillo Dorado)
   Paleta de colores:
   --color-primary: #FFC107;      (Amarillo Dorado)
   --color-accent: #556B2F;       (Verde Oliva Oscuro)
   --bg: #FDFEFE;                 (Blanco Hueso)
   --surface: #FFFFFF;            (Blanco Puro)
   --text: #212121;               (Carbón)
   --muted: #5f5f5f;              (Gris para texto secundario)
   ===================================== */
:root {
  --color-primary: #FFC107;
  --color-accent: #556B2F;
  --bg: #FDFEFE;
  --surface: #FFFFFF;
  --text: #212121;
  --muted: #5f5f5f;

  --radius: 0.75rem; /* Bordes un poco menos redondeados */
  --shadow: 0 8px 16px rgba(0,0,0,.1);
  --maxw: 1200px;
}

/* Reset */
* { box-sizing: border-box; }
html, body { height: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Poppins", system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, "Helvetica Neue", Arial, "Noto Sans";
  color: var(--text);
  background-color: var(--bg);
  font-size: clamp(1rem, 1.5vw, 1.125rem);
  line-height: 1.6;
}

/* Tipografía */
h1, h2, h3, h4, h5, h6 {
  line-height: 1.2;
  margin: 0 0 .75rem 0;
  font-weight: 600;
}
h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); color: var(--color-accent); }

img { display:block; max-width:100%; height:auto; }
.container { width: min(var(--maxw), 100% - 2rem); margin-inline:auto; }

/* Skip link */
.skip-link {
  position:absolute; left:-999px; top:auto; width:1px; height:1px; overflow:hidden;
}
.skip-link:focus {
  left: 1rem; top: 1rem; width:auto; height:auto; z-index:9999;
  background: var(--color-primary); color: var(--text); padding:.5rem .75rem; border-radius:.5rem;
}

/* Header */
.site-header {
  position: sticky; top:0; z-index:1000;
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.8);
  border-bottom: 1px solid #e0e0e0;
}
.header-inner {
  display:flex; align-items:center; justify-content:space-between; padding: .75rem 0;
}
.brand { display:flex; align-items:center; gap:.6rem; text-decoration:none; color:var(--text); }
.brand-mark { background:var(--color-primary); color: var(--text); width:2.1rem; height:2.1rem; border-radius:.6rem; display:grid; place-items:center; font-weight:700; box-shadow: 0 4px 8px rgba(0,0,0,.1); }
.brand-name { font-weight:700; }

/* Nav */
#nav-toggle { display:none; }
.hamburger { display:none; cursor:pointer; padding:.25rem; }
.hamburger span { display:block; width:26px; height:3px; background:var(--text); margin:5px 0; border-radius:3px; }

.main-nav ul { list-style:none; display:flex; gap:1rem; padding:0; margin:0; }
.main-nav a {
  color: var(--text); text-decoration:none; font-weight:500; padding:.5rem .75rem; border-radius:.6rem;
  position: relative;
}
.main-nav a:hover { color: var(--color-accent); }
/* Efecto de subrayado en hover */
.main-nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--color-accent);
    transition: width 0.3s ease;
}
.main-nav a:hover::after {
    width: 80%;
}


/* Responsive nav */
@media (max-width: 900px) {
  .hamburger { display:block; }
  .main-nav { 
    position:absolute; inset: calc(100% + 1px) 0 auto 0; background: var(--surface); 
    border-bottom:1px solid #e0e0e0;
    transform: translateY(-10px);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s;
  }
  #nav-toggle:checked ~ .main-nav { 
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }
  .main-nav ul { flex-direction:column; gap:0; }
  .main-nav a { display:block; padding:1rem 1.25rem; border-radius: 0; }
  .main-nav a:hover { background: #f5f5f5; }
  .main-nav a:hover::after { width: 0; } /* Desactivar efecto de línea en móvil */

  .hamburger span { transition: transform 0.3s ease, opacity 0.3s ease; }
  #nav-toggle:checked ~ .hamburger span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  #nav-toggle:checked ~ .hamburger span:nth-child(2) { opacity: 0; }
  #nav-toggle:checked ~ .hamburger span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
}

/* Heroes & Section Headers */
.hero, .section-header {
  position:relative; display:grid; align-items:center; isolation:isolate; color: #fff; /* Texto blanco para heroes */
}
.hero { min-height: 90dvh; } /* Reducir altura para que sea menos imponente */
.section-header { padding: clamp(4rem, 8vw, 8rem) 0; text-align:center; }
.section-header h2, .section-header p { color: #fff; }

.hero .hero-bg, .section-header .hero-bg {
  position:absolute; inset:0; z-index:-2;
  background-size: cover; background-position:center;
  filter: brightness(0.8); /* Ligeramente más brillante que el original */
}
.hero::after, .section-header::after {
  content:""; position:absolute; inset:0; z-index:-1;
  background: linear-gradient(180deg, rgba(0,0,0,.2), rgba(0,0,0,.5));
}
.hero-inner, .section-header .container { display:grid; gap:2rem; text-shadow: 0 2px 5px rgba(0,0,0,0.5); }
.hero-copy { max-width: 750px; }
.lead { color: #f0f0f0; font-weight:400; margin: 0 0 1.25rem 0; max-width: 65ch; }

/* Botones */
.btn {
  display:inline-block; text-decoration:none; font-weight:600; border-radius: 50px; padding:.9rem 2rem;
  border: 2px solid transparent;
  transition: all 0.3s ease;
}
.btn-primary { background: var(--color-primary); color: var(--text); }
.btn-secondary { background: transparent; color: var(--color-accent); border-color: var(--color-accent); }

.btn:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 20px rgba(0,0,0,.15);
}
.btn-primary:hover { background: #ffca28; }
.btn-secondary:hover { background: var(--color-accent); color: #fff; }

/* Hero backgrounds (sin cambios) */
.hero-1 .hero-bg { background-image: url('hero1.jpg'); }
.hero-2 .hero-bg { background-image: url('hero2.jpg'); }
.hero-3 .hero-bg { background-image: url('hero3.jpg'); }
.hero-4 .hero-bg { background-image: url('hero4.jpg'); }

/* Hero 1 gallery */
.hero-gallery { display: grid; gap: 1rem; margin-top: 1.5rem; }
.hero-gallery figure {
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  border: 4px solid #fff;
}
.hero-gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.hero-gallery img:hover { transform: scale(1.1); }

@media (max-width: 768px) { .hero-gallery { grid-template-columns: 1fr; } }
@media (min-width: 769px) { .hero-gallery { grid-template-columns: repeat(3, 1fr); } }

/* Icon List */
#porque h2, #porque .lead { color: var(--text); text-shadow: none; } /* Texto oscuro en sección "Por qué elegirnos" */
.icon-list { list-style: none; padding: 0; margin: 2rem 0 0 0; display: grid; gap: 2rem; }
.icon-list li { display: flex; align-items: flex-start; gap: 1rem; }
.icon-list .icon-wrapper {
  background-color: #E8F5E9; /* Verde muy claro */
  border-radius: 50%; width: 50px; height: 50px;
  display: grid; place-items: center; flex-shrink: 0;
}
.icon-wrapper svg { color: var(--color-accent); width: 28px; height: 28px; }
.icon-list h3 { margin: 0 0 0.25rem 0; font-size: 1.25rem; }
.icon-list p { margin: 0; color: var(--muted); }
@media(min-width: 1100px) { #porque .hero-inner { grid-template-columns: 1fr 1fr; align-items: center;} }


/* Secciones de tarjetas */
.auto-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}
.products-section, .testimonials-section, .badges { background: var(--bg); }
.cards-container, .testimonials-container { padding: clamp(3rem, 6vw, 6rem) 0; }

/* Cards de productos */
.card {
  background: var(--surface); padding: 2rem; border-radius: var(--radius);
  box-shadow: 0 4px 12px rgba(0,0,0,.08);
  border: 1px solid #eee;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card h3 { margin-top:0; }
.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow);
}

/* Testimonios */
.testimonial {
  background: var(--surface); padding: 2rem; border-radius: var(--radius);
  box-shadow: 0 4px 12px rgba(0,0,0,.08);
  height: 100%; 
  display: flex; flex-direction: column;
  border-left: 5px solid var(--color-primary);
}
.testimonial p { margin: 0 0 1rem 0; font-style: italic; }
.testimonial footer {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: auto; padding-top: 1rem; border-top: 1px solid #eee;
  color:var(--muted); font-size:.9rem;
}
cite { font-style: normal; font-weight: 600; }
.star-rating { display: flex; gap: .2rem; }
.star-rating svg { color: var(--color-primary); fill: currentColor; width: 18px; height: 18px; }

/* Badges */
.badges { padding: clamp(2rem, 5vw, 4rem) 0; border-top: 1px solid #eee; border-bottom: 1px solid #eee; }
.badge {
  display:flex; flex-direction: column; align-items:center; text-align:center; gap:.5rem; background: transparent;
  padding:1rem;
  font-weight: 500;
}
.badge .emoji { font-size: 2.5rem; line-height: 1; }

/* CTA Final & Footer */
.cta-final { padding: clamp(4rem, 8vw, 8rem) 0; text-align: center; background: #fafafa; }
.stacked { display: grid; justify-items: center; gap: 1rem; }
.stacked > * { max-width: 65ch; }
.stacked .btn { margin-top: 1rem; }

.site-footer {
  padding: 2rem 0; text-align: center; font-size: .9rem; color: var(--muted);
  background: #212121;
}
.site-footer p { color: #ccc; }