/* ============================================================================
   长荡湖首页 H5 App 化  mobile/home.css
   仅移动端 (max-width:768px) 生效；PC 端(≥769px) 完全不加载本文件规则。
   命名空间统一挂在 .mag-home 下，避免污染其它模块。
   ============================================================================ */

/* PC 默认隐藏首页专属 App 顶栏/抽屉（≥769px 永不显示） */
.h5-homebar,
.h5-home-drawer { display: none; }

@media (max-width: 768px) {

  /* ---------- 1. 移动端 App 顶栏（覆盖在 hero 上方，半透明深色） ---------- */
  .h5-homebar {
    display: flex; align-items: center; justify-content: space-between;
    position: fixed; top: 0; left: 0; right: 0; z-index: 1300;
    height: 52px; padding: 0 14px;
    background: rgba(11, 22, 40, .42);
    -webkit-backdrop-filter: saturate(160%) blur(12px);
    backdrop-filter: saturate(160%) blur(12px);
  }
  .h5-homebar-logo {
    font-family: 'Noto Serif SC', serif;
    font-size: 21px; font-weight: 900; letter-spacing: 2px;
    color: #fff; text-decoration: none; line-height: 1;
  }
  .h5-homebar-logo span { color: #e8a866; }
  .h5-homebar-actions { display: flex; align-items: center; gap: 4px; }
  .h5-homebar-icon,
  .h5-homebar-burger {
    width: 44px; height: 44px; display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 22px; border-radius: 50%; flex-shrink: 0;
    text-decoration: none; -webkit-tap-highlight-color: rgba(255,255,255,.15);
  }
  .h5-homebar-icon:active, .h5-homebar-burger:active { background: rgba(255,255,255,.18); }
  .h5-homebar-burger { flex-direction: column; gap: 4px; }
  .h5-homebar-burger span { display: block; width: 22px; height: 2.5px; background: #fff; border-radius: 2px; }

  /* ---------- 2. 右侧抽屉 ---------- */
  .h5-home-drawer { display: block; visibility: hidden; pointer-events: none; }
  .h5-home-drawer.open { visibility: visible; pointer-events: auto; }
  .h5-home-mask {
    position: fixed; inset: 0; z-index: 1301; background: rgba(8, 16, 30, .5);
    opacity: 0; transition: opacity .28s ease;
  }
  .h5-home-drawer.open .h5-home-mask { opacity: 1; }
  .h5-home-panel {
    position: fixed; top: 0; right: 0; bottom: 0; z-index: 1302;
    width: 78%; max-width: 320px; background: #fff;
    transform: translateX(100%); transition: transform .28s ease;
    display: flex; flex-direction: column;
    padding: 14px 0 calc(16px + env(safe-area-inset-bottom));
    box-shadow: -8px 0 30px rgba(0,0,0,.18);
  }
  .h5-home-drawer.open .h5-home-panel { transform: translateX(0); }
  .h5-home-panel-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 8px 18px 14px; border-bottom: 1px solid #f0ece6;
  }
  .h5-home-panel-logo {
    font-family: 'Noto Serif SC', serif; font-size: 20px; font-weight: 900;
    letter-spacing: 2px; color: #1a1a1a;
  }
  .h5-home-panel-logo span { color: #c87533; }
  .h5-home-panel-close {
    width: 40px; height: 40px; font-size: 26px; line-height: 1; color: #888;
    background: none; border: none; cursor: pointer;
  }
  .h5-home-panel-nav { display: flex; flex-direction: column; padding: 10px 12px; overflow-y: auto; }
  .h5-home-panel-nav a {
    display: flex; align-items: center; gap: 12px;
    padding: 14px 12px; font-size: 16px; font-weight: 500; color: #23323a;
    text-decoration: none; border-radius: 12px; min-height: 48px;
  }
  .h5-home-panel-nav a i { font-size: 20px; color: #c87533; width: 24px; text-align: center; }
  .h5-home-panel-nav a:active { background: #f6efe6; }
  .h5-home-panel-nav a.active { color: #c87533; font-weight: 700; }

  /* ---------- 3. Hero：收高度，避让顶栏，字号收敛 ---------- */
  .mag-home .mag-hero { height: 76vh; min-height: 460px; }
  .mag-home .mag-hero-content { left: 20px; right: 20px; bottom: 64px; gap: 14px; }
  .mag-home .mag-hero-cat { font-size: 10px; padding: 4px 10px; margin-bottom: 14px; letter-spacing: 2px; }
  .mag-home .mag-hero-title { font-size: 38px; line-height: 1.18; margin-bottom: 12px; letter-spacing: 1px; }
  .mag-home .mag-hero-sub { font-size: 14px; line-height: 1.75; max-width: 100%; }
  .mag-home .mag-hero-dots { bottom: 26px; left: 20px; }
  .mag-home .mag-hero-scroll { display: none; }

  /* ---------- 4. 数据条：2 列紧凑 ---------- */
  .mag-home .mag-data-bar { padding: 22px 16px; gap: 16px; }
  .mag-home .mag-data-bar-left { font-size: 11px; letter-spacing: 2px; }
  .mag-home .mag-data-bar-items { gap: 14px 10px; width: 100%; justify-content: space-between; }
  .mag-home .mag-data-bar-item { flex: 1 1 28px; min-width: 0; }
  .mag-home .mag-data-bar-num { font-size: 24px; }
  .mag-home .mag-data-bar-num small { font-size: 11px; }
  .mag-home .mag-data-bar-label { font-size: 10px; letter-spacing: 1px; margin-top: 4px; }

  /* ---------- 5. 版块通用：收内边距，标题收敛 ---------- */
  .mag-home .mag-section { padding: 40px 18px; }
  .mag-home .mag-section-head { margin-bottom: 22px; padding-bottom: 12px; flex-wrap: wrap; gap: 8px; }
  .mag-home .mag-section-head-left h2 { font-size: 26px; }
  .mag-home .mag-section-head-left p { font-size: 11px; letter-spacing: 1px; }
  .mag-home .mag-section-head-right a { font-size: 12px; }

  /* ---------- 6. 湖韵专题：单列卡片流，图高收敛 ---------- */
  .mag-home .mag-feature-grid { grid-template-columns: 1fr; grid-template-rows: none; height: auto; gap: 14px; }
  .mag-home .mag-feature-card { height: 190px; }
  .mag-home .mag-feature-card.large { height: 230px; }

  /* ---------- 7. 游玩攻略：单列 ---------- */
  .mag-home .mag-guide-grid { grid-template-columns: 1fr; gap: 16px; }

  /* ---------- 8. 湖畔共叙：上下堆叠 ---------- */
  .mag-home .mag-sns-layout { grid-template-columns: 1fr; gap: 16px; }

  /* ---------- 9. 洮湖好物：2 列 ---------- */
  .mag-home .mag-goods-row { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .mag-home .mag-goods-card { border-radius: 8px; }
  .mag-home .mag-goods-card-title { font-size: 13px; }
  .mag-home .mag-goods-card-desc { font-size: 11px; -webkit-line-clamp: 1; }

  /* ---------- 10. 盛事现场：banner 高度收敛，卡片单列 ---------- */
  .mag-home .mag-event-banner { height: 200px; margin-bottom: 16px; border-radius: 8px; }
  .mag-home .mag-event-banner-info { padding: 0 20px; }
  .mag-home .mag-event-banner-title { font-size: 21px; }
  .mag-home .mag-event-banner-desc { font-size: 12.5px; line-height: 1.6; }
  .mag-home .mag-event-banner-cat { font-size: 10px; margin-bottom: 8px; }
  .mag-home .mag-event-cards { grid-template-columns: 1fr; gap: 12px; margin-top: 14px; }
  .mag-home .mag-event-card { padding: 16px; }

  /* 倒计时数字收敛，不溢出 */
  .mag-home .mag-countdown { gap: 8px; flex-wrap: wrap; }
  .mag-home .mag-countdown-item { min-width: 48px; }
  .mag-home .mag-cd-num { font-size: 20px; }

  /* ---------- 11. 全宽 banner 文案收敛 ---------- */
  .mag-home .mag-full-banner-content { padding: 24px 20px; }
  .mag-home .mag-full-banner-content h2 { font-size: 20px; }

  /* ---------- 12. 动效克制：关闭 hover 浮起与 reveal 位移 ---------- */
  .mag-home .mag-reveal { transform: none !important; }
  .mag-home .mag-feature-card:active,
  .mag-home .mag-guide-card:active,
  .mag-home .mag-goods-card:active,
  .mag-home .mag-event-card:active { transform: scale(.99); }

  /* 为固定底部 Tab 栏预留最后一屏留白（body 全局已有，这里兜底） */
  .mag-home { padding-bottom: 8px; }
}

/* 超窄屏 ≤380px 进一步收紧 */
@media (max-width: 380px) {
  .mag-home .mag-hero { height: 70vh; min-height: 420px; }
  .mag-home .mag-hero-title { font-size: 32px; }
  .mag-home .mag-section { padding: 34px 14px; }
  .mag-home .mag-data-bar-num { font-size: 21px; }
}
