/*
 * Blog (prefijo zb-). Se apoya en el kit zl- de landing.css (tokens, .zl-wrap, .zl-btn).
 * Envolver la página en <div class="zl zb">. Bloques:
 *
 *   .zb-hero                 cabecera: .zb-crumbs (nav), .zl-eyebrow, .zb-title (h1), .zb-lead
 *   .zb-chips / .zb-chip     píldoras de categoría/etiqueta (+ .zb-chip__n contador)
 *   .zb-grid (--2)           cuadrícula de tarjetas
 *   .zb-card (+ .is-lead)    tarjeta de artículo: .zb-card__media, .zb-card__body, .zb-card__cat,
 *                            .zb-card__link (enlace estirado), .zb-card__meta, .zb-card__tags
 *   .zb-side / .zb-box       barra lateral pegajosa y cajas (--navy para newsletter)
 *   .zb-pager                paginación de Laravel
 *   .zb-progress             barra de progreso de lectura fija bajo la navegación
 *   .zb-post                 artículo: .zb-post__head, .zb-post__meta, .zb-post__cover,
 *                            .zb-post__layout, .zb-post__main, .zb-post__aside
 *   .zb .blog-content        cuerpo del artículo (HTML de la base de datos); sobrescribe los estilos
 *                            en línea del layout y de las vistas con mayor especificidad
 */

.zb { --zb-measure: 68ch; padding-bottom: 40px; }
.zb a { color: inherit; }

/* Cabecera */
.zb-hero { padding-top: clamp(28px, 4vw, 56px); }
.zb-crumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 28px; padding: 0; list-style: none; font-size: 14px; color: var(--zl-muted); }
.zb-crumbs li { display: inline-flex; align-items: center; gap: 8px; }
.zb-crumbs li + li::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--zl-orange); }
.zb-crumbs a { padding: 6px 12px; border-radius: 999px; background: var(--zl-soft); color: var(--zl-ink); text-decoration: none; font-weight: 500; transition: background .3s, color .3s; }
.zb-crumbs a:hover { background: var(--zl-ink); color: #fff; }
.zb-crumbs span { color: var(--zl-muted); }
.zb-title { margin: 22px 0 0; max-width: 16ch; font-size: clamp(42px, 7vw, 108px); line-height: .94; letter-spacing: -.05em; font-weight: 600; text-wrap: balance; animation: zl-rise 1.1s var(--zl-ease) both; }
.zb-title--sm { max-width: 20ch; font-size: clamp(38px, 5.6vw, 84px); }
.zb-lead { margin: 24px 0 0; max-width: 640px; font-size: 20px; line-height: 1.55; color: var(--zl-muted); }

/* Secciones */
.zb-section { padding-top: clamp(56px, 7vw, 96px); }
.zb-section__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 28px; padding-bottom: 18px; border-bottom: 1px solid var(--zl-line); }
.zb-section__head h2 { margin: 0; font-size: clamp(30px, 3.6vw, 52px); line-height: 1; letter-spacing: -.045em; font-weight: 600; }
.zb-section__head .zl-label { margin: 0; }

/* Píldoras */
.zb-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.zb-chip { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px; background: var(--zl-soft); color: var(--zl-ink); font-size: 14px; font-weight: 500; line-height: 1.2; text-decoration: none; transition: background .3s, color .3s, transform .4s var(--zl-ease); }
.zb-chip:hover { background: var(--zl-orange); color: #fff; transform: translateY(-2px); }
.zb-chip__n { min-width: 24px; padding: 2px 7px; border-radius: 999px; background: #fff; color: var(--zl-ink); font-size: 12px; font-weight: 600; text-align: center; }
.zb-box .zb-chip { background: #fff; }
.zb-chips--list { flex-direction: column; gap: 6px; }
.zb-chips--list .zb-chip { display: flex; justify-content: space-between; border-radius: 16px; padding: 12px 16px; }
.zb-chips--list .zb-chip__n { background: var(--zl-soft); }
.zb-chips--list .zb-chip:hover .zb-chip__n { background: #fff; }

/* Tarjetas */
.zb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 18px; }
.zb-grid--2 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.zb-card { position: relative; display: flex; flex-direction: column; min-width: 0; border-radius: 32px; background: var(--zl-soft); overflow: hidden; transition: transform .6s var(--zl-ease), box-shadow .6s var(--zl-ease); }
.zb-card:hover { transform: translateY(-6px); box-shadow: 0 30px 60px -36px rgba(1, 4, 64, .45); }
.zb-card__media { position: relative; margin: 8px 8px 0; aspect-ratio: 16 / 10; border-radius: 26px; overflow: hidden; background: var(--zl-peach); }
.zb-card__media img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s var(--zl-ease); }
.zb-card:hover .zb-card__media img { transform: scale(1.06); }
.zb-card__media--empty { display: flex; align-items: center; justify-content: center; background: radial-gradient(circle at 30% 30%, #fff 0 18%, transparent 19%), var(--zl-peach); color: var(--zl-orange); font-size: 46px; }
.zb-card__media--empty i { transition: transform .8s var(--zl-ease); }
.zb-card:hover .zb-card__media--empty i { transform: translateY(-6px) rotate(-8deg); }
.zb-card__go { position: absolute; right: 16px; bottom: 16px; z-index: 1; width: 48px; height: 48px; border-radius: 50%; background: #fff; color: var(--zl-ink); display: inline-flex; align-items: center; justify-content: center; font-size: 18px; transform: scale(.85); opacity: 0; transition: transform .5s var(--zl-ease), opacity .4s, background .3s, color .3s; }
.zb-card:hover .zb-card__go { transform: none; opacity: 1; background: var(--zl-orange); color: #fff; }
.zb-card__body { display: flex; flex-direction: column; gap: 12px; flex: 1; padding: 22px 26px 26px; }
.zb-card__cat { align-self: flex-start; padding: 5px 12px; border-radius: 999px; background: #fff; color: var(--zl-orange); font-size: 13px; font-weight: 600; }
.zb-card h3 { margin: 0; font-size: 23px; line-height: 1.12; letter-spacing: -.025em; font-weight: 600; text-wrap: balance; }
.zb-card__link { text-decoration: none; background-image: linear-gradient(currentColor, currentColor); background-size: 0 1.5px; background-position: 0 100%; background-repeat: no-repeat; transition: background-size .6s var(--zl-ease); }
.zb-card__link::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.zb-card:hover .zb-card__link { background-size: 100% 1.5px; }
.zb-card p { margin: 0; font-size: 16px; line-height: 1.5; color: var(--zl-muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.zb-card__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-top: auto; padding-top: 14px; border-top: 1px solid var(--zl-line); font-size: 14px; color: var(--zl-muted); }
.zb-card__meta i { color: var(--zl-orange); margin-right: 4px; }
.zb-card__tags { position: relative; z-index: 2; display: flex; flex-wrap: wrap; gap: 6px; }
.zb-card__tags a { padding: 4px 10px; border-radius: 999px; background: #fff; color: var(--zl-copy); font-size: 12px; font-weight: 500; text-decoration: none; transition: background .3s, color .3s; }
.zb-card__tags a:hover { background: var(--zl-orange); color: #fff; }

/* Tarjeta principal (destacado) */
@media (min-width: 900px) {
    .zb-card.is-lead { grid-column: 1 / -1; display: grid; grid-template-columns: 1.25fr 1fr; background: var(--zl-ink); color: #fff; }
    .zb-card.is-lead .zb-card__media { margin: 10px; aspect-ratio: auto; min-height: 420px; }
    .zb-card.is-lead .zb-card__body { justify-content: center; gap: 18px; padding: clamp(28px, 4vw, 56px); }
    .zb-card.is-lead h3 { font-size: clamp(32px, 3.4vw, 52px); line-height: 1; letter-spacing: -.04em; }
    .zb-card.is-lead p { font-size: 18px; color: #C9CBE6; -webkit-line-clamp: 4; }
    .zb-card.is-lead .zb-card__meta { border-top-color: rgba(255, 255, 255, .16); color: #C9CBE6; margin-top: 8px; }
    .zb-card.is-lead .zb-card__tags a { background: rgba(255, 255, 255, .1); color: #fff; }
    .zb-card.is-lead .zb-card__tags a:hover { background: var(--zl-orange); }
    .zb-card.is-lead .zb-card__cat { background: var(--zl-orange); color: #fff; }
}

/* Destacados: principal grande + resto en columna */
@media (min-width: 1100px) {
    .zb-grid--feature { grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); }
    .zb-grid--feature > .zb-card.is-lead { grid-column: auto; grid-row: span 2; grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
    .zb-grid--feature > .zb-card.is-lead .zb-card__media { min-height: 0; aspect-ratio: 16 / 8.5; }
    .zb-grid--feature > .zb-card.is-lead .zb-card__body { justify-content: flex-start; }
    .zb-grid--feature > .zb-card.is-lead:only-child { grid-column: 1 / -1; grid-row: auto; grid-template-columns: 1.25fr 1fr; grid-template-rows: auto; }
    .zb-grid--feature > .zb-card.is-lead:only-child .zb-card__media { aspect-ratio: auto; min-height: 420px; }
}

/* Índice: columna + barra lateral */
.zb-layout { display: grid; gap: 40px; }
@media (min-width: 1024px) {
    .zb-layout { grid-template-columns: minmax(0, 1fr) 360px; gap: 56px; align-items: start; }
    .zb-side { position: sticky; top: 100px; }
}
.zb-side { display: flex; flex-direction: column; gap: 14px; }
.zb-box { padding: 28px; border-radius: 32px; background: var(--zl-soft); }
.zb-box h3 { margin: 0 0 18px; font-size: 22px; line-height: 1.1; letter-spacing: -.025em; font-weight: 600; }
.zb-box--navy { background: var(--zl-ink); color: #fff; }
.zb-box--navy p { margin: 0 0 18px; color: #C9CBE6; font-size: 16px; }
.zb-box--peach { background: var(--zl-peach); }
.zb-news { display: flex; flex-direction: column; gap: 10px; }
.zb-news input { width: 100%; min-height: 54px; padding: 15px 20px; border: 1.5px solid transparent; border-radius: 999px; background: #fff; color: var(--zl-ink); font: 400 16px/1.3 inherit; transition: border-color .25s, box-shadow .25s; }
.zb-news input:focus { outline: none; border-color: var(--zl-orange); box-shadow: 0 0 0 4px rgba(198, 65, 6, .25); }
.zb-news input.border-red-500 { border-color: #F97066; }
.zb-news .zl-btn { width: 100%; background: var(--zl-orange); border-color: var(--zl-orange); color: #fff; }
.zb-news .zl-btn::before { background: #fff; }
.zb-news .zl-btn:hover { color: var(--zl-ink); border-color: #fff; }
.zb-alert { margin: 0 0 14px; padding: 14px 18px; border-radius: 16px; font-size: 15px; }
.zb-alert--ok { background: #E7F6EC; color: #14532D; }
.zb-alert--error { background: #FDECEA; color: #8A1C12; }

/* Paginación */
.zb-pager { margin-top: 40px; }
.zb-pager nav span[aria-current] > span, .zb-pager nav a, .zb-pager nav span > span { border-radius: 999px !important; }
.zb-pager nav .shadow-sm { box-shadow: none; }
.zb-pager nav a:hover { color: var(--zl-orange); }
.zb-pager nav span[aria-current] > span { background: var(--zl-ink); color: #fff; border-color: var(--zl-ink); }
.zb-pager nav .relative.z-0 { gap: 6px; }

.zb-empty { padding: 40px; border-radius: 32px; background: var(--zl-soft); color: var(--zl-muted); }

/* Barra de progreso de lectura */
.zb-progress { position: fixed; top: 76px; left: 0; right: 0; z-index: 40; height: 3px; background: transparent; pointer-events: none; transition: top .4s var(--zl-ease); }
body:has(.zn-nav.is-scrolled) .zb-progress { top: 64px; }
.zb-progress span { display: block; width: 100%; height: 100%; background: linear-gradient(90deg, var(--zl-orange), #F0773A); transform-origin: 0 50%; transform: scaleX(0); border-radius: 0 3px 3px 0; }

/* Artículo */
.zb-post__head { max-width: 1080px; }
.zb .zb-post__head .blog-title { margin: 20px 0 0; font-family: inherit; font-size: clamp(38px, 5.8vw, 88px); line-height: .96; letter-spacing: -.05em; font-weight: 600; color: var(--zl-ink); text-wrap: balance; animation: zl-rise 1.1s var(--zl-ease) both; }
.zb .zb-post__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 28px; font-family: inherit; font-size: 15px; color: var(--zl-muted); }
.zb-post__meta > span[aria-hidden], .zb-post__meta .zb-dot { color: var(--zl-orange); }
.zb-pill { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: var(--zl-soft); color: var(--zl-ink); font-weight: 500; }
.zb-pill i { color: var(--zl-orange); }
.zb-pill--peach { background: var(--zl-peach); }
.zb-post__cover { margin: clamp(32px, 4vw, 56px) 0 0; border-radius: 36px; overflow: hidden; background: var(--zl-soft); }
.zb-post__cover img { display: block; width: 100%; height: auto; max-height: 680px; object-fit: cover; border-radius: 0 !important; box-shadow: none !important; }
.zb-post__layout { display: grid; gap: 40px; margin-top: clamp(40px, 5vw, 72px); }
.zb-post__main { min-width: 0; }
@media (min-width: 1100px) {
    .zb-post__layout { grid-template-columns: minmax(0, 1fr) 320px; gap: 72px; align-items: start; }
    .zb-post__aside { position: sticky; top: 104px; }
}
.zb-post__aside { display: flex; flex-direction: column; gap: 14px; }
.zb-share { display: flex; flex-direction: column; gap: 10px; }
.zb-share .zl-btn { width: 100%; justify-content: flex-start; min-height: 52px; padding: 14px 22px; font-size: 15px; }
.zb-share .zl-btn svg, .zb-share .zl-btn .bi { width: 18px; height: 18px; font-size: 18px; flex: none; }
.zb-box--peach .zl-btn { background: #fff; border-color: #fff; }
.zb-box--peach .zl-btn:hover { border-color: var(--zl-orange); }

.zb-post__author { margin-top: 48px; padding: 24px 28px; border-radius: 28px; background: var(--zl-soft); max-width: var(--zb-measure); }
.zb .zb-post__author .blog-meta { margin: 0; font-family: inherit; font-size: 16px; color: var(--zl-muted); }
.zb .zb-post__author .blog-meta:first-child { font-size: 18px; color: var(--zl-ink); }
.zb-post__tags { margin-top: 40px; max-width: var(--zb-measure); }
.zb .zb-post__tags .blog-title { margin: 0 0 14px; font-family: inherit; font-size: 15px; font-weight: 500; letter-spacing: 0; color: var(--zl-muted); }
.zb .blog-tags a { font-family: inherit; }

.zb-end { margin-top: clamp(64px, 8vw, 110px); }
.zb-end__band { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; padding: clamp(28px, 5vw, 56px); border-radius: 40px; background: var(--zl-peach); }
.zb-end__band h2 { margin: 0; font-size: clamp(30px, 4vw, 56px); line-height: 1; letter-spacing: -.045em; font-weight: 600; }
.zb .zb-related .blog-title { font-family: inherit; }

/* Cuerpo del artículo (HTML de la base de datos) */
.zb .blog-content { max-width: var(--zb-measure); font-family: 'Familjen Grotesk', 'Helvetica Neue', Arial, sans-serif; font-size: clamp(18px, 1.25vw, 20px); line-height: 1.72; color: var(--zl-copy); overflow-wrap: break-word; }
.zb .blog-content > :first-child { margin-top: 0; }
.zb .blog-content p { margin: 0 0 1.35em; }
.zb .blog-content > p:first-of-type { font-size: 1.12em; line-height: 1.6; color: var(--zl-ink); }
.zb .blog-content strong, .zb .blog-content b { color: var(--zl-ink); font-weight: 600; }
.zb .blog-content h2 { margin: 2.4em 0 .7em; font-family: inherit; font-size: clamp(30px, 3vw, 42px); line-height: 1.05; letter-spacing: -.04em; font-weight: 600; color: var(--zl-ink); text-wrap: balance; scroll-margin-top: 110px; }
.zb .blog-content h2::before { content: ""; display: block; width: 44px; height: 4px; margin-bottom: 22px; border-radius: 4px; background: var(--zl-orange); }
.zb .blog-content h3 { margin: 1.9em 0 .55em; font-family: inherit; font-size: clamp(22px, 2vw, 27px); line-height: 1.15; letter-spacing: -.025em; font-weight: 600; color: var(--zl-ink); scroll-margin-top: 110px; }
.zb .blog-content h4 { margin: 1.6em 0 .5em; font-size: 1.05em; font-weight: 600; color: var(--zl-ink); }
.zb .blog-content ul, .zb .blog-content ol { margin: 0 0 1.5em; padding-left: 0; list-style: none; }
.zb .blog-content li { position: relative; margin: 0 0 .6em; padding-left: 1.6em; }
.zb .blog-content ul > li::before { content: ""; position: absolute; left: .3em; top: .68em; width: 7px; height: 7px; border-radius: 50%; background: var(--zl-orange); }
.zb .blog-content ol { counter-reset: zb-ol; }
.zb .blog-content ol > li { counter-increment: zb-ol; padding-left: 2.2em; }
.zb .blog-content ol > li::before { content: counter(zb-ol); position: absolute; left: 0; top: .15em; width: 1.6em; height: 1.6em; border-radius: 50%; background: var(--zl-peach); color: var(--zl-orange); font-size: .78em; font-weight: 600; line-height: 1.6em; text-align: center; }
.zb .blog-content li > ul, .zb .blog-content li > ol { margin: .6em 0 0; }
.zb .blog-content a { color: var(--zl-orange); font-weight: 500; text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 4px; text-decoration-color: rgba(198, 65, 6, .35); transition: text-decoration-color .3s, color .3s; }
.zb .blog-content a:hover { color: #A83505; text-decoration-color: currentColor; }
.zb .blog-content blockquote { position: relative; margin: 2em 0; padding: clamp(28px, 4vw, 44px) clamp(24px, 4vw, 44px) clamp(24px, 3vw, 36px) clamp(64px, 8vw, 96px); border: 0; border-radius: 32px; background: var(--zl-peach); font-size: 1.15em; font-style: italic; line-height: 1.5; letter-spacing: -.01em; color: var(--zl-ink); }
.zb .blog-content blockquote::before { content: "\201C"; position: absolute; left: clamp(16px, 2.5vw, 30px); top: clamp(4px, 1vw, 12px); font-size: clamp(80px, 10vw, 128px); font-style: normal; font-weight: 600; line-height: 1; color: var(--zl-orange); }
.zb .blog-content blockquote p:last-child { margin-bottom: 0; }
.zb .blog-content img { display: block; max-width: 100%; height: auto; margin: 2em 0; border-radius: 28px; }
.zb .blog-content figure { margin: 2em 0; }
.zb .blog-content figure img { margin: 0; }
.zb .blog-content figcaption { margin-top: 10px; font-size: 14px; color: var(--zl-muted); }
.zb .blog-content hr { margin: 3em 0; border: 0; height: 1px; background: var(--zl-line); }
.zb .blog-content iframe, .zb .blog-content video { max-width: 100%; border-radius: 24px; }
.zb .blog-content code { padding: 2px 6px; border-radius: 6px; background: var(--zl-soft); font-size: .88em; }
.zb .blog-content table { width: 100%; margin: 2em 0; border-collapse: separate; border-spacing: 0; border: 1px solid var(--zl-line); border-radius: 20px; overflow: hidden; font-size: 16px; line-height: 1.45; }
.zb .blog-content th, .zb .blog-content td { padding: 14px 18px; border: 0; border-bottom: 1px solid var(--zl-line); text-align: left; vertical-align: top; }
.zb .blog-content tr:last-child td { border-bottom: 0; }
.zb .blog-content th { background: var(--zl-ink); color: #fff; font-weight: 600; }
.zb .blog-content tbody tr:nth-child(even) td { background: var(--zl-soft); }
@media (max-width: 760px) {
    .zb .blog-content table { display: block; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .zb .blog-content th, .zb .blog-content td { min-width: 170px; }
}

/* Página estática (tipos de GPS): la cabecera vive dentro de .blog-content */
.zb .blog-content.zb-static { max-width: 900px; }
.zb .blog-content.zb-static > header { margin-bottom: clamp(32px, 4vw, 56px); }
.zb .blog-content.zb-static .blog-title { margin: 20px 0 0; font-family: inherit; font-size: clamp(48px, 8vw, 120px); line-height: .92; letter-spacing: -.05em; font-weight: 600; color: var(--zl-ink); animation: zl-rise 1.1s var(--zl-ease) both; }
.zb .blog-content.zb-static .blog-meta { display: inline-flex; margin: 24px 0 0; padding: 8px 16px; border-radius: 999px; background: var(--zl-peach); font-family: inherit; font-size: 15px; color: var(--zl-ink); }
.zb .blog-content.zb-static > p, .zb .blog-content.zb-static > ul, .zb .blog-content.zb-static > h2 { max-width: var(--zb-measure); }

@media (max-width: 640px) {
    .zb-card { border-radius: 26px; }
    .zb-card__media { border-radius: 20px; }
    .zb-card__body { padding: 18px 20px 22px; }
    .zb-box { padding: 22px; border-radius: 26px; }
    .zb-post__cover { border-radius: 26px; }
    .zb .blog-content blockquote { padding-left: 24px; padding-top: 64px; }
}

@media (prefers-reduced-motion: reduce) {
    .zb *, .zb *::before, .zb *::after { animation: none !important; transition: none !important; }
    .zb-card:hover, .zb-chip:hover { transform: none; }
    .zb-card:hover .zb-card__media img { transform: none; }
    .zb-progress { transition: none; }
}

/* Revisión 21/10: el bloque final no hereda el estilo de enlace del artículo */
.zb .blog-content .zb-end .zl-btn { color: #fff; text-decoration: none; font-weight: 600; }
.zb .blog-content .zb-end .zl-btn:hover { color: #fff; }
.zb-empty { padding: 48px; border-radius: 32px; background: var(--zl-soft); text-align: center; }
.zb-empty p { margin: 0 0 20px; font-size: 19px; color: var(--zl-muted); }

/* Señuelo anti-bots del newsletter: invisible para las personas */
.zb-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
