/* ============================================================
 * blog/assets/blog-style.css  (v3 — landing-page aesthetic)
 *
 * Brings the blog visual style in line with the marketing
 * landing pages: full-width gradient hero, decorative blobs,
 * centered title, large hero image, polished sections, and a
 * landing-page-grade CTA.
 *
 * Pure-CSS upgrade — no HTML changes required to any of the
 * 20 blog files.
 * ============================================================ */

/* ---------- 0. Reading-progress bar ---------- */
.bp-progress {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 3px;
  background: rgba(15, 23, 42, .06);
  z-index: 200;
  pointer-events: none;
}
.bp-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #2563eb, #06b6d4 50%, #16a34a);
  width: 0%;
  transition: width .08s linear;
  box-shadow: 0 0 8px rgba(37, 99, 235, .4);
}

/* ============================================================
 * 1. Article column — landing-page-style hero behind it
 * ============================================================ */
.blog-post {
  max-width: 920px;
  margin: 0 auto;
  padding: 140px 22px 60px;
  color: #1e293b;
  line-height: 1.78;
  font-size: 1.02rem;
  position: relative;
  z-index: 1;
}
@media (max-width: 768px) { .blog-post { padding: 110px 16px 50px; font-size: .98rem; } }

/* Full-bleed gradient hero behind breadcrumb + header + image
   (matches the .page-hero / .lp-hero gradient on landing pages) */
.blog-post::before {
  content: '';
  position: absolute;
  top: 0;
  left: calc(50% - 50vw);
  width: 100vw;
  height: 760px;
  background: linear-gradient(135deg, #eff6ff 0%, #ecfeff 55%, #f0fdfa 100%);
  z-index: -2;
  border-bottom: 1px solid rgba(199, 210, 254, .55);
}
@media (max-width: 768px) { .blog-post::before { height: 600px; } }

/* Top-right decorative blob (matches landing-page hero blobs) */
.blog-post::after {
  content: '';
  position: absolute;
  top: 110px;
  right: calc(50% - 50vw + 60px);
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(37,99,235,.16), transparent 65%);
  border-radius: 50%;
  z-index: -1;
  pointer-events: none;
  filter: blur(2px);
}
@media (max-width: 900px) { .blog-post::after { display: none; } }

.blog-post p { margin: 0 0 1.15em; }

/* ============================================================
 * 2. Header — centered, landing-page-hero feel
 * ============================================================ */
.blog-header {
  text-align: center;
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 28px;
}

.blog-post h1 {
  font-family: var(--font-display, 'Syne', sans-serif);
  font-size: clamp(1.85rem, 4.4vw, 2.85rem);
  line-height: 1.18;
  font-weight: 800;
  color: #0f172a;
  margin: 14px auto 18px;
  max-width: 780px;
  letter-spacing: -.015em;
}

/* Breadcrumb — centered to match hero */
.bp-breadcrumb {
  text-align: center;
  font-size: .82rem;
  color: #64748b;
  margin: 0 0 16px;
  font-weight: 600;
}
.bp-breadcrumb a { color: #2563eb; text-decoration: none; }
.bp-breadcrumb a:hover { text-decoration: underline; }
.bp-breadcrumb span { color: #475569; }

/* Meta as centered badge pills (matches landing-page badge style) */
.blog-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 14px 0 0;
  justify-content: center;
}
.blog-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, .8);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(199, 210, 254, .6);
  color: #1d4ed8;
  font-size: .76rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 999px;
  letter-spacing: .02em;
  box-shadow: 0 4px 12px rgba(37, 99, 235, .08);
}
.blog-meta span i { color: #2563eb; font-size: .82rem; }

/* ============================================================
 * 3. Hero feature image — bigger, more shadow
 * ============================================================ */
.bp-hero-image {
  width: 100%;
  height: 440px;
  object-fit: cover;
  border-radius: 22px;
  margin: 4px 0 44px;
  box-shadow: 0 30px 70px rgba(15, 23, 42, .22);
  display: block;
  background: linear-gradient(135deg, #eff6ff, #ecfeff);
  border: 1px solid rgba(255, 255, 255, .8);
}
@media (max-width: 900px) { .bp-hero-image { height: 320px; border-radius: 18px; } }
@media (max-width: 600px) { .bp-hero-image { height: 220px; border-radius: 14px; margin-bottom: 32px; } }

/* ============================================================
 * 4. Body content (after hero image) sits on a clean card
 * ============================================================ */

/* Drop-cap on the first paragraph after hero image */
.blog-post .bp-hero-image + p::first-letter,
.blog-post .blog-header + p::first-letter {
  font-family: var(--font-display, 'Syne', sans-serif);
  font-size: 3.6rem;
  font-weight: 800;
  float: left;
  line-height: 1;
  margin: 5px 14px 0 0;
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* H2 — accent bar (kept), but bigger spacing */
.blog-post h2 {
  font-family: var(--font-display, 'Syne', sans-serif);
  font-size: clamp(1.35rem, 2.6vw, 1.75rem);
  font-weight: 800;
  color: #0f172a;
  margin: 56px 0 16px;
  scroll-margin-top: 100px;
  position: relative;
  padding-top: 22px;
}
.blog-post h2::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 64px; height: 4px;
  border-radius: 2px;
  background: linear-gradient(90deg, #2563eb, #06b6d4);
}

/* H3 */
.blog-post h3 {
  font-family: var(--font-display, 'Syne', sans-serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: #1e293b;
  margin: 30px 0 10px;
}

.blog-post strong { color: #0f172a; font-weight: 700; }
.blog-post em { color: #475569; }

.blog-post a {
  color: #2563eb;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1.5px;
  text-decoration-color: rgba(37, 99, 235, .35);
  transition: color .15s, text-decoration-color .15s;
}
.blog-post a:hover { color: #1d4ed8; text-decoration-color: #1d4ed8; }

.blog-post ul, .blog-post ol { margin: 0 0 1.3em 1.3em; padding: 0; }
.blog-post li { margin: 0 0 .55em; }
.blog-post ul li::marker { color: #2563eb; }
.blog-post ol li::marker { color: #2563eb; font-weight: 700; }

.blog-post blockquote {
  margin: 28px 0;
  padding: 18px 24px;
  border-left: 4px solid #2563eb;
  background: linear-gradient(90deg, #eff6ff, transparent);
  border-radius: 0 12px 12px 0;
  color: #1e3a5f;
  font-style: italic;
}

/* ============================================================
 * 5. Inline figure
 * ============================================================ */
figure.bp-figure { margin: 28px 0; padding: 0; }
figure.bp-figure img {
  width: 100%;
  border-radius: 14px;
  display: block;
  box-shadow: 0 14px 36px rgba(15, 23, 42, .12);
}
figure.bp-figure figcaption {
  text-align: center;
  font-size: .85rem;
  color: #64748b;
  margin-top: 10px;
  font-style: italic;
}

/* ============================================================
 * 6. Table of Contents — landing-page-card-style
 * ============================================================ */
.blog-toc {
  background: #fff;
  border: 1px solid #e6ecf2;
  border-radius: 18px;
  padding: 26px 30px;
  margin: 32px 0 36px;
  box-shadow: 0 14px 40px rgba(15, 23, 42, .08);
  position: relative;
  overflow: hidden;
}
.blog-toc::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, #2563eb, #06b6d4);
}
.blog-toc h3 {
  font-family: var(--font-display, 'Syne', sans-serif);
  font-size: 1.05rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.blog-toc h3 i {
  color: white;
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  padding: 8px;
  border-radius: 10px;
  font-size: .9rem;
  width: 34px; height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.blog-toc ol {
  margin: 0;
  padding: 0;
  counter-reset: toc-counter;
  list-style: none;
}
.blog-toc ol li {
  counter-increment: toc-counter;
  position: relative;
  padding: 8px 0 8px 36px;
  font-size: .94rem;
  border-bottom: 1px dashed #e2e8f0;
}
.blog-toc ol li:last-child { border-bottom: none; }
.blog-toc ol li::before {
  content: counter(toc-counter);
  position: absolute;
  left: 0; top: 8px;
  width: 26px; height: 26px;
  background: linear-gradient(135deg, #eff6ff, #ddd6fe);
  color: #1d4ed8;
  border-radius: 50%;
  font-size: .72rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display, 'Syne', sans-serif);
}
.blog-toc a {
  color: #1e3a5f;
  text-decoration: none;
  font-weight: 600;
  transition: color .15s;
}
.blog-toc a:hover { color: #2563eb; }

/* ============================================================
 * 7. Related articles — landing-page card grid
 * ============================================================ */
.related-articles {
  background: linear-gradient(135deg, #eff6ff 0%, #ecfeff 50%, #f0fdfa 100%);
  border: 1px solid #c7d2fe;
  padding: 32px;
  border-radius: 22px;
  margin: 50px 0 22px;
  box-shadow: 0 14px 40px rgba(37, 99, 235, .08);
}
.related-articles h3 {
  font-family: var(--font-display, 'Syne', sans-serif);
  font-size: 1.15rem;
  font-weight: 800;
  margin: 0 0 18px;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 10px;
}
.related-articles h3 i {
  color: white;
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  padding: 9px;
  border-radius: 11px;
  font-size: .92rem;
}
.related-articles ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
@media (min-width: 700px) { .related-articles ul { grid-template-columns: repeat(3, 1fr); } }
.related-articles li {
  display: block;
  padding: 0;
  border: 0;
}
.related-articles li > i { display: none; }
.related-articles li a {
  display: block;
  background: white;
  padding: 18px 20px;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  color: #1d4ed8;
  font-weight: 600;
  text-decoration: none;
  transition: transform .2s, box-shadow .2s, border-color .2s;
  position: relative;
  font-size: .92rem;
  line-height: 1.45;
  height: 100%;
}
.related-articles li a::after {
  content: '\f061';
  font-family: 'Font Awesome 6 Free'; font-weight: 900;
  position: absolute;
  right: 16px; bottom: 14px;
  font-size: .76rem;
  color: #2563eb;
  opacity: .5;
  transition: opacity .15s, transform .15s;
}
.related-articles li a:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(37, 99, 235, .16);
  border-color: #2563eb;
}
.related-articles li a:hover::after { opacity: 1; transform: translateX(4px); }

/* ============================================================
 * 8. CTA — landing-page-grade .cta-section style
 * ============================================================ */
.blog-cta-box {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 50%, #06b6d4 100%);
  color: #fff;
  padding: 48px 36px;
  border-radius: 24px;
  text-align: center;
  margin: 50px 0;
  box-shadow: 0 30px 60px rgba(37, 99, 235, .35);
}
.blog-cta-box::before {
  content: '';
  position: absolute;
  top: -100px; right: -100px;
  width: 280px; height: 280px;
  background: radial-gradient(circle, rgba(255,255,255,.18), transparent 60%);
  border-radius: 50%;
  pointer-events: none;
}
.blog-cta-box::after {
  content: '';
  position: absolute;
  bottom: -120px; left: -120px;
  width: 320px; height: 320px;
  background: radial-gradient(circle, rgba(6,182,212,.32), transparent 60%);
  border-radius: 50%;
  pointer-events: none;
}
.blog-cta-box > * { position: relative; z-index: 1; }
.blog-cta-box h3 {
  font-family: var(--font-display, 'Syne', sans-serif);
  color: #fff;
  font-size: clamp(1.4rem, 2.8vw, 1.85rem);
  font-weight: 800;
  margin: 0 0 12px;
  text-shadow: 0 2px 10px rgba(0,0,0,.18);
  letter-spacing: -.005em;
}
.blog-cta-box p {
  color: rgba(255,255,255,.94);
  margin: 0 0 24px;
  font-size: 1.04rem;
  line-height: 1.55;
  max-width: 600px;
  margin-left: auto; margin-right: auto;
}
.blog-cta-box .btn-primary {
  background: #fff;
  color: #1e40af !important;
  border: 0;
  font-weight: 800;
  box-shadow: 0 10px 26px rgba(0,0,0,.22);
}
.blog-cta-box .btn-primary:hover { background: #f1f5f9; transform: translateY(-2px); }
.blog-cta-box .btn-outline-white {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border: 2px solid rgba(255,255,255,.6);
  color: #fff !important;
  border-radius: 999px;
  text-decoration: none !important;
  font-weight: 700;
  font-size: .92rem;
  margin-left: 10px;
  transition: background .15s, transform .15s;
}
.blog-cta-box .btn-outline-white:hover { background: rgba(255,255,255,.15); transform: translateY(-2px); }
@media (max-width: 480px) {
  .blog-cta-box .btn-outline-white { margin: 14px 0 0; display: inline-flex; }
}

/* ============================================================
 * 9. Footer internal links
 * ============================================================ */
.internal-links-footer {
  border-top: 2px solid #e2e8f0;
  padding-top: 26px;
  margin-top: 40px;
  text-align: center;
  font-size: .94rem;
  color: #475569;
}
.internal-links-footer p { margin: 0; }
.internal-links-footer a {
  color: #2563eb;
  text-decoration: none;
  font-weight: 600;
  margin: 0 6px;
  padding: 5px 10px;
  border-radius: 8px;
  transition: background .15s;
}
.internal-links-footer a:hover { background: rgba(37, 99, 235, .08); text-decoration: underline; }

/* ============================================================
 * 10. Call-out boxes
 * ============================================================ */
.bp-callout {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-left: 5px solid #ea580c;
  padding: 20px 26px;
  border-radius: 0 16px 16px 0;
  margin: 30px 0;
  position: relative;
  box-shadow: 0 6px 18px rgba(234, 88, 12, .10);
}
.bp-callout::before {
  content: '\f06a';
  font-family: 'Font Awesome 6 Free'; font-weight: 900;
  position: absolute;
  left: -18px; top: 18px;
  background: #ea580c;
  color: white;
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .9rem;
  box-shadow: 0 6px 14px rgba(234, 88, 12, .35);
}
.bp-callout strong {
  display: block;
  color: #9a3412;
  margin-bottom: 6px;
  font-size: .82rem;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.bp-callout p { margin: 0; color: #1e293b; }

.bp-callout--info {
  background: #eff6ff;
  border-color: #c7d2fe;
  border-left-color: #2563eb;
  box-shadow: 0 6px 18px rgba(37, 99, 235, .10);
}
.bp-callout--info::before { background: #2563eb; box-shadow: 0 6px 14px rgba(37, 99, 235, .35); content: '\f05a'; }
.bp-callout--info strong { color: #1d4ed8; }

.bp-callout--note {
  background: #f0fdf4;
  border-color: #bbf7d0;
  border-left-color: #16a34a;
  box-shadow: 0 6px 18px rgba(22, 163, 74, .10);
}
.bp-callout--note::before { background: #16a34a; box-shadow: 0 6px 14px rgba(22, 163, 74, .35); content: '\f00c'; }
.bp-callout--note strong { color: #047857; }

/* ============================================================
 * 11. Comparison table
 * ============================================================ */
.bp-table-wrap {
  overflow-x: auto;
  margin: 28px 0;
  border-radius: 16px;
  box-shadow: 0 14px 36px rgba(15, 23, 42, .10);
}
.bp-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  font-size: .92rem;
  min-width: 520px;
}
.bp-table thead { background: linear-gradient(135deg, #1e293b, #2563eb); }
.bp-table thead th {
  color: white;
  font-weight: 800;
  padding: 16px 18px;
  text-align: left;
  border: 0;
  font-family: var(--font-display, 'Syne', sans-serif);
  font-size: .92rem;
  letter-spacing: .02em;
}
.bp-table tbody td, .bp-table tbody th {
  padding: 13px 18px;
  border-bottom: 1px solid #f1f5f9;
  text-align: left;
  vertical-align: top;
  color: #1e293b;
}
.bp-table tbody tr:nth-child(even) { background: #f8fafc; }
.bp-table tbody tr:hover { background: #eff6ff; }
.bp-table tr:last-child td { border-bottom: none; }
.bp-table tbody th { font-weight: 700; color: #0f172a; }

/* ============================================================
 * 12. Blog index (listing) — landing-page hero style
 * ============================================================ */
.blog-index-hero {
  background: linear-gradient(135deg, #eff6ff 0%, #ecfeff 50%, #f0fdfa 100%);
  padding: 140px 0 56px;
  border-bottom: 1px solid #e2e8f0;
  position: relative;
  overflow: hidden;
}
.blog-index-hero::before {
  content: '';
  position: absolute;
  top: -100px; right: -120px;
  width: 360px; height: 360px;
  background: radial-gradient(circle, rgba(37,99,235,.16), transparent 60%);
  border-radius: 50%;
  pointer-events: none;
}
.blog-index-hero::after {
  content: '';
  position: absolute;
  bottom: -120px; left: -120px;
  width: 320px; height: 320px;
  background: radial-gradient(circle, rgba(6,182,212,.18), transparent 60%);
  border-radius: 50%;
  pointer-events: none;
}
@media (max-width: 768px) { .blog-index-hero { padding-top: 120px; } }
.blog-index-hero h1 {
  font-family: var(--font-display, 'Syne', sans-serif);
  font-size: clamp(1.95rem, 4.4vw, 2.85rem);
  font-weight: 800;
  margin: 8px 0 10px;
  color: #0f172a;
  position: relative;
  z-index: 1;
  letter-spacing: -.015em;
}
.blog-index-hero p { color: #475569; margin: 0; font-size: 1.06rem; max-width: 660px; position: relative; z-index: 1; }

.blog-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: 1fr;
  margin: 28px 0;
}
@media (min-width: 700px)  { .blog-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .blog-grid { grid-template-columns: repeat(3, 1fr); } }

.blog-card {
  background: #fff;
  border: 1px solid #e6ecf2;
  border-radius: 18px;
  padding: 26px 24px 22px;
  display: flex;
  flex-direction: column;
  transition: transform .2s, box-shadow .2s, border-color .2s;
  text-decoration: none !important;
  color: inherit !important;
  position: relative;
  overflow: hidden;
}
.blog-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, #2563eb, #06b6d4);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s;
}
.blog-card:hover::before { transform: scaleX(1); }
.blog-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 44px rgba(15, 23, 42, .14);
  border-color: #c7d2fe;
}
.blog-card-tag {
  display: inline-block;
  background: linear-gradient(135deg, #eff6ff, #ddd6fe);
  color: #1d4ed8;
  font-weight: 800;
  font-size: .68rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 14px;
  align-self: flex-start;
  border: 1px solid rgba(199, 210, 254, .6);
}
.blog-card h3 {
  font-family: var(--font-display, 'Syne', sans-serif);
  font-size: 1.14rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 12px;
  line-height: 1.32;
}
.blog-card p {
  font-size: .92rem;
  color: #475569;
  line-height: 1.6;
  margin: 0 0 18px;
  flex: 1;
}
.blog-card-meta {
  display: flex;
  justify-content: space-between;
  font-size: .76rem;
  color: #64748b;
  border-top: 1px dashed #e2e8f0;
  padding-top: 14px;
  margin-top: auto;
  font-weight: 600;
}
.blog-card-meta i { color: #2563eb; margin-right: 4px; }

.blog-card--feature {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 50%, #06b6d4 100%);
  color: #fff !important;
  border-color: #1e40af;
  padding: 36px;
}
.blog-card--feature::before { display: none; }
.blog-card--feature h3 { color: #fff; font-size: 1.6rem; }
.blog-card--feature p  { color: rgba(255,255,255,.92); font-size: 1rem; }
.blog-card--feature .blog-card-tag { background: rgba(255,255,255,.18); color: #fff; border-color: rgba(255,255,255,.3); }
.blog-card--feature .blog-card-meta { color: rgba(255,255,255,.84); border-top-color: rgba(255,255,255,.25); }
.blog-card--feature .blog-card-meta i { color: #f0f9ff; }

/* Homepage "Latest from blog" preview */
.home-blog-preview { padding: 60px 0; background: #f8fafc; }
.home-blog-preview .section-title { margin-bottom: 28px; }

/* ============================================================
 * 13. Section divider (optional)
 * ============================================================ */
.bp-divider {
  margin: 42px auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, #c7d2fe, transparent);
  border: 0;
  max-width: 480px;
}
