/* Blog Styles — usa variables de theme.css */

/* Fix header fijo */
body.new-theme .blog-hero { padding-top: 7.5rem; }
body.new-theme .blog-post-main { padding-top: 7.5rem; }

/* === BLOG INDEX === */
.blog-hero { text-align: center; padding-bottom: 2rem; }
.blog-hero h1 { font-size: 2rem; font-weight: 700; margin: 0 0 0.5rem; }
.blog-hero p { font-size: 1.1rem; color: var(--muted-foreground); max-width: 600px; margin: 0 auto; }

.blog-grid {
  max-width: 900px; margin: 0 auto 3rem; padding: 0 1rem;
  display: grid; grid-template-columns: 1fr; gap: 1.5rem;
}
@media (min-width: 640px) { .blog-grid { grid-template-columns: 1fr 1fr; } }

.blog-card {
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 1.5rem; background: var(--card);
  transition: box-shadow var(--transition-base), border-color var(--transition-base);
  text-decoration: none; color: inherit; display: flex; flex-direction: column;
}
.blog-card:hover { border-color: var(--primary); box-shadow: var(--shadow-lg); }
.blog-card h2 { font-size: 1.1rem; font-weight: 600; margin: 0 0 0.5rem; line-height: 1.4; }
.blog-card p { font-size: 0.9rem; color: var(--muted-foreground); margin: 0; flex-grow: 1; }
.blog-card-meta { font-size: 0.78rem; color: var(--muted-foreground); margin-top: 0.75rem; padding-top: 0.75rem; border-top: 1px solid var(--border); }

.blog-card-badge {
  display: inline-block; font-size: 0.7rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.05em; padding: 3px 10px; border-radius: 20px; margin-bottom: 0.75rem; width: fit-content;
  border: 1px solid var(--border);
}
.badge-pilar { color: var(--primary); border-color: var(--primary); }
.badge-tofu { color: var(--primary); border-color: var(--primary); }
.badge-mofu { color: var(--accent); border-color: var(--accent); }
.badge-bofu { color: var(--destructive); border-color: var(--destructive); }

/* === BLOG POST === */
.blog-post-main { max-width: 760px; margin: 0 auto; padding-bottom: 3rem; }
.blog-post-header { margin-bottom: 2rem; }
.blog-post-header h1 { font-size: 2rem; font-weight: 700; line-height: 1.3; margin: 0 0 1rem; }
.blog-post-meta { display: flex; flex-wrap: wrap; gap: 1rem; font-size: 0.85rem; color: var(--muted-foreground); }

.blog-post-content h2 { font-size: 1.5rem; font-weight: 600; margin: 2.5rem 0 1rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.blog-post-content h3 { font-size: 1.2rem; font-weight: 600; margin: 2rem 0 0.75rem; }
.blog-post-content p { font-size: 1rem; line-height: 1.8; margin: 0 0 1.25rem; }
.blog-post-content ul, .blog-post-content ol { margin: 0 0 1.25rem; padding-left: 1.5rem; }
.blog-post-content li { line-height: 1.8; margin-bottom: 0.5rem; }

/* Tabla */
.blog-post-content table { border-collapse: collapse; }
.blog-post-content th, .blog-post-content td { padding: 0.6rem 0.5rem; }
.blog-post-content th { border-bottom: 2px solid var(--border); }
.blog-post-content tr { border-bottom: 1px solid var(--border); }
.blog-post-content tbody tr:first-child { background: rgba(34, 197, 94, 0.05); }

/* Highlight */
.blog-highlight {
  background: var(--secondary); border-left: 4px solid var(--primary);
  padding: 1rem 1.25rem; border-radius: 0 var(--radius) var(--radius) 0; margin: 1.5rem 0;
}
.blog-highlight p { margin: 0; }

/* TOC */
.blog-toc {
  background: var(--secondary); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.25rem 1.5rem; margin-bottom: 2rem;
}
.blog-toc h4 { margin: 0 0 0.75rem; font-size: 0.9rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.blog-toc ol { margin: 0; padding-left: 1.25rem; }
.blog-toc li { margin-bottom: 0.4rem; }
.blog-toc a { font-size: 0.9rem; }

/* CTA */
.blog-cta {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.2) 0%, rgba(34, 197, 94, 0.05) 100%);
  border: 1px solid var(--primary); border-radius: var(--radius-lg);
  padding: 2rem; text-align: center; margin: 2.5rem 0;
}
.blog-cta h3 { border: none !important; margin-top: 0 !important; padding-top: 0 !important; font-size: 1.3rem; }
.blog-cta a {
  display: inline-block; background: var(--primary); color: var(--primary-foreground);
  font-weight: 600; padding: 0.75rem 2rem; border-radius: var(--radius);
  text-decoration: none; margin-top: 0.5rem; transition: background var(--transition-fast);
}
.blog-cta a:hover { background: var(--primary-hover); color: var(--primary-foreground); }

/* Nav */
.blog-post-nav {
  display: flex; justify-content: space-between; gap: 1rem;
  margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--border);
}
.blog-post-nav a { font-weight: 500; font-size: 0.9rem; }
