/* Module 10 — Blog (listing + article) — built on styleguide.css */

.blog-wrap { background: var(--snow); }
.bg { width: 1280px; margin: 0 auto; padding: 0 24px; }

/* Crumbs */
.crumbs {
  display: flex; align-items: center; gap: 8px;
  padding: 24px 0 16px;
  font-family: 'Inter'; font-size: 13px; color: var(--grey);
}
.crumbs a { color: var(--grey); text-decoration: none; }
.crumbs a:hover { color: var(--voltage); }
.crumbs .sep { color: var(--grey-light); }
.crumbs .cur { color: var(--midnight); }

/* Tabs */
.bg-tabs {
  display: inline-flex; gap: 4px;
  background: var(--mist);
  padding: 4px;
  border-radius: 999px;
  margin-bottom: 32px;
}
.bg-tab {
  padding: 10px 18px;
  border-radius: 999px;
  font-family: 'Manrope'; font-weight: 600; font-size: 14px;
  background: transparent; color: var(--graphite); border: none;
  cursor: pointer;
}
.bg-tab.active { background: var(--snow); color: var(--midnight); box-shadow: 0 1px 4px rgba(15,42,61,0.08); }

/* ============= LISTING ============= */
.bg-list-hero {
  padding: 32px 0 48px;
}
.bg-list-h1 {
  font-family: 'Manrope'; font-weight: 800; font-size: 64px; line-height: 68px;
  letter-spacing: -0.025em; color: var(--midnight); margin: 0;
  max-width: 880px;
}
.bg-list-sub {
  font-family: 'Inter'; font-size: 18px; line-height: 28px; color: var(--grey);
  margin: 24px 0 0; max-width: 720px;
}

/* Categories filter row */
.bg-cats {
  display: flex; gap: 8px; flex-wrap: wrap;
  padding: 24px 0;
  border-top: 1px solid var(--stone);
  border-bottom: 1px solid var(--stone);
  margin-bottom: 48px;
  align-items: center;
}
.bg-cats-label {
  font-family: 'Inter'; font-weight: 600; font-size: 13px;
  color: var(--grey); text-transform: uppercase; letter-spacing: 0.06em;
  margin-right: 16px;
}
.bg-cat {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--stone);
  background: var(--snow);
  font-family: 'Manrope'; font-weight: 500; font-size: 13px;
  color: var(--graphite);
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
}
.bg-cat:hover { border-color: var(--midnight); }
.bg-cat.active { background: var(--midnight); color: var(--snow); border-color: var(--midnight); }
.bg-cat .num { color: var(--grey-light); font-weight: 500; font-size: 12px; }
.bg-cat.active .num { color: rgba(255,255,255,0.5); }
.bg-cats-search {
  margin-left: auto;
  position: relative;
  width: 280px;
}
.bg-cats-search input {
  height: 40px; width: 100%;
  padding: 0 16px 0 40px;
  border: 1px solid var(--stone); border-radius: 999px;
  background: var(--snow);
  font-family: 'Inter'; font-size: 14px;
}
.bg-cats-search-icon {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: var(--grey-light);
}

/* Featured (hero) post + 2 secondaries */
.bg-feature {
  display: grid; grid-template-columns: 2fr 1fr; gap: 24px;
  margin-bottom: 64px;
}
.bg-feature-main {
  border-radius: 20px; overflow: hidden;
  background: var(--midnight);
  position: relative;
  min-height: 480px;
  display: flex; align-items: flex-end;
  cursor: pointer;
  isolation: isolate;
}
.bg-feature-main::before {
  content: '';
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(15,42,61,0) 30%, rgba(15,42,61,0.85) 100%),
    radial-gradient(ellipse at 70% 30%, #2c4a66 0%, #0F2A3D 70%),
    repeating-linear-gradient(110deg, rgba(255,255,255,0.04) 0 80px, rgba(255,255,255,0.07) 80px 160px);
  z-index: -1;
}
.bg-feature-main-content {
  padding: 40px;
  color: var(--snow);
  max-width: 600px;
}
.bg-feature-main-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 4px 12px;
  background: var(--voltage);
  color: var(--midnight);
  font-family: 'Inter'; font-weight: 700; font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase;
  border-radius: 999px;
  margin-bottom: 20px;
}
.bg-feature-main-h {
  font-family: 'Manrope'; font-weight: 700; font-size: 36px; line-height: 44px;
  letter-spacing: -0.02em; color: var(--snow); margin: 0 0 16px;
}
.bg-feature-main-meta {
  display: flex; gap: 16px; color: rgba(255,255,255,0.6);
  font-family: 'Inter'; font-size: 13px;
}

.bg-feature-secondaries { display: flex; flex-direction: column; gap: 24px; }
.bg-fs-card {
  position: relative;
  flex: 1;
  border-radius: 16px; overflow: hidden;
  background: var(--mist);
  padding: 24px;
  display: flex; flex-direction: column;
  cursor: pointer;
  border: 1px solid var(--stone);
}
.bg-fs-card.alert {
  background: linear-gradient(135deg, #FFE9EA 0%, #FFD8DA 100%);
  border-color: rgba(229,72,77,0.2);
}
.bg-fs-cat {
  font-family: 'Inter'; font-weight: 600; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--voltage); margin-bottom: 12px;
}
.bg-fs-card.alert .bg-fs-cat { color: var(--alert); }
.bg-fs-h {
  font-family: 'Manrope'; font-weight: 700; font-size: 22px; line-height: 28px;
  letter-spacing: -0.01em; color: var(--midnight);
  margin: 0 0 12px;
}
.bg-fs-meta {
  margin-top: auto;
  display: flex; gap: 12px;
  font-family: 'Inter'; font-size: 12px; color: var(--grey);
}

/* Post grid */
.bg-section-h {
  font-family: 'Manrope'; font-weight: 700; font-size: 28px;
  color: var(--midnight); letter-spacing: -0.015em;
  margin: 0 0 24px;
  display: flex; justify-content: space-between; align-items: baseline;
}
.bg-section-h a {
  font-family: 'Manrope'; font-weight: 600; font-size: 14px;
  color: var(--midnight); text-decoration: none;
}

.bg-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
  margin-bottom: 48px;
}
.bg-card {
  border: 1px solid var(--stone);
  border-radius: 16px;
  background: var(--snow);
  overflow: hidden;
  cursor: pointer;
  display: flex; flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.bg-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-pop); }
.bg-card-img {
  height: 200px;
  position: relative;
  background:
    linear-gradient(180deg, rgba(15,42,61,0.05), rgba(15,42,61,0.0)),
    repeating-linear-gradient(135deg, #DCE3E8 0 12px, #E5EBEF 12px 24px);
  display: flex; align-items: flex-end; padding: 16px;
}
.bg-card-img.tone-2 {
  background:
    linear-gradient(180deg, rgba(15,42,61,0.05), rgba(15,42,61,0.0)),
    repeating-linear-gradient(135deg, #E5EFEB 0 12px, #EEF6F2 12px 24px);
}
.bg-card-img.tone-3 {
  background:
    linear-gradient(180deg, rgba(15,42,61,0.05), rgba(15,42,61,0.0)),
    repeating-linear-gradient(135deg, #E8E5DE 0 12px, #F1EEE8 12px 24px);
}
.bg-card-cat {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  background: rgba(255,255,255,0.95);
  color: var(--midnight);
  font-family: 'Inter'; font-weight: 600; font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase;
  border-radius: 999px;
}
.bg-card-body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.bg-card-h {
  font-family: 'Manrope'; font-weight: 700; font-size: 20px; line-height: 26px;
  letter-spacing: -0.01em; color: var(--midnight); margin: 0;
}
.bg-card-excerpt {
  font-family: 'Inter'; font-size: 14px; line-height: 22px; color: var(--grey);
  margin: 0;
}
.bg-card-meta {
  display: flex; gap: 12px; align-items: center;
  margin-top: auto;
  font-family: 'Inter'; font-size: 12px; color: var(--grey);
  padding-top: 12px; border-top: 1px solid var(--stone);
}
.bg-card-meta .dot { color: var(--grey-light); }

/* Cluster banner */
.bg-cluster {
  background: var(--midnight);
  border-radius: 24px;
  padding: 48px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 48px;
  align-items: center;
  color: var(--snow);
  margin-bottom: 48px;
  position: relative; overflow: hidden;
}
.bg-cluster::before {
  content: ''; position: absolute; right: -100px; top: -50px;
  width: 400px; height: 400px;
  background: radial-gradient(circle at center, rgba(0,200,150,0.18) 0%, transparent 70%);
}
.bg-cluster-eyebrow {
  font-family: 'Inter'; font-weight: 700; font-size: 12px; letter-spacing: 0.08em;
  color: var(--voltage); text-transform: uppercase; margin-bottom: 16px;
}
.bg-cluster-h {
  font-family: 'Manrope'; font-weight: 700; font-size: 32px; line-height: 40px;
  letter-spacing: -0.02em; color: var(--snow); margin: 0 0 16px;
}
.bg-cluster-sub {
  font-family: 'Inter'; font-size: 15px; line-height: 24px; color: rgba(255,255,255,0.7);
  margin: 0 0 24px;
}
.bg-cluster-list { display: flex; flex-direction: column; gap: 8px; position: relative; }
.bg-cluster-list a {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 18px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  font-family: 'Manrope'; font-weight: 600; font-size: 15px;
  color: var(--snow); text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.bg-cluster-list a:hover { background: rgba(0,200,150,0.1); border-color: var(--voltage); }
.bg-cluster-list a .arr { color: var(--voltage); }

/* Pagination */
.bg-pagination {
  display: flex; justify-content: center; align-items: center; gap: 8px;
  padding: 32px 0 64px;
}
.bg-page {
  width: 40px; height: 40px;
  border-radius: 10px;
  border: 1px solid var(--stone);
  background: var(--snow);
  font-family: 'Manrope'; font-weight: 600; font-size: 14px;
  color: var(--graphite);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.bg-page.active { background: var(--midnight); color: var(--snow); border-color: var(--midnight); }
.bg-page.dots { border: none; background: none; }

/* Subscribe band */
.bg-subscribe {
  background: var(--mist);
  border: 1px solid var(--stone);
  border-radius: 20px;
  padding: 40px 48px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 32px;
  align-items: center;
  margin-bottom: 64px;
}
.bg-subscribe-h {
  font-family: 'Manrope'; font-weight: 700; font-size: 28px; line-height: 36px;
  letter-spacing: -0.015em; color: var(--midnight); margin: 0 0 8px;
}
.bg-subscribe-sub {
  font-family: 'Inter'; font-size: 14px; line-height: 22px; color: var(--grey); margin: 0;
}
.bg-subscribe-form {
  display: flex; gap: 8px;
}
.bg-subscribe-form input {
  flex: 1;
}

/* ============= ARTICLE ============= */
.bg-article-hero {
  padding: 32px 0 64px;
}
.bg-article-cat {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px;
  background: var(--mint);
  color: #00876C;
  font-family: 'Inter'; font-weight: 700; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase;
  border-radius: 999px;
  margin-bottom: 24px;
}
.bg-article-h1 {
  font-family: 'Manrope'; font-weight: 800; font-size: 56px; line-height: 64px;
  letter-spacing: -0.025em; color: var(--midnight); margin: 0;
  max-width: 920px;
}
.bg-article-lead {
  font-family: 'Inter'; font-size: 20px; line-height: 32px; color: var(--grey);
  margin: 24px 0 32px;
  max-width: 760px;
}
.bg-article-meta {
  display: flex; gap: 20px; align-items: center;
  padding: 20px 0; border-top: 1px solid var(--stone); border-bottom: 1px solid var(--stone);
}
.bg-author {
  display: flex; align-items: center; gap: 12px;
}
.bg-author-pic {
  width: 44px; height: 44px; border-radius: 50%;
  background: linear-gradient(135deg, #00C896 0%, #1a8966 100%);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Manrope'; font-weight: 700; font-size: 16px; color: var(--midnight);
}
.bg-author-name { font-family: 'Manrope'; font-weight: 600; font-size: 14px; color: var(--midnight); }
.bg-author-role { font-family: 'Inter'; font-size: 12px; color: var(--grey); }
.bg-meta-item {
  font-family: 'Inter'; font-size: 13px; color: var(--grey);
  display: flex; align-items: center; gap: 6px;
}
.bg-meta-item.right { margin-left: auto; }
.bg-share-btns { display: flex; gap: 8px; margin-left: auto; }
.bg-share-btn {
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--stone); background: var(--snow);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: var(--midnight);
}
.bg-share-btn:hover { background: var(--midnight); color: var(--snow); border-color: var(--midnight); }

.bg-article-img {
  margin: 40px 0 56px;
  height: 480px; border-radius: 24px; overflow: hidden;
  background:
    linear-gradient(180deg, rgba(15,42,61,0.05), rgba(15,42,61,0.0)),
    radial-gradient(ellipse at 30% 30%, #2c4a66 0%, #14283c 70%),
    repeating-linear-gradient(110deg, rgba(255,255,255,0.04) 0 80px, rgba(255,255,255,0.07) 80px 160px);
  display: flex; align-items: flex-end; padding: 24px;
  color: rgba(255,255,255,0.4);
  font-family: 'Manrope'; font-weight: 700; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase;
}

/* Article body grid: TOC + content */
.bg-article-body {
  display: grid; grid-template-columns: 240px 1fr; gap: 64px;
  padding-bottom: 96px;
}
.bg-toc {
  position: sticky; top: 24px;
  align-self: start;
}
.bg-toc-label {
  font-family: 'Inter'; font-weight: 700; font-size: 12px; letter-spacing: 0.08em;
  color: var(--grey); text-transform: uppercase;
  margin-bottom: 16px;
}
.bg-toc-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; border-left: 2px solid var(--stone); }
.bg-toc-list a {
  display: block;
  padding: 8px 0 8px 16px;
  font-family: 'Inter'; font-size: 13px; line-height: 20px; color: var(--grey);
  text-decoration: none;
  border-left: 2px solid transparent;
  margin-left: -2px;
}
.bg-toc-list a:hover { color: var(--midnight); }
.bg-toc-list a.active {
  color: var(--midnight); border-left-color: var(--voltage);
  font-weight: 600;
}

.bg-article-content {
  max-width: 720px;
  font-family: 'Inter'; font-size: 17px; line-height: 30px; color: var(--graphite);
}
.bg-article-content h2 {
  font-family: 'Manrope'; font-weight: 700; font-size: 32px; line-height: 40px;
  letter-spacing: -0.02em; color: var(--midnight);
  margin: 56px 0 20px;
  scroll-margin-top: 80px;
}
.bg-article-content h2:first-child { margin-top: 0; }
.bg-article-content h3 {
  font-family: 'Manrope'; font-weight: 700; font-size: 22px; line-height: 30px;
  letter-spacing: -0.01em; color: var(--midnight);
  margin: 32px 0 14px;
}
.bg-article-content p { margin: 0 0 20px; }
.bg-article-content ul, .bg-article-content ol {
  margin: 0 0 24px; padding: 0 0 0 24px;
}
.bg-article-content li { margin-bottom: 10px; }
.bg-article-content li::marker { color: var(--voltage); font-weight: 700; }
.bg-article-content a { color: var(--midnight); text-decoration: underline; text-decoration-color: var(--voltage); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.bg-article-content strong { color: var(--midnight); font-weight: 600; }

/* Callouts */
.bg-callout {
  margin: 32px 0;
  padding: 24px 28px;
  border-radius: 16px;
  background: var(--mint);
  border-left: 4px solid var(--voltage);
  display: flex; gap: 16px;
}
.bg-callout.warn {
  background: #FFF5E6;
  border-left-color: var(--caution);
}
.bg-callout.danger {
  background: #FFE9EA;
  border-left-color: var(--alert);
}
.bg-callout-icon { flex-shrink: 0; color: var(--success); margin-top: 2px; }
.bg-callout.warn .bg-callout-icon { color: var(--caution); }
.bg-callout.danger .bg-callout-icon { color: var(--alert); }
.bg-callout-title {
  font-family: 'Manrope'; font-weight: 700; font-size: 16px; color: var(--midnight);
  margin-bottom: 4px;
}
.bg-callout-text {
  font-family: 'Inter'; font-size: 15px; line-height: 24px; color: var(--graphite);
  margin: 0;
}

/* Compare row inside article */
.bg-compare-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
  margin: 24px 0;
}
.bg-compare-cell {
  border-radius: 12px;
  padding: 20px;
  border: 1px solid var(--stone);
}
.bg-compare-cell.good { background: rgba(0,184,112,0.06); border-color: rgba(0,184,112,0.3); }
.bg-compare-cell.bad { background: rgba(229,72,77,0.04); border-color: rgba(229,72,77,0.25); }
.bg-compare-cell-label {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: 'Manrope'; font-weight: 700; font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase;
  margin-bottom: 12px;
}
.bg-compare-cell.good .bg-compare-cell-label { color: var(--success); }
.bg-compare-cell.bad .bg-compare-cell-label { color: var(--alert); }
.bg-compare-cell ul { margin: 0; padding: 0 0 0 20px; }
.bg-compare-cell li { font-size: 14px; line-height: 22px; margin-bottom: 6px; color: var(--graphite); }

/* Inline checklist */
.bg-checklist {
  margin: 24px 0;
  padding: 24px 28px;
  border: 1px solid var(--stone);
  border-radius: 16px;
  background: var(--mist);
}
.bg-checklist h4 {
  font-family: 'Manrope'; font-weight: 700; font-size: 16px; color: var(--midnight);
  margin: 0 0 14px;
}
.bg-checklist ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.bg-checklist li {
  display: flex; gap: 12px;
  font-family: 'Inter'; font-size: 14px; line-height: 22px;
}
.bg-checklist li::before {
  content: ''; flex-shrink: 0;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--voltage);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%230F2A3D' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>");
  background-position: center; background-repeat: no-repeat;
}

/* CTA inside article */
.bg-inline-cta {
  margin: 40px 0;
  padding: 32px;
  border-radius: 20px;
  background: var(--midnight);
  display: flex; gap: 24px; align-items: center;
  color: var(--snow);
}
.bg-inline-cta .ic-text { flex: 1; }
.bg-inline-cta h4 {
  font-family: 'Manrope'; font-weight: 700; font-size: 22px; color: var(--snow);
  margin: 0 0 8px;
}
.bg-inline-cta p {
  font-family: 'Inter'; font-size: 14px; line-height: 22px; color: rgba(255,255,255,0.7);
  margin: 0;
}

/* Article footer: tags + author */
.bg-article-foot {
  border-top: 1px solid var(--stone);
  padding-top: 32px;
  margin-top: 48px;
  display: flex; gap: 20px; align-items: flex-start;
  flex-wrap: wrap;
}
.bg-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.bg-tag {
  padding: 6px 12px;
  background: var(--mist); border-radius: 999px;
  font-family: 'Inter'; font-size: 13px; color: var(--graphite);
}

/* Related */
.bg-related {
  background: var(--mist);
  padding: 80px 0;
  border-top: 1px solid var(--stone);
}
