/* Blog Grid */
.blog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
@media (min-width: 640px)  { .blog-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .blog-grid { grid-template-columns: repeat(3, 1fr); } }

/* Blog Card */
.blog-card {
  display: flex;
  flex-direction: column;
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: 1rem;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.2s, transform 0.2s;
  box-shadow: var(--shadow-card);
}
.blog-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.blog-card-image { height: 200px; overflow: hidden; }
.blog-card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.blog-card:hover .blog-card-image img { transform: scale(1.04); }
.blog-card-placeholder {
  background: hsl(var(--muted));
  display: flex; align-items: center; justify-content: center;
  color: hsl(var(--muted-foreground));
}

.blog-card-body  { padding: 1.5rem; display: flex; flex-direction: column; flex: 1; }
.blog-card-meta  { font-size: 0.78rem; color: hsl(var(--muted-foreground)); margin-bottom: 0.5rem; }
.blog-card-title { font-size: 1.1rem; font-weight: 700; color: hsl(var(--foreground)); margin-bottom: 0.5rem; line-height: 1.4; }
.blog-card-excerpt { font-size: 0.875rem; color: hsl(var(--muted-foreground)); line-height: 1.6; flex: 1; margin-bottom: 1rem; }
.blog-read-more { font-size: 0.875rem; font-weight: 600; color: hsl(var(--primary)); margin-top: auto; }

/* Pagination */
.blog-pagination { display: flex; gap: 0.5rem; justify-content: center; margin-top: 3rem; flex-wrap: wrap; }
.blog-page-btn {
  padding: 0.5rem 1rem;
  border: 1px solid hsl(var(--border));
  border-radius: 0.5rem;
  font-size: 0.875rem;
  color: hsl(var(--foreground));
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.blog-page-btn:hover, .blog-page-btn.active {
  background: hsl(var(--primary));
  color: white;
  border-color: hsl(var(--primary));
}

/* Single Post */
.blog-post-wrapper { padding-top: 2rem; padding-bottom: 4rem; max-width: 800px !important; }
.blog-post-hero    { border-radius: 1rem; overflow: hidden; margin-bottom: 2rem; max-height: 420px; }
.blog-post-hero-img { width: 100%; height: 100%; object-fit: cover; }
.blog-post-meta    { display: flex; align-items: center; gap: 0.75rem; font-size: 0.85rem; color: hsl(var(--muted-foreground)); margin-bottom: 1.25rem; flex-wrap: wrap; }
.blog-back-link    { color: hsl(var(--primary)); text-decoration: none; font-weight: 600; }
.blog-back-link:hover { text-decoration: underline; }
.blog-post-sep     { color: hsl(var(--border)); }
.blog-post-title   { font-size: clamp(1.75rem, 4vw, 2.5rem); font-weight: 800; line-height: 1.2; color: hsl(var(--foreground)); margin-bottom: 1rem; }
.blog-post-excerpt { font-size: 1.125rem; color: hsl(var(--muted-foreground)); line-height: 1.7; margin-bottom: 2rem; padding-bottom: 2rem; border-bottom: 1px solid hsl(var(--border)); }
.blog-post-footer  { display: flex; gap: 1rem; margin-top: 3rem; flex-wrap: wrap; }

/* Post content typography */
.blog-post-body { font-size: 1rem; line-height: 1.8; color: hsl(var(--foreground)); }
.blog-post-body h2 { font-size: 1.5rem; font-weight: 700; margin: 2rem 0 0.75rem; }
.blog-post-body h3 { font-size: 1.25rem; font-weight: 600; margin: 1.5rem 0 0.5rem; }
.blog-post-body p  { margin: 0 0 1.25rem; }
.blog-post-body ul, .blog-post-body ol { margin: 0 0 1.25rem 1.5rem; }
.blog-post-body li { margin-bottom: 0.35rem; }
.blog-post-body blockquote {
  border-left: 4px solid hsl(var(--primary));
  padding: 0.75rem 1.25rem;
  margin: 1.5rem 0;
  background: hsl(var(--muted));
  border-radius: 0 0.5rem 0.5rem 0;
  font-style: italic;
}
.blog-post-body code {
  background: hsl(var(--muted));
  padding: 0.15em 0.4em;
  border-radius: 0.25rem;
  font-size: 0.875em;
  font-family: monospace;
}
.blog-post-body pre {
  background: hsl(var(--muted));
  padding: 1.25rem;
  border-radius: 0.5rem;
  overflow-x: auto;
  margin: 1.5rem 0;
}
.blog-post-body pre code { background: none; padding: 0; }
.blog-post-body img { max-width: 100%; border-radius: 0.5rem; margin: 1rem 0; }
.blog-post-body a  { color: hsl(var(--primary)); text-decoration: underline; }
