/* 响应式样式文件 */

/* 移动端优先设计 */

/* 超小屏幕 (320px - 575px) */
@media (max-width: 575px) {
  /* 容器调整 */
  .container {
    padding: 0 var(--spacing-sm);
  }
  
  /* 字体大小调整 */
  :root {
    --font-size-4xl: 1.75rem;  /* 28px */
    --font-size-3xl: 1.5rem;   /* 24px */
    --font-size-2xl: 1.25rem;  /* 20px */
  }
  
  /* Hero区域调整 */
  .hero {
    height: 50vh;
    min-height: 300px;
  }
  
  .hero-title {
    font-size: var(--font-size-2xl);
    margin-bottom: var(--spacing-sm);
  }
  
  .hero-subtitle {
    font-size: var(--font-size-base);
    margin-bottom: var(--spacing-md);
  }
  
  .hero-nav {
    display: none; /* 隐藏导航按钮 */
  }
  
  /* 快速导航调整 */
  .quick-nav-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-sm);
  }
  
  .quick-nav-item {
    padding: var(--spacing-md);
  }
  
  .quick-nav-icon {
    width: 36px;
    height: 36px;
    margin-bottom: var(--spacing-sm);
  }
  
  .quick-nav-text {
    font-size: var(--font-size-base);
  }
  
  /* 卡片调整 */
  .card {
    margin-bottom: var(--spacing-md);
  }
  
  .card-body {
    padding: var(--spacing-md);
  }
  
  .card-header,
  .card-footer {
    padding: var(--spacing-md);
  }
  
  /* 按钮调整 */
  .btn {
    width: 100%;
    justify-content: center;
  }
  
  .btn-group .btn {
    width: auto;
  }
  
  /* 章节标题调整 */
  .section-title {
    font-size: var(--font-size-2xl);
  }
  
  .section-subtitle {
    font-size: var(--font-size-base);
  }
  
  /* 页脚调整 */
  .footer-content {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
  }
  
  .social-links {
    justify-content: center;
  }
}

/* 小屏幕 (576px - 767px) */
@media (min-width: 576px) and (max-width: 767px) {
  /* 快速导航调整 */
  .quick-nav-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  
  /* Hero区域调整 */
  .hero {
    height: 55vh;
    min-height: 350px;
  }
  
  .hero-title {
    font-size: var(--font-size-3xl);
  }
  
  .hero-subtitle {
    font-size: var(--font-size-lg);
  }
  
  /* 网格布局调整 */
  .attractions-grid,
  .food-grid,
  .culture-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* 中等屏幕 (768px - 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
  /* 导航菜单显示 */
  .navbar-menu {
    display: block;
  }
  
  .menu-toggle {
    display: none;
  }
  
  /* Hero区域调整 */
  .hero {
    height: 60vh;
    min-height: 400px;
  }
  
  .hero-nav {
    display: block;
  }
  
  /* 网格布局调整 */
  .attractions-grid,
  .food-grid,
  .culture-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  /* 页脚调整 */
  .footer-content {
    grid-template-columns: repeat(2, 1fr);
  }
  
  /* 容器调整 */
  .container {
    padding: 0 var(--spacing-lg);
  }
}

/* 大屏幕 (1024px - 1199px) */
@media (min-width: 1024px) and (max-width: 1199px) {
  /* Hero区域调整 */
  .hero {
    height: 65vh;
    min-height: 450px;
  }
  
  /* 网格布局调整 */
  .attractions-grid,
  .food-grid,
  .culture-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  /* 页脚调整 */
  .footer-content {
    grid-template-columns: repeat(4, 1fr);
  }
  
  /* 导航调整 */
  .navbar-nav {
    gap: var(--spacing-xl);
  }
}

/* 超大屏幕 (1200px - 1439px) */
@media (min-width: 1200px) and (max-width: 1439px) {
  /* Hero区域调整 */
  .hero {
    height: 70vh;
    min-height: 500px;
  }
  
  /* 网格布局调整 */
  .attractions-grid,
  .food-grid,
  .culture-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  /* 容器最大宽度 */
  .container {
    max-width: 1140px;
  }
}

/* 极大屏幕 (1440px+) */
@media (min-width: 1440px) {
  /* Hero区域调整 */
  .hero {
    height: 75vh;
    min-height: 600px;
  }
  
  /* 网格布局调整 */
  .attractions-grid,
  .food-grid,
  .culture-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  
  /* 容器最大宽度 */
  .container {
    max-width: 1200px;
  }
  
  /* 字体大小调整 */
  .hero-title {
    font-size: 3.5rem;
  }
  
  .hero-subtitle {
    font-size: var(--font-size-2xl);
  }
  
  .section-title {
    font-size: 2.5rem;
  }
}

/* 横屏模式调整 */
@media (orientation: landscape) and (max-height: 500px) {
  .hero {
    height: 90vh;
    min-height: 300px;
  }
  
  .hero-title {
    font-size: var(--font-size-2xl);
  }
  
  .hero-subtitle {
    font-size: var(--font-size-base);
  }
}

/* 高分辨率屏幕优化 */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  /* 图标和图片优化 */
  .logo-img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
  
  /* 边框优化 */
  .card,
  .btn,
  input,
  textarea {
    border-width: 0.5px;
  }
}

/* 触摸设备优化 */
@media (hover: none) and (pointer: coarse) {
  /* 增大触摸目标 */
  .btn,
  .nav-link,
  .quick-nav-item {
    min-height: 48px;
    min-width: 48px;
  }
  
  /* 移除悬停效果 */
  .card:hover,
  .quick-nav-item:hover,
  .btn:hover {
    transform: none;
    box-shadow: var(--shadow-1);
  }
  
  /* 增强点击反馈 */
  .btn:active,
  .nav-link:active,
  .quick-nav-item:active {
    transform: scale(0.98);
  }
}

/* 打印样式 */
@media print {
  /* 隐藏不必要的元素 */
  .header,
  .hero-nav,
  .hero-indicators,
  .quick-nav,
  .footer,
  .search-modal {
    display: none !important;
  }
  
  /* 调整布局 */
  .hero {
    height: auto;
    min-height: auto;
  }
  
  .hero-content {
    position: static;
    background: none;
  }
  
  .hero-title,
  .hero-subtitle {
    color: black !important;
    text-shadow: none !important;
  }
  
  /* 优化间距 */
  .section {
    page-break-inside: avoid;
    margin-bottom: 2rem;
  }
  
  /* 网格布局调整 */
  .attractions-grid,
  .food-grid,
  .culture-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
}

/* 减少动画偏好 */
@media (prefers-reduced-motion: reduce) {
  /* 禁用所有动画和过渡 */
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  
  /* 禁用轮播自动播放 */
  .hero-slide {
    transition: none;
  }
}

/* 高对比度模式 */
@media (prefers-contrast: high) {
  :root {
    --border-color: #000000;
    --text-secondary: #000000;
    --bg-secondary: #ffffff;
  }
  
  .btn-outline {
    border-width: 2px;
  }
  
  .card {
    border-width: 2px;
  }
}

/* 深色模式响应式调整 */
@media (prefers-color-scheme: dark) {
  .hero-content {
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.7));
  }
  
  .search-modal {
    background-color: rgba(0, 0, 0, 0.8);
  }
  
  .footer {
    background-color: #000000;
  }
}

/* 特定设备优化 */

/* iPhone SE */
@media (max-width: 375px) and (max-height: 667px) {
  .hero {
    height: 45vh;
    min-height: 250px;
  }
  
  .quick-nav-item {
    padding: var(--spacing-sm);
  }
}

/* iPad */
@media (min-width: 768px) and (max-width: 1024px) and (orientation: portrait) {
  .hero {
    height: 50vh;
  }
  
  .attractions-grid,
  .food-grid,
  .culture-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 768px) and (max-width: 1024px) and (orientation: landscape) {
  .hero {
    height: 70vh;
  }
  
  .attractions-grid,
  .food-grid,
  .culture-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
