/* ============================================
   China Train Travel - 主样式表
   面向外国游客的中国火车票预订网站
   ============================================ */

/* --- CSS 变量 --- */
:root {
  --color-primary: #1a5276;
  --color-primary-light: #2980b9;
  --color-primary-dark: #0F3545;
  --color-accent: #F28A1A;
  --color-accent-hover: #d35400;
  --color-text: #2c3e50;
  --color-text-light: #5d6d7e;
  --color-bg: #ffffff;
  --color-bg-light: #f8f9fa;
  --color-bg-warm: #fdf6ec;
  --color-border: #dee2e6;
  --color-success: #27ae60;
  --color-error: #c0392b;

  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-heading: Georgia, "Times New Roman", serif;

  --max-width: 1280px;
  --header-height: 64px;
  --radius: 6px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);

  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2.5rem;
  --space-2xl: 4rem;
}

/* --- 重置 --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-primary-light);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--color-accent);
}

/* --- 排版 --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--color-primary-dark);
  line-height: 1.3;
  margin-bottom: var(--space-md);
}

h1 { font-size: 2.2rem; }
h2 { font-size: 1.7rem; }
h3 { font-size: 1.35rem; }
h4 { font-size: 1.1rem; }

p {
  margin-bottom: var(--space-md);
}

/* --- 布局 --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

/* From ↔ To 交换按钮（全局可复用） */
.swap-btn {
  background: var(--color-bg-light);
  border: 1px solid var(--color-border);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  cursor: pointer;
  color: var(--color-primary);
  font-size: 1.1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, transform 0.2s;
}
.swap-btn:hover {
  background: var(--color-primary-light);
  color: #fff;
}
.swap-btn:active {
  transform: rotate(180deg);
}

.main-content {
  flex: 1;
  padding: var(--space-xl) 0;
}

/* 订票页和首页 Hero 紧贴 header，不需要顶部 padding */
.page-book .main-content,
.page-home .main-content,
.page-route .main-content,
.page-routes .main-content,
.page-faq .main-content,
.page-about .main-content,
.page-contact .main-content,
.page-terms .main-content {
  padding-top: 0;
}

/* --- 头部 --- */
.site-header {
  background: var(--color-primary-dark);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
}

.site-logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-heading);
  font-size: 1.3rem;
  color: #fff;
  font-weight: 700;
  letter-spacing: -0.5px;
  text-decoration: none;
}

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

.site-logo-img {
  height: 32px;
  width: auto;
  object-fit: contain;
  flex-shrink: 0;
}

.site-logo-text {
  white-space: nowrap;
  color: #F6F1E8;
}

/* --- 导航 --- */
.main-nav {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.main-nav a {
  color: #DDE7EA;
  font-size: 0.95rem;
  padding: var(--space-sm) 0;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.main-nav a:hover,
.main-nav a.active {
  color: #fff;
  border-bottom-color: var(--color-accent);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  padding: var(--space-sm);
  min-width: 44px;
  min-height: 44px;
}

/* 通用：视觉隐藏但屏幕阅读器可读（无障碍 label 用） */
.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;
}

/* 通用：在窄屏（手机端）隐藏元素，桌面正常显示。
   DOM 保留，搜索引擎和 AI 引擎依然能读到内容。 */
@media (max-width: 768px) {
  .hide-on-mobile {
    display: none !important;
  }
}

/* --- 搜索框组件 --- */
.search-box {
  background: var(--color-bg);
  border-radius: 10px;
  padding: var(--space-lg);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.22), 0 2px 6px rgba(0, 0, 0, 0.08);
  max-width: 980px;
  margin: 0 auto;
}

.search-box h2 {
  text-align: center;
  margin-bottom: var(--space-lg);
  font-size: 1.4rem;
}

/* 搜索框外层包裹（用来承载顶部的 trip-type tabs + 搜索框本身） */
.search-box-wrap {
  max-width: 980px;
  margin: 0 auto;
}

/* 行程类型 tabs：胶囊样式（rail.ninja 风，hero 深色背景上） */
.trip-type-tabs {
  display: inline-flex;
  background: rgba(255, 255, 255, 0.16);
  padding: 4px;
  border-radius: 999px;
  margin-bottom: var(--space-md);
  gap: 2px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.trip-type-tab {
  background: transparent;
  border: 0;
  padding: 0.5rem 1.4rem;
  font-size: 0.92rem;
  font-weight: 500;
  font-family: var(--font-body);
  color: rgba(255, 255, 255, 0.78);
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
  letter-spacing: 0.01em;
}

.trip-type-tab:hover {
  color: #fff;
}

.trip-type-tab.is-active {
  background: #fff;
  color: var(--color-accent);
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

/* Grid 布局：桌面端一行（From | swap | To | Date | Button），移动端单列 */
.search-form {
  display: grid;
  grid-template-columns: 1fr auto 1fr 200px auto;
  gap: var(--space-sm);
  align-items: stretch;
}

/* round trip 模式：增加 Return date 列 */
.search-form[data-trip-type="round-trip"] {
  grid-template-columns: 1fr auto 1fr 170px 170px auto;
}

/* swap 按钮垂直居中（label 已隐藏，不需要对齐到底部） */
.search-form .swap-btn {
  align-self: center;
  margin-bottom: 0;
}

.search-form .field {
  min-width: 0;
  position: relative;
}

/* 视觉 label 已隐藏，input 占满容器高度 */
.search-form label {
  /* 保留 visually-hidden 行为，由 .visually-hidden 类提供 */
}

/* 字段内左侧图标（仅桌面端显示） */
.search-form .field-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-light);
  pointer-events: none;
  display: inline-flex;
}

.search-form .field.has-icon input {
  padding-left: 2.4rem;
}

.search-form input,
.search-form select {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: var(--font-body);
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
  height: 44px;
}

.search-form input::placeholder {
  color: var(--color-text-light);
  opacity: 1;
}

.search-form input:hover,
.search-form select:hover {
  border-color: var(--color-text-light);
}

.search-form input:focus,
.search-form select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(26, 82, 118, 0.18);
}

/* 聚焦时图标点亮品牌色 */
.search-form .field.has-icon:focus-within .field-icon {
  color: var(--color-primary);
}

.btn-search {
  background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-hover) 100%);
  color: #fff;
  border: none;
  padding: 0.7rem 1.4rem;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  min-height: 44px;
  height: 44px;
  white-space: nowrap;
  transition: transform 0.15s, box-shadow 0.2s, filter 0.2s;
  box-shadow: 0 2px 8px rgba(242, 138, 26, 0.35);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-search:hover {
  filter: brightness(1.05);
  box-shadow: 0 4px 14px rgba(242, 138, 26, 0.5);
  transform: translateY(-1px);
}

.btn-search:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(242, 138, 26, 0.35);
}

/* 中等屏幕（≤900px）：把 Date 换行（两行布局：From|swap|To 一行，Date|Button 一行）。
   仅适用于 one-way；round-trip 字段较多，直接堆叠。 */
@media (max-width: 900px) and (min-width: 769px) {
  .search-form[data-trip-type="one-way"] {
    grid-template-columns: 1fr auto 1fr;
  }
  .search-form[data-trip-type="one-way"] .field-date {
    grid-column: 1 / 2;
  }
  .search-form[data-trip-type="one-way"] .btn-search {
    grid-column: 2 / 4;
  }
}

/* 平板和手机（≤768px）：单列堆叠，swap 居中圆形按钮放 From 和 To 之间 */
@media (max-width: 768px) {
  .search-box {
    padding: var(--space-md);
    border-radius: 8px;
    max-width: 100%;
  }
  .search-form,
  .search-form[data-trip-type="round-trip"] {
    grid-template-columns: 1fr;
    gap: var(--space-sm);
  }
  .search-form .field-date,
  .search-form .field-return,
  .search-form .btn-search {
    grid-column: 1;
  }
  .search-form .swap-btn {
    justify-self: center;
    margin: 0;
    transform: rotate(90deg);
  }
  .search-form .swap-btn:active {
    transform: rotate(270deg);
  }
  .btn-search {
    width: 100%;
    margin-top: var(--space-xs);
    height: 48px;
    font-size: 1.05rem;
  }
}

/* --- 搜索历史 --- */
.search-history-wrap {
  position: relative;
  max-width: 980px;
  margin: var(--space-md) auto 0;
  display: flex;
  justify-content: flex-end;
}

.search-history-trigger {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  transition: background 0.15s, border-color 0.15s;
}

.search-history-trigger:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
}

.search-history-chevron {
  transition: transform 0.2s;
}

.search-history-trigger[aria-expanded="true"] .search-history-chevron {
  transform: rotate(180deg);
}

.search-history-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 50;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18), 0 2px 8px rgba(0, 0, 0, 0.08);
  min-width: 320px;
  max-width: 420px;
  overflow: hidden;
  animation: search-history-fade 0.18s ease-out;
}

@keyframes search-history-fade {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.search-history-list {
  list-style: none;
  margin: 0;
  padding: 0.4rem 0;
  max-height: 360px;
  overflow-y: auto;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.search-history-list.is-clearing {
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
}

.search-history-item {
  margin: 0;
}

.search-history-btn {
  width: 100%;
  background: none;
  border: 0;
  padding: 0.65rem 1.1rem;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--color-text);
  font-family: var(--font-body);
  transition: background 0.12s;
}

.search-history-btn:hover,
.search-history-btn:focus-visible {
  background: var(--color-bg-light);
  outline: none;
}

.search-history-icon {
  flex-shrink: 0;
  color: var(--color-text-light);
  display: inline-flex;
}

.search-history-route {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.search-history-cities {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-primary-dark);
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-history-arrow {
  color: var(--color-accent);
  margin: 0 0.35em;
  font-weight: 700;
}

.search-history-meta {
  font-size: 0.78rem;
  color: var(--color-text-light);
  margin-top: 2px;
}

.search-history-clear {
  width: 100%;
  background: var(--color-bg-light);
  border: 0;
  border-top: 1px solid var(--color-border);
  color: var(--color-text-light);
  padding: 0.65rem;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  font-family: var(--font-body);
  transition: background 0.12s, color 0.12s;
}

.search-history-clear:hover {
  background: #fff0e6;
  color: var(--color-accent);
}

@media (max-width: 768px) {
  .search-history-wrap {
    justify-content: stretch;
  }
  .search-history-trigger {
    width: 100%;
    justify-content: center;
  }
  .search-history-panel {
    left: 0;
    right: 0;
    min-width: 0;
    max-width: 100%;
  }
}

/* 通用轻量 toast（用于搜索历史清空等反馈） */
.app-toast {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translate(-50%, -8px);
  background: var(--color-primary-dark);
  color: #fff;
  padding: 0.7rem 1.2rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.22s ease, transform 0.22s ease;
  pointer-events: none;
}

.app-toast.is-show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* --- Hero 区域 --- */
.hero {
  background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 100%);
  color: #fff;
  padding: var(--space-2xl) 0;
  text-align: center;
}

.hero-bg {
  background: linear-gradient(to bottom right, rgba(9, 54, 78, 1), rgba(16, 95, 130, 0.35)),
              url('/assets/images/hero-train.webp') center/cover no-repeat;
  padding: var(--space-2xl) 0 calc(var(--space-2xl) + 1rem);
  min-height: 540px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero h1 {
  color: #fff;
  font-size: 2.4rem;
  margin-bottom: var(--space-md);
}

.hero p {
  font-size: 1.15rem;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto var(--space-xl);
}

/* --- 为什么选择高铁 --- */
.why-hsr {
  padding: var(--space-2xl) 0;
  background: var(--color-bg-light);
}

.why-hsr h2 {
  text-align: center;
}

.why-hsr-header {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: center;
  margin-bottom: var(--space-xl);
}

.why-hsr-image img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}

.why-hsr-text h2 {
  text-align: left;
}

.why-hsr-text .section-lead {
  text-align: left;
  margin: 0;
}

@media (max-width: 767px) {
  .why-hsr-header {
    grid-template-columns: 1fr;
  }
  .why-hsr-text h2 {
    text-align: center;
  }
  .why-hsr-text .section-lead {
    text-align: center;
  }
}

/* --- 热门线路区域（带背景图） --- */
.popular-routes-section {
  padding: var(--space-2xl) 0;
  background: linear-gradient(rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.88)),
              url('/assets/images/viaduct-aerial.webp') center/cover no-repeat fixed;
}

.popular-routes-section h2 {
  text-align: center;
}

.popular-routes-section > .container > p {
  text-align: center;
  max-width: 680px;
  margin: 0 auto var(--space-xl);
  color: var(--color-text-light);
}

.section-lead {
  text-align: center;
  max-width: 680px;
  margin: 0 auto var(--space-xl);
  color: var(--color-text-light);
  font-size: 1.05rem;
}

/* 数据亮点 */
.hsr-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-lg);
  margin-bottom: var(--space-2xl);
}

.hsr-stat {
  text-align: center;
  padding: var(--space-lg) var(--space-md);
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.hsr-stat-number {
  display: block;
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--color-primary);
  line-height: 1.1;
  font-family: var(--font-body);
}

.hsr-stat-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text);
  margin-top: var(--space-xs);
}

.hsr-stat-note {
  display: block;
  font-size: 0.8rem;
  color: var(--color-text-light);
  margin-top: var(--space-xs);
}

/* 优势列表 */
.hsr-advantages {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
}

.hsr-adv {
  padding: var(--space-lg);
  background: #fff;
  border-radius: var(--radius);
  border-left: 3px solid var(--color-accent);
}

.hsr-adv h3 {
  font-size: 1.05rem;
  margin-bottom: var(--space-sm);
  color: var(--color-primary-dark);
}

.hsr-adv p {
  color: var(--color-text-light);
  font-size: 0.93rem;
  margin: 0;
}

@media (max-width: 960px) {
  .hsr-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 767px) {
  .hsr-stats {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
  }
  .hsr-advantages {
    grid-template-columns: 1fr;
  }
}

/* --- 卡片 --- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-lg);
  margin: var(--space-xl) 0;
}

.card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: var(--space-lg);
  transition: box-shadow 0.2s, transform 0.2s;
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card h3 {
  font-size: 1.15rem;
  margin-bottom: var(--space-sm);
}

.card-icon {
  color: var(--color-primary-light);
  margin-bottom: var(--space-md);
}

.card-icon svg {
  display: block;
}

/* 图标在文字左侧的卡片布局 */
.card-with-icon .card-body {
  display: flex;
  gap: var(--space-md);
  align-items: flex-start;
}

.card-body-icon {
  flex-shrink: 0;
  color: #9ca3af;
  opacity: 0.7;
}

.card-body-icon svg {
  display: block;
}

.card-with-icon .card-body p {
  margin: 0;
  flex: 1;
}

.card p {
  color: var(--color-text-light);
  font-size: 0.95rem;
}

.card-link {
  display: inline-block;
  margin-top: var(--space-md);
  color: var(--color-accent);
  font-weight: 500;
  font-size: 0.9rem;
}

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

/* --- 信息页 Hero（About / Contact / Terms / FAQ）--- */
.info-hero {
  background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 60%, #1a6b8a 100%);
  color: #fff;
  padding: var(--space-xl) 0;
  text-align: center;
}

.info-hero.has-bg {
  background: linear-gradient(to bottom right, rgba(9, 54, 78, 0.82), rgba(16, 95, 130, 0.5)),
              url('/assets/images/routes/routes-default.webp') center/cover no-repeat;
  padding: var(--space-xl) 0 var(--space-2xl);
  min-height: 420px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.info-hero h1 {
  color: #fff;
  font-size: 2.2rem;
  margin-bottom: var(--space-sm);
}

.info-hero .breadcrumb-light,
.info-hero .breadcrumb-light a,
.info-hero .breadcrumb-light span {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.85rem;
}

.info-hero .breadcrumb-light a:hover {
  color: #fff;
}

.info-hero .info-hero-subtitle {
  font-size: 1.05rem;
  opacity: 0.9;
  max-width: 640px;
  margin: 0 auto;
}

/* --- 内容页面 --- */
.page-content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-xl) var(--space-lg);
}

.page-content h1 {
  margin-bottom: var(--space-lg);
}

.page-content h2 {
  margin-top: var(--space-xl);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--color-border);
}

.page-content ul,
.page-content ol {
  margin: var(--space-md) 0;
  padding-left: var(--space-lg);
}

.page-content li {
  margin-bottom: var(--space-sm);
}

/* --- Terms & Conditions 页面 --- */
.page-terms-content {
  max-width: 820px;
}

.terms-toc {
  background: var(--color-bg-light);
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius);
  margin: var(--space-lg) 0 var(--space-xl);
}

.terms-toc strong {
  display: inline-block;
  margin-right: var(--space-md);
  color: var(--color-text);
}

.terms-toc ul {
  list-style: none;
  padding: 0;
  margin: var(--space-sm) 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm) var(--space-lg);
}

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

.terms-toc a:hover {
  text-decoration: underline;
}

.terms-section {
  margin-top: var(--space-2xl);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--color-border);
  scroll-margin-top: 80px;
}

.terms-section:first-of-type {
  border-top: none;
  margin-top: var(--space-xl);
}

.terms-section h2 {
  border-top: none;
  padding-top: 0;
  margin-top: 0;
}

.terms-section h3 {
  margin-top: var(--space-lg);
  font-size: 1rem;
  color: var(--color-primary-dark);
}

.terms-highlight {
  background: var(--color-bg-light);
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius);
  margin: var(--space-md) 0;
  border-left: 3px solid var(--color-accent);
}

.terms-highlight h3 {
  margin-top: 0;
  color: var(--color-accent-hover);
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.terms-highlight p {
  margin: var(--space-xs) 0 0;
}

.terms-footer-note {
  margin-top: var(--space-2xl);
  padding: var(--space-lg);
  background: var(--color-bg-light);
  border-radius: var(--radius);
  font-size: 0.9rem;
  color: var(--color-text-light);
  text-align: center;
}

.terms-footer-note p {
  margin: 0;
}

/* --- Contact 页面 --- */
.page-contact-content {
  max-width: 960px;
}

.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2xl);
  margin-top: var(--space-xl);
  align-items: start;
}

@media (max-width: 767px) {
  .contact-layout {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }
}

.contact-intro h1 {
  margin-bottom: var(--space-md);
}

.contact-details {
  margin-top: var(--space-xl);
}

.contact-details h2 {
  font-size: 1rem;
  margin-top: var(--space-lg);
  padding-top: 0;
  border-top: none;
}

.contact-details ul {
  margin: var(--space-sm) 0;
  padding-left: var(--space-lg);
}

.contact-details li {
  margin-bottom: var(--space-xs);
  color: var(--color-text-light);
}

/* 表单卡片 */
.contact-form-wrap {
  position: sticky;
  top: calc(var(--header-height) + var(--space-lg));
}

.contact-form {
  background: var(--color-bg-light);
  padding: var(--space-xl);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.contact-form h2 {
  font-size: 1.1rem;
  margin-top: 0;
  margin-bottom: var(--space-lg);
  padding-top: 0;
  border-top: none;
}

.contact-field {
  display: flex;
  flex-direction: column;
  margin-bottom: var(--space-md);
}

.contact-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-xs);
}

.contact-label .required {
  color: var(--color-accent);
}

.contact-field input,
.contact-field textarea {
  padding: 12px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-family: inherit;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.contact-field input:focus,
.contact-field textarea:focus {
  outline: none;
  border-color: var(--color-primary-light);
  box-shadow: 0 0 0 3px rgba(41, 128, 185, 0.12);
}

.contact-field textarea {
  resize: vertical;
  min-height: 140px;
}

.contact-submit {
  display: block;
  width: 100%;
  padding: 14px;
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
  margin-top: var(--space-md);
}

.contact-submit:hover {
  background: var(--color-primary-light);
}

.contact-submit:active {
  transform: scale(0.98);
}

.contact-form-note {
  margin-top: var(--space-md);
  font-size: 0.8rem;
  color: var(--color-text-light);
  text-align: center;
}

.contact-result {
  margin-top: var(--space-md);
  padding: 12px 16px;
  border-radius: 6px;
  font-size: 0.9rem;
  text-align: center;
}
.contact-result-success {
  background: #e7f7ef;
  color: #1a7f4b;
  border: 1px solid #b7e4c7;
}
.contact-result-error {
  background: #fde8e8;
  color: #c0392b;
  border: 1px solid #f5c6cb;
}

.contact-success {
  text-align: center;
  padding: var(--space-xl) var(--space-md);
}
.contact-success-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto var(--space-md);
  background: #27ae60;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: bold;
}
.contact-success h2 {
  color: #1a5276;
  margin: 0 0 var(--space-sm);
}
.contact-success p {
  color: var(--color-text-light);
  margin: var(--space-xs) 0;
}

/* 发送中蒙版 */
.contact-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.9);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border-radius: 8px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  z-index: 10;
}
.contact-overlay.active {
  opacity: 1;
  pointer-events: all;
}
.contact-overlay p {
  color: var(--color-text-light);
  font-size: 0.9rem;
  margin: 0;
}
.contact-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid #e0e6ed;
  border-top-color: #e67e22;
  border-radius: 50%;
  animation: contact-spin 0.7s linear infinite;
}
@keyframes contact-spin {
  to { transform: rotate(360deg); }
}

/* --- Book Train Tickets 页面 --- */
.book-hero {
  background: linear-gradient(135deg, rgba(9, 54, 78, 0.44) 0%, rgba(16, 95, 130, 0.42) 100%),
              url('/assets/images/china-train-ticket-booking-hero-bg.webp') center/cover no-repeat;
  color: #fff;
  padding: var(--space-2xl) 0 var(--space-xl);
  text-align: center;
}

.book-hero-inner {
  display: block;
}

.book-hero h1 {
  color: #fff;
  font-size: 2.2rem;
  margin-bottom: var(--space-sm);
}

.book-hero-lead {
  font-size: 1.1rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.88);
  max-width: 600px;
  margin: 0 auto var(--space-lg);
}

.book-hero-copy {
  margin-bottom: var(--space-lg);
}

.book-hero-trust {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: var(--space-md);
}

.book-hero-trust span {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
}

.book-search-card {
  background: #fff;
  color: var(--color-text);
  border-radius: 18px;
  padding: var(--space-xl);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.22);
  max-width: 780px;
  margin: 0 auto;
  margin-top: calc(-1 * var(--space-md));
  position: relative;
  z-index: 2;
}

.book-search-card h2 {
  margin-top: 0;
  margin-bottom: var(--space-xs);
  border-top: none;
  padding-top: 0;
  color: var(--color-primary-dark);
}

.book-search-hint {
  color: var(--color-text-light);
  font-size: 0.9rem;
  margin-bottom: var(--space-lg);
}

.book-search-form {
  display: grid;
  grid-template-columns: 1fr 1fr 140px auto;
  gap: var(--space-md);
  align-items: end;
}

@media (max-width: 767px) {
  .book-search-form {
    grid-template-columns: 1fr;
  }

  .book-search-form .btn-search {
    width: 100%;
  }
}

/* How it works */
.book-how-it-works {
  padding: var(--space-2xl) 0;
  background: var(--color-bg-light);
}

.book-how-it-works h2 {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.book-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-lg);
}

.book-step {
  text-align: center;
  padding: var(--space-lg) var(--space-md);
}

.book-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--color-primary);
  color: #fff;
  border-radius: 50%;
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: var(--space-md);
}

.book-step h3 {
  font-size: 1rem;
  margin-bottom: var(--space-xs);
}

.book-step p {
  font-size: 0.9rem;
  color: var(--color-text-light);
  margin: 0;
}

@media (max-width: 767px) {
  .book-steps {
    grid-template-columns: 1fr 1fr;
  }
}

/* Why book through us */
.book-why {
  padding: var(--space-2xl) 0;
}

.book-why h2 {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.book-why-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

.book-why-item {
  padding: 28px 28px 32px;
  background: #f8fafc;
  border: 1px solid #e6edf3;
  border-radius: 16px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.book-why-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(15, 40, 60, 0.08);
}

.book-why-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin-bottom: var(--space-md);
  color: var(--color-primary);
}

.book-why-item h3 {
  font-size: 1rem;
  margin-bottom: var(--space-sm);
  color: var(--color-primary-dark);
}

.book-why-item p {
  font-size: 0.9rem;
  color: #4a6275;
  margin: 0;
  line-height: 1.6;
}

@media (max-width: 1023px) and (min-width: 768px) {
  .book-why-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 767px) {
  .book-why-grid {
    grid-template-columns: 1fr;
  }
}

/* Payment */
.book-payment {
  padding: var(--space-xl) 0 var(--space-2xl);
  text-align: center;
}

.book-payment h2 {
  margin-bottom: var(--space-md);
}

.book-payment-list {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-text);
}

.book-payment-note {
  font-size: 0.85rem;
  color: var(--color-text-light);
  margin-top: var(--space-xs);
}

/* Book Guide (How to Book as a Foreigner) */
.book-guide {
  padding: var(--space-2xl) 0;
  background: #f8fafc;
}

.book-guide > .container > h2 {
  text-align: center;
  margin-bottom: var(--space-md);
}

.book-guide > .container > p {
  text-align: center;
  max-width: 700px;
  margin: 0 auto var(--space-xl);
  color: var(--color-text-light);
  line-height: 1.7;
}

.book-guide-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
}

.book-guide-item {
  padding: var(--space-lg);
  background: #fff;
  border: 1px solid #e6edf3;
  border-radius: 12px;
}

.book-guide-item h3 {
  font-size: 1rem;
  margin-bottom: var(--space-sm);
  color: var(--color-primary-dark);
}

.book-guide-item p {
  font-size: 0.9rem;
  color: #4a6275;
  margin: 0;
  line-height: 1.6;
}

@media (max-width: 767px) {
  .book-guide-grid {
    grid-template-columns: 1fr;
  }
}

/* Popular Routes */
.book-popular-routes {
  padding: var(--space-xl) 0;
}

.book-popular-routes h2 {
  text-align: center;
  margin-bottom: var(--space-sm);
}

.book-popular-routes > .container > p {
  text-align: center;
  color: var(--color-text-light);
  margin-bottom: var(--space-lg);
}

.popular-routes-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-sm) var(--space-md);
}

.popular-routes-grid a {
  display: block;
  padding: var(--space-sm) var(--space-md);
  background: #f8fafc;
  border: 1px solid #e6edf3;
  border-radius: 8px;
  color: var(--color-primary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.popular-routes-grid a:hover {
  background: #eef4fa;
  border-color: var(--color-primary);
}

@media (max-width: 1023px) and (min-width: 768px) {
  .popular-routes-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 767px) {
  .popular-routes-grid {
    grid-template-columns: 1fr;
  }
}

/* Book FAQ — Magazine style with Q./A. labels */
.book-faq {
  padding: var(--space-2xl) 0;
  background: var(--color-bg-warm);
}

.book-faq > .container {
  max-width: 800px;
}

.book-faq h2 {
  text-align: center;
  margin-bottom: var(--space-sm);
}

.book-faq h2::after {
  content: '';
  display: block;
  width: 48px;
  height: 3px;
  background: var(--color-accent);
  margin: var(--space-md) auto var(--space-xl);
  border-radius: 2px;
}

.book-faq-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}

.book-faq-item {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 0 var(--space-md);
  align-items: start;
}

.book-faq-labels {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  padding-top: 2px;
}

.book-faq-q {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-primary-dark);
  line-height: 1.2;
}

.book-faq-a {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-accent);
  line-height: 1.2;
}

.book-faq-content h3 {
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-primary-dark);
  margin-bottom: var(--space-sm);
  line-height: 1.4;
}

.book-faq-content p {
  font-size: 0.93rem;
  color: var(--color-text-light);
  line-height: 1.7;
  margin: 0;
}

/* --- 信息表格 --- */
.info-table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-lg) 0;
  font-size: 0.95rem;
}

.info-table th,
.info-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

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

.info-table tr:hover td {
  background: var(--color-bg-light);
}

/* --- FAQ 页面 --- */
.faq-section {
  margin-top: var(--space-2xl);
  scroll-margin-top: 80px;
}

.faq-section[hidden] { display: none; }

.faq-section > h2 {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  color: var(--color-primary-dark);
  padding-bottom: var(--space-sm);
  border-bottom: 3px solid var(--color-accent);
  margin-bottom: var(--space-lg);
  display: inline-block;
}

/* 站内搜索 */
.faq-search {
  margin: var(--space-lg) 0 var(--space-md);
}

.faq-search-label {
  display: block;
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: var(--space-xs);
  color: var(--color-text-light);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.faq-search-box {
  position: relative;
  display: flex;
  align-items: center;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 0 var(--space-md);
  transition: border-color 0.15s, box-shadow 0.15s;
  box-shadow: var(--shadow-sm);
}

.faq-search-box:focus-within {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(26, 82, 118, 0.12);
}

.faq-search-icon {
  flex-shrink: 0;
  color: var(--color-text-light);
}

.faq-search-box input[type="search"] {
  flex: 1;
  border: 0;
  background: transparent;
  padding: 14px var(--space-sm);
  font-size: 1rem;
  font-family: inherit;
  outline: none;
  min-width: 0;
}

/* 隐藏浏览器自带的清除按钮，我们用自己的 */
.faq-search-box input[type="search"]::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
}

.faq-search-clear {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border: 0;
  background: var(--color-bg-light);
  color: var(--color-text);
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.faq-search-clear:hover {
  background: var(--color-border);
}

.faq-search-status {
  margin-top: var(--space-xs);
  font-size: 0.85rem;
  color: var(--color-text-light);
  min-height: 1.2em;
}

/* TOC 中分类 0 命中时的弱化态 */
.faq-toc a.is-muted {
  color: var(--color-text-light);
  opacity: 0.55;
  pointer-events: none;
}

/* 整页无结果 */
.faq-no-results {
  margin: var(--space-xl) 0;
  padding: var(--space-lg);
  text-align: center;
  background: var(--color-bg-light);
  border-radius: var(--radius);
  border: 1px dashed var(--color-border);
}

.faq-no-results[hidden] { display: none; }
.faq-section-empty[hidden] { display: none; }
.faq-item[hidden] { display: none; }

/* TOC 导航 */
.faq-toc {
  background: var(--color-bg-warm);
  padding: var(--space-lg);
  border-radius: 8px;
  margin: var(--space-lg) 0 var(--space-xl);
  border: 1px solid rgba(242, 138, 26, 0.15);
}

.faq-toc strong {
  display: block;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-light);
  margin-bottom: var(--space-sm);
}

.faq-toc ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm) var(--space-lg);
}

.faq-toc a {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  padding: var(--space-xs) var(--space-sm);
  border-radius: 4px;
  transition: background 0.15s, color 0.15s;
}

.faq-toc a:hover {
  background: rgba(26, 82, 118, 0.08);
  color: var(--color-primary-dark);
  text-decoration: none;
}

.faq-toc-count {
  color: var(--color-text-light);
  font-weight: 400;
  font-size: 0.85rem;
}

/* FAQ 条目（手风琴） */
.faq-list .faq-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  margin-bottom: var(--space-sm);
  background: #fff;
  transition: box-shadow 0.15s, border-color 0.15s;
}

.faq-list .faq-item:hover {
  border-color: rgba(26, 82, 118, 0.25);
  box-shadow: var(--shadow-sm);
}

.faq-list .faq-item.open {
  border-color: var(--color-primary-light);
  box-shadow: 0 2px 8px rgba(26, 82, 118, 0.1);
}

.faq-list .faq-item h3 {
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-md) var(--space-lg);
  margin: 0;
  color: var(--color-primary-dark);
  gap: var(--space-md);
}

.faq-list .faq-item h3::after {
  content: "+";
  font-size: 1.4rem;
  font-weight: 300;
  color: var(--color-accent);
  transition: transform 0.2s;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--color-bg-warm);
}

.faq-list .faq-item.open h3::after {
  content: "−";
  background: var(--color-accent);
  color: #fff;
}

.faq-answer {
  padding: 0 var(--space-lg) var(--space-lg);
  color: var(--color-text);
  display: none;
  line-height: 1.7;
}

.faq-answer p {
  margin-bottom: var(--space-md);
}

.faq-answer p:last-child {
  margin-bottom: 0;
}

.faq-answer ul, .faq-answer ol {
  margin: var(--space-sm) 0 var(--space-md);
  padding-left: var(--space-lg);
}

.faq-answer li {
  margin-bottom: var(--space-xs);
}

.faq-answer strong {
  color: var(--color-primary-dark);
}

.faq-list .faq-item.open .faq-answer {
  display: block;
}

/* --- 页脚 --- */
.site-footer {
  background: var(--color-primary-dark);
  color: rgba(255, 255, 255, 0.7);
  padding: var(--space-2xl) 0 var(--space-lg);
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-xl);
  margin-bottom: var(--space-xl);
}

.footer-col h4 {
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.95rem;
  margin-bottom: var(--space-md);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.footer-col a {
  display: block;
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.9rem;
  padding: var(--space-xs) 0;
}

.footer-col a:hover {
  color: #fff;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: var(--space-lg);
  text-align: center;
  font-size: 0.85rem;
}

/* --- 面包屑 --- */
.breadcrumb {
  font-size: 0.85rem;
  color: var(--color-text-light);
  margin-bottom: var(--space-lg);
}

.breadcrumb a {
  color: var(--color-text-light);
}

.breadcrumb a:hover {
  color: var(--color-primary-light);
}

/* --- 返回顶部按钮（所有页面通用） --- */
/* 放在 body 顶部的零尺寸哨兵，IntersectionObserver 监听它离开视口时显示按钮 */
.scroll-sentinel {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.back-to-top {
  position: fixed;
  right: var(--space-lg);
  bottom: var(--space-lg);
  z-index: 90;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  /* 初始态：透明且略低，通过加 .is-visible 类淡入上移 */
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease, background 0.15s ease;
}

.back-to-top.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--color-primary-light);
}

.back-to-top:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
}

.back-to-top svg {
  display: block;
}

/* 移动端靠右下一点，避开浏览器底部工具栏 */
@media (max-width: 767px) {
  .back-to-top {
    right: var(--space-md);
    bottom: calc(var(--space-md) + env(safe-area-inset-bottom, 0px));
  }
}

/* 尊重用户的减少动效偏好 */
@media (prefers-reduced-motion: reduce) {
  .back-to-top {
    transition: opacity 0.01s;
    transform: none;
  }
  .back-to-top.is-visible {
    transform: none;
  }
}

.breadcrumb span {
  margin: 0 var(--space-sm);
}

/* --- 响应式 --- */
@media (max-width: 768px) {
  :root {
    --header-height: 56px;
  }

  h1 { font-size: 1.7rem; }
  h2 { font-size: 1.4rem; }

  .hero h1 { font-size: 1.8rem; }
  .hero p { font-size: 1rem; }
  .hero { padding: var(--space-xl) 0; }

  .nav-toggle {
    display: block;
  }

  .main-nav {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--color-primary-dark);
    flex-direction: column;
    padding: var(--space-md) var(--space-lg);
    gap: 0;
    box-shadow: var(--shadow-md);
  }

  .main-nav.open {
    display: flex;
  }

  .main-nav a {
    padding: var(--space-md) 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

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

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

@media (max-width: 480px) {
  .container {
    padding: 0 var(--space-md);
  }

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


/* --- 预订进度条（公共组件） --- */
.progress-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: var(--space-lg) 0 var(--space-xl);
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.step-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 700;
  background: var(--color-bg-light);
  border: 2px solid var(--color-border);
  color: var(--color-text-light);
}

.step-label {
  font-size: 0.75rem;
  color: var(--color-text-light);
  font-weight: 500;
}

.step.done .step-num {
  background: var(--color-success);
  border-color: var(--color-success);
  color: #fff;
}

.step.done .step-label {
  color: var(--color-success);
}

.step.active .step-num {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #fff;
}

.step.active .step-label {
  color: var(--color-accent);
  font-weight: 700;
}

.step-line {
  width: 60px;
  height: 2px;
  background: var(--color-border);
  margin: 0 var(--space-sm);
  margin-bottom: 20px;
}

.step-line.done {
  background: var(--color-success);
}

@media (max-width: 640px) {
  .progress-steps {
    padding: var(--space-md) 0;
  }
  .step-line {
    width: 30px;
  }
  .step-label {
    font-size: 0.65rem;
  }
}


/* ============================================
   首页：What is China Train Travel? 实体介绍
   居中窄栏 + 橙色短线装饰
   ============================================ */
.about-home-summary {
  padding: var(--space-2xl) 0;
  background: var(--color-bg);
  text-align: center;
}

.about-home-summary .container {
  max-width: 780px;
}

.about-home-summary h2 {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-primary-dark);
  margin: 0 auto var(--space-md);
  padding-bottom: var(--space-md);
  position: relative;
  line-height: 1.2;
  display: inline-block;
}

.about-home-summary h2::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 48px;
  height: 3px;
  background: var(--color-accent);
}

.about-home-summary p {
  font-size: 1.125rem;
  line-height: 1.8;
  color: var(--color-text);
  margin: var(--space-lg) 0 0;
}

@media (max-width: 768px) {
  .about-home-summary {
    padding: var(--space-xl) 0;
  }
  .about-home-summary h2 {
    font-size: 1.6rem;
  }
  .about-home-summary p {
    font-size: 1rem;
  }
}

/* ============================================
   首页：Why Book Through Us
   橙色圆形图标在顶，标题+正文居中
   ============================================ */
.why-book-section {
  padding: var(--space-2xl) 0;
  background: var(--color-bg);
  border-top: 1px solid var(--color-border);
}

.why-book-section h2 {
  text-align: center;
  font-family: var(--font-heading);
  font-size: 2rem;
  color: var(--color-primary-dark);
  margin: 0 auto var(--space-2xl);
  padding-bottom: var(--space-md);
  position: relative;
  display: table;
}

.why-book-section h2::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 48px;
  height: 3px;
  background: var(--color-accent);
}

.why-book-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

.why-book-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: var(--space-xl) var(--space-lg);
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.why-book-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(242, 138, 26, 0.3);
}

.why-book-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto var(--space-md);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg-warm);
  color: var(--color-accent);
  border-radius: 50%;
}

.why-book-card h3 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-primary-dark);
  margin: 0 0 var(--space-sm);
}

.why-book-card p {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--color-text-light);
  margin: 0;
}

@media (max-width: 900px) {
  .why-book-grid {
    grid-template-columns: 1fr;
    max-width: 480px;
    margin: 0 auto;
  }
  .why-book-section h2 {
    font-size: 1.6rem;
    margin-bottom: var(--space-xl);
  }
}

/* ============================================
   首页：FAQ 快速问答（Magazine 风）
   - 默认全部展开，无折叠交互
   - Q/A 大写衬线字母作为视觉锚点
   - Q 用品牌蓝、A 用品牌橙
   ============================================ */
.home-faq {
  padding: var(--space-2xl) 0;
  background: var(--color-bg-warm);
}

.home-faq .container {
  max-width: 840px;
}

.home-faq h2 {
  text-align: center;
  font-family: var(--font-heading);
  font-size: 2rem;
  color: var(--color-primary-dark);
  margin: 0 auto var(--space-2xl);
  padding-bottom: var(--space-md);
  position: relative;
  display: table;
}

.home-faq h2::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 48px;
  height: 3px;
  background: var(--color-accent);
}

.home-faq .faq-item {
  padding: var(--space-lg) 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.home-faq .faq-item:last-child {
  border-bottom: none;
}

/* h3 和 p 各自用 grid 布局：左侧 Q/A 标签，右侧文本 */
.home-faq .faq-item h3,
.home-faq .faq-item p {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: var(--space-md);
  align-items: baseline;
  margin: 0;
}

.home-faq .faq-item h3 {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--color-primary-dark);
  margin-bottom: var(--space-sm);
  line-height: 1.4;
  cursor: default;
}

.home-faq .faq-item h3::before {
  content: "Q.";
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1;
  letter-spacing: -0.02em;
  text-align: center;
  align-self: start;
}

.home-faq .faq-item p {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--color-text);
}

.home-faq .faq-item p::before {
  content: "A.";
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--color-accent);
  line-height: 1;
  letter-spacing: -0.02em;
  text-align: center;
  align-self: start;
}

@media (max-width: 640px) {
  .home-faq {
    padding: var(--space-xl) 0;
  }
  .home-faq h2 {
    font-size: 1.6rem;
    margin-bottom: var(--space-xl);
  }
  .home-faq .faq-item h3,
  .home-faq .faq-item p {
    grid-template-columns: 40px 1fr;
    gap: var(--space-sm);
  }
  .home-faq .faq-item h3 {
    font-size: 1.05rem;
  }
  .home-faq .faq-item h3::before,
  .home-faq .faq-item p::before {
    font-size: 1.4rem;
  }
}
