/* ==========================================================================
   刘行基金会门户网站样式（政务机构风 · gov-admin-ui）
   子模式：1c 机构品牌色（深绿 #005826）
   规范：1200px 定宽容器 / 微软雅黑→宋体 / 圆角≤6px / 无暗色模式 / 高密度列表版式
   ========================================================================== */

:root {
  --green: #005826;
  --green-dark: #00471e;
  --green-light: #e8f3ec;
  --gold: #F5D389;
  --link: #337ab7;
  --link-hover: #0056b3;
  --ink: #333333;
  --ink-2: #666666;
  --ink-3: #999999;
  --line: #e5e5e5;
  --line-2: #dddddd;
  --bg-alt: #f5f5f5;
  --red: #bf0614;
  --ok-green: #5fb878;
  --ok-bg: #dff0d8;
  --ok-ink: #3c763d;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Microsoft YaHei", "微软雅黑", "PingFang SC", "SimSun", "宋体", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink);
  background: #ffffff;
}

a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); text-decoration: underline; }

img { display: block; max-width: 100%; }

ul, ol, dl, dd, figure, p, h1, h2, h3, h4 { margin: 0; }
ul, ol { padding: 0; list-style: none; }
h1, h2, h3, h4 { font-weight: bold; color: var(--ink); }

button { font: inherit; color: inherit; background: none; border: none; padding: 0; cursor: pointer; }

.icon { width: 1em; height: 1em; fill: currentColor; }

.container { width: 1200px; max-width: 100%; margin: 0 auto; padding: 0 10px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  clip: rect(0 0 0 0); overflow: hidden; white-space: nowrap;
}

.justify { text-align: justify; }

:focus-visible { outline: 2px solid var(--green); outline-offset: 1px; }

/* ---------- Z1 顶部工具条 ---------- */
.topbar { background: var(--bg-alt); border-bottom: 1px solid var(--line); font-size: 12px; color: var(--ink-2); }

.topbar-in { display: flex; justify-content: space-between; align-items: center; height: 32px; }

.topbar a, .topbar-right a { color: var(--ink-2); }
.topbar a:hover { color: var(--link-hover); }
.topbar span { color: #ccc; margin: 0 2px; }

.topbar-links a { margin: 0 2px; }

.topbar-right { display: flex; align-items: center; gap: 4px; }
.topbar-right > a { color: var(--link); }

/* ---------- Z2 页眉 ---------- */
.masthead { background: #ffffff; border-bottom: 3px solid var(--green); }

.masthead-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 22px;
  padding-bottom: 18px;
  gap: 24px;
}

.site-id { display: flex; align-items: center; gap: 14px; color: var(--ink); }
.site-id:hover { text-decoration: none; }

.crest { width: 62px; height: 62px; }

.site-name {
  font-family: "方正小标宋简体", "SimSun", "宋体", "Songti SC", serif;
  font-size: 34px;
  font-weight: bold;
  letter-spacing: 6px;
  color: var(--ink);
}

.site-sub {
  font-size: 15px;
  color: var(--green);
  letter-spacing: 3px;
  align-self: flex-end;
  padding-bottom: 7px;
  border-bottom: 2px solid var(--gold);
  margin-left: -4px;
}

.site-search { text-align: right; }

.search-box { display: flex; }

.search-box input {
  width: 300px;
  height: 36px;
  border: 2px solid var(--green);
  border-right: none;
  border-radius: 3px 0 0 3px;
  padding: 0 10px;
  font: inherit;
  font-size: 13px;
  color: var(--ink);
}

.search-box input::placeholder { color: var(--ink-3); }

.search-box button {
  width: 78px;
  height: 36px;
  background: var(--green);
  color: #fff;
  font-size: 15px;
  border-radius: 0 3px 3px 0;
}

.search-box button:hover { background: var(--green-dark); }

.hot-words { font-size: 12px; color: var(--ink-3); margin-top: 6px; }
.hot-words a { color: var(--ink-2); margin-right: 4px; }

/* ---------- Z3 主导航 ---------- */
.mainnav { background: var(--green); }

.mainnav-list { display: flex; }

.mainnav-list a {
  display: block;
  padding: 0 26px;
  line-height: 46px;
  font-size: 16px;
  font-weight: bold;
  color: #ffffff;
  white-space: nowrap;
}

.mainnav-list a:hover { background: var(--green-dark); color: #fff; text-decoration: none; }

.mainnav-list .current a,
.mainnav-list .current:hover a { background: var(--green-dark); }

/* ---------- Z4 通知公告红头条 ---------- */
.notice-bar {
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.notice-in {
  display: flex;
  align-items: center;
  height: 42px;
  gap: 12px;
}

.notice-tag {
  flex: none;
  background: var(--red);
  color: #fff;
  font-size: 13px;
  font-weight: bold;
  padding: 2px 12px;
  border-radius: 2px;
}

.notice-scroll {
  flex: 1;
  overflow: hidden;
  white-space: nowrap;
}

.notice-scroll p {
  display: inline-block;
  white-space: nowrap;
  animation: notice-scroll 36s linear infinite;
  font-size: 13.5px;
}

.notice-bar:hover .notice-scroll p { animation-play-state: paused; }

@keyframes notice-scroll {
  0% { transform: translateX(28%); }
  100% { transform: translateX(-100%); }
}

.notice-more { flex: none; font-size: 12px; color: var(--ink-3); }

/* ---------- Z5 首屏 ---------- */
.firstscreen {
  display: flex;
  gap: 20px;
  padding-top: 18px;
}

.banner {
  position: relative;
  width: 784px;
  flex: none;
  overflow: hidden;
  border-radius: 3px;
  border: 1px solid var(--line);
}

.banner-track { display: flex; width: 100%; transition: transform 0.6s ease; }

.banner-slide { flex: 0 0 100%; position: relative; margin: 0; }

.banner-slide img { width: 100%; height: 336px; object-fit: cover; }

.banner-slide figcaption {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  background: rgba(0, 30, 15, 0.72);
  color: #fff;
  font-size: 15px;
  padding: 8px 14px;
}

.banner-dots {
  position: absolute;
  right: 12px;
  bottom: 10px;
  display: flex;
  gap: 8px;
  z-index: 2;
}

.banner-dots button {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.9);
}

.banner-dots button.current { background: var(--gold); border-color: var(--gold); }

.flash { flex: 1; min-width: 0; }

/* ---------- 栏目标题头 ---------- */
.colhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid var(--green);
  padding-bottom: 7px;
  margin-bottom: 6px;
}

.colhead h2 {
  font-size: 17px;
  position: relative;
  padding-left: 12px;
}

.colhead h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 16px;
  background: var(--green);
}

.more { font-size: 12px; color: var(--ink-3); }

/* ---------- 信息列表行 ---------- */
.datelist li {
  display: flex;
  align-items: baseline;
  gap: 10px;
  border-bottom: 1px dashed var(--line);
  line-height: 32px;
}

.datelist li::before {
  content: "■";
  font-size: 9px;
  color: var(--green);
  flex: none;
  transform: translateY(-1px);
}

.datelist a {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.datelist time { flex: none; font-size: 12px; color: var(--ink-3); font-family: Arial, sans-serif; }

.datelist-tight li { line-height: 30px; }

/* ---------- 首屏右侧卡片 ---------- */
.quick-card {
  margin-top: 16px;
  background: var(--green-light);
  border: 1px solid #cfe5d8;
  border-radius: 4px;
  padding: 14px 16px;
}

.quick-title { font-size: 15px; font-weight: bold; color: var(--green); }
.quick-meta { font-size: 12.5px; color: var(--ink-2); margin-top: 6px; }

.btn-flat {
  display: inline-block;
  margin-top: 10px;
  background: var(--green);
  color: #fff;
  font-size: 13px;
  padding: 5px 18px;
  border-radius: 2px;
}

.btn-flat:hover { background: var(--green-dark); color: #fff; text-decoration: none; }

/* ---------- Z6 三栏主体 ---------- */
.maincols {
  display: flex;
  gap: 20px;
  padding-top: 26px;
  align-items: flex-start;
}

.leftcol { width: 218px; flex: none; }
.rightcol { width: 252px; flex: none; }
.midcol { flex: 1; min-width: 0; }

/* 目录树 */
.tree { border: 1px solid var(--line); border-top: none; margin-bottom: 18px; }

.tree-node > button {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 0 12px;
  line-height: 40px;
  font-size: 14px;
  font-weight: bold;
  color: var(--ink);
  border-top: 1px solid var(--line);
  background: #fafafa;
  text-align: left;
}

.tree-node > button::before {
  content: "+";
  width: 14px;
  color: var(--green);
  font-family: Arial, sans-serif;
  margin-right: 6px;
}

.tree-node.open > button::before { content: "-"; }

.tree-node > button:hover { color: var(--green); }

.tree-node ul { background: #fff; border-top: 1px solid var(--line); }

.tree-node li a {
  display: block;
  padding-left: 38px;
  line-height: 34px;
  font-size: 13.5px;
  border-bottom: 1px dashed var(--line);
}

.tree-node li a:hover { background: var(--green-light); }

.tree-node li:last-child a { border-bottom: none; }

.contact-card p {
  font-size: 13px;
  color: var(--ink-2);
  line-height: 2;
  border-bottom: 1px dashed var(--line);
}

/* Tab 切换 */
.tabs { display: flex; border-bottom: 2px solid var(--green); }

.tab {
  padding: 8px 26px;
  font-size: 15px;
  font-weight: bold;
  color: var(--ink-2);
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-bottom: none;
  border-radius: 3px 3px 0 0;
  margin-right: 4px;
}

.tab.current {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

.tabpane .datelist li { line-height: 34px; }

/* 分页公式 */
.pagefoot {
  font-size: 12.5px;
  color: var(--ink-2);
  padding: 14px 0 4px;
}

.pagefoot a { margin: 0 2px; }

.pagefoot input {
  width: 32px;
  height: 20px;
  border: 1px solid var(--line-2);
  border-radius: 2px;
  text-align: center;
}

/* 快捷服务图标阵 */
.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 20px;
}

.service-grid li { border: 1px solid var(--line); margin: -0.5px; }

.service-grid a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 16px 4px 13px;
  color: var(--ink);
  background: #fff;
}

.service-grid a:hover { background: var(--green-light); color: var(--green); text-decoration: none; transform: translateY(-1px); }

.service-grid .icon { font-size: 26px; color: var(--green); }

.service-grid span { font-size: 13px; }

.collect-state { font-size: 12.5px; color: var(--ink-3); margin-top: 8px; }
.collect-state a { color: var(--link); }

/* ---------- Z7 专题专栏 ---------- */
.zone { padding: 30px 0 34px; }
.zone-gray { background: var(--bg-alt); }

.zone-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid var(--green);
  padding-bottom: 8px;
  margin-bottom: 18px;
}

.zone-head h2 {
  font-size: 20px;
  position: relative;
  padding-left: 14px;
}

.zone-head h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 5px;
  height: 18px;
  background: var(--green);
}

.special-row { display: flex; gap: 16px; }

.special-card {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 3px;
  overflow: hidden;
  background: #fff;
}

.special-card a { display: block; position: relative; color: var(--ink); }
.special-card a:hover { text-decoration: none; }

.special-card img { width: 100%; height: 150px; object-fit: cover; }

.special-card:hover img { opacity: 0.92; }

.special-tag {
  position: absolute;
  top: 0;
  left: 0;
  background: var(--red);
  color: #fff;
  font-size: 12px;
  padding: 2px 10px;
}

.special-name {
  display: block;
  text-align: center;
  font-size: 15px;
  font-weight: bold;
  line-height: 40px;
  border-top: 2px solid var(--green-light);
}

.special-card:hover .special-name { color: var(--green); }

/* ---------- 理事长之窗 ---------- */
.chairman { display: flex; gap: 26px; align-items: flex-start; }

.chairman-photo {
  width: 224px;
  flex: none;
  border: 1px solid var(--line-2);
  padding: 4px;
  background: #fff;
  text-align: center;
}

.chairman-photo img { width: 100%; height: 286px; object-fit: cover; object-position: center top; }

.chairman-photo figcaption {
  font-size: 14px;
  font-weight: bold;
  line-height: 36px;
  color: var(--ink);
}

.chairman-info { flex: 1; min-width: 0; }

.chairman-info h3 {
  font-size: 17px;
  color: var(--green);
  border-left: 4px solid var(--green);
  padding-left: 10px;
  margin-bottom: 12px;
}

.chairman-info > p { font-size: 14px; line-height: 2; }

.chairman-paper {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 14px 18px;
  background: #fff;
}

.chairman-paper h4 { font-size: 14px; color: var(--ink-2); margin-bottom: 8px; }

.paper-title { font-size: 13.5px; font-style: italic; line-height: 1.8; color: var(--ink); }

.paper-meta { font-size: 12.5px; color: var(--ink-3); margin-top: 8px; }

.quote-box {
  width: 300px;
  flex: none;
  border: 2px solid #f0dfb8;
  background: #fdfaf1;
  border-radius: 4px;
  padding: 18px 20px 16px;
}

.quote-box h4 {
  font-size: 14px;
  color: var(--red);
  text-align: center;
  letter-spacing: 4px;
  border-bottom: 1px solid #f0dfb8;
  padding-bottom: 10px;
  margin-bottom: 14px;
}

.gongwen {
  font-family: "FangSong", "仿宋", "仿宋_GB2312", "FangSong SC", "STFangsong", serif;
  font-size: 17px;
  line-height: 2.1;
  text-align: center;
  color: #40300e;
}

.quote-box figcaption {
  margin-top: 12px;
  font-size: 12px;
  color: var(--ink-3);
  text-align: right;
}

/* ---------- 数据开放 + 互动交流 ---------- */
.datarow { display: flex; gap: 30px; align-items: flex-start; }

.data-open { flex: 1.15; }
.interact { flex: 1; }

.statgrid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.statgrid > div {
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  text-align: center;
  padding: 16px 6px 12px;
}

.statgrid dt { font-size: 12.5px; color: var(--ink-2); }

.statgrid dd {
  font-size: 30px;
  font-weight: bold;
  color: var(--green);
  font-family: Arial, "Microsoft YaHei", sans-serif;
  margin-top: 4px;
}

.statgrid dd span { font-size: 13px; font-weight: normal; color: var(--ink-2); margin-left: 3px; }

.praise {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 13px;
}

.praise-bar {
  flex: 1;
  min-width: 160px;
  height: 12px;
  background: #eee;
  border: 1px solid var(--line-2);
  border-radius: 2px;
  overflow: hidden;
}

.praise-bar i { display: block; height: 100%; background: var(--ok-green); }

.praise-num { font-weight: bold; color: var(--ok-ink); }

.interact-grid { grid-template-columns: repeat(3, 1fr); }

.interview {
  border: 1px solid var(--line);
  border-left: 4px solid var(--green);
  border-radius: 3px;
  background: #fff;
  padding: 14px 16px;
  font-size: 13px;
}

.interview-title { font-weight: bold; color: var(--ink); }
.interview-meta { color: var(--ink-3); margin-top: 6px; }
.interview .btn-flat { margin-top: 12px; }

/* ---------- 信息公开 ---------- */
.openrow { display: flex; gap: 26px; align-items: flex-start; }

.open-table { flex: 1.6; min-width: 0; }
.open-table h3, .open-down h3 {
  font-size: 15px;
  margin-bottom: 10px;
  color: var(--ink);
}

.open-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  background: #fff;
}

.open-table th, .open-table td {
  border: 1px solid var(--line-2);
  padding: 8px 10px;
  text-align: left;
}

.open-table th { background: var(--green-light); color: var(--green); font-weight: bold; white-space: nowrap; }

.open-table tbody tr:nth-child(even) { background: #fafafa; }
.open-table tbody tr:hover { background: #f2f8f4; }

.table-note { font-size: 12.5px; color: var(--ink-3); margin-top: 8px; }

.open-down { flex: 1; }

/* ---------- 新闻中心卡片 ---------- */
.news-cards { display: flex; gap: 16px; }

.news-cards li {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 3px;
  overflow: hidden;
  background: #fff;
}

.news-cards a { display: block; padding-bottom: 6px; color: var(--ink); }
.news-cards a:hover { text-decoration: none; }

.news-cards img { width: 100%; height: 140px; object-fit: cover; }

.news-card-title {
  display: block;
  font-size: 13.5px;
  line-height: 1.6;
  padding: 8px 10px 2px;
}

.news-cards a:hover .news-card-title { color: var(--link-hover); }

.news-cards time { display: block; font-size: 12px; color: var(--ink-3); padding: 0 10px 4px; font-family: Arial, sans-serif; }

/* ---------- Z8 页脚 ---------- */
.site-footer { background: var(--bg-alt); border-top: 3px solid var(--green); }

.footer-links {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  color: var(--ink-2);
}

.footer-links a { margin-right: 18px; color: var(--ink-2); }
.footer-links a:hover { color: var(--link-hover); }

.footer-main { display: flex; justify-content: space-between; gap: 30px; padding: 22px 0 26px; align-items: center; }

.footer-info p { font-size: 12.5px; color: var(--ink-3); line-height: 2.1; }

.footer-actions a { color: var(--ink-2); margin-right: 4px; }
.footer-actions a:hover { color: var(--link-hover); }

.footer-qr { display: flex; gap: 18px; }

.qr-tile { text-align: center; }
.qr-tile svg { width: 86px; height: 86px; border: 1px solid var(--line-2); background: #fff; }
.qr-tile p { font-size: 12px; color: var(--ink-2); margin-top: 6px; }

/* ---------- 浮动工具 ---------- */
.float-tools {
  position: fixed;
  right: 18px;
  bottom: 78px;
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.float-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  width: 58px;
  padding: 9px 2px;
  background: var(--green);
  color: #fff;
  font-size: 12px;
  border-radius: 4px;
  box-shadow: 0 2px 6px rgba(0, 40, 20, 0.25);
}

.float-btn .icon { font-size: 20px; }
.float-btn:hover { background: var(--green-dark); }

.float-top { background: #6d756f; }
.float-top:hover { background: #575e59; }
.float-top[hidden] { display: none; }

/* 智能问答面板 */
.chat-panel {
  position: fixed;
  right: 18px;
  bottom: 210px;
  z-index: 91;
  width: 300px;
  background: #fff;
  border: 1px solid var(--line-2);
  border-radius: 5px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);
  overflow: hidden;
}

.chat-head {
  background: var(--green);
  color: #fff;
  font-size: 14px;
  font-weight: bold;
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.chat-head small { font-size: 11px; font-weight: normal; opacity: 0.85; }

.chat-body { padding: 14px; font-size: 13px; }

.chat-msg {
  background: var(--green-light);
  border-radius: 4px;
  padding: 8px 12px;
  color: var(--ink);
}

.chat-hint { color: var(--ink-3); margin: 12px 0 6px; }

.chat-quick li { line-height: 30px; border-bottom: 1px dashed var(--line); }
.chat-quick li::before { content: "▪"; color: var(--green); margin-right: 6px; font-size: 10px; }

/* ---------- 动效降级 ---------- */
@media (prefers-reduced-motion: reduce) {
  .notice-scroll p { animation: none; white-space: normal; }
  .banner-track { transition: none; }
}

/* ---------- 响应式（基础适配，保持政务版式） ---------- */
@media (max-width: 1220px) {
  .container { width: 100%; }
}

@media (max-width: 1000px) {
  .firstscreen, .maincols, .datarow, .openrow, .chairman, .special-row, .news-cards { flex-wrap: wrap; }

  .banner, .flash, .leftcol, .midcol, .rightcol { width: 100%; flex: 1 1 100%; }

  .special-card, .news-cards li { flex: 1 1 30%; }

  .chairman-photo, .quote-box, .chairman-info { width: 100%; flex: 1 1 100%; }

  .statgrid { grid-template-columns: repeat(2, 1fr); }

  .masthead-in { flex-wrap: wrap; }
  .site-search { text-align: left; }

  .mainnav-list { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .mainnav-list a { padding: 0 16px; font-size: 15px; }

  .footer-main { flex-wrap: wrap; }
}

@media (max-width: 640px) {
  .topbar-in { justify-content: flex-start; overflow-x: auto; }
  .topbar-right { display: none; }

  .site-name { font-size: 26px; letter-spacing: 3px; }
  .crest { width: 46px; height: 46px; }

  .search-box input { width: 100%; }
  .site-search { width: 100%; }
  .search-box { width: 100%; }

  .special-card, .news-cards li { flex: 1 1 100%; }

  .service-grid { grid-template-columns: repeat(3, 1fr); }
}
