/* ============================================
   Article styles — apple-dev.fun
   ============================================ */

/* ── BREADCRUMBS ── */
.breadcrumbs {
  padding: calc(var(--header-h) + 24px) 0 0;
  background: var(--bg);
}

.breadcrumbs-inner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.breadcrumbs-inner a {
  color: var(--text-muted);
  transition: color 0.2s;
}
.breadcrumbs-inner a:hover { color: var(--accent); }

.breadcrumbs-inner .sep {
  color: var(--border);
  user-select: none;
}

.breadcrumbs-inner span {
  color: var(--text);
}

/* ── ARTICLE HERO ── */
.article-hero {
  padding: 32px 0 56px;
  background: radial-gradient(ellipse 70% 50% at 50% 0%, rgba(0,255,135,0.06) 0%, transparent 70%);
}

.article-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

.article-tag {
  display: inline-flex;
  align-items: center;
  background: rgba(0,255,135,0.1);
  border: 1px solid rgba(0,255,135,0.2);
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.article-date {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.article-read-time {
  font-size: 0.82rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

.article-hero h1 {
  font-size: clamp(1.7rem, 4vw, 2.8rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
  max-width: 800px;
}

.article-hero .lead {
  font-size: clamp(1rem, 2vw, 1.1rem);
  color: var(--text-muted);
  max-width: 680px;
  line-height: 1.7;
}

/* ── ARTICLE LAYOUT ── */
.article-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 48px;
  align-items: start;
  padding: 48px 0 80px;
}

/* ── ARTICLE BODY ── */
.article-body {
  min-width: 0;
}

.article-body h2 {
  font-size: clamp(1.3rem, 2.5vw, 1.6rem);
  font-weight: 800;
  margin: 40px 0 16px;
  color: var(--text);
  position: relative;
  padding-left: 16px;
}

.article-body h2::before {
  content: '';
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 3px;
  background: var(--accent);
  border-radius: 2px;
}

.article-body h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 28px 0 12px;
  color: var(--text);
}

.article-body p {
  font-size: 0.975rem;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 16px;
}

.article-body ul,
.article-body ol {
  margin: 0 0 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.article-body li {
  font-size: 0.975rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.article-body ul li::marker { color: var(--accent); }
.article-body ol li::marker { color: var(--accent); font-weight: 700; }

.article-body strong { color: var(--text); font-weight: 700; }

.article-body a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s;
}
.article-body a:hover { color: var(--accent2); }

/* Highlight box */
.article-body .highlight-box {
  background: rgba(0,255,135,0.06);
  border: 1px solid rgba(0,255,135,0.2);
  border-left: 3px solid var(--accent);
  border-radius: 10px;
  padding: 20px 24px;
  margin: 24px 0;
}

.article-body .highlight-box p {
  margin: 0;
  color: var(--text);
}

/* Comparison table */
.compare-table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 0.9rem;
  overflow: hidden;
  border-radius: 12px;
  overflow: hidden;
}

.compare-table th {
  background: var(--bg-card2);
  color: var(--text);
  font-weight: 700;
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.compare-table th:first-child { border-radius: 0; }

.compare-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  background: var(--bg-card);
}

.compare-table tr:last-child td { border-bottom: none; }
.compare-table tr:hover td { background: var(--bg-card2); }

.compare-table .accent-cell { color: var(--accent); font-weight: 600; }

/* CTA inline */
.article-cta {
  background: linear-gradient(135deg, rgba(0,255,135,0.08) 0%, rgba(0,212,170,0.04) 100%);
  border: 1px solid rgba(0,255,135,0.2);
  border-radius: 14px;
  padding: 28px 32px;
  margin: 40px 0;
  text-align: center;
}

.article-cta h3 { font-size: 1.2rem; font-weight: 800; margin-bottom: 10px; }
.article-cta p { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 20px; }

.article-cta .btn-primary,
.article-cta a.btn-primary {
  color: #0D1117 !important;
  display: inline-flex !important;
}

/* Source */
.article-source {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-muted);
}
.article-source a { color: var(--accent2); }
.article-source a:hover { color: var(--accent); }

/* ── SIDEBAR ── */
.article-sidebar {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.sidebar-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
}

.sidebar-card h4 {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.sidebar-toc {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sidebar-toc a {
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: color 0.2s;
  display: block;
  line-height: 1.4;
}
.sidebar-toc a:hover { color: var(--accent); }
.sidebar-toc a.active { color: var(--accent); }

.sidebar-order-btn {
  display: block;
  width: 100%;
  text-align: center;
  background: var(--accent);
  color: #0D1117;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 12px;
  border-radius: 9px;
  transition: background 0.2s, transform 0.15s;
  margin-top: 4px;
}
.sidebar-order-btn:hover { background: var(--accent2); transform: translateY(-1px); }

.sidebar-price {
  text-align: center;
}

.sidebar-price .price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}
.sidebar-price .price-row:last-of-type { border-bottom: none; }
.sidebar-price .price-row span:first-child { color: var(--text-muted); }
.sidebar-price .price-row span:last-child { color: var(--accent); font-weight: 700; }

/* ── RELATED POSTS ── */
.related-posts { padding: 60px 0 80px; border-top: 1px solid var(--border); }
.related-posts h2 { font-size: 1.4rem; font-weight: 800; margin-bottom: 28px; }
.related-posts h2 span { color: var(--accent); }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .article-layout {
    grid-template-columns: 1fr;
  }
  .article-sidebar {
    position: static;
    order: -1;
  }
  .sidebar-toc { display: none; }
}

@media (max-width: 600px) {
  .article-hero { padding: 24px 0 40px; }
  .article-body h2 { font-size: 1.25rem; }
  .compare-table { font-size: 0.8rem; }
  .compare-table th, .compare-table td { padding: 10px 12px; }
  .article-cta { padding: 20px; }
}
