/* =========================================================
   blog/blog.css — lo que le falta al blog sobre itw-page.css.
   Lo cargan blog.php y cada blog/<slug>.html (generadas por
   _fuentes/blog/build_blog.py), SIEMPRE después de itw-page.css,
   itw-shell.css, iwp-bundle.css e iwp-header.css.
   Reutiliza .article-content, .post-card, .blog-grid, .faq y
   .cta-band de itw-page.css; aquí solo va lo que no existía.
   ========================================================= */

/* ---------- Migas (las fichas las llevan en su <style> propio) ---------- */
.crumbs {
    padding: 18px clamp(16px, 4vw, 32px) 14px;
    max-width: 1180px;
    margin: 0 auto;
    font-size: 13px;
    color: var(--c-text-muted);
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.crumbs a {
    color: var(--c-text-muted);
}

.crumbs a:hover {
    color: var(--c-primary-ink);
    text-decoration: underline;
}

.crumbs span[aria-current] {
    color: var(--c-text-strong);
    font-weight: 600;
}

/* ---------- Tarjetas: categoría + meta que parte en dos líneas ---------- */
.post-card__meta {
    flex-wrap: wrap;
    row-gap: 6px;
}

.post-card__cat {
    align-self: flex-start;
    padding: 3px 8px;
    border-radius: 999px;
    background: var(--c-hero-top);
    color: var(--c-primary-ink);
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.post-card__body h3 {
    font-size: 18px;
    line-height: 1.28;
    font-weight: 800;
    letter-spacing: -.025em;
    color: var(--c-ink);
}

.post-card__body h3 a {
    color: var(--c-ink);
}

.post-card:hover .post-card__body h3 a {
    color: var(--c-primary-ink);
}

/* ---------- Artículo: anchura de lectura ~72ch ---------- */
.bpost {
    font-size: 17px;
    padding: clamp(10px, 2vw, 22px) clamp(16px, 4vw, 32px) clamp(48px, 7vw, 80px);
}

/* Todos los hijos directos heredan los 17px, así que 72ch mide lo mismo en todos. */
.bpost > * {
    max-width: 72ch;
    margin-left: auto;
    margin-right: auto;
}

.bpost__head {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 28px;
}

.bpost__head h1 {
    font-size: clamp(28px, 4.4vw, 44px);
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: -.035em;
    color: var(--c-ink);
    overflow-wrap: break-word;
    text-wrap: balance;
}

.bpost__lead {
    font-size: 19px;
    line-height: 1.6;
    color: var(--c-text-strong);
}

.bpost__figure {
    margin-bottom: 30px;
}

.bpost__figure img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
    border-radius: 18px;
    border: 1px solid var(--c-border);
    background: var(--c-surface-2);
}

.bpost__body {
    overflow-wrap: break-word;
}

.bpost__body > :first-child {
    margin-top: 0;
}

.article-content h2,
.article-content h3 {
    scroll-margin-top: 96px;
}

.article-content strong {
    color: var(--c-text-strong);
}

.article-content img {
    height: auto;
}

/* Tablas: en móvil se desplazan dentro de sí mismas, nunca empujan la página. */
.article-content table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    border-collapse: collapse;
    margin: 8px 0 24px;
    font-size: 15.5px;
    line-height: 1.5;
}

.article-content th,
.article-content td {
    border: 1px solid var(--c-border-strong);
    padding: 10px 12px;
    text-align: left;
    vertical-align: top;
}

.article-content thead th {
    background: var(--c-surface-2);
    color: var(--c-ink);
    font-weight: 700;
}

.article-content caption {
    caption-side: bottom;
    padding-top: 8px;
    font-size: 13.5px;
    color: var(--c-text-muted);
    text-align: left;
}

.article-content blockquote {
    margin: 8px 0 24px;
    padding: 14px 20px;
    border-left: 4px solid var(--c-primary-ink);
    border-radius: 0 12px 12px 0;
    background: var(--c-surface);
    color: var(--c-text-strong);
}

.article-content blockquote p:last-child {
    margin-bottom: 0;
}

.article-content code {
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-size: .86em;
    padding: 1px 5px;
    border-radius: 6px;
    background: var(--c-surface-2);
}

/* ---------- Preguntas frecuentes y "Sigue leyendo" ---------- */
.bpost-faq {
    background: var(--c-surface);
}

.bpost-more__head {
    max-width: 1140px;
    margin: 0 auto 26px;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px 18px;
}

.bpost-more__head h2 {
    font-size: clamp(24px, 3.2vw, 32px);
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: -.03em;
    color: var(--c-ink);
}
