/* 学术科技类社团知识科普网站 · 统一视觉样式 */
:root {
  --navy: #0d2b4e;
  --navy-2: #123c69;
  --blue: #1769aa;
  --blue-light: #e8f2fb;
  --accent: #16a5a5;
  --bg: #f4f7fb;
  --card: #ffffff;
  --text: #1b2a41;
  --muted: #5d6d82;
  --line: #e2e9f2;
  --shadow: 0 8px 30px rgba(13, 43, 78, .07);
  --shadow-hover: 0 14px 38px rgba(13, 43, 78, .13);
  --radius: 14px;
  --maxw: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input { font: inherit; }

.wrap { width: min(var(--maxw), calc(100% - 40px)); margin: 0 auto; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.brand { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 11px;
  background: linear-gradient(135deg, var(--blue), var(--accent));
  display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 18px;
  box-shadow: 0 5px 14px rgba(23, 105, 170, .28);
}
.brand-text strong { display: block; font-size: 17px; letter-spacing: .3px; color: var(--navy); line-height: 1.25; }
.brand-text span { display: block; font-size: 11px; color: var(--muted); letter-spacing: 1.6px; }
.site-nav { display: flex; align-items: center; gap: 6px; }
.site-nav a {
  padding: 9px 16px; border-radius: 9px; font-size: 15px; color: #33445c;
  transition: background .2s, color .2s;
}
.site-nav a:hover { background: var(--blue-light); color: var(--blue); }
.site-nav a.active { background: var(--blue); color: #fff; }
.nav-toggle {
  display: none; border: 0; background: transparent; cursor: pointer;
  width: 42px; height: 42px; border-radius: 9px; color: var(--navy);
}
.nav-toggle:hover { background: var(--blue-light); }
.nav-toggle svg { width: 24px; height: 24px; margin: auto; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background: linear-gradient(125deg, #0b2442 0%, #123e6d 55%, #0f5b73 100%);
}
.hero::before {
  content: ""; position: absolute; inset: 0; opacity: .16;
  background-image: linear-gradient(rgba(255,255,255,.25) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,.25) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: linear-gradient(90deg, #000, transparent 85%);
}
.hero::after {
  content: ""; position: absolute; width: 520px; height: 520px; right: -120px; top: -180px;
  background: radial-gradient(circle, rgba(22,165,165,.45), transparent 68%);
}
.hero-inner { position: relative; z-index: 1; padding: 76px 0 66px; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 9px; font-size: 13px; letter-spacing: 2px;
  color: #9fe3e0; border: 1px solid rgba(159,227,224,.4); padding: 6px 14px; border-radius: 999px;
}
.hero-eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #4fd1c5; }
.hero h1 { font-size: clamp(32px, 4.6vw, 52px); line-height: 1.28; margin: 22px 0 18px; font-weight: 700; letter-spacing: 1px; }
.hero h1 em { font-style: normal; color: #6ee7dc; }
.hero-lead { max-width: 680px; font-size: 17px; color: #cddcec; line-height: 1.9; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 30px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 24px; border-radius: 10px; font-size: 15px; font-weight: 600;
  transition: transform .2s, box-shadow .2s, background .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: #fff; color: var(--navy); box-shadow: 0 8px 20px rgba(0,0,0,.15); }
.btn-ghost { border: 1px solid rgba(255,255,255,.42); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,.1); }
.btn-blue { background: var(--blue); color: #fff; }
.btn-blue:hover { background: #0f568f; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 52px; }
.stat {
  background: rgba(255,255,255,.09); border: 1px solid rgba(255,255,255,.16);
  border-radius: 12px; padding: 18px 20px;
}
.stat strong { display: block; font-size: 30px; line-height: 1.2; color: #fff; }
.stat span { font-size: 13px; color: #b9cde1; }

/* ---------- Sections ---------- */
.section { padding: 68px 0; }
.section.alt { background: #eef3f9; }
.section-head { margin-bottom: 32px; }
.eyebrow { font-size: 13px; color: var(--blue); font-weight: 700; letter-spacing: 1.6px; }
.section-head h2 { font-size: clamp(25px, 3vw, 32px); margin: 8px 0 10px; color: var(--navy); }
.section-head p { margin: 0; color: var(--muted); max-width: 720px; }
.section-head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.text-link { color: var(--blue); font-weight: 600; white-space: nowrap; font-size: 15px; }
.text-link:hover { text-decoration: underline; }

/* ---------- Club cards ---------- */
.club-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.club-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px 20px 20px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; min-height: 230px;
  transition: transform .22s, box-shadow .22s, border-color .22s;
}
.club-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); border-color: #bcd6ee; }
.card-top { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.logo-box {
  width: 66px; height: 66px; flex: 0 0 66px; border-radius: 12px; background: #f6f9fc;
  border: 1px solid var(--line); display: grid; place-items: center; padding: 6px;
}
.logo-box img { width: 100%; height: 100%; object-fit: contain; }
.card-top h3 { margin: 0; font-size: 17px; color: var(--navy); line-height: 1.4; }
.pill {
  display: inline-block; font-size: 12px; padding: 3px 10px; border-radius: 999px;
  background: var(--blue-light); color: var(--blue); margin-top: 6px;
}
.club-card p { margin: 0 0 16px; font-size: 14px; color: var(--muted); line-height: 1.8; flex: 1; }
.card-more { font-size: 14px; color: var(--blue); font-weight: 600; }

/* ---------- Category tiles ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.cat-tile {
  background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 20px 16px;
  box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s;
}
.cat-tile:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.cat-dot { width: 12px; height: 12px; border-radius: 4px; display: block; margin-bottom: 12px; }
.cat-tile strong { display: block; color: var(--navy); font-size: 16px; }
.cat-tile span { display: block; margin-top: 5px; font-size: 12px; color: var(--muted); line-height: 1.6; }

/* ---------- Article cards ---------- */
.article-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.article-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column;
  transition: transform .22s, box-shadow .22s;
}
.article-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); }
.article-thumb { aspect-ratio: 20 / 9; overflow: hidden; background: var(--navy); }
.article-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.article-card:hover .article-thumb img { transform: scale(1.04); }
.article-body { padding: 20px 22px 22px; display: flex; flex-direction: column; flex: 1; }
.article-meta { font-size: 12px; color: var(--blue); font-weight: 600; }
.article-body h3 { margin: 9px 0 10px; font-size: 18px; line-height: 1.5; color: var(--navy); }
.article-body h3 a:hover { color: var(--blue); }
.article-body p { margin: 0 0 16px; color: var(--muted); font-size: 14px; line-height: 1.8; flex: 1; }
.article-foot { font-size: 13px; color: var(--blue); font-weight: 600; }

/* ---------- Filter bar ---------- */
.filter-bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 28px; }
.search-box {
  flex: 1 1 260px; display: flex; align-items: center; gap: 8px;
  background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 0 14px;
}
.search-box svg { width: 18px; height: 18px; color: var(--muted); flex-shrink: 0; }
.search-box input { border: 0; outline: 0; padding: 12px 0; width: 100%; background: transparent; color: var(--text); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1px solid var(--line); background: #fff; color: #44566d; cursor: pointer;
  padding: 9px 15px; border-radius: 999px; font-size: 14px; transition: all .2s;
}
.chip:hover { border-color: var(--blue); color: var(--blue); }
.chip.active { background: var(--navy); border-color: var(--navy); color: #fff; }
.empty-state { display: none; padding: 50px 20px; text-align: center; color: var(--muted); background: #fff; border-radius: var(--radius); }

/* ---------- Page banner ---------- */
.page-banner {
  background: linear-gradient(120deg, #0d2b4e, #145887); color: #fff;
  padding: 48px 0 44px; position: relative; overflow: hidden;
}
.page-banner::after {
  content: ""; position: absolute; right: -80px; top: -100px; width: 380px; height: 380px;
  border-radius: 50%; border: 60px solid rgba(255,255,255,.05);
}
.page-banner h1 { margin: 8px 0 10px; font-size: clamp(28px, 3.6vw, 38px); }
.page-banner p { margin: 0; color: #c8dcee; max-width: 720px; }
.breadcrumb { font-size: 13px; color: #a8c6e0; }
.breadcrumb a:hover { color: #fff; text-decoration: underline; }
.breadcrumb span { margin: 0 7px; }

/* ---------- Club detail ---------- */
.detail-layout { display: grid; grid-template-columns: 1fr 320px; gap: 28px; align-items: start; }
.club-hero {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px; box-shadow: var(--shadow); margin-bottom: 24px;
}
.club-hero-top { display: flex; gap: 22px; align-items: center; }
.club-hero .logo-box { width: 104px; height: 104px; flex-basis: 104px; border-radius: 16px; padding: 10px; }
.club-hero h1 { margin: 0 0 10px; font-size: 28px; color: var(--navy); }
.club-hero .lead { margin: 0; color: #465a72; font-size: 16px; line-height: 1.9; }
.fact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 26px; }
.fact {
  background: #f5f8fc; border-radius: 10px; padding: 14px 16px; border-left: 3px solid var(--blue);
}
.fact span { display: block; font-size: 12px; color: var(--muted); }
.fact strong { display: block; font-size: 14px; color: var(--navy); margin-top: 3px; line-height: 1.6; }
.side-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow); margin-bottom: 20px;
}
.side-card h3 { margin: 0 0 16px; font-size: 16px; color: var(--navy); }
.side-list { list-style: none; padding: 0; margin: 0; }
.side-list li { padding: 10px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.side-list li:last-child { border-bottom: 0; }
.side-list a:hover { color: var(--blue); }
.side-list .mini { display: flex; gap: 10px; align-items: center; }
.side-list .mini img { width: 34px; height: 34px; object-fit: contain; }

/* ---------- Article page ---------- */
.article-layout { display: grid; grid-template-columns: 1fr 300px; gap: 28px; align-items: start; }
.article-main {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 34px; box-shadow: var(--shadow);
}
.article-header { border-bottom: 1px solid var(--line); padding-bottom: 22px; margin-bottom: 26px; }
.article-header h1 { font-size: clamp(25px, 3.2vw, 34px); line-height: 1.45; color: var(--navy); margin: 12px 0; }
.article-summary { color: #4c5f76; font-size: 16px; background: #f4f8fc; border-left: 4px solid var(--accent); padding: 14px 18px; margin: 0; }
.article-hero { width: 100%; border-radius: 12px; margin-bottom: 28px; }
.article-content p { font-size: 16px; line-height: 2; color: #24354b; margin: 0 0 20px; text-align: justify; }
.article-tags { margin-top: 30px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.article-tags a { color: var(--blue); }
.article-tags .tag-link {
  display: inline-block; padding: 4px 11px; margin-right: 6px;
  border: 1px solid #cfe0f2; border-radius: 999px; background: #f0f7ff;
  text-decoration: none; font-size: 12px;
}
.article-tags .tag-link:hover { background: var(--blue); color: #fff; }

/* ---------- Footer ---------- */
.site-footer { background: #0a2340; color: #b9cbdd; padding: 46px 0 24px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 34px; }
.footer-grid h4 { color: #fff; margin: 0 0 14px; font-size: 16px; }
.footer-grid p { margin: 0; font-size: 14px; line-height: 1.9; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; font-size: 14px; }
.footer-grid li { margin-bottom: 8px; }
.footer-grid a:hover { color: #6ee7dc; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.12); margin-top: 34px; padding-top: 18px;
  font-size: 13px; color: #8ea5bd; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .club-grid { grid-template-columns: repeat(3, 1fr); }
  .cat-grid { grid-template-columns: repeat(3, 1fr); }
  .article-grid { grid-template-columns: repeat(2, 1fr); }
  .detail-layout, .article-layout { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .header-inner { height: 62px; }
  .nav-toggle { display: grid; place-items: center; }
  .site-nav {
    display: none; position: absolute; top: 62px; left: 0; right: 0;
    background: #fff; border-bottom: 1px solid var(--line); padding: 10px 16px 16px;
    flex-direction: column; align-items: stretch; box-shadow: var(--shadow);
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 12px 14px; }
  .hero-inner { padding: 52px 0 46px; }
  .hero-lead { font-size: 15px; }
  .section { padding: 48px 0; }
  .club-grid, .article-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .section-head-row { align-items: flex-start; flex-direction: column; gap: 8px; }
  .club-hero-top { align-items: flex-start; }
  .club-hero .logo-box { width: 78px; height: 78px; flex-basis: 78px; }
  .fact-grid { grid-template-columns: 1fr; }
  .article-main, .club-hero { padding: 22px; }
  .footer-grid { grid-template-columns: 1fr; gap: 22px; }
}
@media (max-width: 520px) {
  .wrap { width: min(100% - 28px, var(--maxw)); }
  .brand-text strong { font-size: 15px; }
  .brand-text span { font-size: 10px; letter-spacing: 1px; }
  .club-grid, .article-grid, .cat-grid, .stats { grid-template-columns: 1fr; }
  .stat strong { font-size: 26px; }
  .club-hero-top { flex-direction: column; }
  .hero-actions .btn { flex: 1 1 100%; }
}

/* ---------- 长文与分页补充样式 ---------- */
.figure-block { margin: 0 0 30px; }
.figure-block img.article-hero { margin-bottom: 10px; }
.figure-caption {
  font-size: 13px; color: var(--muted); background: #f6f9fc;
  border-left: 3px solid var(--accent); padding: 10px 14px; margin: 0; border-radius: 0 8px 8px 0;
}
.reading-meta { font-size: 13px; color: var(--muted); margin: 10px 0 0; }
.article-section { margin-bottom: 26px; }
.article-section h2 {
  font-size: 20px; color: var(--navy); margin: 0 0 12px; padding-left: 12px;
  border-left: 4px solid var(--blue); line-height: 1.5;
}
.article-section p { font-size: 16px; line-height: 2; color: #24354b; margin: 0 0 14px; text-align: justify; }
.pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 34px; }
.pagination button {
  min-width: 40px; padding: 9px 13px; border: 1px solid var(--line); background: #fff;
  color: #3a4c63; border-radius: 8px; cursor: pointer; font-size: 14px;
}
.pagination button:hover { border-color: var(--blue); color: var(--blue); }
.pagination button.active { background: var(--navy); border-color: var(--navy); color: #fff; }
.pagination button:disabled { opacity: .4; cursor: default; }
.list-count { font-size: 14px; color: var(--muted); margin: 0 0 18px; }

/* ---------- 条目式科普列表 ---------- */
.article-list { display: flex; flex-direction: column; gap: 14px; }
.article-item {
  display: flex; gap: 18px; padding: 14px; background: #fff;
  border: 1px solid var(--line); border-radius: 14px;
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.article-item:hover {
  border-color: #b9d5ef; box-shadow: 0 8px 24px rgba(13, 43, 78, .08);
  transform: translateY(-2px);
}
.item-thumb {
  flex: 0 0 218px; width: 218px; aspect-ratio: 16 / 9; overflow: hidden;
  border-radius: 10px; background: #eef4fa;
}
.item-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.item-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.item-top { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 7px; }
.item-club { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.item-club img { width: 18px; height: 18px; object-fit: contain; }
.item-tag {
  border: 1px solid #cfe0f2; background: #f0f7ff; color: var(--blue);
  border-radius: 999px; padding: 4px 11px; font-size: 12px; cursor: pointer;
  transition: background .2s, color .2s, border-color .2s;
}
.item-tag:hover { background: var(--blue); color: #fff; border-color: var(--blue); }
.article-item h3 { margin: 0 0 7px; font-size: 18px; line-height: 1.5; color: var(--navy); }
.article-item h3 a { color: inherit; text-decoration: none; }
.article-item h3 a:hover { color: var(--blue); }
.item-summary {
  margin: 0 0 11px; color: var(--muted); font-size: 14px; line-height: 1.75;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.item-bottom { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; }
.item-focus { font-size: 12px; color: #7a8798; }
.read-more {
  display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0;
  padding: 8px 15px; border-radius: 8px; background: var(--blue); color: #fff;
  font-size: 13px; font-weight: 600; text-decoration: none; transition: background .2s, box-shadow .2s;
}
.read-more:hover { background: var(--navy); color: #fff; box-shadow: 0 4px 12px rgba(20, 88, 135, .25); }
.article-foot:hover { text-decoration: underline; }
.search-clear {
  border: 0; background: #edf3f9; color: #64778d; width: 24px; height: 24px;
  border-radius: 50%; cursor: pointer; font-size: 16px; line-height: 1; flex-shrink: 0;
}
.search-clear:hover { background: var(--blue); color: #fff; }
.search-box:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37, 110, 170, .12); }
.chip:focus-visible, .item-tag:focus-visible, .read-more:focus-visible,
.pagination button:focus-visible, .search-clear:focus-visible, .article-item h3 a:focus-visible {
  outline: 3px solid rgba(37, 110, 170, .35); outline-offset: 2px;
}
.page-ellipsis { padding: 9px 4px; color: var(--muted); }
.empty-state { display: block; }
.empty-state[hidden] { display: none; }

@media (max-width: 760px) {
  .article-item { flex-direction: column; gap: 12px; }
  .item-thumb { flex-basis: auto; width: 100%; }
  .article-item h3 { font-size: 16px; }
  .item-bottom { flex-wrap: wrap; }
}
