/**
 * 2026端午节专题 - 全局样式表
 * 设计基准: 1920px 桌面端
 * 响应式策略: 移动端优先 (Mobile First)
 */

/* ==========================================
   1. CSS 变量定义
   ========================================== */
:root {
  --bg-primary: #fbf8ef;
  --bg-white: #ffffff;
  --color-blue: #0d62bd;
  --color-green: #34c759;
  --color-green-dark: #006d21;
  --color-red: #c70915;
  --color-brown: #ac7f5e;
  --color-text: #333333;
  --color-text-light: #999999;
  --color-border: #d9d9d9;
  --color-tag-bg: rgba(63, 235, 89, 0.2);
  --color-quote-bg: rgba(217, 217, 217, 0.3);
  --color-note-bg: rgba(224, 224, 224, 0.4);

  --radius-sm: 4px;
  --radius-md: 20px;
  --radius-lg: 26px;
  --radius-full: 999px;

  --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.06);
  --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.12);

  --transition-fast: 0.2s ease;
  --transition-normal: 0.4s ease;
  --transition-slow: 0.6s ease;
}

/* ==========================================
   2. 重置与基础样式
   ========================================== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background-color: var(--bg-primary);
  color: var(--color-text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

/* ==========================================
   3. 工具类
   ========================================== */

/* 视觉隐藏（屏幕阅读器可访问） */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 16px;
  position: relative;
}

.section-title-img {
  display: block;
  margin: 0 auto;
  max-width: 90%;
  height: auto;
}

.divider {
  width: 100%;
  max-width: 1108px;
  height: 1px;
  background: var(--color-border);
  margin: 20px auto;
  position: relative;
}

.divider::before,
.divider::after {
  content: "";
  position: absolute;
  top: -3px;
  width: 7px;
  height: 7px;
  background: var(--color-border);
  border-radius: 50%;
}

.divider::before {
  left: 0;
}
.divider::after {
  right: 0;
}

/* 动画关键帧 */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.animate-on-scroll {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================
   4. 首屏 Hero
   ========================================== */
.hero {
  width: 100%;
  position: relative;
  overflow: hidden;
  background-color: var(--bg-primary);
}

.hero .banner {
  width: 100%;
  height: auto;
  object-fit: cover;
  animation: fadeIn 1.2s ease;
}
.hero .logo {
  width: 252px;
  position: absolute;
  top: 36px;
  left: 12vw;
}

/* ==========================================
   5. 端午简介 Intro
   ========================================== */
.intro {
  padding: 60px 0 40px;
  position: relative;
}

.intro-text {
  max-width: 995px;
  margin: 30px auto 0;
  font-size: clamp(16px, 1.8vw, 24px);
  font-weight: 400;
  color: var(--color-text);
  line-height: 1.8;
  text-align: center;
}

/* ==========================================
   6. 端午百科 Wiki
   ========================================== */
.wiki {
  padding: 20px 0 40px;
  position: relative;
}

.wiki-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.wiki-card {
  background: var(--bg-white);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-card);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.wiki-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
}

.wiki-card-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.wiki-card-header img {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
}

.wiki-card-header h3 {
  font-size: clamp(24px, 2.5vw, 36px);
  font-weight: 500;
  color: var(--color-green);
}

.wiki-card p {
  font-size: clamp(15px, 1.2vw, 18px);
  font-weight: 500;
  color: var(--color-text);
  line-height: 1.7;
  margin-bottom: 16px;
  text-align: justify;
}

.wiki-tag {
  display: inline-block;
  background: var(--color-tag-bg);
  color: var(--color-green-dark);
  font-size: 13px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
}

/* 非遗横幅 */
.wiki-banner {
  margin-top: 40px;
  background: var(--color-red);
  border-radius: var(--radius-md);
  padding: 30px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  color: var(--bg-white);
  box-shadow: var(--shadow-card);
  transition: transform var(--transition-normal);
}

.wiki-banner:hover {
  transform: translateY(-4px);
}

.wiki-banner img {
  width: 100px;
  height: auto;
  flex-shrink: 0;
  animation: float 3s ease-in-out infinite;
}

.wiki-banner h3 {
  font-size: clamp(22px, 2.2vw, 36px);
  font-weight: 400;
  margin-bottom: 10px;
}

.wiki-banner p {
  font-size: clamp(14px, 1.1vw, 18px);
  font-weight: 500;
  line-height: 1.7;
  opacity: 0.95;
}

/* ==========================================
   7. 传统习俗 Customs
   ========================================== */
.customs {
  padding: 60px 0 40px;
  position: relative;
}

.customs-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-top: 40px;
  max-width: 1224px;
  margin-left: auto;
  margin-right: auto;
}

.custom-card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.custom-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
}

.custom-card-header {
  position: relative;
  width: 100%;
  height: 146px;
  background: var(--color-blue);
  overflow: hidden;
}

.custom-card-header img {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 130%;
  height: auto;
  object-fit: cover;
  transition: transform var(--transition-normal);
}

.custom-card:hover .custom-card-header img {
  transform: translate(-50%, -50%) scale(1.08);
}

.custom-card-body {
  padding: 24px;
}

.custom-card-body h3 {
  font-size: clamp(26px, 2.5vw, 36px);
  font-weight: 500;
  margin-bottom: 12px;
}

.custom-card-body .subtitle {
  font-size: clamp(15px, 1.2vw, 18px);
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: 12px;
  line-height: 1.6;
}

.custom-card-body .toggle-btn {
  font-size: 14px;
  color: var(--color-green);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
  transition: color var(--transition-fast);
  user-select: none;
}

.custom-card-body .toggle-btn:hover {
  color: var(--color-green-dark);
}

.custom-card-body .toggle-btn .arrow {
  transition: transform var(--transition-fast);
}

.custom-card-body .toggle-btn.active .arrow {
  transform: rotate(180deg);
}

.custom-card-body .detail {
  font-size: clamp(15px, 1.2vw, 18px);
  font-weight: 500;
  color: var(--color-text);
  line-height: 1.8;
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-normal), opacity var(--transition-normal);
  opacity: 0;
}

.custom-card-body .detail.open {
  max-height: 500px;
  opacity: 1;
}

.custom-card-body .source-tag {
  display: inline-block;
  margin-top: 16px;
  background: var(--color-tag-bg);
  color: var(--color-green-dark);
  font-size: 13px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
}

/* ==========================================
   8. 端午诗词 Poetry
   ========================================== */
.poetry {
  padding: 60px 0 40px;
  position: relative;
}

.poetry-list {
  max-width: 1012px;
  margin: 40px auto 0;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.poet-item {
  animation: fadeInUp 0.8s ease both;
}

.poet-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
}

.poet-avatar {
  width: 64px;
  height: 64px;
  background: var(--color-green);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 500;
  color: var(--color-text);
  flex-shrink: 0;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.poet-item:hover .poet-avatar {
  transform: scale(1.1);
  box-shadow: 0 4px 15px rgba(52, 199, 89, 0.4);
}

.poet-info h3 {
  font-size: clamp(24px, 2.2vw, 36px);
  font-weight: 500;
  margin-bottom: 4px;
}

.poet-info span {
  font-size: clamp(14px, 1.1vw, 18px);
  color: var(--color-text-light);
  font-weight: 500;
}

.poet-quote {
  background: var(--color-quote-bg);
  padding: 24px;
  border-radius: var(--radius-sm);
  position: relative;
  margin-bottom: 12px;
}

.poet-quote::before {
  content: "";
  position: absolute;
  left: 0;
  top: 24px;
  width: 4px;
  height: calc(100% - 48px);
  background: var(--color-border);
  border-radius: 2px;
}

.poet-quote p {
  font-size: clamp(18px, 1.8vw, 28px);
  font-weight: 500;
  line-height: 1.8;
  padding-left: 20px;
}

.poet-note {
  background: var(--color-note-bg);
  padding: 20px 24px;
  border-radius: var(--radius-sm);
}

.poet-note p {
  font-size: clamp(14px, 1.1vw, 18px);
  color: var(--color-text-light);
  font-weight: 500;
  line-height: 1.8;
}

/* ==========================================
   9. 端午问答 QA
   ========================================== */
.qa {
  padding: 60px 0 40px;
  position: relative;
}

.qa-list {
  max-width: 1099px;
  margin: 40px auto 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.qa-item {
  background: var(--bg-white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: box-shadow var(--transition-normal);
}

.qa-item:hover {
  box-shadow: var(--shadow-hover);
}

.qa-question {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px 24px;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.qa-question:hover {
  background: rgba(0, 0, 0, 0.02);
}

.qa-num {
  width: 56px;
  height: 56px;
  background: var(--color-brown);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 500;
  color: var(--bg-white);
  flex-shrink: 0;
  transition: transform var(--transition-fast);
}

.qa-item:hover .qa-num {
  transform: scale(1.1);
}

.qa-question h3 {
  font-size: clamp(20px, 2.2vw, 36px);
  font-weight: 500;
}

.qa-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-normal), opacity var(--transition-normal);
  opacity: 0;
}

.qa-answer.open {
  max-height: 300px;
  opacity: 1;
}

.qa-answer-inner {
  padding: 0 24px 24px 100px;
  font-size: clamp(16px, 1.5vw, 28px);
  font-weight: 500;
  color: var(--color-green);
  line-height: 1.7;
}

/* ==========================================
   10. 文化内涵 Culture
   ========================================== */
.culture {
  padding: 60px 0 40px;
  position: relative;
}

.culture-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  max-width: 1248px;
  margin: 40px auto 0;
}

.culture-card {
  background: var(--bg-white);
  border-radius: var(--radius-md);
  padding: 40px 24px;
  text-align: center;
  box-shadow: var(--shadow-card);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.culture-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
}

.culture-card img {
  width: 120px;
  height: 120px;
  border-radius: var(--radius-full);
  margin: 0 auto 24px;
  object-fit: cover;
  transition: transform var(--transition-normal);
}

.culture-card:hover img {
  transform: scale(1.08);
}

.culture-card h3 {
  font-size: clamp(24px, 2.2vw, 36px);
  font-weight: 500;
  margin-bottom: 16px;
}

.culture-card p {
  font-size: clamp(16px, 1.5vw, 24px);
  color: var(--color-text-light);
  font-weight: 400;
  line-height: 1.7;
  text-align: justify;
}

/* ==========================================
   11. 地方特色 Local
   ========================================== */
.local {
  padding: 60px 0 40px;
  position: relative;
}

.local-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  max-width: 1350px;
  margin: 40px auto 0;
}

.local-card {
  background: var(--bg-white);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-card);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}
.local-card img{
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

.local-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
}

.local-card .placeholder {
  width: 100%;
  height: 220px;
  background: var(--color-border);
  border-radius: var(--radius-sm);
  position: relative;
  overflow: hidden;
}

.local-card .placeholder::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

/* ==========================================
   12. 底部 Footer
   ========================================== */

/* ==========================================
   13. 背景装饰 (桌面端显示)
   ========================================== */
.bg-decoration {
  display: none;
  position: absolute;
  z-index: 0;
  pointer-events: none;
}

/* ==========================================
   14. 响应式 - 平板 (768px+)
   ========================================== */
@media (min-width: 768px) {
  .container {
    padding: 0 24px;
  }

  .wiki-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .customs-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .culture-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .local-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .qa-answer-inner {
    padding-left: 110px;
  }
}

/* ==========================================
   15. 响应式 - 桌面 (1024px+)
   ========================================== */
@media (min-width: 1024px) {
  .container {
    padding: 0 40px;
  }

  .wiki-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
  }

  .customs-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
  }

  .culture-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
  }

  .local-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
  }

  .wiki-banner {
    padding: 40px;
    gap: 30px;
  }

  .wiki-banner img {
    width: 142px;
  }

  .poet-avatar {
    width: 73px;
    height: 73px;
    font-size: 36px;
  }

  .qa-num {
    width: 76px;
    height: 76px;
    font-size: 36px;
  }

  .qa-question {
    padding: 24px 40px;
  }

  .qa-answer-inner {
    padding-left: 136px;
  }

  .culture-card img {
    width: 149px;
    height: 149px;
  }

  /* 背景装饰显示 */
  .bg-decoration {
    display: block;
  }

  .bg-deco-1 {
    top: 1200px;
    left: 0;
    width: 506px;
  }

  .bg-deco-2 {
    top: 1700px;
    left: 0;
    width: 100%;
    opacity: 0.6;
  }
}

/* ==========================================
   16. 响应式 - 大屏桌面 (1440px+)
   ========================================== */
@media (min-width: 1440px) {
  .container {
    max-width: 1320px;
  }

  .customs-grid,
  .culture-grid {
    gap: 30px;
  }
}

/* ==========================================
   17. 性能优化
   ========================================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* 补充 */
@media (max-width: 768px) {
  .hero .logo {
    width: 112px;
    left: 12px;
    top: 12px;
  }
  .wiki {
    padding-top: 0;
  }
  .customs {
    padding-top: 0;
  }
  .poetry {
    padding-top: 0;
  }
  .qa {
    padding-top: 0;
  }
  .culture {
    padding-top: 0;
  }
  .local {
    padding-top: 0;
  }
}


.qrcode-wrapper {
  padding: 80px;
}
.qrcode-box {
  width: 150px;
  margin: 0 auto;
  text-align: center;
  background-color: rgba(0, 0, 0, 0.4);
  color: #fff;
  padding: 15px;
  border-radius: 4px;
  font-size: 16px;
}

.qrcode img {
  width: 100%;
}