/* ════════════════════════════════════════════════
   ARTICLE PAGES CSS (css/article.css)
   Modern, elegant typography and layout for guides
════════════════════════════════════════════════ */

.article-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2.5rem;
  max-width: 1200px;
  margin: 3rem auto 5rem;
  padding: 0 5%;
  align-items: start;
}

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

/* ── Hero Section ── */
.article-hero {
  margin-bottom: 2.5rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 2rem;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  font-size: 0.85rem;
  color: var(--muted);
  flex-wrap: wrap;
}

.badge-tips {
  background: rgba(0, 229, 170, 0.1);
  color: var(--teal);
  padding: 0.3rem 0.75rem;
  border-radius: 100px;
  font-weight: 700;
  border: 1px solid rgba(0, 229, 170, 0.2);
}

.article-title {
  font-size: 2.5rem;
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
  color: var(--text);
}

.article-subtitle {
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--muted);
  font-weight: 400;
}

/* ── Article Content Typography ── */
.article-content {
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--text-light);
}

.article-content h2 {
  font-size: 1.6rem;
  font-weight: 800;
  margin: 2.5rem 0 1rem;
  color: var(--text);
  scroll-margin-top: 100px; /* For TOC anchoring */
}

.article-content h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin: 2rem 0 0.8rem;
  color: var(--text);
}

.article-content p {
  margin-bottom: 1.5rem;
}

.article-content ul, 
.article-content ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

.article-content li {
  margin-bottom: 0.5rem;
}

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

.article-content em {
  color: var(--teal);
  font-style: italic;
}

/* ── Tables ── */
.article-table-wrap {
  overflow-x: auto;
  margin: 2rem 0;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--card);
}

.article-content table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.article-content th {
  background: rgba(255, 255, 255, 0.03);
  padding: 1rem;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.article-content td {
  padding: 1rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}

.article-content tr:last-child td {
  border-bottom: none;
}

/* ── Call to Action boxes ── */
.tool-cta {
  background: linear-gradient(145deg, rgba(79, 158, 255, 0.05), rgba(79, 158, 255, 0.02));
  border: 1px solid rgba(79, 158, 255, 0.2);
  border-radius: 16px;
  padding: 2rem;
  margin: 2.5rem 0;
  text-align: center;
}

.tool-cta h3 {
  margin-top: 0;
  color: var(--blue) !important;
  font-size: 1.4rem;
}

.tool-cta p {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

/* ── Sidebar (Table of Contents) ── */
.sidebar-box {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem;
  position: sticky;
  top: 90px;
}

.sidebar-title {
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.toc-list li {
  margin-bottom: 0;
  padding: 0;
}

.toc-list a {
  display: block;
  padding: 0.5rem 0;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.2s;
  border-left: 2px solid transparent;
  padding-left: 0.75rem;
}

.toc-list a:hover {
  color: var(--teal);
  border-left-color: var(--teal);
  background: rgba(0, 229, 170, 0.05);
}

/* ── Ads layout ── */
.ad-space {
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed var(--border);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--dim);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.ad-sidebar {
  height: 250px;
  margin-top: 1.5rem;
  position: sticky;
  top: calc(90px + 300px); /* Below TOC */
}

.ad-bottom {
  height: 100px;
  margin-top: 3rem;
}

@media (max-width: 600px) {
  .article-title {
    font-size: 2rem;
  }
}
