/* 非物质文化遗产展示网站的样式文件
   颜色和排版大致参考了 UNESCO ICH 官网 */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;500;600;700&display=swap');

:root {
  --color-primary: #009edb;
  --color-primary-dark: #0077a3;
  --color-bg: #f5f5f5;
  --color-bg-white: #ffffff;
  --color-text: #333333;
  --color-text-light: #555555;
  --color-border: #e0e0e0;
  --font-body: 'Noto Sans SC', 'Microsoft YaHei', sans-serif;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 4px 16px rgba(0, 158, 219, 0.15);
  --navbar-height: 64px; /* 用于首页 Banner 负边距，需≥导航栏实际高度以免顶部露白 */
}

:root {
  --color-primary: #009edb;
  --color-primary-dark: #0077a3;
  --color-bg: #f5f5f5;
  --color-bg-white: #ffffff;
  --color-text: #333333;
  --color-text-light: #555555;
  --color-border: #e0e0e0;
  --color-bg-soft: #f3f6fb;
  --color-text-muted: #777777;
  --font-body: 'Noto Sans SC', 'Microsoft YaHei', sans-serif;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 4px 16px rgba(0, 158, 219, 0.15);
  --navbar-height: 64px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  margin: 0;
  padding: 0;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-body);
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: 1.7;
  overflow-x: hidden;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* 导航栏 */
.navbar {
  position: sticky;
  top: 0;
  min-height: var(--navbar-height);
  background: var(--color-bg-white);
  border-bottom: 1px solid var(--color-border);
  z-index: 1000;
  box-shadow: var(--shadow);
}

/* 首页：透明页眉悬浮在 Banner 上 */
.navbar--over-banner {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  margin-top: -1px;   /* 向上延伸 1px，消除顶部亚像素白线 */
  padding-top: 1px;
  background: transparent;
  border-bottom: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: none;
}

.navbar--over-banner .logo {
  color: #fff;
}

.navbar--over-banner .nav-links a {
  color: rgba(255, 255, 255, 0.95);
}

.navbar--over-banner .nav-links a:hover,
.navbar--over-banner .nav-links a.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.2);
}

/* 首页滚动后：页眉变为实色（与内页一致，不改变 position 避免跳动） */
.navbar--over-banner.scrolled {
  background: var(--color-bg-white);
  border-bottom-color: var(--color-border);
  box-shadow: var(--shadow);
}

.navbar--over-banner.scrolled .logo {
  color: var(--color-primary);
}

.navbar--over-banner.scrolled .nav-links a {
  color: var(--color-text);
}

.navbar--over-banner.scrolled .nav-links a:hover,
.navbar--over-banner.scrolled .nav-links a.active {
  color: var(--color-primary);
  background: rgba(0, 158, 219, 0.08);
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: var(--navbar-height);
  padding: 16px 24px;
  box-sizing: border-box;
}

.logo {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--color-primary);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.logo:hover {
  color: var(--color-primary-dark);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 4px;
}

.nav-links a {
  color: var(--color-text);
  text-decoration: none;
  padding: 10px 16px;
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--color-primary);
  background: rgba(0, 158, 219, 0.08);
}

/* 首页顶部的大图 Banner */
/* 这里配合 JS，用导航的高度来调整 Banner 的位置 */
.navbar--over-banner + .banner {
  margin-top: calc(-1 * var(--navbar-actual-height, var(--navbar-height)));
  /* 负 margin 会把 Banner 整体上移；同时补偿高度，避免底部露出页面背景形成白边 */
  min-height: calc(100vh + var(--navbar-actual-height, var(--navbar-height)));
}
.banner {
  background: linear-gradient(135deg, #009edb 0%, #0077a3 100%);
  min-height: 100vh;
  padding: 140px 24px 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.banner-content {
  position: relative;
  z-index: 1;
  color: white;
  width: 100%;
}

.banner-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  transform: scale(var(--banner-scale, 1.02));
  transition: opacity 900ms ease;
}

.banner-bg.is-active {
  opacity: 1;
}

.banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.52) 0%, rgba(0, 0, 0, 0.28) 55%, rgba(0, 0, 0, 0.55) 100%);
}

.banner-tag {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  opacity: 0.9;
  margin-bottom: 12px;
}

.banner h1 {
  font-size: 2.4rem;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.banner p {
  font-size: 1.1rem;
  opacity: 0.95;
}

.banner-badges {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-top: 28px;
  flex-wrap: wrap;
}

.banner-badges span {
  background: rgba(255,255,255,0.2);
  padding: 8px 18px;
  border-radius: 4px;
  font-size: 0.9rem;
}

/* 首页新闻列表区块 */
.news-section {
  padding: 56px 0;
  background: var(--color-bg-white);
}

.news-section .section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--color-primary);
}

.news-section .section-head h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-text);
}

.news-list {
  list-style: none;
}

.news-list li {
  padding: 20px 0;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  gap: 20px;
  align-items: flex-start;
  transition: background 0.2s ease;
}

.news-list li:hover {
  background: rgba(0, 158, 219, 0.04);
}

.news-date {
  flex-shrink: 0;
  font-size: 0.85rem;
  color: var(--color-text-light);
  min-width: 100px;
}

.news-list a {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 500;
}

.news-list a:hover {
  text-decoration: underline;
}

/* 首页里的会议安排区块 */
.meetings-section {
  padding: 56px 0;
  background: var(--color-bg);
}

.meetings-section .section-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 28px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--color-primary);
}

.meetings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.meeting-card {
  background: var(--color-bg-white);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 24px;
  transition: all 0.2s ease;
}

.meeting-card:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-hover);
}

.meeting-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: 12px;
  line-height: 1.4;
}

.meeting-meta {
  font-size: 0.9rem;
  color: var(--color-text-light);
}

.meeting-meta .date {
  display: block;
  margin-bottom: 4px;
}

.meeting-meta .place {
  display: block;
}

/* 首页主题与计划区块 */
.themes-section {
  padding: 56px 0;
  background: var(--color-bg-white);
}

.themes-section .section-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 28px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--color-primary);
}

.themes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}

.theme-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 28px;
  text-decoration: none;
  color: var(--color-text);
  transition: all 0.2s ease;
  display: block;
}

.theme-card:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-hover);
  color: var(--color-text);
}

.theme-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: 10px;
}

.theme-card p {
  font-size: 0.9rem;
  color: var(--color-text-light);
  line-height: 1.6;
}

/* 各个页面上方的标题区域 */
.page-header {
  text-align: center;
  padding: 56px 24px 40px;
  background: var(--color-bg-white);
  border-bottom: 1px solid var(--color-border);
}

.page-header--banner {
  position: relative;
  padding: 84px 24px 64px;
  background-image: var(--page-header-bg);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-bottom: none;
  overflow: hidden;
  margin-bottom: -1px; /* 与下方区块重叠 1px，避免亚像素白边 */
}

.page-header--banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0.35) 55%, rgba(0, 0, 0, 0.55) 100%);
}

.page-header--banner > * {
  position: relative;
  z-index: 1;
}

.page-header h1 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 12px;
}

.page-header--banner h1 {
  color: #fff;
  text-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

.page-header p {
  color: var(--color-text-light);
  font-size: 1rem;
}

.page-header-lead {
  font-size: 1.1rem !important;
  color: var(--color-text) !important;
  max-width: 560px;
  margin: 0 auto 8px !important;
  text-indent: 0 !important;
}

.page-header--banner .page-header-lead {
  color: rgba(255, 255, 255, 0.92) !important;
  text-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

.page-header-sub {
  font-size: 0.9rem !important;
  color: var(--color-primary) !important;
  font-weight: 500;
}

.page-header--banner .page-header-sub {
  color: rgba(255, 255, 255, 0.85) !important;
}

/* 一些通用的区块间距和标题样式 */
.section {
  padding: 56px 0;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 28px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--color-primary);
}

/* 文字内容区块的样式 */
.content-block {
  background: var(--color-bg-white);
  padding: 40px;
  border-radius: 6px;
  margin-bottom: 24px;
  border: 1px solid var(--color-border);
}

.content-block h2 {
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--color-border);
}

.content-block h3 {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--color-primary);
  margin: 24px 0 12px;
}

.content-block p {
  margin-bottom: 14px;
  text-indent: 2em;
}

/* 段落里主要是按钮的时候就不要首行缩进了 */
.content-block p:has(.btn-link),
.content-block p:has(.btn-submit) {
  text-indent: 0;
}

.content-block ul, .content-block ol {
  margin: 14px 0 14px 2em;
}

.content-block li {
  margin-bottom: 8px;
}

/* 引言区块（about 页） */
.content-block--intro {
  background: linear-gradient(135deg, rgba(0, 158, 219, 0.06) 0%, rgba(0, 158, 219, 0.02) 100%);
  border-color: rgba(0, 158, 219, 0.2);
}

.content-block--intro .intro-text {
  text-indent: 0;
  font-size: 1.05rem;
  line-height: 1.8;
  margin-bottom: 0;
}

/* 引用/金句区块 */
.content-block--quote {
  text-align: center;
  border-left: 4px solid var(--color-primary);
  background: var(--color-bg);
}

.content-block--quote .quote-text {
  font-size: 1.1rem;
  font-style: italic;
  color: var(--color-text);
  text-indent: 0;
  margin-bottom: 12px;
}

.content-block--quote .quote-source {
  font-size: 0.9rem;
  color: var(--color-text-light);
  text-indent: 0;
  margin-bottom: 0;
}

/* 名录表格相关样式 */
.table-wrap {
  overflow-x: auto;
  margin: 20px 0;
  border: 1px solid var(--color-border);
  border-radius: 6px;
}

.list-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.list-table th,
.list-table td {
  padding: 14px 20px;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

.list-table th {
  background: var(--color-bg);
  font-weight: 600;
  color: var(--color-primary);
}

.list-table tbody tr:hover {
  background: rgba(0, 158, 219, 0.04);
}

.list-table-total {
  background: var(--color-bg);
  font-weight: 600;
}

.list-table-total td {
  border-bottom: none;
  padding-top: 16px;
  padding-bottom: 16px;
}

.btn-link {
  display: inline-block;
  padding: 12px 24px;
  background: var(--color-primary);
  color: white !important;
  text-decoration: none;
  border-radius: 4px;
  font-weight: 600;
  transition: background 0.2s ease;
}

.btn-link:hover {
  background: var(--color-primary-dark);
}

/* 首页分类卡片区域 */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 20px;
}

.category-item {
  text-align: center;
  padding: 28px 20px;
  background: var(--color-bg-white);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  transition: all 0.2s ease;
  text-decoration: none;
  color: var(--color-text);
}

.category-item:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  box-shadow: var(--shadow-hover);
}

.category-item .icon {
  font-size: 2.2rem;
  margin-bottom: 12px;
  display: block;
}

.category-item h3 {
  font-size: 1rem;
  font-weight: 600;
}

/* 图片网格展示 */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 6px;
  border: 1px solid var(--color-border);
  transition: all 0.3s ease;
}

.gallery-item:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-hover);
}

.gallery-item img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

.gallery-item .placeholder {
  width: 100%;
  height: 200px;
  background: linear-gradient(135deg, #e8f4fa 0%, #d0e8f2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-light);
  font-size: 1.2rem;
}

/* 页脚区域 */
.footer {
  background: #2c3e50;
  color: rgba(255,255,255,0.9);
  padding: 48px 24px 32px;
  margin-top: 56px;
}

.footer .container {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 40px;
  align-items: start;
}

.footer-main p {
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 12px;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 8px;
}

.footer-links a {
  color: rgba(255,255,255,0.9);
  text-decoration: none;
  font-size: 0.9rem;
}

.footer-links a:hover {
  text-decoration: underline;
}

.footer-bottom {
  grid-column: 1 / -1;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.15);
  font-size: 0.85rem;
  opacity: 0.8;
}

.footer-bottom a {
  color: rgba(255,255,255,0.95);
  text-decoration: none;
}

.footer-bottom a:hover {
  text-decoration: underline;
}

/* 传统工艺列表页里的每一项 */
.craft-item {
  display: flex;
  gap: 32px;
  margin-bottom: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--color-border);
}

.craft-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.craft-item:nth-child(even) {
  flex-direction: row-reverse;
}

.craft-item .craft-image {
  flex: 0 0 340px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--color-border);
}

.craft-item .craft-image img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.craft-item:hover .craft-image img {
  transform: scale(1.03);
}

.craft-item .craft-image .placeholder {
  width: 100%;
  height: 240px;
  background: linear-gradient(135deg, #e8f4fa 0%, #d0e8f2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-light);
  font-size: 1.5rem;
}

.craft-item .craft-content h3 {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: 14px;
}

.btn-submit {
  width: 100%;
  padding: 14px;
  background: var(--color-primary);
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-submit:hover {
  background: var(--color-primary-dark);
}

/* 联系我们 - 发邮件 */
.contact-email-block {
  max-width: 480px;
  margin: 0 auto;
  padding: 40px;
  text-align: center;
  background: var(--color-bg-soft);
  border-radius: 8px;
}

.contact-email-label {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-bottom: 8px;
}

.contact-email-address {
  font-size: 1.25rem;
  margin-bottom: 24px;
}

.contact-email-address a {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 600;
}

.contact-email-address a:hover {
  text-decoration: underline;
}

.contact-email-block .btn-submit {
  width: auto;
  padding: 12px 32px;
  display: inline-block;
  text-decoration: none;
}

/* 滚动时淡入的动画 */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* 步骤编号列表 */
.steps-list {
  list-style: none;
  counter-reset: step;
}

.steps-list li {
  position: relative;
  padding-left: 48px;
  margin-bottom: 20px;
}

.steps-list li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 36px;
  height: 36px;
  background: var(--color-primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 1rem;
}

/* 简单的自适应布局 */

:root {
  --color-primary: #009edb;
  --color-primary-dark: #0077a3;
  --color-bg: #f5f5f5;
  --color-bg-white: #ffffff;
  --color-text: #333333;
  --color-text-light: #555555;
  --color-border: #e0e0e0;
  --color-bg-soft: #f3f6fb;
  --color-text-muted: #777777;
  --font-body: 'Noto Sans SC', 'Microsoft YaHei', sans-serif;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 4px 16px rgba(0, 158, 219, 0.15);
  --navbar-height: 64px; /* 首页导航的大致高度，用来算 Banner 的位置 */
}

@media screen and (max-width: 768px) {
  .navbar .container {
    flex-direction: column;
    gap: 12px;
    padding: 12px 24px;
  }

  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
  }

  .nav-links a {
    padding: 8px 12px;
    font-size: 0.9rem;
  }

  .banner {
    min-height: 100vh;
    padding: 110px 20px 60px;
  }

  .banner h1 {
    font-size: 1.75rem;
  }

  .banner p {
    font-size: 1rem;
  }

  .footer .container {
    grid-template-columns: 1fr;
  }

  .category-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .craft-item,
  .craft-item:nth-child(even) {
    flex-direction: column;
  }

  .craft-item .craft-image {
    flex: none;
    width: 100%;
  }

  .content-block {
    padding: 24px 20px;
  }

  .contact-email-block {
    padding: 24px 20px;
  }

  .meetings-grid {
    grid-template-columns: 1fr;
  }

  /* 小屏上按钮撑满一行，看起来更整齐 */
  .btn-link,
  .btn-submit {
    width: 100%;
    text-align: center;
  }

  /* 联系方式这块也统一一下宽度 */
  .contact-email-block .btn-submit {
    width: 100%;
  }
}

@media screen and (max-width: 480px) {
  .category-grid {
    grid-template-columns: 1fr;
  }

  .themes-grid {
    grid-template-columns: 1fr;
  }
}
