/* Eurofic Blog — ajustes para el contenido de WordPress dentro de .legal-body.
   El reset global del sitio (* { margin:0; padding:0 }) quita el espaciado
   por defecto del navegador, así que aquí se repone para los elementos que
   puede generar el editor de bloques y que .legal-body no cubre todavía. */

/* El .legal-body h2 original (1.15rem) está pensado para páginas legales;
   en un artículo de blog los h2 de sección necesitan más jerarquía.
   Además corrige el var(--text) indefinido del CSS principal. */
.legal-body h2 {
  font-family: var(--display);
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--ink);
  margin: 2em 0 .55em;
}

.legal-body h3,
.legal-body h4 { margin: 1.8em 0 .5em; color: var(--ink); }
.legal-body h3 { font-size: 1.15rem; font-weight: 700; }
.legal-body h4 { font-size: 1.02rem; }

.legal-body ol { padding-left: 1.5em; margin-bottom: 1em; }
.legal-body ol li,
.legal-body ul li { margin-bottom: .4em; }

.legal-body strong { color: var(--ink); }

.legal-body blockquote {
  margin: 1.6em 0;
  padding: .2em 1.4em;
  border-left: 3px solid var(--amber);
  color: var(--ink);
  font-style: italic;
  font-size: 1.05rem;
}
.legal-body blockquote p { margin-bottom: .5em; }
.legal-body blockquote cite { display: block; margin-top: .5em; font-style: normal; font-size: .85rem; color: var(--muted); }

.legal-body pre,
.legal-body code {
  font-family: var(--mono);
  font-size: .88em;
}
.legal-body code {
  background: var(--paper);
  padding: .15em .4em;
  border-radius: 5px;
}
.legal-body pre {
  background: var(--navy-deep);
  color: #fff;
  padding: 1.2em 1.4em;
  border-radius: var(--r);
  overflow-x: auto;
  margin: 1.4em 0;
}
.legal-body pre code { background: none; padding: 0; }

.legal-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.6em 0;
  font-size: .95rem;
}
.legal-body th,
.legal-body td {
  border: 1px solid var(--line);
  padding: .6em .8em;
  text-align: left;
}
.legal-body th { background: var(--paper); font-weight: 600; }

.legal-body figure,
.legal-body .wp-block-image { margin: 1.6em 0; }
.legal-body img { border-radius: 14px; height: auto; }
.legal-body figcaption,
.legal-body .wp-caption-text,
.legal-body .wp-element-caption {
  font-size: .85rem;
  color: var(--muted);
  text-align: center;
  margin-top: .6em;
}

.legal-body hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 2.4em 0;
}

/* Bloque "Botón" del editor, con el mismo look que el resto del sitio */
.legal-body .wp-block-button__link {
  font-family: var(--body);
  font-weight: 600;
  font-size: .95rem;
  padding: .72em 1.4em;
  border-radius: 999px;
  background: var(--grad);
  color: #fff !important;
  display: inline-block;
  text-decoration: none !important;
}
.legal-body .wp-block-button__link:hover { filter: brightness(1.06); }

/* Alinear "ancho"/"completo" respetando el contenedor de lectura */
.legal-body .alignwide,
.legal-body .alignfull { max-width: none; }

/* Índice del artículo (tabla de contenidos autogenerada) */
.blog-toc {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 20px 24px;
  margin: 0 0 30px;
}
.blog-toc .toc-t {
  display: block;
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 10px;
}
.blog-toc ol { margin: 0; padding-left: 1.3em; }
.blog-toc li { margin-bottom: .35em; font-size: .95rem; }
.blog-toc a { color: var(--ink); }
.blog-toc a:hover { color: var(--amber); text-decoration: underline; }

/* Desplazamiento suave hasta las anclas sin que el header sticky las tape */
.legal-body h2[id] { scroll-margin-top: 84px; }

/* ══════════════ LISTADO DEL BLOG ══════════════ */

/* Chips de filtro por categoría */
.blog-chips { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 40px; }
.blog-chips a {
  font-family: var(--mono);
  font-size: .78rem;
  letter-spacing: .03em;
  padding: .55em 1.15em;
  border-radius: 999px;
  border: 1px solid var(--line-dark);
  color: var(--ink);
  transition: background .2s, color .2s, border-color .2s;
}
.blog-chips a:hover { border-color: var(--amber); color: var(--amber); }
.blog-chips a.active { background: var(--ink); color: #fff; border-color: var(--ink); }

/* Post destacado (el más reciente) — foto + texto a dos columnas */
.blog-featured {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  margin-bottom: 52px;
  transition: box-shadow .25s, transform .25s;
}
.blog-featured:hover { box-shadow: 0 30px 60px -30px rgba(26,26,46,.35); transform: translateY(-2px); }
.blog-featured .bf-media { position: relative; min-height: 280px; background: var(--navy-deep); }
.blog-featured .bf-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.blog-featured .bf-body { padding: 40px 44px; display: flex; flex-direction: column; justify-content: center; }
.blog-featured .bf-cat {
  font-family: var(--mono); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--amber); margin-bottom: 12px; display: inline-flex; align-items: center; gap: .6em;
}
.blog-featured .bf-cat::before { content: ""; width: 22px; height: 1px; background: var(--amber); display: inline-block; }
.blog-featured h2 {
  font-family: var(--display); font-weight: 700; font-size: clamp(1.5rem, 2.6vw, 2.1rem);
  letter-spacing: -.02em; line-height: 1.12; color: var(--ink); margin-bottom: 14px;
}
.blog-featured p { font-size: 1rem; line-height: 1.7; color: var(--muted); margin-bottom: 18px; }
.blog-featured .bf-meta { font-family: var(--mono); font-size: .78rem; color: var(--muted-dark); }

@media (max-width: 780px) {
  .blog-featured { grid-template-columns: 1fr; }
  .blog-featured .bf-media { min-height: 220px; }
  .blog-featured .bf-body { padding: 28px 26px; }
}

/* Rejilla de entradas con miniatura */
.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 28px; }
.blog-card {
  background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--r);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform .2s ease, box-shadow .2s ease;
}
.blog-card:hover { transform: translateY(-4px); box-shadow: 0 20px 40px -20px rgba(26,26,46,.28); }
.blog-card img { width: 100%; aspect-ratio: 16/10; object-fit: cover; display: block; }
.blog-card .bc-body { padding: 20px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.blog-card .bc-cat { font-family: var(--mono); font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--amber); margin-bottom: 8px; }
.blog-card h3 { font-family: var(--display); font-weight: 700; font-size: 1.05rem; line-height: 1.3; color: var(--ink); margin-bottom: 8px; }
.blog-card p { font-size: .9rem; line-height: 1.6; color: var(--muted); margin-bottom: 14px; flex: 1; }
.blog-card .bc-meta { font-family: var(--mono); font-size: .72rem; color: var(--muted-dark); margin-top: auto; }

/* Paginación del listado del blog (paginate_links) */
.page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 .8em;
  margin: 0 4px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-family: var(--mono);
  font-size: .82rem;
  color: var(--ink);
}
.page-numbers.current { background: var(--grad); color: #fff; border-color: transparent; }
.page-numbers.dots { border: 0; }
a.page-numbers:hover { border-color: var(--amber); color: var(--amber); }
