/* ══════════════════════════════════════════════════════════════════
   Blog Hub — herbanutricion.com/co/
   Scope: body.blog (WordPress añade esta clase automáticamente
          en la página configurada como "Posts page", ID 26)
   Enqueue: functions.php con filemtime() cuando is_home()
   Portado de kadence-child (herbanutricion.cl) hn-cl-blog.css, adaptado
   a los tokens reales de /co/ (hn-co-header.css) en vez de --space-*.
   ══════════════════════════════════════════════════════════════════ */

:root {
  --hn-co-space-3: 8px;
  --hn-co-space-4: 12px;
  --hn-co-space-5: 16px;
  --hn-co-space-6: 20px;
  --hn-co-space-7: 24px;
  --hn-co-space-8: 32px;
  --hn-co-space-9: 40px;
  --hn-co-space-11: 64px;
  --hn-co-radius-md: 10px;
  --hn-co-radius-lg: 16px;
  --hn-co-radius-pill: 100px;
  --hn-co-shadow-sm: 0 2px 10px rgba(0,0,0,0.06);
  --hn-co-shadow-md: 0 4px 20px rgba(0,0,0,0.08);
  --hn-co-shadow-wa: 0 4px 14px rgba(37,211,102,0.35);
  --hn-co-h1: clamp(1.9rem, 4vw, 2.75rem);
  --hn-co-h2: clamp(1.4rem, 2.6vw, 1.9rem);
  --hn-co-h3: 1.05rem;
  --hn-co-body: 1rem;
  --hn-co-body-sm: 0.875rem;
  --hn-co-caption: 0.7rem;
}

/* ─── Reset contenedor Kadence para full-width ─────────────────── */
body.blog .site-main,
body.blog #main,
body.blog #primary,
body.blog .content-container,
body.blog .content-area {
  max-width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
  width: 100% !important;
}

/* ─── Contenedor interno reutilizable ──────────────────────────── */
body.blog .blog-container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 var(--hn-co-space-7);
}

body.blog .blog-section-label {
  font-size: var(--hn-co-caption);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--hn-verde-oscuro);
  margin-bottom: var(--hn-co-space-5);
}

/* ─── Migas de pan — copiadas exactas de las páginas de categoría ── */
body.blog .hn-cat-breadcrumb { background: #F7F9F4; border-bottom: 1px solid #E5E7EB; padding: 12px 0; font-size: .82rem; }
body.blog .hn-cat-breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 0; margin: 0; }
body.blog .hn-cat-breadcrumb li { display: flex; align-items: center; gap: 6px; color: #6b7280; }
body.blog .hn-cat-breadcrumb li:not(:last-child)::after { content: '›'; color: #d7dbd3; }
body.blog .hn-cat-breadcrumb a { color: #67A81C; font-weight: 600; text-decoration: none; }
body.blog .hn-cat-breadcrumb a:hover { text-decoration: underline; }


/* ══════════════════════════════════════════════════════════════════
   1. HERO
   ══════════════════════════════════════════════════════════════════ */
body.blog .blog-hero {
  background-color: #0d1a07;
  min-height: 82vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: 100px 0 88px;
}

body.blog .blog-hero__bg-img {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

body.blog .blog-hero__bg-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  display: block;
}

body.blog .blog-hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    100deg,
    rgba(6,12,3,.96) 0%,
    rgba(6,12,3,.85) 25%,
    rgba(6,12,3,.60) 45%,
    rgba(6,12,3,.20) 62%,
    rgba(6,12,3,0)   75%
  );
}

body.blog .blog-hero > .blog-container {
  padding-left: clamp(28px, 5vw, 88px);
  padding-right: clamp(28px, 5vw, 88px);
  max-width: 100%;
  width: 100%;
  margin: 0;
}

body.blog .blog-hero__inner {
  position: relative;
  z-index: 2;
  max-width: 620px;
  text-align: left;
}

body.blog .blog-hero__badge {
  display: inline-block;
  background: rgba(120,190,32,0.22);
  color: #fff;
  font-size: var(--hn-co-caption);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 14px;
  border-radius: var(--hn-co-radius-pill);
  margin-bottom: var(--hn-co-space-6);
}

body.blog .blog-hero__h1 {
  font-size: var(--hn-co-h1);
  font-weight: 800;
  color: #ffffff !important;
  line-height: 1.1;
  margin: 0 0 var(--hn-co-space-6);
  letter-spacing: -0.02em;
}

body.blog .blog-hero__h1 em {
  font-style: normal;
  color: var(--hn-verde);
}

body.blog .blog-hero__sub {
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: rgba(255,255,255,0.85);
  max-width: 560px;
  margin: 0 0 var(--hn-co-space-8);
  line-height: 1.65;
}

body.blog .blog-hero__byline {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255,255,255,0.58);
  font-size: 0.8rem;
  line-height: 1.4;
}

body.blog .blog-hero__byline-av {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--hn-verde) 0%, #3d8400 100%);
}

body.blog .blog-hero__byline-av img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  display: block;
}

body.blog .blog-hero__byline a {
  color: rgba(255,255,255,0.82);
  text-decoration: underline;
  text-underline-offset: 2px;
}

body.blog .blog-hero__byline a:hover {
  color: var(--hn-verde);
}


/* ══════════════════════════════════════════════════════════════════
   2. POST DESTACADO
   ══════════════════════════════════════════════════════════════════ */
body.blog .blog-featured {
  background: var(--hn-surface);
  padding: var(--hn-co-space-11) 0;
}

body.blog .blog-featured__card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--hn-co-space-9);
  align-items: center;
  background: #fff;
  border-radius: var(--hn-co-radius-lg);
  overflow: hidden;
  box-shadow: var(--hn-co-shadow-md);
}

body.blog .blog-featured__img {
  aspect-ratio: 16/9;
  overflow: hidden;
}

body.blog .blog-featured__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

body.blog .blog-featured__card:hover .blog-featured__img img {
  transform: scale(1.03);
}

body.blog .blog-featured__content {
  padding: var(--hn-co-space-9) var(--hn-co-space-9) var(--hn-co-space-9) 0;
}

body.blog .blog-featured__title {
  font-size: var(--hn-co-h2);
  font-weight: 700;
  line-height: 1.25;
  margin: var(--hn-co-space-5) 0 var(--hn-co-space-6);
  color: var(--hn-text);
}

body.blog .blog-featured__title a {
  color: inherit;
  text-decoration: none;
}

body.blog .blog-featured__title a:hover {
  color: var(--hn-verde);
}

body.blog .blog-featured__excerpt,
body.blog .blog-featured__excerpt p {
  color: var(--hn-text);
  line-height: 1.7;
  margin-bottom: var(--hn-co-space-8);
  font-size: 1.0625rem;
}


/* ══════════════════════════════════════════════════════════════════
   3. FILTROS + GRID
   ══════════════════════════════════════════════════════════════════ */
body.blog .blog-grid {
  background: #fff;
  padding: var(--hn-co-space-11) 0;
}

body.blog .blog-grid__h2 {
  font-size: var(--hn-co-h2);
  font-weight: 800;
  color: var(--hn-text);
  margin-bottom: var(--hn-co-space-8);
  letter-spacing: -0.01em;
}

body.blog .blog-filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--hn-co-space-4);
  margin-bottom: var(--hn-co-space-9);
}

body.blog .blog-filter-pill {
  display: inline-flex;
  align-items: center;
  padding: 8px 18px;
  border-radius: var(--hn-co-radius-pill);
  border: 2px solid var(--hn-border);
  background: transparent;
  color: var(--hn-text-secondary);
  font-size: var(--hn-co-body-sm);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

body.blog button.blog-filter-pill:hover {
  border-color: var(--hn-verde);
  color: var(--hn-verde);
}

body.blog .blog-filter-pill.active {
  background: var(--hn-verde);
  border-color: var(--hn-verde);
  color: #fff !important;
}

body.blog .blog-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--hn-co-space-8);
}

body.blog .hn-blog-card {
  background: #fff;
  border-radius: var(--hn-co-radius-lg);
  overflow: hidden;
  box-shadow: var(--hn-co-shadow-sm);
  border: 1px solid var(--hn-border);
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

body.blog .hn-blog-card:hover {
  box-shadow: 0 8px 30px rgba(0,0,0,0.12);
  transform: translateY(-4px);
}

body.blog .blog-card__img-link {
  display: block;
  aspect-ratio: 16/9;
  overflow: hidden;
}

body.blog .blog-card__img-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

body.blog .hn-blog-card:hover .blog-card__img-link img {
  transform: scale(1.04);
}

body.blog .blog-card__body {
  padding: var(--hn-co-space-6);
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: var(--hn-co-space-4);
}

body.blog .blog-card__title {
  font-size: var(--hn-co-h3);
  font-weight: 700;
  line-height: 1.3;
  margin: 0;
  color: var(--hn-text);
}

body.blog .blog-card__title a {
  color: inherit;
  text-decoration: none;
}

body.blog .blog-card__title a:hover {
  color: var(--hn-verde);
}

body.blog .blog-card__excerpt {
  color: var(--hn-text-secondary);
  font-size: var(--hn-co-body-sm);
  line-height: 1.6;
  margin: 0;
  flex: 1;
}

body.blog .blog-card__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: var(--hn-co-space-5);
  border-top: 1px solid var(--hn-border);
  font-size: var(--hn-co-caption);
}

body.blog .blog-card__meta time {
  color: var(--hn-text-secondary);
}

body.blog .blog-card__read-more {
  color: var(--hn-verde);
  font-weight: 600;
  text-decoration: none;
  font-size: var(--hn-co-body-sm);
  transition: color 0.2s ease;
}

body.blog .blog-card__read-more:hover {
  color: var(--hn-verde-hover);
}

body.blog .blog-img-placeholder {
  width: 100%;
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, #f0ede8 0%, #e8e3dc 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

body.blog .blog-img-placeholder::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='40' height='40' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='20' cy='20' r='1.5' fill='%231B3A1B' opacity='.08'/%3E%3C/svg%3E") repeat;
}


/* ══════════════════════════════════════════════════════════════════
   4. PILLS DE CATEGORÍA
   ══════════════════════════════════════════════════════════════════ */
body.blog .blog-pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--hn-co-radius-pill);
  background: rgba(120,190,32,0.12);
  color: var(--hn-verde-oscuro);
  font-size: var(--hn-co-caption);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

body.blog .blog-pill--sm {
  font-size: 0.7rem;
}


/* ══════════════════════════════════════════════════════════════════
   5. BLOQUE AEO
   ══════════════════════════════════════════════════════════════════ */
body.blog .blog-aeo {
  background: var(--hn-surface);
  padding: var(--hn-co-space-11) 0;
}

body.blog .blog-aeo__inner {
  max-width: 820px;
}

body.blog .blog-aeo h2 {
  font-size: var(--hn-co-h2);
  font-weight: 700;
  color: var(--hn-text);
  margin-bottom: var(--hn-co-space-7);
}

body.blog .blog-aeo__def {
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--hn-text);
  font-weight: 500;
  border-left: 3px solid var(--hn-verde);
  padding-left: var(--hn-co-space-7);
  margin-bottom: var(--hn-co-space-7);
}

body.blog .blog-aeo p {
  color: var(--hn-text-secondary);
  line-height: 1.75;
  margin-bottom: var(--hn-co-space-6);
}

body.blog .blog-aeo a {
  color: var(--hn-verde);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}


/* ══════════════════════════════════════════════════════════════════
   7. MARQUESINA — copiada exacta de hn-home.css (misma en toda /co/)
   ══════════════════════════════════════════════════════════════════ */
.hn-marquee {
  background: linear-gradient(180deg, #0e2705 0%, #163a09 100%);
  border-bottom: 1px solid rgba(120,190,32,.2);
  overflow: hidden;
  padding: 14px 0;
  position: relative;
  list-style: none;
}
.hn-marquee::before,
.hn-marquee::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 80px;
  z-index: 2;
  pointer-events: none;
}
.hn-marquee::before {
  left: 0;
  background: linear-gradient(to right, #0e2705, transparent);
}
.hn-marquee::after {
  right: 0;
  background: linear-gradient(to left, #163a09, transparent);
}
.hn-marquee__track {
  display: flex;
  align-items: center;
  width: max-content;
  margin: 0; padding: 0;
  list-style: none;
  animation: hn-marquee-scroll 40s linear infinite;
}
.hn-marquee:hover .hn-marquee__track { animation-play-state: paused; }
@keyframes hn-marquee-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .hn-marquee__track { animation: none; }
}
.mq-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 28px;
  white-space: nowrap;
  border-right: 1px solid rgba(120,190,32,.18);
}
.mq-item:last-child { border-right: none; }
.mq-item__icon {
  flex-shrink: 0;
  width: 18px; height: 18px;
  color: #78BE20;
  display: flex; align-items: center; justify-content: center;
}
.mq-item__icon svg { width: 18px; height: 18px; }
.mq-item__text {
  font-size: .78rem;
  font-weight: 500;
  color: rgba(255,255,255,.82);
  letter-spacing: .01em;
}
.mq-item__text strong {
  color: #fff;
  font-weight: 700;
}

body.blog .hn-blog-disclaimer {
  background: var(--hn-surface);
  border-top: 1px solid var(--hn-border);
  padding: 20px 0;
}
body.blog .hn-blog-disclaimer p {
  font-size: 0.75rem;
  color: var(--hn-text-secondary);
  line-height: 1.65;
  max-width: 900px;
  margin: 0 auto;
}


/* ══════════════════════════════════════════════════════════════════
   7. FAQ
   ══════════════════════════════════════════════════════════════════ */
body.blog .blog-faq {
  background: var(--hn-surface);
  padding: var(--hn-co-space-11) 0;
}

body.blog .blog-faq__h2 {
  font-size: var(--hn-co-h2);
  font-weight: 700;
  color: var(--hn-text);
  margin-bottom: var(--hn-co-space-8);
}

body.blog .hn-faq {
  display: flex;
  flex-direction: column;
  gap: var(--hn-co-space-5);
  max-width: 820px;
}

body.blog .hn-faq-item {
  background: #fff;
  border-radius: var(--hn-co-radius-md);
  border: 1px solid var(--hn-border);
  overflow: hidden;
  transition: box-shadow 0.2s ease;
}

body.blog .hn-faq-item[open] {
  box-shadow: var(--hn-co-shadow-sm);
}

body.blog .hn-faq-item__q {
  padding: var(--hn-co-space-6);
  font-weight: 700;
  font-size: var(--hn-co-body);
  color: var(--hn-text);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--hn-co-space-6);
  user-select: none;
}

body.blog .hn-faq-item__q::after {
  content: '+';
  font-size: 1.4rem;
  color: var(--hn-verde);
  font-weight: 300;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

body.blog .hn-faq-item[open] .hn-faq-item__q::after {
  transform: rotate(45deg);
}

body.blog .hn-faq-item::-webkit-details-marker { display: none; }
body.blog .hn-faq-item summary::-webkit-details-marker { display: none; }

body.blog .hn-faq-item__a {
  padding: 0 var(--hn-co-space-6) var(--hn-co-space-6);
  border-top: 1px solid var(--hn-border);
}

body.blog .hn-faq-item__a p {
  color: var(--hn-text-secondary);
  line-height: 1.7;
  margin: var(--hn-co-space-5) 0 0;
}


/* ══════════════════════════════════════════════════════════════════
   8. CTA FINAL
   ══════════════════════════════════════════════════════════════════ */
body.blog .blog-cta {
  background: linear-gradient(135deg, #1a3d11 0%, var(--hn-verde-oscuro) 60%, #3a7a25 100%);
  padding: var(--hn-co-space-11) 0;
  text-align: center;
}

body.blog .blog-cta__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--hn-co-space-6);
}

body.blog .blog-cta__h2 {
  font-size: var(--hn-co-h2);
  font-weight: 700;
  color: #fff;
  max-width: 600px;
  margin: 0;
}

body.blog .blog-cta__sub {
  color: rgba(255,255,255,0.8);
  margin: 0;
  font-size: 1rem;
}


/* ══════════════════════════════════════════════════════════════════
   9. BOTONES PROPIOS DEL HUB
   ══════════════════════════════════════════════════════════════════ */
body.blog .hn-btn-blog {
  display: inline-flex;
  align-items: center;
  padding: 13px 28px;
  background: var(--hn-verde);
  color: #fff !important;
  font-weight: 700;
  font-size: var(--hn-co-body);
  border-radius: var(--hn-co-radius-pill);
  text-decoration: none;
  transition: background 0.2s ease;
  border: none;
  cursor: pointer;
}

body.blog .hn-btn-blog:hover {
  background: var(--hn-verde-hover);
}

body.blog .hn-btn-wa {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  background: var(--hn-whatsapp);
  color: #fff !important;
  font-weight: 700;
  font-size: var(--hn-co-body);
  border-radius: var(--hn-co-radius-pill);
  text-decoration: none;
  transition: background 0.2s ease, box-shadow 0.2s ease;
  box-shadow: var(--hn-co-shadow-wa);
}

body.blog .hn-btn-wa:hover {
  background: var(--hn-whatsapp-hover) !important;
}

body.blog .hn-btn-wa--lg {
  padding: 16px 36px;
  font-size: 1.05rem;
}


/* ══════════════════════════════════════════════════════════════════
   10. RESPONSIVE
   ══════════════════════════════════════════════════════════════════ */
@media (max-width: 960px) {
  body.blog .blog-featured__card {
    grid-template-columns: 1fr;
  }
  body.blog .blog-featured__content {
    padding: var(--hn-co-space-8);
  }
  body.blog .blog-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  body.blog .blog-container {
    padding: 0 var(--hn-co-space-6);
  }
  body.blog .blog-hero {
    min-height: auto;
    padding: 64px 0 56px;
    align-items: flex-start;
  }
  body.blog .blog-hero > .blog-container {
    padding-left: var(--hn-co-space-6);
    padding-right: var(--hn-co-space-6);
    max-width: 100%;
  }
  body.blog .blog-hero__inner {
    max-width: 100%;
  }
  body.blog .blog-hero__overlay {
    background: linear-gradient(
      170deg,
      rgba(6,12,3,.94) 0%,
      rgba(6,12,3,.80) 45%,
      rgba(6,12,3,.55) 70%,
      rgba(6,12,3,.30) 100%
    );
  }
  body.blog .blog-cards-grid {
    grid-template-columns: 1fr;
  }
  body.blog .blog-filters {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: var(--hn-co-space-4);
    scrollbar-width: none;
  }
  body.blog .blog-filters::-webkit-scrollbar {
    display: none;
  }
  body.blog .hn-faq {
    max-width: 100%;
  }
}
