/* Blog de Reelmente: hereda tokens de reelmente.css.
   Idea: el blog es un feed. Portadas verticales como un reel, barras de historia (una por sección) y duración. */

/* ─── Portadas ─── */
.cover { position: relative; overflow: hidden; border-radius: 16px; aspect-ratio: 4 / 5; padding: 16px 18px 20px; display: flex; flex-direction: column; isolation: isolate; }
.cover-segs { display: flex; gap: 4px; }
.cover-segs i { flex: 1; height: 3px; border-radius: 2px; background: currentColor; opacity: .3; }
.cover-segs i:first-child { opacity: 1; }
.cover-dur { position: absolute; top: 30px; right: 16px; font-size: 12px; font-weight: 700; line-height: 1; padding: 6px 8px; border-radius: 6px; background: rgba(28,26,46,.55); color: #fff; }
.cover-num { margin-top: auto; margin-left: -.04em; font-size: clamp(60px, 6.4vw, 96px); font-weight: 800; letter-spacing: -0.05em; line-height: .88; font-variation-settings: "opsz" 96; overflow-wrap: anywhere; }
.cover-txt { margin-top: 12px; font-size: 15px; line-height: 1.3; max-width: 22ch; }
/* variantes: número arriba (lines) o en contorno (rings) */
.cover-lines .cover-num { margin-top: 34px; } .cover-lines .cover-txt { margin-top: auto; }
.cover-rings .cover-num { color: transparent !important; -webkit-text-stroke: 2px currentColor; }
.tono-tinta { background: var(--tinta); color: #fff; } .tono-tinta .cover-num { color: var(--reel); } .tono-tinta.cover-rings .cover-num { -webkit-text-stroke-color: var(--reel); }
.tono-reel { background: var(--reel); color: var(--tinta); } .tono-reel .cover-dur { background: var(--tinta); }
.tono-velo { background: var(--velo); color: var(--tinta); } .tono-velo .cover-num { color: var(--reel-oscuro); } .tono-velo.cover-rings .cover-num { -webkit-text-stroke-color: var(--reel-oscuro); }
.cover-grande { padding: 20px 22px 26px; }
.cover-grande .cover-num { font-size: clamp(84px, 8vw, 128px); }
.cover-grande .cover-txt { font-size: 18px; }
.cover-grande .cover-dur { top: 36px; right: 20px; font-size: 13px; }

/* ─── Índice del blog ─── */
.blog-cab { max-width: none !important; padding: 72px 40px 48px !important; }
.blog-cab-int { max-width: var(--ancho); margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 72px; align-items: end; }
.blog-cab h1 { font-size: clamp(44px, 6vw, 86px); max-width: 13ch; line-height: .98; }
.blog-cab .intro { max-width: 52ch; margin-top: 22px; }
.ultimo { display: grid; gap: 6px; margin-top: 40px; padding-top: 18px; border-top: 2px solid var(--tinta); max-width: 560px; text-decoration: none; color: inherit; }
.ultimo-l { font-size: 15px; font-weight: 700; color: var(--reel-oscuro); }
.ultimo strong { font-size: 26px; line-height: 1.15; letter-spacing: -0.015em; }
.ultimo:hover strong { color: var(--reel-oscuro); }
.blog-cab-cover { display: block; transform: rotate(2.5deg); transition: transform .3s ease; box-shadow: 0 30px 60px rgba(28,26,46,.18); border-radius: 16px; }
.blog-cab-cover:hover { transform: rotate(0); }
.pestanas { max-width: none !important; padding: 0 40px !important; border-bottom: 1px solid #e6e4f0; }
.pestanas-int { max-width: var(--ancho); margin: 0 auto; display: flex; gap: 30px; overflow-x: auto; scrollbar-width: none; }
.tab { font: inherit; font-weight: 600; font-size: 16px; color: var(--humo); background: none; border: 0; border-bottom: 3px solid transparent; padding: 16px 0 13px; margin-bottom: -1px; cursor: pointer; white-space: nowrap; }
.tab span { font-size: 13px; margin-left: 6px; color: #a9a6b8; font-variant-numeric: tabular-nums; }
.tab:hover { color: var(--tinta); }
.tab.activo { color: var(--tinta); border-bottom-color: var(--reel); }
.tab:focus-visible { outline: 2px solid var(--reel); outline-offset: 4px; }
.blog-lista { padding-top: 40px !important; }
.grid-posts { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 40px 22px; }
.card-post a { display: grid; gap: 8px; text-decoration: none; color: inherit; }
.card-post .cover { margin-bottom: 6px; transition: transform .2s ease; }
.card-post a:hover .cover { transform: translateY(-4px); }
.card-post a:hover strong { color: var(--reel-oscuro); }
.card-post strong { font-size: 19px; letter-spacing: -0.01em; line-height: 1.22; }
.card-meta { font-size: 14px; color: var(--humo); }
.card-post[hidden] { display: none; }
.blog-teaser .grid-posts-3 { margin-top: 40px; }

/* ─── Artículo ─── */
.post { max-width: none !important; padding: 0 !important; position: relative; }
.post-cab { padding: 56px 40px 40px; }
.post-cab-int { max-width: 1120px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 64px; align-items: center; }
.post-ruta { font-size: 15px; font-weight: 600; color: var(--humo); }
.post-ruta a { color: var(--reel-oscuro); text-decoration: none; } .post-ruta a:hover { text-decoration: underline; }
.post-cab h1 { font-size: clamp(36px, 4.6vw, 60px); max-width: 20ch; margin-top: 16px; line-height: 1.02; }
.post-desc { font-size: 20px; color: var(--humo); margin-top: 18px; max-width: 60ch; line-height: 1.45; }
.post-autor { margin-top: 24px; font-size: 15px; color: var(--humo); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.post-autor strong { color: var(--tinta); }
.autor-r.mini { width: 32px; height: 32px; border-radius: 10px; font-size: 22px; line-height: 28px; padding-right: 5px; }
.autor-r.mini i { width: 6px; height: 6px; right: 6px; bottom: 7px; }
.post-portada .cover { box-shadow: 0 24px 50px rgba(28,26,46,.16); }
.post-progreso { position: sticky; top: 80px; z-index: 4; background: rgba(255,255,255,.94); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); padding: 12px 40px; border-bottom: 1px solid #f0eef7; }
.post-progreso-int { max-width: 1120px; margin: 0 auto; display: flex; gap: 5px; }
.post-progreso i { flex: 1; height: 4px; border-radius: 2px; background: #e6e4f0; position: relative; overflow: hidden; }
.post-progreso i::after { content: ""; position: absolute; inset: 0; background: var(--reel); transform: scaleX(var(--f, 0)); transform-origin: left; }
.post-cuerpo { max-width: 1120px; margin: 48px auto 80px; padding: 0 40px; display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 56px; align-items: start; }
.post-lateral { position: sticky; top: 140px; display: grid; gap: 18px; }
.toc { font-size: 15px; }
.toc strong { font-size: 15px; color: var(--tinta); }
.toc ol { list-style: none; margin: 12px 0 0; padding: 0; counter-reset: sec; }
.toc li { counter-increment: sec; display: grid; grid-template-columns: 22px minmax(0, 1fr); margin-top: 10px; line-height: 1.35; }
.toc li::before { content: counter(sec); font-weight: 700; color: #b8b5c6; font-variant-numeric: tabular-nums; }
.toc a { text-decoration: none; color: var(--humo); } .toc a:hover { color: var(--tinta); }
.toc li.visto::before { color: var(--tinta); }
.toc li.actual::before { color: var(--reel); } .toc li.actual a { color: var(--tinta); font-weight: 700; }
.post-lateral .btn { justify-self: start; font-size: 16px; padding: 13px 20px; }
.caja-sin-filtro strong { color: var(--reel-oscuro); }

.post-texto { max-width: 720px; }
.post h2 { font-size: clamp(26px, 3vw, 34px); max-width: none; margin-top: 48px; }
.post h2:first-child { margin-top: 0; }
.post h3 { font-size: 22px; margin-top: 28px; }
.post p, .post li { margin-top: 14px; font-size: 18px; line-height: 1.6; max-width: 70ch; }
.post-texto > p:first-child { font-size: 20px; }
.post ul, .post ol { padding-left: 22px; }
.post-texto a { color: var(--reel-oscuro); }
.caja { margin: 26px 0; padding: 18px 22px; border-left: 4px solid var(--reel); background: #fff5f9; border-radius: 0 14px 14px 0; font-size: 17px; line-height: 1.55; }
.caja-nota, .caja-ejemplo { border-left-color: var(--tinta); background: var(--velo); }
.tabla { overflow-x: auto; margin: 22px 0; }
.post table { border-collapse: collapse; width: 100%; font-size: 16px; }
.post th, .post td { text-align: left; padding: 10px 12px; border-bottom: 1px solid #e6e4f0; vertical-align: top; }
.post th { font-size: 13px; letter-spacing: .04em; text-transform: uppercase; color: var(--humo); }
.post td:first-child { font-weight: 600; }
.faq { margin-top: 18px; } .faq h3 { font-size: 20px; } .faq p { margin-top: 8px; }
.fuentes { margin-top: 40px; font-size: 15px; } .fuentes h2 { font-size: 20px; } .fuentes li { font-size: 15px; margin-top: 6px; }
.cta-blog { margin: 56px 0 0; padding: 32px; background: var(--tinta); color: #fff; border-radius: 22px; }
.cta-blog h2 { color: #fff; margin-top: 0; } .cta-blog p { color: rgba(255,255,255,.8); }
.cta-botones { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px !important; }
.cta-blog .btn-primario, .post-texto .cta-blog .btn-primario { color: #fff; }
.cta-blog .btn-primario:hover { background: #fff; color: var(--tinta); }
.cta-blog .btn-secundario, .post-texto .cta-blog .btn-secundario { border-color: #fff; color: #fff; }
.cta-blog .btn-secundario:hover { background: #fff; color: var(--tinta); }
.autor { display: flex; gap: 18px; align-items: flex-start; margin-top: 40px; padding-top: 24px; border-top: 1px solid #e6e4f0; font-size: 16px; color: var(--humo); }
.autor strong { color: var(--tinta); font-size: 18px; }
.autor-r { flex: none; width: 56px; height: 56px; border-radius: 16px; background: var(--tinta); color: #fff; font-weight: 800; font-size: 40px; line-height: 50px; text-align: center; position: relative; letter-spacing: -0.06em; padding-right: 8px; display: inline-block; }
.autor-r i { position: absolute; width: 10px; height: 10px; border-radius: 50%; background: var(--reel); right: 10px; bottom: 12px; }
.relacionados { margin-top: 48px; } .relacionados h2 { font-size: 26px; }
.relacionados ul { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 12px; }
.relacionados a { display: grid; gap: 4px; padding: 16px 18px; border: 2px solid #e6e4f0; border-radius: 14px; text-decoration: none; color: inherit; }
.relacionados a:hover { border-color: var(--tinta); } .relacionados span { font-size: 15px; color: var(--humo); }


@media (prefers-reduced-motion: reduce) { .blog-cab-cover, .card-post .cover { transition: none; } .blog-cab-cover { transform: none; } }
@media (max-width: 1100px) { .grid-posts { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 960px) {
  .blog-cab { padding: 40px 20px 32px !important; } .blog-cab-int { grid-template-columns: 1fr; gap: 32px; }
  .blog-cab-cover { width: min(260px, 70%); transform: rotate(2deg); }
  .pestanas { padding: 0 20px !important; } .pestanas-int { gap: 22px; } .blog-lista { padding: 28px 20px !important; }
  .grid-posts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 14px; }
  .card-post strong { font-size: 16px; } .card-meta { font-size: 13px; }
  .cover { padding: 12px 12px 14px; border-radius: 12px; } .cover-num { font-size: clamp(44px, 13vw, 64px); } .cover-txt { font-size: 13px; } .cover-dur { top: 24px; right: 12px; font-size: 11px; padding: 5px 6px; }
  .cover-grande .cover-num { font-size: 64px; } .cover-grande .cover-txt { font-size: 15px; }
  .blog-teaser .grid-posts-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 14px; }
  .post-cab { padding: 28px 20px 24px; } .post-cab-int { grid-template-columns: 1fr; gap: 28px; } .post-portada { width: min(220px, 60%); }
  .post-progreso { top: 64px; padding: 10px 20px; }
  .post-cuerpo { grid-template-columns: 1fr; gap: 28px; padding: 0 20px; margin-top: 28px; }
  .post-lateral { position: static; } .toc { padding: 18px 20px; background: var(--velo); border-radius: 14px; }
}
