/* ===========================
   blog.css — Índice del blog y artículos
   =========================== */

/* --- Encabezado --- */
.post-hero {
  padding: calc(var(--nav-h) + 3.5rem) 0 2.5rem;
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
}
.post-hero .container { max-width: 820px; }
.post-hero h1 {
  font-size: clamp(1.7rem, 4vw, 2.5rem);
  line-height: 1.2;
  margin: 1rem 0;
}
.post-hero__lead { color: var(--text-2); font-size: 1.1rem; margin: 0; }

.crumbs { font-size: 0.82rem; color: var(--text-3); }
.crumbs a { color: var(--text-2); text-decoration: none; }
.crumbs a:hover { color: var(--accent-ink); }

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1rem;
  margin-top: 1.25rem;
  font-size: 0.85rem;
  color: var(--text-3);
}

/* --- Cuerpo del artículo --- */
.post {
  max-width: 820px;
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--text-2);
}
.post h2 {
  font-size: 1.45rem;
  line-height: 1.3;
  color: var(--text);
  margin: 2.75rem 0 1rem;
  scroll-margin-top: calc(var(--nav-h) + 1rem);
}
.post h3 { font-size: 1.12rem; color: var(--text); margin: 1.75rem 0 0.6rem; }
.post p, .post ul, .post ol { margin: 0 0 1.15rem; }
.post ul, .post ol { padding-left: 1.3rem; }
.post li { margin-bottom: 0.45rem; }
.post li::marker { color: var(--accent-ink); }
.post strong { color: var(--text); }
.post a { color: var(--blue); text-underline-offset: 3px; }
.post a:hover { color: var(--accent-ink); }

.post__toc {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
}
.post__toc-title {
  font-size: 0.75rem;
  color: var(--accent-ink);
  margin-bottom: 0.5rem;
}
.post__toc ol { margin: 0; font-size: 0.95rem; }
.post__toc a { color: var(--text-2); text-decoration: none; }
.post__toc a:hover { color: var(--text); }

.post__note {
  border-left: 3px solid var(--accent-3);
  background: var(--blue-tint);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  font-size: 0.98rem;
}
.post__note p:last-child { margin-bottom: 0; }

.post__checklist { list-style: none; padding-left: 0 !important; }
.post__checklist li { position: relative; padding-left: 1.8rem; }
.post__checklist li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.45em;
  width: 1rem; height: 1rem;
  border: 2px solid var(--accent);
  border-radius: 4px;
}

/* Tabla simple */
.post__table-wrap { overflow-x: auto; margin: 1.5rem 0; }
.post table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.post th, .post td { text-align: left; padding: 0.7rem 0.8rem; border-bottom: 1px solid var(--border); vertical-align: top; }
.post th { color: var(--text); font-weight: 600; background: var(--bg-2); }

/* Preguntas frecuentes */
.post details {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1.1rem;
  margin-bottom: 0.75rem;
  background: var(--bg-2);
}
.post summary { cursor: pointer; color: var(--text); font-weight: 600; }
@media (max-width: 900px) {
  .post summary { display: flex; align-items: center; min-height: 44px; }
}
.post details[open] summary { margin-bottom: 0.6rem; }
.post details p { margin: 0; }

/* Llamado a agendar */
.post-cta {
  margin: 2.5rem 0;
  padding: 1.75rem;
  border-radius: var(--radius-lg);
  background: var(--bg-2);
  border: 1px solid var(--accent-line);
}
.post-cta h2, .post-cta h3 { margin-top: 0; }
.post-cta p { margin-bottom: 1.25rem; }
.post-cta .btn { margin: 0 0.5rem 0.5rem 0; }
.post .post-cta a.btn { text-decoration: none; }
.post .post-cta a.btn-primary { color: var(--on-accent); }
.post .post-cta a.btn-wa, .post .post-cta a.btn-purple { color: #fff; }

/* --- Índice del blog --- */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
  gap: 1.5rem;
}
.blog-card {
  display: flex;
  flex-direction: column;
  padding: 1.75rem;
  border-radius: var(--radius-lg);
  background: var(--bg-2);
  border: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  transition: border-color var(--transition), transform var(--transition);
}
.blog-card:hover { border-color: var(--accent-line); transform: translateY(-3px); }
.blog-card__tag {
  font-size: 0.72rem;
  color: var(--accent-ink);
}
.blog-card h2 { font-size: 1.15rem; line-height: 1.35; margin: 0.6rem 0; color: var(--text); }
.blog-card p { color: var(--text-2); font-size: 0.95rem; margin: 0 0 1.25rem; flex: 1; }
.blog-card__more { color: var(--blue); font-size: 0.9rem; }

@media (max-width: 720px) {
  .post { font-size: 1rem; padding-top: 2rem; }
  .post-cta { padding: 1.25rem; }
}
