/* ============================================
   文章详情页
   ============================================ */

/* ---------- 文章横幅 ---------- */
.article-hero {
  margin-top: var(--header-height-mobile);
  padding: 40px 0 32px;
  background: linear-gradient(135deg, #003a94 0%, #004aba 60%, #0062e0 100%);
  color: #fff;
}
@media (min-width: 768px) {
  .article-hero { padding: 56px 0 40px; }
}
@media (min-width: 1024px) {
  .article-hero {
    margin-top: var(--header-height-pc);
    padding: 64px 0 48px;
  }
}

.article-breadcrumb {
  margin-bottom: 20px;
}
.article-breadcrumb a { color: rgba(255,255,255,.85); }
.article-breadcrumb a:hover { color: #fff; }
.article-breadcrumb span { color: rgba(255,255,255,.5); }

.article-title {
  font-size: 22px;
  font-weight: 800;
  line-height: 1.4;
  letter-spacing: -.3px;
  margin-bottom: 16px;
  max-width: 820px;
}
@media (min-width: 768px) { .article-title { font-size: 30px; } }
@media (min-width: 1024px) { .article-title { font-size: 34px; } }

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 14px;
  color: rgba(255,255,255,.7);
}
.article-meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ---------- 两栏布局 ---------- */
.article-page { padding: 40px 0 64px; }
@media (min-width: 1024px) { .article-page { padding: 48px 0 80px; } }

.article-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}
@media (min-width: 1024px) {
  .article-layout {
    grid-template-columns: 1fr 340px;
    gap: 40px;
    align-items: start;
  }
}

/* ---------- 正文区域 ---------- */
.article-main {
  min-width: 0;
}

/* 摘要 */
.article-summary {
  padding: 20px 24px;
  background: var(--brand-light);
  border-left: 4px solid var(--brand-primary);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin-bottom: 32px;
}
.article-summary p {
  font-size: 15px;
  color: var(--text-sub);
  line-height: 1.75;
  margin: 0;
}

/* 正文内容 */
.article-body {
  font-size: 16px;
  color: var(--text-main);
  line-height: 1.9;
}
.article-body h2 {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-main);
  margin: 36px 0 16px;
  padding-left: 14px;
  border-left: 4px solid var(--brand-primary);
  line-height: 1.4;
}
.article-body h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
  margin: 28px 0 12px;
  line-height: 1.4;
}
.article-body p {
  margin-bottom: 20px;
}
.article-body img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  margin: 24px 0;
  display: block;
}
.article-body ul,
.article-body ol {
  margin: 16px 0 20px 24px;
}
.article-body ul { list-style: disc; }
.article-body ol { list-style: decimal; }
.article-body li {
  margin-bottom: 10px;
  line-height: 1.8;
}
.article-body blockquote {
  margin: 24px 0;
  padding: 16px 20px;
  background: var(--bg-gray);
  border-left: 4px solid var(--brand-primary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text-sub);
  font-size: 15px;
}
.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 15px;
}
.article-body th,
.article-body td {
  padding: 10px 14px;
  border: 1px solid var(--border-color);
  text-align: left;
}
.article-body th {
  background: var(--bg-gray);
  font-weight: 600;
}
.article-body a {
  color: var(--brand-primary);
  text-decoration: underline;
}
.article-body strong {
  font-weight: 700;
  color: var(--text-main);
}

/* 标签 */
.article-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border-color);
}
.article-tags-label {
  font-size: 14px;
  color: var(--text-light);
}
.article-tag {
  display: inline-block;
  padding: 4px 14px;
  font-size: 13px;
  color: var(--brand-primary);
  background: var(--brand-light);
  border-radius: 100px;
  transition: all var(--transition);
}
.article-tag:hover {
  color: #fff;
  background: var(--brand-primary);
}

/* 上一篇 / 下一篇 */
.article-nav {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 32px;
}
@media (min-width: 640px) {
  .article-nav { grid-template-columns: 1fr 1fr; }
}
.article-nav-item {
  display: block;
  padding: 16px 20px;
  background: var(--bg-gray);
  border-radius: var(--radius-md);
  transition: all var(--transition);
}
.article-nav-item:hover {
  background: var(--brand-light);
}
.article-nav-label {
  display: block;
  font-size: 12px;
  color: var(--text-light);
  margin-bottom: 6px;
}
.article-nav-title {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.article-nav-next { text-align: right; }

/* 相关阅读 */
.article-related {
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--border-color);
}
.article-related-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 16px;
  padding-left: 12px;
  border-left: 4px solid var(--brand-primary);
}
.article-related-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.article-related-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
}
.article-related-list li:last-child { border-bottom: none; }
.article-related-list li a {
  flex: 1;
  font-size: 14px;
  color: var(--text-main);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color var(--transition);
}
.article-related-list li a:hover { color: var(--brand-primary); }
.article-related-date {
  flex-shrink: 0;
  font-size: 12px;
  color: var(--text-light);
}

/* ---------- 右侧栏 ---------- */
.article-side {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
@media (min-width: 1024px) {
  .article-side {
    position: sticky;
    top: calc(var(--header-height-pc) + 24px);
  }
}

/* 侧栏表单 */
.article-side .side-form {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  box-shadow: var(--shadow-sm);
}
.article-side .side-form-header {
  padding-bottom: 16px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--border-color);
  text-align: center;
}
.article-side .side-form-header h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
}
.article-side .side-form-header p {
  font-size: 13px;
  color: var(--text-sub);
}

/* 热门文章 */
.side-hot {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
}
.side-hot-header {
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}
.side-hot-header h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
}
.side-hot-list {
  display: flex;
  flex-direction: column;
}
.side-hot-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-color);
}
.side-hot-list li:last-child { border-bottom: none; }
.side-hot-num {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  background: var(--text-light);
  border-radius: 4px;
  margin-top: 2px;
}
.side-hot-list li:nth-child(1) .side-hot-num { background: #E53935; }
.side-hot-list li:nth-child(2) .side-hot-num { background: #FB8C00; }
.side-hot-list li:nth-child(3) .side-hot-num { background: #FDD835; color: #333; }
.side-hot-list li a {
  flex: 1;
  font-size: 14px;
  color: var(--text-main);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color var(--transition);
}
.side-hot-list li a:hover { color: var(--brand-primary); }

/* 推荐课程 */
.side-course {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
}
.side-course-header {
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}
.side-course-header h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
}
.side-course-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.side-course-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bg-gray);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}
.side-course-item:hover {
  background: var(--brand-light);
}
.side-course-icon {
  font-size: 18px;
  flex-shrink: 0;
}
.side-course-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-main);
}