/*
 * Blog (views/blog/*): lista de artículos y artículo.
 * El texto del artículo usa un ancho de lectura cómodo (~70 caracteres).
 */
.tm-blog, .tm-articulo { padding-block: var(--tm-esp-6) calc(var(--tm-alto-dock) + var(--tm-esp-6)); }
.tm-blog__etiqueta { margin: 0; color: var(--tm-ambar); font-size: var(--tm-texto-xs); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.tm-blog__meta { margin: 0; color: var(--tm-texto-suave); font-size: var(--tm-texto-sm); }
.tm-blog__vacio { color: var(--tm-texto-suave); }

/* ---------- Lista ---------- */
.tm-blog__cabecera { max-width: 720px; margin-bottom: var(--tm-esp-6); }
.tm-blog__cabecera h1 { margin: var(--tm-esp-2) 0; font-family: var(--tm-fuente-marca); font-size: clamp(1.75rem, 4vw, 2.5rem); line-height: 1.15; }
.tm-blog__cabecera p:last-child { margin: 0; color: var(--tm-texto-suave); font-size: var(--tm-texto-md); }

.tm-blog__rejilla { display: grid; gap: var(--tm-esp-5); grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.tm-blog-tarjeta {
  display: grid; grid-template-rows: auto 1fr; overflow: hidden;
  border: 1px solid var(--tm-borde-suave); border-radius: var(--tm-radio-lg); background: var(--tm-superficie);
  transition: border-color 0.15s, transform 0.15s;
}
.tm-blog-tarjeta:hover { border-color: var(--tm-ambar-borde); transform: translateY(-2px); }
.tm-blog-tarjeta__imagen img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--tm-superficie-alta); }
.tm-blog-tarjeta__texto { display: grid; align-content: start; gap: var(--tm-esp-2); padding: var(--tm-esp-4); }
.tm-blog-tarjeta h2, .tm-blog-tarjeta h3 { margin: 0; font-size: 1.125rem; line-height: 1.3; }
.tm-blog-tarjeta h2 a, .tm-blog-tarjeta h3 a { color: var(--tm-texto); }
.tm-blog-tarjeta h2 a:hover, .tm-blog-tarjeta h3 a:hover { color: var(--tm-ambar); }
.tm-blog-tarjeta__texto > p:not([class]) { margin: 0; color: var(--tm-texto-suave); line-height: 1.5; }
@media (min-width: 900px) {
  .tm-blog-tarjeta--destacada { grid-column: 1 / -1; grid-template-columns: 1.3fr 1fr; grid-template-rows: none; }
  .tm-blog-tarjeta--destacada .tm-blog-tarjeta__imagen img { height: 100%; aspect-ratio: auto; min-height: 280px; }
  .tm-blog-tarjeta--destacada .tm-blog-tarjeta__texto { align-content: center; padding: var(--tm-esp-6); }
  .tm-blog-tarjeta--destacada h2 { font-size: 1.75rem; }
}
.tm-blog .tm-paginacion { margin-top: var(--tm-esp-6); }

/* ---------- Artículo ---------- */
.tm-articulo { max-width: 760px; }
.tm-articulo__migas { margin-bottom: var(--tm-esp-4); color: var(--tm-texto-suave); font-size: var(--tm-texto-sm); }
.tm-articulo__migas a { color: var(--tm-texto-medio); }
.tm-articulo__cabecera { display: grid; gap: var(--tm-esp-3); margin-bottom: var(--tm-esp-5); }
.tm-articulo__cabecera h1 { margin: 0; font-family: var(--tm-fuente-marca); font-size: clamp(1.75rem, 5vw, 2.6rem); line-height: 1.15; }
.tm-articulo__resumen { margin: 0; color: var(--tm-texto-medio); font-size: 1.15rem; line-height: 1.5; }
.tm-articulo__portada { width: 100%; margin-top: var(--tm-esp-3); border-radius: var(--tm-radio-lg); }

.tm-articulo__contenido { font-size: 1.0625rem; line-height: 1.75; color: var(--tm-texto); }
.tm-articulo__contenido h2 { margin: var(--tm-esp-6) 0 var(--tm-esp-3); font-size: 1.5rem; line-height: 1.25; scroll-margin-top: var(--tm-alto-header); }
.tm-articulo__contenido h3 { margin: var(--tm-esp-5) 0 var(--tm-esp-2); font-size: 1.2rem; }
.tm-articulo__contenido p, .tm-articulo__contenido ul, .tm-articulo__contenido ol { margin: 0 0 var(--tm-esp-4); }
.tm-articulo__contenido li { margin-bottom: var(--tm-esp-2); }
.tm-articulo__contenido a { color: var(--tm-ambar); text-decoration: underline; text-underline-offset: 3px; }
.tm-articulo__contenido blockquote {
  margin: var(--tm-esp-5) 0; padding: var(--tm-esp-3) var(--tm-esp-4);
  border-left: 4px solid var(--tm-ambar); background: var(--tm-ambar-tenue); border-radius: 0 var(--tm-radio-md) var(--tm-radio-md) 0;
}
.tm-articulo__contenido figure { margin: var(--tm-esp-5) 0; }
.tm-articulo__contenido figure img { width: 100%; border-radius: var(--tm-radio-md); }
.tm-articulo__contenido figcaption { margin-top: var(--tm-esp-2); color: var(--tm-texto-suave); font-size: var(--tm-texto-sm); text-align: center; }
.tm-publicidad { margin: var(--tm-esp-5) 0; min-height: 120px; }

.tm-articulo__pie { display: flex; flex-wrap: wrap; align-items: center; gap: var(--tm-esp-2); margin-top: var(--tm-esp-6); padding-top: var(--tm-esp-4); border-top: 1px solid var(--tm-borde-suave); }
.tm-articulo__pie p { margin: 0 var(--tm-esp-2) 0 0; color: var(--tm-texto-suave); }
.tm-articulo__pie svg { width: 18px; height: 18px; }

.tm-articulo__cta {
  margin: var(--tm-esp-6) 0; padding: var(--tm-esp-5); text-align: center;
  border: 1px solid var(--tm-ambar-borde); border-radius: var(--tm-radio-lg); background: var(--tm-ambar-tenue);
}
.tm-articulo__cta h2 { margin: 0 0 var(--tm-esp-2); }
.tm-articulo__cta p { margin: 0 0 var(--tm-esp-4); color: var(--tm-texto-medio); }
.tm-articulo__relacionados h2 { margin-bottom: var(--tm-esp-4); }

/* ---------- Anuncios relacionados dentro del artículo ---------- */
.tm-blog-anuncios {
  margin: var(--tm-esp-6) 0; padding: var(--tm-esp-4);
  border: 1px solid var(--tm-borde-suave); border-radius: var(--tm-radio-lg); background: var(--tm-superficie);
}
.tm-blog-anuncios__titulo { margin: 0 0 var(--tm-esp-3) !important; font-weight: 700; }
.tm-blog-anuncios__lista { display: grid; gap: var(--tm-esp-3); grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); margin-bottom: var(--tm-esp-4); }
.tm-blog-anuncio { display: grid; gap: var(--tm-esp-1); color: var(--tm-texto) !important; text-decoration: none !important; font-size: var(--tm-texto-sm); line-height: 1.35; }
.tm-blog-anuncio img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--tm-radio-md); background: var(--tm-superficie-alta); }
.tm-blog-anuncio__titulo { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tm-blog-anuncio strong { color: var(--tm-ambar); }

@media (min-width: 900px) {
  .tm-blog, .tm-articulo { padding-bottom: var(--tm-esp-7); }
}
