/* ============================================
   昼锦堂慈水五里韩氏 · 全站创意增强样式
   ============================================ */

/* --- 动画关键帧 --- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(36px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes revealChar {
  from { opacity: 0; transform: translateY(18px); filter: blur(4px); }
  to   { opacity: 1; transform: translateY(0);    filter: blur(0); }
}
@keyframes floatSlow {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  33%      { transform: translateY(-10px) rotate(0.5deg); }
  66%      { transform: translateY(6px) rotate(-0.3deg); }
}
@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(178,134,59,0.35); }
  50%      { box-shadow: 0 0 0 12px rgba(178,134,59,0); }
}
@keyframes slideRight {
  from { opacity: 0; transform: translateX(-30px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes dotPulse {
  0%, 100% { opacity: 0.3; transform: scale(0.8); }
  50%      { opacity: 1; transform: scale(1.2); }
}

/* --- 滚动揭示 --- */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* --- 页面 Hero 增强 --- */
.page-hero-enhanced {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, var(--paper) 0%, #faf7ed 30%, var(--paper) 100%);
}
.page-hero-enhanced::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(178,134,59,0.2), transparent);
}

/* Hero 标题逐字动画 */
.hero-char-anim .char {
  display: inline-block;
  opacity: 0;
  animation: revealChar 0.45s ease forwards;
}
.hero-char-anim .char.accent {
  color: var(--accent);
}

/* Hero 副标题淡入 */
.hero-fade-up {
  opacity: 0;
  animation: fadeUp 0.7s 0.8s ease forwards;
}

/* --- 卡片增强 --- */
.card-enhanced {
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}
.card-enhanced:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(31,36,40,0.1);
  border-color: rgba(178,134,59,0.25);
}

/* --- 按钮脉冲发光 --- */
.button-glow {
  animation: pulseGlow 2.8s ease-in-out infinite;
}

/* --- 分隔线动画 --- */
.animated-divider {
  width: 64px;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), rgba(178,134,59,0.25));
  border-radius: 2px;
  margin: 20px 0;
  opacity: 0;
  animation: fadeUp 0.7s 0.6s ease forwards;
}

/* --- 导航栏滚动阴影 --- */
.site-header.scrolled {
  box-shadow: 0 2px 20px rgba(31,36,40,0.1);
}

/* --- 页脚增强 --- */
.footer-enhanced {
  text-align: center;
  padding: 32px 20px;
  border-top: 1px solid var(--line);
  background:
    linear-gradient(180deg, var(--paper) 0%, #faf7ed 100%);
}
.footer-enhanced .footer-brand {
  font-size: 18px;
  font-weight: 900;
  color: var(--accent-dark);
  margin-bottom: 6px;
}
.footer-enhanced .footer-tagline {
  color: var(--muted-ink);
  font-size: 14px;
  margin: 0 0 12px;
}
.footer-enhanced .footer-seal {
  display: inline-block;
  font-family: "KaiTi", "STKaiti", serif;
  color: var(--gold);
  font-size: 28px;
  opacity: 0.4;
}

/* --- 统计数字动画 --- */
.stat-animated {
  transition: all 0.5s ease;
}

/* --- 公告卡片悬停效果 --- */
.announcement-grid div:hover,
.notice-grid article:hover,
.culture-grid article:hover,
.principles div:hover,
.collect-list article:hover,
.search-grid article:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(31,36,40,0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.announcement-grid div,
.notice-grid article,
.culture-grid article,
.principles div,
.collect-list article,
.search-grid article {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* --- 资料征集表单区域增强 --- */
.collect-start-section,
.form-section {
  position: relative;
}
.collect-start-section::before,
.form-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 1px;
  height: 40px;
  background: linear-gradient(0deg, var(--gold), transparent);
}

/* --- 报告页面增强 --- */
.md-report-enhanced .md-report h1 {
  position: relative;
}
.md-report-enhanced .md-report h1::before {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 48px;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), transparent);
  border-radius: 2px;
}
.md-report-enhanced .md-report h2 {
  position: relative;
}

/* --- 打印优化 --- */
@media print {
  .reveal { opacity: 1 !important; transform: none !important; }
  .no-print { display: none !important; }
}

/* --- 整理原则大白话版 --- */
.principles-plain {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.plain-card {
  position: relative;
  padding: 28px 22px 24px;
  text-align: center;
}
.plain-medal {
  display: inline-grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  margin-bottom: 14px;
  font-size: 18px;
  font-weight: 900;
  color: #fff;
  letter-spacing: 0.04em;
}
.plain-medal.gold { background: linear-gradient(135deg, #d4a647, #b2863b); box-shadow: 0 6px 18px rgba(178,134,59,0.35); }
.plain-medal.silver { background: linear-gradient(135deg, #a8b2bd, #7d8893); box-shadow: 0 6px 18px rgba(125,136,147,0.3); }
.plain-medal.bronze { background: linear-gradient(135deg, #c08552, #9a6638); box-shadow: 0 6px 18px rgba(154,102,56,0.3); }
.plain-card h3 { margin: 0 0 6px; font-size: 18px; color: var(--accent-dark); }
.plain-eg { margin: 0 0 14px; font-size: 13px; color: var(--gold); font-weight: 600; }
.plain-say { margin: 0; font-size: 15px; line-height: 1.7; color: var(--muted-ink); text-align: left; }

@media (max-width: 900px) {
  .principles-plain { grid-template-columns: 1fr; }
}

/* --- 族人读本（白话故事）样式 --- */
.story-article {
  margin: 0 auto;
}
.story-body {
  max-width: 680px;
  margin: 0 auto;
  font-size: 17px;
  line-height: 1.85;
  color: var(--ink);
}
.story-body h2 {
  font-size: 22px;
  color: var(--accent-dark);
  margin: 36px 0 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(178,134,59,0.2);
}
.story-body h2:first-of-type { margin-top: 20px; }
.story-body p { margin: 0 0 16px; }
.story-lead {
  font-size: 18px;
  color: var(--accent-dark);
  background: rgba(178,134,59,0.06);
  border-left: 4px solid var(--gold);
  padding: 18px 22px;
  border-radius: 0 8px 8px 0;
  margin-bottom: 28px !important;
}
.story-quote {
  margin: 18px 0;
  padding: 16px 22px;
  background: var(--soft);
  border-left: 3px solid var(--gold);
  border-radius: 0 6px 6px 0;
  font-family: "KaiTi", "STKaiti", "SimSun", serif;
  font-size: 16px;
  color: var(--muted-ink);
  line-height: 1.7;
}
.story-list {
  padding-left: 22px;
  margin: 0 0 18px;
}
.story-list li { margin-bottom: 8px; }
.story-note {
  margin: 32px 0 20px !important;
  padding: 22px 24px !important;
  background: rgba(143,47,40,0.04) !important;
  border: 1px solid rgba(143,47,40,0.12);
  border-radius: 10px;
}
.story-note h3 {
  margin: 0 0 10px !important;
  color: var(--accent) !important;
  font-size: 17px !important;
}
.story-note p { font-size: 15px; line-height: 1.7; margin-bottom: 8px; }
.story-footer {
  margin-top: 32px !important;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 13px !important;
  color: var(--muted-ink) !important;
}

/* --- 转发文案版本切换标签 --- */
.share-tabs {
  display: flex;
  gap: 6px;
}
.share-tab {
  padding: 4px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--muted-ink);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.share-tab:hover { border-color: var(--gold); color: var(--gold); }
.share-tab.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* --- 文化活动新闻版面 --- */
.events-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.events-stats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: var(--muted-ink);
}
.events-total strong { font-size: 20px; color: var(--accent-dark); }
.events-cat-count {
  padding: 2px 10px;
  border-radius: 4px;
  background: var(--soft);
  font-size: 13px;
}
.events-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.events-filter-btn {
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  color: var(--muted-ink);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.events-filter-btn:hover { border-color: var(--gold); color: var(--accent-dark); }
.events-filter-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.events-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.events-year {
  font-size: 22px;
  font-weight: 900;
  color: var(--gold);
  padding: 8px 0 4px;
  margin-top: 12px;
  border-bottom: 2px solid rgba(178,134,59,0.15);
}
.events-year:first-child { margin-top: 0; }
.events-card {
  display: flex;
  gap: 20px;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  transition: box-shadow 0.3s ease, transform 0.2s ease;
}
.events-card:hover {
  box-shadow: 0 8px 28px rgba(31,36,40,0.08);
  transform: translateY(-2px);
}
.events-card-date {
  flex: 0 0 auto;
  min-width: 60px;
  padding: 10px 0 0;
  font-size: 15px;
  font-weight: 800;
  color: var(--accent-dark);
  text-align: center;
  line-height: 1.3;
}
.events-card-body { flex: 1; min-width: 0; }
.events-card-cat {
  display: inline-block;
  margin-bottom: 8px;
  padding: 3px 10px;
  border-radius: 4px;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
}
.events-card-body h3 {
  margin: 0 0 8px;
  font-size: 18px;
  color: var(--accent-dark);
  line-height: 1.35;
}
.events-card-body p {
  margin: 0;
  font-size: 15px;
  color: var(--muted-ink);
  line-height: 1.65;
}
.events-card-imgs {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  overflow-x: auto;
}
.events-card-imgs img {
  width: 160px;
  height: 110px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--line);
}

@media (max-width: 900px) {
  .events-card { flex-direction: column; gap: 10px; padding: 18px 16px; }
  .events-card-date { text-align: left; padding: 0; font-size: 14px; }
  .events-header { flex-direction: column; align-items: flex-start; }
}

/* --- 宗亲会页面 --- */
/* 红头文件 */
.red-doc {
  max-width: 720px;
  margin: 0 auto;
  padding: 40px 36px 36px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 6px solid var(--accent);
  border-radius: 0 0 6px 6px;
  box-shadow: 0 4px 24px rgba(31,36,40,0.06);
}
.red-doc-head {
  text-align: center;
  margin-bottom: 16px;
}
.red-doc-seal {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 3px solid var(--accent);
  border-radius: 6px;
  color: var(--accent);
  font-size: 26px;
  font-weight: 900;
  font-family: "KaiTi","STKaiti","SimSun",serif;
  margin-bottom: 8px;
}
.red-doc-head h2 {
  margin: 0 0 4px;
  font-size: 22px;
  font-weight: 900;
  color: var(--accent);
  letter-spacing: 0.06em;
}
.red-doc-head p {
  margin: 0;
  font-size: 13px;
  color: var(--muted-ink);
}
.red-doc-line {
  border: none;
  height: 2px;
  background: var(--accent);
  margin: 18px 0 24px;
}
.red-doc-title h1 {
  margin: 0;
  text-align: center;
  font-size: 22px;
  font-weight: 900;
  color: var(--ink);
  line-height: 1.5;
  letter-spacing: 0.04em;
}
.red-doc-body {
  margin: 28px 0;
  font-size: 16px;
  line-height: 2;
}
.red-doc-body p { text-indent: 2em; margin: 0 0 10px; }
.red-doc-body p:first-child { text-indent: 0; }
.red-doc-footer {
  margin-top: 32px;
  text-align: right;
  font-size: 15px;
  color: var(--accent-dark);
  font-weight: 700;
  line-height: 2;
}
.red-doc-footer p { margin: 0; }
/* 树状组织架构图 */
.asso-tree {
  max-width: 960px;
  margin: 0 auto;
  text-align: center;
}
.tree-root {
  display: inline-block;
  padding: 16px 32px;
  border: 2px solid var(--gold);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(178,134,59,0.08), rgba(143,47,40,0.05));
  margin-bottom: 10px;
  position: relative;
}
.tree-root::after {
  content: "";
  position: absolute;
  bottom: -18px;
  left: 50%;
  width: 2px;
  height: 18px;
  background: var(--gold);
  transform: translateX(-50%);
}
.tree-branches {
  display: flex;
  justify-content: center;
  gap: 0;
  padding-top: 20px;
  position: relative;
}
.tree-branches::before {
  content: "";
  position: absolute;
  top: 20px;
  left: 15%;
  right: 15%;
  height: 2px;
  background: var(--gold);
}
.tree-line-t {
  width: 100%;
  height: 2px;
  background: var(--gold);
  margin-bottom: -1px;
  opacity: 0.4;
}
.tree-line-t.accent { background: var(--accent); opacity: 1; }
.tree-line-v {
  width: 2px;
  height: 20px;
  background: var(--line);
  margin: 0 auto;
}
.tree-column {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  padding: 0 6px;
}
.tree-column.tree-main { flex: 1.6; }
.tree-branch {
  display: inline-block;
  padding: 10px 18px;
  border: 2px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  margin-top: 10px;
  position: relative;
}
.tree-branch.accent {
  border-color: var(--accent);
  background: linear-gradient(135deg, rgba(143,47,40,0.06), rgba(178,134,59,0.04));
  box-shadow: 0 4px 16px rgba(143,47,40,0.1);
}
.tree-line-t { margin-top: 0; }
.tree-branch::before {
  content: "";
  position: absolute;
  top: -12px;
  left: 50%;
  width: 2px;
  height: 10px;
  background: var(--gold);
  transform: translateX(-50%);
}
.tree-column:first-child .tree-branch::before,
.tree-column:last-child .tree-branch::before {
  background: var(--line);
}
.tree-node {
  margin: 6px 0;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  width: 100%;
  max-width: 280px;
  position: relative;
}
.tree-node::before {
  content: "";
  position: absolute;
  top: -8px;
  left: 50%;
  width: 2px;
  height: 8px;
  background: var(--line);
  transform: translateX(-50%);
}
.tree-node.featured {
  border-color: var(--gold);
  background: linear-gradient(135deg, rgba(178,134,59,0.06), rgba(255,253,247,0.6));
  box-shadow: 0 4px 12px rgba(178,134,59,0.12);
  max-width: 200px;
}
.tree-children {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  position: relative;
  padding-top: 4px;
}
.tree-children::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 2px;
  height: 100%;
  background: var(--line);
  transform: translateX(-50%);
}
.tree-children .tree-node {
  margin: 8px 0;
  max-width: 340px;
  width: 100%;
}
.tree-children .tree-node.wide {
  max-width: 460px;
}

/* 人名 chip 标签 —— 每人独立一块，永不拆断 */
.tree-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 8px;
  margin-top: 4px;
}
.tree-chip {
  display: inline-block;
  white-space: nowrap;
  padding: 3px 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  background: rgba(178,134,59,0.07);
  border: 1px solid rgba(178,134,59,0.2);
  border-radius: 4px;
  line-height: 1.5;
}
.tree-chip.sub {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted-ink);
  background: rgba(93,102,112,0.06);
  border-color: rgba(93,102,112,0.15);
}

.tree-badge {
  display: inline-block;
  margin-bottom: 4px;
  padding: 2px 12px;
  border-radius: 4px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.03em;
}
.tree-badge.root { background: #8f2f28; font-size: 14px; padding: 4px 14px; }
.tree-badge.honorary { background: #9a6638; }
.tree-badge.honor { background: #8f2f28; }
.tree-badge.advisor { background: #b2863b; }
.tree-badge.president { background: linear-gradient(135deg, #8f2f28, #68201c); font-size: 13px; padding: 3px 14px; }
.tree-badge.vice { background: #426d5a; }
.tree-badge.secretary { background: #5d6670; }
.tree-badge.council { background: #b2863b; }
.tree-badge.supervisor { background: #426d5a; }
.tree-sub {
  display: block;
  font-size: 11px;
  color: var(--muted-ink);
  margin-top: 2px;
}
.tree-name {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: var(--accent-dark);
  line-height: 1.5;
  margin-top: 4px;
}
.tree-name.small { font-size: 13px; font-weight: 600; }
.tree-name-d {
  display: block;
  font-size: 12px;
  color: var(--muted-ink);
  margin-top: 4px;
  line-height: 1.5;
}

@media (max-width: 900px) {
  .tree-branches { flex-direction: column; align-items: center; gap: 24px; }
  .tree-branches::before { display: none; }
  .tree-column { width: 100%; max-width: 320px; }
  .tree-column.tree-main { flex: 1; width: 100%; max-width: 340px; }
}

/* 章程财务折叠 */
.asso-docs { max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.asso-doc { padding: 0; overflow: hidden; }
.asso-doc summary {
  padding: 18px 24px;
  font-size: 17px;
  font-weight: 800;
  color: var(--accent-dark);
  cursor: pointer;
  user-select: none;
  transition: background 0.2s;
}
.asso-doc summary:hover { background: rgba(178,134,59,0.04); }
.asso-doc[open] summary { border-bottom: 1px solid var(--line); }
.asso-doc-body { padding: 24px 28px 28px; font-size: 15px; line-height: 1.8; }
.asso-doc-body h3 { margin: 20px 0 10px; font-size: 17px; color: var(--accent-dark); }
.asso-doc-body h3:first-child { margin-top: 0; }
.asso-doc-body p { margin: 0 0 10px; }
.asso-table { width: 100%; border-collapse: collapse; margin-bottom: 14px; }
.asso-table td { padding: 8px 12px; border: 1px solid var(--line); font-size: 14px; }
.asso-table td:first-child { background: var(--soft); font-weight: 700; width: 30%; }

/* --- 响应式 --- */
@media (max-width: 900px) {
  .reveal { transform: translateY(20px); }
  .story-body { font-size: 16px; line-height: 1.8; }
  .story-lead { font-size: 17px; padding: 16px 18px; }
}
