/* Homepage header and footer styles, scoped to the homepage-style subpages. */
        body.foundation-page .topbar { height:auto; background: #b8332a; color: rgba(255,255,255,.85); font-family:"Microsoft YaHei","PingFang SC",sans-serif; font-size: 13px; letter-spacing:normal; }
        body.foundation-page .topbar-inner { max-width: 1200px; margin: 0 auto; padding: 0 24px; height: 36px; display: flex; align-items: center; justify-content: space-between; }
        body.foundation-page .topbar .slogan { letter-spacing: 2px; }
        body.foundation-page .topbar-right { display: flex; align-items: center; gap: 20px; }
        body.foundation-page .topbar b { color: #fff; font-weight: 600; margin-left: 4px; }
        body.foundation-page .topbar a { color: rgba(255,255,255,.85); text-decoration: none; }
        body.foundation-page .topbar a:hover { color: #fff; }
        body.foundation-page .topbar .lang span { margin: 0 8px; opacity: .45; }

        body.foundation-page .header { position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,.96); backdrop-filter: blur(10px); border-bottom: 1px solid #f0f0f0; }
        body.foundation-page .header-inner { max-width: 1200px; margin: 0 auto; padding: 0 24px; height: 76px; display: flex; align-items: center; gap: 40px; }
        body.foundation-page .brand { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
        body.foundation-page .brand .logo { height: 46px; flex-shrink: 0; }
        body.foundation-page .brand .logo img { height: 100%; width: auto; display: block; }
        body.foundation-page .brand .name { font-size: 20px; font-weight: 700; letter-spacing: 2px; color: #b8332a; }
        body.foundation-page .brand .en { font-size: 10px; color: #bbb; letter-spacing: 1px; margin-top: 3px; }
        body.foundation-page .nav { display: flex; align-items: center; gap: 30px; margin-left: auto; }
        body.foundation-page .nav a { font-size: 15px; color: #444; text-decoration: none; letter-spacing: 1px; padding: 6px 0; position: relative; white-space: nowrap; transition: color .2s; }
        body.foundation-page .nav a:hover { color: #b8332a; }
        body.foundation-page .nav a.active { color: #b8332a; font-weight: 600; }
        body.foundation-page .nav a.active::after { content: ""; position: absolute; left: 50%; bottom: -6px; transform: translateX(-50%); width: 24px; height: 2px; background: #b8332a; }
        body.foundation-page .donate { display: inline-flex; align-items: center; justify-content: center; width: 148px; height: 56px; border-radius: 30px; overflow: hidden; flex-shrink: 0; transition: opacity .2s; }
        body.foundation-page .donate img { width: 100%; height: 100%; object-fit: cover; display: block; }
        /* ===== 友情链接（页脚内） ===== */
        body.foundation-page .footer-flinks-inner { position: relative; z-index: 1; max-width: 1200px; margin: 0 auto; padding: 18px 24px; display: flex; align-items: center; flex-wrap: wrap; gap: 8px 26px; font-size: 12px; letter-spacing: 1px; color: #aaa; border-bottom: 1px solid #f0f0f0; }
        body.foundation-page .footer-flinks-inner a { color: #999; text-decoration: none; transition: color .2s; }
        body.foundation-page .footer-flinks-inner a:hover { color: #b8332a; }

        /* ===== 底部导航 ===== */
        body.foundation-page .footer { position: relative; background: #fff; border-top: 3px solid #b8332a; color: #999; }
        body.foundation-page .footer-main { position: relative; z-index: 1; max-width: 1200px; margin: 0 auto; padding: 56px 24px 48px; display: flex; gap: 64px; }
        body.foundation-page .footer-brand { flex-shrink: 0; }
        body.foundation-page .footer-logo { height: 56px; }
        body.foundation-page .footer-logo img { height: 100%; width: auto; display: block; }
        body.foundation-page .footer-name { margin-top: 16px; font-size: 18px; font-weight: 700; letter-spacing: 3px; color: #1a1a1a; }
        body.foundation-page .footer-en { font-size: 10px; color: #bbb; letter-spacing: 1px; margin-top: 5px; }
        body.foundation-page .footer-slogan { margin-top: 18px; font-size: 12px; letter-spacing: 2px; color: #999; }
        body.foundation-page .footer-cols { flex: 1; display: grid; grid-template-columns: repeat(7, 1fr); gap: 28px 16px; }
        body.foundation-page .fcol h5 { font-size: 14px; font-weight: 600; letter-spacing: 2px; color: #1a1a1a; margin-bottom: 6px; padding-bottom: 10px; position: relative; }
        body.foundation-page .fcol h5::after { content: ""; position: absolute; left: 0; bottom: 0; width: 18px; height: 2px; background: #b8332a; opacity: .55; }
        body.foundation-page .fcol a { display: block; font-size: 12.5px; color: #999; text-decoration: none; letter-spacing: 1px; padding: 5px 0; transition: color .2s; }
        body.foundation-page .fcol a:hover { color: #b8332a; }

        body.foundation-page .footer-contact { position: relative; z-index: 1; border-top: 1px solid #f0f0f0; }
        body.foundation-page .footer-contact-inner { max-width: 1200px; margin: 0 auto; padding: 20px 24px; display: flex; align-items: center; justify-content: space-between; gap: 14px; font-size: 13px; letter-spacing: 1px; color: #777; }
        body.foundation-page .footer-contact-inner .sep { opacity: .5; color: #ddd; }
        body.foundation-page .footer-qr { display: flex; gap: 18px; }
        body.foundation-page .fqr { text-align: center; }
        body.foundation-page .fqr .box { width: 64px; height: 64px; background: #f5f4f0; border: 1px solid #e8e6e1; overflow: hidden; }
        body.foundation-page .fqr .box img { width: 100%; height: 100%; object-fit: cover; display: block; }
        body.foundation-page .fqr span { display: block; font-size: 11px; color: #aaa; margin-top: 7px; letter-spacing: 2px; }

        /* ===== 关注我们（社交图标，位于二维码下方） ===== */
        body.foundation-page .footer-right { margin-left: auto; display: flex; flex-direction: column; align-items: center; gap: 16px; }
        body.foundation-page .footer-social-icons { display: flex; gap: 14px; }
        body.foundation-page .footer-social-icons a { width: 36px; height: 36px; border: 1px solid rgba(184,51,42,.4); border-radius: 50%; display: flex; align-items: center; justify-content: center; transition: background .2s, border-color .2s; }
        body.foundation-page .footer-social-icons a svg { width: 18px; height: 18px; fill: #b8332a; transition: fill .2s; }
        body.foundation-page .footer-social-icons a:hover { background: #b8332a; border-color: #b8332a; }
        body.foundation-page .footer-social-icons a:hover svg { fill: #fff; }

        body.foundation-page .footer-bottom { position: relative; z-index: 1; background: #fafaf8; border-top: 1px solid #f0f0f0; }
        body.foundation-page .footer-bottom-inner { max-width: 1200px; margin: 0 auto; padding: 15px 24px; text-align: center; font-size: 12px; letter-spacing: 1px; color: #bbb; }

        @media (max-width: 1024px) {
            body.foundation-page .footer-cols { grid-template-columns: repeat(4, 1fr); }
        }
        @media (max-width: 768px) {
            body.foundation-page .footer-main { flex-direction: column; gap: 36px; }
            body.foundation-page .footer-cols { grid-template-columns: repeat(3, 1fr); }
            body.foundation-page .footer-contact-inner { flex-direction: column; gap: 16px; }
            body.foundation-page .footer-right { margin: 0 auto; }
        }
        /* 黄帝文化下拉二级导航 */
        body.foundation-page .nav-dropdown { position:relative; display:flex; align-items:center; }
        body.foundation-page .nav-dropdown > a::after { content:"⌄"; display:inline-block; margin-left:5px; font-size:11px; transform:translateY(-1px); transition:transform .2s; }
        body.foundation-page .nav-dropdown:hover > a::after,
body.foundation-page .nav-dropdown:focus-within > a::after { transform:translateY(1px) rotate(180deg); }
        body.foundation-page .nav-dropdown-menu { position:absolute; top:calc(100% + 18px); left:50%; z-index:120; width:150px; padding:8px 0; border:1px solid #eee7df; background:rgba(255,255,255,.98); box-shadow:0 10px 26px rgba(65,45,29,.12); opacity:0; visibility:hidden; transform:translate(-50%,-7px); transition:opacity .2s,transform .2s,visibility .2s; }
        body.foundation-page .nav-dropdown-menu::before { content:""; position:absolute; top:-8px; right:0; left:0; height:8px; }
        body.foundation-page .nav-dropdown:hover .nav-dropdown-menu,
body.foundation-page .nav-dropdown:focus-within .nav-dropdown-menu { opacity:1; visibility:visible; transform:translate(-50%,0); }
        body.foundation-page .nav .nav-dropdown-menu a { display:block; padding:8px 16px; color:#706a64; font-size:12px; font-weight:400; line-height:1.35; letter-spacing:.5px; white-space:normal; }
        body.foundation-page .nav .nav-dropdown-menu a::after { display:none; }
        body.foundation-page .nav .nav-dropdown-menu a:hover { color:#b8332a; background:#faf6f1; }
/* 全站共用：品牌、导航、捐赠按钮始终位于同一排。 */
body.foundation-page .header .header-inner {
  width: 100%;
  max-width: 1600px;
  height: auto;
  min-height: 76px;
  margin: 0 auto;
  padding: 8px 24px;
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 22px;
}

body.foundation-page .header .brand {
  min-width: 0;
  flex: 0 0 auto;
  margin: 0;
}

body.foundation-page .header .nav {
  min-width: 0;
  flex: 1 1 auto;
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: nowrap;
  gap: clamp(12px, 1.2vw, 26px);
  overflow: visible;
}

body.foundation-page .header .nav::-webkit-scrollbar {
  display: none;
}

.header .nav > a,
body.foundation-page .header .nav-dropdown {
  flex: 0 0 auto;
}

body.foundation-page .header .nav a {
  white-space: nowrap;
}

body.foundation-page .header .donate {
  display: flex;
  width: 148px;
  height: 48px;
  flex: 0 0 148px;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 26px;
}

body.foundation-page .header .donate img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: fill;
}

@media (max-width: 1450px) {
  body.foundation-page .header .header-inner {
    gap: 14px;
  }

  body.foundation-page .header .nav {
    gap: 15px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  body.foundation-page .header .nav a {
    font-size: 14px;
    letter-spacing: 0;
  }

  .header .brand-name,
  body.foundation-page .header .brand .name {
    font-size: 18px;
    letter-spacing: 1px;
  }

  .header .brand-en,
  body.foundation-page .header .brand .en {
    max-width: 340px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.foundation-page .header .donate {
    width: 124px;
    height: 43px;
    flex-basis: 124px;
  }

  /* 窄屏导航横滑时，避免下拉菜单被滚动容器裁切成残片。 */
  body.foundation-page .header .nav-dropdown-menu {
    display: none;
  }
}

@media (max-width: 1000px) {
  body.foundation-page .header .header-inner {
    min-height: 65px;
    gap: 12px;
    padding: 7px 16px;
  }

  body.foundation-page .header .brand {
    gap: 9px;
  }

  .header .logo,
  body.foundation-page .header .brand .logo {
    height: 39px;
  }

  .header .brand-name,
  body.foundation-page .header .brand .name {
    font-size: 16px;
  }

  .header .brand-en,
  body.foundation-page .header .brand .en {
    display: none;
  }

  body.foundation-page .header .nav {
    order: 0;
    width: auto;
    margin-left: 0;
    justify-content: flex-start;
    flex-wrap: nowrap;
    gap: 18px;
  }

  body.foundation-page .header .nav a {
    font-size: 13px;
  }

  body.foundation-page .header .donate {
    width: 110px;
    height: 40px;
    flex-basis: 110px;
  }

}

@media (max-width: 700px) {
  body.foundation-page .topbar .slogan {
    display: none;
  }

  body.foundation-page .topbar-inner {
    justify-content: center;
  }

  body.foundation-page .header .header-inner {
    min-height: 56px;
    gap: 9px;
    padding: 7px 12px;
  }

  .header .logo,
  body.foundation-page .header .brand .logo {
    height: 35px;
  }

  .header .brand-name,
  body.foundation-page .header .brand .name {
    max-width: 132px;
    overflow: hidden;
    font-size: 13px;
    letter-spacing: 0;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.foundation-page .header .nav {
    gap: 16px;
    padding: 4px 0;
  }

  body.foundation-page .header .nav a {
    font-size: 12px;
  }

  body.foundation-page .header .donate {
    width: 88px;
    height: 34px;
    flex-basis: 88px;
  }
}

@media (max-width: 540px) {
  .header .brand-name,
  body.foundation-page .header .brand .name {
    display: none;
  }

  body.foundation-page .header .brand {
    gap: 0;
  }
}

@media (max-width: 420px) {
  body.foundation-page .topbar-right > span:first-child {
    display: none;
  }

  body.foundation-page .header .header-inner {
    gap: 8px;
    padding-right: 9px;
    padding-left: 9px;
  }

  .header .logo,
  body.foundation-page .header .brand .logo {
    height: 32px;
  }

  body.foundation-page .header .donate {
    width: 77px;
    height: 31px;
    flex-basis: 77px;
  }
}

/* The topic stylesheets have their own .brand/.header-inner rules; reset those values in the shared chrome. */
body.foundation-page .header .brand { width:auto; min-width:0; }
body.foundation-page .header .brand .logo img { width:auto; max-width:none; height:100%; object-fit:contain; }
body.foundation-page .header .brand .name { font-family:Georgia,"Songti SC","STSong",SimSun,serif; }
body.foundation-page .footer { font-family:"Microsoft YaHei","PingFang SC",sans-serif; }
body.foundation-page .footer h5 { margin-top:0; }
body.foundation-page .footer .footer-slogan { line-height:1.7; }
body.foundation-page .foundation-note { max-width:1200px; margin:18px auto; padding:0 24px; color:#9b8c7d; font-size:12px; }
body.foundation-page .nav-dropdown:focus-within .nav-dropdown-menu { visibility:visible; }
