/* ==========================================================================
   Astriva Technologies — Blog Stylesheet
   blog.css
   Covers: blog listing page + blog article page
   ========================================================================== */


/* Screen-reader only utility */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ==========================================================================
   BLOG LISTING — Grid
   ========================================================================== */

.blog-grid-section { padding: 72px 0; }

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

/* Featured card spans full row */
.blog-card--featured { grid-column: span 3; }

.blog-card {
  background: var(--bg-card, #0A1628);
  border: 1px solid var(--border-color, #1E3A5F);
  border-radius: var(--radius, 12px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.blog-card--featured { flex-direction: row; }
.blog-card:hover {
  transform: translateY(-4px);
  border-color: rgba(79,142,247,0.35);
  box-shadow: 0 16px 48px rgba(0,0,0,0.35);
}

/* Card image/visual panel */
.blog-card-visual {
  background: linear-gradient(135deg, #0F1E3D 0%, #0A1220 100%);
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
  aspect-ratio: 16/9;
  flex-shrink: 0;
}
.blog-card--featured .blog-card-visual {
  width: 44%;
  aspect-ratio: auto;
  min-height: 300px;
}
.blog-card-visual-glow {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 60% 60% at 50% 50%, rgba(167,139,250,0.15) 0%, transparent 70%);
}
.blog-card-visual-icon {
  position: relative; z-index: 1;
  width: 64px; height: 64px; color: rgba(167,139,250,0.5);
}
.blog-card-visual-label {
  position: absolute; bottom: 16px; left: 16px; z-index: 2;
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em;
  color: rgba(255,255,255,0.4);
}

/* Card body */
.blog-card-body {
  padding: 28px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.blog-card--featured .blog-card-body { padding: 36px; }

.blog-card-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.blog-card-tag {
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
  padding: 3px 10px; border-radius: 99px;
  background: rgba(167,139,250,0.1); color: #A78BFA;
}
.blog-card-tag--web    { background: rgba(79,142,247,0.1);  color: #4F8EF7; }
.blog-card-tag--mobile { background: rgba(34,211,238,0.1);  color: #22D3EE; }
.blog-card-tag--seo    { background: rgba(52,211,153,0.1);  color: #34D399; }

.blog-card-title {
  font-size: 17px; font-weight: 700; color: #fff;
  line-height: 1.4; margin-bottom: 10px;
  transition: color 0.2s;
}
.blog-card--featured .blog-card-title { font-size: clamp(19px, 2.5vw, 26px); }
.blog-card:hover .blog-card-title { color: #a5c1fa; }

.blog-card-excerpt {
  font-size: 14px; color: #6B7280;
  line-height: 1.75; margin-bottom: 20px;
  flex: 1;
}
.blog-card--featured .blog-card-excerpt { font-size: 15px; color: #94A3B8; }

.blog-card-meta {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  font-size: 12px; color: #4B5563;
  margin-bottom: 20px;
}
.blog-card-meta-dot { width: 3px; height: 3px; border-radius: 50%; background: #1E3A5F; }

.blog-card-read-more {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600; color: #4F8EF7;
  transition: gap 0.2s ease;
}
.blog-card-read-more svg { width: 14px; height: 14px; }
.blog-card:hover .blog-card-read-more { gap: 10px; }

/* Filter section scroll fix — prevents overflow on small screens */
.blog-filter-section .filter-tabs {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  flex-wrap: wrap; /* allow wrap on larger phones */
  scrollbar-width: none; /* hide scrollbar Firefox */
}
.blog-filter-section .filter-tabs::-webkit-scrollbar { display: none; }

/* Empty category state */
.blog-no-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: 64px 20px;
  color: #4B5563;
  font-size: 15px;
  display: none;
}
.blog-no-results.visible { display: block; }

/* ==========================================================================
   BLOG LISTING — Newsletter Section
   ========================================================================== */

.blog-newsletter-section {
  padding: 64px 0;
  background: var(--bg-section-alt, #0A1220);
  border-top: 1px solid rgba(30,58,95,0.5);
}
.blog-newsletter-inner {
  max-width: 520px; margin: 0 auto; text-align: center;
}
.blog-newsletter-title { font-size: 22px; font-weight: 700; color: #fff; margin-bottom: 10px; }
.blog-newsletter-desc { font-size: 14px; color: #94A3B8; line-height: 1.7; margin-bottom: 28px; }
.blog-newsletter-form { display: flex; gap: 10px; }
.blog-newsletter-input {
  flex: 1; height: 48px; padding: 0 16px;
  background: var(--bg-card, #0A1628);
  border: 1px solid var(--border-color, #1E3A5F);
  border-radius: var(--radius, 12px);
  color: #fff; font-size: 14px; font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}
.blog-newsletter-input::placeholder { color: #4B5563; }
.blog-newsletter-input:focus { border-color: rgba(79,142,247,0.45); }
.blog-newsletter-note { font-size: 12px; color: #4B5563; margin-top: 10px; }


/* ==========================================================================
   ARTICLE PAGE — Reading Progress Bar
   ========================================================================== */

.reading-progress {
  position: fixed; top: 0; left: 0; z-index: 9999;
  height: 3px; width: 0%;
  background: linear-gradient(90deg, #4F8EF7 0%, #A78BFA 50%, #22D3EE 100%);
  transition: width 0.08s linear;
  pointer-events: none;
}


/* ==========================================================================
   ARTICLE PAGE — Hero
   ========================================================================== */

.article-hero {
  padding: calc(var(--nav-height, 96px) + 56px) 0 64px;
  background: linear-gradient(180deg, #060C1A 0%, #0A1220 100%);
  position: relative; overflow: hidden;
}
.article-hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 900px 500px at 50% 0%, rgba(167,139,250,0.1) 0%, transparent 65%);
  pointer-events: none;
}
.article-hero-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(79,142,247,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(79,142,247,0.04) 1px, transparent 1px);
  background-size: 64px 64px;
  pointer-events: none;
}

.article-back-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600; color: #6B7280;
  text-decoration: none; margin-bottom: 28px;
  transition: color 0.2s;
  position: relative; z-index: 2;
}
.article-back-link:hover { color: #fff; }
.article-back-link svg { width: 14px; height: 14px; }

.article-hero-inner { position: relative; z-index: 2; max-width: 820px; }

.article-hero-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.article-hero-tag {
  font-size: 10px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase;
  padding: 4px 12px; border-radius: 99px;
  background: rgba(167,139,250,0.12); color: #A78BFA;
}
.article-hero-tag--blue { background: rgba(79,142,247,0.12); color: #4F8EF7; }

.article-hero-title {
  font-size: clamp(28px, 5vw, 52px); font-weight: 800;
  line-height: 1.15; color: #fff; margin-bottom: 20px;
}
.article-hero-title mark {
  background: linear-gradient(135deg, #4F8EF7, #A78BFA);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; font-style: normal;
}

.article-hero-subtitle {
  font-size: clamp(15px, 2vw, 17px); color: #94A3B8;
  line-height: 1.75; max-width: 680px; margin-bottom: 36px;
}

.article-hero-meta {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  font-size: 13px; color: #4B5563;
}
.article-hero-meta-item { display: flex; align-items: center; gap: 6px; }
.article-hero-meta-item svg { width: 13px; height: 13px; flex-shrink: 0; }
.article-hero-meta-sep { width: 4px; height: 4px; border-radius: 50%; background: #1E3A5F; }


/* ==========================================================================
   ARTICLE PAGE — Body Layout
   ========================================================================== */

.article-body { padding: 72px 0 80px; }
.article-layout {
  display: grid;
  grid-template-columns: 1fr 288px;
  gap: 72px;
  align-items: start;
}

/* ── Article Content ── */
.article-content { max-width: 720px; }

.article-content h2 {
  font-size: clamp(19px, 2.5vw, 26px); font-weight: 700; color: #fff;
  line-height: 1.3; margin: 56px 0 18px;
  padding-top: 56px; border-top: 1px solid rgba(30,58,95,0.5);
}
.article-content h2:first-child { margin-top: 0; padding-top: 0; border-top: none; }

.article-content h3 {
  font-size: clamp(15px, 2vw, 19px); font-weight: 700; color: #e2e8f0;
  margin: 32px 0 12px;
}

.article-content p {
  font-size: 16px; color: #94A3B8; line-height: 1.85;
  margin-bottom: 20px;
}

.article-content strong { color: #e2e8f0; font-weight: 600; }

.article-content a {
  color: #4F8EF7;
  text-decoration: underline;
  text-decoration-color: rgba(79,142,247,0.35);
  text-underline-offset: 3px;
  transition: color 0.2s, text-decoration-color 0.2s;
}
.article-content a:hover { color: #7fb3ff; text-decoration-color: rgba(79,142,247,0.7); }

/* Drop cap for lead paragraph */
.article-lead::first-letter {
  font-size: 72px; font-weight: 800; line-height: 0.7;
  float: left; margin: 10px 14px 0 0;
  background: linear-gradient(135deg, #4F8EF7, #A78BFA);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Unordered lists */
.article-content ul { list-style: none; padding: 0; margin: 0 0 24px; }
.article-content ul li {
  position: relative; padding: 6px 0 6px 24px;
  font-size: 15px; color: #94A3B8; line-height: 1.75;
}
.article-content ul li::before {
  content: '';
  position: absolute; left: 0; top: 15px;
  width: 6px; height: 6px; border-radius: 50%;
  background: #4F8EF7;
}

/* Ordered lists */
.article-content ol { list-style: none; padding: 0; margin: 0 0 24px; counter-reset: blog-ol; }
.article-content ol li {
  counter-increment: blog-ol;
  position: relative; padding: 7px 0 7px 36px;
  font-size: 15px; color: #94A3B8; line-height: 1.75;
}
.article-content ol li::before {
  content: counter(blog-ol);
  position: absolute; left: 0; top: 8px;
  width: 22px; height: 22px; border-radius: 50%;
  background: rgba(79,142,247,0.1);
  border: 1px solid rgba(79,142,247,0.2);
  font-size: 11px; font-weight: 700; color: #4F8EF7;
  display: flex; align-items: center; justify-content: center;
}

/* Inline code */
.article-content code {
  font-family: 'Courier New', monospace;
  font-size: 13px; background: rgba(79,142,247,0.08);
  border: 1px solid rgba(79,142,247,0.15);
  border-radius: 4px; padding: 1px 6px; color: #7fb3ff;
}

/* ── Callout / Info Box ── */
.blog-callout {
  background: rgba(79,142,247,0.05);
  border: 1px solid rgba(79,142,247,0.2);
  border-left: 3px solid #4F8EF7;
  border-radius: 0 var(--radius, 12px) var(--radius, 12px) 0;
  padding: 20px 24px; margin: 32px 0;
}
.blog-callout--astriva {
  background: rgba(167,139,250,0.06);
  border-color: rgba(167,139,250,0.2);
  border-left-color: #A78BFA;
}
.blog-callout--tip {
  background: rgba(52,211,153,0.06);
  border-color: rgba(52,211,153,0.2);
  border-left-color: #34D399;
}
.blog-callout-label {
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em;
  color: #4F8EF7; margin-bottom: 8px; display: block;
}
.blog-callout--astriva .blog-callout-label { color: #A78BFA; }
.blog-callout--tip .blog-callout-label { color: #34D399; }
.blog-callout p { font-size: 14px; color: #94A3B8; line-height: 1.75; margin: 0; }
.blog-callout p + p { margin-top: 10px; }

/* ── Stats Row ── */
.blog-stats-row {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
  margin: 32px 0;
}
.blog-stat-box {
  background: var(--bg-card, #0A1628);
  border: 1px solid var(--border-color, #1E3A5F);
  border-radius: var(--radius, 12px);
  padding: 22px 20px; text-align: center;
}
.blog-stat-num {
  font-size: clamp(22px, 3vw, 30px); font-weight: 800;
  background: linear-gradient(135deg, #4F8EF7, #22D3EE);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; display: block; margin-bottom: 6px;
}
.blog-stat-label { font-size: 12px; color: #6B7280; line-height: 1.45; }

/* ── Comparison Table ── */
.blog-table-wrap {
  overflow-x: auto; margin: 32px 0;
  border-radius: var(--radius, 12px);
  border: 1px solid var(--border-color, #1E3A5F);
}
.blog-table {
  width: 100%; min-width: 520px; border-collapse: collapse;
  font-size: 14px;
}
.blog-table thead { background: rgba(30,58,95,0.6); }
.blog-table thead th {
  padding: 14px 20px; text-align: left;
  font-weight: 700; font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em;
  color: #6B7280;
}
.blog-table thead th.col-ai { color: #A78BFA; }
.blog-table tbody tr { border-top: 1px solid rgba(30,58,95,0.5); }
.blog-table tbody tr:hover { background: rgba(79,142,247,0.025); }
.blog-table tbody td { padding: 14px 20px; color: #94A3B8; line-height: 1.5; }
.blog-table tbody td.col-trad { color: #6B7280; }
.blog-table tbody td.col-ai { color: #c4b5fd; }

/* ── Numbered Automation Sections ── */
.blog-auto-section { margin: 40px 0; }
.blog-auto-header {
  display: flex; align-items: center; gap: 14px; margin-bottom: 16px;
}
.blog-auto-num {
  flex-shrink: 0;
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, #4F8EF7, #A78BFA);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 800; color: #fff;
}
.blog-auto-header h3 { margin: 0; font-size: 18px; }

.blog-delivers {
  background: rgba(52,211,153,0.04);
  border: 1px solid rgba(52,211,153,0.12);
  border-radius: var(--radius, 12px);
  padding: 16px 20px; margin: 16px 0;
}
.blog-delivers-label {
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em;
  color: #34D399; margin-bottom: 10px; display: block;
}
.blog-delivers ul { margin: 0; }
.blog-delivers ul li { font-size: 14px; color: #94A3B8; padding: 4px 0 4px 20px; }
.blog-delivers ul li::before { width: 5px; height: 5px; top: 13px; background: #34D399; }

/* ── Mistake Cards ── */
.blog-mistakes { display: flex; flex-direction: column; gap: 14px; margin: 28px 0; }
.blog-mistake {
  background: var(--bg-card, #0A1628);
  border: 1px solid var(--border-color, #1E3A5F);
  border-radius: var(--radius, 12px);
  padding: 20px 22px;
  display: flex; gap: 16px; align-items: flex-start;
}
.blog-mistake-badge {
  flex-shrink: 0;
  background: rgba(248,113,113,0.08); border: 1px solid rgba(248,113,113,0.2);
  border-radius: 8px; padding: 8px 10px;
  font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em;
  color: #f87171; text-align: center; line-height: 1.3; min-width: 52px;
}
.blog-mistake-body h4 { font-size: 15px; font-weight: 700; color: #fff; margin-bottom: 5px; }
.blog-mistake-body p { font-size: 14px; color: #6B7280; line-height: 1.65; margin: 0; }

/* ── Partner Checklist ── */
.blog-checklist { display: flex; flex-direction: column; gap: 10px; margin: 24px 0; }
.blog-check-item {
  display: flex; align-items: flex-start; gap: 12px;
  font-size: 15px; color: #94A3B8; line-height: 1.6;
}
.blog-check-icon {
  flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%;
  background: rgba(52,211,153,0.1); border: 1px solid rgba(52,211,153,0.2);
  display: flex; align-items: center; justify-content: center;
  margin-top: 1px;
}
.blog-check-icon svg { width: 11px; height: 11px; color: #34D399; }

/* ── 30-Day Roadmap ── */
.blog-roadmap { margin: 32px 0; display: flex; flex-direction: column; }
.blog-roadmap-week {
  display: flex; gap: 20px;
  position: relative; padding-bottom: 36px;
}
.blog-roadmap-week:last-child { padding-bottom: 0; }
.blog-roadmap-week::after {
  content: '';
  position: absolute; left: 19px; top: 42px; bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, rgba(79,142,247,0.25), transparent);
}
.blog-roadmap-week:last-child::after { display: none; }

.blog-roadmap-dot {
  flex-shrink: 0; width: 40px; height: 40px; border-radius: 50%;
  background: rgba(79,142,247,0.1); border: 1px solid rgba(79,142,247,0.25);
  display: flex; align-items: center; justify-content: center;
  position: relative; z-index: 1;
}
.blog-roadmap-dot svg { width: 17px; height: 17px; color: #4F8EF7; }

.blog-roadmap-text { flex: 1; padding-top: 6px; }
.blog-roadmap-week-tag {
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em;
  color: #4F8EF7; margin-bottom: 4px;
}
.blog-roadmap-week-title { font-size: 16px; font-weight: 700; color: #fff; margin-bottom: 6px; }
.blog-roadmap-week-desc { font-size: 14px; color: #6B7280; line-height: 1.65; }

/* ── Article Author Strip ── */
.article-author {
  display: flex; align-items: center; gap: 18px;
  padding: 24px 28px; margin: 48px 0 0;
  background: var(--bg-card, #0A1628);
  border: 1px solid var(--border-color, #1E3A5F);
  border-radius: var(--radius, 12px);
}
.article-author-avatar {
  width: 52px; height: 52px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, #4F8EF7, #A78BFA);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 800; color: #fff;
}
.article-author-name { font-size: 15px; font-weight: 700; color: #fff; margin-bottom: 3px; }
.article-author-role { font-size: 13px; color: #6B7280; }

/* Article section divider */
.article-divider {
  border: none; border-top: 1px solid rgba(30,58,95,0.5);
  margin: 48px 0;
}


/* ==========================================================================
   ARTICLE PAGE — Sidebar
   ========================================================================== */

.blog-sidebar { position: sticky; top: 108px; }

.sidebar-widget {
  background: var(--bg-card, #0A1628);
  border: 1px solid var(--border-color, #1E3A5F);
  border-radius: var(--radius, 12px);
  padding: 22px;
  margin-bottom: 20px;
}
.sidebar-widget-title {
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em;
  color: #4B5563; margin-bottom: 14px;
}

/* Table of Contents */
.toc-list { list-style: none; padding: 0; margin: 0; }
.toc-item { margin-bottom: 2px; }
.toc-item a {
  display: block; padding: 6px 10px;
  font-size: 13px; color: #6B7280; text-decoration: none; line-height: 1.4;
  border-radius: 6px; border-left: 2px solid transparent;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
}
.toc-item a:hover { color: #e2e8f0; background: rgba(79,142,247,0.06); border-left-color: rgba(79,142,247,0.4); }
.toc-item.toc-active a { color: #4F8EF7; background: rgba(79,142,247,0.08); border-left-color: #4F8EF7; }

/* Share Buttons */
.sidebar-share-list { display: flex; flex-direction: column; gap: 8px; }
.sidebar-share-btn {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 14px; border-radius: 8px;
  font-size: 13px; font-weight: 600; color: #94A3B8;
  background: transparent; border: 1px solid var(--border-color, #1E3A5F);
  cursor: pointer; font-family: inherit; text-decoration: none;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.sidebar-share-btn svg { width: 15px; height: 15px; flex-shrink: 0; }
.sidebar-share-btn:hover {
  color: #fff; border-color: rgba(79,142,247,0.35);
  background: rgba(79,142,247,0.05);
}
.sidebar-share-btn--linkedin:hover { border-color: rgba(10,102,194,0.45); background: rgba(10,102,194,0.07); }
.sidebar-share-btn--copy { width: 100%; }

/* Sidebar CTA */
.sidebar-cta {
  background: linear-gradient(145deg, rgba(79,142,247,0.07), rgba(167,139,250,0.07));
  border: 1px solid rgba(79,142,247,0.18);
  border-radius: var(--radius, 12px);
  padding: 24px; text-align: center;
}
.sidebar-cta-icon {
  width: 44px; height: 44px; margin: 0 auto 14px;
  background: rgba(79,142,247,0.1); border: 1px solid rgba(79,142,247,0.2);
  border-radius: 10px; display: flex; align-items: center; justify-content: center;
}
.sidebar-cta-icon svg { width: 20px; height: 20px; color: #4F8EF7; }
.sidebar-cta-title { font-size: 15px; font-weight: 700; color: #fff; margin-bottom: 8px; }
.sidebar-cta-desc { font-size: 13px; color: #6B7280; line-height: 1.6; margin-bottom: 16px; }


/* ==========================================================================
   RELATED ARTICLES
   ========================================================================== */

.related-section {
  padding: 72px 0;
  background: var(--bg-section-alt, #0A1220);
  border-top: 1px solid rgba(30,58,95,0.5);
}
.related-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
  margin-top: 40px;
}
.related-card {
  background: var(--bg-card, #0A1628);
  border: 1px solid var(--border-color, #1E3A5F);
  border-radius: var(--radius, 12px);
  padding: 24px; text-decoration: none;
  display: flex; flex-direction: column; gap: 10px;
  transition: border-color 0.25s, transform 0.25s;
}
.related-card:hover { border-color: rgba(79,142,247,0.35); transform: translateY(-3px); }
.related-card-tag {
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
  padding: 3px 10px; border-radius: 99px;
  background: rgba(167,139,250,0.1); color: #A78BFA;
  width: fit-content;
}
.related-card-title { font-size: 15px; font-weight: 700; color: #fff; line-height: 1.4; }
.related-card-desc { font-size: 13px; color: #6B7280; line-height: 1.65; flex: 1; }
.related-card-soon {
  font-size: 11px; font-weight: 600; color: #4B5563;
  display: flex; align-items: center; gap: 5px;
}
.related-card-soon svg { width: 12px; height: 12px; }
.related-card-link {
  font-size: 12px; font-weight: 600; color: #4F8EF7;
  display: flex; align-items: center; gap: 4px;
}
.related-card-link svg { width: 12px; height: 12px; transition: transform 0.2s; }
.related-card:hover .related-card-link svg { transform: translateX(3px); }


/* ==========================================================================
   OVERFLOW GUARD — Prevent horizontal bleed on all blog sections
   ========================================================================== */

.blog-filter-section,
.blog-grid-section,
.blog-newsletter-section,
.blog-topics,
.article-hero,
.article-body,
.related-section {
  overflow-x: hidden;
}

/* Topics section — base padding (all viewports) */
.blog-topics {
  padding: 80px 0 96px;
  margin-top: 0 !important;
}

/* Word-break: prevent long words / URLs / code causing overflow on narrow screens */
.article-content p,
.article-content li,
.article-content h2,
.article-content h3,
.article-content h4,
.article-content a,
.article-content code,
.article-content strong,
.article-hero-title,
.article-hero-subtitle,
.blog-card-title,
.blog-card-excerpt,
.blog-callout p,
.blog-roadmap-week-title,
.blog-roadmap-week-desc,
.blog-mistake-body h4,
.blog-mistake-body p,
.blog-delivers ul li,
.sidebar-widget-title,
.related-card-title,
.related-card-desc {
  word-break: break-word;
  overflow-wrap: break-word;
}

/* Grid children — prevent content from escaping 1fr column */
.article-layout > * { min-width: 0; }

/* Hero inner and article content — always fill available width */
.article-hero-inner { width: 100%; box-sizing: border-box; }
.article-content    { width: 100%; max-width: 720px; box-sizing: border-box; }

/* Scroll margin so sticky nav doesn't cover anchor targets */
.article-content h2,
.article-content h3 {
  scroll-margin-top: 108px;
}


/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

/* ── 1199px — Narrow desktop ── */
@media (max-width: 1199px) {
  .article-layout { grid-template-columns: 1fr 256px; gap: 48px; }
}

/* ── 1023px — Tablet landscape ── */
@media (max-width: 1023px) {
  .article-layout { grid-template-columns: 1fr; gap: 40px; }
  .blog-sidebar { position: static; }

  /* Blog listing */
  .blog-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .blog-card--featured {
    grid-column: span 2;
    flex-direction: column;
  }
  /* Fix: reset aspect-ratio so the visual fills naturally by height */
  .blog-card--featured .blog-card-visual {
    width: 100%;
    aspect-ratio: 16 / 7;
    min-height: unset;
  }
  .blog-card--featured .blog-card-body { padding: 28px; }

  /* Related grid */
  .related-grid { grid-template-columns: repeat(2, 1fr); }

  /* Article section spacing */
  .article-body { padding: 56px 0 64px; }
  .article-content h2 { margin: 48px 0 16px; padding-top: 48px; }
}

/* ── 767px — Mobile landscape / large phones ── */
@media (max-width: 767px) {
  /* Blog listing */
  .blog-grid-section { padding: 40px 0; }
  .blog-grid { grid-template-columns: 1fr; gap: 16px; }
  .blog-card--featured {
    grid-column: span 1;
    flex-direction: column;
  }
  .blog-card--featured .blog-card-visual {
    width: 100%;
    aspect-ratio: 16 / 8;
    min-height: unset;
  }
  .blog-card-body { padding: 20px 22px; }
  .blog-card--featured .blog-card-body { padding: 20px 22px; }

  /* Stats row */
  .blog-stats-row { grid-template-columns: 1fr; gap: 12px; }

  /* Related */
  .related-grid { grid-template-columns: 1fr; }
  .related-section { padding: 48px 0; }

  /* Topics section */
  .blog-topics { padding: 56px 0 64px !important; margin-top: 0 !important; }
  .topics-grid  { margin-top: 28px; gap: 10px; }
  .topic-pill   { padding: 9px 16px; font-size: 13px; }

  /* Article hero — recalculate top padding for smaller mobile nav (~76px) */
  .article-hero {
    padding-top: calc(76px + 36px);
    padding-bottom: 40px;
  }

  /* Article body */
  .article-body { padding: 40px 0 48px; }
  .article-content h2 { margin: 36px 0 14px; padding-top: 36px; font-size: 20px; }
  .article-content h3 { margin: 24px 0 10px; font-size: 17px; }
  .article-content p { font-size: 15px; line-height: 1.8; }

  /* Stats row — full width on mobile */
  .blog-stat-box { padding: 18px 14px; }
  .blog-stat-num { font-size: clamp(20px, 6vw, 28px); }

  /* Callouts — tighter on mobile */
  .blog-callout { padding: 16px 18px; margin: 20px 0; }

  /* Roadmap — tighter gap */
  .blog-roadmap-week { gap: 14px; padding-bottom: 28px; }
  .blog-roadmap-dot  { width: 34px; height: 34px; flex-shrink: 0; }

  /* Checklist — smaller text */
  .blog-check-item { font-size: 14px; }

  /* Auto sections */
  .blog-auto-header { gap: 10px; }
  .blog-auto-num    { width: 30px; height: 30px; font-size: 13px; flex-shrink: 0; }
  .blog-auto-header h3 { font-size: 16px; }

  /* Mistake cards */
  .blog-mistake-badge { min-width: 44px; font-size: 8px; padding: 6px 8px; }

  /* Delivers box */
  .blog-delivers { padding: 14px 16px; }
  .blog-delivers ul li { font-size: 13px; }

  /* Article author */
  .article-author {
    flex-direction: column;
    text-align: center;
    align-items: center;
    gap: 12px;
    padding: 20px;
  }

  /* Roadmap line fix */
  .blog-roadmap-week::after { left: 19px; }

  /* Mistake cards */
  .blog-mistake { flex-direction: column; gap: 10px; }
  .blog-mistake-badge { width: fit-content; }

  /* Drop cap too large on mobile */
  .article-lead::first-letter { font-size: 54px; margin: 6px 12px 0 0; }

  /* Sidebar widgets: natural stacking, remove excessive margin */
  .sidebar-widget { margin-bottom: 14px; }
}

/* ── 479px — Small phones ── */
@media (max-width: 479px) {
  /* Blog listing card — tighten */
  .blog-card-body { padding: 16px 18px; }
  .blog-card-title { font-size: 16px; }
  .blog-card-excerpt { font-size: 13px; }

  /* Stats single column (redundant safety) */
  .blog-stats-row { grid-template-columns: 1fr; }

  /* Table horizontal scroll hint */
  .blog-table-wrap { -webkit-overflow-scrolling: touch; }

  /* Topics section — small phones */
  .blog-topics  { padding: 44px 0 52px !important; }
  .topics-grid  { margin-top: 20px; gap: 8px; }
  .topic-pill   { padding: 8px 14px; font-size: 12px; gap: 6px; }
  .topic-pill svg { width: 12px; height: 12px; }

  /* Article hero */
  .article-hero { padding-top: calc(76px + 24px); padding-bottom: 32px; }
  .article-hero-title    { font-size: clamp(20px, 6.5vw, 28px); }
  .article-hero-subtitle { font-size: 14px; margin-bottom: 24px; }
  .article-back-link     { margin-bottom: 18px; }

  /* Article content */
  .article-content h2    { font-size: 17px; padding-top: 28px; margin: 28px 0 12px; }
  .article-content h3    { font-size: 15px; }
  .article-content p     { font-size: 14px; }

  /* Drop cap — very small on tiny screens */
  .article-lead::first-letter { font-size: 40px; margin: 4px 8px 0 0; }

  /* Stats */
  .blog-stat-box  { padding: 14px 12px; }
  .blog-stat-num  { font-size: clamp(18px, 5.5vw, 24px); }
  .blog-stat-label { font-size: 11px; }

  /* Callouts */
  .blog-callout { padding: 14px 16px; margin: 16px 0; }
  .blog-callout p { font-size: 13px; }

  /* Roadmap */
  .blog-roadmap-week  { gap: 12px; padding-bottom: 24px; }
  .blog-roadmap-dot   { width: 30px; height: 30px; }
  .blog-roadmap-dot svg { width: 14px; height: 14px; }
  .blog-roadmap-week-title { font-size: 14px; }
  .blog-roadmap-week-desc  { font-size: 13px; }

  /* Roadmap connector line x-offset */
  .blog-roadmap-week::after { left: 15px; }

  /* Checklist */
  .blog-check-item  { font-size: 13px; gap: 10px; }
  .blog-check-icon  { width: 20px; height: 20px; flex-shrink: 0; }

  /* Mistake cards */
  .blog-mistake       { padding: 16px 14px; gap: 10px; }
  .blog-mistake-badge { min-width: 40px; font-size: 8px; }
  .blog-mistake-body h4 { font-size: 14px; }
  .blog-mistake-body p  { font-size: 13px; }

  /* Author strip */
  .article-author         { padding: 16px 14px; gap: 10px; }
  .article-author-avatar  { width: 44px; height: 44px; font-size: 15px; }
  .article-author-name    { font-size: 14px; }
  .article-author-role    { font-size: 12px; }

  /* Related cards */
  .related-card { padding: 18px 16px; }
  .related-card-title { font-size: 14px; }
  .related-card-desc  { font-size: 12px; }
}

/* ── Touch devices — disable stuck hover states ── */
@media (hover: none) and (pointer: coarse) {
  .blog-card:hover { transform: none; box-shadow: none; }
  .related-card:hover { transform: none; }
  .blog-stat-box:hover { border-color: var(--border-color, #1E3A5F); }
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  .blog-card,
  .related-card,
  .blog-stat-box { transition: none; }
}
