/* H5 Mobile Styles */
:root {
  --h5-primary: #2d5a27;
  --h5-secondary: #4a7c43;
  --h5-accent: #e74c3c;
  --h5-bg: #f5f5f5;
  --h5-text: #333;
  --h5-text-light: #666;
  --h5-border: #e5e5e5;
  --h5-white: #fff;
  --h5-bottom-height: 56px;
  --hero-height: calc(100vh - 50px);
  /* 统一字体基准 - 移动端优化 */
  --h5-font-xs: 12px;
  --h5-font-sm: 13px;
  --h5-font-base: 14px;
  --h5-font-md: 15px;
  --h5-font-lg: 16px;
  --h5-font-xl: 18px;
}

/* 全局字体优化 */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  padding-bottom: calc(56px + env(safe-area-inset-bottom, 10px));
  font-size: var(--h5-font-base);
  line-height: 1.6;
  color: var(--h5-text);
}

/* Hide PC Navigation */
.navbar, .nav-container, .nav-links, .nav-toggle, .megamenu, .top-bar { display: none !important; }
.footer { display: none !important; }

/* 区块标题样式 */
.section-header {
  text-align: center;
  padding: 0 16px;
  margin-bottom: 16px;
}

.section-tag {
  display: inline-block;
  padding: 4px 14px;
  background: linear-gradient(135deg, #2d5a27, #4a7c43);
  color: #fff;
  border-radius: 12px;
  font-size: var(--h5-font-xs);
  font-weight: 500;
  margin-bottom: 8px;
}

.section-title {
  font-size: var(--h5-font-xl);
  color: #333;
  margin: 0 0 8px;
  font-weight: 600;
}

.section-desc {
  font-size: var(--h5-font-sm);
  color: #666;
  margin: 0;
}

/* 客服二维码弹窗优化 */
#qrcodeModal .modal-content {
  padding: 20px 16px;
  max-width: 320px;
  border-radius: 16px;
}

#qrcodeModal .qrcode-tip {
  font-size: 0.9rem;
  margin-bottom: 16px;
  color: #666;
}

#qrcodeModal .qrcode-image img {
  width: 180px;
  height: 180px;
  border-radius: 12px;
}

#qrcodeModal .modal-close {
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  font-size: 1.2rem;
}

/* ==================== 两排导航栏 ==================== */
.h5-nav-bar {
  background: #fff;
  padding: 16px 16px 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  position: sticky;
  top: 0;
  z-index: 100;
  padding-top: max(16px, env(safe-area-inset-top));
}

.h5-nav-row {
  display: flex;
  justify-content: space-around;
  gap: 8px;
}

.h5-nav-row:first-child {
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid #eee;
}

.h5-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  color: #666;
  flex: 1;
  padding: 6px 4px;
  border-radius: 8px;
  transition: all 0.2s;
}

.h5-nav-item:active {
  background: #f0f0f0;
  transform: scale(0.95);
}

.h5-nav-item.active {
  color: #2d5a27;
}

.h5-nav-item.active .nav-icon {
  transform: scale(1.1);
}

.nav-icon {
  font-size: 1.4rem;
  line-height: 1;
}

.nav-text {
  font-size: var(--h5-font-xs);
  font-weight: 500;
}

.h5-nav-item.highlight {
  background: linear-gradient(135deg, #2d5a27, #4a7c43);
  color: #fff;
  padding: 8px 12px;
  border-radius: 20px;
}

.h5-nav-item.highlight .nav-text {
  font-weight: 600;
}

/* 在线客服图标 */
.h5-nav-service {
  position: relative;
  flex: 0 0 auto;
  padding: 6px 8px;
}

.h5-nav-service .nav-icon {
  position: relative;
  font-size: 1.6rem;
}

.h5-nav-service .nav-icon::after {
  content: '';
  position: absolute;
  top: -2px;
  right: -2px;
  width: 8px;
  height: 8px;
  background: #e74c3c;
  border-radius: 50%;
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.2); opacity: 0.8; }
}

/* 返回顶部 */
.back-to-top {
  position: fixed;
  bottom: 70px;
  right: 16px;
  width: 44px;
  height: 44px;
  background: rgba(45, 90, 39, 0.9);
  color: #fff;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  z-index: 99;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s ease;
}

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

.back-to-top:active {
  transform: scale(0.9);
}

/* 悬浮客服 */
.float-service {
  position: fixed;
  bottom: 70px;
  left: 16px;
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, #2d5a27, #4a7c43);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(45,90,39,0.4);
  z-index: 99;
  text-decoration: none;
}

.float-service-icon {
  font-size: 1.4rem;
}

.float-service-dot {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 12px;
  height: 12px;
  background: #e74c3c;
  border-radius: 50%;
  border: 2px solid #fff;
  animation: pulse-dot 2s infinite;
}

/* ==================== Hero Section ==================== */
.hero {
  position: relative;
  width: 100%;
  height: var(--hero-height);
  min-height: 500px;
  max-height: 700px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* 顶部标题 */
.hero-top-title { padding-top: 8px;
  position: absolute;
  top: 8px;
  left: 12px;
  z-index: 10;
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-top-title img { margin-top: 5px;
  height: 28px !important;
  width: auto !important;
}

/* Video Background */
.hero-bg {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  z-index: 0;
}

/* 强制覆盖 h5-only.css 中的 padding-top 56.25% */
.hero-bg .hero-video-container {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  padding-top: 0 !important;
  overflow: hidden !important;
}

.hero-video {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
}

.hero-gradient {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    linear-gradient(180deg, 
      rgba(0,0,0,0.2) 0%, 
      rgba(0,0,0,0.1) 30%,
      rgba(0,0,0,0.3) 70%, 
      rgba(45,90,39,0.95) 100%
    );
}

/* Content */
.hero-content {
  position: relative;
  z-index: 2;
  padding: 50px 20px 0;
  text-align: center;
  color: #fff;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: transparent !important;
}

.hero-badge-wrap {
  margin-bottom: 16px;
}

.hero-badge {
  display: inline-block;
  padding: 6px 16px;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 20px;
  font-size: var(--h5-font-sm);
  font-weight: 500;
  letter-spacing: 0.5px;
  border: 1px solid rgba(255,255,255,0.2);
}

.hero-title {
  margin: 0 0 12px;
  line-height: 1.2;
}

.hero-title-main {
  display: block;
  font-size: 2.2rem;
  font-weight: 700;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
  letter-spacing: 2px;
}

.hero-title-sub {
  display: block;
  font-size: 1.4rem;
  font-weight: 400;
  opacity: 0.95;
  margin-top: 4px;
}

.hero-desc {
  font-size: var(--h5-font-md);
  color: rgba(255,255,255,0.9);
  margin: 0 0 24px;
  text-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

/* CTA Buttons */
.hero-cta {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  font-size: var(--h5-font-md);
  font-weight: 600;
  border-radius: 30px;
  text-decoration: none;
  transition: all 0.3s ease;
  -webkit-tap-highlight-color: transparent;
}

.hero-btn-primary {
  background: linear-gradient(135deg, #fff 0%, #f0f0f0 100%);
  color: #2d5a27;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.hero-btn-primary:active {
  transform: scale(0.97);
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.hero-btn-primary svg {
  transition: transform 0.3s;
}

.hero-btn-primary:active svg {
  transform: translateX(4px);
}

.hero-btn-secondary {
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.3);
}

.hero-btn-secondary .play-icon {
  font-size: 0.7rem;
}

/* Stats Bar */
.hero-stats {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 12px 20px;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  gap: 8px;
}

.hero-stat-num {
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
  line-height: 1;
  display: inline;
}

.hero-stat-unit {
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
  display: inline;
}

.hero-stat-label {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.8);
  margin-top: 2px;
}

.hero-stat-item {
  flex: 1;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-stat-value {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 2px;
}

.hero-stat-num {
  font-size: 1.5rem;
  font-weight: 700;
  color: #2d5a27;
  line-height: 1;
}

.hero-stat-unit {
  font-size: 1rem;
  font-weight: 700;
  color: #2d5a27;
}

.hero-stat-label {
  font-size: 0.7rem;
  color: #666;
  margin-top: 2px;
}

.hero-stat-divider {
  width: 1px;
  height: 30px;
  background: #e0e0e0;
}

/* Scroll Hint */
.hero-scroll-hint {
  position: absolute;
  bottom: 70px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,0.8);
  font-size: 0.75rem;
}

.scroll-arrow-animate {
  animation: bounceDown 2s infinite;
}

@keyframes bounceDown {
  0%, 100% { transform: translateY(0); opacity: 1; }
  50% { transform: translateY(6px); opacity: 0.6; }
}

/* Mobile Responsive - 小屏幕优化 */
@media (max-width: 374px) {
  :root {
    --h5-font-xs: 11px;
    --h5-font-sm: 12px;
    --h5-font-base: 13px;
    --h5-font-md: 14px;
    --h5-font-lg: 15px;
    --h5-font-xl: 16px;
  }
  .hero-title-main { font-size: 1.8rem; }
  .hero-title-sub { font-size: 1.2rem; }
  .hero-btn { padding: 12px 20px; font-size: var(--h5-font-sm); }
  .hero-stat-num { font-size: 1.3rem; }
}

@media (min-height: 800px) {
  .hero {
    min-height: 550px;
  }
  .hero-title-main { font-size: 2.6rem; }
}

/* H5 Bottom Navigation */
.h5-bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0;
  height: var(--h5-bottom-height);
  background: var(--h5-white);
  box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 999;
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.h5-bottom-nav-item {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-decoration: none; color: var(--h5-text-light);
  font-size: var(--h5-font-xs); padding: 6px 0;
  -webkit-tap-highlight-color: transparent;
}
.h5-bottom-nav-item.active { color: var(--h5-primary); }
.h5-nav-icon { font-size: 22px; line-height: 1; margin-bottom: 2px; }

/* H5 Header */
.h5-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--h5-white);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.h5-header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
}
.h5-header-back {
  display: flex; align-items: center;
  color: var(--h5-text); text-decoration: none; font-size: 14px;
}
.h5-header-title {
  font-size: 16px; font-weight: 600; color: var(--h5-text);
  flex: 1; text-align: center; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; padding: 0 10px;
}

/* Mobile Grid */
@media (max-width: 1023px) {
  .routes-grid { display: grid !important; grid-template-columns: 1fr !important; gap: 16px !important; }
  .features-grid { display: grid !important; grid-template-columns: repeat(2, 1fr) !important; gap: 12px !important; }
  .feature-card { padding: 16px 12px !important; }
  .feature-card .feature-icon { font-size: 1.8rem !important; margin-bottom: 10px !important; }
  .feature-card h3 { font-size: var(--h5-font-md) !important; margin-bottom: 6px !important; }
  .feature-card p { font-size: var(--h5-font-sm) !important; line-height: 1.5 !important; }
  
  /* 路线对比表 - 紧凑样式 */
  .comparison-table-wrapper { padding: 0 !important; margin: 0 !important; }
  .comparison-table th,
  .comparison-table td { padding: 8px 6px !important; font-size: 0.75rem !important; }
  .comparison-table .table-tag { padding: 1px 4px !important; font-size: 0.65rem !important; }
  
  /* 游客评价区块 - 左右滑动 */
  .testimonials { 
    padding: 24px 0 !important; 
    overflow: hidden !important;
    background: #f8f8f8 !important;
    position: relative !important;
  }
  .testimonials .container { padding: 0 16px !important; }
  .testimonials .section-header { margin-bottom: 16px !important; }
  .testimonials .section-tag { 
    display: inline-block !important;
    padding: 4px 14px !important;
    background: linear-gradient(135deg, #2d5a27, #4a7c43) !important;
    color: #fff !important;
    border-radius: 12px !important;
    font-size: var(--h5-font-xs) !important;
  }
  .testimonials .section-title { font-size: var(--h5-font-xl) !important; color: #333 !important; margin-bottom: 4px !important; }
  .testimonials .section-desc { font-size: var(--h5-font-sm) !important; color: #666 !important; }
  .testimonials-slider { 
    display: flex !important; 
    overflow-x: auto !important; 
    scroll-snap-type: x mandatory !important;
    -webkit-overflow-scrolling: touch !important;
    gap: 12px !important;
    padding-bottom: 8px !important;
    scrollbar-width: none !important;
  }
  .testimonials-slider::-webkit-scrollbar { display: none !important; }
  .testimonial-card { 
    flex: 0 0 calc(100vw - 32px) !important; 
    max-width: calc(100vw - 32px) !important;
    scroll-snap-align: center !important;
    padding: 16px !important; 
    margin: 0 auto !important; 
    background: #fff !important;
    border-radius: 12px !important;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08) !important;
    position: relative !important;
    z-index: 1 !important;
    color: #333 !important;
  }
  
  .testimonial-rating { 
    font-size: var(--h5-font-md) !important; 
    margin-bottom: 8px !important;
    color: #f5a623 !important;
  }
  .testimonial-text { 
    font-size: var(--h5-font-base) !important; 
    line-height: 1.6 !important; 
    margin-bottom: 12px !important;
    color: #333 !important;
  }
  .testimonial-author { 
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
  }
  .testimonial-author img { 
    width: 36px !important; 
    height: 36px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
  }
  .author-name { 
    font-size: var(--h5-font-base) !important;
    font-weight: 500 !important;
    color: #333 !important;
  }
  .author-location { 
    font-size: var(--h5-font-xs) !important;
    color: #999 !important;
  }
  .slider-arrows { display: flex !important; justify-content: center; gap: 16px; margin-top: 16px !important; }
  .slider-arrow { width: 40px !important; height: 40px !important; border-radius: 50% !important; background: #f5f5f5 !important; border: none !important; cursor: pointer !important; display: flex !important; align-items: center; justify-content: center; }
  .slider-arrow svg { color: #666 !important; }
  .slider-dots { display: none !important; }
  
  .footer-content { display: block !important; }
  
  /* 路线轮播样式 */
  .route-carousel-wrapper {
    position: relative;
  }
  .route-carousel {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 16px;
    scrollbar-width: none;
    padding-bottom: 16px;
  }
  .route-carousel::-webkit-scrollbar { display: none; }
  .route-carousel .route-card {
    flex: 0 0 100%;
    scroll-snap-align: start;
  }
  .route-carousel-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 5px;
  }
  .route-carousel-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f5f5f5;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    transition: all 0.2s;
  }
  .route-carousel-btn:active {
    background: #e0e0e0;
    transform: scale(0.95);
  }
  .route-carousel-dots {
    display: flex;
    gap: 8px;
  }
  .route-carousel-dots .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ddd;
    cursor: pointer;
    transition: all 0.2s;
  }
  .route-carousel-dots .dot.active {
    background: var(--h5-primary);
    width: 20px;
    border-radius: 4px;
  }
}

/* Video Tabs - Optimized UI */
.video-tabs {
  display: flex !important;
  visibility: visible !important;
  gap: 8px !important;
  background: #fff !important;
  padding: 6px !important;
  border-radius: 16px !important;
  margin-top: 16px !important;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08) !important;
  border: 1px solid #eee !important;
}

.video-tab {
  flex: 1 !important;
  padding: 12px 6px !important;
  background: #f5f5f5 !important;
  border: none !important;
  border-radius: 12px !important;
  font-size: 0.8rem !important;
  font-weight: 500 !important;
  color: #666 !important;
  cursor: pointer !important;
  transition: all 0.25s ease !important;
  text-align: center !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
}

.video-tab::before {
  content: '●' !important;
  font-size: 6px !important;
  opacity: 0.5 !important;
}

.video-tab.active {
  background: linear-gradient(135deg, #2d5a27, #3d7a32) !important;
  color: #fff !important;
  box-shadow: 0 4px 16px rgba(45, 90, 39, 0.35) !important;
  font-weight: 600 !important;
}

.video-tab.active::before {
  opacity: 1 !important;
}

/* ==================== 视频区块 - 重新设计 ==================== */
.h5-video-section {
  padding: 24px 16px;
  background: #fff;
}

.h5-video-wrapper {
  max-width: 100%;
}

/* 标题 */
.h5-video-header {
  text-align: center;
  margin-bottom: 16px;
}

.h5-video-tag {
  display: inline-block;
  padding: 4px 14px;
  background: linear-gradient(135deg, #2d5a27, #4a7c43);
  color: #fff;
  border-radius: 12px;
  font-size: var(--h5-font-xs);
  margin-bottom: 8px;
}

.h5-video-title {
  font-size: var(--h5-font-xl);
  color: #333;
  margin: 0;
}

/* 视频播放器 */
.h5-video-player {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
  margin-bottom: 16px;
}

.h5-video-player video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 播放按钮覆盖层 */
.h5-video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.3);
  cursor: pointer;
}

.h5-video-overlay.hidden {
  display: none;
}

.h5-play-btn {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(255,255,255,0.95);
  border: none;
  font-size: 1.5rem;
  color: #2d5a27;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
  transition: transform 0.2s;
}

.h5-play-btn:active {
  transform: scale(0.95);
}

/* 视频信息 */
.h5-video-info {
  margin-bottom: 16px;
}

.h5-video-name {
  font-size: var(--h5-font-lg);
  color: #333;
  margin: 0 0 6px 0;
}

.h5-video-desc {
  font-size: var(--h5-font-sm);
  color: #666;
  margin: 0;
  line-height: 1.6;
}

/* 切换按钮 */
.h5-video-switcher {
  display: flex;
  gap: 8px;
  background: #f5f5f5;
  padding: 4px;
  border-radius: 12px;
}

.h5-switch-btn {
  flex: 1;
  padding: 10px 8px;
  background: transparent;
  border: none;
  border-radius: 8px;
  font-size: var(--h5-font-sm);
  color: #666;
  cursor: pointer;
  transition: all 0.25s ease;
}

.h5-switch-btn.active {
  background: linear-gradient(135deg, #2d5a27, #4a7c43);
  color: #fff;
  font-weight: 500;
}

/* ===== 客服悬浮按钮 - H5移动端适配 ===== */
.customer-service {
  bottom: calc(var(--h5-bottom-height) + 30px) !important;
  right: 12px !important;
}

.customer-service .cs-btn {
  width: 48px !important;
  height: 48px !important;
  border-radius: 50% !important;
  box-shadow: 0 4px 12px rgba(45, 90, 39, 0.3) !important;
  padding: 0 !important;
  justify-content: center !important;
}

.customer-service .cs-icon {
  font-size: 22px !important;
}

.customer-service .cs-text {
  display: none !important;
}
