/* ==========================================================================
   扬州市生物医药行业协会 — 设计基座
   视觉语言：会刊与公文。纸张、墨色、一道印朱；结构靠细分隔线与留白表达，
   不靠卡片、阴影和渐变。青绿与藏青取自协会会徽。
   ========================================================================== */

/* ---------- 1. 设计令牌 ---------- */
:root {
  /* 纸与墨 */
  --c-paper: #fafaf7;
  --c-surface: #ffffff;
  --c-ink: #191c20;
  --c-ink-soft: #4d545c;
  --c-ink-mute: #6f767e;
  --c-rule: #e3e3dd;
  --c-rule-strong: #c9cac2;

  /* 机构色，取自协会会徽 */
  --c-navy: #123a63;
  --c-teal: #0e7c6b;
  --c-seal: #a8271b;

  /* 兼容既有变量名：components.css / pages.css 仍按这些名字引用 */
  --c-white: var(--c-surface);
  --c-bg: var(--c-paper);
  --c-bg-soft: #f4f4f0;
  --c-line: var(--c-rule);
  --c-line-strong: var(--c-rule-strong);
  --c-ink-900: var(--c-ink);
  --c-ink-800: #23272c;
  --c-ink-700: var(--c-ink-soft);
  --c-ink-600: #5c636b;
  --c-ink-500: var(--c-ink-mute);
  --c-ink-400: #828a92;
  --c-brand-900: #0d2b4a;
  --c-brand-800: var(--c-navy);
  --c-brand-700: #17456f;
  --c-brand-600: #1d5285;
  --c-brand-500: #2a6499;
  --c-brand-100: #d7e2ee;
  --c-brand-050: #eef3f8;
  --c-teal-800: #0a5f52;
  --c-teal-700: var(--c-teal);
  --c-teal-600: #14907c;
  --c-teal-100: #cfe7e2;
  --c-teal-050: #edf5f3;
  --c-red-600: var(--c-seal);
  --c-red-050: #f8ecea;
  --c-gold-600: #8a6d1f;
  --c-gold-050: #f7f3e8;

  /* 圆角收到近乎直角，阴影一律取消 */
  --container: 1160px;
  --gutter: 24px;
  --radius-sm: 2px;
  --radius: 4px;
  --radius-lg: 6px;
  --shadow-xs: none;
  --shadow-sm: none;
  --shadow-md: none;
  --shadow-lg: none;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --dur: 0.18s;

  /* 标题用中文衬线（公文体），正文用黑体 */
  --font-serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong",
    "SimSun", "宋体", serif;
  --font-sans: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB",
    "Noto Sans SC", "Source Han Sans SC", system-ui, -apple-system, "Segoe UI",
    Roboto, sans-serif;
}

/* ---------- 2. 重置与基础排版 ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.85;
  color: var(--c-ink);
  background: var(--c-paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0 0 0.6em;
  font-family: var(--font-serif);
  font-weight: 700;
  line-height: 1.4;
  color: var(--c-ink);
}

h1 { font-size: 2.125rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.1875rem; }
h4 { font-size: 1.0625rem; }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a {
  color: var(--c-navy);
  text-decoration: none;
  transition: color var(--dur) var(--ease);
}

a:hover,
a:focus-visible { color: var(--c-seal); }

img,
svg,
video {
  max-width: 100%;
  height: auto;
  border: 0;
}

ul,
ol {
  margin: 0 0 1em;
  padding-left: 1.4em;
}

figure { margin: 0; }

table {
  width: 100%;
  border-collapse: collapse;
}

hr {
  border: 0;
  border-top: 1px solid var(--c-rule);
  margin: 2rem 0;
}

:focus-visible {
  outline: 2px solid var(--c-seal);
  outline-offset: 2px;
}

.stat__value,
.news-item__date,
.entry-list__meta {
  font-variant-numeric: tabular-nums;
}

/* ---------- 3. 工具类 ---------- */
.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 999;
  padding: 10px 18px;
  background: var(--c-ink);
  color: var(--c-paper);
  transition: top var(--dur) var(--ease);
}

.skip-link:focus { top: 0; color: var(--c-paper); }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section { padding: 60px 0; }
.section--tight { padding: 38px 0; }
.section--soft { background: var(--c-surface); }
.section--tint { background: var(--c-bg-soft); }
.section--teal { background: var(--c-teal-050); }

.grid {
  display: grid;
  gap: 32px;
}

.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid--sidebar { grid-template-columns: minmax(0, 2.4fr) minmax(0, 1fr); }

.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }

/* ---------- 4. 区块标题 ---------- */
/* 印朱短横在上，衬线标题在下；通栏细线收尾，不用色块与渐变条 */
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin: 56px 0 26px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--c-rule);
}

.section-head:first-child { margin-top: 0; }

.section-head__left { min-width: 0; }

.section-head__title {
  position: relative;
  margin: 0;
  padding-top: 12px;
  font-family: var(--font-serif);
  font-size: 1.4375rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.section-head__title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 44px;
  height: 2px;
  background: var(--c-seal);
}

.section-head__sub {
  margin: 6px 0 0;
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--c-ink-mute);
}

.section-head__more {
  flex: none;
  font-size: 0.875rem;
  color: var(--c-ink-mute);
  white-space: nowrap;
}

.section-head__more:hover { color: var(--c-seal); }

/* ---------- 5. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.5;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease),
    border-color var(--dur) var(--ease);
}

.btn--primary {
  background: var(--c-navy);
  border-color: var(--c-navy);
  color: #fff;
}

.btn--primary:hover,
.btn--primary:focus-visible {
  background: #0d2b4a;
  border-color: #0d2b4a;
  color: #fff;
}

.btn--teal {
  background: var(--c-teal);
  border-color: var(--c-teal);
  color: #fff;
}

.btn--teal:hover,
.btn--teal:focus-visible {
  background: var(--c-teal-800);
  border-color: var(--c-teal-800);
  color: #fff;
}

.btn--ghost {
  background: transparent;
  border-color: var(--c-rule-strong);
  color: var(--c-ink);
}

.btn--ghost:hover,
.btn--ghost:focus-visible {
  border-color: var(--c-ink);
  background: transparent;
  color: var(--c-ink);
}

.btn--sm { padding: 6px 14px; font-size: 0.875rem; }
.btn--lg { padding: 12px 28px; font-size: 1rem; }

/* ---------- 6. 顶部信息条 ---------- */
/* 放真实信息（登记管理机关与业务主管单位），不是「欢迎访问」这类模板文案 */
.topbar {
  background: var(--c-ink);
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.8125rem;
  line-height: 36px;
}

.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.topbar__welcome {
  margin: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.topbar__links {
  display: flex;
  flex: none;
  gap: 22px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.topbar__links a { color: rgba(255, 255, 255, 0.7); }

.topbar__links a:hover,
.topbar__links a:focus-visible { color: #fff; }

.topbar__hot { color: #fff !important; font-weight: 600; }

/* ---------- 7. 页头与主导航 ---------- */
/* 结构：顶部信息条 → 纸底标识行（会徽 + 报名）→ 墨色导航条 */

.site-header {
  position: relative;
  z-index: 60;
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-rule);
}

.site-header__top-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 84px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: none;
  color: inherit;
}

.logo:hover { color: inherit; }

.logo__mark { display: flex; }

.logo__mark img,
.logo__mark svg {
  width: 52px;
  height: 52px;
  display: block;
  border-radius: 50%;
}

.logo__text { display: flex; flex-direction: column; }

.logo__name {
  font-family: var(--font-serif);
  font-size: 1.3125rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--c-ink);
  line-height: 1.3;
}

.logo__sub {
  font-size: 0.6875rem;
  letter-spacing: 0;
  color: var(--c-ink-mute);
  white-space: nowrap;
}

.search {
  position: relative;
  display: flex;
  align-items: center;
  margin-left: auto;
  width: 232px;
  height: 38px;
  border: 1px solid var(--c-rule-strong);
  border-radius: var(--radius-sm);
  background: var(--c-surface);
  overflow: hidden;
  transition: border-color var(--dur) var(--ease);
}

.search:focus-within { border-color: var(--c-ink); }

.search input {
  flex: 1;
  min-width: 0;
  height: 100%;
  padding: 0 8px 0 14px;
  border: 0;
  background: transparent;
  font-family: inherit;
  font-size: 0.875rem;
  color: var(--c-ink);
}

.search input:focus { outline: none; }

.search button {
  flex: none;
  width: 44px;
  height: 100%;
  border: 0;
  background: transparent;
  color: var(--c-ink-mute);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search button:hover { color: var(--c-ink); }

.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  flex: none;
  padding: 8px 12px;
  border: 1px solid var(--c-rule-strong);
  border-radius: var(--radius-sm);
  background: var(--c-surface);
  color: var(--c-ink);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
}

.nav-toggle__bars {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 18px;
}

.nav-toggle__bars i {
  display: block;
  height: 2px;
  background: currentColor;
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
}

body.nav-open .nav-toggle__bars i:nth-child(1) { transform: translateY(6px) rotate(45deg); }
body.nav-open .nav-toggle__bars i:nth-child(2) { opacity: 0; }
body.nav-open .nav-toggle__bars i:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.site-header__bar { background: var(--c-ink); }

.site-header__bar-inner { display: flex; }

.nav { width: 100%; }

.nav__list {
  display: flex;
  align-items: center;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav__item { position: relative; }

.nav__link {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 52px;
  padding: 0 19px;
  font-size: 0.9688rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.76);
  white-space: nowrap;
  border-top: 3px solid transparent;
  transition: color var(--dur) var(--ease), background var(--dur) var(--ease);
}

.nav__link:hover,
.nav__link:focus-visible,
.nav__item.is-active > .nav__link {
  color: #fff;
  background: rgba(255, 255, 255, 0.07);
  border-top-color: var(--c-seal);
}

.nav__caret {
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  opacity: 0.6;
  transition: transform var(--dur) var(--ease);
}

.nav__item--has-children:hover .nav__caret,
.nav__item--has-children:focus-within .nav__caret { transform: rotate(180deg); }

.nav__submenu {
  position: absolute;
  left: 0;
  top: 100%;
  z-index: 5;
  min-width: 178px;
  margin: 0;
  padding: 6px 0;
  list-style: none;
  background: var(--c-surface);
  border: 1px solid var(--c-rule);
  border-top: 2px solid var(--c-seal);
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease),
    visibility var(--dur) var(--ease);
}

.nav__item--has-children:hover .nav__submenu,
.nav__item--has-children:focus-within .nav__submenu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav__submenu-item a {
  display: block;
  padding: 9px 18px;
  font-size: 0.9375rem;
  color: var(--c-ink-soft);
  white-space: nowrap;
}

.nav__submenu-item a:hover,
.nav__submenu-item.is-active a {
  background: var(--c-bg-soft);
  color: var(--c-seal);
}

/* ---------- 8. 面包屑 ---------- */
.breadcrumb {
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-rule);
  font-size: 0.875rem;
}

.breadcrumb__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 11px 0;
  list-style: none;
  color: var(--c-ink-mute);
}

.breadcrumb__list li + li::before {
  content: "/";
  margin-right: 8px;
  color: var(--c-rule-strong);
}

.breadcrumb__list [aria-current="page"] { color: var(--c-ink-soft); }

/* ---------- 9. 内页抬头 ---------- */
/* 文件式抬头：纸底、衬线标题、顶部一道印朱细线 */
.page-hero {
  position: relative;
  padding: 40px 0 34px;
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-rule);
}

.page-hero::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 3px;
  background: var(--c-seal);
}

.page-hero__title {
  position: relative;
  margin: 0;
  font-size: 1.875rem;
  letter-spacing: 0.02em;
  color: var(--c-ink);
}

.page-hero__sub {
  position: relative;
  margin: 8px 0 0;
  max-width: 46em;
  color: var(--c-ink-mute);
  font-size: 0.9375rem;
}

/* ---------- 10. 页脚 ---------- */
.site-footer {
  margin-top: 0;
  background: var(--c-ink);
  color: rgba(255, 255, 255, 0.66);
  font-size: 0.875rem;
}

.site-footer__main {
  display: grid;
  grid-template-columns: 1fr 1.4fr 1fr;
  gap: 40px;
  padding: 52px var(--gutter) 40px;
}

.site-footer__name {
  margin: 0 0 2px;
  font-family: var(--font-serif);
  color: #fff;
  font-size: 1.125rem;
  font-weight: 700;
}

.site-footer__en {
  margin: 0 0 16px;
  font-size: 0.75rem;
  letter-spacing: 0;
  color: rgba(255, 255, 255, 0.4);
}

.site-footer__desc {
  margin: 0;
  max-width: 28em;
  line-height: 1.85;
  color: rgba(255, 255, 255, 0.55);
}

.site-footer__title {
  margin: 0 0 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  font-family: var(--font-sans);
  color: #fff;
  font-size: 0.9375rem;
  font-weight: 600;
}

.site-footer__links,
.site-footer__contact {
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer__links li { margin-bottom: 9px; }

.site-footer__links a { color: rgba(255, 255, 255, 0.66); }
.site-footer__links a:hover,
.site-footer__links a:focus-visible { color: #fff; }

.site-footer__contact li {
  display: flex;
  gap: 10px;
  margin-bottom: 9px;
  line-height: 1.7;
}

.site-footer__contact span {
  flex: none;
  width: 3.2em;
  color: rgba(255, 255, 255, 0.38);
}

.site-footer__qr {
  display: flex;
  align-items: center;
  gap: 12px;
}

.site-footer__qr-box {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 84px;
  height: 84px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.45);
}

.site-footer__qr p { margin: 0; line-height: 1.7; }

.site-footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 16px 0;
  font-size: 0.8125rem;
}

.site-footer__bottom-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.site-footer__bottom p { margin: 0; }

.site-footer__legal {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  color: rgba(255, 255, 255, 0.45);
}

.site-footer__legal a { color: inherit; }

.site-footer__legal a:hover,
.site-footer__legal a:focus-visible { color: rgba(255, 255, 255, 0.78); }

/* 设计署名：单独一行，比备案信息更轻，用一道细线隔开 */
.site-footer__credit {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.site-footer__credit p {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.62);
}

/* 英文署名可能是唯一一行，别压得太淡 */
.site-footer__credit .site-footer__credit-en {
  font-size: 0.78125rem;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.52);
}

.site-footer__credit .site-footer__credit-cn + .site-footer__credit-en {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.44);
}

/* ---------- 11. 会刊抬头（首页第一屏） ---------- */
/* 会徽是唯一的重元素，右侧是协会的登记事实，不用大数字与渐变做第一屏 */










/* ---------- 12. 首页头条（页眉没有的内容） ---------- */
.lead {
  max-width: 46em;
}

.lead__date {
  display: block;
  font-size: 0.875rem;
  color: var(--c-ink-mute);
  font-variant-numeric: tabular-nums;
}

.lead__title {
  margin: 6px 0 12px;
  font-size: 1.75rem;
  line-height: 1.45;
}

.lead__title a { color: var(--c-ink); }

.lead__title a:hover,
.lead__title a:focus-visible { color: var(--c-seal); }

.lead__summary {
  margin: 0;
  font-size: 1rem;
  line-height: 1.9;
  color: var(--c-ink-soft);
}

/* ---------- 13. 返回顶部 ---------- */
.to-top {
  position: fixed;
  right: 24px;
  bottom: 28px;
  z-index: 80;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--c-rule-strong);
  border-radius: var(--radius-sm);
  background: var(--c-surface);
  color: var(--c-ink);
  cursor: pointer;
  transition: border-color var(--dur) var(--ease), color var(--dur) var(--ease);
}

.to-top:hover { border-color: var(--c-ink); color: var(--c-seal); }
.to-top[hidden] { display: none; }

/* ---------- 14. 响应式 ---------- */
@media (max-width: 1080px) {
  .site-header__top-inner { flex-wrap: wrap; min-height: 74px; gap: 12px; padding-top: 10px; padding-bottom: 10px; }
  .logo__sub { display: none; }
  .search { width: 200px; }
  .nav-toggle { display: flex; }

  .nav {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s var(--ease);
  }

  body.nav-open .nav { max-height: 72vh; overflow-y: auto; }

  .nav__list { flex-direction: column; align-items: stretch; gap: 0; }

  .nav__link {
    height: auto;
    padding: 14px 4px;
    border-top: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    border-left: 3px solid transparent;
    color: rgba(255, 255, 255, 0.85);
  }

  .nav__link:hover,
  .nav__link:focus-visible,
  .nav__item.is-active > .nav__link {
    border-bottom-color: rgba(255, 255, 255, 0.12);
    border-left-color: var(--c-seal);
    background: rgba(255, 255, 255, 0.06);
  }

  .nav__submenu {
    position: static;
    transform: none;
    opacity: 1;
    visibility: visible;
    border: 0;
    min-width: 0;
    padding: 0 0 8px 18px;
    background: rgba(0, 0, 0, 0.22);
  }

  .nav__submenu-item a { color: rgba(255, 255, 255, 0.76); }

  .nav__submenu-item a:hover,
  .nav__submenu-item.is-active a {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
  }

  .lead__title { font-size: 1.5rem; }
  .site-footer__main { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px; }
}

@media (max-width: 860px) {
  .grid--sidebar,
  .grid--3,
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .section { padding: 44px 0; }
  .topbar { font-size: 0.75rem; line-height: 32px; }
  .topbar__welcome { display: none; }
  .topbar__inner { justify-content: center; }
  .topbar__links { gap: 16px; justify-content: center; }
}

@media (max-width: 620px) {
  :root { --gutter: 16px; }
  body { font-size: 0.9688rem; }
  h1 { font-size: 1.625rem; }
  .grid--2,
  .grid--3,
  .grid--4,
  .grid--sidebar { grid-template-columns: minmax(0, 1fr); }
  .page-hero { padding: 30px 0 26px; }
  .page-hero__title { font-size: 1.5rem; }
  .lead__title { font-size: 1.3125rem; }
  .site-footer__main { grid-template-columns: minmax(0, 1fr); }
  .site-footer__bottom-inner { flex-direction: column; align-items: flex-start; }
  .to-top { right: 14px; bottom: 16px; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 6px; margin-top: 40px; }
  .section { padding: 36px 0; }
}
