/* ================================================
   CareerRoost — article.css
   文章页专属样式（依赖 common.css 的设计token）
   ================================================ */

/* ── 页面整体背景（跟首页白底区分，文章页用极浅的灰白底衬托内容卡片感）── */
body.article-page {
  background: #fafbfb;
}

/* ── 面包屑 ── */
.breadcrumb-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-block: 20px 8px;
  font-size: 13.5px;
  flex-wrap: wrap;
}
.breadcrumb-nav a {
  color: var(--primary-dark);
  text-decoration: none;
  font-weight: 600;
}
.breadcrumb-nav a:hover { text-decoration: underline; }
.breadcrumb-home {
  display: flex;
  align-items: center;
  color: var(--muted);
}
.breadcrumb-home svg { width: 16px; height: 16px; }
.breadcrumb-sep { color: var(--border); font-size: 13px; }
.breadcrumb-current {
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 320px;
  display: inline-block;
  vertical-align: bottom;
}
@media (max-width: 600px) {
  .breadcrumb-current { max-width: 160px; }
}

/* ── 文章头部 ── */
.article-header { padding-block: 4px 28px; }
.article-cat-link {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--primary-dark);
  background: var(--primary-light);
  padding: 4px 11px;
  border-radius: var(--radius-pill);
  text-decoration: none;
  line-height: 1.4;
}
.article-h1 {
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.2;
  margin-bottom: 16px;
  color: var(--text);
}
.article-meta-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  color: var(--muted);
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.article-meta-row .dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--border);
  flex-shrink: 0;
}

.share-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-block: 16px;
  border-block: 1px solid var(--border);
}
.share-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  margin-inline-end: 4px;
}
.share-btn {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: #fff;
  display: flex; align-items: center; justify-content: center;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
}
.share-btn:hover { border-color: var(--primary); color: var(--primary-dark); background: var(--primary-light); }
.share-btn svg { width: 16px; height: 16px; }

/* ── 两栏布局 ── */
.article-layout {
  display: flex;
  align-items: flex-start;
  gap: 56px;
  padding-block: 8px 64px;
}
.article-main { flex: 1 1 auto; min-width: 0; }
.article-sidebar {
  flex: 0 0 300px;
  position: sticky;
  top: 88px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
@media (max-width: 960px) {
  .article-layout { flex-direction: column; }
  .article-sidebar { position: static; width: 100%; flex: none; }
  /* 移动端不展示侧边栏广告块，改用Google Anchor Ads（屏幕底部悬浮广告条）替代，
     Anchor Ads由Auto Ads全局脚本控制展示，不需要在这里额外写HTML */
  .ad-slot-sticky { display: none; }
  /* 目录（TOC）在桌面端是position:sticky跟随滚动固定在右侧，边读正文边能点跳转；
     移动端整个侧边栏被切成纵向堆叠、推到正文下方后，目录要读完整篇文章才会出现，
     "跳转导航"这个用途完全失去意义，所以移动端直接不显示这个模块。
     "Latest Articles"最新文章推荐不受影响，继续保留在底部 */
  .toc-sidebar-block { display: none; }
}

/* ── 正文内容组件 ── */
.article-content { font-size: 16.5px; line-height: 1.75; color: var(--text); }
.article-content h2 { font-size: 24px; margin: 40px 0 16px; font-family: 'Sora', sans-serif; font-weight: 700; scroll-margin-top: 88px; }
.article-content h3 { font-size: 19px; margin: 28px 0 12px; font-family: 'Sora', sans-serif; font-weight: 700; }
.article-content p { margin-bottom: 18px; }
.article-content ul, .article-content ol { margin: 0 0 18px; padding-inline-start: 22px; }
.article-content li { margin-bottom: 8px; }
.article-content a { color: var(--primary-dark); text-decoration: underline; text-decoration-color: var(--primary-light); text-underline-offset: 2px; }
.article-content strong { color: var(--text); }
.article-content blockquote {
  border-inline-start: 3px solid var(--primary);
  background: var(--primary-light);
  padding: 14px 18px;
  border-radius: 0 10px 10px 0;
  margin: 20px 0;
  font-style: italic;
  color: var(--text);
}

/* Key Takeaways 要点摘要框 */
.key-takeaways {
  background: var(--primary-light);
  border: 1px solid #b8ecdf;
  border-radius: 14px;
  padding: 20px 24px;
  margin: 0 0 32px;
}
.key-takeaways h3 {
  font-size: 15px;
  margin: 0 0 10px;
  color: var(--primary-dark);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 700;
}
.key-takeaways ul { margin: 0; padding-inline-start: 20px; }
.key-takeaways li { margin-bottom: 6px; font-size: 15px; }

/* Citation Capsule 引用胶囊 */
.citation-capsule {
  border: 1.5px solid var(--primary);
  border-radius: 12px;
  padding: 14px 18px;
  margin: 24px 0;
  font-size: 15px;
  background: #fff;
}
.citation-capsule strong { color: var(--primary-dark); }

/* Info Gain 经验洞察框 */
.info-gain {
  background: #fff9ec;
  border: 1px solid #f5dfa8;
  border-radius: 12px;
  padding: 16px 20px;
  margin: 24px 0;
  font-size: 15px;
}
.info-gain::before {
  content: "💡 Insight";
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #a8791a;
  margin-bottom: 8px;
}

/* 对比表格 */
.comparison-table-wrapper {
  overflow-x: auto;
  margin: 24px 0;
  border: 1px solid #d5e6e0;
  border-radius: 12px;
}
.comparison-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.comparison-table th {
  background: var(--primary);
  color: #fff;
  text-align: start;
  padding: 12px 16px;
  font-weight: 700;
}
.comparison-table td { padding: 12px 16px; border-bottom: 1px solid #d5e6e0; }
.comparison-table tr:last-child td { border-bottom: none; }
.comparison-table tr:nth-child(odd) td { background: #ffffff; }
.comparison-table tr:nth-child(even) td { background: #e6f5f0; }

/* 图片 */
.article-content figure { margin: 24px 0; }
.article-content figure img { width: 100%; border-radius: 12px; }
.article-content figcaption { font-size: 13px; color: var(--muted); text-align: center; margin-top: 8px; }
.img-placeholder-preview {
  margin: 24px 0;
  padding: 40px 20px;
  text-align: center;
  border: 1.5px dashed #f0a04b;
  background: #fff8f0;
  color: #a8621a;
  border-radius: 12px;
  font-size: 13.5px;
}

/* 广告位（文中）*/
.ad-slot-inline {
  margin: 32px 0;
  padding: 28px;
  border: 1.5px dashed var(--border);
  border-radius: 12px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  background: #f7f8f8;
}

/* 图表占位（后端动态生成SVG，这里先放视觉占位） */
.chart-placeholder {
  margin: 28px 0;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
}
.chart-placeholder .chart-title { font-size: 14px; font-weight: 700; margin-bottom: 14px; }
.chart-placeholder .chart-source { font-size: 12px; color: var(--muted); margin-top: 10px; }

/* FAQ 手风琴 */
.faq-section { margin-top: 44px; }
.faq-section > h2 { margin-bottom: 18px; }
.faq-item {
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 10px;
  overflow: hidden;
}
.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  cursor: pointer;
  font-weight: 700;
  font-size: 15px;
  background: #fff;
  user-select: none;
}
.faq-question .faq-icon { transition: transform 0.2s; flex-shrink: 0; color: var(--primary-dark); }
.faq-item.open .faq-icon { transform: rotate(45deg); }
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
  font-size: 14.5px;
  color: var(--muted);
  background: #fafcfc;
}
.faq-item.open .faq-answer { max-height: 400px; }
.faq-answer-inner { padding: 0 18px 16px; }

/* 标签列表 */
.article-tags-section { margin-top: 40px; }
.tags-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
  display: block;
}
.tag-pills { display: flex; flex-wrap: wrap; gap: 10px; }
.tag-pill {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary-dark);
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s;
}
.tag-pill:hover { background: #c9f2e6; }

/* 相关文章推荐 */
.related-section { margin-top: 52px; }
.related-heading { text-align: center; margin-bottom: 6px; font-size: 26px; }
.related-sub { text-align: center; color: var(--muted); font-size: 14.5px; margin-bottom: 28px; }
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 760px) {
  .related-grid { grid-template-columns: 1fr; }
}
.related-card {
  background: #fff;
  border: 1px solid var(--border);
  border-top: 3px solid var(--primary);
  border-radius: 10px;
  padding: 20px;
  text-decoration: none;
  display: block;
  transition: transform 0.15s, box-shadow 0.15s;
}
.related-card:hover { transform: translateY(-2px); box-shadow: 0 12px 24px rgba(0,0,0,0.06); }
.related-cat {
  display: block;
  text-align: end;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}
.related-title {
  font-size: 15.5px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: calc(1.4em * 3);
}

/* ── 侧边栏 ── */
.sidebar-block {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 20px;
}
.sidebar-title {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}
.toc-list { list-style: none; }
.toc-list li { margin-bottom: 9px; }
.toc-list a { font-size: 13.5px; color: var(--text); text-decoration: none; line-height: 1.4; display: block; padding-inline-start: 10px; border-inline-start: 2px solid transparent; transition: color 0.15s, border-color 0.15s; }
.toc-list a:hover { color: var(--primary-dark); }
.toc-list a.active { color: var(--primary-dark); font-weight: 700; border-inline-start-color: var(--primary); }

/* 侧边栏粘性广告位 */
.ad-slot-sticky {
  min-height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px dashed var(--border);
  border-radius: 14px;
  color: var(--muted);
  font-size: 13px;
  background: #f7f8f8;
}

.sidebar-latest-list { list-style: none; }
.sidebar-latest-list li { padding-block: 10px; border-bottom: 1px solid var(--border); }
.sidebar-latest-list li:last-child { border-bottom: none; padding-bottom: 0; }
.sidebar-latest-list a {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  display: block;
  margin-bottom: 4px;
  line-height: 1.35;
}
.sidebar-latest-list a:hover { color: var(--primary-dark); }
.sidebar-latest-date { font-size: 12px; color: var(--muted); }
