/* ============================================================
   blog.css — DataVix Blog (index + post pages)
   ============================================================ */

/* ── Shared ── */
.blog-index-wrap, .blog-post-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 48px 24px 96px;
}

/* Always-visible enroll bar (unlike the homepage's version, this isn't
   scroll-toggled by JS — blog pages don't load landing.js, and readers
   scrolling through a 4,000-word article should never lose the CTA). */
.blog-sticky-cta {
  text-decoration: none;
  cursor: pointer;
}
.blog-sticky-cta .sticky-btn {
  display: inline-block;
  text-decoration: none;
}
/* Extra bottom padding everywhere so the fixed bar never covers the
   footer links or the last paragraph of an article. */
.blog-index-wrap, .blog-post-wrap, .footer, .social-footer {
  padding-bottom: 100px;
}

.blog-hero {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 40px;
}
.blog-hero h1 {
  font-size: clamp(28px, 5vw, 42px);
  font-weight: 800;
  margin: 12px 0 14px;
  line-height: 1.2;
}
.blog-hero p {
  color: #94a3b8;
  font-size: 15px;
  line-height: 1.7;
}

/* ── Tag pills ── */
.tag-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 36px;
}
.tag-pill {
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid #1e293b;
  color: #94a3b8;
  font-size: 13px;
  text-decoration: none;
  transition: all 0.2s;
}
.tag-pill:hover, .tag-pill.active {
  border-color: #38bdf8;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.08);
}

/* ── Blog grid + cards ── */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

.blog-card {
  display: flex;
  flex-direction: column;
  background: #0f172a;
  border: 1px solid #1e293b;
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s, border-color 0.2s;
}
.blog-card:hover {
  transform: translateY(-4px);
  border-color: #38bdf8;
}
.blog-card-cover {
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.blog-card-emoji { font-size: 44px; }
.blog-card-body { padding: 20px 22px 24px; }
.blog-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #64748b;
  margin-bottom: 10px;
}
.blog-card-category { color: #38bdf8; font-weight: 600; }
.blog-card-dot { color: #334155; }
.blog-card-body h2 {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 8px;
  color: #f1f5f9;
}
.blog-card-body p {
  font-size: 13.5px;
  color: #94a3b8;
  line-height: 1.6;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.blog-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12.5px;
  color: #64748b;
}
.blog-card-arrow { color: #38bdf8; font-weight: 600; }
.blog-empty { text-align: center; color: #64748b; grid-column: 1 / -1; padding: 60px 0; }

/* ── Pagination ── */
.blog-pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 48px;
}
.page-num {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px;
  border: 1px solid #1e293b;
  color: #94a3b8;
  text-decoration: none;
  font-size: 14px;
}
.page-num.active, .page-num:hover { border-color: #38bdf8; color: #38bdf8; }

/* ── Post: breadcrumb + header ── */
.blog-breadcrumb {
  font-size: 13px;
  color: #64748b;
  margin-bottom: 20px;
}
.blog-breadcrumb a { color: #38bdf8; text-decoration: none; }
.blog-breadcrumb span { margin: 0 4px; }

.blog-post-header { max-width: 780px; margin: 0 auto 40px; text-align: center; }
.blog-post-header h1 {
  font-size: clamp(28px, 5vw, 40px);
  font-weight: 800;
  line-height: 1.25;
  margin: 14px 0 16px;
}
.blog-post-lede { color: #94a3b8; font-size: 16px; line-height: 1.7; margin-bottom: 20px; }
.blog-post-meta {
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: center;
  font-size: 13px; color: #64748b;
}
.blog-post-meta strong { color: #cbd5e1; }

.blog-post-content {
  max-width: 760px;
  margin: 0 auto;
  font-size: 16px;
  line-height: 1.85;
  color: #cbd5e1;
}

/* Inline "enroll" callouts dropped after key sections in the article body
   (rendered from markdown blockquotes with a leading emoji) — styled
   distinctly from the regular <blockquote> so they read as a CTA, not a
   quoted aside. */
.blog-post-content blockquote.cta-inline {
  border-left: 3px solid #a78bfa;
  background: linear-gradient(160deg, #0f172a, #1e1b4b);
  padding: 16px 20px;
  border-radius: 0 10px 10px 0;
  color: #e2e8f0;
  font-size: 15px;
}
.blog-post-content blockquote.cta-inline p { margin-bottom: 0; }
.blog-post-content blockquote.cta-inline a {
  color: #a78bfa;
  font-weight: 600;
}
.blog-post-content h2 {
  font-size: 26px;
  font-weight: 700;
  color: #f1f5f9;
  margin: 44px 0 16px;
  scroll-margin-top: 90px;
}
.blog-post-content h3 {
  font-size: 20px;
  font-weight: 700;
  color: #e2e8f0;
  margin: 32px 0 12px;
}
.blog-post-content p { margin-bottom: 18px; }
.blog-post-content ul, .blog-post-content ol {
  margin: 0 0 18px 22px;
}
.blog-post-content li { margin-bottom: 8px; }
.blog-post-content strong { color: #f1f5f9; }
.blog-post-content a { color: #38bdf8; }
.blog-post-content blockquote {
  border-left: 3px solid #38bdf8;
  padding: 12px 20px;
  margin: 24px 0;
  background: #0f172a;
  border-radius: 0 10px 10px 0;
  color: #94a3b8;
}
.blog-post-content code {
  background: #1e293b;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 14px;
  color: #38bdf8;
}
.blog-post-content pre {
  background: #0f172a;
  border: 1px solid #1e293b;
  border-radius: 10px;
  padding: 16px;
  overflow-x: auto;
  margin-bottom: 20px;
}
.blog-post-content pre code { background: none; padding: 0; }
.blog-post-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 24px;
  font-size: 14.5px;
}
.blog-post-content th, .blog-post-content td {
  border: 1px solid #1e293b;
  padding: 10px 14px;
  text-align: left;
}
.blog-post-content th { background: #0f172a; color: #38bdf8; }
.blog-post-content hr { border: none; border-top: 1px solid #1e293b; margin: 36px 0; }

/* ── Table of contents ── */
.blog-toc {
  background: #0f172a;
  border: 1px solid #1e293b;
  border-radius: 14px;
  padding: 20px 24px;
  margin-bottom: 36px;
}
.blog-toc h2 {
  font-size: 12px !important;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b !important;
  margin: 0 0 12px !important;
  font-weight: 700;
}
.blog-toc ol { list-style: decimal; margin-left: 18px; }
.blog-toc li { margin-bottom: 6px; }
.blog-toc a { color: #cbd5e1; text-decoration: none; font-size: 14px; }
.blog-toc a:hover { color: #38bdf8; }

/* ── Sticky CTA sidebar ── */
.blog-post-cta { position: sticky; top: 24px; }
.cta-card {
  background: linear-gradient(160deg, #0f172a, #1e1b4b);
  border: 1px solid #312e81;
  border-radius: 16px;
  padding: 26px 22px;
  text-align: center;
}
.cta-card h3 { font-size: 18px; margin-bottom: 10px; color: #f1f5f9; }
.cta-card p { font-size: 13.5px; color: #94a3b8; line-height: 1.6; margin-bottom: 18px; }
.cta-card .btn-gradient { display: inline-block; text-decoration: none; padding: 12px 22px; }

/* ── FAQ ── */
.blog-faq { margin-top: 48px; }
.blog-faq h2 { font-size: 26px; font-weight: 700; margin-bottom: 20px; color: #f1f5f9; }
.faq-item {
  background: #0f172a;
  border: 1px solid #1e293b;
  border-radius: 12px;
  padding: 18px 22px;
  margin-bottom: 14px;
}
.faq-item h3 { font-size: 15.5px; color: #f1f5f9; margin-bottom: 8px; }
.faq-item p { font-size: 14px; color: #94a3b8; margin: 0; }

/* ── Related posts ── */
.blog-related { margin-top: 64px; }
.blog-related h2 { font-size: 24px; font-weight: 700; margin-bottom: 22px; }
