/* CHK blog — Papel de revista (Design 2026-09-08). No lima. */
@import url("https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,700;0,9..40,800;1,9..40,400&display=swap");

:root {
  --chk-papel: #f3f3f1;
  --chk-azul: #2500ff;
  --chk-ink: #111111;
}

/* —— Índice /blog/ —— */
body.blog,
body.blog .wp-site-blocks {
  background: var(--chk-papel);
  color: var(--chk-ink);
}

body.blog {
  font-family: "DM Sans", system-ui, -apple-system, sans-serif;
}

body.blog .wp-block-heading,
body.blog .wp-block-post-title,
body.blog h1,
body.blog h2,
body.blog h3 {
  font-family: "DM Sans", system-ui, sans-serif;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.02;
  color: var(--chk-ink);
}

/* Header de página: primer H2 del contenido (título Blog) */
body.blog .entry-content > .wp-block-heading:first-of-type,
body.blog main .wp-block-heading:first-of-type {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 0.35em;
  max-width: 28ch;
}

body.blog .wp-block-query {
  margin-top: 1.5rem;
}

/* Rejilla: 1 col → 2 → 3 */
body.blog .wp-block-post-template.is-layout-grid,
body.blog .wp-block-post-template.columns-2 {
  grid-template-columns: 1fr !important;
  gap: 1.75rem 1.5rem !important;
}

@media (min-width: 700px) {
  body.blog .wp-block-post-template.is-layout-grid,
  body.blog .wp-block-post-template.columns-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (min-width: 1100px) {
  body.blog .wp-block-post-template.is-layout-grid,
  body.blog .wp-block-post-template.columns-2 {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

/* Featured: primera card a ancho completo */
body.blog .wp-block-post-template > .wp-block-post:first-child {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  padding-bottom: 1.5rem;
  margin-bottom: 0.5rem;
  border-bottom: 1px solid color-mix(in srgb, var(--chk-ink) 12%, transparent);
}

@media (min-width: 900px) {
  body.blog .wp-block-post-template > .wp-block-post:first-child {
    grid-template-columns: 1.35fr 1fr;
    align-items: end;
  }
}

body.blog .wp-block-post-template > .wp-block-post:first-child .wp-block-post-title {
  font-size: clamp(1.75rem, 3.2vw, 2.6rem);
  margin: 0.35rem 0 0.5rem;
}

body.blog .wp-block-post-template > .wp-block-post:first-child .wp-block-post-excerpt {
  font-size: 1.05rem;
  line-height: 1.6;
  max-width: 52ch;
}

body.blog .wp-block-post {
  list-style: none;
}

body.blog .wp-block-post-featured-image {
  margin: 0;
  overflow: hidden;
  border-radius: 0;
  aspect-ratio: 16 / 10;
  background: color-mix(in srgb, var(--chk-ink) 6%, var(--chk-papel));
}

body.blog .wp-block-post-featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

body.blog .wp-block-post:hover .wp-block-post-featured-image img {
  transform: scale(1.03);
}

body.blog .wp-block-post-template > .wp-block-post:first-child .wp-block-post-featured-image {
  aspect-ratio: 16 / 9;
}

body.blog .wp-block-post-title {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.15;
  margin: 0.65rem 0 0.35rem;
}

body.blog .wp-block-post-title a {
  color: var(--chk-ink);
  text-decoration: none;
}

body.blog .wp-block-post-title a:hover {
  color: var(--chk-azul);
  text-decoration: none;
}

body.blog .wp-block-post-excerpt {
  font-size: 0.95rem;
  line-height: 1.55;
  color: color-mix(in srgb, var(--chk-ink) 82%, transparent);
  margin: 0;
}

body.blog .wp-block-post-excerpt a,
body.blog .wp-block-post-date,
body.blog .wp-block-post-terms,
body.blog .wp-block-post-author-name {
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  opacity: 0.8;
  color: var(--chk-ink);
  text-decoration: none;
}

body.blog .wp-block-query-pagination a {
  color: var(--chk-azul);
  font-weight: 700;
  text-decoration: none;
}

/* CTA azul/papel cuadrado (si aparece botón en blog) */
body.blog .wp-element-button,
body.blog .wp-block-button__link,
body.single-post .wp-element-button,
body.single-post .wp-block-button__link {
  background: var(--chk-azul) !important;
  color: var(--chk-papel) !important;
  border-radius: 0 !important;
  font-family: "DM Sans", system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  box-shadow: none !important;
}

body.blog .wp-element-button:hover,
body.blog .wp-block-button__link:hover,
body.single-post .wp-element-button:hover,
body.single-post .wp-block-button__link:hover {
  background: var(--chk-ink) !important;
  color: var(--chk-papel) !important;
}

/* —— Single post —— */
body.single-post,
body.single-post .wp-site-blocks {
  background: var(--chk-papel);
  color: var(--chk-ink);
}

body.single-post {
  font-family: "DM Sans", system-ui, -apple-system, sans-serif;
}

body.single-post .wp-block-post-title {
  font-family: "DM Sans", system-ui, sans-serif;
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.0;
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  max-width: 18ch;
  color: var(--chk-ink);
}

body.single-post .wp-block-post-date,
body.single-post .wp-block-post-terms,
body.single-post .wp-block-post-author-name {
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  opacity: 0.8;
}

body.single-post .wp-block-post-content,
body.single-post .entry-content {
  max-width: 65ch;
  margin-left: auto;
  margin-right: auto;
  font-size: 1.1rem;
  line-height: 1.6;
}

body.single-post .wp-block-post-content h2,
body.single-post .wp-block-post-content h3 {
  font-family: "DM Sans", system-ui, sans-serif;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.08;
  color: var(--chk-ink);
}

body.single-post .wp-block-post-content h2 {
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
  margin-top: 2em;
}

body.single-post .wp-block-post-content h3 {
  font-size: clamp(1.15rem, 2vw, 1.4rem);
  margin-top: 1.5em;
}

body.single-post .wp-block-post-content a:not(.wp-element-button) {
  color: var(--chk-azul);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}

body.single-post .wp-block-post-featured-image {
  max-width: 65ch;
  margin-left: auto;
  margin-right: auto;
  border-radius: 0;
}

body.single-post .wp-block-post-featured-image.alignwide,
body.single-post .wp-block-post-featured-image.alignfull {
  max-width: min(65ch, 100%);
}

body.single-post .wp-block-post-featured-image .wp-block-post-featured-image__overlay {
  display: none; /* quitar dim; lectura limpia */
}

body.single-post .wp-block-post-content img,
body.single-post .wp-block-post-content figure {
  max-width: 100%;
  height: auto;
  border-radius: 0;
}

/* TOC sticky solo desktop si existe (plugin/bloque) */
@media (min-width: 1100px) {
  body.single-post .chk-toc,
  body.single-post .wp-block-table-of-contents {
    position: sticky;
    top: 5rem;
    font-size: 0.8rem;
    line-height: 1.4;
    opacity: 0.85;
  }
}
