/* ============================================================
   BLOG.CSS — /blog/, entradas individuales y archivos de categoría
   ============================================================ */

/* ===== FILTRO DE CATEGORÍAS ===== */
.blog-filters {
  display: flex; flex-wrap: wrap; gap: 0.6rem;
  margin: 0 0 2.5rem;
}
.blog-filters a {
  font-size: 0.8rem; font-weight: 600; color: var(--muted);
  background: var(--sand); padding: 0.45rem 1rem; border-radius: 100px;
  text-decoration: none; transition: background var(--transition), color var(--transition);
}
.blog-filters a:hover { background: var(--sand-dark); }
.blog-filters a.active { background: var(--clay); color: var(--cream); }

/* ===== GRID DE TARJETAS ===== */
.blog-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.6rem;
  margin-bottom: 3rem;
}
.blog-card {
  background: #fff; border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow); transition: transform var(--transition), box-shadow var(--transition);
  display: flex; flex-direction: column;
}
.blog-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.blog-card-img {
  aspect-ratio: 16/10; background: var(--sand); overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.blog-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.blog-card-img.no-image { background: linear-gradient(135deg, var(--ink) 0%, var(--ink-mid) 100%); color: rgba(253,250,244,0.25); }
.blog-card-img.no-image svg { width: 40px; height: 40px; }
.blog-card-body { padding: 1.4rem 1.4rem 1.6rem; display: flex; flex-direction: column; flex-grow: 1; }
.blog-card-cat {
  display: inline-block; font-size: 0.68rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--clay); margin-bottom: 0.6rem;
}
.blog-card h3 { font-size: 1.05rem; font-weight: 800; line-height: 1.35; margin: 0 0 0.6rem; }
.blog-card h3 a { color: var(--ink); text-decoration: none; }
.blog-card h3 a:hover { color: var(--clay); }
.blog-card p { font-size: 0.85rem; color: var(--muted); line-height: 1.6; margin: 0 0 1rem; flex-grow: 1; }
.blog-card-meta { font-size: 0.75rem; color: var(--muted); opacity: 0.7; margin-top: auto; }

@media (max-width: 992px) { .blog-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .blog-grid { grid-template-columns: 1fr; } }

/* ===== PAGINACIÓN ===== */
.blog-pagination { display: flex; justify-content: center; gap: 0.5rem; margin: 2rem 0 3rem; }
.blog-pagination a, .blog-pagination span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 38px; height: 38px; padding: 0 0.6rem; border-radius: var(--radius);
  font-size: 0.85rem; font-weight: 600; color: var(--ink); background: var(--sand);
  text-decoration: none;
}
.blog-pagination a:hover { background: var(--sand-dark); }
.blog-pagination span.current { background: var(--clay); color: var(--cream); }

.blog-empty { text-align: center; padding: 1rem 1rem 0; color: var(--muted); font-size: 0.9rem; }

/* ===== TARJETAS PLACEHOLDER (vista previa cuando aún no hay posts) ===== */
.blog-card.is-placeholder {
  box-shadow: none;
  border: 1.5px dashed rgba(26,18,8,0.14);
  background: transparent;
}
.blog-card.is-placeholder .blog-card-img {
  background: var(--sand);
}
.blog-card.is-placeholder .blog-card-img svg { width: 26px; height: 26px; color: rgba(26,18,8,0.18); }
.blog-card.is-placeholder .blog-card-body { align-items: center; text-align: center; }
.blog-card.is-placeholder .blog-card-cat { color: rgba(26,18,8,0.2); }
.blog-card.is-placeholder h3 { color: rgba(26,18,8,0.3); font-size: 0.9rem; }
.blog-card.is-placeholder p { color: rgba(26,18,8,0.22); margin-bottom: 0; }

/* ===== ENTRADA INDIVIDUAL ===== */
.post-hero {
  display: grid; grid-template-columns: 1fr 1fr; align-items: stretch;
  background: var(--sand); margin-bottom: 3rem; min-height: 440px;
}
.post-hero-content { padding: 3rem 3rem 2.5rem; display: flex; flex-direction: column; justify-content: center; }
.post-hero-content .tag { margin-bottom: 1.2rem; }
.post-hero-content h1 { font-size: clamp(2rem, 3.4vw, 2.8rem); line-height: 1.12; margin-bottom: 1rem; color: var(--ink); }
.post-hero-content .post-meta { justify-content: flex-start; margin-bottom: 1.2rem; }
.post-hero-content .post-excerpt { font-size: 1rem; color: var(--muted); line-height: 1.7; max-width: 46ch; }
.post-hero-img { position: relative; overflow: hidden; min-height: 320px; }
.post-hero-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.post-hero.no-image { grid-template-columns: 1fr; }
.post-hero.no-image .post-hero-content { padding: 3rem; max-width: 900px; margin: 0 auto; align-items: center; text-align: center; }
.post-hero.no-image .post-hero-content .post-meta { justify-content: center; }

@media (max-width: 860px) {
  .post-hero { grid-template-columns: 1fr; min-height: 0; }
  .post-hero-content { padding: 2.2rem 1.5rem; order: 1; }
  .post-hero-img { order: 0; min-height: 260px; }
}

.post-content {
  max-width: 100%; margin: 0 auto; font-size: 1rem; line-height: 1.85; color: var(--ink);
}
.post-content p { margin: 0 0 1.4rem; }
.post-content h2 { font-size: 1.5rem; font-weight: 800; margin: 2.2rem 0 1rem; }
.post-content h3 { font-size: 1.2rem; font-weight: 800; margin: 1.8rem 0 0.8rem; }
.post-content ul, .post-content ol { margin: 0 0 1.4rem; padding-left: 1.4rem; }
.post-content li { margin-bottom: 0.5rem; line-height: 1.7; }
.post-content a { color: var(--clay); text-decoration: underline; }
.post-content a:hover { color: var(--clay-dark); }
.post-content img { max-width: 100%; height: auto; border-radius: var(--radius); margin: 1.5rem 0; }
.post-content blockquote {
  border-left: 3px solid var(--clay); margin: 1.8rem 0; padding: 0.2rem 0 0.2rem 1.4rem;
  font-style: italic; color: var(--muted); font-size: 1.05rem;
}
.post-content strong { color: var(--ink); }
.post-content hr { border: none; border-top: 1px solid rgba(26,18,8,0.1); margin: 2.5rem 0; }

.post-tags { max-width: 100%; margin: 2.5rem auto 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.post-tags a {
  font-size: 0.75rem; font-weight: 600; color: var(--muted); background: var(--sand);
  padding: 0.35rem 0.85rem; border-radius: 100px; text-decoration: none;
}
.post-tags a:hover { background: var(--sand-dark); }

.post-author-box {
  max-width: 100%; margin: 2.5rem auto 0; background: var(--sand);
  border-radius: var(--radius-lg); padding: 1.5rem; display: flex; gap: 1rem; align-items: center;
}
.post-author-box img { width: 56px; height: 56px; border-radius: 50%; flex-shrink: 0; }
.post-author-box .aname { font-weight: 700; font-size: 0.95rem; margin-bottom: 0.2rem; }
.post-author-box p { margin: 0; font-size: 0.82rem; color: var(--muted); }

.post-related { max-width: 100%; margin: 3.5rem auto 0; }
.post-related h2 { font-size: 1.2rem; margin-bottom: 1.4rem; }

.post-cta {
  max-width: 100%; margin: 3rem auto 0; background: var(--ink); color: var(--cream);
  border-radius: var(--radius-lg); padding: 2rem; text-align: center;
}
.post-cta h3 { font-size: 1.3rem; margin-bottom: 0.6rem; color: var(--cream); }
.post-cta p { color: rgba(253,250,244,0.7); margin-bottom: 1.2rem; font-size: 0.9rem; }

/* ===== COMENTARIOS ===== */
.post-comments { max-width: 100%; margin: 3rem auto 0; }
.post-comments h2 { font-size: 1.2rem; margin-bottom: 1.5rem; }
.comment-list { list-style: none; margin: 0 0 2rem; padding: 0; }
.comment-list .comment {
  padding: 1.2rem 0; border-top: 1px solid rgba(26,18,8,0.08);
}
.comment-author-name { font-weight: 700; font-size: 0.9rem; }
.comment-meta { font-size: 0.75rem; color: var(--muted); margin-bottom: 0.5rem; }
.comment-list .comment p { font-size: 0.88rem; line-height: 1.7; margin: 0; color: var(--ink); }
.comment-respond { background: var(--sand); border-radius: var(--radius-lg); padding: 1.6rem; }
.comment-respond h3 { font-size: 1rem; margin-bottom: 1rem; }
.comment-form p { margin-bottom: 0.9rem; }
.comment-form label { display: block; font-size: 0.8rem; font-weight: 600; margin-bottom: 0.4rem; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea {
  width: 100%; padding: 0.7rem 0.9rem; border: 1.5px solid rgba(26,18,8,0.15);
  border-radius: var(--radius); font-family: 'Inter', sans-serif; font-size: 0.88rem; background: #fff;
}
.comment-form textarea { min-height: 120px; resize: vertical; }
.comment-form .comment-form-cookies-consent { display: flex; align-items: center; gap: 0.5rem; }
.comment-form .comment-form-cookies-consent label { margin: 0; font-weight: 400; }
.comment-form .form-submit { margin-bottom: 0; }
.comment-form input[type="submit"] {
  display: inline-flex; align-items: center; font-family: 'Inter', sans-serif; font-weight: 700;
  font-size: 0.88rem; padding: 0.75rem 1.6rem; border-radius: var(--radius); border: 2px solid var(--ink);
  background: var(--clay); color: var(--cream); cursor: pointer; box-shadow: var(--shadow);
  transition: background var(--transition);
}
.comment-form input[type="submit"]:hover { background: var(--clay-dark); }
