/* ===========================
   BLOG & POST (aislado)
   Sólo afecta páginas con .blog-page o .post-page
   =========================== */

/* Contenedor base */
.blog-page .content,
.post-page .content {
  color: var(--color-red-bajo);
  max-width: 1200px;
  margin: 0 auto;
  padding: 28px 16px;
}

/* ---------- HERO (listado) ---------- */
.blog-page .blog-hero {
  color: var(--color-red-bajo);
  text-align: center;
  margin-bottom: 20px;
}

.blog-page .blog-hero h1 {
  color: var(--color-red-bajo);
  font-size: 2.2rem;
  line-height: 1.2;
  margin-bottom: 8px;
}

.blog-page .blog-hero p {
  color: var(--color-red-bajo);
  font-size: 1rem;
}

/* ---------- Filtros (chips) ---------- */
.blog-page .blog-filters {
  color: var(--color-white);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin: 16px 0 8px;
}

.blog-page .chip {
  border: 1px solid #e5e5e5;
  background: #fff;
  color: var(--color-white);
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: box-shadow .2s, transform .1s, border-color .2s;
  user-select: none;
}

.blog-page .chip:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, .07);
}

.blog-page .chip.active {
  border-color: var(--color-red);
  box-shadow: 0 2px 10px rgba(230, 0, 0, .15);
}

/* ---------- Grid de tarjetas ---------- */
.blog-page .blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 22px;
  margin-top: 18px;
}

/* Tarjeta */
.blog-page .blog-card {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease;
  display: flex;
  flex-direction: column;
}

.blog-page .blog-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
}

/* Imagen con ratio fijo para evitar CLS */
.blog-page .blog-card .thumb {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
}

/* Contenido */
.blog-page .blog-card .card-body {
  padding: 14px 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}


.blog-page .pill {
  align-self: flex-start;
  background: rgba(230, 0, 0, .08);
  color: var(--color-red);
  font-weight: 700;
  font-size: 0.72rem;
  padding: 4px 8px;
  border-radius: 999px;
  letter-spacing: .3px;
}

.blog-page .blog-card h2 {
  font-size: 1.1rem;
  line-height: 1.35;
}

.blog-page .blog-card h2 a {
  color: var(--color-white);
  text-decoration: none;
}

.blog-page .blog-card h2 a:hover {
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

.blog-page .excerpt {
  color: #5a5a5a;
  font-size: .95rem;
}

.blog-page .meta {
  display: flex;
  gap: 10px;
  align-items: center;
  color: #777;
  font-size: .85rem;
}

/* CTA */
.blog-page .btn-go {
  display: inline-block;
  margin-top: 6px;
  padding: 10px 12px;
  background: var(--color-red);
  color: #fff !important;
  text-align: center;
  border-radius: 8px;
  text-decoration: none;
  transition: transform .1s, background .2s;
}

.blog-page .btn-go:hover {
  background: var(--color-black);
}

.blog-page .btn-go:active {
  transform: scale(0.98);
}

/* ---------- Paginación sencilla ---------- */
.blog-page .pager {
  margin-top: 14px;
  display: flex;
  justify-content: center;
  gap: 8px;
}

.blog-page .pager a {
  padding: 8px 12px;
  border-radius: 8px;
  text-decoration: none;
  border: 1px solid #e6e6e6;
  color: var(--color-red-bajo);
}

.blog-page .pager a.active,
.blog-page .pager a:hover {
  border-color: var(--color-red);
}

/* ---------- Post (detalle) ---------- */
.post-page .article-header {
  color: var(--color-red-bajo);
  max-width: 800px;
  margin: 0 auto 14px;
}

.post-page .breadcrumb {
  font-size: .9rem;
  color: var(--color-red-bajo);
  margin-bottom: 8px;
}

.post-page .breadcrumb a {
  color: var(--color-red);
}

.post-page .post-title {
  font-size: 2rem;
  line-height: 1.2;
  margin-bottom: 6px;
}

.post-page .post-meta {
  display: flex;
  gap: 12px;
  align-items: center;
  color: var(--color-red-bajo);
  font-size: .9rem;
}

/* Cuerpo del artículo */
.post-page .article-body {
  max-width: 800px;
  margin: 8px auto 0;
  line-height: 1.7;
  color: var(--color-red-bajo);
  font-size: 1rem;
}

.post-page .article-body p {
  margin: 12px 0;
}

.post-page .article-body img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  color: var(--color-red);
}

.article-body a {
  color: var(--color-red);
}

.article-body h1 {
  font-size: 2rem;
  line-height: 1.2;
  margin-bottom: 6px;
}

.post-page figure {
  margin: 16px 0;
}

.post-page figcaption {
  text-align: center;
  font-size: .9rem;
  color: #666;
  margin-top: 6px;
}

/* Botón volver */
.post-page .btn-back {
  display: inline-block;
  margin-top: 22px;
  padding: 10px 14px;
  background: var(--color-red);
  color: #fff !important;
  font-weight: 600;
  border-radius: 8px;
  text-decoration: none;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
  transition: background .2s, transform .1s;
}

.post-page .btn-back:hover {
  background: var(--color-black);
}

.post-page .btn-back:active {
  transform: scale(0.98);
}

/* Compartir */
.post-page .share {
  margin-top: 10px;
  display: flex;
  gap: 10px;
}

.post-page .share a {
  border: 1px solid #e6e6e6;
  border-radius: 8px;
  padding: 8px 10px;
  text-decoration: none;
  color: var(--color-red-bajo);
}

/* Relacionados */
.post-page .related {
  max-width: 1000px;
  margin: 28px auto 0;
}

.post-page .related h3 {
  font-size: 1.4rem;
  margin-bottom: 10px;
}

.post-page .related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.post-page .related-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 5px 14px rgba(0, 0, 0, .08);
  overflow: hidden;
}

.post-page .related-card img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
}

.post-page .related-card a {
  display: block;
  padding: 10px 12px;
  text-decoration: none;
  color: #222;
}

.post-page .related-card a:hover {
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 600px) {
  .blog-page .blog-hero h1 {
    font-size: 1.7rem;
  }

  .post-page .post-title {
    font-size: 1.6rem;
  }
}


.ads-in-article {
  background: #f9f9f9;
  margin: 20px 0;
  padding: 20px 0;
  text-align: center;
  border-top: 1px solid #eee;
  border-bottom: 1px solid #eee;
}



.toc {
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 16px;
  margin: 18px 0
}

.toc h2 {
  margin: 0 0 8px 0;
  font-size: 1.1rem
}

.toc ul {
  margin: 0;
  padding-left: 16px;
  list-style: none
}

.toc li {
  margin: 6px 0
}

.toc li.h3 {
  margin-left: 12px;
  font-size: .95rem
}

.toc a {
  text-decoration: none
}

.toc a:hover {
  text-decoration: underline
}

.post-pager {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 28px 0
}

.post-pager a {
  background: #fff;
  padding: 10px 14px;
  border: 1px solid #e8e8e8;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600
}

.post-pager a:hover {
  background: var(--color-black)
}