/* ─── RESET ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --green:       #2a5c1e;
  --black:       #111;
  --white:       #fff;
  --text:        #111;
  --text-muted:  #555;
  --border:      #e0e0e0;
  --orange:      #e8890c;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--white);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* ─── NAV ─── */
.main-nav {
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--white);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}
.nav-logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--black);
  text-decoration: none;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav-links::-webkit-scrollbar { display: none; }
.nav-links a {
  display: block;
  padding: 8px 14px;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  white-space: nowrap;
  position: relative;
  transition: color 0.2s;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 14px;
  right: 14px;
  height: 1px;
  background: var(--green);
  transform: scaleX(0);
  transition: transform 0.2s;
}
.nav-links a:hover { color: var(--black); }
.nav-links a:hover::after { transform: scaleX(1); }

/* ─── HERO ─── */
.hero-banner {
  position: relative;
  height: 100vh;
  min-height: 600px;
  background-image: url('images/banner.jpg');
  background-size: cover;
  background-position: center 60%;
  background-color: var(--black);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.58);
}
.hero-content {
  position: relative;
  z-index: 1;
  padding: 40px 24px;
  max-width: 760px;
  width: 100%;
}
.hero-rule {
  display: block;
  width: 60px;
  height: 1px;
  background: rgba(255,255,255,0.5);
  margin: 0 auto 28px;
}
.hero-logo {
  font-family: 'Playfair Display', serif;
  font-size: clamp(3.2rem, 8vw, 6rem);
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin-bottom: 28px;
}
.hero-rule-bottom {
  display: block;
  width: 60px;
  height: 1px;
  background: rgba(255,255,255,0.5);
  margin: 0 auto 24px;
}
.hero-tagline {
  color: rgba(255,255,255,0.78);
  font-size: 0.82rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 400;
  margin-bottom: 36px;
}
.hero-social-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}
.hero-btn {
  display: inline-block;
  padding: 11px 28px;
  border: 1px solid rgba(255,255,255,0.75);
  color: var(--white);
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: transparent;
  transition: background 0.2s, border-color 0.2s;
}
.hero-btn:hover {
  background: rgba(255,255,255,0.12);
  border-color: #fff;
}

/* ─── MAIN CONTENT ─── */
.site-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 72px 32px 80px;
}

/* ─── SECTION LABEL + TITLE ─── */
.section-label {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 12px;
  font-weight: 500;
}
.section-title {
  font-family: 'Playfair Display', serif;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--black);
  line-height: 1.1;
  padding-bottom: 14px;
  margin-bottom: 36px;
  border-bottom: 1px solid var(--green);
  display: inline-block;
}

/* ─── FEATURED SECTION ─── */
.featured-section {
  margin-bottom: 80px;
}
.featured-card {
  display: grid;
  grid-template-columns: 55fr 45fr;
  gap: 0;
  background: var(--white);
  border: 1px solid var(--border);
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.2s;
}
.featured-card:hover {
  border-color: var(--green);
}
.featured-img {
  overflow: hidden;
}
.featured-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 360px;
  display: block;
  transition: transform 0.4s ease;
}
.featured-card:hover .featured-img img {
  transform: scale(1.03);
}
.featured-body {
  padding: 48px 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
}
.featured-label-tag {
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--green);
  font-weight: 600;
}
.featured-body h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.85rem;
  line-height: 1.2;
  color: var(--black);
  font-weight: 700;
}
.featured-body p {
  color: var(--text-muted);
  font-size: 0.97rem;
  line-height: 1.75;
}
.read-more {
  display: inline-block;
  color: var(--black);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: underline;
  text-underline-offset: 3px;
  margin-top: 4px;
  transition: color 0.2s;
}
.read-more:hover { color: var(--green); }

/* ─── CATEGORY SECTIONS ─── */
.category-section {
  margin-bottom: 72px;
}
.category-section-header {
  margin-bottom: 36px;
}

/* ─── CARDS GRID ─── */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}
.post-card {
  background: var(--white);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.2s;
  border: 1px solid transparent;
  margin: -1px;
}
.post-card:hover {
  border-color: var(--green);
  transform: translateY(-2px);
  z-index: 1;
  position: relative;
}
.card-img {
  position: relative;
  aspect-ratio: 16/10;
  overflow: hidden;
  background: #eee;
}
.card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}
.post-card:hover .card-img img { transform: scale(1.04); }
.placeholder-img {
  background: linear-gradient(135deg, #2d7a3e, var(--green));
  aspect-ratio: 16/10;
}
.cat-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  font-size: 0.63rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 4px 10px;
  color: #fff;
  background: var(--black);
}
.card-body {
  padding: 20px 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.card-body h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
  line-height: 1.35;
  color: var(--black);
  font-weight: 700;
}
.card-body p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.7;
  flex: 1;
}
.card-link {
  display: inline-block;
  color: var(--black);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: underline;
  text-underline-offset: 3px;
  margin-top: 4px;
  transition: color 0.2s;
}
.card-link:hover { color: var(--green); }

/* ─── CATEGORY TAG COLORS (kept for modal cat-tag display) ─── */
.cat-tag {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 4px 10px;
  color: #fff;
  background: var(--black);
}
.cultivos-tag   { background: #2d7a3e; }
.maquinaria-tag { background: #1a3d8f; }
.nutricion-tag  { background: #5b2d8f; }
.plagas-tag     { background: #8f1a1a; }
.malezas-tag    { background: #1a6b4a; }
.mercado-tag    { background: #7a4a0a; }
.clima-tag      { background: #0a5a7a; }
.ganaderia-tag  { background: #4a2a0a; }

/* ─── PODCAST SECTION ─── */
.podcast-wrap {
  border: 1px solid var(--border);
  padding: 40px 36px;
}
.podcast-desc {
  color: var(--text-muted);
  margin-bottom: 24px;
  font-size: 0.97rem;
  max-width: 560px;
  line-height: 1.7;
}

/* ─── CTA BANNER ─── */
.cta-banner {
  background: var(--black);
  color: var(--white);
  text-align: center;
  padding: 80px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.cta-banner-label {
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  font-weight: 500;
}
.cta-banner h2 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  color: var(--white);
  line-height: 1.1;
  margin-bottom: 28px;
  max-width: 560px;
}
.cta-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}
.cta-banner a {
  display: inline-block;
  border: 1px solid rgba(255,255,255,0.45);
  color: var(--white);
  padding: 10px 26px;
  text-decoration: none;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-radius: 30px;
  background: transparent;
  transition: border-color 0.2s, background 0.2s;
}
.cta-banner a:hover {
  border-color: rgba(255,255,255,0.9);
  background: rgba(255,255,255,0.08);
}

/* ─── MODAL ─── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal-overlay.active { display: flex; }
.modal-box {
  background: var(--white);
  max-width: 740px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  border-top: none;
}
.modal-close {
  position: sticky;
  top: 14px;
  float: right;
  margin: 14px 14px 0 0;
  background: rgba(0,0,0,0.06);
  border: none;
  width: 32px;
  height: 32px;
  font-size: 0.9rem;
  cursor: pointer;
  z-index: 10;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-close:hover { background: rgba(0,0,0,0.14); }
.modal-img-wrap img {
  width: 100%;
  max-height: 320px;
  object-fit: cover;
  display: block;
}
.modal-content {
  padding: 32px 40px 40px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.modal-content h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.75rem;
  line-height: 1.2;
  font-weight: 700;
  color: var(--black);
}
.modal-text {
  color: var(--text-muted);
  font-size: 0.97rem;
  line-height: 1.85;
}
.modal-text h4 {
  color: var(--black);
  margin-top: 20px;
  margin-bottom: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.modal-text ul, .modal-text ol { padding-left: 20px; }
.modal-text li { margin-bottom: 8px; }
.modal-text p { margin-bottom: 12px; }
.modal-social {
  display: flex;
  gap: 10px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.modal-social a {
  display: inline-block;
  padding: 9px 20px;
  border: 1px solid var(--border);
  color: var(--black);
  text-decoration: none;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: border-color 0.2s, background 0.2s;
}
.modal-social a:hover {
  border-color: var(--green);
  background: rgba(42,92,30,0.04);
  color: var(--green);
}

/* ─── FOOTER ─── */
.site-footer {
  background: var(--black);
  color: rgba(255,255,255,0.6);
  padding: 60px 32px 32px;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 60px;
  padding-bottom: 36px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 24px;
  align-items: start;
}
.footer-logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  color: #fff;
  display: block;
  margin-bottom: 10px;
  font-weight: 700;
}
.footer-brand p {
  font-size: 0.87rem;
  line-height: 1.7;
  max-width: 320px;
}
.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-end;
}
.footer-links a {
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color 0.2s;
}
.footer-links a:hover { color: rgba(255,255,255,0.95); }
.footer-copy {
  text-align: center;
  font-size: 0.74rem;
  color: rgba(255,255,255,0.25);
  max-width: 1200px;
  margin: 0 auto;
  letter-spacing: 0.06em;
}

/* ─── RESPONSIVE ─── */
@media (max-width: 900px) {
  .featured-card {
    grid-template-columns: 1fr;
  }
  .featured-img img { min-height: 260px; }
  .featured-body { padding: 32px 28px; }
  .footer-inner { grid-template-columns: 1fr; gap: 32px; }
  .footer-links { align-items: flex-start; }
}
@media (max-width: 700px) {
  .site-main { padding: 48px 20px 60px; }
  .hero-logo { font-size: 3rem; }
  .cards-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .section-title { font-size: 1.9rem; }
  .cta-banner { padding: 60px 20px; }
  .podcast-wrap { padding: 28px 20px; }
  .modal-content { padding: 24px 24px 32px; }
  .footer-inner { padding-bottom: 28px; }
  .nav-logo { font-size: 1rem; }
  .nav-inner { padding: 0 20px; }
  .cta-links { flex-direction: column; align-items: center; }
}
