/* ── blog.css — MateGuard blog / recursos ─────────────────────────────────────
   Reutiliza los tokens de ../style.css (:root). Solo layout de artículo. */

.blog-shell { max-width: 760px; margin: 0 auto; padding: 0 24px; }
.blog-wide  { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

/* Breadcrumb */
.breadcrumb { font-size: 13px; color: var(--text-500); padding: 32px 0 0; }
.breadcrumb a { color: var(--text-400); text-decoration: none; }
.breadcrumb a:hover { color: var(--brand-indigo); }
.breadcrumb span { margin: 0 8px; opacity: 0.5; }

/* Cabecera de artículo */
.article-header { padding: 20px 0 36px; border-bottom: 1px solid var(--border-subtle); margin-bottom: 40px; }
.article-eyebrow {
  display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--brand-indigo); margin-bottom: 16px;
}
.article-title {
  font-size: clamp(30px, 5vw, 46px); font-weight: 800; line-height: 1.12;
  color: var(--text-100); letter-spacing: -0.02em; margin-bottom: 18px;
}
.article-standfirst { font-size: 19px; line-height: 1.6; color: var(--text-300); }
.article-meta { margin-top: 22px; font-size: 13px; color: var(--text-500); display: flex; gap: 16px; flex-wrap: wrap; }

/* Cuerpo */
.article-body { font-size: 17px; line-height: 1.75; color: var(--text-300); }
.article-body > * + * { margin-top: 22px; }
.article-body h2 {
  font-size: 27px; font-weight: 700; color: var(--text-100); letter-spacing: -0.01em;
  margin-top: 52px; margin-bottom: 4px; scroll-margin-top: 90px;
}
.article-body h3 { font-size: 20px; font-weight: 700; color: var(--text-200); margin-top: 36px; }
.article-body p { color: var(--text-300); }
.article-body strong { color: var(--text-100); font-weight: 600; }
.article-body a { color: var(--brand-indigo); text-decoration: underline; text-underline-offset: 3px; }
.article-body ul, .article-body ol { padding-left: 24px; }
.article-body li { margin-top: 10px; }
.article-body li::marker { color: var(--brand-indigo); }

/* Definición destacada (clave para GEO: bloque extraíble) */
.definition {
  background: var(--bg-card); border-left: 3px solid var(--brand-indigo);
  border-radius: var(--radius-sm); padding: 20px 24px; font-size: 17px; color: var(--text-200);
}
.definition strong { color: var(--text-100); }

/* Callout */
.callout {
  background: var(--brand-indigo-glow); border: 1px solid var(--brand-indigo-strong);
  border-radius: var(--radius-md); padding: 20px 24px; font-size: 16px; color: var(--text-200);
}

/* Tablas */
.article-body table {
  width: 100%; border-collapse: collapse; font-size: 15px;
  border: 1px solid var(--border-subtle); border-radius: var(--radius-md); overflow: hidden;
}
.article-body th, .article-body td { padding: 13px 16px; text-align: left; border-bottom: 1px solid var(--border-subtle); }
.article-body th { background: var(--bg-card); color: var(--text-100); font-weight: 600; }
.article-body td { color: var(--text-300); }
.table-scroll { overflow-x: auto; }

/* TL;DR / key takeaways (GEO: resumen citable arriba) */
.key-takeaways {
  background: var(--bg-section); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg); padding: 24px 28px; margin: 8px 0 40px;
}
.key-takeaways h2 { font-size: 14px !important; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--text-500); margin: 0 0 14px !important; }
.key-takeaways ul { padding-left: 20px; margin: 0; }
.key-takeaways li { color: var(--text-200); font-size: 15px; }

/* FAQ dentro del artículo (reusa acordeón del landing si existe; fallback propio) */
.article-faq { margin-top: 56px; }
.article-faq h2 { margin-bottom: 20px; }

/* CTA de cierre */
.article-cta {
  margin: 56px 0 24px; padding: 36px; text-align: center;
  background: var(--bg-card); border: 1px solid var(--brand-indigo-strong); border-radius: var(--radius-lg);
}
.article-cta h3 { font-size: 24px; font-weight: 800; color: var(--text-100); margin-bottom: 10px; }
.article-cta p { color: var(--text-400); font-size: 16px; margin-bottom: 22px; }
.article-cta .cta-btn {
  display: inline-block; background: var(--brand-indigo); color: #fff; font-weight: 700;
  padding: 14px 28px; border-radius: var(--radius-md); text-decoration: none; font-size: 16px;
}
.article-cta .cta-btn:hover { filter: brightness(1.08); }

/* Índice del blog */
.blog-hero { padding: 56px 0 8px; text-align: center; }
.blog-hero h1 { font-size: clamp(32px, 5vw, 48px); font-weight: 800; color: var(--text-100); letter-spacing: -0.02em; }
.blog-hero p { font-size: 18px; color: var(--text-400); margin-top: 14px; }
.post-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; margin: 44px 0 64px; }
.post-card {
  display: block; text-decoration: none; background: var(--bg-card);
  border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); padding: 28px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.post-card:hover { border-color: var(--brand-indigo-strong); transform: translateY(-2px); }
.post-card .post-tag { font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--brand-indigo); }
.post-card h2 { font-size: 21px; font-weight: 700; color: var(--text-100); margin: 12px 0 10px; line-height: 1.3; }
.post-card p { font-size: 15px; color: var(--text-400); line-height: 1.6; }
.post-card .post-read { margin-top: 16px; font-size: 14px; font-weight: 600; color: var(--brand-indigo); }

.blog-footer { text-align: center; padding: 40px 0; color: var(--text-500); font-size: 13px; border-top: 1px solid var(--border-subtle); }
.blog-footer a { color: var(--text-400); text-decoration: none; }

/* ── Featured Post ───────────────────────────────────────────────────────── */
.blog-featured {
  margin-bottom: 56px;
}
.featured-card {
  display: block;
  text-decoration: none;
  background: linear-gradient(135deg, var(--bg-card), var(--bg-section));
  border: 1px solid var(--border-interactive);
  border-radius: var(--radius-xl);
  padding: 64px 48px;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}
.featured-card::before {
  content: ''; position: absolute; top: 0; left: 0; width: 4px; height: 100%;
  background: var(--brand-red);
}
.featured-card:hover {
  transform: translateY(-4px);
  border-color: var(--brand-red-line);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}
.featured-tag {
  background: var(--brand-red);
  color: #fff;
  border: none;
}
.featured-title {
  font-size: 32px;
  font-weight: 800;
  color: var(--text-100);
  margin: 16px 0;
  line-height: 1.2;
}
.featured-desc {
  font-size: 18px;
  color: var(--text-300);
  line-height: 1.6;
  max-width: 800px;
}

/* Enhancing existing grid */
.post-grid {
  gap: 32px;
}
.post-card {
  transition: all 0.2s ease;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
}
.post-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-interactive);
  box-shadow: 0 12px 24px rgba(0,0,0,0.2);
}

/* Added by script for images */
.featured-card.has-image {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  padding: 0;
}
.featured-image {
  height: 100%;
  width: 100%;
  overflow: hidden;
}
.featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-xl) 0 0 var(--radius-xl);
}
.featured-content {
  padding: 48px 48px 48px 0;
}

@media (max-width: 900px) {
  .featured-card.has-image {
    grid-template-columns: 1fr;
  }
  .featured-image img {
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    max-height: 250px;
  }
  .featured-content {
    padding: 32px;
  }
}

.post-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0; /* remove default padding */
}
.card-image-placeholder {
  width: 100%;
  height: 180px;
  background: linear-gradient(135deg, rgba(240,72,58,0.1) 0%, rgba(34,211,238,0.05) 100%);
  border-bottom: 1px solid var(--border-subtle);
  position: relative;
  overflow: hidden;
}
/* add a generic grid pattern to the placeholder */
.card-image-placeholder::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 20px 20px;
}
.post-card-content {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}
.post-card .post-read {
  margin-top: auto;
  padding-top: 16px;
}
