@charset "utf-8";
/* ==========================================================================
   base.css —— 全站基础层（PC / 移动端共用）
   1. 设计变量  2. 基础重置  3. 通用原子类  4. 通用组件
   ========================================================================== */

/* ---------- 1. 设计变量 ---------- */
:root {
  /* 品牌色：改这里即可全站换色 */
  --c-primary: #2563eb;
  --c-primary-dark: #1d4ed8;
  --c-primary-light: #eef4ff;
  --c-accent: #f97316;

  /* 文字 */
  --c-title: #1a2231;
  --c-text: #3d4757;
  --c-text-2: #6b7688;
  --c-text-3: #9aa3b2;

  /* 背景与线条 */
  --c-bg: #f6f7f9;
  --c-white: #ffffff;
  --c-border: #ebedf1;
  --c-border-2: #e0e3e9;

  /* 圆角 / 阴影 / 尺寸 */
  --radius-sm: 4px;
  --radius: 6px;
  --radius-lg: 10px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.04);
  --shadow: 0 4px 16px rgba(16, 24, 40, 0.07);
  --maxw: 1200px;

  /* 字体 */
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

/* ---------- 2. 基础重置 ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
  color: var(--c-text);
  background: var(--c-bg);
}

h1, h2, h3, h4, h5, h6 { font-weight: 600; line-height: 1.4; color: var(--c-title); }

a { color: inherit; text-decoration: none; transition: color 0.18s; }
a:hover { color: var(--c-primary); }

img { display: block; max-width: 100%; border: 0; vertical-align: middle; }
ul, ol { list-style: none; }
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; outline: 0; }
button { cursor: pointer; border: 0; background: none; }
em { font-style: normal; }

/* 文本截断（单行 / 多行） */
.ellipsis { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ellipsis-2 {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; word-break: break-all;
}
.ellipsis-3 {
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  overflow: hidden; word-break: break-all;
}

/* ---------- 3. 通用原子类 ---------- */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }
.fl { float: left; } .fr { float: right; }
.clearfix::after { content: ""; display: block; clear: both; }
.mt8 { margin-top: 8px; } .mt10 { margin-top: 10px; } .mt16 { margin-top: 16px; } .mt24 { margin-top: 24px; }
.text-center { text-align: center; }
.c-primary { color: var(--c-primary); }
.c-muted { color: var(--c-text-3); }
.hide { display: none !important; }

/* ---------- 4. 通用组件 ---------- */
/* 4.1 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 34px; padding: 0 16px; border-radius: var(--radius);
  background: var(--c-primary); color: #fff; font-size: 14px;
  transition: background 0.18s;
}
.btn:hover { background: var(--c-primary-dark); color: #fff; }
.btn--ghost { background: #fff; color: var(--c-text); border: 1px solid var(--c-border-2); }
.btn--ghost:hover { border-color: var(--c-primary); color: var(--c-primary); background: #fff; }

/* 4.2 标签 */
.tag {
  display: inline-block; height: 20px; line-height: 20px; padding: 0 7px;
  font-size: 12px; border-radius: var(--radius-sm);
  background: var(--c-primary-light); color: var(--c-primary);
}
.tag--gray { background: #f2f4f7; color: var(--c-text-2); }

/* 4.3 面包屑 */
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; color: var(--c-text-2); }
.breadcrumb li::after { content: "/"; margin-left: 6px; color: var(--c-border-2); }
.breadcrumb li:last-child::after { content: ""; }
.breadcrumb a:hover { color: var(--c-primary); }

/* 4.4 板块标题 */
.block-hd {
  display: flex; align-items: center; gap: 16px;
  padding-bottom: 12px; border-bottom: 1px solid var(--c-border);
}
.block-hd__title { position: relative; padding-left: 12px; font-size: 18px; }
.block-hd__title::before {
  content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 3px; height: 16px; border-radius: 2px; background: var(--c-primary);
}
.block-hd__title small { font-size: 12px; font-weight: 400; color: var(--c-text-3); margin-left: 6px; }
.block-hd__more { margin-left: auto; font-size: 13px; color: var(--c-text-3); }
.block-hd__more:hover { color: var(--c-primary); }

/* 4.5 资讯列表项（图文混排）——首页/列表页共用 */
.newslist > li { padding: 20px 0; border-bottom: 1px dashed var(--c-border); }
.newslist > li:last-child { border-bottom: 0; padding-bottom: 4px; }
.news-item { display: flex; gap: 16px; }
.news-item__thumb {
  flex: 0 0 200px; width: 200px; height: 128px;
  border-radius: var(--radius); overflow: hidden; background: #f0f2f5;
}
.news-item__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.news-item:hover .news-item__thumb img { transform: scale(1.04); }
.news-item__body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.news-item__title { font-size: 17px; font-weight: 600; line-height: 1.5; color: var(--c-title); margin-bottom: 8px; }
.news-item__title a:hover { color: var(--c-primary); }
.news-item__desc { font-size: 14px; color: var(--c-text-2); line-height: 1.7; }
.news-item__meta {
  display: flex; align-items: center; gap: 14px; margin-top: auto; padding-top: 12px;
  font-size: 12px; color: var(--c-text-3);
}
.news-item__meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--c-border-2); }

/* 纯文字条目（紧凑列表） */
.postlist > li { padding: 11px 0; border-bottom: 1px dashed var(--c-border); font-size: 15px; }
.postlist > li:last-child { border-bottom: 0; }
.postlist .postlist__row { display: flex; align-items: center; gap: 10px; }
.postlist .postlist__text { flex: 1; min-width: 0; color: var(--c-title); }
.postlist .postlist__date { font-size: 12px; color: var(--c-text-3); flex: 0 0 auto; }

/* 排行榜 */
.ranklist > li { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; font-size: 14px; }
.ranklist__no {
  flex: 0 0 18px; height: 18px; line-height: 18px; margin-top: 3px; text-align: center;
  font-size: 12px; border-radius: 3px; background: #f2f4f7; color: var(--c-text-2);
}
.ranklist > li:nth-child(1) .ranklist__no { background: var(--c-primary); color: #fff; }
.ranklist > li:nth-child(2) .ranklist__no { background: #f9a03f; color: #fff; }
.ranklist > li:nth-child(3) .ranklist__no { background: #f5c451; color: #fff; }
.ranklist__text { flex: 1; min-width: 0; color: var(--c-title); }

/* 4.6 分页 */
.pagination { display: flex; justify-content: center; align-items: center; gap: 8px; padding: 32px 0 8px; }
.pagination a, .pagination span {
  min-width: 34px; height: 34px; line-height: 32px; padding: 0 10px; text-align: center;
  border: 1px solid var(--c-border-2); border-radius: var(--radius);
  background: #fff; font-size: 13px; color: var(--c-text);
}
.pagination a:hover { border-color: var(--c-primary); color: var(--c-primary); }
.pagination .is-active { background: var(--c-primary); border-color: var(--c-primary); color: #fff; }
.pagination .is-disabled { color: var(--c-text-3); background: #fafbfc; cursor: not-allowed; }
.pagination__dots { border: 0; background: none; }

/* 4.7 侧边栏卡片 */
.card { background: #fff; border-radius: var(--radius-lg); padding: 18px 20px; margin-bottom: 16px; }
.card__hd {
  display: flex; align-items: center; padding-bottom: 12px; margin-bottom: 6px;
  border-bottom: 1px solid var(--c-border);
}
.card__title { font-size: 16px; }
.card__title::before {
  content: ""; display: inline-block; width: 3px; height: 14px; margin-right: 8px;
  border-radius: 2px; background: var(--c-primary); vertical-align: -1px;
}
.card__hd .block-hd__more { margin-left: auto; }
.card__bd { padding-top: 4px; }

/* 标签云 */
.tagcloud { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 4px; }
.tagcloud a {
  padding: 5px 12px; border-radius: 999px; background: #f5f6f8;
  font-size: 13px; color: var(--c-text-2);
}
.tagcloud a:hover { background: var(--c-primary-light); color: var(--c-primary); }

/* 4.8 广告位（占位） */
.adbox {
  display: flex; align-items: center; justify-content: center;
  background: #fff; border: 1px dashed var(--c-border-2); border-radius: var(--radius-lg);
  color: var(--c-text-3); font-size: 13px; letter-spacing: 1px;
}
.adbox--banner { height: 88px; margin-bottom: 16px; }
.adbox--side { height: 180px; margin-bottom: 16px; }

/* 4.9 返回顶部 */
.to-top {
  position: fixed; right: 24px; bottom: 40px; z-index: 60;
  width: 44px; height: 44px; display: flex; align-items: center; justify-content: center;
  background: #fff; border: 1px solid var(--c-border); border-radius: 50%;
  box-shadow: var(--shadow); color: var(--c-text-2);
  opacity: 0; visibility: hidden; transition: all 0.25s;
}
.to-top.is-show { opacity: 1; visibility: visible; }
.to-top:hover { color: var(--c-primary); border-color: var(--c-primary); }
