/* 移动端专用样式 - 优化触摸体验和性能 */

@media (max-width: 768px) {
  /* 基础字体和行高优化 */
  body {
    font-size: 16px;
    line-height: 1.6;
  }

  /* 标题尺寸优化 */
  h1 {
    font-size: 28px;
    line-height: 1.3;
  }

  h2 {
    font-size: 24px;
    line-height: 1.4;
  }

  h3 {
    font-size: 20px;
    line-height: 1.4;
  }

  /* 段落间距优化 */
  p {
    margin-bottom: 16px;
  }

  /* 按钮触摸优化 - 最小48x48px */
  .cta-btn,
  .cta-secondary,
  button,
  a.inline-block {
    min-height: 48px;
    min-width: 48px;
    padding: 14px 24px;
    font-size: 16px;
  }

  /* 全宽按钮 */
  .cta-btn {
    width: 100%;
    display: block;
  }

  /* 导航优化 */
  nav {
    padding: 12px 16px;
  }

  /* 容器内边距 */
  .container {
    padding-left: 16px;
    padding-right: 16px;
  }

  /* Section间距 */
  section {
    padding-top: 48px;
    padding-bottom: 48px;
  }

  /* 卡片间距 */
  .section-card {
    margin-bottom: 16px;
  }

  /* 网格布局单列 */
  .grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  /* 表格横向滚动 */
  .overflow-x-auto {
    -webkit-overflow-scrolling: touch;
  }

  table {
    font-size: 14px;
  }

  th, td {
    padding: 8px;
  }

  /* 图片响应式 */
  img {
    max-width: 100%;
    height: auto;
  }

  /* 返回顶部按钮位置 */
  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 48px;
    height: 48px;
  }

  /* FAQ手风琴优化 */
  .accordion-btn {
    padding: 16px;
    font-size: 16px;
  }

  /* 固定CTA栏 */
  .sticky-cta {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    padding: 12px 16px;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 999;
  }

  /* 触摸反馈 */
  button:active,
  a:active {
    opacity: 0.7;
    transform: scale(0.98);
  }

  /* 链接下划线 */
  a:not(.cta-btn):not(.cta-secondary) {
    text-decoration: underline;
  }

  /* 安全区域适配 */
  @supports (padding: max(0px)) {
    body {
      padding-left: max(16px, env(safe-area-inset-left));
      padding-right: max(16px, env(safe-area-inset-right));
    }
  }

  /* 减少动画以提升性能 */
  * {
    animation-duration: 0.3s !important;
    transition-duration: 0.3s !important;
  }

  /* 优化滚动性能 */
  .section-card,
  .bg-white {
    will-change: transform;
  }
}

/* 小屏幕优化 (< 375px) */
@media (max-width: 375px) {
  h1 {
    font-size: 24px;
  }

  h2 {
    font-size: 20px;
  }

  .cta-btn {
    padding: 12px 20px;
    font-size: 15px;
  }
}
