/* 
 * 北京夏季专属半日Citywalk路线 - 样式表
 * 设计风格：现代、冷色调、清新
 */

:root {
  --primary-color: #3498db;
  --secondary-color: #2c3e50;
  --accent-color: #1abc9c;
  --text-color: #2c3e50;
  --light-text: #ecf0f1;
  --bg-color: #f5f7fa;
  --card-bg: #ffffff;
  --section-padding: 5rem 0;
  --mobile-nav-height: 60px;
  --touch-target-size: 44px;
}

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

body {
  font-family: 'Noto Sans SC', sans-serif;
  color: var(--text-color);
  background-color: var(--bg-color);
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Noto Serif SC', serif;
  font-weight: 700;
  margin-bottom: 1rem;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: all 0.3s ease;
}

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

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

/* 导航栏样式 */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background-color: rgba(255, 255, 255, 0.95);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  transition: all 0.3s ease;
  height: var(--mobile-nav-height);
}

.navbar-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  height: 100%;
}

/* 汉堡菜单 */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: var(--touch-target-size);
  height: var(--touch-target-size);
  cursor: pointer;
  padding: 10px;
  z-index: 1001;
}

.hamburger span {
  display: block;
  width: 25px;
  height: 3px;
  background-color: var(--secondary-color);
  border-radius: 3px;
  transition: all 0.3s ease;
}

/* 汉堡菜单动画 */
.hamburger.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.open span:nth-child(2) {
  opacity: 0;
}

.hamburger.open span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

/* 移动端菜单 */
.mobile-menu {
  position: fixed;
  top: var(--mobile-nav-height);
  left: 0;
  width: 100%;
  background-color: var(--card-bg);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  padding: 1rem 0;
  transform: translateY(-150%);
  transition: transform 0.3s ease;
  z-index: 999;
}

.mobile-menu.active {
  transform: translateY(0);
}

.mobile-menu ul {
  list-style: none;
  text-align: center;
}

.mobile-menu li {
  margin-bottom: 1rem;
}

.mobile-menu a {
  color: var(--secondary-color);
  font-size: 1.1rem;
  font-weight: 500;
  display: block;
  padding: 0.5rem 0;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
}

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

.nav-links li {
  margin-left: 1.5rem;
}

.nav-links a {
  color: var(--secondary-color);
  font-weight: 500;
  padding: 0.5rem 0;
  position: relative;
}

.nav-links a:after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 0;
  background-color: var(--accent-color);
  transition: width 0.3s ease;
}

.nav-links a:hover:after {
  width: 100%;
}

/* 英雄区域样式 */
.hero {
  height: 100vh;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  position: relative;
  color: var(--light-text);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.hero:before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(44, 62, 80, 0.7), rgba(44, 62, 80, 0.4));
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
}

.hero h1 {
  font-size: 3.5rem;
  margin-bottom: 1.5rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.btn {
  display: inline-block;
  background-color: var(--primary-color);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.3s ease;
}

.btn:hover {
  background-color: var(--accent-color);
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* 章节样式 */
section {
  padding: var(--section-padding);
}

.section-title {
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
}

.section-title:after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background-color: var(--accent-color);
}

/* 卡片样式 */
.card {
  background-color: var(--card-bg);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.card-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.card-content {
  padding: 1.5rem;
}

.card-title {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

/* 网格布局 */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

/* 特色区块 */
.feature {
  display: flex;
  margin-bottom: 2rem;
}

.feature-icon {
  flex: 0 0 50px;
  font-size: 1.5rem;
  color: var(--primary-color);
  margin-right: 1rem;
}

.feature-content {
  flex: 1;
}

/* 图片画廊 */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  height: 200px;
}

.gallery-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

/* 页脚样式 */
footer {
  background-color: var(--secondary-color);
  color: var(--light-text);
  padding: 3rem 0;
  text-align: center;
}

.social-links {
  display: flex;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--light-text);
  margin: 0 0.5rem;
  transition: all 0.3s ease;
}

.social-icon:hover {
  background-color: var(--primary-color);
  transform: translateY(-3px);
}

/* 响应式设计 - 移动端优先 */
/* 超小屏幕 (手机, 320px 及以下) */
@media (max-width: 320px) {
  .hero h1 {
    font-size: 1.8rem;
  }
  
  .hero p {
    font-size: 1rem;
  }
  
  .btn {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
  }
  
  .card-content {
    padding: 1rem;
  }
  
  .section-title {
    font-size: 1.5rem;
  }
}

/* 小屏幕 (手机, 321px - 480px) */
@media (max-width: 480px) and (min-width: 321px) {
  .hero h1 {
    font-size: 2rem;
  }
  
  .hero p {
    font-size: 1.1rem;
  }
  
  .section-title {
    font-size: 1.7rem;
  }
}

/* 中等屏幕 (平板, 481px - 768px) */
@media (max-width: 768px) and (min-width: 481px) {
  .hero h1 {
    font-size: 2.2rem;
  }
  
  .section-title {
    font-size: 1.8rem;
  }
}

/* 通用移动端样式 */
@media (max-width: 768px) {
  /* 触摸目标优化 */
  a, button, .btn {
    min-width: var(--touch-target-size);
    min-height: var(--touch-target-size);
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  
  /* 文字大小优化 */
  body {
    font-size: 16px;
  }
  
  h1 {
    font-size: 1.8rem;
  }
  
  h2 {
    font-size: 1.5rem;
  }
  
  h3 {
    font-size: 1.3rem;
  }
  
  /* 间距优化 */
  .container {
    padding: 0 15px;
  }
  
  /* 卡片优化 */
  .card {
    margin-bottom: 1.5rem;
  }
  
  /* 图片优化 */
  img {
    max-width: 100%;
    height: auto;
  }
  
  /* 表格优化 */
  table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
  /* 导航栏优化 */
  .navbar-container {
    flex-direction: row;
    padding: 0 15px;
  }
  
  /* 隐藏桌面导航 */
  .nav-links {
    display: none;
  }
  
  /* 显示汉堡菜单 */
  .hamburger {
    display: flex;
  }
  
  /* 调整logo位置 */
  .logo {
    margin: 0 auto;
  }
  
  /* 英雄区域优化 */
  .hero {
    height: 80vh;
    background-attachment: scroll;
  }
  
  /* 间距优化 */
  section {
    padding: 3rem 0;
  }
  
  .section-title {
    margin-bottom: 2rem;
  }
  
  /* 网格布局优化 */
  .grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  /* 图片优化 */
  .card-img {
    height: 180px;
  }
  
  /* 路线图优化 */
  .route-map {
    height: 250px;
  }
}

/* 路线图样式 */
.route-map {
  width: 100%;
  height: 400px;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 2rem;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* 时间线样式 */
.timeline {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
}

.timeline::after {
  content: '';
  position: absolute;
  width: 6px;
  background-color: var(--primary-color);
  top: 0;
  bottom: 0;
  left: 50%;
  margin-left: -3px;
}

.timeline-item {
  padding: 10px 40px;
  position: relative;
  width: 50%;
  box-sizing: border-box;
}

.timeline-item:nth-child(odd) {
  left: 0;
}

.timeline-item:nth-child(even) {
  left: 50%;
}

.timeline-item::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  background-color: var(--bg-color);
  border: 4px solid var(--primary-color);
  top: 15px;
  border-radius: 50%;
  z-index: 1;
}

.timeline-item:nth-child(odd)::after {
  right: -10px;
}

.timeline-item:nth-child(even)::after {
  left: -10px;
}

.timeline-content {
  padding: 20px;
  background-color: var(--card-bg);
  position: relative;
  border-radius: 6px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

@media screen and (max-width: 768px) {
  .timeline::after {
    left: 31px;
  }
  
  .timeline-item {
    width: 100%;
    padding-left: 70px;
    padding-right: 25px;
  }
  
  .timeline-item:nth-child(even) {
    left: 0;
  }
  
  .timeline-item::after {
    left: 15px;
  }
  
  .timeline-item:nth-child(odd)::after {
    right: auto;
    left: 15px;
  }
}

/* 美食卡片特殊样式 */
.food-card {
  display: flex;
  flex-direction: column;
}

.food-info {
  display: flex;
  justify-content: space-between;
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: #7f8c8d;
}

/* 拍照技巧样式 */
.photo-tip {
  background-color: rgba(52, 152, 219, 0.1);
  border-left: 4px solid var(--primary-color);
  padding: 1rem;
  margin: 1rem 0;
}

/* 实用贴士样式 */
.tips-container {
  background-color: rgba(26, 188, 156, 0.1);
  border-radius: 8px;
  padding: 1.5rem;
  margin: 2rem 0;
}

.tip-item {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px dashed rgba(44, 62, 80, 0.2);
}

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

.tip-icon {
  color: var(--accent-color);
  margin-right: 0.5rem;
}

/* 动画效果 */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.6s ease-out forwards;
}

/* 平滑滚动 */
html {
  scroll-behavior: smooth;
}

/* 图片懒加载 */
img.lazyload {
  opacity: 0;
  transition: opacity 0.3s ease;
}

img.lazyloaded {
  opacity: 1;
}

/* 移动端性能优化 */
@media (max-width: 768px) {
  /* 减少动画复杂度 */
  .fade-in {
    animation: fadeIn 0.4s ease-out forwards;
  }
  
  /* 优化背景图加载 */
  .hero {
    background-image: url('./images/hero-small.jpg');
  }
}