/* ============================================================
   BetaQuick Blog — blog.css
   Extends main.css — dark theme, Inter font, cyan/blue brand
   ============================================================ */

/* ── Blog Hero ── */
.blog-hero {
  padding: 120px 0 64px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.blog-hero::before {
  content: '';
  position: absolute;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(0,229,255,0.06) 0%, transparent 70%);
  pointer-events: none;
}
.blog-hero .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: var(--s3);
}
.blog-hero .eyebrow span {
  display: inline-block;
  width: 24px;
  height: 2px;
  background: var(--grad-h);
  border-radius: 2px;
}
.blog-hero h1 {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--tx-primary);
  margin-bottom: var(--s3);
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}
.blog-hero .lead {
  font-size: 1.125rem;
  color: var(--tx-secondary);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ── Category Filter ── */
.blog-filter {
  display: flex;
  align-items: center;
  gap: var(--s2);
  flex-wrap: wrap;
  margin-bottom: var(--s5);
}
.filter-btn {
  padding: 6px 16px;
  border-radius: 100px;
  font-size: 0.8125rem;
  font-weight: 600;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--tx-secondary);
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}
.filter-btn:hover,
.filter-btn.active {
  border-color: var(--cyan);
  color: var(--cyan);
  background: rgba(0,229,255,0.06);
}

/* ── Blog Card ── */
.blog-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
  display: flex;
  flex-direction: column;
}
.blog-card:hover {
  transform: translateY(-4px);
  border-color: rgba(0,229,255,0.3);
  box-shadow: var(--shadow-glow);
}
.blog-card-img {
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--bg-raised);
  position: relative;
}
.blog-card-img-inner {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(0,229,255,0.08) 0%, rgba(0,153,230,0.12) 100%);
  position: relative;
}
.blog-card-img-icon {
  font-size: 3rem;
  opacity: 0.6;
}
.blog-card-img-pattern {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 50%, rgba(0,229,255,0.12) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(0,153,230,0.10) 0%, transparent 50%);
}
.blog-card-body {
  padding: var(--s4);
  flex: 1;
  display: flex;
  flex-direction: column;
}
.blog-card-meta {
  display: flex;
  align-items: center;
  gap: var(--s2);
  margin-bottom: var(--s3);
  flex-wrap: wrap;
}
.blog-card-category {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 100px;
  border: 1px solid rgba(0,229,255,0.3);
  color: var(--cyan);
  background: rgba(0,229,255,0.06);
}
.blog-card-category.cat-medical { color: #a78bfa; border-color: rgba(167,139,250,0.3); background: rgba(167,139,250,0.06); }
.blog-card-category.cat-hipaa { color: #34d399; border-color: rgba(52,211,153,0.3); background: rgba(52,211,153,0.06); }
.blog-card-category.cat-business { color: #fbbf24; border-color: rgba(251,191,36,0.3); background: rgba(251,191,36,0.06); }
.blog-card-readtime {
  font-size: 0.8rem;
  color: var(--tx-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}
.blog-card h2, .blog-card h3 {
  font-size: 1.1875rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--tx-primary);
  margin-bottom: var(--s2);
  letter-spacing: -0.01em;
}
.blog-card p {
  font-size: 0.9rem;
  color: var(--tx-secondary);
  line-height: 1.65;
  flex: 1;
  margin-bottom: var(--s3);
}
.blog-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--s3);
  border-top: 1px solid var(--border);
  margin-top: auto;
}
.blog-card-date {
  font-size: 0.8rem;
  color: var(--tx-muted);
}
.blog-card-link {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--cyan);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: gap 0.2s;
}
.blog-card-link:hover { gap: 8px; }

/* ── Featured Card (large) ── */
.blog-featured {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin-bottom: var(--s6);
  transition: border-color 0.25s, box-shadow 0.25s;
}
.blog-featured:hover {
  border-color: rgba(0,229,255,0.3);
  box-shadow: var(--shadow-glow);
}
.blog-featured-img {
  background: linear-gradient(135deg, rgba(0,229,255,0.1) 0%, rgba(0,153,230,0.15) 100%);
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.blog-featured-img::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 30% 40%, rgba(0,229,255,0.15) 0%, transparent 60%),
    radial-gradient(circle at 70% 70%, rgba(0,153,230,0.12) 0%, transparent 50%);
}
.blog-featured-img-icon {
  font-size: 5rem;
  position: relative;
  z-index: 1;
  opacity: 0.7;
}
.blog-featured-body {
  padding: var(--s6);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.blog-featured-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: var(--s3);
}
.blog-featured-body h2 {
  font-size: clamp(1.375rem, 2.5vw, 1.75rem);
  font-weight: 800;
  line-height: 1.25;
  color: var(--tx-primary);
  margin-bottom: var(--s3);
  letter-spacing: -0.02em;
}
.blog-featured-body p {
  color: var(--tx-secondary);
  line-height: 1.7;
  margin-bottom: var(--s4);
}
.blog-featured-meta {
  display: flex;
  align-items: center;
  gap: var(--s3);
  margin-bottom: var(--s4);
  font-size: 0.85rem;
  color: var(--tx-muted);
}
@media (max-width: 768px) {
  .blog-featured { grid-template-columns: 1fr; }
  .blog-featured-img { min-height: 200px; }
}

/* ── Blog Grid ── */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s4);
}
@media (max-width: 1024px) {
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .blog-grid { grid-template-columns: 1fr; }
}

/* ── Coming Soon Card ── */
.blog-card-soon {
  opacity: 0.5;
  pointer-events: none;
}
.blog-card-soon .blog-card-category::after {
  content: ' · Coming Soon';
}

/* ── Article Page ── */
.article-wrap {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: var(--s6);
  align-items: start;
  padding: 80px 0 100px;
}
@media (max-width: 1024px) {
  .article-wrap { grid-template-columns: 1fr; }
  .article-sidebar { display: none; }
}

/* ── Article Hero ── */
.article-hero {
  padding: 100px 0 0;
}
.article-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
  color: var(--tx-muted);
  margin-bottom: var(--s4);
  flex-wrap: wrap;
}
.article-breadcrumb a {
  color: var(--tx-muted);
  text-decoration: none;
  transition: color 0.2s;
}
.article-breadcrumb a:hover { color: var(--cyan); }
.article-breadcrumb .sep { color: var(--tx-muted); opacity: 0.4; }
.article-breadcrumb .current { color: var(--tx-secondary); }

.article-header { margin-bottom: var(--s5); }
.article-header .article-cats {
  display: flex;
  gap: var(--s2);
  margin-bottom: var(--s3);
  flex-wrap: wrap;
}
.article-cat-badge {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 100px;
  border: 1px solid rgba(0,229,255,0.3);
  color: var(--cyan);
  background: rgba(0,229,255,0.06);
}
.article-header h1 {
  font-size: clamp(1.875rem, 4vw, 2.875rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: var(--tx-primary);
  margin-bottom: var(--s3);
}
.article-header .article-desc {
  font-size: 1.125rem;
  color: var(--tx-secondary);
  line-height: 1.7;
  max-width: 720px;
  margin-bottom: var(--s4);
}
.article-meta-bar {
  display: flex;
  align-items: center;
  gap: var(--s4);
  padding: var(--s3) 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.article-author {
  display: flex;
  align-items: center;
  gap: 10px;
}
.article-author-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--grad);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--tx-inverse);
  flex-shrink: 0;
}
.article-author-info { line-height: 1.3; }
.article-author-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--tx-primary);
}
.article-author-role {
  font-size: 0.775rem;
  color: var(--tx-muted);
}
.article-meta-divider {
  width: 1px;
  height: 32px;
  background: var(--border);
}
.article-meta-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.article-meta-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--tx-muted);
  font-weight: 600;
}
.article-meta-value {
  font-size: 0.875rem;
  color: var(--tx-secondary);
  font-weight: 500;
}

/* ── Table of Contents ── */
.article-toc {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--s4);
  margin: var(--s5) 0;
}
.article-toc-title {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--tx-muted);
  margin-bottom: var(--s3);
}
.article-toc ol {
  list-style: none;
  counter-reset: toc;
  padding: 0;
  margin: 0;
}
.article-toc li {
  counter-increment: toc;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
}
.article-toc li:last-child { border-bottom: none; }
.article-toc li::before {
  content: counter(toc, decimal-leading-zero);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--cyan);
  opacity: 0.7;
  flex-shrink: 0;
  margin-top: 2px;
}
.article-toc a {
  font-size: 0.875rem;
  color: var(--tx-secondary);
  text-decoration: none;
  line-height: 1.45;
  transition: color 0.2s;
}
.article-toc a:hover { color: var(--cyan); }

/* ── Article Body ── */
.article-body {
  color: var(--tx-secondary);
  font-size: 1.0625rem;
  line-height: 1.8;
}
.article-body h2 {
  font-size: clamp(1.375rem, 2.5vw, 1.625rem);
  font-weight: 800;
  color: var(--tx-primary);
  letter-spacing: -0.02em;
  margin: var(--s6) 0 var(--s3);
  padding-top: var(--s4);
  border-top: 1px solid var(--border);
  scroll-margin-top: 100px;
}
.article-body h2:first-child { border-top: none; margin-top: 0; }
.article-body h3 {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--tx-primary);
  margin: var(--s4) 0 var(--s2);
  scroll-margin-top: 100px;
}
.article-body p {
  margin-bottom: var(--s3);
}
.article-body strong { color: var(--tx-primary); font-weight: 600; }
.article-body em { color: var(--cyan); font-style: normal; font-weight: 500; }
.article-body a {
  color: var(--cyan);
  text-decoration: underline;
  text-decoration-color: rgba(0,229,255,0.3);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s;
}
.article-body a:hover { text-decoration-color: var(--cyan); }
.article-body ul, .article-body ol {
  padding-left: var(--s4);
  margin-bottom: var(--s3);
}
.article-body ul li, .article-body ol li {
  margin-bottom: var(--s2);
  line-height: 1.7;
}
.article-body ul li::marker { color: var(--cyan); }
.article-body ol li::marker { color: var(--cyan); font-weight: 700; }

/* Answer Box — LLM-optimized direct answer block */
.answer-box {
  background: rgba(0,229,255,0.05);
  border: 1px solid rgba(0,229,255,0.2);
  border-left: 4px solid var(--cyan);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: var(--s3) var(--s4);
  margin: var(--s3) 0 var(--s4);
  font-size: 1rem;
  color: var(--tx-primary);
  line-height: 1.7;
}
.answer-box-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 6px;
}

/* Stat Box */
.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s3);
  margin: var(--s4) 0;
}
@media (max-width: 640px) { .stat-row { grid-template-columns: 1fr; } }
.stat-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--s3) var(--s4);
  text-align: center;
}
.stat-value {
  font-size: 2rem;
  font-weight: 800;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
  margin-bottom: 4px;
}
.stat-label {
  font-size: 0.825rem;
  color: var(--tx-muted);
  line-height: 1.4;
}

/* Comparison Table */
.compare-table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--s4) 0;
  font-size: 0.9375rem;
}
.compare-table th {
  background: var(--bg-card);
  padding: 12px 16px;
  text-align: left;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--tx-muted);
  border-bottom: 2px solid var(--border);
}
.compare-table th:first-child { border-radius: var(--radius) 0 0 0; }
.compare-table th:last-child { border-radius: 0 var(--radius) 0 0; }
.compare-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--tx-secondary);
  vertical-align: top;
  line-height: 1.5;
}
.compare-table tr:last-child td { border-bottom: none; }
.compare-table tr:nth-child(even) td { background: rgba(255,255,255,0.01); }
.compare-table .check { color: #34d399; font-weight: 700; }
.compare-table .cross { color: #f87171; }
.compare-table .col-highlight th { color: var(--cyan); }

/* Checklist */
.checklist {
  list-style: none;
  padding: 0;
  margin: var(--s3) 0;
}
.checklist li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9375rem;
  color: var(--tx-secondary);
  line-height: 1.55;
}
.checklist li:last-child { border-bottom: none; }
.checklist li::before {
  content: '✓';
  color: var(--cyan);
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}

/* Pull Quote */
.pullquote {
  border-left: 3px solid var(--cyan);
  margin: var(--s5) 0;
  padding: var(--s3) var(--s4);
  font-size: 1.25rem;
  font-style: italic;
  color: var(--tx-primary);
  line-height: 1.6;
  background: rgba(0,229,255,0.03);
  border-radius: 0 var(--radius) var(--radius) 0;
}

/* ── FAQ Section ── */
.faq-list {
  margin: var(--s4) 0;
}
.faq-item {
  border-bottom: 1px solid var(--border);
  padding: var(--s3) 0;
}
.faq-item:last-child { border-bottom: none; }
.faq-q {
  font-size: 1rem;
  font-weight: 700;
  color: var(--tx-primary);
  margin-bottom: var(--s2);
  line-height: 1.4;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.faq-q::before {
  content: 'Q';
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--cyan);
  background: rgba(0,229,255,0.1);
  border-radius: 4px;
  padding: 2px 6px;
  flex-shrink: 0;
  margin-top: 3px;
}
.faq-a {
  font-size: 0.9375rem;
  color: var(--tx-secondary);
  line-height: 1.75;
  padding-left: 36px;
}

/* ── Sidebar ── */
.article-sidebar {
  position: sticky;
  top: 100px;
}
.sidebar-cta {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--s4);
  margin-bottom: var(--s4);
}
.sidebar-cta-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: var(--s2);
}
.sidebar-cta h3 {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--tx-primary);
  line-height: 1.35;
  margin-bottom: var(--s2);
}
.sidebar-cta p {
  font-size: 0.875rem;
  color: var(--tx-secondary);
  line-height: 1.6;
  margin-bottom: var(--s3);
}
.sidebar-toc {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--s4);
}
.sidebar-toc-title {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--tx-muted);
  margin-bottom: var(--s2);
}
.sidebar-toc ol {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: stoc;
}
.sidebar-toc li {
  counter-increment: stoc;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 5px 0;
}
.sidebar-toc li::before {
  content: counter(stoc);
  font-size: 0.675rem;
  font-weight: 700;
  color: var(--cyan);
  opacity: 0.6;
  flex-shrink: 0;
  min-width: 14px;
  margin-top: 3px;
}
.sidebar-toc a {
  font-size: 0.8125rem;
  color: var(--tx-secondary);
  text-decoration: none;
  line-height: 1.4;
  transition: color 0.2s;
}
.sidebar-toc a:hover, .sidebar-toc a.active-toc { color: var(--cyan); }

/* ── Article Footer / Next Steps ── */
.article-cta-box {
  background: linear-gradient(135deg, rgba(0,229,255,0.08) 0%, rgba(0,153,230,0.12) 100%);
  border: 1px solid rgba(0,229,255,0.2);
  border-radius: var(--radius-xl);
  padding: var(--s6);
  text-align: center;
  margin: var(--s6) 0;
}
.article-cta-box h2 {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--tx-primary);
  margin-bottom: var(--s2);
  letter-spacing: -0.02em;
}
.article-cta-box p {
  color: var(--tx-secondary);
  margin-bottom: var(--s4);
  font-size: 1.0625rem;
  line-height: 1.7;
}
.article-cta-box .cta-btns {
  display: flex;
  gap: var(--s3);
  justify-content: center;
  flex-wrap: wrap;
}

/* ── Blog CTA Section ── */
.blog-cta-section {
  padding: var(--s8) 0;
  text-align: center;
  background: var(--bg-raised);
  border-top: 1px solid var(--border);
}
.blog-cta-section h2 {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 800;
  color: var(--tx-primary);
  letter-spacing: -0.02em;
  margin-bottom: var(--s2);
}
.blog-cta-section p {
  color: var(--tx-secondary);
  font-size: 1.0625rem;
  max-width: 540px;
  margin: 0 auto var(--s5);
  line-height: 1.7;
}

/* ── Related Articles ── */
.related-section { padding: var(--s6) 0 var(--s8); }
.related-section h2 {
  font-size: 1.375rem;
  font-weight: 800;
  color: var(--tx-primary);
  margin-bottom: var(--s5);
  letter-spacing: -0.02em;
}

/* ── Footer ── */
.blog-footer img {
  height: 28px;
  width: auto;
}
.blog-footer {
  background: var(--bg-base);
  border-top: 1px solid var(--border);
  padding: var(--s6) 0 var(--s4);
}
.blog-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s4);
  flex-wrap: wrap;
}
.blog-footer-links {
  display: flex;
  gap: var(--s4);
  flex-wrap: wrap;
}
.blog-footer-links a {
  font-size: 0.875rem;
  color: var(--tx-muted);
  text-decoration: none;
  transition: color 0.2s;
}
.blog-footer-links a:hover { color: var(--tx-secondary); }
.blog-footer-copy {
  font-size: 0.8rem;
  color: var(--tx-muted);
}
