/* Blog: índice (tarjetas) y artículos. Se carga junto a styles.css y pages.css. */

/* ---------- Índice ---------- */
/* Fondo blanco crema (igual que servicios/proyectos) */
.blog-section { background: var(--cream); }
.blog-section .blog-card { border-color: rgba(10, 10, 11, 0.12); }

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}
.blog-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg-elev);
  overflow: hidden;
  transition: transform var(--transition), border-color var(--transition);
}
.blog-card:hover { transform: translateY(-6px); border-color: var(--line-2); }
.blog-card-cover {
  aspect-ratio: 16 / 9;
  background: radial-gradient(500px 240px at 75% 15%, var(--red-glow), transparent 60%), linear-gradient(150deg, #17171b, #08080a);
  position: relative;
  display: flex; align-items: flex-end;
  padding: 18px;
}
.blog-card-cat {
  font-family: var(--font-display);
  font-weight: 700; font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--white);
  background: var(--red);
  padding: 5px 12px; border-radius: 40px;
}
.blog-card-body { padding: 24px; display: flex; flex-direction: column; flex: 1; }
.blog-card-title {
  font-family: var(--font-display);
  font-weight: 800; font-size: 1.15rem; line-height: 1.2; letter-spacing: -0.01em;
  margin-bottom: 12px;
}
.blog-card-excerpt { color: var(--muted); font-size: 0.92rem; flex: 1; }
.blog-card-meta {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line);
  font-size: 0.78rem; color: var(--muted-2);
}
.blog-card-meta .link-arrow { color: var(--red); font-size: 0.68rem; }

/* ---------- Artículo ---------- */
.article-wrap { max-width: 760px; margin: 0 auto; }
.article-cat {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 700; font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--red);
  margin-bottom: 16px;
}
.article-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2rem, 4.5vw, 3.1rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.article-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px;
  margin-top: 22px; padding-bottom: 26px;
  border-bottom: 1px solid var(--line);
  color: var(--muted-2); font-size: 0.86rem;
}
.article-meta .dot { color: var(--red); }

.article-body { margin-top: 34px; }
.article-body > p,
.article-body > ul,
.article-body > ol { color: var(--muted); font-size: 1.05rem; line-height: 1.8; margin-bottom: 22px; }
.article-body > p strong { color: var(--white); }
.article-body h2 {
  font-family: var(--font-display);
  font-weight: 800; font-size: clamp(1.4rem, 2.6vw, 1.8rem);
  text-transform: uppercase; letter-spacing: -0.01em;
  margin: 40px 0 16px;
}
.article-body h3 {
  font-family: var(--font-display);
  font-weight: 700; font-size: 1.15rem;
  margin: 26px 0 10px;
}
.article-body ul, .article-body ol { list-style: none; padding-left: 0; display: grid; gap: 12px; }
.article-body li { color: var(--muted); line-height: 1.75; position: relative; padding-left: 26px; }
.article-body ul li::before { content: "—"; color: var(--red); position: absolute; left: 0; top: 0; }
.article-body ol { counter-reset: li; }
.article-body ol li { counter-increment: li; padding-left: 30px; }
.article-body ol li::before { content: counter(li); color: var(--red); font-family: var(--font-display); font-weight: 800; position: absolute; left: 0; top: 0; }
.article-body a:not(.btn) { color: var(--red); text-decoration: underline; text-underline-offset: 3px; }
.article-body blockquote {
  border-left: 3px solid var(--red);
  background: var(--bg-elev);
  padding: 18px 22px; margin: 0 0 24px;
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--white); font-size: 1.08rem;
}

/* FAQ dentro del artículo */
.article-faq { margin-top: 44px; }
.article-faq h2 { margin-bottom: 10px; }

/* CTA final */
.article-cta {
  margin-top: 48px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-lg);
  background: radial-gradient(600px 200px at 80% 0%, rgba(229,9,20,0.14), transparent 60%), var(--bg-elev);
  padding: clamp(26px, 4vw, 40px);
  text-align: center;
}
.article-cta h2 { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.3rem, 2.6vw, 1.8rem); text-transform: uppercase; letter-spacing: -0.01em; margin-bottom: 14px; }
.article-cta p { color: var(--muted); margin-bottom: 24px; }

.article-back { margin-top: 40px; }

/* Aviso de idioma disponible (hreflang visible) */
.lang-alt {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 18px;
  font-size: 0.85rem; color: var(--muted-2);
}
.lang-alt a { color: var(--red); }

/* Artículo con fondo blanco crema (mejor lectura del texto largo) */
.article-section { background: var(--cream); color: var(--ink); }
.article-section .article-body > p,
.article-section .article-body > ul,
.article-section .article-body > ol,
.article-section .article-body li,
.article-section .article-faq p { color: #3a3a42; }
.article-section .article-body h2,
.article-section .article-body h3,
.article-section .article-body strong { color: var(--ink); }
.article-section .article-body blockquote { background: #ffffff; color: var(--ink); border-left-color: var(--red); }
.article-section .article-cta h2 { color: var(--white); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) { .blog-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .blog-grid { grid-template-columns: 1fr; } }
