/* ==========================================================================
   Blog Post Component Styles
   Consolidated from inline <style> blocks in individual posts.
   ========================================================================== */

/* --- Hero Stats (Post 1: hospital-revenue-case-study) --- */
.hero-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1.25rem;
  margin: var(--spacing-md) 0;
  padding: 1.5rem;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  border: 1px solid var(--bg-tertiary);
}
.hero-stat { text-align: center; }
.hero-stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent-primary);
  display: block;
}
.hero-stat-label { font-size: 0.85rem; color: var(--text-secondary); font-weight: 600; }

/* --- Comparison Table (Post 1) --- */
.comparison-table-wrapper {
  overflow-x: auto;
  margin: var(--spacing-md) 0;
  border-radius: var(--radius-sm);
  border: 1px solid var(--bg-tertiary);
}
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-primary);
  font-size: 0.92rem;
}
.comparison-table thead {
  background: linear-gradient(135deg, var(--accent-primary) 0%, #178a86 100%);
  color: white;
}
.comparison-table th { padding: 0.75rem 1rem; text-align: left; font-weight: 600; }
.comparison-table td { padding: 0.75rem 1rem; border-bottom: 1px solid var(--bg-tertiary); }
.comparison-table .before-col { background: rgba(239, 68, 68, 0.05); }
.comparison-table .after-col { background: rgba(16, 185, 129, 0.05); }
.comparison-table tbody tr:hover { background: var(--bg-secondary); }
.metric-positive { color: #10b981; font-weight: 700; }

/* --- Timeline (Post 1) --- */
.timeline { position: relative; padding: 1rem 0; margin: var(--spacing-md) 0; }
.timeline-item { position: relative; padding-left: 2.5rem; margin-bottom: 2rem; }
.timeline-item::before {
  content: '';
  position: absolute;
  left: 0; top: 0;
  width: 14px; height: 14px;
  background: var(--accent-primary);
  border: 3px solid var(--bg-primary);
  border-radius: 50%;
  box-shadow: 0 0 0 2px var(--accent-primary);
}
.timeline-item::after {
  content: '';
  position: absolute;
  left: 6px; top: 14px;
  width: 2px; height: calc(100% + 1rem);
  background: rgba(31, 165, 160, 0.25);
}
.timeline-item:last-child::after { display: none; }
.timeline-month { font-weight: 700; color: var(--accent-primary); font-size: 1.05rem; margin-bottom: 0.25rem; }
.timeline-content { color: var(--text-secondary); }
.timeline-content ul { margin-top: 0.5rem; padding-left: 1.25rem; }
.timeline-content li { margin-bottom: 0.25rem; }

/* --- Highlight Box (shared across all posts) --- */
.highlight-box {
  background: linear-gradient(135deg, rgba(31, 165, 160, 0.08) 0%, rgba(212, 175, 55, 0.05) 100%);
  border-left: 4px solid var(--accent-primary);
  padding: var(--spacing-sm) var(--spacing-md);
  margin: var(--spacing-md) 0;
  border-radius: var(--radius-sm);
}
.highlight-box h4 { color: var(--accent-primary); margin-top: 0; margin-bottom: 0.5rem; }
.highlight-box p, .highlight-box ul { margin-bottom: 0; }

/* --- Quote Box (Post 1) --- */
.quote-box {
  background: var(--bg-secondary);
  border-left: 4px solid #D4AF37;
  padding: 1.25rem 1.5rem;
  margin: var(--spacing-md) 0;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic;
}
.quote-text { font-size: 1.1rem; color: var(--text-primary); margin-bottom: 0.5rem; }
.quote-author { font-size: 0.9rem; color: var(--text-secondary); font-weight: 600; font-style: normal; }

/* --- Data Table (Post 2: rcm-market-analysis) --- */
.data-table-wrapper {
  overflow-x: auto;
  margin: var(--spacing-md) 0;
  border-radius: var(--radius-sm);
  border: 1px solid var(--bg-tertiary);
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-primary);
  font-size: 0.92rem;
}
.data-table thead {
  background: linear-gradient(135deg, var(--accent-primary) 0%, #178a86 100%);
  color: white;
}
.data-table th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 600;
}
.data-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--bg-tertiary);
}
.data-table tbody tr:hover { background: var(--bg-secondary); }
.trend-up { color: #10b981; font-weight: 600; }

/* --- Stats Grid (Post 2) --- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.25rem;
  margin: var(--spacing-md) 0;
}
.stat-box {
  background: var(--bg-secondary);
  padding: 1.25rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--bg-tertiary);
  text-align: center;
}
.stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--accent-primary);
  margin-bottom: 0.25rem;
}
.stat-label { font-size: 0.85rem; color: var(--text-secondary); font-weight: 500; }

/* --- Info Grid (Post 3: abdm-nhcx-digital-health) --- */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin: var(--spacing-md) 0;
}
.info-card {
  background: var(--bg-secondary);
  padding: 1.25rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--bg-tertiary);
}
.info-card h4 {
  color: var(--accent-primary);
  margin-bottom: 0.5rem;
  font-size: 1.05rem;
}
.info-card p { margin-bottom: 0; font-size: 0.95rem; }

/* ==========================================================================
   Dark Theme Overrides
   ========================================================================== */

/* Comparison Table */
[data-theme="dark"] .comparison-table { background: var(--bg-secondary); }
[data-theme="dark"] .comparison-table td { color: var(--text-secondary); }
[data-theme="dark"] .comparison-table .before-col { background: rgba(239, 68, 68, 0.08); }
[data-theme="dark"] .comparison-table .after-col { background: rgba(16, 185, 129, 0.08); }

/* Hero Stats */
[data-theme="dark"] .hero-stats { background: rgba(31, 165, 160, 0.08); border-color: rgba(31, 165, 160, 0.2); }

/* Highlight Box (shared) */
[data-theme="dark"] .highlight-box { background: rgba(31, 165, 160, 0.1); }

/* Quote Box */
[data-theme="dark"] .quote-box { background: rgba(212, 175, 55, 0.08); }

/* Data Table */
[data-theme="dark"] .data-table { background: var(--bg-secondary); }
[data-theme="dark"] .data-table td { color: var(--text-secondary); border-bottom-color: var(--bg-tertiary); }
[data-theme="dark"] .data-table tbody tr:hover { background: var(--bg-tertiary); }

/* Stat Box */
[data-theme="dark"] .stat-box { background: rgba(31, 165, 160, 0.08); border-color: rgba(31, 165, 160, 0.2); }

/* Info Card */
[data-theme="dark"] .info-card {
  background: rgba(31, 165, 160, 0.08);
  border-color: rgba(31, 165, 160, 0.2);
}
