/* ================================================================
   When2Overlap — Blog Magazine CSS
   Card-based editorial layout with infographic elements
   Prefix: bl- (blog) — separated from ld- (landing)
   ================================================================ */

.w2o-blog {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  color: #1f2328;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  max-width: 820px;
  margin: 0 auto;
  padding: 0 20px;
}
.w2o-blog *, .w2o-blog *::before, .w2o-blog *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ═══════════════════════════════════════
   1. HERO IMAGE (auto-injected from Featured Image)
   ═══════════════════════════════════════ */
.bl-hero-img {
  margin: 0 -20px 0;
  border-radius: 0 0 20px 20px;
  overflow: hidden;
  max-height: 420px;
}
.bl-hero-img img {
  width: 100%;
  height: 420px;
  object-fit: cover;
  display: block;
}
@media (max-width: 640px) {
  .bl-hero-img { margin: 0 -16px 0; border-radius: 0 0 14px 14px; }
  .bl-hero-img img { height: 240px; }
}

/* ═══════════════════════════════════════
   2. ARTICLE HEADER
   ═══════════════════════════════════════ */
.bl-header {
  padding: 56px 0 40px;
  border-bottom: 1px solid #e5e7eb;
  margin-bottom: 48px;
}
.bl-header__cat {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #0D9488;
  margin-bottom: 16px;
}
.bl-header h1 {
  font-size: clamp(28px, 4.5vw, 42px);
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1.15;
  color: #1f2328;
  margin-bottom: 20px;
}
.bl-header__lead {
  font-size: 18px;
  line-height: 1.7;
  color: rgba(31,35,40,.60);
  font-weight: 400;
  max-width: 640px;
}
.bl-header__meta {
  display: flex;
  gap: 20px;
  margin-top: 24px;
  font-size: 13px;
  color: rgba(31,35,40,.45);
  font-weight: 500;
}
.bl-header__meta span { display: flex; align-items: center; gap: 5px; }

/* ═══════════════════════════════════════
   2. PROSE (body text between cards)
   ═══════════════════════════════════════ */
.bl-prose { margin-bottom: 40px; }
.bl-prose p {
  font-size: 16px;
  line-height: 1.85;
  color: rgba(31,35,40,.72);
  margin-bottom: 20px;
}
.bl-prose h2 {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #1f2328;
  margin: 56px 0 20px;
  padding-top: 32px;
  border-top: 1px solid #e5e7eb;
}
.bl-prose h3 {
  font-size: 20px;
  font-weight: 700;
  color: #1f2328;
  margin: 36px 0 12px;
}
.bl-prose strong { color: #1f2328; font-weight: 600; }
.bl-prose a { color: #0D9488; text-decoration: underline; text-underline-offset: 2px; }
.bl-prose a:hover { color: #0f766e; }

/* ═══════════════════════════════════════
   3. TIP CARDS (numbered, editorial)
   ═══════════════════════════════════════ */
.bl-tip {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  padding: 32px 28px;
  margin-bottom: 24px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  transition: box-shadow .25s ease, transform .25s ease;
}
.bl-tip:hover {
  box-shadow: 0 8px 32px rgba(0,0,0,.06);
  transform: translateY(-2px);
}
.bl-tip__num {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, #0D9488, #0f766e);
  box-shadow: 0 4px 12px rgba(13,148,136,.25);
}
.bl-tip__body h3 {
  font-size: 18px;
  font-weight: 700;
  color: #1f2328;
  margin-bottom: 8px;
  line-height: 1.3;
}
.bl-tip__body p {
  font-size: 15px;
  line-height: 1.75;
  color: rgba(31,35,40,.68);
}
.bl-tip__tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .5px;
  padding: 3px 8px;
  border-radius: 5px;
  margin-top: 10px;
}
.bl-tip__tag--tool { background: rgba(13,148,136,.08); color: #0D9488; }
.bl-tip__tag--culture { background: rgba(79,70,229,.08); color: #4f46e5; }
.bl-tip__tag--process { background: rgba(217,119,6,.08); color: #b45309; }

/* ═══════════════════════════════════════
   4. COMPARISON TABLE CARDS
   ═══════════════════════════════════════ */
.bl-compare {
  margin-bottom: 32px;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
}
.bl-compare__head {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  border-bottom: 1px solid #f0f0f0;
}
.bl-compare__rank {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 800;
  color: #fff;
}
.bl-compare__rank--1 { background: linear-gradient(135deg, #0D9488, #0f766e); }
.bl-compare__rank--2 { background: linear-gradient(135deg, #4f46e5, #6366f1); }
.bl-compare__rank--3 { background: linear-gradient(135deg, #d97706, #f59e0b); }
.bl-compare__rank--4 { background: linear-gradient(135deg, #6e7681, #9ca3af); }
.bl-compare__rank--5 { background: linear-gradient(135deg, #6e7681, #9ca3af); }
.bl-compare__name {
  font-size: 20px;
  font-weight: 700;
  color: #1f2328;
}
.bl-compare__name small {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: rgba(31,35,40,.50);
  margin-top: 2px;
}
.bl-compare__body { padding: 20px 24px; }
.bl-compare__body p {
  font-size: 15px;
  line-height: 1.75;
  color: rgba(31,35,40,.68);
  margin-bottom: 16px;
}

/* Feature grid inside comparison card */
.bl-compare__features {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px;
}
.bl-feat {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: 8px;
  background: #f6f8fa;
}
.bl-feat--yes { color: #1a7f37; }
.bl-feat--yes::before { content: "✓"; font-weight: 800; color: #1a7f37; }
.bl-feat--no { color: #9ca3af; }
.bl-feat--no::before { content: "✗"; font-weight: 800; color: #cf222e; }
.bl-feat--partial { color: #9a6700; }
.bl-feat--partial::before { content: "△"; font-weight: 800; color: #d97706; }

/* Highlight card (for W2O) */
.bl-compare--highlight {
  border-color: #0D9488;
  box-shadow: 0 0 0 1px rgba(13,148,136,.15), 0 4px 16px rgba(13,148,136,.08);
}
.bl-compare--highlight .bl-compare__head {
  background: linear-gradient(135deg, #f0fdfa, #ffffff);
}

/* ═══════════════════════════════════════
   5. INFOGRAPHIC STAT STRIP
   ═══════════════════════════════════════ */
.bl-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
  margin: 40px 0;
}
.bl-stat {
  text-align: center;
  padding: 24px 16px;
  background: #f6f8fa;
  border-radius: 14px;
  border: 1px solid #e5e7eb;
}
.bl-stat__num {
  display: block;
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -1px;
  color: #0D9488;
}
.bl-stat__label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: rgba(31,35,40,.50);
  margin-top: 4px;
}

/* ═══════════════════════════════════════
   6. CALLOUT BOX
   ═══════════════════════════════════════ */
.bl-callout {
  padding: 24px 28px;
  margin: 32px 0;
  border-radius: 14px;
  border-left: 4px solid #0D9488;
  background: linear-gradient(135deg, #f0fdfa, #f5f3ff);
}
.bl-callout p {
  font-size: 15px;
  line-height: 1.75;
  color: rgba(31,35,40,.72);
  margin: 0;
}
.bl-callout strong { color: #0D9488; }

/* ═══════════════════════════════════════
   7. VERDICT / SUMMARY TABLE
   ═══════════════════════════════════════ */
.bl-verdict {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 32px 0;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  overflow: hidden;
  font-size: 14px;
}
.bl-verdict th {
  text-align: left;
  padding: 12px 16px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
  color: rgba(31,35,40,.50);
  background: #f6f8fa;
  border-bottom: 1px solid #e5e7eb;
}
.bl-verdict td {
  padding: 12px 16px;
  color: rgba(31,35,40,.72);
  border-bottom: 1px solid #f0f0f0;
}
.bl-verdict tr:last-child td { border-bottom: none; }
.bl-verdict td strong { color: #1f2328; }
.bl-verdict .bl-pick { color: #0D9488; font-weight: 700; }

/* ═══════════════════════════════════════
   8. BOTTOM CTA (same as landing)
   ═══════════════════════════════════════ */
.bl-bottom-cta {
  padding: 56px 32px;
  margin: 56px -20px 0;
  text-align: center;
  background: linear-gradient(135deg, #f0fdfa 0%, #f5f3ff 100%);
  border-top: 1px solid #e5e7eb;
  border-radius: 20px 20px 0 0;
}
.bl-bottom-cta h2 {
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 800;
  margin-bottom: 12px;
  color: #1f2328;
}
.bl-bottom-cta p {
  font-size: 16px;
  color: rgba(31,35,40,.55);
  margin-bottom: 24px;
}
.bl-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 14px 32px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  background: linear-gradient(135deg, #0D9488, #0f766e);
  color: #fff;
  box-shadow: 0 2px 8px rgba(13,148,136,.25);
  transition: all .2s ease;
  border: none;
  cursor: pointer;
}
.bl-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(13,148,136,.35);
}

/* ═══════════════════════════════════════
   9. RESPONSIVE
   ═══════════════════════════════════════ */
@media (max-width: 640px) {
  .w2o-blog { padding: 0 16px; }
  .bl-header { padding: 40px 0 32px; }
  .bl-header__meta { flex-wrap: wrap; gap: 12px; }
  .bl-tip { flex-direction: column; gap: 16px; padding: 24px 20px; }
  .bl-tip__num { width: 44px; height: 44px; font-size: 18px; }
  .bl-compare__head { flex-direction: column; gap: 10px; align-items: flex-start; }
  .bl-compare__features { grid-template-columns: 1fr; }
  .bl-stats { grid-template-columns: repeat(2, 1fr); }
  .bl-bottom-cta { margin: 40px -16px 0; padding: 40px 20px; }
}

/* ═══════════════════════════════════════
   10. THEME OVERRIDE — hide duplicate featured image
   Common theme selectors for post thumbnails.
   Our .bl-hero-img replaces the theme's version.
   ═══════════════════════════════════════ */
.w2o-blog ~ .post-thumbnail,
.w2o-blog ~ .wp-post-image,
.entry-content:has(.w2o-blog) ~ .post-thumbnail,
article:has(.w2o-blog) > .post-thumbnail,
article:has(.w2o-blog) > header .post-thumbnail,
article:has(.w2o-blog) > .featured-image,
article:has(.w2o-blog) > .entry-header .post-thumbnail,
.single-post:has(.w2o-blog) .attachment-post-thumbnail {
  display: none !important;
}

/* ═══════════════════════════════════════
   11. ANIMATION
   ═══════════════════════════════════════ */
@keyframes blFadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.bl-tip, .bl-compare, .bl-stat { animation: blFadeUp .5s ease-out both; }
.bl-tip:nth-child(1), .bl-compare:nth-child(1) { animation-delay: .05s; }
.bl-tip:nth-child(2), .bl-compare:nth-child(2) { animation-delay: .10s; }
.bl-tip:nth-child(3), .bl-compare:nth-child(3) { animation-delay: .15s; }
.bl-tip:nth-child(4), .bl-compare:nth-child(4) { animation-delay: .20s; }
.bl-tip:nth-child(5), .bl-compare:nth-child(5) { animation-delay: .25s; }

@media (prefers-reduced-motion: reduce) {
  .bl-tip, .bl-compare, .bl-stat { animation: none; }
}
