/* ============================================================
   BLOG · HERO "portada de revista"
   Solo se carga en blog.html. Usa los tokens v2 (css/v2.css).
   ============================================================ */

.bh {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(circle at 12% 18%, var(--v2-coral-tint, #ffe1df) 0 140px, transparent 141px),
    radial-gradient(rgba(168, 93, 50, .16) 1.4px, transparent 1.6px) 0 0 / 22px 22px,
    var(--v2-cream, #fbf6ef);
  padding: clamp(32px, 6vw, 72px) 0 clamp(72px, 9vw, 110px);
  color: var(--v2-cafe, #56230e);
}

.bh-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding-inline: clamp(16px, 6vw, 80px);
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, .85fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

/* ---------- Texto ---------- */
.bh-text { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; min-width: 0; }

.bh-crumb { display: flex; gap: 8px; font: 600 13px/1.4 var(--v2-body); color: var(--v2-muted, #6b574b); }
.bh-crumb a { color: inherit; text-decoration: none; }
.bh-crumb a:hover { color: var(--v2-caramel, #a85d32); text-decoration: underline; }

.bh-kicker {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 16px 8px 10px;
  background: #fff;
  border: 1.5px solid var(--v2-line, #e6d4b8);
  border-radius: 999px;
  font: 700 13px/1.2 var(--v2-body);
  color: var(--v2-caramel, #a85d32);
  box-shadow: 0 4px 0 var(--v2-line, #e6d4b8);
}
.bh-kicker i {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--v2-coral, #ff918e);
  position: relative;
}
.bh-kicker i::after {
  content: ""; position: absolute; inset: 6px; border-radius: 50%; background: #fff;
  animation: bh-pulse 2.4s ease-in-out infinite;
}

.bh .bh-title {
  font-family: var(--v2-display, "Nunito", sans-serif);
  font-weight: 800;
  font-size: clamp(40px, 6.4vw, 76px);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--v2-cafe, #56230e);
  margin: 0;
}
.bh-mark {
  position: relative;
  display: inline-block;
  color: var(--v2-caramel, #a85d32);
  font-style: italic;
  padding-inline: .04em;
}
/* Subrayado dibujado a mano, se "dibuja" al cargar */
.bh-mark::after {
  content: "";
  position: absolute;
  left: -2%; right: -2%; bottom: -.18em;
  height: .32em;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 100 240 80' preserveAspectRatio='none'%3E%3Cpath d='M12,140 C45,108 80,172 115,140 C150,108 185,172 228,136' fill='none' stroke='%23ff918e' stroke-width='14' stroke-linecap='round'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  clip-path: inset(0 100% 0 0);
  animation: bh-draw .9s .35s cubic-bezier(.6, .1, .3, 1) forwards;
  z-index: -1;
}

.bh .bh-lead {
  max-width: 34ch;
  font: 500 clamp(16px, 1.7vw, 19px)/1.55 var(--v2-body);
  color: var(--v2-text, #834f33);
  margin: 0;
}

.bh-topics { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 6px; }
.bh-topics__label { font: 700 13px/1 var(--v2-body); color: var(--v2-muted, #6b574b); margin-right: 4px; }
.bh-chip {
  appearance: none;
  border: 1.5px solid var(--v2-cafe, #56230e);
  background: #fff;
  color: var(--v2-cafe, #56230e);
  border-radius: 999px;
  padding: 9px 16px;
  font: 700 14px/1 var(--v2-body);
  cursor: pointer;
  box-shadow: 0 3px 0 var(--v2-cafe, #56230e);
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, color .15s ease;
}
.bh-chip:nth-of-type(1) { --rot: -2deg; }
.bh-chip:nth-of-type(2) { --rot: 1.5deg; }
.bh-chip:nth-of-type(3) { --rot: -1deg; }
.bh-chip:nth-of-type(4) { --rot: 2deg; }
.bh-chip { transform: rotate(var(--rot, 0)); }
.bh-chip:hover { background: var(--v2-coral, #ff918e); transform: rotate(0) translateY(-2px); box-shadow: 0 5px 0 var(--v2-cafe, #56230e); }
.bh-chip:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--v2-cafe, #56230e); }
.bh-chip:focus-visible { outline: 3px solid var(--v2-caramel, #a85d32); outline-offset: 3px; }

/* ---------- Arte ---------- */
.bh-art {
  position: relative;
  justify-self: center;
  width: min(440px, 100%);
  aspect-ratio: 1;
}
.bh-blob {
  position: absolute; inset: 6%;
  background: var(--v2-beige, #f1e6d3);
  border: 2px dashed var(--v2-line, #e6d4b8);
  border-radius: 58% 42% 46% 54% / 48% 56% 44% 52%;
  animation: bh-morph 14s ease-in-out infinite;
}
.bh-blob::before {
  content: ""; position: absolute; inset: 12%;
  border-radius: inherit;
  background: var(--v2-coral-tint, #ffe1df);
  opacity: .7;
}
.bh-illu {
  position: relative;
  width: 100%; height: auto;
  filter: drop-shadow(0 14px 22px rgba(87, 36, 13, .18));
  animation: bh-float 6s ease-in-out infinite;
}

/* Notas adhesivas */
.bh-note {
  position: absolute;
  background: #fff;
  border: 1.5px solid var(--v2-cafe, #56230e);
  border-radius: 16px;
  box-shadow: 4px 5px 0 var(--v2-cafe, #56230e);
  color: var(--v2-cafe, #56230e);
  font-family: var(--v2-body);
}
.bh-note--tip {
  left: -8%; bottom: 8%;
  width: 190px;
  padding: 14px 16px 14px;
  transform: rotate(-4deg);
  background: #fff7e6;
  display: flex; flex-direction: column; gap: 4px;
  animation: bh-pop .6s .5s cubic-bezier(.3, 1.5, .5, 1) both;
}
.bh-note--tip::before { /* cinta */
  content: ""; position: absolute; top: -11px; left: 50%;
  width: 64px; height: 20px; translate: -50% 0; rotate: 3deg;
  background: rgba(255, 145, 142, .75);
  border-radius: 3px;
}
.bh-note--tip strong { font: 800 12px/1 var(--v2-display); text-transform: uppercase; letter-spacing: .08em; color: var(--v2-caramel, #a85d32); }
.bh-note--tip span { font: 600 14px/1.35 var(--v2-body); }

.bh-note--badge {
  right: -2%; top: 6%;
  width: 104px; height: 104px;
  border-radius: 50%;
  background: var(--v2-coral, #ff918e);
  display: grid; place-content: center; text-align: center;
  transform: rotate(10deg);
  animation: bh-pop .6s .7s cubic-bezier(.3, 1.5, .5, 1) both;
}
.bh-note--badge b { font: 800 26px/1 var(--v2-display); }
.bh-note--badge span { font: 700 11px/1.15 var(--v2-body); margin-top: 3px; }

.bh-arrow {
  position: absolute;
  width: 90px;
  left: -2%; top: 14%;
  color: var(--v2-caramel, #a85d32);
  transform: rotate(-8deg);
}

/* Huellitas sueltas */
.bh-paw { position: absolute; z-index: -1; opacity: .55; pointer-events: none; }
.bh-paw--1 { width: 80px; top: 14%; left: 47%; rotate: 18deg; animation: bh-float 8s ease-in-out infinite; }
.bh-paw--2 { width: 56px; bottom: 22%; left: 4%; rotate: -24deg; animation: bh-float 7s 1s ease-in-out infinite; }
.bh-paw--3 { width: 40px; top: 8%; right: 6%; rotate: 32deg; animation: bh-float 9s .5s ease-in-out infinite; }

.bh-wave { position: absolute; left: 0; bottom: -1px; width: 100%; height: clamp(28px, 4vw, 56px); display: block; }

/* ---------- Animaciones ---------- */
@keyframes bh-draw { to { clip-path: inset(0 0 0 0); } }
@keyframes bh-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes bh-morph {
  0%, 100% { border-radius: 58% 42% 46% 54% / 48% 56% 44% 52%; }
  50% { border-radius: 44% 56% 58% 42% / 56% 44% 56% 44%; }
}
@keyframes bh-pop { from { opacity: 0; scale: .6; } to { opacity: 1; scale: 1; } }
@keyframes bh-pulse { 0%, 100% { scale: 1; } 50% { scale: .55; } }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .bh-wrap { grid-template-columns: 1fr; text-align: left; }
  .bh-art { width: min(320px, 82vw); margin-top: 8px; }
  .bh-arrow { display: none; }
  .bh-note--tip { left: -4%; bottom: -2%; width: 168px; }
  .bh-note--badge { width: 86px; height: 86px; right: -4%; }
  .bh-note--badge b { font-size: 21px; }
  .bh-paw--1 { left: auto; right: 4%; top: 52%; }
}
@media (max-width: 480px) {
  .bh-topics__label { width: 100%; margin-bottom: 2px; }
  .bh-note--tip { left: 0; }
  .bh-note--badge { right: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .bh-blob, .bh-illu, .bh-paw, .bh-kicker i::after, .bh-note--tip, .bh-note--badge { animation: none; }
  .bh-mark::after { animation: none; clip-path: none; }
  .bh-chip { transition: none; }
}

/* ============================================================
   BLOG · POST DESTACADO Y CARDS
   (el destacado lo arma js/blog-dynamic.js → renderFeaturedPost)
   ============================================================ */
.blog-featured {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  background: linear-gradient(135deg, var(--color-brand-accent-soft), var(--color-brand-secondary-soft));
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  margin-bottom: 60px;
}
.blog-featured__art {
  background: linear-gradient(135deg, var(--color-brand-primary), var(--color-brand-primary-hover));
  display: flex; align-items: center; justify-content: center;
  padding: 40px;
}
.blog-featured__art img {
  width: 100%; max-width: 280px; height: auto;
  border-radius: var(--radius-md);
  display: block;
}
.blog-featured__body { padding: 40px; min-width: 0; }
.blog-featured .blog-meta { flex-wrap: wrap; margin-bottom: 16px; }
.blog-featured__title { font-size: 1.6rem; margin-bottom: 12px; overflow-wrap: anywhere; }
.blog-featured .btn { margin-top: 20px; }
.blog-cat--soft { background: var(--color-brand-accent-soft); color: var(--color-brand-primary); }

@media (max-width: 760px) {
  .blog-featured { grid-template-columns: 1fr; margin-bottom: 44px; }
  .blog-featured__art { padding: 28px; }
  .blog-featured__art img { max-width: 200px; }
  .blog-featured__body { padding: 24px 22px 28px; }
  .blog-featured__title { font-size: 1.35rem; }
  .blog-featured .btn { width: 100%; justify-content: center; text-align: center; }
}

/* La imagen de la card lleva la clase .blog-card-img (alto fijo) pero no
   tenía ancho: quedaba de 200px y la card mostraba media imagen. */
.blog-card-img-link { display: block; background: var(--color-surface-alt); }
img.blog-card-img {
  width: 100%;
  height: 200px;
  object-fit: contain;
  padding: 10px;
  box-sizing: border-box;
  display: block;
}
.blog-card .blog-meta { flex-wrap: wrap; }
