/* ============================================
   appledeveloper.shop — Article styles
   ============================================ */

/* ── BREADCRUMBS ── */
.breadcrumbs {
  padding: 100px 0 0;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
}
.breadcrumbs-inner {
  padding: 20px 0 0;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 0.82rem;
  color: var(--gray2);
}
.breadcrumbs-inner a {
  color: var(--gray2);
  transition: color 0.2s;
}
.breadcrumbs-inner a:hover { color: var(--accent); }
.breadcrumbs-inner span { color: var(--border); }
.breadcrumbs-inner .current { color: var(--gray); }

/* ── ARTICLE HERO ── */
.article-hero {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  padding: 32px 0 48px;
}
.article-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.article-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(255,59,46,0.1);
  padding: 4px 12px;
  border-radius: 100px;
}
.article-date {
  font-size: 0.82rem;
  color: var(--gray2);
}
.article-read-time {
  font-size: 0.82rem;
  color: var(--gray2);
}
.article-dot { color: var(--border); }

.article-hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}
.article-hero h1 span { color: var(--accent); }

.article-lead {
  font-size: 1.1rem;
  color: var(--gray);
  max-width: 680px;
  line-height: 1.7;
}

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

.article-content {
  min-width: 0;
}

.article-content h2 {
  font-size: 1.5rem;
  font-weight: 800;
  margin: 40px 0 16px;
  letter-spacing: -0.01em;
  line-height: 1.3;
}
.article-content h2:first-child { margin-top: 0; }
.article-content h2 span { color: var(--accent); }

.article-content h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 28px 0 12px;
  color: var(--white);
}

.article-content p {
  font-size: 0.97rem;
  color: var(--gray);
  line-height: 1.8;
  margin-bottom: 18px;
}

.article-content ul,
.article-content ol {
  margin: 0 0 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.article-content ul li,
.article-content ol li {
  font-size: 0.95rem;
  color: var(--gray);
  line-height: 1.7;
  padding-left: 6px;
}
.article-content ul { list-style: none; margin-left: 0; }
.article-content ul li::before {
  content: '→ ';
  color: var(--accent);
  font-weight: 700;
}

.article-content strong { color: var(--white); font-weight: 700; }
.article-content a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.article-content a:hover { color: var(--accent2); }
.article-content a.btn-primary,
.article-content a.btn-primary:hover { color: var(--white) !important; text-decoration: none; }

/* Highlight box */
.article-box {
  background: rgba(255,59,46,0.06);
  border: 1px solid rgba(255,59,46,0.25);
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 20px 24px;
  margin: 28px 0;
}
.article-box p { margin: 0; color: var(--gray); font-size: 0.95rem; }
.article-box strong { color: var(--white); }

/* Comparison table */
.compare-table {
  width: 100%;
  border-collapse: collapse;
  margin: 28px 0;
  font-size: 0.9rem;
}
.compare-table th {
  background: var(--bg3);
  border: 1px solid var(--border);
  padding: 12px 16px;
  text-align: left;
  font-weight: 700;
  color: var(--white);
}
.compare-table th:first-child { width: 40%; }
.compare-table td {
  border: 1px solid var(--border);
  padding: 12px 16px;
  color: var(--gray);
  vertical-align: top;
}
.compare-table tr:hover td { background: rgba(255,255,255,0.02); }
.compare-table .yes { color: #4ade80; font-weight: 600; }
.compare-table .no { color: var(--accent); font-weight: 600; }

/* Article divider */
.article-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 40px 0;
}

/* Source block */
.article-source {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 40px 0 0;
  font-size: 0.85rem;
  color: var(--gray2);
}
.article-source a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}
.article-source a:hover { color: var(--accent2); }

/* Back link */
.article-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--gray);
  font-size: 0.88rem;
  font-weight: 500;
  margin-bottom: 40px;
  transition: color 0.2s;
}
.article-back:hover { color: var(--accent); }
.article-back::before { content: '←'; }

/* ── SIDEBAR ── */
.article-sidebar {
  position: sticky;
  top: 90px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.sidebar-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.sidebar-card h4 {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray2);
  margin-bottom: 16px;
}

/* TOC */
.toc-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toc-list a {
  font-size: 0.875rem;
  color: var(--gray);
  transition: color 0.2s, padding-left 0.2s;
  display: block;
  padding: 4px 0 4px 12px;
  border-left: 2px solid var(--border);
}
.toc-list a:hover {
  color: var(--accent);
  border-left-color: var(--accent);
  padding-left: 16px;
}

/* Sidebar CTA */
.sidebar-cta {
  background: linear-gradient(135deg, #1A0A09, #1A1A1A);
  border: 1px solid rgba(255,59,46,0.3);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  text-align: center;
}
.sidebar-cta p {
  font-size: 0.9rem;
  color: var(--gray);
  margin-bottom: 16px;
  line-height: 1.6;
}
.sidebar-cta .btn-primary {
  display: block;
  text-align: center;
  width: 100%;
  justify-content: center;
}

/* ── RELATED POSTS ── */
.related-posts {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding: 60px 0;
}
.related-posts h2 {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 32px;
}
.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-card.toc-card { display: none; }
}

@media (max-width: 600px) {
  .article-hero h1 { font-size: 1.6rem; }
  .compare-table { font-size: 0.8rem; }
  .compare-table th, .compare-table td { padding: 8px 10px; }
}
