/* =========================================================
   贵州省绿色气候基金会 · 主题样式
   严格参考 alibabafoundation.com
   ========================================================= */

/* === CSS Reset === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
/* 标题改用宋体（思源宋体 / Noto Serif SC），正文仍用下面的系统黑体栈。
   ── 为什么这样挂才对（别改成给全站挂）─────────────────────────
   · 字体是**自托管 + unicode-range 分片**（assets/css/fonts.css，
     由 tools/fetch-webfont.py 生成，101 片 / 2.11 MB 全字符覆盖）。
   · 浏览器**只为真正用到该字体的元素**下载其字符所在的分片。
     只给标题挂 → 一个页面通常只需 2~6 片（几十 KB）；
     若给 body 也挂上 → 全页字符会命中大量分片，单页可能几百 KB。
   · 这是「字符全量覆盖」与「单页开销小」能同时成立的唯一办法。
   · 回退栈保留系统宋体，且 @font-face 用了 font-display: swap —— 字体没到时
     先用回退字体显示，不会有空白期。
   · 只给 h1/h2（页面级大标题）：卡片小标题（h3）字号小，宋体在 Windows 上
     笔画偏细、反而比黑体难读，故不挂。 */
h1, h2, .section-title {
  font-family: "Noto Serif SC", "Source Han Serif SC", "Songti SC",
               "SimSun", Georgia, serif;
}
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Source Han Sans SC", "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  color: #1f2937;
  background: var(--bg-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font: inherit; cursor: pointer; border: none; background: none; }

/* === Theme Variables === */
:root {
  /* 主色：参考中国绿发会（#1D6B49）的沉稳深绿。
     旧值 #0b7a4b 与它**色相相同（≈154°）**，只是饱和度 84% 偏高、显得鲜亮；
     这里降到 60%，观感更庄重 —— 基金会官网 + 党建栏目需要这种气质。
     ⚠️ 2026-09-16 曾按「以 Logo 配色为准」改成 Logo 绿系
        （#71C146 同色相压暗 ×0.66 → #4B7F2E），客户看过实际效果后认为不好看，
        **1.14.3 已回滚**。这段留在这里避免以后重走：
        Logo 上的亮绿 #71C146/#8EC63D 对白底只有 2.23/2.04:1，
        做文字色或按钮底色本身就不合规（AA 要 4.5:1），不能直接搬。
     ⚠️ 主色有**第二个来源**：settings.yaml 的 general.primary_color，
        它经 header.html 的内联 `:root{--primary:…}` **覆盖**这里的值。
        改主色必须两处一起改（并同步线上 configmap），否则改了看不出来。 */
  --primary: #1B6A48;
  --primary-dark: #144D34;
  --primary-light: #358C67;
  /* 主色的 RGB 分量，专供 rgba() 阴影使用。
     以前这里硬编码了 5 处 rgba(11,122,75,…) —— 改主色后它们不会跟着变，
     会出现「按钮是深绿、阴影还是旧的亮绿」的错配。统一走这个 token。
     ⚠️ 1.14.0 加页头搜索时又写了一次硬编码 rgba(27,106,72,…)，1.14.2 改色时才被发现；
        现在有断言扫「两代主色的硬编码形式」，别再写死。 */
  --primary-rgb: 27, 106, 72;
  --text: #1f2937;
  --text-muted: #6b7280;
  --bg-soft: #f4f7f5;
  --bg-white: #ffffff;
  --border: #e5e7eb;
  --shadow-sm: 0 2px 8px rgba(0,0,0,.05);
  --shadow-md: 0 8px 24px rgba(0,0,0,.08);
  --shadow-lg: 0 16px 48px rgba(0,0,0,.12);

  /* 统一缓动：easeOutQuint —— 起步快、收尾极缓，观感「优雅」且不拖沓。
     全部动画都走这两个 token，保证手感一致。 */
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-in-out: cubic-bezier(.4, 0, .2, 1);
  --transition: .28s var(--ease-out);
  --transition-slow: .5s var(--ease-out);
}

/* === Container === */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}

/* =====================================================
   1. 顶部导航
   参考 alibabafoundation.com 的三个关键手法：
     · 固定顶栏，滚动后收缩（96px → 72px）
     · 当前/悬浮栏目的下划线指示器：贴顶 3px，从中间向两侧展开
     · 悬浮有子栏目的项 → 整幅主色条从导航下方展开（.nav-sub）
   配色沿用本主题主色，不用参考站的橙色。
   ===================================================== */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: 96px;
  --header-h: 96px;              /* 供 .nav-sub 定位使用（二级条跟着导航高度走） */
  background: transparent;
  transition: background var(--transition-slow), box-shadow var(--transition-slow),
              height var(--transition-slow);
}
/* 内页（不在大图上）：白底 + 深色字，否则白字压白底会「隐身」 */
.site-header:not(.over-hero) {
  background: var(--bg-white);
  box-shadow: 0 1px 0 rgba(0,0,0,.05);
}
.site-header.scrolled {
  height: 72px;
  --header-h: 72px;
  background: var(--bg-white);
  box-shadow: 0 1px 0 rgba(0,0,0,.05), 0 4px 12px rgba(0,0,0,.04);
}
/* 移动端抽屉打开时顶栏强制白底（否则首页透明顶栏会把抽屉顶空一块） */
.site-header.nav-open {
  background: var(--bg-white);
  box-shadow: 0 1px 0 rgba(0,0,0,.05);
}
/* ⚠️⚠️ 光有白底**不够** —— 字色必须跟着切（2026-09-18 客户截图发现真 bug）。
   首页顶栏是 `over-hero`：品牌名与汉堡/搜索图标都是**白色**。
   抽屉面板是白底 → 白字落白底 = 整行**看不见**，只剩那个彩色 Logo 还露着。
   后果不只是难看：**关闭抽屉的汉堡也隐身了**，用户点不着、也看不出自己在哪个站。
   下面把 over-hero 下被强制成白色的那几处覆盖回深色（抽屉只可能在 ≤1024 出现）。 */
.site-header.nav-open .logo,
.site-header.nav-open .logo span,
.site-header.nav-open .brand-cn { color: var(--primary-dark); }
.site-header.nav-open .menu-toggle,
.site-header.nav-open .search-toggle { color: var(--text); }
/* ⚠️ 顶栏**不要**用 backdrop-filter 毛玻璃：
   它是整幅全宽背景模糊，滚动时每帧都要重新采样背后内容 ——
   这是本项目最大的滚动掉帧来源（实测移除后明显顺滑）。
   视觉上 96% 不透明白底 + 细阴影已经够用，且几乎不花钱。 */
.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 32px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--bg-white);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 1px;
  line-height: var(--header-h);
  transition: color var(--transition-slow);
  flex-shrink: 0;
}
.logo img { width: 48px; height: 48px; object-fit: contain; }
/* 品牌徽标（基金会 Logo，见 templates/assets/img/logo-mark.png）。
   固定尺寸、**不参与收缩** —— 收缩由站名文字承担（移动端 .logo 是 flex-shrink:1 + min-width:0，
   .logo span 带 ellipsis）。这是修「菜单按钮被挤出屏幕」那个 bug 时定下的分工，
   别在这里写 flex-shrink:0 之外的固定宽度把文字挤爆。 */
.brand-mark {
  flex: 0 0 auto;
  border-radius: 50%;
}
/* ---------- 品牌文字锁定：中文名一行 + 英文名一行（参考中国绿发会） ----------
   原来是「一行 19px 粗体长站名」，与参考站的视觉重量差很远。
   两行的好处：中文名可以用到 21px 而不变宽 —— 英文名占的是**高度**不是宽度。 */
.brand-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1px;
  min-width: 0;          /* 允许在窄屏收缩（配合 .logo 的 min-width:0） */
}
.brand-cn {
  display: block;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: .5px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.brand-en {
  display: block;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1.1px;
  line-height: 1.2;
  text-transform: uppercase;
  opacity: .72;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* 「（内部测试）」徽章：备案期标识。
   边框用 currentColor → 透明顶栏（白字）与白底顶栏（深绿字）都自动适配，不用写两套。
   备案完成后把前缀从站名里删掉，徽章就不再渲染。 */
.brand-badge {
  font-style: normal;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0;
  padding: 1px 6px;
  margin-right: 7px;
  border: 1px solid currentColor;
  border-radius: 4px;
  opacity: .78;
  vertical-align: 3px;
  white-space: nowrap;
}
.site-header.scrolled .logo,
.site-header:not(.over-hero) .logo { color: var(--primary-dark); }

.main-nav { flex: 1; }
.main-nav ul {
  display: flex;
  gap: 40px;
  align-items: center;
  justify-content: flex-end;
}
.main-nav li { position: relative; }
.main-nav a.nav-link {
  position: relative;
  display: block;
  padding: 0;
  line-height: var(--header-h);
  color: var(--bg-white);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: .5px;
  transition: color var(--transition-slow);
}
/* ★ 下划线指示器：贴顶 3px，从中间向两侧展开
     left:50% + width:0  →  left:0 + width:100%（与参考站 header-b:after 同手法） */
.main-nav a.nav-link::after {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  width: 0;
  height: 3px;
  background: var(--bg-white);
  transition: left var(--transition-slow), width var(--transition-slow),
              background var(--transition-slow);
}
.main-nav li:hover > a.nav-link::after,
.main-nav a.nav-link.active::after,
.main-nav a.nav-link:focus-visible::after { left: 0; width: 100%; }
.main-nav li:hover > a.nav-link,
.main-nav a.nav-link.active { font-weight: 700; }
.site-header.scrolled .main-nav a.nav-link,
.site-header:not(.over-hero) .main-nav a.nav-link { color: var(--text); }
.site-header.scrolled .main-nav a.nav-link::after,
.site-header:not(.over-hero) .main-nav a.nav-link::after { background: var(--primary); }
.site-header.scrolled .main-nav li:hover > a.nav-link { color: var(--primary); }

/* ★★ 二级栏目条：整幅主色通栏，紧贴导航下方展开（参考站 .header-c）
     两个关键点（都是「好不好点」的关键）：
       1) 紧贴 —— 用 fixed + --header-h 定位，导航收缩时自动跟上；
          再加一条不可见的 ::before「桥」抹掉 1~2px 缝隙，
          避免鼠标从主栏目下移时 hover 断掉
       2) 对齐 —— 子项要落在**所属主栏目正下方**（而不是跑到屏幕最左边），
          --sub-left 由 main.js 在悬浮时按主栏目的 left 计算写入 */
.main-nav .nav-sub {
  position: fixed;
  left: 0;
  right: 0;
  top: var(--header-h);
  z-index: 99;
  background: var(--primary);
  color: var(--bg-white);
  padding: 18px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity .26s var(--ease-out), transform .26s var(--ease-out),
              visibility .26s, top var(--transition-slow);
}
.main-nav .nav-sub::before {
  content: '';
  position: absolute;
  left: 0; right: 0; top: -16px;
  height: 16px;
}
.main-nav li:hover > .nav-sub,
.main-nav .nav-sub:focus-within { opacity: 1; visibility: visible; transform: translateY(0); }
.nav-sub-inner {
  display: flex;
  align-items: center;
  /* ⚠️ 这里**不能**给 padding-left 加 transition：
     子项位置必须是「一出现就已经对齐」，
     否则换个栏目时会看到内容从左边滑过来，很别扭（线上反馈过）。 */
  padding-left: var(--sub-left, 24px);
}
.nav-sub-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 44px;
}
.main-nav .nav-sub-links a {
  color: rgba(255,255,255,.9);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.7;
  padding: 0;
  white-space: nowrap;
  transition: color var(--transition), opacity var(--transition);
}
.main-nav .nav-sub-links a:hover { color: var(--bg-white); font-weight: 700; }

/* 二级展开箭头：仅移动端出现（桌面靠悬浮展开） */
.nav-sub-toggle { display: none; }
@keyframes sub-reveal {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: none; }
}
@keyframes footer-reveal {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: none; }
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  color: var(--bg-white);
  transition: color var(--transition);
}
.menu-toggle span {
  display: block;
  width: 24px; height: 2px;
  background: currentColor;
  transition: transform var(--transition), opacity var(--transition);
}
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.site-header.scrolled .menu-toggle,
.site-header:not(.over-hero) .menu-toggle { color: var(--text); }

/* ---------- 页头搜索（参考中国绿发会） ----------
   默认只露一个放大镜，悬浮 / 聚焦 / 点击才展开搜索框，不常年占着导航宽度。
   ⚠️ 展开用**绝对定位向下弹出**，而不是把输入框塞进导航行内 ——
      后者会在 1100~1400px 这一档把导航挤到换行（本项目在 .logo 上踩过同类问题）。 */
.header-search {
  position: relative;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
}
.search-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: var(--bg-white);
  transition: background var(--transition), color var(--transition);
}
.search-toggle:hover { background: rgba(255, 255, 255, .16); }
.site-header.scrolled .search-toggle,
.site-header:not(.over-hero) .search-toggle { color: var(--text); }
.site-header.scrolled .search-toggle:hover,
.site-header:not(.over-hero) .search-toggle:hover { background: rgba(var(--primary-rgb), .08); }

.header-search-box {
  position: absolute;
  top: calc(100% + 14px);
  right: 0;
  z-index: 101;
  display: flex;
  align-items: center;
  gap: 6px;
  width: 300px;
  padding: 6px 6px 6px 14px;
  background: var(--bg-white);
  border-radius: 100px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .14);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity .2s var(--ease-out), transform .2s var(--ease-out), visibility .2s;
}
/* ⚠️ 悬停桥：按钮与弹层之间隔着 14px，鼠标下移时会走出 .header-search 导致 hover 断裂。
   补一块不可见的 ::before 把缝隙连起来（与 .nav-sub 同一手法）。 */
.header-search-box::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: -16px;
  height: 16px;
}
.header-search:hover .header-search-box,
.header-search:focus-within .header-search-box,
.header-search.is-open .header-search-box {
  opacity: 1;
  visibility: visible;
  transform: none;
}
.header-search-box input {
  flex: 1;
  min-width: 0;
  height: 34px;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 14px;
  outline: none;
}
/* 去掉 Safari/Chrome 自带的清除小叉，避免和圆形提交按钮挤在一起 */
.header-search-box input::-webkit-search-cancel-button { -webkit-appearance: none; }
.header-search-box button[type="submit"] {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--bg-white);
  transition: background var(--transition);
}
.header-search-box button[type="submit"]:hover { background: var(--primary-dark); }

/* =====================================================
   2. Hero 大图
   ===================================================== */
.hero {
  position: relative;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  background-color: #1d3a2a;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: var(--bg-white);
  display: flex;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
}
.hero.has-image { background-image: var(--bg-image, none); }
/* 背景大图：由 <img class="hero-bg"> 承载（原因见 index.html 注释）。
   绝对定位铺满 + object-fit: cover，视觉与原来的 background-size: cover 一致；
   z-index: 0 让它待在遮罩(1)与内容(2)之下 —— z-index 只在定位元素上生效。 */
.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
}
.hero-overlay {
  position: absolute; inset: 0;
  /* 黑色渐变遮罩，透明度由主题设置 hero.overlay_opacity 控制（0~80）。
     0 = 完全露出背景图，数值越大文字越清晰。
     换算放在 CSS 里做（--overlay-opacity 由模板注入，可能是字符串 "18"），
     避免在模板表达式里做除法时因类型不一致抛异常导致 500。 */
  opacity: calc(var(--overlay-opacity, 18) / 100);
  background: linear-gradient(180deg, #000 0%, #000 100%);
  z-index: 1;
}
.hero::after {
  content: '';
  position: absolute; inset: 0;
  /* 底部渐隐，让 Hero 与下方内容自然衔接 */
  background: linear-gradient(180deg, transparent 70%, rgba(255,255,255,.05) 100%);

  z-index: 1;
}
.hero-content {
  position: relative;
  z-index: 2;
  padding: 120px 0 100px;
  width: 100%;
}
.hero-tag {
  display: inline-block;
  font-size: 13px;
  letter-spacing: 4px;
  font-weight: 500;
  color: rgba(255,255,255,.85);
  border: 1px solid rgba(255,255,255,.3);
  padding: 6px 18px;
  border-radius: 100px;
  margin-bottom: 32px;
  opacity: 0;
  transform: translateY(14px);
  animation: hero-fade-in .85s var(--ease-out) .1s both;
}
.hero h1 {
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: 1px;
  margin-bottom: 24px;
  text-shadow: 0 4px 24px rgba(0,0,0,.3);
  max-width: 800px;
  opacity: 0;
  transform: translateY(22px);
  animation: hero-fade-in .85s var(--ease-out) .22s both;
}
.hero-subtitle {
  font-size: clamp(15px, 1.5vw, 19px);
  line-height: 1.8;
  color: rgba(255,255,255,.92);
  margin-bottom: 40px;
  max-width: 640px;
  opacity: 0;
  transform: translateY(14px);
  animation: hero-fade-in .85s var(--ease-out) .36s both;
}
.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  opacity: 0;
  transform: translateY(14px);
  animation: hero-fade-in .85s var(--ease-out) .5s both;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .5px;
  transition: all var(--transition);
  cursor: pointer;
  border: 2px solid transparent;
  white-space: nowrap;
}
.btn-primary {
  background: var(--primary);
  color: var(--bg-white);
  border-color: var(--primary);
}
.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(var(--primary-rgb), .4);
}
.btn-outline {
  background: transparent;
  color: var(--bg-white);
  border-color: rgba(255,255,255,.6);
}
.btn-outline:hover {
  background: rgba(255,255,255,.12);
  border-color: var(--bg-white);
  transform: translateY(-2px);
}
.scroll-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  width: 32px; height: 52px;
  border: 2px solid rgba(255,255,255,.5);
  border-radius: 16px;
  display: flex; justify-content: center;
  padding-top: 8px;
  opacity: 0;
  animation: hero-fade-in .85s var(--ease-out) .9s both;
}
.scroll-hint span {
  display: block;
  width: 4px; height: 8px;
  background: rgba(255,255,255,.8);
  border-radius: 2px;
  animation: scroll-bounce 2.2s var(--ease-in-out) infinite;
}
@keyframes hero-fade-in {
  from { opacity: 0; }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes scroll-bounce {
  0%, 100% { transform: translateY(0); opacity: 1; }
  50% { transform: translateY(12px); opacity: .35; }
}

/* =====================================================
   Sections (共用样式)
   ===================================================== */
.section { padding: 100px 0; }
/* .alt-bg 已删除（2026-09-17 代码审计）：全仓库无引用，属遗留类。
   当初它是"给整段换浅灰底"的工具类，后来改成 .section.xxx 的显式配色，
   它就再没被用过。审计工具 `tools/code-audit.py` 会持续报告这类死选择器。 */

/* =====================================================
   首页板块背景节奏
   板块顺序：关于基金会 → 新闻动态 → 公益项目 → 党建工作 →（机构荣誉）
   相邻板块必须有明暗对比，否则会糊成一片。
   用 .section.xxx（0,2,0）压过单个 .alt-bg（0,1,0），老类名留着也不影响。
   ===================================================== */
.section.foundation { background: var(--bg-white); }
/* 明暗交替：相邻板块底色必须不同，否则两块糊成一片。
   ⚠️ 顺序 = 首页实际渲染顺序（foundation → news → programs → evaluation → party → honors）。
   新增板块时要**重新对齐整条节奏**，不能只给新板块随手加一条 ——
   2026-09-15 加「公益评估工作」时就因此把 programs / evaluation 排成了同色（都是白）。 */
.section.news-section { background: var(--bg-soft); }
.section.programs-section { background: var(--bg-white); }
.section.evaluation-section { background: var(--bg-soft); }
/* ⚠️ programs-grid 有一条「每第 3 张通栏」的节奏规则（为**6 张卡**的公益项目设计）。
   评估板块是固定 **4 张**卡，套用那条会变成：
        [1] [2]
        [  3  ]   ← 通栏
        [4] [ ]   ← 第 4 张孤零零占左列，看着像排版坏了
   这里把它覆盖回规整的 2×2、统一高度。 */
.section.evaluation-section .program-card:nth-child(3n) {
  grid-column: auto;
  height: 350px;
}
.section.party-section { background: var(--bg-white); }
.section.honors-section { background: var(--bg-soft); }
.section-eyebrow {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 4px;
  color: var(--primary);
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 12px;
}
.section-title {
  font-size: clamp(28px, 3vw, 38px);
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 0;
  line-height: 1.3;
}
.section-lead {
  font-size: 15px;
  line-height: 1.9;
  color: var(--text-muted);
  margin-top: 16px;
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 56px;
  gap: 24px;
  flex-wrap: wrap;
}
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--primary);
  font-weight: 600;
  font-size: 15px;
  transition: all var(--transition);
  position: relative;
}
.text-link::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 0; height: 1px;
  background: var(--primary);
  transition: width var(--transition);
}
.text-link:hover { gap: 10px; color: var(--primary-dark); }
.text-link:hover::after { width: 100%; }

/* =====================================================
   3. 基金会简介 + 大数字
   ===================================================== */
.foundation-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
.foundation-text .text-link { margin-top: 32px; }
.foundation-right { display: flex; flex-direction: column; gap: 24px; }
.foundation-image {
  width: 100%;
  height: 320px;
  border-radius: 12px;
  background: linear-gradient(135deg, #cfeadd, #e9f5ef);
  background-size: cover;
  background-position: center;
  display: flex; align-items: center; justify-content: center;
  position: relative;
  overflow: hidden;
}
.foundation-image.has-image { background-image: var(--bg-image, none); }

/* 机构实拍图轮换（1~3 张；只有 1 张时保持静态，指示点也不显示） */
.fb-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1s var(--ease-out);
}
.fb-slide.is-active { opacity: 1; }
.fb-dots {
  position: absolute;
  left: 0; right: 0; bottom: 16px;
  z-index: 2;
  display: flex;
  justify-content: center;
  gap: 8px;
}
.fb-dot {
  width: 7px; height: 7px;
  border-radius: 999px;
  background: rgba(255,255,255,.5);
  border: 0;
  padding: 0;
  transition: width .34s var(--ease-out), background .34s var(--ease-out);
}
.fb-dot.is-active { width: 22px; background: var(--bg-white); }
.image-placeholder {
  color: var(--primary);
  text-align: center;
  font-size: 14px;
  line-height: 1.8;
  padding: 24px;
  background: rgba(255,255,255,.7);
  border-radius: 8px;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  background: var(--bg-white);
  padding: 32px 24px;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}
.stat-item {
  text-align: center;
  padding: 8px 12px;
  border-right: 1px solid var(--border);
}
.stat-item:last-child { border-right: 0; }
.stat-num-wrap {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
  margin-bottom: 8px;
  color: var(--primary);
}
.stat-num {
  font-size: clamp(28px, 3vw, 38px);
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.stat-unit {
  font-size: 16px;
  font-weight: 600;
  color: var(--primary-dark);
}
.stat-label {
  font-size: 13px;
  color: var(--text-muted);
  letter-spacing: 1px;
}

/* =====================================================
   4. 新闻动态 3 卡
   ===================================================== */
.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}
/* 首页新闻卡片：与列表页统一为「图片铺满 + 文字压底」的大图卡 */
.news-card {
  position: relative;
  display: block;
  height: 320px;
  border-radius: 16px;
  overflow: hidden;
  background: var(--primary);
  transition: transform .5s cubic-bezier(.4,0,.2,1), box-shadow .5s;
}
.news-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}
.news-cover {
  position: absolute;
  inset: 0;
  /* 无封面时用主色渐变打底 —— 保证上面的白字始终可读 */
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  background-size: cover;
  background-position: center;
  display: flex; align-items: center; justify-content: center;
  transform: scale(1.005);
  transition: transform .65s cubic-bezier(.4,0,.2,1);
}
.news-card:hover .news-cover { transform: scale(1.06); }
/* 底部压暗，白字可读 */
.news-card::before {
  content: '';
  position: absolute; inset: 0;
  z-index: 1;
  background: linear-gradient(180deg,
    rgba(0,0,0,0) 32%, rgba(0,0,0,.34) 60%, rgba(0,0,0,.76) 100%);
}
.cover-placeholder { line-height: 1; opacity: .28; color: var(--bg-white); }
.news-body {
  position: absolute;
  left: 0; bottom: 0;
  width: 100%;
  z-index: 2;
  padding: 26px 28px;
  transition: transform .5s cubic-bezier(.4,0,.2,1);
}
.news-card:hover .news-body { transform: translateY(-4px); }
.news-date {
  font-size: 13px;
  color: rgba(255,255,255,.82);
  letter-spacing: 1px;
  display: block;
  margin-bottom: 10px;
}
.news-title {
  font-size: 19px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--bg-white);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.news-card:hover .news-title { color: var(--bg-white); }
.empty-tip {
  text-align: center;
  color: var(--text-muted);
  padding: 40px 0;
  font-size: 14px;
}

/* 搜索结果页：命中数摘要（结果列表复用 .post-card 样式） */
.search-summary {
  margin-top: 14px;
  text-align: center;
  font-size: 14px;
  color: var(--text-muted);
}
.search-summary strong { color: var(--primary); font-weight: 500; }

/* =====================================================
   5. 公益项目 6 领域
   ===================================================== */
/* 分类卡片网格：借鉴参考站的「拼图式」大图卡片
   2 列铺排，每第 3 张通栏当「横幅」，图片铺满、文字压在底部。
   数量不足时（如只有 2 个分类）自然退化为等分两列，不会留空洞。 */
.programs-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}
.program-card {
  position: relative;
  height: 350px;
  border-radius: 20px;
  overflow: hidden;
  isolation: isolate;
  display: block;
  color: var(--bg-white);
  cursor: pointer;
  background: var(--primary);
}
/* 每第 3 张通栏（横幅节奏） */
.program-card:nth-child(3n) {
  grid-column: 1 / -1;
  height: 300px;
}
.program-bg {
  position: absolute; inset: 0;
  background: var(--primary);
  background-size: cover;
  background-position: center;
  transform: scale(1.005);
  transition: transform .65s cubic-bezier(.4,0,.2,1);
  z-index: 0;
}
/* 悬浮缓慢放大（参考站 .hoverImg:hover .hover-img 的 transform: scale(1.05)，.65s） */
.program-card:hover .program-bg { transform: scale(1.06); }
/* 底部压暗，保证白字始终可读 */
.program-card::before {
  content: '';
  position: absolute; inset: 0;
  z-index: 1;
  background: linear-gradient(180deg,
    rgba(0,0,0,0) 32%, rgba(0,0,0,.32) 60%, rgba(0,0,0,.74) 100%);
}
/* 左上角图标（内联 SVG，按分类别名自动匹配，见 components.html 的 category-icon） */
.program-icon {
  position: absolute;
  left: 40px; top: 34px;
  z-index: 2;
  display: block;
  width: 42px; height: 42px;
  color: var(--bg-white);
  opacity: .92;
  transition: transform .5s cubic-bezier(.4,0,.2,1);
}
.program-icon svg { display: block; width: 100%; height: 100%; }
.program-card:hover .program-icon { transform: translateY(-4px); }

/* 右下角序号：与左上图标一起构成版式节奏 */
.program-index {
  position: absolute;
  right: 40px; bottom: 36px;
  z-index: 2;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 2px;
  opacity: .5;
}
.program-content {
  position: absolute;
  left: 0; bottom: 0;
  width: 100%;
  z-index: 2;
  padding: 36px 40px;
  transition: transform .5s cubic-bezier(.4,0,.2,1);
}
.program-card:hover .program-content { transform: translateY(-6px); }
.program-content h3 {
  font-size: clamp(24px, 2.4vw, 34px);
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 6px;
}
.program-content p {
  font-size: 15px;
  opacity: .88;
  line-height: 1.7;
  max-width: 48ch;
}
.program-arrow {
  position: absolute;
  top: 34px; right: 40px;
  z-index: 2;
  font-size: 24px;
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity .5s, transform .5s;
}
.program-card:hover .program-arrow {
  opacity: 1;
  transform: translateX(0);
}

/* =====================================================
   公益项目：图标标签行 + 大图联动
   参考 alibabafoundation.com 首页「公益项目」（.ipjt）：
     · 上面一排「图标 + 名称」的 tab
     · 下面一张大图 + 标题 + 描述 + 「了解更多」，随 tab 切换
   ===================================================== */
.proj-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
}
.proj-tab {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-white);
  color: var(--text-muted);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .5px;
  transition: color .3s var(--ease-out), border-color .3s var(--ease-out),
              background .3s var(--ease-out), box-shadow .3s var(--ease-out);
}
/* 复用分类图标；片段自带的绝对定位在 tab 里要复位 */
.proj-tab-icon { display: block; width: 22px; height: 22px; flex: 0 0 22px; }
.proj-tab-icon .program-icon {
  position: static;
  left: auto; top: auto;
  width: 22px; height: 22px;
  opacity: 1;
  /* ⚠️ 必须覆盖 `.program-icon` 的 `color:var(--bg-white)`。
     那条白色是给**深色卡片**（.program-card）配的；tab 行的底是白色，
     白图标 = **看不见**（用户反馈：「选中的有图标，旁边没选中的没有图标」——
     其实图标一直都在，只是白底白图）。
     inherit 让它跟随 tab 的文字色：未选中=灰、选中=白。 */
  color: inherit;
}
.proj-tab-icon svg { display: block; width: 100%; height: 100%; }
.proj-tab:hover { color: var(--primary); border-color: var(--primary); }
.proj-tab.is-active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--bg-white);
  box-shadow: 0 8px 20px rgba(var(--primary-rgb), .22);
}

/* 大图舞台：面板叠放，只显示 is-active（淡入 + 轻微缩放，稳而不飘） */
.proj-stage {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  aspect-ratio: 2.4 / 1;
  background: var(--primary-dark);
}
.proj-panel {
  position: absolute;
  inset: 0;
  display: block;
  color: var(--bg-white);
  opacity: 0;
  visibility: hidden;
  transform: scale(1.015);
  transition: opacity .6s var(--ease-out), transform .6s var(--ease-out), visibility .6s;
}
.proj-panel.is-active { opacity: 1; visibility: visible; transform: none; }
.proj-panel-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  background-size: cover;
  background-position: center;
  transform: scale(1.004);
  transition: transform .9s var(--ease-out);
}
.proj-panel.is-active:hover .proj-panel-bg { transform: scale(1.04); }
.proj-panel::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg,
    rgba(0,0,0,.62) 0%, rgba(0,0,0,.28) 55%, rgba(0,0,0,.05) 100%);
}
.proj-panel-body {
  position: absolute;
  left: 0; bottom: 0;
  z-index: 2;
  padding: 0 48px 42px;
  max-width: 620px;
}
.proj-panel-body h3 {
  font-size: clamp(26px, 3vw, 42px);
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 8px;
}
.proj-panel-body p {
  font-size: 16px;
  line-height: 1.7;
  color: rgba(255,255,255,.86);
  margin-bottom: 18px;
}
.proj-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  padding: 10px 22px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.55);
  transition: background .3s var(--ease-out), border-color .3s var(--ease-out);
}
.proj-panel:hover .proj-more { background: rgba(255,255,255,.16); border-color: var(--bg-white); }
.proj-more i { font-style: normal; transition: transform .3s var(--ease-out); }
.proj-panel:hover .proj-more i { transform: translateX(4px); }

/* =====================================================
   6. 党建栏目
   ===================================================== */
.party-section { background: linear-gradient(180deg, var(--bg-white) 0%, var(--bg-soft) 100%); }
.party-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
.party-card-large {
  position: relative;
  height: 320px;
  border-radius: 12px;
  overflow: hidden;
  display: block;
  color: var(--bg-white);
  isolation: isolate;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary-light));
}
.party-large-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 20% 80%, rgba(255,255,255,.1), transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255,255,255,.15), transparent 50%);
  transition: transform .6s ease;
}
.party-card-large:hover .party-large-bg { transform: scale(1.1); }
.party-large-content {
  position: relative;
  z-index: 2;
  height: 100%;
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}
.party-tag {
  display: inline-block;
  font-size: 13px;
  letter-spacing: 3px;
  padding: 6px 18px;
  border: 1px solid rgba(255,255,255,.4);
  border-radius: 100px;
  margin-bottom: 24px;
}
.party-large-content h3 {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: 2px;
}
.party-large-content p {
  font-size: 16px;
  opacity: .9;
  letter-spacing: 1px;
}

/* =====================================================
   7. 机构荣誉
   ===================================================== */
.honors-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
}
.honor-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 36px 20px;
  text-align: center;
  transition: all var(--transition);
}
.honor-card:hover {
  border-color: var(--primary);
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}
.honor-icon {
  width: 56px; height: 56px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fdf3dd, #fef3c7);
  color: #c9971c;
  font-size: 26px;
  display: flex; align-items: center; justify-content: center;
}
.honor-card h4 {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 8px;
}
.honor-card p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* =====================================================
   8. 页脚
   ===================================================== */
/* 页脚配色集中在 4 个变量上：
   想改回「深绿底 + 浅字」只需把这 4 个值换掉，不用动结构。 */
.site-footer {
  --footer-bg: #eef2f0;
  --footer-text: #144D34;
  --footer-muted: #6b7280;
  --footer-line: rgba(20, 83, 45, .12);
  background: var(--footer-bg);
  color: var(--footer-muted);
  padding: 72px 0 24px;
  /* ⚠️ 这里**不要**加 margin-top：
     上方板块自带 100px 下内边距，再叠 margin 只会在页脚前露出一条 body 的
     白底「空带」（线上截图里那条白band就是这么来的）。
     与上方板块的分界靠 1px 边框 + 略深的底色表达。 */
  border-top: 1px solid var(--footer-line);
}
.footer-top {
  /* ⚠️ 这里必须用 flex + wrap，**不要**写 `1.6fr repeat(auto-fit, …)`：
     CSS Grid 规定 auto-fit/auto-fill 不能与 fr 等弹性轨道出现在同一条
     grid-template-columns 里 —— 整条声明会被判为无效而**丢失**，
     页脚就会退化成单列、一路竖下来（线上真实事故）。
     flex-wrap 天然适配任意栏目数，增减栏目都不会换行错位。 */
  display: flex;
  flex-wrap: wrap;
  gap: 40px 32px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--footer-line);
}
.footer-brand { flex: 1.8 1 240px; }
.footer-col { flex: 1 1 100px; min-width: 0; }
.footer-brand h4 {
  color: var(--footer-text);
  font-size: 18px;
  margin-bottom: 14px;
  font-weight: 700;
  letter-spacing: .5px;
}
.footer-brand p {
  font-size: 13px;
  line-height: 1.9;
  color: var(--footer-muted);
  max-width: 22em;
}
/* 栏目列表：桌面端多列平铺，移动端折叠（见媒体查询）
   整行都是一个 button（标题 + 箭头），移动端点整行任意位置都能展开。 */
.footer-col-head { margin: 0 0 18px; }
.footer-col-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 0;
  background: none;
  border: 0;
  color: var(--footer-text);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 1px;
  text-align: left;
  cursor: default;               /* 桌面端它是标题，不是按钮 */
  transition: color var(--transition);
}
/* 标题下的短强调条（参考阿里页脚：标题 + 一道短色条，简洁且有品牌感） */
.footer-col-title {
  position: relative;
  display: inline-block;
  padding-bottom: 11px;
}
.footer-col-title::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 26px; height: 3px;
  border-radius: 2px;
  background: var(--primary);
}
.footer-col-chev { display: none; }        /* 桌面端不显示箭头 */
.footer-col ul li {
  margin-bottom: 10px;
}
.footer-col a {
  display: inline-block;
  color: var(--footer-muted);
  font-size: 13px;
  line-height: 1.7;
  transition: color var(--transition), transform var(--transition);
}
.footer-col a:hover { color: var(--primary); transform: translateX(4px); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 22px;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12px;
  color: var(--footer-muted);
}
.copyright { letter-spacing: .5px; }
.icp a {
  color: var(--footer-muted);
  margin: 0 8px;
  transition: color var(--transition);
}
.icp a:first-child { margin-left: 0; }
.icp a:hover { color: var(--primary); }
.icp .gongan { margin-left: 8px; }

/* 管理入口：低调，默认半透明，悬停才明显 */
.admin-entry {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-left: auto;
}
.admin-entry a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: rgba(31, 41, 55, .38);
  transition: color var(--transition), opacity var(--transition);
}
.admin-entry a:hover { color: var(--primary); }
.admin-entry svg { flex-shrink: 0; }

/* =====================================================
   回到顶部按钮
   ===================================================== */
.scroll-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--bg-white);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgba(var(--primary-rgb), .4);
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: all var(--transition);
  z-index: 50;
}
.scroll-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.scroll-top:hover {
  background: var(--primary-dark);
  transform: translateY(-4px);
}

/* =====================================================
   滚动渐入动画
   ===================================================== */
.fade-in {
  opacity: 0;
  /* 位移从 30px 收到 18px：位移越小越不容易看出掉帧，观感也更克制 */
  transform: translateY(18px);
  transition: opacity .6s var(--ease-out), transform .6s var(--ease-out);
  transition-delay: var(--delay, 0s);
  will-change: opacity, transform;   /* 提前建合成层，避免首帧抖动（动画结束后由 JS 撤掉） */
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* 尊重系统的「减弱动态效果」设置 */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    transition-delay: 0s !important;
  }
  .fade-in { opacity: 1; transform: none; }
}

/* =====================================================
   响应式
   ===================================================== */
@media (max-width: 1024px) {
  /* 平板：品牌整行独占，栏目自动折成多行（flex-wrap 自己会排） */
  .footer-top { gap: 36px 24px; }
  .footer-brand { flex: 1 1 100%; }
  .footer-col { flex: 1 1 130px; }
  .honors-grid { grid-template-columns: repeat(3, 1fr); }
}
/* 平板（769~1100px）：6 个栏目 + 长站名会挤到换行，这里收紧间距与字号 */
@media (max-width: 1100px) and (min-width: 769px) {
  .main-nav ul { gap: 22px; }
  .main-nav a.nav-link { font-size: 15px; }
  .logo { font-size: 17px; }
  /* 平板档位收紧品牌锁定，给导航+搜索留出宽度 */
  .logo img { width: 44px; height: 44px; }
  .brand-cn { font-size: 18px; }
}

/* =====================================================
   顶栏 / 导航抽屉：**平板也用抽屉**（2026-09-18 修）
   -----------------------------------------------------
   原来这里是 `@media (max-width: 768px)`。问题：769~1024px（平板）走**桌面横向导航**，
   而 7 个一级栏目在 800px 下排不下 —— CDP 实测 `.main-nav ul` 只有 **342px 宽**
   （品牌占掉其余），flex-row 只好 wrap 成多行，而顶栏是固定高度 →
   多行导航**向上溢出**（ul 的 top = **-144px**），客户在后台的平板预览里看到的就是
   「导航被切掉 / 标签挤成半截」（截图里的 动态 / 项目 / 估中心 / 工作 / 信息 / 我们）。

   修法：把顶栏与抽屉规则放宽到 **≤1024px**（平板也点汉堡），
   而**移动端专属的布局规则**（单列网格、全宽按钮、页脚手风琴、分区内边距…）
   用**嵌套媒体查询**限制在 ≤768px —— 这样平板仍是多列布局，只是导航换成抽屉。
   ⚠️ 嵌套 @media 是标准 CSS（无需预处理器），比"复制一份抽屉样式"干净得多。
   ===================================================== */
@media (max-width: 1024px) {
  .menu-toggle { display: flex; }

  /* ⚠️ 站名很长（「（内部测试）贵州省绿色气候基金会」）而 .logo 原本是
     `flex-shrink: 0`（不可收缩）→ flex 行被撑宽，把 .menu-toggle **挤出屏幕**：
     实测 390px 视口下按钮在 x=368~408，右侧 18px 被裁掉；
     320px 视口下位置完全不变（容器根本没在收缩）。
     修法：让 logo 可收缩 + 优雅截断，同时**保证按钮绝不收缩**。 */
  .nav-wrap { gap: 12px; }
  .logo { flex-shrink: 1; min-width: 0; font-size: 16px; letter-spacing: 0; }
  .logo span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .menu-toggle { flex: 0 0 auto; }

  /* 品牌锁定：移动端维持「单行」——两行文字在小屏会把顶栏撑高，且英文名挤不出空间。
     移动端顶部原本就还不错，这里只做等比缩小。 */
  .logo img { width: 38px; height: 38px; }
  .brand-cn { font-size: 16px; }
  .brand-en { display: none; }
  .search-toggle { width: 36px; height: 36px; }
  /* 搜索弹层在小屏改为**通栏贴在顶栏下方**：右对齐 300px 在 390px 视口会溢出 */
  .header-search-box {
    position: fixed;
    left: 16px;
    right: 16px;
    top: calc(var(--header-h) + 8px);
    width: auto;
  }

  /* ⚠️ 本段上面的 `.btn { width: 100% }`（本意：移动端按钮撑满）会**误伤横排表单里的按钮**：
     搜索页的 `.search-form` 是 row 方向 flex、`max-width:500px`，
     提交按钮被撑成 100%（=500px），又因 `.search-form .btn { flex-shrink:0 }` 无法收缩
     → 一行 500+207+12=719px 撑爆 500px 的容器，
     **整个页面被撑到 853px，平板（≤768）下搜索页出现横向滚动条**。
     实测：768px 视口 docScrollWidth=853。修法：横排时不撑满。 */
  .search-form .btn { width: auto; }

  /* 抽屉面板
     ⚠️ top 必须用 --header-h（96 / 滚动后 72），写死 72px 会在未滚动时
        被 96px 的导航盖住第一项。
     ⚠️ 必须可滚动：6 个一级 + 12 个二级的抽屉一定超过一屏。 */
  .main-nav {
    position: fixed;
    top: var(--header-h);
    left: 0; right: 0;
    max-height: calc(100dvh - var(--header-h));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    z-index: 98;
    background: var(--bg-white);
    box-shadow: 0 16px 32px rgba(0,0,0,.1);
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    transform: translateY(-10px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .28s var(--ease-out), transform .28s var(--ease-out),
                visibility .28s;
  }
  .main-nav.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
  .main-nav ul {
    flex-direction: column;
    gap: 0;
    padding: 4px 0 8px;
    align-items: stretch;
  }
  .main-nav li { width: 100%; }

  /* 一级栏目：大字号、分隔线、可点整行 */
  .main-nav a.nav-link {
    color: var(--text) !important;
    display: block;
    width: 100%;
    padding: 17px 64px 17px 24px;   /* 右侧留出展开箭头的空间 */
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    border-bottom: 1px solid var(--border);
  }
  .main-nav a.nav-link::after { display: none; }
  .main-nav a.nav-link.active { color: var(--primary) !important; }

  /* 展开箭头（手风琴） */
  .nav-sub-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    right: 0; top: 0;
    width: 60px; height: 56px;
    color: var(--text-muted);
    background: none;
    border: 0;
  }
  .nav-sub-toggle i {
    width: 8px; height: 8px;
    border-right: 1.8px solid currentColor;
    border-bottom: 1.8px solid currentColor;
    transform: rotate(45deg) translate(-1px, -1px);
    transition: transform .28s var(--ease-out);
  }
  .nav-sub-toggle[aria-expanded="true"] { color: var(--primary); }
  .nav-sub-toggle[aria-expanded="true"] i { transform: rotate(-135deg) translate(-1px, -1px); }

  /* 二级栏目：默认折叠，展开时淡入下滑。
     缩进 + 左侧小圆点，与一级项拉开层级。 */
  .main-nav .nav-sub {
    position: static;
    display: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    background: var(--bg-soft);
    color: var(--text);
    padding: 0;
    transition: none;
    border-bottom: 1px solid var(--border);
  }
  .main-nav .nav-sub.open {
    display: block;
    animation: sub-reveal .28s var(--ease-out) both;
  }
  .main-nav .nav-sub-inner { display: block; padding-left: 0; }
  .main-nav .nav-sub-links { display: block; padding: 6px 0; }
  .main-nav .nav-sub-links a {
    position: relative;
    display: block;
    width: 100%;
    padding: 11px 24px 11px 42px;
    font-size: 14.5px;
    font-weight: 400;
    color: var(--text-muted) !important;
  }
  .main-nav .nav-sub-links a::before {
    content: '';
    position: absolute;
    left: 26px; top: 50%;
    width: 4px; height: 4px;
    margin-top: -2px;
    border-radius: 50%;
    background: var(--primary);
    opacity: .45;
  }
  .main-nav .nav-sub-links a:active { color: var(--primary) !important; }

  /* ---------- 以下为**移动端专属布局**（平板不受影响）：嵌套回 ≤768px ---------- */
  @media (max-width: 768px) {
  /* 公益项目：标签行换行、舞台变矮、文字内边距收紧 */
  .proj-tabs { gap: 8px; margin-bottom: 20px; }
  .proj-tab { padding: 9px 16px; font-size: 13.5px; gap: 8px; flex: 0 1 auto; }
  .proj-tab-icon, .proj-tab-icon .program-icon { width: 18px; height: 18px; flex-basis: 18px; }
  .proj-stage { aspect-ratio: 16 / 11; border-radius: 16px; }
  .proj-panel-body { padding: 0 22px 24px; }
  .proj-panel-body h3 { font-size: 24px; }
  .proj-panel-body p { font-size: 14px; margin-bottom: 14px; }
  .proj-more { font-size: 13.5px; padding: 8px 18px; }

  /* 机构实拍图轮换：矮一点，避免在窄屏压住大数字 */
  .foundation-image { height: 220px; }
  .section { padding: 72px 0; }
  .foundation-grid { grid-template-columns: 1fr; gap: 48px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-item:nth-child(2) { border-right: 0; }
  .news-grid, .programs-grid { grid-template-columns: 1fr; }
  /* ===== 移动端页脚：栏目折叠成手风琴（参考阿里移动端页脚）=====
     桌面是「多列平铺」，窄屏平铺会变成一大片链接墙、很难扫读；
     改成一行一栏目、**整行可点**展开，扫读与点击都轻松很多。 */
  .site-footer { padding: 44px 0 20px; }
  .footer-top {
    display: block;
    padding-bottom: 6px;
    border-bottom: 0;
  }
  .footer-brand {
    text-align: center;
    padding-bottom: 26px;
  }
  .footer-brand p { max-width: none; }
  .footer-col {
    border-bottom: 1px solid var(--footer-line);
  }
  .footer-col:first-of-type { border-top: 1px solid var(--footer-line); }
  .footer-col-head { margin: 0; }
  /* 窄屏是手风琴行，标题下的强调条会显得杂 —— 去掉（与阿里移动端页脚一致） */
  .footer-col-title { padding-bottom: 0; }
  .footer-col-title::after { display: none; }
  /* 整行都是按钮：点标题或点箭头都一样能展开 */
  .footer-col-toggle {
    padding: 17px 0;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: .5px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  .footer-col-toggle:active { color: var(--primary); }
  .footer-col.open .footer-col-toggle { color: var(--primary); }
  .footer-col-chev {
    display: block;
    flex: 0 0 auto;
    width: 8px; height: 8px;
    border-right: 1.8px solid currentColor;
    border-bottom: 1.8px solid currentColor;
    transform: rotate(45deg) translate(-1px, -1px);
    transition: transform .28s var(--ease-out);
  }
  .footer-col-toggle[aria-expanded="true"] .footer-col-chev {
    transform: rotate(-135deg) translate(-1px, -1px);
  }
  .footer-col-list { display: none; padding-bottom: 8px; }
  .footer-col.open .footer-col-list {
    display: block;
    animation: footer-reveal .28s var(--ease-out) both;
  }
  .footer-col-list li { margin-bottom: 0; }
  .footer-col-list a {
    display: block;
    padding: 7px 0;
    font-size: 14.5px;
    transform: none;           /* 移动端不做 hover 位移，避免「跳一下」 */
  }
  .footer-bottom {
    flex-direction: column;
    align-items: center;
    text-align: center;
    line-height: 1.9;
    padding-top: 20px;
  }
  .section-head { flex-direction: column; align-items: flex-start; }
  .hero-actions { flex-direction: column; }
  .btn { width: 100%; justify-content: center; }
  .honors-grid { grid-template-columns: 1fr 1fr; }
  .party-large-content { padding: 32px 24px; }
  .party-large-content h3 { font-size: 24px; }
  .admin-entry { margin-left: 0; justify-content: center; }
  }   /* ← 嵌套的「移动端专属布局」块结束（平板不生效） */
}
@media (max-width: 480px) {
  /* ⚠️ .hero-tag 的 letter-spacing:4px 是为桌面留白设计的；
     英文副标（28 个字母）在 320px 下会溢出约 11px 被裁。这里收紧。 */
  .hero-tag { font-size: 11px; letter-spacing: 1px; padding: 5px 12px; }
  .stats-grid { grid-template-columns: 1fr; }
  .stat-item { border-right: 0; border-bottom: 1px solid var(--border); }
  .stat-item:last-child { border-bottom: 0; }
  .honors-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 32px; }
  .container { padding: 0 16px; }
  .breadcrumbs { font-size: 13.5px; }
  .breadcrumb-item + .breadcrumb-item::before { margin: 0 6px; }
}

/* =====================================================
   Article 页 / 列表页 / 404 / 面包屑（共用）
   ===================================================== */
.page-main {
  min-height: 60vh;
  padding: 120px 0 80px;
}
.article {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 24px;
}
.article-header { margin-bottom: 40px; }
/* 面包屑（语义化 ol/li；分隔符**只**由 CSS ::before 生成，模板中不写「/」） */
.breadcrumbs {
  margin-bottom: 24px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-muted);
}
.breadcrumb-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  list-style: none;
  margin: 0;
  padding: 0;
}
.breadcrumb-item {
  display: inline-flex;
  align-items: center;
  min-width: 0;
}
.breadcrumb-item + .breadcrumb-item::before {
  content: '/';
  margin: 0 10px;
  color: #cbd5e1;
  font-weight: 400;
  user-select: none;
}
.breadcrumb-item a {
  color: var(--primary);
  transition: color var(--transition);
}
.breadcrumb-item a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.breadcrumb-item > span {
  color: var(--text-muted);
  font-weight: 500;
}
/* 列表页 / 搜索页：面包屑在 .page-header（text-align:center）内水平居中 */
.page-header .breadcrumbs { margin-bottom: 20px; }
/* 「跳到主内容」：键盘/读屏用户不必每次 Tab 过 7 个一级栏目 + 二级条。
   ⚠️ 必须用 transform 隐藏、聚焦时露出 —— 用 display:none 会让它**根本 Tab 不到**，
      等于没做（a11y 里典型的"写了但无效"）。z-index 要高于固定顶栏(100)。 */
.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 200;
  padding: 10px 18px;
  border-radius: 8px;
  background: var(--primary);
  color: var(--bg-white);
  font-size: 14px;
  font-weight: 600;
  box-shadow: var(--shadow-md);
  transform: translateY(-180%);
  transition: transform .18s var(--ease-out);
}
.skip-link:focus { transform: none; outline: 2px solid var(--bg-white); outline-offset: -4px; }

/* 「返回上一页」（文章页 / 单页 / 列表页共用）。
   做成**轻量药丸按钮** —— 纯文字链接悬在正文上方显得单薄、点击热区也太小。
   图标用 currentColor 跟随文字色；悬停时整体左移 3px 暗示"往回走"。
   白底 + 细边框 + 极浅阴影：在白色与浅灰底（--bg-soft）上都立得住。 */
.article-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 18px;
  padding: 8px 16px 8px 12px;
  border: 1px solid var(--border);
  border-radius: 100px;
  background: var(--bg-white);
  color: var(--primary-dark);
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  box-shadow: var(--shadow-sm);
  transition: color var(--transition), border-color var(--transition),
              box-shadow var(--transition), transform var(--transition);
}
.article-back svg { flex: 0 0 auto; transition: transform var(--transition); }
.article-back:hover {
  color: var(--primary);
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  transform: translateX(-3px);
}
.article-back:hover svg { transform: translateX(-2px); }
.article-back:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
/* 列表页的 .page-header 是居中排版 → 按钮也居中，且与标题之间不留大空隙 */
.article-back-row { margin: 0 0 6px; }
.page-header .article-back { margin-top: 0; }
@media (max-width: 768px) {
  .article-back { font-size: 13px; padding: 7px 14px 7px 10px; }
}
.page-header .breadcrumb-list { justify-content: center; }
.article-title {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  line-height: 1.3;
  color: var(--primary-dark);
  margin-bottom: 16px;
}
.article-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 32px;
}
.article-meta time { color: var(--text-muted); }
/* 阅读数：与日期同为弱化文本；tabular-nums 让数字等宽，
   避免 9→10 位数变化时整行轻微抖动 */
.article-meta .article-visit {
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
.article-meta a {
  background: var(--bg-soft);
  color: var(--primary);
  padding: 2px 12px;
  border-radius: 100px;
  font-size: 12px;
  transition: all var(--transition);
}
.article-meta a:hover { background: var(--primary); color: var(--bg-white); }
.article-cover {
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: 12px;
  background-size: cover;
  background-position: center;
  margin-bottom: 40px;
  background-color: var(--bg-soft);
}
.article-content {
  font-size: 16px;
  line-height: 1.9;
  color: var(--text);
}
.article-content h1, .article-content h2, .article-content h3,
.article-content h4, .article-content h5, .article-content h6 {
  margin: 1.8em 0 .8em;
  font-weight: 700;
  color: var(--primary-dark);
  line-height: 1.4;
}
.article-content h1 { font-size: 32px; }
.article-content h2 { font-size: 26px; }
.article-content h3 { font-size: 22px; }
.article-content h4 { font-size: 18px; }
.article-content p { margin: 0 0 1em; }
.article-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 1em 0;
}
.article-content a { color: var(--primary); border-bottom: 1px solid currentColor; }
.article-content a:hover { color: var(--primary-dark); }
.article-content blockquote {
  border-left: 4px solid var(--primary);
  padding: 12px 20px;
  margin: 1.5em 0;
  background: var(--bg-soft);
  color: var(--text-muted);
  border-radius: 0 8px 8px 0;
}
.article-content pre {
  background: #1f2937;
  color: #f3f4f6;
  padding: 20px 24px;
  border-radius: 8px;
  overflow-x: auto;
  margin: 1.5em 0;
  font-size: 14px;
  line-height: 1.6;
}
.article-content code {
  background: var(--bg-soft);
  color: #c026d3;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
}
.article-content pre code { background: transparent; color: inherit; padding: 0; }
.article-content ul, .article-content ol { margin: 1em 0 1em 1.5em; }
.article-content ul { list-style: disc; }
.article-content ol { list-style: decimal; }
.article-content li { margin: .5em 0; }

.article-nav {
  margin-top: 60px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}
.article-nav h3 { font-size: 18px; margin-bottom: 16px; color: var(--primary-dark); }
.article-nav ul li { padding: 8px 0; border-bottom: 1px dashed var(--border); }
.article-nav ul a { color: var(--text); transition: color var(--transition); }
.article-nav ul a:hover { color: var(--primary); }

/* 列表页（archives / category / tag / search 通用） */
.page-header {
  text-align: center;
  /* ⚠️ 这里下方留白被客户反馈过两次：
     最初是 padding-bottom 56 + margin-bottom 56 = **112px**，第一次收到 64px，
     客户看后仍觉得"隔得太开"（列表页描述与「子栏目」条之间）→ 再收到 **28px**
     （padding-bottom 16 + margin-bottom 12）。
     改这些值前**先用 CDP 量**（`shot.py --probe`，取 `nav.top - lastElementChild.bottom`），
     别凭截图估。 */
  padding: 64px 0 16px;
  margin-bottom: 12px;
  border-bottom: 0;
}
.page-title {
  font-size: clamp(30px, 4.2vw, 46px);
  font-weight: 700;
  color: var(--primary-dark);
  letter-spacing: 1px;
  margin-bottom: 12px;
}
.page-desc {
  color: var(--text-muted);
  font-size: 17px;
  line-height: 1.7;
  max-width: 720px;
  margin: 0 auto;
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
  margin-top: 60px;
  padding: 24px 0;
}
.page-link {
  padding: 8px 20px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  color: var(--text);
  transition: all var(--transition);
}
.page-link:hover { background: var(--primary); border-color: var(--primary); color: var(--bg-white); }
.page-info { color: var(--text-muted); font-size: 14px; }

/* 404 页 */
.error-page {
  min-height: 60vh;
  display: flex;
  align-items: center;
  padding: 120px 0 80px;
}
.error-content {
  text-align: center;
  max-width: 500px;
  margin: 0 auto;
  padding: 0 24px;
}
.error-code {
  font-size: 120px;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
  letter-spacing: -4px;
  margin-bottom: 24px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.error-content h1 { font-size: 32px; color: var(--primary-dark); margin-bottom: 16px; }
.error-content p { color: var(--text-muted); margin-bottom: 32px; line-height: 1.8; }

/* 搜索表单 */
.search-form {
  display: flex;
  gap: 12px;
  max-width: 500px;
  margin: 32px auto 0;
}
.search-form input {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 15px;
  font-family: inherit;
  transition: border-color var(--transition);
}
.search-form input:focus {
  outline: none;
  border-color: var(--primary);
}
.search-form .btn { flex-shrink: 0; }

@media (max-width: 600px) {
  .search-form { flex-direction: column; }
  /* 竖排后按钮独占一行，这时撑满才好看，也不会再溢出 */
  .search-form .btn { width: 100%; }
  .article-content h1 { font-size: 26px; }
  .article-content h2 { font-size: 22px; }
  .pagination { flex-direction: column; gap: 12px; }
}

/* =====================================================
   归档页（/archives）：年 → 月 → 文章 的时间线
   ===================================================== */
.archive-list { max-width: 860px; }
.archive-year { margin-bottom: 52px; }
.archive-year:last-child { margin-bottom: 0; }
.archive-year-num {
  font-size: 40px;
  font-weight: 700;
  line-height: 1;
  color: var(--primary-dark);
  margin-bottom: 8px;
  letter-spacing: 1px;
}
/* 年份下面一道细线，把整年的内容框住 */
.archive-year-num::after {
  content: '';
  display: block;
  width: 44px; height: 3px;
  border-radius: 2px;
  background: var(--primary);
  margin-top: 14px;
}
.archive-month { margin-top: 26px; }
.archive-month-num {
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 12px;
}
.archive-posts { list-style: none; margin: 0; padding: 0; }
.archive-posts li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 0;
  border-bottom: 1px dashed var(--border);
}
.archive-posts li:last-child { border-bottom: 0; }
.archive-posts a {
  color: var(--text);
  font-size: 15.5px;
  line-height: 1.6;
  transition: color var(--transition);
}
.archive-posts a:hover { color: var(--primary); }
.archive-posts time {
  flex: 0 0 auto;
  font-size: 13px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

/* =====================================================
   错误页（error.html）补充样式
   ===================================================== */
.error-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin: 26px 0 22px;
}
.error-search {
  display: flex;
  gap: 10px;
  max-width: 420px;
  margin: 0 auto;
}
.error-search input {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  padding: 11px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 15px;
  color: var(--text);
  background: var(--bg-white);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.error-search input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), .12);
}
.error-search .btn { flex: 0 0 auto; }

/* 视觉隐藏但对屏幕阅读器可见（表单标签用） */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 768px) {
  .archive-year-num { font-size: 32px; }
  .archive-posts a { font-size: 15px; }
  .error-search { flex-direction: column; width: 100%; max-width: 100%; }
  .error-search .btn { width: 100%; }
}


/* =========================================================
   文章卡片网格（列表页统一组件 · v2 新增）
   供 category / tag / archives / search 复用
   ========================================================= */
.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 28px;
  max-width: 1100px;
  margin: 0 auto;
}
.post-card {
  position: relative;
  background: var(--bg-white);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  transition: transform .5s cubic-bezier(.4,0,.2,1), box-shadow .5s;
}
.post-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}
/* ---- 有封面：图片铺满整卡，文字压在图片底部（参考站的大图卡片） ---- */
.post-card.has-cover { height: 340px; }
.post-card.has-cover .post-card-cover {
  position: absolute; inset: 0;
  aspect-ratio: auto;
  transform: scale(1.005);
  transition: transform .65s cubic-bezier(.4,0,.2,1);
}
.post-card.has-cover:hover .post-card-cover { transform: scale(1.06); }
.post-card.has-cover::before {
  content: '';
  position: absolute; inset: 0;
  z-index: 1;
  background: linear-gradient(180deg,
    rgba(0,0,0,0) 28%, rgba(0,0,0,.34) 58%, rgba(0,0,0,.78) 100%);
}
.post-card.has-cover .post-card-body {
  position: absolute;
  left: 0; bottom: 0;
  width: 100%;
  z-index: 2;
  padding: 26px 30px;
}
.post-card.has-cover .post-card-meta { color: rgba(255,255,255,.82); }
.post-card.has-cover .post-card-cat { background: rgba(255,255,255,.2); color: var(--bg-white); }
.post-card.has-cover .post-card-title,
.post-card.has-cover:hover .post-card-title { color: var(--bg-white); }
.post-card.has-cover .post-card-excerpt { color: rgba(255,255,255,.84); }
.post-card.has-cover .post-card-more { color: var(--bg-white); }
.post-card-link { display: block; height: 100%; }

.post-card-cover {
  position: relative;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #eef4f1, #e3ece8);
  background-size: cover;
  background-position: center;
  display: flex; align-items: center; justify-content: center;
}
.post-card-cover { overflow: hidden; }        /* 配合 <img> 的圆角裁切 */
.post-card-cover img {
  display: block;
  width: 100%; height: 100%;
  object-fit: cover;                          /* 与 background-size: cover 等效 */
  transition: transform .6s var(--ease-out);
}
.post-card:hover .post-card-cover img { transform: scale(1.04); }
.post-card-cover .cover-placeholder { font-size: 34px; opacity: .35; }

.post-card-body { padding: 20px 22px 24px; }
.post-card-meta {
  display: flex; align-items: center; gap: 12px;
  font-size: 13px; color: var(--text-muted);
  margin-bottom: 10px;
}
.post-card-cat {
  padding: 2px 10px; border-radius: 999px;
  background: rgba(var(--primary-rgb), .08);
  color: var(--primary); font-weight: 500;
}
.post-card-title {
  font-size: 17px; font-weight: 600; line-height: 1.5;
  color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color var(--transition);
}
.post-card:hover .post-card-title { color: var(--primary); }
.post-card-excerpt {
  margin-top: 10px;
  font-size: 14px; color: var(--text-muted); line-height: 1.7;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-card-more {
  display: inline-block; margin-top: 14px;
  font-size: 13px; color: var(--primary); font-weight: 500;
  opacity: 0; transform: translateX(-6px);
  transition: all var(--transition);
}
.post-card:hover .post-card-more { opacity: 1; transform: translateX(0); }

/* 子分类导航 */
.subcategory-nav {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  max-width: 1100px; margin: 0 auto 32px;
  padding: 16px 20px;
  background: var(--bg-soft);
  border-radius: 12px;
}
.subcategory-label { font-size: 14px; color: var(--text-muted); }
.subcategory-nav a {
  padding: 6px 16px; border-radius: 999px;
  background: var(--bg-white); border: 1px solid var(--border);
  font-size: 14px; transition: all var(--transition);
}
.subcategory-nav a:hover {
  background: var(--primary); color: var(--bg-white); border-color: var(--primary);
}

@media (max-width: 768px) {
  .post-grid { grid-template-columns: 1fr; gap: 20px; }
}

/* =====================================================
   移动端加固（2026-09-17）
   -----------------------------------------------------
   起因：用 CDP 在 390px 视口下**量真实尺寸**（而不是看截图猜），发现三类问题：
     ① 触控目标低于 44×44 这一通用可达性下限：
        汉堡菜单 40×32 · 搜索图标 36×36 · 「查看全部 →」链接 79×24 · 项目 tab 116×42
     ② 顶栏搜索输入框 14px < 16px → **iOS 聚焦时会自动放大整页**（手感像"抽一下"）
     ③ 品牌名被「内部测试」徽章挤到截断（390px 下显示成"贵州省绿色气候…"）
   原则：**只加触控热区与必要字号，视觉尺寸尽量不变** ——
        热区用 padding/min-height 撑，不用 transform: scale（那会把图标一起放大）。
   ===================================================== */
@media (max-width: 768px) {
  /* ① 关键控件热区 ≥ 44px（最要紧的两个：汉堡与搜索） */
  .menu-toggle {
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
  }
  .search-toggle { width: 44px; height: 44px; }

  /* ② 搜索框：输入框 16px 防 iOS 聚焦缩放；提交按钮同步放大热区 */
  .header-search-box input { font-size: 16px; height: 40px; }
  .header-search-box button[type="submit"] { width: 40px; height: 40px; }

  /* 品牌整块（是链接）加高到 44 —— logo 只有 38px，偏薄 */
  .logo { min-height: 44px; }

  /* 文字型链接（"查看全部 →""了解更多 →"）：纵向热区撑到 44，视觉几乎不变 */
  .text-link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding-block: 10px;
  }
  /* 项目 tab 与子分类胶囊：同样抬到 44 */
  .proj-tab { min-height: 44px; }
  .subcategory-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding-block: 10px;
  }
  /* 跳到主内容：只在聚焦时出现，顺手对齐热区 */
  .skip-link { display: inline-flex; align-items: center; min-height: 44px; }

  /* 页脚链接：实测只有 16px 高 —— 连 WCAG 2.5.8 的 24px 下限都不到。
     给 32px（够点，又不会把页脚撑很长）。 */
  .site-footer a {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
  }
}

@media (max-width: 480px) {
  /* ③ 徽章与站名各收一点，让 10 字站名完整显示。
     ⚠️ 徽章**不删**：它是备案期标识（用户有意加的），只是收紧尺寸；
        站名在 <title> 里也仍带完整前缀，标识没有丢失。 */
  .brand-badge { font-size: 10px; padding: 1px 4px; margin-right: 5px; }
  .brand-cn { font-size: 15px; letter-spacing: 0; }

  /* 头部**腾空间**而不是继续缩字号 —— 实测只收徽章仍会被截成
     「贵州省绿色气候基…」（10 字站名差一点）。这里把留白与图标让一点出来：
     容器左右各让 6px + 间距让 4px + 徽标让 4px ≈ 20px，刚好放下完整的站名。
     ⚠️ 判「有没有被截断」要看 scrollWidth > clientWidth，
        不要看 getBoundingClientRect().width（那是**被约束后**的宽度，永远"看起来够"）。 */
  .site-header .container.nav-wrap { padding-inline: 14px; gap: 8px; }
  .site-header .logo img { width: 34px; height: 34px; }
}
