/* 山城漫游记 - 视觉规范 V1.0 */
:root {
  --mountain-green: #2d9d78;
  --green-light: #e8f5f1;
  --green-deep: #1a7a5c;
  --hotpot-orange: #ff7d4a;
  --warm-gold: #f5a623;
  --river-blue: #6b9fd4;
  --night-purple: #5c4b7d;
  --text-body: #333333;
  --text-title: #666666;
  --text-muted: #999999;
  --divider: #eeeeee;
  --bg-white: #ffffff;
  --card-gray: #f8f9fa;
  --success: #52c41a;
  --warning: #faad14;
  --error: #ff4d4f;
  --info: #1890ff;
  --nav-height: 64px;
  --content-max: 1280px;
  --gap-module: 48px;
  --gap-card: 24px;
  --radius-card: 12px;
  --radius-btn: 8px;
  --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-card-hover: 0 4px 16px rgba(0, 0, 0, 0.12);
  --font-sans: "Noto Sans SC", "Source Han Sans CN", "Microsoft YaHei", sans-serif;
  --font-num: "DIN Alternate", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-body);
  background: var(--bg-white);
  padding-bottom: env(safe-area-inset-bottom);
}

body.has-mobile-tab {
  padding-bottom: 72px;
}

a {
  color: var(--mountain-green);
  text-decoration: none;
}

a:hover {
  color: var(--green-deep);
}

img {
  max-width: 100%;
  display: block;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-height);
  background: var(--bg-white);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.header-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 48px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 18px;
  color: var(--text-body);
  white-space: nowrap;
}

.logo-mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--mountain-green), var(--river-blue));
  flex-shrink: 0;
}

.nav-main {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-main a {
  color: var(--text-title);
  font-weight: 500;
  padding: 20px 0;
  border-bottom: 3px solid transparent;
  margin-bottom: -3px;
  transition: color 0.2s, border-color 0.2s;
}

.nav-main a:hover,
.nav-main a.active {
  color: var(--mountain-green);
  border-bottom-color: var(--mountain-green);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  border-radius: var(--radius-btn);
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s, color 0.2s, border-color 0.2s;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--mountain-green);
  color: #fff;
}

.btn-primary:hover {
  background: var(--green-deep);
  color: #fff;
}

.btn-secondary {
  background: transparent;
  color: var(--mountain-green);
  border: 1px solid var(--mountain-green);
}

.btn-secondary:hover {
  background: var(--green-light);
}

.btn-ghost {
  background: transparent;
  color: var(--text-title);
  border: none;
  padding: 8px 12px;
}

.btn-ghost:hover {
  color: var(--text-body);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 13px;
}

.search-bar-wrap {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 24px 48px 0;
}

.search-bar {
  display: flex;
  align-items: center;
  height: 48px;
  max-width: 640px;
  margin: 0 auto;
  background: var(--card-gray);
  border: 1px solid var(--divider);
  border-radius: 24px;
  padding: 0 8px 0 16px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search-bar:focus-within {
  border: 2px solid var(--mountain-green);
  box-shadow: 0 0 0 2px rgba(45, 157, 120, 0.15);
}

.search-bar input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 14px;
  outline: none;
  color: var(--text-body);
}

.search-bar input::placeholder {
  color: var(--text-muted);
}

.wrap {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 48px;
}

.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: var(--gap-card);
}

.section-title {
  font-size: 28px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text-body);
  margin: 0;
}

.link-more {
  font-size: 14px;
  color: var(--mountain-green);
  font-weight: 500;
}

.link-more:hover {
  color: var(--green-deep);
}

.module {
  padding: var(--gap-module) 0;
}

.module-alt {
  background: var(--green-light);
}

/* Banner */
.banner {
  position: relative;
  height: 60vh;
  min-height: 320px;
  max-height: 720px;
  overflow: hidden;
  border-radius: 0 0 20px 20px;
}

.banner-slides {
  position: relative;
  width: 100%;
  height: 100%;
}

.banner-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.6s ease-in-out;
  pointer-events: none;
}

.banner-slide.active {
  opacity: 1;
  pointer-events: auto;
}

.banner-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(26, 122, 92, 0.35) 0%,
    rgba(92, 75, 125, 0.45) 100%
  );
}

.banner-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 12%;
  z-index: 2;
  color: #fff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
  padding: 0 48px;
  max-width: 1280px;
  margin: 0 auto;
  box-sizing: border-box;
}

.banner-caption h1 {
  font-size: clamp(28px, 4.5vw, 36px);
  font-weight: 600;
  line-height: 1.3;
  margin: 0 0 12px;
}

.banner-caption p {
  font-size: 16px;
  line-height: 1.6;
  margin: 0;
  opacity: 0.95;
  max-width: 560px;
}

.banner-dots {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 3;
}

.banner-dots button {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  padding: 0;
  transition: transform 0.2s, background 0.2s;
}

.banner-dots button.active {
  background: #fff;
  transform: scale(1.25);
}

/* 功能入口 */
.entries {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--gap-card);
  margin-top: calc(var(--gap-module) * -0.5);
  position: relative;
  z-index: 5;
}

.entry-card {
  background: var(--bg-white);
  border: 1px solid var(--divider);
  border-radius: var(--radius-card);
  padding: 28px 16px;
  text-align: center;
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.3s ease-out, transform 0.3s ease-out;
}

.entry-card:hover {
  box-shadow: var(--shadow-card-hover);
  transform: scale(1.02);
}

.entry-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: var(--green-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--mountain-green);
  transition: background 0.2s, color 0.2s;
}

.entry-card:hover .entry-icon {
  background: var(--mountain-green);
  color: #fff;
}

.entry-card h3 {
  font-size: 16px;
  font-weight: 500;
  margin: 0;
  color: var(--text-body);
}

.entry-card a {
  color: inherit;
  display: block;
}

/* 主题推荐大图 */
.theme-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap-card);
}

.theme-card {
  position: relative;
  border-radius: var(--radius-card);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  box-shadow: var(--shadow-card);
}

.theme-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease-out;
}

.theme-card:hover img {
  transform: scale(1.05);
}

.theme-card-body {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 20px 16px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.75));
  color: #fff;
}

.theme-card-body h3 {
  font-size: 20px;
  font-weight: 500;
  margin: 0 0 4px;
}

.theme-card-body p {
  font-size: 12px;
  margin: 0;
  opacity: 0.9;
}

/* 景点卡片 */
.card-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--gap-card);
}

.spot-card {
  background: var(--bg-white);
  border: 1px solid var(--divider);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.3s ease-out, transform 0.3s ease-out;
}

.spot-card:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-2px);
}

.spot-card .thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.spot-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease-out;
}

.spot-card:hover .thumb img {
  transform: scale(1.05);
}

.badge-hot {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--hotpot-orange);
  color: #fff;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 6px;
  font-weight: 500;
}

.spot-card-body {
  padding: 16px;
}

.spot-card-body h3 {
  font-size: 20px;
  font-weight: 500;
  margin: 0 0 6px;
  color: var(--text-body);
}

.spot-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.spot-meta .star {
  color: var(--warm-gold);
  font-family: var(--font-num);
}

.spot-desc {
  font-size: 14px;
  color: var(--text-body);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 10px;
}

.spot-price {
  font-size: 14px;
  font-weight: 600;
  color: var(--hotpot-orange);
  font-family: var(--font-num);
}

/* 游记横向 */
.notes-scroll {
  display: flex;
  gap: var(--gap-card);
  overflow-x: auto;
  padding-bottom: 8px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.notes-scroll::-webkit-scrollbar {
  height: 6px;
}

.notes-scroll::-webkit-scrollbar-thumb {
  background: var(--divider);
  border-radius: 3px;
}

.note-card {
  flex: 0 0 min(420px, 85vw);
  scroll-snap-align: start;
  display: flex;
  gap: 16px;
  height: 180px;
  background: var(--bg-white);
  border: 1px solid var(--divider);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.3s;
}

.note-card:hover {
  box-shadow: var(--shadow-card-hover);
}

.note-card .note-img {
  width: 240px;
  flex-shrink: 0;
  height: 100%;
}

.note-card .note-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.note-card .note-text {
  padding: 14px 16px 14px 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.note-card h3 {
  font-size: 18px;
  font-weight: 500;
  margin: 0 0 6px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.note-card .note-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.note-card .note-author {
  font-size: 12px;
  color: var(--text-title);
  margin-bottom: 6px;
}

.note-card .note-snippet {
  font-size: 13px;
  color: var(--text-body);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 美食三列 */
.food-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap-card);
}

.food-card {
  border-radius: var(--radius-card);
  overflow: hidden;
  border: 1px solid var(--divider);
  background: var(--bg-white);
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.3s, transform 0.3s;
}

.food-card:hover {
  box-shadow: var(--shadow-card-hover);
  transform: scale(1.02);
}

.food-card .food-img {
  aspect-ratio: 16 / 11;
  overflow: hidden;
}

.food-card .food-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.food-card-body {
  padding: 16px;
}

.tag-pill {
  display: inline-block;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 6px;
  background: var(--green-light);
  color: var(--mountain-green);
  margin-bottom: 8px;
}

.food-card-body h3 {
  font-size: 18px;
  margin: 0 0 6px;
}

.food-card-body p {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
}

/* 页脚 */
.site-footer {
  background: var(--card-gray);
  border-top: 1px solid var(--divider);
  padding: 40px 48px 32px;
  margin-top: var(--gap-module);
}

.footer-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
}

.site-footer h4 {
  font-size: 16px;
  margin: 0 0 12px;
  color: var(--text-body);
}

.site-footer p,
.site-footer a {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.7;
}

.site-footer a:hover {
  color: var(--mountain-green);
}

.footer-bottom {
  max-width: var(--content-max);
  margin: 28px auto 0;
  padding-top: 20px;
  border-top: 1px solid var(--divider);
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
}

/* 移动端底部 Tab */
.mobile-tab {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 56px;
  background: var(--bg-white);
  border-top: 1px solid var(--divider);
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.06);
  z-index: 99;
  padding-bottom: env(safe-area-inset-bottom);
}

.mobile-tab-inner {
  display: flex;
  height: 56px;
  max-width: var(--content-max);
  margin: 0 auto;
}

.mobile-tab a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 11px;
  color: var(--text-muted);
  min-height: 44px;
}

.mobile-tab a.active {
  color: var(--mountain-green);
  font-weight: 500;
}

.mobile-tab svg {
  width: 22px;
  height: 22px;
}

/* 汉堡菜单 */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  color: var(--text-body);
}

/* 筛选栏 */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  padding: 20px 0;
  border-bottom: 1px solid var(--divider);
  margin-bottom: var(--gap-card);
}

.filter-bar label {
  font-size: 13px;
  color: var(--text-title);
}

.filter-bar select {
  padding: 8px 12px;
  border: 1px solid var(--divider);
  border-radius: 8px;
  font-size: 14px;
  background: var(--bg-white);
  color: var(--text-body);
}

/* 瀑布流列表页 */
.masonry {
  column-count: 4;
  column-gap: var(--gap-card);
}

.masonry .spot-card {
  break-inside: avoid;
  margin-bottom: var(--gap-card);
}

/* 详情页 */
.detail-hero {
  position: relative;
  border-radius: var(--radius-card);
  overflow: hidden;
  aspect-ratio: 21 / 9;
  min-height: 240px;
}

.detail-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-head {
  padding: 28px 0;
}

.detail-head h1 {
  font-size: 36px;
  font-weight: 600;
  margin: 0 0 12px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 14px;
  color: var(--text-muted);
}

.detail-meta .rating {
  color: var(--warm-gold);
  font-family: var(--font-num);
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.content-block {
  padding: 28px 0;
  border-top: 1px solid var(--divider);
}

.content-block h2 {
  font-size: 22px;
  font-weight: 600;
  margin: 0 0 16px;
}

.sub-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.sub-tabs span {
  padding: 6px 14px;
  background: var(--green-light);
  color: var(--mountain-green);
  border-radius: 8px;
  font-size: 13px;
}

.review-item {
  padding: 16px;
  background: var(--card-gray);
  border-radius: var(--radius-card);
  margin-bottom: 12px;
}

.review-item .review-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 13px;
}

.review-item .avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--green-light);
  flex-shrink: 0;
}

/* 行程规划表单 */
.plan-form {
  max-width: 640px;
  background: var(--card-gray);
  border: 1px solid var(--divider);
  border-radius: var(--radius-card);
  padding: 28px;
}

.form-row {
  margin-bottom: 18px;
}

.form-row label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--text-body);
}

.form-row input,
.form-row select,
.form-row textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--divider);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
}

.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  outline: none;
  border: 2px solid var(--mountain-green);
}

.prefs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.prefs label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 400;
  cursor: pointer;
}

.plan-result {
  margin-top: 28px;
  padding: 24px;
  background: var(--green-light);
  border-radius: var(--radius-card);
  border: 1px solid rgba(45, 157, 120, 0.25);
}

.plan-result h3 {
  margin: 0 0 12px;
  font-size: 18px;
}

.plan-day {
  margin-bottom: 16px;
  padding-left: 12px;
  border-left: 3px solid var(--mountain-green);
}

.plan-day h4 {
  margin: 0 0 8px;
  font-size: 15px;
}

.plan-day ul {
  margin: 0;
  padding-left: 18px;
  color: var(--text-title);
  font-size: 14px;
}

.stay-regions {
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

@media (max-width: 768px) {
  .stay-regions {
    grid-template-columns: 1fr;
  }
}

/* 响应式 */
@media (max-width: 1200px) {
  .card-grid-4,
  .masonry {
    column-count: 3;
  }

  .entries {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 1024px) {
  .header-inner,
  .wrap,
  .search-bar-wrap {
    padding-left: 32px;
    padding-right: 32px;
  }

  .banner-caption {
    padding-left: 32px;
    padding-right: 32px;
  }

  .card-grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .masonry {
    column-count: 2;
  }

  .theme-grid,
  .food-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .header-inner,
  .wrap,
  .search-bar-wrap,
  .site-footer {
    padding-left: 16px;
    padding-right: 16px;
  }

  .banner-caption {
    padding: 0 16px;
    max-width: none;
  }

  .banner {
    height: 50vh;
    min-height: 280px;
    border-radius: 0;
  }

  .nav-main {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--bg-white);
    flex-direction: column;
    gap: 0;
    padding: 12px 16px 20px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
    border-top: 1px solid var(--divider);
  }

  .nav-main.open {
    display: flex;
  }

  .nav-main a {
    padding: 14px 0;
    border-bottom: 1px solid var(--divider);
    margin-bottom: 0;
    border-left: none;
  }

  .nav-main a.active {
    border-bottom-color: var(--divider);
    border-left: 3px solid var(--mountain-green);
    padding-left: 8px;
  }

  .menu-toggle {
    display: block;
  }

  .header-actions .btn-ghost {
    display: none;
  }

  .entries {
    grid-template-columns: repeat(2, 1fr);
    margin-top: 16px;
  }

  .entry-card {
    padding: 20px 12px;
  }

  .theme-grid,
  .food-grid {
    grid-template-columns: 1fr;
  }

  .card-grid-4 {
    grid-template-columns: 1fr;
  }

  .masonry {
    column-count: 1;
  }

  .note-card {
    flex: 0 0 90vw;
  }

  .note-card .note-img {
    width: 120px;
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }

  .mobile-tab {
    display: block;
  }

  body.has-mobile-tab {
    padding-bottom: 72px;
  }

  .module {
    padding: 32px 0;
  }

  .section-title {
    font-size: 22px;
  }

  .detail-head h1 {
    font-size: 26px;
  }
}
