/* AI 新闻栏目（/news 列表 + 详情）。
   布局参考用户指定样式：左侧两列卡片流 + 右侧固定宽推荐栏。
   配色一律走 main.css 的深色变量，不引入白底卡片（会跟全站割裂）。 */

.news-wrap { max-width: 1200px; margin: 0 auto; padding: 28px 20px 60px; }

.news-head { margin-bottom: 20px; }
.news-head h1 { font-size: 24px; font-weight: 700; letter-spacing: .3px; }
.news-head .news-sub { color: var(--text-3); font-size: 13px; margin-top: 6px; }
.news-crumb { font-size: 12px; color: var(--text-3); margin-bottom: 12px; }
.news-crumb a { color: var(--text-2); text-decoration: none; }
.news-crumb a:hover { color: var(--blue); }

.news-layout { display: flex; gap: 20px; align-items: flex-start; }
.news-main { flex: 1; min-width: 0; }
.news-side { width: 284px; flex-shrink: 0; }

/* ── 左侧卡片流 ── */
.news-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.news-card {
  display: flex; gap: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  min-height: 132px;
  text-decoration: none;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}
.news-card:hover {
  border-color: var(--border-hi);
  background: var(--bg-hover);
  transform: translateY(-1px);
}
.news-card-img {
  width: 104px; height: 104px; flex-shrink: 0;
  border-radius: 8px; overflow: hidden; background: var(--bg-2);
}
.news-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.news-card-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.news-card-title {
  font-size: 15px; font-weight: 600; color: var(--text-1); line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}
.news-card:hover .news-card-title { color: var(--blue); }
.news-card-desc {
  margin-top: 7px; font-size: 13px; color: var(--text-2); line-height: 1.6;
  display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}
.news-card-meta { margin-top: auto; padding-top: 10px; font-size: 12px; color: var(--text-3); }

.news-empty {
  border: 1px dashed var(--border); border-radius: 10px;
  padding: 60px 20px; text-align: center; color: var(--text-3); font-size: 14px;
}

/* ── 分页 ── */
.news-pager { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 26px; }
.news-pager a, .news-pager span {
  min-width: 34px; height: 34px; padding: 0 11px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); border-radius: 7px;
  font-size: 13px; color: var(--text-2); text-decoration: none;
}
.news-pager a:hover { border-color: var(--blue); color: var(--blue); }
.news-pager .cur { background: var(--blue-dim); border-color: var(--blue); color: var(--blue); }
.news-pager .gap { border: none; color: var(--text-3); }

/* ── 右侧推荐 ── */
.news-side-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 10px; padding: 18px;
}
.news-side-title {
  font-size: 15px; font-weight: 700; color: var(--text-1);
  padding-bottom: 12px; margin-bottom: 4px; border-bottom: 1px solid var(--border);
}
.news-side-item {
  display: block; padding: 12px 0; border-bottom: 1px solid var(--border);
  text-decoration: none;
}
.news-side-item:last-child { border-bottom: none; padding-bottom: 0; }
.news-side-item .t {
  font-size: 13.5px; color: var(--text-1); line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}
.news-side-item:hover .t { color: var(--blue); }
.news-side-item .d { margin-top: 5px; font-size: 12px; color: var(--text-3); }

/* ── 详情页正文 ── */
.news-article {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 10px; padding: 28px 30px;
}
.news-article h1 { font-size: 25px; line-height: 1.45; font-weight: 700; }
.news-article-meta {
  margin: 12px 0 22px; padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
  font-size: 12.5px; color: var(--text-3);
}
.news-body { font-size: 15px; line-height: 1.85; color: #d7deec; word-wrap: break-word; }
.news-body p { margin: 0 0 16px; }
.news-body h1, .news-body h2, .news-body h3, .news-body h4 {
  color: var(--text-1); line-height: 1.5; margin: 28px 0 12px; font-weight: 700;
}
.news-body h1 { font-size: 21px; } .news-body h2 { font-size: 19px; }
.news-body h3 { font-size: 17px; } .news-body h4 { font-size: 15.5px; }
.news-body a { color: var(--blue); text-decoration: none; }
.news-body a:hover { text-decoration: underline; }
.news-body img { max-width: 100%; height: auto; border-radius: 8px; margin: 8px 0; }
.news-body ul, .news-body ol { margin: 0 0 16px; padding-left: 22px; }
.news-body li { margin-bottom: 7px; }
.news-body blockquote {
  margin: 0 0 16px; padding: 12px 16px;
  background: var(--bg-2); border-left: 3px solid var(--blue);
  border-radius: 0 6px 6px 0; color: var(--text-2);
}
.news-body pre {
  background: var(--bg-2); border: 1px solid var(--border); border-radius: 8px;
  padding: 14px; overflow-x: auto; font-family: var(--mono); font-size: 13px; margin: 0 0 16px;
}
.news-body code { font-family: var(--mono); font-size: .92em; }
.news-body table { width: 100%; border-collapse: collapse; margin: 0 0 16px; font-size: 14px; }
.news-body th, .news-body td { border: 1px solid var(--border); padding: 9px 12px; text-align: left; }
.news-body th { background: var(--bg-2); color: var(--text-1); font-weight: 600; }
.news-body hr { border: none; border-top: 1px solid var(--border); margin: 24px 0; }

.news-back { margin-top: 22px; }
.news-back a { color: var(--text-2); font-size: 13px; text-decoration: none; }
.news-back a:hover { color: var(--blue); }

/* ── 响应式 ── */
@media (max-width: 1000px) {
  .news-layout { flex-direction: column; }
  .news-side { width: 100%; }
}
@media (max-width: 680px) {
  .news-grid { grid-template-columns: 1fr; }
  .news-card-img { width: 84px; height: 84px; }
  .news-article { padding: 20px 16px; }
  .news-article h1 { font-size: 21px; }
}
