/* ═══════════════════════════════════════════════
   a2602 — 中文资讯站模板 CSS
   品牌色 #CC0000 / 暗色 #1a1a1a / 背景 #f2f2f2
═══════════════════════════════════════════════ */

:root {
  --red:   #CC0000;
  --red-d: #aa0000;
  --dark:  #1a1a1a;
  --gray1: #f2f2f2;
  --gray2: #e8e8e8;
  --gray3: #999;
  --text:  #333;
}

/* ── 基础重置 ── */
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--gray1);
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
a:hover { color: var(--red); }
img { max-width: 100%; height: auto; display: block; }
button { font-family: inherit; }
ul, ol { list-style: none; margin: 0; padding: 0; }

/* ── 响应式栅格 ── */
.rg3  { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.rsb  { display: grid; grid-template-columns: 1fr 300px; gap: 20px; align-items: start; }
.rhr  { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; align-items: stretch; }
.rrl  { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.rftr { display: grid; grid-template-columns: repeat(5, 1fr); gap: 24px; }
.dpc  { display: flex; }
.dsp  { display: none; }

/* ── 容器 ── */
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 16px; }

/* ── 卡片悬停 ── */
.hov { transition: box-shadow .2s, transform .2s; cursor: pointer; }
.hov:hover { box-shadow: 0 6px 20px rgba(0,0,0,.12); transform: translateY(-2px); }

/* ════════════════ HEADER ════════════════ */
.site-header { background: #fff; border-bottom: 1px solid var(--gray2); position: sticky; top: 0; z-index: 200; box-shadow: 0 2px 8px rgba(0,0,0,.07); }

/* 顶部信息条 */
.top-bar { background: var(--dark); color: #bbb; font-size: 12px; padding: 5px 0; }
.top-bar .wrap { display: flex; justify-content: space-between; align-items: center; }
.top-bar a { color: #bbb; }
.top-bar a:hover { color: #fff; }
.top-bar .app-btn { background: var(--red); color: #fff; padding: 2px 10px; border-radius: 2px; font-weight: 600; }

/* Logo + 搜索栏 */
.logo-bar { padding: 10px 0; }
.logo-bar .wrap { display: flex; align-items: center; gap: 20px; justify-content: space-between; }
.logo-link { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.logo-icon { width: 44px; height: 44px; background: var(--red); border-radius: 6px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 24px; font-weight: 900; font-family: serif; }
.logo-text { font-size: 22px; font-weight: 900; color: var(--red); letter-spacing: -.5px; line-height: 1.1; }
.logo-sub  { font-size: 10px; color: #bbb; letter-spacing: 2px; }
.search-form { display: flex; border: 2px solid var(--gray2); border-radius: 4px; overflow: hidden; }
.search-form input { padding: 8px 12px; border: none; outline: none; font-size: 14px; font-family: inherit; color: var(--text); width: 180px; }
.search-form button { background: var(--red); color: #fff; border: none; padding: 0 16px; cursor: pointer; font-size: 14px; font-weight: 600; }
.search-form button:hover { background: var(--red-d); }
.mob-menu-btn { background: none; border: 1px solid var(--gray2); padding: 8px 12px; border-radius: 4px; cursor: pointer; font-size: 18px; color: var(--text); }

/* 主导航 */
.main-nav { background: var(--red); }
.main-nav .wrap { display: flex; flex-wrap: wrap; }
.main-nav a { color: #fff; padding: 11px 15px; font-size: 14px; font-weight: 500; display: block; white-space: nowrap; }
.main-nav a:hover { background: rgba(0,0,0,.18); color: #fff; }
.main-nav a.active { background: rgba(0,0,0,.25); font-weight: 700; }

/* 移动端折叠导航 */
.mob-nav { display: none; background: #fff; border-bottom: 1px solid var(--gray2); }
.mob-nav.open { display: block; }
.mob-nav a { display: block; padding: 11px 20px; font-size: 15px; border-bottom: 1px solid #f5f5f5; }

/* ════════════════ 快讯 TICKER ════════════════ */
@keyframes ticker { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }
.ticker-wrap { background: #fff; border-bottom: 1px solid var(--gray2); height: 38px; display: flex; align-items: center; overflow: hidden; }
.ticker-label { background: var(--red); color: #fff; padding: 0 14px; height: 100%; display: flex; align-items: center; font-size: 13px; font-weight: 700; flex-shrink: 0; gap: 6px; white-space: nowrap; }
.ticker-dot { width: 7px; height: 7px; background: #fff; border-radius: 50%; display: inline-block; }
.ticker-track { overflow: hidden; flex: 1; padding: 0 8px; }
.ticker-inner { display: inline-flex; white-space: nowrap; animation: ticker 50s linear infinite; font-size: 13px; color: var(--text); }
.ticker-inner span { padding-right: 80px; }

/* ════════════════ 主内容 ════════════════ */
.main-wrap { max-width: 1240px; margin: 0 auto; padding: 20px 16px; }

/* ── 分类标题栏 ── */
.cat-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 3px solid var(--red); }
.cat-head h2, .cat-head h3 { font-size: 17px; font-weight: 900; color: var(--dark); margin: 0; display: flex; align-items: center; gap: 8px; }
.cat-bar { width: 4px; height: 18px; background: var(--red); border-radius: 2px; display: inline-block; flex-shrink: 0; }
.cat-more { font-size: 13px; color: var(--gray3); display: flex; align-items: center; gap: 2px; }
.cat-more:hover { color: var(--red); }

/* ── 头条主图区 ── */
.hero-article { position: relative; border-radius: 8px; overflow: hidden; background: #0a0a0a; }
.hero-img { width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; }
.hero-overlay { position: absolute; bottom: 0; left: 0; right: 0; background: linear-gradient(transparent, rgba(0,0,0,.75) 40%, rgba(0,0,0,.92)); padding: 48px 24px 24px; }
.hero-cat { display: inline-block; background: var(--red); color: #fff; font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 3px; margin-bottom: 10px; letter-spacing: .5px; }
.hero-title { color: #fff; font-size: 22px; font-weight: 900; line-height: 1.5; margin: 0 0 10px; text-shadow: 0 2px 8px rgba(0,0,0,.4); }
.hero-meta { color: rgba(255,255,255,.75); font-size: 13px; display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }

/* ── 文章卡片（竖排） ── */
.art-card { background: #fff; border-radius: 8px; overflow: hidden; display: flex; flex-direction: column; }
.art-card-img { aspect-ratio: 16/9; object-fit: cover; width: 100%; }
.art-card-img-placeholder { aspect-ratio: 16/9; background: #e8eff5; }
.art-card-body { padding: 12px; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.art-card-cat { font-size: 11px; font-weight: 700; color: var(--red); }
.art-card-title { font-size: 14px; font-weight: 600; line-height: 1.55; margin: 0; color: var(--dark); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; flex: 1; }
.art-card-foot { display: flex; justify-content: space-between; font-size: 12px; color: var(--gray3); margin-top: auto; }

/* ── 文章横向卡片（列表页） ── */
.art-row { background: #fff; display: flex; gap: 16px; padding: 16px; border-bottom: 1px solid #f2f2f2; align-items: flex-start; }
.art-row:last-child { border-bottom: none; }
.art-row-img { width: 160px; flex-shrink: 0; aspect-ratio: 16/9; object-fit: cover; border-radius: 6px; }
.art-row-img-ph { width: 160px; flex-shrink: 0; aspect-ratio: 16/9; background: #e8eff5; border-radius: 6px; }
.art-row-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.art-row-title { font-size: 16px; font-weight: 700; color: var(--dark); line-height: 1.5; margin: 0; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.art-row-desc  { font-size: 13px; color: #666; line-height: 1.75; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.art-row-meta  { display: flex; flex-wrap: wrap; gap-x: 10px; gap-y: 4px; font-size: 12px; color: var(--gray3); }
.hot-badge { background: var(--red); color: #fff; font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 3px; flex-shrink: 0; }

/* ════════════════ 侧边栏 ════════════════ */
.sb-box { background: #fff; border-radius: 8px; overflow: hidden; }
.sb-head { padding: 12px 16px; border-bottom: 3px solid var(--red); }
.sb-head h3 { font-size: 15px; font-weight: 700; color: var(--dark); margin: 0; }
.sb-head-red { background: var(--red); padding: 12px 16px; }
.sb-head-red h3 { color: #fff; font-size: 15px; font-weight: 700; margin: 0; }
.sb-item { display: flex; gap: 10px; padding: 10px 14px; border-bottom: 1px solid #f8f8f8; align-items: flex-start; }
.sb-item a { font-size: 13px; color: var(--text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.55; }
.sb-item a:hover { color: var(--red); }
.sb-num { width: 22px; height: 22px; font-size: 12px; font-weight: 700; border-radius: 3px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 1px; }
.sb-num.top { background: var(--red); color: #fff; }
.sb-num.rest { background: #f0f0f0; color: var(--gray3); }
.sb-sub { font-size: 11px; color: var(--red); margin-top: 3px; display: block; }

/* 标签云 */
.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 16px; }
.tag-cloud a { display: inline-block; padding: 5px 12px; background: #f5f5f5; color: #555; font-size: 13px; border-radius: 20px; border: 1px solid var(--gray2); }
.tag-cloud a:hover { background: var(--red); color: #fff; border-color: var(--red); }

/* 广告位 */
.ad-placeholder { background: #f0f0f0; border-radius: 8px; height: 250px; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 11px; color: #bbb; gap: 6px; border: 1px dashed #ddd; }

/* ════════════════ 分页 ════════════════ */
.pager { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; padding: 20px 0; }
.pager a, .pager span { display: inline-flex; align-items: center; justify-content: center; min-width: 36px; height: 36px; padding: 0 10px; border: 1px solid var(--gray2); background: #fff; border-radius: 4px; font-size: 14px; color: var(--text); }
.pager a:hover { border-color: var(--red); color: var(--red); background: #fff8f8; }
.pager .current { background: var(--red); color: #fff; border-color: var(--red); }
.pager .dots { border: none; background: none; color: var(--gray3); }

/* ════════════════ 详情页 ════════════════ */

/* 面包屑 */
.breadcrumb { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13px; color: #888; margin-bottom: 20px; }
.breadcrumb a { color: #666; }
.breadcrumb a:hover { color: var(--red); }
.breadcrumb .sep { color: #ccc; }

/* 文章卡头 */
.art-header { margin-bottom: 20px; }
.art-cat-badge { display: inline-block; background: var(--red); color: #fff; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 3px; letter-spacing: .5px; margin-bottom: 10px; }
.art-h1 { font-size: 28px; font-weight: 900; line-height: 1.45; color: #111; margin: 0 0 16px; letter-spacing: -.5px; }
.art-meta { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; padding: 12px 0; border-top: 1px solid #f0f0f0; border-bottom: 1px solid #f0f0f0; margin-bottom: 14px; font-size: 13px; color: #666; }
.art-meta .views { display: flex; gap: 16px; margin-left: auto; font-size: 13px; color: var(--gray3); }
.share-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.share-btn { display: flex; align-items: center; gap: 6px; padding: 7px 14px; border: none; border-radius: 4px; font-size: 13px; cursor: pointer; font-family: inherit; }
.share-wechat { background: #07C160; color: #fff; }
.share-weibo  { background: #E6162D; color: #fff; }
.copy-link    { background: #f5f5f5; color: #555; border: 1px solid var(--gray2); }
.copy-link:hover { background: var(--gray2); }

/* 文章主图 */
.art-figure { margin: 0 0 24px; }
.art-figure img { border-radius: 8px; width: 100%; }
.art-figcaption { text-align: center; font-size: 13px; color: #888; margin-top: 8px; line-height: 1.6; }

/* 正文排版 */
.prose { padding: 0; }
.prose p { margin: 0 0 1.5em; line-height: 1.9; font-size: 16px; color: #222; }
.prose h2 { font-size: 21px; font-weight: 700; margin: 2em 0 .8em; border-left: 4px solid var(--red); padding-left: 12px; color: #111; }
.prose h3 { font-size: 17px; font-weight: 700; margin: 1.6em 0 .6em; color: #111; }
.prose blockquote { margin: 1.8em 0; padding: 14px 20px; border-left: 4px solid var(--red); background: #fff8f8; color: #555; font-size: 15px; line-height: 1.8; font-style: italic; }
.prose figure { margin: 1.8em 0; }
.prose figcaption { text-align: center; font-size: 13px; color: #888; margin-top: 8px; }
.prose img { border-radius: 6px; width: 100%; height: auto; margin: 8px 0; }
.prose a { color: var(--red); text-decoration: underline; }

/* 标签区 */
.tags-bar { margin-top: 28px; padding-top: 20px; border-top: 1px solid #eee; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tags-bar .label { font-size: 13px; color: #888; font-weight: 600; }
.tag-item { display: inline-block; padding: 4px 12px; background: #f0f0f0; color: #555; font-size: 13px; border-radius: 3px; border: 1px solid var(--gray2); }
.tag-item:hover { background: var(--red); color: #fff; border-color: var(--red); }

/* 作者卡 */
.author-card { background: #f8f9fa; border-radius: 8px; padding: 20px; margin-top: 24px; display: flex; gap: 16px; align-items: flex-start; border: 1px solid #eee; }
.author-avatar { width: 56px; height: 56px; background: var(--red); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 22px; font-weight: 700; flex-shrink: 0; }
.author-name { font-weight: 700; color: var(--dark); font-size: 15px; margin-bottom: 4px; }
.author-bio  { margin: 0; font-size: 13px; color: #666; line-height: 1.8; }

/* 评论区 */
.comments-area { margin-top: 32px; }
.comment-input-box { background: #fff; border-radius: 8px; padding: 16px; margin-bottom: 20px; border: 1px solid #eee; }
.comment-input-box textarea { width: 100%; min-height: 80px; padding: 10px 12px; border: 1px solid #e0e0e0; border-radius: 4px; font-size: 14px; font-family: inherit; color: var(--text); resize: vertical; outline: none; }
.comment-input-box textarea:focus { border-color: var(--red); }
.comment-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; }
.comment-submit { background: var(--red); color: #fff; border: none; padding: 8px 20px; border-radius: 4px; font-size: 14px; cursor: pointer; font-weight: 600; }
.comment-submit:hover { background: var(--red-d); }
.comment-item { background: #fff; border-radius: 8px; padding: 16px; margin-bottom: 10px; border: 1px solid #f0f0f0; }
.comment-item .avt { width: 38px; height: 38px; background: var(--gray2); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #888; font-size: 16px; font-weight: 700; flex-shrink: 0; }

/* ════════════════ FOOTER ════════════════ */
.site-footer { background: var(--dark); color: #ccc; margin-top: 40px; }
.footer-links { padding: 36px 0 24px; }
.footer-col h4 { color: #fff; font-size: 14px; font-weight: 700; margin: 0 0 14px; padding-bottom: 8px; border-bottom: 1px solid #2a2a2a; }
.footer-col ul { display: flex; flex-direction: column; gap: 9px; }
.footer-col ul a { color: #aaa; font-size: 13px; }
.footer-col ul a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid #2a2a2a; padding: 20px 0; text-align: center; }
.footer-bottom a { color: #777; font-size: 12px; }
.footer-bottom a:hover { color: #aaa; }
.footer-legal { font-size: 12px; color: #555; line-height: 2; margin-top: 6px; }
.footer-legal a { color: #555; }
.footer-legal a:hover { color: #888; }

/* ════════════════ 响应式 ════════════════ */
@media (max-width: 1024px) {
  .rsb  { grid-template-columns: 1fr 260px; }
  .rftr { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
  .rg3, .rsb, .rhr, .rrl { grid-template-columns: 1fr; }
  .rftr { grid-template-columns: repeat(2, 1fr); }
  .dpc  { display: none !important; }
  .dsp  { display: flex !important; }
  .art-h1 { font-size: 20px; }
  .hero-title { font-size: 16px; }
  .art-row-img, .art-row-img-ph { width: 100px; }
  .art-meta .views { margin-left: 0; }
  .main-wrap { padding: 12px; }
  .rftr { grid-template-columns: 1fr; }
}
