/* ── Blog Listing Page ── */
.blog-listing { max-width: 1100px; margin: 0 auto; padding: 0 16px; }

.blog-filters {
  display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 28px;
  justify-content: center;
}
.blog-filter {
  padding: 7px 16px; border-radius: 20px; font-size: .82rem; font-weight: 600;
  border: 1.5px solid var(--border, #cbd5e1); background: transparent;
  color: var(--text, #1e293b); cursor: pointer; transition: all .2s;
}
.blog-filter:hover { background: var(--bg-hover, #f1f5f9); }
.blog-filter--active {
  background: var(--accent, #6366f1); color: #fff; border-color: var(--accent, #6366f1);
}
.dark-mode .blog-filter { border-color: #475569; color: #e2e8f0; }
.dark-mode .blog-filter:hover { background: #334155; }
.dark-mode .blog-filter--active { background: var(--accent, #6366f1); color: #fff; border-color: var(--accent, #6366f1); }

/* Card Grid — 3 per row desktop, 2 tablet, 1 mobile */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 900px) { .blog-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .blog-grid { grid-template-columns: 1fr; } }

.blog-card {
  display: flex; flex-direction: column;
  border-radius: 12px; overflow: hidden;
  border: 1px solid var(--border, #e2e8f0);
  background: var(--card-bg, #fff);
  text-decoration: none; color: inherit;
  transition: transform .2s, box-shadow .2s;
}
.blog-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,.08);
}
.dark-mode .blog-card { border-color: #334155; background: var(--card-bg, #1e293b); }
.dark-mode .blog-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,.3); }

.blog-card__thumb {
  width: 100%; height: 180px; object-fit: cover; display: block;
  background: var(--bg-hover, #f1f5f9);
}
.blog-card__thumb--placeholder {
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem; opacity: .3;
}
.dark-mode .blog-card__thumb { background: #1e293b; }
.dark-mode .blog-card__thumb--placeholder { opacity: .15; }

.blog-card__body { padding: 16px; flex: 1; display: flex; flex-direction: column; }
.blog-card__cat {
  font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  color: var(--accent, #6366f1); margin-bottom: 6px;
}
.blog-card__title {
  font-size: 1.05rem; font-weight: 700; line-height: 1.35; margin: 0 0 8px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.blog-card__excerpt {
  font-size: .84rem; color: var(--text-muted, #64748b); line-height: 1.5; margin: 0 0 12px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
  flex: 1;
}
.blog-card__footer {
  display: flex; justify-content: space-between; align-items: center;
  font-size: .78rem; color: var(--text-muted, #64748b); border-top: 1px solid var(--border, #e2e8f0);
  padding-top: 10px; margin-top: auto;
}
.dark-mode .blog-card__footer { border-color: #334155; }
.blog-card__readmore { color: var(--accent, #6366f1); font-weight: 600; }

/* Pagination */
.blog-pagination {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  padding: 32px 0 16px;
}
.blog-page-btn {
  padding: 8px 18px; border-radius: 8px; font-size: .84rem; font-weight: 600;
  border: 1.5px solid var(--border, #cbd5e1); background: transparent;
  color: var(--text, #1e293b); cursor: pointer; transition: background .2s;
}
.blog-page-btn:hover { background: var(--bg-hover, #f1f5f9); }
.blog-page-info { font-size: .84rem; color: var(--text-muted, #64748b); }
.blog-empty { text-align: center; padding: 60px 0; color: var(--text-muted, #64748b); }

/* ── Individual Blog Post ── */
.blog-article { max-width: 760px; margin: 0 auto; padding: 0 16px 40px; }
.blog-back-link {
  display: inline-block; margin-bottom: 16px; font-size: .84rem;
  color: var(--accent, #6366f1); text-decoration: none; font-weight: 600;
}
.blog-back-link:hover { text-decoration: underline; }
.blog-article__meta {
  display: flex; align-items: center; gap: 12px; margin-bottom: 8px;
}
.blog-article__category {
  font-size: .72rem; font-weight: 700; text-transform: uppercase;
  color: var(--accent, #6366f1); letter-spacing: .04em;
}
.blog-article__date { font-size: .8rem; color: var(--text-muted, #64748b); }
.blog-article__title { font-size: 1.8rem; font-weight: 800; line-height: 1.25; margin: 0 0 20px; }
.blog-article__hero {
  width: 100%; height: 0; padding-bottom: 45%; border-radius: 12px;
  background-size: cover; background-position: center; background-color: var(--bg-hover, #f1f5f9);
  margin-bottom: 28px;
}
.blog-article__hero:empty { display: none; }
.blog-article__body {
  font-size: .94rem; line-height: 1.8; color: var(--text, #1e293b);
}
.blog-article__body h1,.blog-article__body h2,.blog-article__body h3 { margin: 1.5em 0 .5em; font-weight: 700; }
.blog-article__body h2 { font-size: 1.35rem; }
.blog-article__body h3 { font-size: 1.1rem; }
.blog-article__body p { margin: 0 0 1em; }
.blog-article__body img { max-width: 100%; border-radius: 8px; margin: 12px 0; }
.blog-article__body blockquote {
  border-left: 3px solid var(--accent, #6366f1); margin: 1em 0; padding: .5em 1em;
  background: var(--bg-hover, #f8fafc); border-radius: 0 8px 8px 0;
}
.blog-article__body pre {
  background: #1e293b; color: #e2e8f0; padding: 16px; border-radius: 8px;
  overflow-x: auto; font-size: .85rem; line-height: 1.6;
}
.blog-article__body code { font-size: .88em; }
.blog-article__body ul,.blog-article__body ol { padding-left: 1.5em; margin: 0 0 1em; }
.dark-mode .blog-article__body { color: #e2e8f0; }
.dark-mode .blog-article__body blockquote { background: #1e293b; }

/* ── Comments ── */
.blog-comments { margin-top: 48px; border-top: 1px solid var(--border, #e2e8f0); padding-top: 28px; }
.blog-comments__title { font-size: 1.15rem; font-weight: 700; margin: 0 0 20px; }

.comment-form { display: flex; flex-direction: column; gap: 10px; margin-bottom: 28px; }
.comment-form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 480px) { .comment-form__row { grid-template-columns: 1fr; } }
.comment-form input, .comment-form textarea {
  padding: 10px 12px; border-radius: 8px; font-size: .86rem;
  border: 1.5px solid var(--border, #cbd5e1); background: var(--card-bg, #fff);
  color: var(--text, #1e293b); transition: border-color .2s;
}
.comment-form input:focus, .comment-form textarea:focus {
  outline: none; border-color: var(--accent, #6366f1);
  box-shadow: 0 0 0 3px rgba(99,102,241,.15);
}
.comment-form textarea { resize: vertical; min-height: 70px; }
.dark-mode .comment-form input, .dark-mode .comment-form textarea {
  background: var(--card-bg, #1e293b); border-color: #475569; color: #e2e8f0;
}

.comments-list { display: flex; flex-direction: column; gap: 0; }
.comments-empty { color: var(--text-muted, #64748b); font-size: .88rem; }

.comment {
  padding: 14px 0; border-bottom: 1px solid var(--border, #f1f5f9);
}
.comment--reply { margin-left: 32px; padding: 10px 0; }
.comment-replies { border-left: 2px solid var(--border, #e2e8f0); margin-left: 16px; padding-left: 16px; }
.dark-mode .comment { border-color: #1e293b; }
.dark-mode .comment-replies { border-color: #334155; }
.comment__header { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.comment__name { font-size: .88rem; }
.comment-verified {
  font-size: .7rem; color: #16a34a; font-weight: 600;
  background: #dcfce7; padding: 1px 6px; border-radius: 4px;
}
.dark-mode .comment-verified { background: #14532d; color: #86efac; }
.comment__time { font-size: .75rem; color: var(--text-muted, #94a3b8); }
.comment__body { font-size: .88rem; line-height: 1.55; margin: 0; color: var(--text, #334155); }
.dark-mode .comment__body { color: #cbd5e1; }
.comment-reply-btn {
  font-size: .76rem; color: var(--accent, #6366f1); background: none; border: none;
  cursor: pointer; padding: 4px 0; font-weight: 600; margin-top: 4px;
}
.comment-reply-btn:hover { text-decoration: underline; }
