/* static/css/article.css - High-Authority Technical Article Styling for Apolynx AI */

.article-page {
  background-color: #ffffff;
  color: var(--text-main, #0f172a);
  font-family: var(--font-sans, 'Inter', sans-serif);
  line-height: 1.7;
}

/* Breadcrumbs */
.article-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.84rem;
  color: #64748b;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.article-breadcrumbs a {
  color: #64748b;
  text-decoration: none;
  transition: color 0.15s;
}

.article-breadcrumbs a:hover {
  color: var(--claude-accent, #d97757);
}

.article-breadcrumbs .separator {
  color: #cbd5e1;
  font-size: 0.75rem;
}

.article-breadcrumbs .current {
  color: #0f172a;
  font-weight: 600;
}

/* Header & Meta */
.article-header {
  padding: 40px 0 32px;
  border-bottom: 1px solid #e2e8f0;
  margin-bottom: 40px;
}

.article-badge-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.article-layer-badge {
  background: #fff7ed;
  color: #c25734;
  border: 1px solid #fed7aa;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.article-category-badge {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.74rem;
  font-weight: 700;
}

.article-meta-time {
  font-size: 0.8rem;
  color: #64748b;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.article-h1 {
  font-size: clamp(2.1rem, 4.5vw, 3.2rem);
  font-weight: 900;
  color: #0f172a;
  line-height: 1.22;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}

.article-lead {
  font-size: 1.18rem;
  color: #334155;
  line-height: 1.75;
  max-width: 960px;
  margin-bottom: 28px;
}

/* Author / Team Stamp */
.article-author-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  width: fit-content;
}

.article-author-avatar {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  object-fit: contain;
  background: #ffffff;
  padding: 4px;
  border: 1px solid #e2e8f0;
}

.article-author-info strong {
  display: block;
  font-size: 0.92rem;
  color: #0f172a;
}

.article-author-info span {
  font-size: 0.78rem;
  color: #64748b;
}

/* Main Layout Grid */
.article-layout-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 48px;
  align-items: start;
}

@media (max-width: 1024px) {
  .article-layout-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

/* Sticky Sidebar TOC */
.article-sidebar {
  position: sticky;
  top: 96px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 22px 20px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.03);
}

.article-toc-title {
  font-size: 0.84rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #0f172a;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.article-toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.article-toc-list a {
  font-size: 0.88rem;
  color: #475569;
  text-decoration: none;
  line-height: 1.4;
  transition: color 0.15s, padding-left 0.15s;
  display: block;
}

.article-toc-list a:hover {
  color: var(--claude-accent, #d97757);
  padding-left: 4px;
}

/* Takeaways Box */
.takeaways-box {
  background: linear-gradient(180deg, #fffbf6 0%, #ffffff 100%);
  border: 1.5px solid #fed7aa;
  border-radius: 16px;
  padding: 26px 28px;
  margin-bottom: 36px;
  box-shadow: 0 6px 24px -4px rgba(217, 119, 87, 0.08);
}

.takeaways-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #c25734;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.takeaways-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.takeaways-list li {
  font-size: 0.95rem;
  color: #334155;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.55;
}

.takeaways-list li i {
  color: #059669;
  margin-top: 4px;
  flex-shrink: 0;
}

/* Prose Sections */
.article-content h2 {
  font-size: 1.65rem;
  font-weight: 800;
  color: #0f172a;
  margin: 40px 0 16px;
  line-height: 1.35;
  letter-spacing: -0.02em;
  padding-top: 12px;
  border-top: 1px solid #f1f5f9;
}

.article-content h3 {
  font-size: 1.3rem;
  font-weight: 800;
  color: #1e293b;
  margin: 28px 0 12px;
  line-height: 1.4;
}

.article-content p {
  font-size: 1.02rem;
  color: #334155;
  line-height: 1.8;
  margin-bottom: 22px;
}

/* ASCII & Architecture Diagram Box */
.article-diagram-card {
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 14px;
  padding: 24px 20px;
  margin: 32px 0;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.25);
  overflow-x: auto;
}

.article-diagram-header {
  font-size: 0.78rem;
  color: #94a3b8;
  font-family: var(--font-mono, monospace);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.article-diagram-header::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--claude-accent, #d97757);
}

.article-diagram-card pre {
  margin: 0;
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 0.84rem;
  line-height: 1.45;
  color: #e2e8f0;
  white-space: pre;
}

/* Benchmarks Table */
.benchmark-table-wrap {
  overflow-x: auto;
  margin: 32px 0;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.03);
}

.benchmark-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  text-align: left;
}

.benchmark-table th {
  background: #f8fafc;
  color: #0f172a;
  font-weight: 800;
  padding: 14px 18px;
  border-bottom: 2px solid #e2e8f0;
}

.benchmark-table td {
  padding: 14px 18px;
  border-bottom: 1px solid #e2e8f0;
  color: #334155;
  vertical-align: middle;
}

.benchmark-table tr:last-child td {
  border-bottom: none;
}

.benchmark-table .metric-name {
  font-weight: 700;
  color: #0f172a;
}

.benchmark-table .col-cloud {
  color: #64748b;
  background: #fafafa;
}

.benchmark-table .col-apolynx {
  color: #059669;
  font-weight: 700;
  background: #f0fdf4;
}

/* In-Article CTA Banner */
.article-cta-box {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  border-radius: 18px;
  padding: 36px 32px;
  color: #ffffff;
  margin: 48px 0;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.25);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.article-cta-box h3 {
  font-size: 1.5rem;
  font-weight: 900;
  color: #f8fafc;
  margin: 0;
}

.article-cta-box p {
  color: #cbd5e1;
  font-size: 0.98rem;
  line-height: 1.65;
  margin: 0;
}

.article-cta-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 8px;
}

/* Related Articles Grid */
.related-articles-section {
  padding: 60px 0 80px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 28px;
}

.related-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 22px;
  text-decoration: none;
  color: inherit;
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}

.related-card:hover {
  border-color: #cbd5e1;
  transform: translateY(-3px);
  box-shadow: 0 12px 24px -4px rgba(0,0,0,0.08);
}

.related-card-badge {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--claude-accent, #d97757);
  margin-bottom: 8px;
}

.related-card-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.35;
  margin-bottom: 8px;
  flex: 1;
}

.related-card-link {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--claude-accent, #d97757);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
}
