/* Blog: listado (tarjetas, categorías, paginación) y artículo (lectura cómoda, compartir, autor). */

/* ---------- Listado ---------- */
.blog-hero { min-height: min(62svh, 600px); }
.blog-hero .wrap { grid-template-columns: 1fr; }
.blog-hero h1 { font-size: clamp(3rem, 8.4vw, 7.2rem); }
.blog-hero .sub { max-width: 34ch; }

.cats { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px; }
.cats a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line-strong); text-decoration: none; font-weight: 500; font-size: 0.94rem; transition: transform var(--m-out) var(--ease), background-color var(--m-out) var(--ease), border-color var(--m-out) var(--ease), color var(--m-out) var(--ease); }
.cats a small { font-size: 0.78rem; color: var(--muted); }
.cats a[aria-current] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.cats a[aria-current] small { color: var(--line-strong); }
.cats a:active { transform: scale(.975); }
@media (hover: hover) and (pointer: fine) { .cats a:hover { border-color: var(--ink); } }

.posts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 36px 20px; }
.post-card { min-width: 0; display: grid; gap: 12px; align-content: start; text-decoration: none; color: inherit; }
.post-card--big { grid-column: 1 / -1; grid-template-columns: 1.25fr 1fr; grid-template-rows: auto auto auto 1fr; column-gap: clamp(24px, 4vw, 56px); align-items: start; }
.post-card--big .frame { grid-row: 1 / span 5; aspect-ratio: 16 / 10; }
.post-card .frame { aspect-ratio: 4 / 3; border-radius: 22px; }
.post-card .frame img { width: 100%; height: 100%; object-fit: cover; }
.post-card__ph { position: absolute; inset: 0; display: grid; place-items: end start; padding: 22px; color: #F7F0E6; font-family: var(--f-display); font-size: clamp(1.4rem, 2.4vw, 2rem); letter-spacing: -0.03em; background: url("../img/fondo-800.webp") center / cover; }
.post-card__meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.post-card__meta span:first-child { color: var(--accent-text); }
.post-card h3 { font-size: clamp(1.25rem, 1.9vw, 1.55rem); line-height: 1.12; }
.post-card--big h3 { font-size: clamp(1.8rem, 3.4vw, 3rem); letter-spacing: -0.04em; }
.post-card p { color: var(--muted); font-size: 0.98rem; }
.post-card .more { font-weight: 700; color: var(--accent-text); display: inline-flex; gap: 8px; }
@media (hover: hover) and (pointer: fine) { .post-card:hover .frame img { transform: scale(1.03); transition-duration: 600ms; } }

.blog-empty { display: grid; gap: 18px; justify-items: start; padding: clamp(28px, 5vw, 56px); border-radius: 26px; background: var(--surface); border: 1px solid var(--line); }
.blog-empty h2 { font-size: clamp(1.8rem, 3.4vw, 2.8rem); }

.pagination { margin-top: 48px; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pagination .page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-strong); text-decoration: none; font-weight: 500; }
.pagination .page-numbers.current { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.pagination .dots { border: 0; }

/* ---------- Artículo ---------- */
.read-progress { position: fixed; left: 0; right: 0; top: calc(var(--nav-h) + env(safe-area-inset-top, 0px)); height: 3px; z-index: 19; pointer-events: none; }
.read-progress i { display: block; height: 100%; background: var(--grad); transform-origin: left; transform: scaleX(0); }
.admin-bar .read-progress { top: calc(var(--nav-h) + 32px); }

.post-narrow { max-width: calc(760px + 64px); }
.post-head { padding-block: clamp(40px, 7vh, 88px) clamp(28px, 4vh, 44px); }
.post-head .wrap { display: grid; gap: 18px; justify-items: start; }
.post-head .label { text-decoration: none; }
.post-head h1 { font-size: clamp(2.3rem, 5.4vw, 4.2rem); letter-spacing: -0.045em; line-height: 1; }
.post-lead { font-size: clamp(1.1rem, 1.6vw, 1.3rem); color: var(--muted); line-height: 1.5; }
.post-meta { display: flex; align-items: center; gap: 12px; font-size: 0.92rem; color: var(--muted); }
.post-meta img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.post-meta b { color: var(--ink); font-weight: 500; }
.post-cover { max-width: 1160px; margin-bottom: clamp(36px, 5vw, 64px); }
.post-cover .frame { border-radius: 26px; aspect-ratio: 16 / 9; }
.post-cover img { width: 100%; height: 100%; object-fit: cover; }

/* Texto del artículo: medida y ritmo pensados para leer */
.prose { font-size: 1.1rem; line-height: 1.75; color: var(--ink); }
.prose > * + * { margin-top: 1.2em; }
.prose p, .prose ul, .prose ol { margin-bottom: 0; }
.prose h2 { font-size: clamp(1.6rem, 2.8vw, 2.2rem); line-height: 1.12; margin-top: 2em; }
.prose h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); line-height: 1.2; margin-top: 1.6em; }
.prose a { color: var(--accent-text); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.prose strong { font-weight: 700; }
.prose ul, .prose ol { padding-left: 1.3em; display: grid; gap: 0.45em; }
.prose li::marker { color: var(--accent); }
.prose blockquote { margin: 2em 0; padding: 4px 0 4px 24px; border-left: 3px solid var(--accent); font-family: var(--f-display); font-size: clamp(1.3rem, 2.2vw, 1.7rem); line-height: 1.3; letter-spacing: -0.02em; }
.prose blockquote p { margin: 0; }
.prose blockquote cite { display: block; margin-top: 10px; font-family: var(--f-body); font-size: 0.9rem; font-style: normal; color: var(--muted); }
.prose figure { margin: 2em 0; }
.prose img { width: 100%; height: auto; border-radius: 20px; }
.prose figcaption { margin-top: 10px; font-size: 0.88rem; color: var(--muted); text-align: center; }
.prose .wp-block-gallery.has-nested-images { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px !important; }
.prose .wp-block-gallery.has-nested-images figure.wp-block-image { width: auto !important; margin: 0 !important; }
.prose hr { border: 0; height: 1px; background: var(--line); margin: 2.4em 0; }
.prose code { font-size: 0.92em; padding: 2px 6px; border-radius: 6px; background: var(--accent-soft); }
.prose table { width: 100%; border-collapse: collapse; font-size: 0.96rem; }
.prose th, .prose td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; }
.prose .wp-block-buttons { display: flex; flex-wrap: wrap; gap: 12px; }
.prose .wp-block-button__link { display: inline-flex; align-items: center; min-height: 50px; padding: 0 26px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); text-decoration: none; font-weight: 700; }

.post-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 40px; }
.post-tags a { font-size: 0.88rem; padding: 6px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--muted); }

.share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--line); }
.share span { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin-right: 6px; }
.share a, .share button { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line-strong); background: transparent; color: var(--ink); text-decoration: none; font: 500 0.9rem var(--f-body); cursor: pointer; transition: transform var(--m-out) var(--ease), border-color var(--m-out) var(--ease); }
.share a:active, .share button:active { transform: scale(.975); }
@media (hover: hover) and (pointer: fine) { .share a:hover, .share button:hover { border-color: var(--ink); } }

.author { display: grid; grid-template-columns: auto 1fr; gap: 20px; align-items: center; margin-top: 40px; margin-bottom: clamp(64px, 10vh, 120px); padding: 24px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); }
.author img { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; }
.author div { display: grid; gap: 6px; }
.author p { color: var(--muted); font-size: 0.96rem; }
.author .link { color: var(--accent-text); font-weight: 700; justify-self: start; }

.related { padding-top: 0; }
.posts--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

@media (max-width: 1023px) {
  .posts, .posts--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .post-card--big { grid-template-columns: 1fr; }
  .post-card--big .frame { grid-row: auto; }
}
@media (max-width: 760px) {
  .posts, .posts--3 { grid-template-columns: 1fr; }
  .prose { font-size: 1.02rem; line-height: 1.7; }
  .post-lead { font-size: 1.02rem; }
  .author { grid-template-columns: 1fr; text-align: left; }
  .author img { width: 72px; height: 72px; }
  .post-cover .frame { border-radius: 18px; }
}
@media (prefers-reduced-motion: reduce) { .read-progress { display: none; } }
