/* ============================================================================
   长荡湖 H5 · 游玩攻略模块移动样式  mobile/guide.css
   仅移动端 (max-width:768px) 生效；PC(≥769px) 零影响。
   命名空间：gha-* (攻略首页/列表)、gd-* (攻略详情)、faq-* (FAQ)。
   说明：guide-home.css / guide-detail.css 在视图 body 内联加载、晚于本文件，
        故对其既有规则的移动覆盖使用高优先级选择器 + 必要 !important。
   ============================================================================ */

@media (max-width: 768px) {

  /* ---------- 攻略首页 / 列表 Hero ---------- */
  /* 保留既有固定高度横幅(≤480:360px)，仅收窄内边距与字号，避免内容压顶栏 */
  .gh-a .gha-hero, .gha .gha-hero { height: 380px !important; padding-top: 56px; }
  .gh-a .gha-hero-in, .gha .gha-hero-in { padding: 0 18px !important; }
  .gh-a .gha-hero h1, .gha .gha-hero h1 {
    font-size: 27px !important; letter-spacing: 3px !important; margin-bottom: 8px !important;
  }
  .gh-a .gha-sub, .gha .gha-sub { font-size: 13.5px !important; margin-bottom: 18px !important; letter-spacing: 1px; }
  .gh-a .gha-tag, .gha .gha-tag { margin-bottom: 12px !important; font-size: 11px; padding: 4px 14px; }

  /* 搜索框：纵向单列，按钮通栏，触控≥44 */
  .gha-search-box { flex-direction: column !important; gap: 8px; padding: 8px; }
  .gha-search-box input { width: 100% !important; font-size: 16px !important; padding: 12px 16px; }
  .gha-search-box button { width: 100% !important; padding: 13px !important; font-size: 15px; min-height: 46px; }
  .gha-hot-search { margin-top: 14px !important; line-height: 2; }
  .gha-hot-search a { display: inline-block; margin: 0 4px; }

  /* 【重点】玩法分类上浮卡：取消负 margin，回归正常流，与 hero 间距清晰 */
  .gha-catnav {
    margin: 14px 12px 0 !important;
    padding: 12px !important;
    border-radius: 14px !important;
    gap: 6px !important;
    position: relative;
    z-index: 2;
  }
  .gha-catnav a { padding: 8px 14px !important; font-size: 13px; }

  /* 难度筛选条（list.php 内联）：横向可滑动不换行溢出 */
  .gha > div[style*="flex-wrap:wrap"], .gh-a div[style*="flex-wrap:wrap"] {
    flex-wrap: nowrap !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 6px;
  }
  .gha > div[style*="flex-wrap:wrap"]::-webkit-scrollbar,
  .gh-a div[style*="flex-wrap:wrap"]::-webkit-scrollbar { display: none; }

  /* 主体 */
  .gha-wrap { margin: 18px auto !important; padding: 0 12px !important; }
  .gha-grid { grid-template-columns: 1fr !important; gap: 14px !important; }
  .gha-card-img { height: 180px !important; }
  .gha-card-body { padding: 14px !important; }
  .gha-card-body h3 { font-size: 16px; }
  .gha-empty { padding: 40px 16px !important; }

  /* 分页（list.php 内联 flex） */
  .gha-wrap > div[style*="justify-content:center"] { flex-wrap: wrap !important; gap: 6px !important; }
  .gha-wrap > div[style*="justify-content:center"] a { min-height: 38px; display: inline-flex; align-items: center; }

  /* CTA */
  .gha-cta { padding: 28px 18px !important; margin: 24px auto !important; border-radius: 14px !important; }
  .gha-cta h3 { font-size: 19px !important; }
  .gha-cta a { padding: 12px 32px !important; min-height: 46px; display: inline-flex; align-items: center; }

  /* ---------- 攻略详情 guide/show ---------- */
  .gd .gd-pagebar-in { padding: 18px 16px !important; }
  .gd .gd-pb-row { flex-direction: column !important; gap: 14px !important; }
  .gd .gd-pagebar h1 { font-size: 22px !important; line-height: 1.35; }
  .gd .gd-pb-meta { gap: 8px 14px !important; font-size: 12px; }
  .gd .gd-author { flex-basis: 100%; }
  /* 顶部操作按钮：通栏、≥44 */
  .gd .gd-pb-actions { width: 100%; flex-wrap: wrap; }
  .gd .gd-pb-actions button { flex: 1 1 auto; min-height: 44px; padding: 10px 16px !important; }

  .gd .gd-wrap { grid-template-columns: 1fr !important; padding: 12px 12px 32px !important; gap: 12px !important; }
  .gd .gd-main { padding: 16px 14px !important; border-radius: 14px !important; }
  .gd .gd-sidebar { position: static !important; }

  /* 正文图文不溢出 */
  .gd .gd-article { font-size: 15.5px !important; line-height: 1.9; }
  .gd .gd-article img { max-width: 100% !important; height: auto !important; }
  .gd .gd-article table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
  .gd .gd-article pre, .gd .gd-article code { white-space: pre-wrap; word-break: break-word; }
  .gd .gd-article blockquote { padding: 12px 14px !important; font-size: 14px !important; }

  /* 行程总览 */
  .gd .gd-route { padding: 4px 0; }
  .gd .gd-rd { gap: 10px !important; }

  /* 分享图标行 */
  .gd .gd-share { flex-wrap: wrap; gap: 10px !important; }
  .gd .gd-share-icon { width: 42px !important; height: 42px !important; }

  /* FAQ 区块 */
  .gd .gd-faq-section { padding: 16px 14px !important; margin: 20px 0 !important; }
  .gd .gd-faq-head { flex-direction: column; align-items: stretch !important; gap: 10px !important; }
  .gd .gd-faq-toolbar { flex-wrap: wrap; }
  .gd .gd-faq-search { flex: 1; }
  .gd .gd-faq-search input { width: 100% !important; font-size: 16px !important; }
  .gd .gd-faq-q { padding: 12px 6px !important; gap: 8px !important; }
  .gd .gd-faq-a-inner { padding: 0 4px 12px 46px !important; }
  .gd .gd-faq-actions { gap: 6px !important; }
  .gd .gd-faq-actions button { min-height: 34px; padding: 5px 10px !important; }

  /* 评论区 */
  .gd .gd-comments { padding: 16px 14px !important; }
  .gd .gd-cf { padding: 12px !important; }
  .gd .gd-cf textarea { font-size: 16px !important; min-height: 80px; }
  .gd .gd-cf .row { flex-direction: column !important; gap: 10px !important; }
  .gd .gd-cf input { font-size: 16px !important; }
  .gd .gd-cf button { width: 100%; min-height: 44px; }
  .gd .gd-c-item { gap: 10px !important; }

  /* 右侧栏 / 相关推荐网格：单列，卡片不拉伸 */
  .gd .gd-side-card { padding: 14px !important; }
  .gd .gd-reco-section { padding: 0 12px !important; }
  .gd .gd-reco-grid { grid-template-columns: 1fr 1fr !important; gap: 12px !important; }
  .gd .gd-routes-grid { grid-template-columns: 1fr !important; gap: 12px !important; }
  .gd .gd-guess-grid { grid-template-columns: 1fr 1fr !important; gap: 10px !important; }

  /* ---------- FAQ 独立页 /faq ---------- */
  .faq-page { padding: 20px 14px !important; }
  .faq-page h1 { font-size: 24px !important; }
  .faq-search-box { flex-direction: column !important; gap: 10px !important; }
  .faq-search-box input { width: 100% !important; font-size: 16px !important; min-height: 46px; }
  .faq-search-box button { width: 100%; min-height: 46px; }
  .faq-group { padding: 16px !important; }
  .faq-item .q { padding: 12px 0; }
  .faq-pagination { flex-wrap: wrap; gap: 6px; }
  .faq-pagination a, .faq-pagination span { min-width: 38px; min-height: 38px; display: inline-flex; align-items: center; justify-content: center; }
}

/* 超窄屏 ≤380 */
@media (max-width: 380px) {
  .gha-card-img { height: 150px !important; }
  .gd .gd-reco-grid, .gd .gd-guess-grid { grid-template-columns: 1fr !important; }
}
