/* ==========================================================
   taiping.css — 太平村页面独有样式（手绘田野风格）
   ========================================================== */

/* --- 配色覆盖 --- */
:root {
  --color-primary: #606C38;
  --color-secondary: #FEFAE0;
  --color-accent: #BC6C25;
  --color-bg: #FFFDF5;
  --color-text: #3A3A3A;
  --color-text-light: #6b6b6b;
  --color-card-bg: #ffffff;
  --font-body: "Noto Sans SC", sans-serif;
  --font-heading: "Noto Sans SC", sans-serif;
  --color-border: rgba(96, 108, 56, 0.12);
  --shadow-card: 0 2px 12px rgba(96, 108, 56, 0.06);
  --shadow-card-hover: 0 8px 30px rgba(96, 108, 56, 0.12);
}

body {
  font-family: "Noto Sans SC", "Source Han Sans SC", "Microsoft YaHei", sans-serif;
  background-color: var(--color-bg);
  color: var(--color-text);
}

/* --- SVG Noise 纹理背景 --- */
.taiping-page {
  position: relative;
}

.taiping-page::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E"),
    radial-gradient(ellipse at 30% 70%, rgba(254, 250, 224, 0.6) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 30%, rgba(188, 108, 37, 0.04) 0%, transparent 50%);
  pointer-events: none;
  z-index: -1;
}

/* --- 手绘虚线边框装饰 --- */
.taiping-page::after {
  content: "";
  position: fixed;
  top: 50%;
  left: -20px;
  width: 60px;
  height: 60px;
  border: 2px dashed rgba(96, 108, 56, 0.12);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  transform: rotate(-15deg);
}

/* --- Hero 区域特殊样式 --- */
.hero {
  background:
    linear-gradient(
      170deg,
      #606C38 0%,
      #7a8a4a 25%,
      #9ab060 50%,
      #FEFAE0 100%
    );
  color: #fff;
  position: relative;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 70% 70%, rgba(254, 250, 224, 0.2) 0%, transparent 40%),
    radial-gradient(circle at 30% 30%, rgba(188, 108, 37, 0.08) 0%, transparent 40%);
  pointer-events: none;
}

/* 田野波浪底边 */
.hero::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 60px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 60'%3E%3Cpath d='M0,30 Q100,5 200,25 Q300,45 400,20 Q500,0 600,25 Q700,50 800,20 Q900,0 1000,30 Q1100,55 1200,20 L1200,60 L0,60 Z' fill='%23FFFDF5'/%3E%3C/svg%3E")
    no-repeat bottom center;
  background-size: 100% 100%;
  pointer-events: none;
}

.hero__title {
  color: #fff;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.1);
  position: relative;
  z-index: 1;
}

.hero__subtitle {
  color: rgba(255, 255, 255, 0.9);
  position: relative;
  z-index: 1;
}

.hero__tagline {
  color: rgba(255, 255, 255, 0.7);
  position: relative;
  z-index: 1;
}

/* --- 卡片 hover 微旋转效果 --- */
@media (prefers-reduced-motion: no-preference) {
  .card:hover {
    transform: rotate(-0.8deg) translateY(-4px);
  }

  .card:nth-child(even):hover {
    transform: rotate(0.8deg) translateY(-4px);
  }
}

/* --- 手绘虚线边框卡片变体 --- */
.card {
  border: 1.5px dashed rgba(96, 108, 56, 0.15);
  border-radius: var(--radius-md);
}

.card:hover {
  border-color: rgba(96, 108, 56, 0.3);
  border-style: solid;
}

/* --- 筛选器田野风格 --- */
/* 筛选器背景 */
.filter-bar {
  background: rgba(254, 250, 224, 0.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: rgba(96, 108, 56, 0.1);
}

.filter-btn {
  font-family: "Noto Sans SC", sans-serif;
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.filter-btn:hover {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

.filter-btn--active,
.filter-btn.active,
.filter-btn[aria-selected="true"] {
  background: var(--color-primary);
  color: #fff !important;
  border-color: var(--color-primary);
}

/* 太平村特有卡片样式 — 手绘边框 */
.card {
  border: 2px dashed rgba(96, 108, 56, 0.25);
  box-shadow: 0 4px 20px rgba(96, 108, 56, 0.1);
  border-radius: 16px;
}

.card:hover {
  border-color: rgba(96, 108, 56, 0.3);
  border-style: solid;
}

/* 推荐卡片 - 赭石色顶部色条 */
.card--featured {
  border-top: 4px solid var(--color-accent);
  border-style: solid;
}

/* 分组标题样式 — 手绘下划线 */
.group-header {
  border-bottom: none;
  position: relative;
}

.group-header::after {
  content: '';
  display: block;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, var(--color-primary) 0%, transparent 100%);
  margin-top: 12px;
}

/* --- 分组标题手绘下划线 --- */
.card-group__title {
  border-bottom-color: var(--color-accent);
  position: relative;
}

.card-group__title::after {
  content: "";
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 100%;
  height: 3px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 4'%3E%3Cpath d='M0,2 Q25,0 50,2 T100,2 T150,2 T200,2' stroke='%23BC6C25' stroke-width='2' fill='none' stroke-dasharray='6,4'/%3E%3C/svg%3E")
    repeat-x;
  background-size: 200px 4px;
}

/* --- 卡片样式微调 --- */
.card__category {
  color: var(--color-accent);
  background: rgba(188, 108, 37, 0.08);
  font-family: "Noto Sans SC", sans-serif;
}

.card__tag {
  background: rgba(254, 250, 224, 0.8);
  color: var(--color-primary);
}

/* --- 田野装饰（卡片角落） --- */
.taiping-field-ornament {
  position: relative;
}

.taiping-field-ornament::before {
  content: "🌾";
  position: absolute;
  top: -8px;
  right: 12px;
  font-size: 1.2rem;
  z-index: 2;
  opacity: 0.6;
  transition: opacity var(--transition-base);
}

.taiping-field-ornament:hover::before {
  opacity: 1;
}


/* --- 返回链接 --- */
.back-link {
  font-family: "Noto Sans SC", sans-serif;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(0, 0, 0, 0.15);
  border-color: rgba(255, 255, 255, 0.2);
}

.back-link:hover {
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
}

/* --- 地图区域 --- */
.map-section__container {
  border: 2px dashed rgba(96, 108, 56, 0.15);
  border-radius: var(--radius-md);
}

.map-section__container:hover {
  border-style: solid;
}

/* --- Footer --- */
.footer {
  border-top-color: rgba(96, 108, 56, 0.1);
}

.footer__link:hover {
  color: var(--color-accent);
}

/* --- 田野装饰角落 --- */
.taiping-page .field-deco-tl,
.taiping-page .field-deco-br {
  position: fixed;
  pointer-events: none;
  z-index: 0;
  opacity: 0.08;
  font-size: 2rem;
}

.taiping-page .field-deco-tl {
  top: 120px;
  left: 12px;
}

.taiping-page .field-deco-br {
  bottom: 40px;
  right: 12px;
  transform: rotate(20deg);
}

/* --- 村庄介绍栏目 --- */
.village-intro {
  background: linear-gradient(135deg, rgba(254, 250, 224, 0.6) 0%, rgba(255, 253, 245, 1) 100%);
  border-bottom: 1px solid var(--color-border);
  padding: 48px 24px;
}

.village-intro__inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.village-intro__title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 20px;
  position: relative;
  display: inline-block;
}

.village-intro__title::after {
  content: '';
  display: block;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--color-accent) 0%, transparent 100%);
  margin-top: 6px;
  border-radius: 2px;
}

.village-intro__text {
  font-size: 0.95rem;
  line-height: 1.85;
  color: var(--color-text);
  margin-bottom: 14px;
  max-width: 800px;
}

.village-intro__text:last-of-type {
  margin-bottom: 20px;
}

.village-intro__highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.village-intro__tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.82rem;
  padding: 6px 14px;
  background: var(--color-card-bg);
  border: 1.5px dashed rgba(96, 108, 56, 0.2);
  border-radius: 20px;
  color: var(--color-primary);
  font-weight: 500;
  white-space: nowrap;
}

.village-intro__tag:hover {
  border-style: solid;
  border-color: rgba(96, 108, 56, 0.35);
  background: rgba(254, 250, 224, 0.8);
}

@media (max-width: 640px) {
  .village-intro {
    padding: 32px 16px;
  }

  .village-intro__title {
    font-size: 1.25rem;
  }

  .village-intro__text {
    font-size: 0.88rem;
  }

  .village-intro__tag {
    font-size: 0.78rem;
    padding: 5px 10px;
  }
}

/* --- 动画微调 --- */
@media (prefers-reduced-motion: no-preference) {
  .hero__title {
    animation-name: fadeInUp;
  }

  .card {
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow var(--transition-base),
                border-color var(--transition-base),
                border-style var(--transition-base);
  }
}
