/* ═══ ARTICLES / BLOG ═══ */

/* ── Missing variable aliases (used across the site) ── */
:root {
  --surface: var(--bg-card, #ffffff);
  --border: var(--line, rgba(11,14,20,0.06));
  --fg: var(--text, #0b0e14);
  --muted: var(--text-mid, #4a5568);
}

/* ══════════════════════════════════════
   ARTICLE HERO (dark banner — single article pages)
   ══════════════════════════════════════ */
.article-hero {
  background: var(--bg-dark, #0b0e14);
  color: #fff;
  padding: 5rem 0 3.5rem;
  margin-bottom: 3rem;
}
/* Hero content aligns with article body (left-aligned, 760px) */
.article-hero-inner {
  max-width: 760px;
}

/* Back link */
.article-hero-back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.88rem;
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  margin-bottom: 2rem;
  transition: color 0.2s;
}
.article-hero-back:hover { color: #fff; }

/* Category + date row */
.article-hero-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  font-size: 0.85rem;
}
.article-hero-cat {
  font-weight: 600;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.article-hero-date {
  color: rgba(255,255,255,0.45);
}

/* Title */
.article-hero-title {
  font-family: var(--display);
  font-size: 2.6rem;
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 1rem;
  color: #fff;
}

/* Description */
.article-hero-desc {
  font-size: 1.15rem;
  line-height: 1.65;
  color: rgba(255,255,255,0.55);
  max-width: 640px;
  margin-bottom: 2rem;
}

/* Author / read time row */
.article-hero-author {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.article-hero-author-info {
  display: flex;
  flex-direction: column;
}
.article-hero-author-name {
  font-weight: 600;
  font-size: 0.92rem;
  color: #fff;
}
.article-hero-author-role {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.4);
}
.article-hero-readtime {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.4);
  margin-left: auto;
}

/* ══════════════════════════════════════
   CATEGORY FILTERS (listing page)
   ══════════════════════════════════════ */
.articles-filters {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}
.filter-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.45rem 1rem;
  font-family: var(--body);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s;
}
.filter-btn:hover {
  border-color: var(--accent);
  color: var(--fg);
}
.filter-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.article-count {
  margin-left: auto;
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 500;
}

/* ══════════════════════════════════════
   LISTING GRID
   ══════════════════════════════════════ */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  padding-bottom: 4rem;
}

.article-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 2rem;
  text-decoration: none;
  color: var(--fg);
  display: flex;
  flex-direction: column;
  transition: border-color 0.3s, transform 0.2s;
}
.article-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

/* Featured card */
.article-featured {
  grid-column: 1 / -1;
  margin-bottom: 0.5rem;
  border: 1px solid var(--accent-line, rgba(59,107,158,0.2));
  background: var(--accent-light, rgba(59,107,158,0.04));
}
.article-featured h2 {
  font-family: var(--display);
  font-size: 1.6rem;
  line-height: 1.3;
  margin-bottom: 0.5rem;
}
.article-badge-featured {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 0.15rem 0.55rem;
  border-radius: 4px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Article meta */
.article-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  font-size: 0.82rem;
}
.article-cat {
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Category colors — original (legacy standalone articles) */
.cat-white-paper { background: rgba(99, 102, 241, 0.1); color: #818cf8; }
.cat-market-report { background: rgba(34, 197, 94, 0.1); color: #22c55e; }
.cat-insight { background: rgba(255, 107, 53, 0.1); color: var(--accent); }

/* Category colors — new system */
.cat-data-sovereignty { background: rgba(139, 92, 246, 0.1); color: #8B5CF6; }
.cat-ai-ml { background: rgba(59, 130, 246, 0.1); color: #3B82F6; }
.cat-market-intelligence { background: rgba(16, 185, 129, 0.1); color: #10B981; }
.cat-product-engineering { background: rgba(245, 158, 11, 0.1); color: #F59E0B; }
.cat-player-engagement { background: rgba(236, 72, 153, 0.1); color: #EC4899; }
.cat-payments-distribution { background: rgba(239, 68, 68, 0.1); color: #EF4444; }

.article-date {
  color: var(--muted);
}

.article-card h3 {
  font-family: var(--display);
  font-size: 1.2rem;
  line-height: 1.35;
  margin-bottom: 0.5rem;
}
.article-card p {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.6;
  flex: 1;
  margin: 0;
}

.article-read {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  margin-top: 1rem;
}
.article-read i {
  transition: transform 0.2s;
}
.article-card:hover .article-read i {
  transform: translateX(3px);
}

/* ══════════════════════════════════════
   SINGLE ARTICLE (body section)
   ══════════════════════════════════════ */
.article-single {
  max-width: 760px;
  padding-bottom: 4rem;
}

/* Legacy back link (old standalone articles) */
.article-back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.88rem;
  color: var(--muted);
  text-decoration: none;
  margin-bottom: 1.5rem;
  transition: color 0.2s;
}
.article-back:hover { color: var(--accent); }

/* Legacy header (old standalone articles without hero) */
.article-header {
  margin-bottom: 3rem;
}
.article-header h1 {
  font-family: var(--display);
  font-size: 2.4rem;
  line-height: 1.2;
  margin-bottom: 0.75rem;
}
.article-subtitle {
  font-size: 1.15rem;
  color: var(--muted);
  line-height: 1.6;
}
.article-read-time {
  color: var(--muted);
}

/* Body content */
.article-body h2 {
  font-family: var(--display);
  font-size: 1.4rem;
  margin: 2.5rem 0 0.75rem;
}
.article-body h2:first-child {
  margin-top: 0;
}
.article-body p {
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: 1rem;
  font-size: 1rem;
}
.article-body strong {
  color: var(--fg);
}
.article-body em {
  font-style: italic;
}

/* ══════════════════════════════════════
   PREV / NEXT NAVIGATION
   ══════════════════════════════════════ */
.article-nav {
  display: flex;
  gap: 1.5rem;
  max-width: 760px;
  padding-top: 2rem;
  padding-bottom: 3rem;
  border-top: 1px solid var(--border);
}
.article-nav-link {
  flex: 1;
  text-decoration: none;
  color: var(--fg);
  padding: 1.25rem 1.5rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.article-nav-link:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}
.nav-label {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 0.4rem;
}
.nav-title {
  display: block;
  font-family: var(--display);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.35;
}
.nav-next { text-align: right; }
.nav-next .nav-label { justify-content: flex-end; }

/* ══════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════ */
@media (max-width: 900px) {
  .articles-grid { grid-template-columns: 1fr; }
  .article-header h1 { font-size: 1.8rem; }
  .article-hero-title { font-size: 2rem; }
  .article-hero { padding: 3.5rem 0 2.5rem; }
  .article-nav { flex-direction: column; }
  .nav-next { text-align: left; }
  .nav-next .nav-label { justify-content: flex-start; }
}
@media (max-width: 640px) {
  .article-card { padding: 1.5rem; }
  .article-header h1 { font-size: 1.5rem; }
  .article-hero-title { font-size: 1.6rem; }
  .article-hero-desc { font-size: 1rem; }
  .article-hero { padding: 2.5rem 0 2rem; }
  .articles-filters { gap: 0.35rem; }
  .filter-btn { padding: 0.35rem 0.75rem; font-size: 0.75rem; }
  .article-featured h2 { font-size: 1.3rem; }
}
