/* ══════════════════════════════════════════════════════════════
   blog.css — Páginas públicas del blog.
   Usa los tokens de main.css (--bg, --ink, --terra, --serif, --hdr…).
   ══════════════════════════════════════════════════════════════ */

.blog-main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(104px, 14vw, 156px) var(--gutter) clamp(56px, 8vw, 96px);
  color: var(--ink);
}

/* ── Cabecera de sección ──────────────────────────────────────── */
.blog-hero { text-align: center; max-width: 720px; margin: 0 auto clamp(36px, 5vw, 56px); }
.blog-eyebrow {
  font-family: var(--hdr);
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 16px;
}
.blog-star { color: var(--terra); }
.blog-hero-title {
  font-family: var(--serif);
  font-weight: 300;
  font-style: italic;
  font-size: clamp(38px, 7vw, 72px);
  line-height: 1.04;
  letter-spacing: -.02em;
  margin: 0 0 16px;
}
.blog-hero-title .star::after { content: "*"; font-family: var(--hdr); font-style: normal; color: var(--terra); font-size: .5em; vertical-align: super; }
.blog-hero-sub {
  font-family: var(--serif);
  font-size: clamp(17px, 2.2vw, 21px);
  line-height: 1.6;
  color: var(--ink-soft);
  margin: 0;
}
.blog-cat-desc { text-align: left; }
.blog-cat-desc p { margin: 0 0 10px; }

/* ── Chips de categoría ───────────────────────────────────────── */
.blog-cat-nav { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 0 auto clamp(32px, 5vw, 48px); }
.blog-chip {
  display: inline-block;
  font-family: var(--hdr);
  font-size: 11px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 30px;
  padding: 6px 14px;
  background: transparent;
  transition: background .2s, color .2s, border-color .2s;
}
.blog-chip:hover, .blog-chip.active { background: var(--terra); color: #fff; border-color: var(--terra); }

/* ── Rejilla de artículos ─────────────────────────────────────── */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: clamp(24px, 3vw, 40px);
}
.blog-empty { grid-column: 1 / -1; text-align: center; color: var(--ink-soft); font-family: var(--serif); font-size: 20px; padding: 48px 0; }

.blog-card { display: flex; flex-direction: column; }
.blog-card-media {
  display: block;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  border-radius: 8px;
  background: var(--bg-soft);
}
.blog-card-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s ease; }
.blog-card:hover .blog-card-media img { transform: scale(1.04); }
.blog-card-noimg {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-size: 30px; color: var(--ink-mute); background: var(--bg-warm);
}
.blog-card-noimg b { color: var(--terra); }

.blog-card-body { padding: 16px 2px 0; }
.blog-card-body .blog-chip { margin-bottom: 10px; }
.blog-card-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(22px, 2.6vw, 27px);
  line-height: 1.18;
  margin: 0 0 8px;
}
.blog-card-title a { color: var(--ink); text-decoration: none; }
.blog-card-title a:hover { color: var(--terra); }
.blog-card-excerpt { color: var(--ink-soft); line-height: 1.55; margin: 0 0 12px; font-size: 15.5px; }
.blog-card-meta { font-family: var(--hdr); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-mute); }

/* ── Paginación ───────────────────────────────────────────────── */
.blog-pager {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; margin-top: clamp(40px, 6vw, 64px);
}
.blog-pager-link {
  font-family: var(--hdr); font-size: 12px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--terra); padding-bottom: 2px;
}
.blog-pager-link:hover { color: var(--terra); }
.blog-pager-pos { font-family: var(--hdr); font-size: 11px; color: var(--ink-mute); letter-spacing: .06em; }

/* ══════════════════════════════════════════════════════════════
   Artículo
   ══════════════════════════════════════════════════════════════ */
.post { max-width: 820px; margin: 0 auto; }

.post-preview-flag {
  background: rgba(168,85,58,.1); border: 1px solid rgba(168,85,58,.35); color: var(--terra-dk);
  border-radius: 8px; padding: 10px 14px; font-size: 14px; margin-bottom: 24px; text-align: center;
}
.post-crumbs { font-family: var(--hdr); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-mute); margin-bottom: 20px; }
.post-crumbs a { color: var(--ink-soft); text-decoration: none; }
.post-crumbs a:hover { color: var(--terra); }

.post-head { text-align: center; margin-bottom: clamp(28px, 4vw, 40px); }
.post-cats { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-bottom: 18px; }
.post-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(32px, 5.5vw, 56px);
  line-height: 1.08;
  letter-spacing: -.02em;
  margin: 0 0 16px;
}
.post-meta { font-family: var(--hdr); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-mute); }

.post-cover { margin: 0 0 clamp(28px, 4vw, 44px); }
.post-cover img { width: 100%; height: auto; border-radius: 10px; display: block; }

/* Cuerpo tipográfico */
.post-body { font-family: var(--serif); font-size: clamp(18px, 2.1vw, 21px); line-height: 1.75; color: var(--ink); }
.post-body > *:first-child { margin-top: 0; }
.post-body p { margin: 0 0 1.3em; }
.post-body h2 { font-family: var(--serif); font-weight: 500; font-size: clamp(26px, 3.4vw, 34px); line-height: 1.2; margin: 1.8em 0 .5em; }
.post-body h3 { font-family: var(--serif); font-weight: 500; font-size: clamp(22px, 2.6vw, 27px); line-height: 1.25; margin: 1.5em 0 .4em; }
.post-body h4 { font-family: var(--hdr); font-size: 14px; letter-spacing: .04em; text-transform: uppercase; margin: 1.6em 0 .5em; color: var(--ink-soft); }
.post-body a { color: var(--terra-dk); text-decoration: underline; text-underline-offset: 2px; }
.post-body ul, .post-body ol { margin: 0 0 1.3em; padding-left: 1.4em; }
.post-body li { margin-bottom: .5em; }
.post-body blockquote {
  margin: 1.6em 0; padding: 6px 0 6px 22px; border-left: 3px solid var(--terra);
  font-style: italic; font-size: 1.1em; color: var(--ink-soft);
}
.post-body figure { margin: 1.8em 0; }
.post-body figure img, .post-body > img { width: 100%; height: auto; border-radius: 8px; display: block; }
.post-body figcaption { font-family: var(--hdr); font-size: 12px; letter-spacing: .03em; color: var(--ink-mute); text-align: center; margin-top: 10px; }

/* Compartir */
.post-share {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  margin-top: clamp(36px, 5vw, 52px); padding-top: 24px; border-top: 1px solid var(--line);
}
.post-share-label { font-family: var(--hdr); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-mute); margin-right: 4px; }
.share-btn {
  font-family: var(--hdr); font-size: 12px; letter-spacing: .04em;
  color: var(--ink); text-decoration: none; cursor: pointer;
  border: 1px solid var(--line); border-radius: 30px; padding: 7px 16px; background: transparent;
  transition: background .2s, color .2s, border-color .2s;
}
.share-btn:hover { background: var(--terra); color: #fff; border-color: var(--terra); }

/* Relacionados */
.post-related { margin-top: clamp(56px, 8vw, 88px); }
.related-title {
  font-family: var(--serif); font-weight: 400; font-style: italic;
  font-size: clamp(26px, 4vw, 38px); text-align: center; margin: 0 0 clamp(28px, 4vw, 40px);
}

@media (max-width: 560px) {
  .blog-grid { grid-template-columns: 1fr; }
  .post-share { gap: 8px; }
  .share-btn { padding: 6px 13px; }
}
