/* ImageTwin 移动端专属样式 - 移动优先设计 */

/* ========== 移动端基础优化 ========== */
@media (max-width: 768px) {
  
  /* 字体大小优化 */
  body {
    font-size: 16px;
    line-height: 1.6;
  }

  /* 容器内边距 */
  .container {
    padding: 0 16px;
  }

  /* Section间距优化 */
  .section {
    padding: 40px 16px;
  }

  /* ========== 头部导航优化 ========== */
  header {
    padding: 10px 0;
  }

  .header-content {
    padding: 10px 0;
  }

  .logo img {
    height: 40px;
  }

  nav {
    position: fixed;
    top: 60px;
    right: -100%;
    width: 85%;
    max-width: 320px;
    height: calc(100vh - 60px);
    background: #fff;
    box-shadow: -2px 0 15px rgba(0,0,0,0.2);
    transition: right 0.3s ease;
    z-index: 999;
    overflow-y: auto;
  }

  nav.active {
    right: 0;
  }

  nav ul {
    display: flex;
    flex-direction: column;
    padding: 0;
    gap: 0;
  }

  nav li {
    border-bottom: 1px solid #f3f4f6;
  }

  nav a {
    display: block;
    padding: 16px 20px;
    font-size: 16px;
  }

  .mobile-menu-btn {
    display: block;
    color: #333;
  }

  /* ========== Banner优化 ========== */
  .banner {
    padding: 50px 20px;
    text-align: center;
  }

  .banner h1 {
    font-size: 24px;
    line-height: 1.4;
    margin-bottom: 16px;
  }

  .banner-desc {
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 28px;
  }

  .trust-badge {
    font-size: 13px;
    line-height: 1.6;
  }

  /* ========== 按钮优化 ========== */
  .cta-buttons {
    flex-direction: column;
    gap: 12px;
  }

  .btn {
    width: 100%;
    padding: 14px 30px;
    font-size: 16px;
    /* 最小点击目标 48x48px */
    min-height: 48px;
  }

  /* ========== 标题优化 ========== */
  .section-title {
    font-size: 22px;
    line-height: 1.4;
    margin-bottom: 30px;
    padding: 0 10px;
  }

  /* ========== 快速导航优化 ========== */
  .quick-nav {
    padding: 20px 15px;
    margin-bottom: 30px;
  }

  .quick-nav-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .quick-nav-item {
    padding: 12px 15px;
    font-size: 14px;
    /* 确保点击目标足够大 */
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* ========== 痛点板块优化 ========== */
  .pain-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .pain-item {
    padding: 24px 20px;
  }

  .pain-item h3 {
    font-size: 18px;
    margin-bottom: 12px;
  }

  .pain-item p {
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 10px;
  }

  /* ========== 功能卡片优化 ========== */
  .feature-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .feature-card {
    padding: 28px 20px;
  }

  .feature-card h3 {
    font-size: 20px;
    margin-bottom: 12px;
  }

  .feature-icon {
    font-size: 42px;
    margin-bottom: 15px;
  }

  /* ========== 流程步骤优化 ========== */
  .steps {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .step {
    padding: 25px 20px;
  }

  .step-number {
    width: 55px;
    height: 55px;
    font-size: 26px;
    margin-bottom: 16px;
  }

  .step h3 {
    font-size: 18px;
    margin-bottom: 12px;
  }

  /* ========== 表格优化 ========== */
  table {
    font-size: 13px;
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  table th,
  table td {
    padding: 10px 8px;
    min-width: 80px;
  }

  /* 对比表格特殊处理 */
  .comparison-table table th:first-child,
  .comparison-table table td:first-child {
    position: sticky;
    left: 0;
    background: #fff;
    z-index: 1;
  }

  .comparison-table table th {
    font-size: 12px;
  }

  /* ========== FAQ优化 ========== */
  .faq-grid {
    gap: 15px;
  }

  .faq-item {
    padding: 20px 16px;
  }

  .faq-question {
    font-size: 16px;
    line-height: 1.5;
    /* 确保整个区域可点击 */
    padding: 5px 0;
  }

  .faq-answer {
    font-size: 15px;
    line-height: 1.7;
    margin-top: 12px;
  }

  .faq-icon {
    font-size: 20px;
    margin-left: 10px;
    flex-shrink: 0;
  }

  /* ========== 评价卡片优化 ========== */
  .review-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .review-card {
    padding: 24px 20px;
  }

  .review-avatar {
    width: 45px;
    height: 45px;
    font-size: 18px;
  }

  .review-name {
    font-size: 16px;
  }

  .review-role {
    font-size: 13px;
  }

  /* ========== 价格卡片优化 ========== */
  .pricing-card {
    padding: 30px 20px;
    margin: 0 16px;
  }

  .price {
    font-size: 40px;
    margin: 16px 0;
  }

  .price-features {
    margin: 20px 0;
  }

  .price-features li {
    padding: 8px 0;
    font-size: 15px;
  }

  /* ========== Footer优化 ========== */
  footer {
    padding: 40px 20px;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .footer-section h3 {
    font-size: 18px;
    margin-bottom: 15px;
  }

  .footer-section ul li {
    margin-bottom: 8px;
    font-size: 14px;
  }

  .footer-bottom {
    margin-top: 30px;
    padding-top: 20px;
    font-size: 13px;
    line-height: 1.8;
  }

  /* ========== 返回顶部按钮 ========== */
  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 48px;
    height: 48px;
    font-size: 22px;
  }

  /* ========== 其他内容区域优化 ========== */
  
  /* 图片类型展示 */
  [style*="grid-template-columns"] > div {
    padding: 18px 15px !important;
  }

  /* 统计数据展示 */
  [style*="font-size:36px"] {
    font-size: 28px !important;
  }

  /* 内容框 */
  [style*="max-width:800px"],
  [style*="max-width:900px"],
  [style*="max-width:700px"] {
    max-width: 100% !important;
    margin-left: 16px !important;
    margin-right: 16px !important;
  }

  /* 内边距调整 */
  [style*="padding:30px"] {
    padding: 20px 16px !important;
  }

  [style*="padding:35px"] {
    padding: 24px 18px !important;
  }

  [style*="padding:40px"] {
    padding: 28px 18px !important;
  }

  /* ========== 可访问性优化 ========== */
  
  /* 增大链接点击区域 */
  a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }

  /* 表单元素（如果有） */
  input,
  button,
  select,
  textarea {
    min-height: 48px;
    font-size: 16px; /* 防止iOS自动缩放 */
  }

  /* ========== 文本优化 ========== */
  
  /* 段落间距 */
  p {
    margin-bottom: 14px;
    line-height: 1.7;
  }

  /* 列表间距 */
  ul li,
  ol li {
    margin-bottom: 10px;
    line-height: 1.7;
  }

  /* ========== CTA区域优化 ========== */
  .cta-section {
    padding: 45px 20px;
  }

  .cta-section h2 {
    font-size: 24px;
    line-height: 1.4;
    margin-bottom: 16px;
  }

  .cta-section p {
    font-size: 15px;
    line-height: 1.7;
  }

  /* ========== 手势优化 ========== */
  
  /* 横向滚动提示 */
  table::after {
    content: '← 左右滑动查看更多 →';
    display: block;
    text-align: center;
    font-size: 12px;
    color: #9ca3af;
    padding: 10px;
    background: #f9fafb;
  }

  /* ========== 性能优化 ========== */
  
  /* 减少动画 */
  @media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
      animation-duration: 0.01ms !important;
      animation-iteration-count: 1 !important;
      transition-duration: 0.01ms !important;
    }
  }

  /* ========== 布局稳定性 ========== */
  
  /* 预设图片容器尺寸，防止CLS */
  img {
    height: auto;
    max-width: 100%;
  }

  /* Logo固定尺寸 */
  .logo img {
    width: auto;
    height: 40px;
  }
}

/* ========== 小屏手机优化 (< 375px) ========== */
@media (max-width: 374px) {
  
  body {
    font-size: 15px;
  }

  .container {
    padding: 0 12px;
  }

  .section {
    padding: 35px 12px;
  }

  .banner h1 {
    font-size: 22px;
  }

  .banner-desc {
    font-size: 14px;
  }

  .section-title {
    font-size: 20px;
  }

  .btn {
    padding: 12px 24px;
    font-size: 15px;
  }

  .quick-nav-grid {
    grid-template-columns: 1fr;
  }

  table {
    font-size: 12px;
  }

  .price {
    font-size: 36px !important;
  }
}

/* ========== 平板优化 (768px - 1024px) ========== */
@media (min-width: 769px) and (max-width: 1024px) {
  
  .container {
    padding: 0 30px;
  }

  .section {
    padding: 50px 30px;
  }

  .banner h1 {
    font-size: 36px;
  }

  .section-title {
    font-size: 28px;
  }

  /* 两列布局 */
  .pain-grid,
  .feature-grid,
  .review-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* 快速导航保持多列 */
  .quick-nav-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  /* 步骤流程两列 */
  .steps {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ========== 横屏模式优化 ========== */
@media (max-width: 768px) and (orientation: landscape) {
  
  .banner {
    padding: 40px 20px;
  }

  .banner h1 {
    font-size: 22px;
  }

  .section {
    padding: 35px 16px;
  }

  /* 导航菜单高度适配 */
  nav {
    height: calc(100vh - 70px);
  }
}

/* ========== 触摸设备优化 ========== */
@media (hover: none) and (pointer: coarse) {
  
  /* 移除hover效果，使用active */
  .btn:hover,
  .quick-nav-item:hover,
  .feature-card:hover,
  .review-card:hover {
    transform: none;
  }

  .btn:active {
    transform: scale(0.98);
  }

  /* 增大点击区域 */
  a,
  button {
    padding: 12px;
  }

  /* 移除焦点轮廓（已有active反馈） */
  *:focus {
    outline: none;
  }

  /* 保留可访问性的焦点指示 */
  *:focus-visible {
    outline: 2px solid #667eea;
    outline-offset: 2px;
  }
}

/* ========== Dark Mode支持（可选） ========== */
@media (prefers-color-scheme: dark) {
  /* 如果需要暗黑模式，可以在这里添加样式 */
}

/* ========== 打印样式 ========== */
@media print {
  
  header,
  nav,
  .mobile-menu-btn,
  .back-to-top,
  .cta-buttons,
  .cta-section {
    display: none !important;
  }

  body {
    font-size: 12pt;
    line-height: 1.5;
    color: #000;
    background: #fff;
  }

  .section {
    page-break-inside: avoid;
  }

  a {
    color: #000;
    text-decoration: underline;
  }

  a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 10pt;
    color: #666;
  }
}

