/* ==========================================================================
   Mobile layer — 手机版增强样式
   在 styles.css 之后加载。所有布局规则仅在手机宽度（≤ 760px）下生效，
   桌面版浏览体验完全不变。

   结构：
   1. 底部标签栏（App 式主导航，桌面隐藏）
   2. 「更多」底部弹层
   3. 手机端布局细化（顶栏、Hero、指标、卡片、表单、安全区等）
   ========================================================================== */

/* -- 1. 底部标签栏 -------------------------------------------------------- */
.mobile-tabbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 1200;
  display: none; /* 仅手机宽度显示 */
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-top: 1px solid rgba(16, 37, 63, .1);
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.tabbar-inner {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  max-width: 560px;
  margin: 0 auto;
}
.tab-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: 56px;
  padding: 8px 2px 7px;
  border: 0;
  background: none;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .02em;
  line-height: 1.2;
  color: var(--muted);
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.tab-item svg { width: 23px; height: 23px; }
.tab-item.active { color: var(--blue-deep); }
.tab-item.active svg { color: var(--blue); }

/* -- 2. 「更多」底部弹层 -------------------------------------------------- */
.mobile-sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1250;
  background: rgba(6, 27, 45, .45);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
  -webkit-tap-highlight-color: transparent;
}
body.sheet-open .mobile-sheet-backdrop { opacity: 1; pointer-events: auto; }
.mobile-sheet {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 1300;
  background: #fff;
  border-radius: 22px 22px 0 0;
  padding: 10px 18px calc(20px + env(safe-area-inset-bottom, 0));
  max-height: 78vh;
  overflow: auto;
  transform: translateY(105%);
  transition: transform .32s var(--ease);
  box-shadow: 0 -18px 50px rgba(9, 45, 78, .18);
}
body.sheet-open .mobile-sheet { transform: none; }
.sheet-handle {
  width: 38px; height: 4px;
  border-radius: 99px;
  background: rgba(16, 37, 63, .16);
  margin: 6px auto 14px;
}
.sheet-title {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
}
.sheet-link {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 14px 4px;
  border-top: 1px solid var(--line);
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.sheet-link .sheet-icon {
  flex: 0 0 auto;
  width: 34px; height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(13, 102, 180, .08);
  color: var(--blue);
}
.sheet-link .sheet-icon svg { width: 18px; height: 18px; }
.sheet-link .chev { margin-left: auto; color: var(--muted); font-size: 20px; line-height: 1; }
.sheet-link.active { color: var(--blue-deep); }
.sheet-link.active .sheet-icon {
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  color: #fff;
}

/* -- 3. 手机端布局细化 ---------------------------------------------------- */
@media (max-width: 760px) {
  :root { --header-h: 60px; --radius-xl: 22px; --radius-lg: 16px; }

  /* 激活底部标签栏 */
  .mobile-tabbar { display: block; }

  /* 为底部标签栏留出空间（含 iPhone 底部安全区） */
  body { padding-bottom: calc(56px + env(safe-area-inset-bottom, 0)); }
  body.sheet-open { overflow: hidden; }

  .container, .narrow { width: calc(100% - 24px); }

  /* 顶栏简化为 Logo + 语言切换，主导航交给底部标签栏 */
  .site-nav, .menu-toggle { display: none !important; }
  .header-inner { gap: 10px; }
  .brand { min-width: 0; }
  .brand-logo { width: 42px; height: 37px; }
  .lang-toggle { min-height: 36px; padding-inline: 11px; font-size: 12px; }
  .site-header { background: rgba(255, 255, 255, .92); }

  /* 页脚底部留出安全区 */
  .site-footer { padding-bottom: calc(24px + env(safe-area-inset-bottom, 0)); }

  /* 首页 Hero：竖排满屏、按钮通栏 */
  .hero { min-height: auto; }
  .hero-inner {
    min-height: max(520px, calc(100vh - var(--header-h)));
    min-height: max(520px, calc(100svh - var(--header-h)));
    padding: 44px 0 52px;
  }
  .hero .eyebrow { font-size: 11px; letter-spacing: .12em; }
  .hero h1 { font-size: clamp(30px, 8.6vw, 40px); letter-spacing: -.03em; margin: 15px 0 17px; }
  .hero-lede { font-size: 15.5px; margin: 0 0 22px; }
  .hero-meta { font-size: 13px; gap: 6px 16px; display: grid; }
  .hero-actions { gap: 10px; margin-top: 26px; }
  .hero-actions .btn { flex: 1 1 100%; min-height: 50px; }
  .hero-dots { left: 12px; bottom: 14px; }

  /* 栏目与标题 */
  .section { padding: 54px 0; }
  .section.tight { padding: 42px 0; }
  .section-heading { gap: 18px; margin-bottom: 30px; }
  .section-heading h2 { font-size: 26px; }
  .kicker { font-size: 11px; }
  .lead { font-size: 16px; }

  /* 数据条：2 列卡片 */
  .metric-strip { margin-top: -26px; }
  .metric-panel { grid-template-columns: 1fr 1fr; border-radius: var(--radius-lg); }
  .metric { padding: 18px; min-height: 94px; }
  .metric strong { font-size: 22px; }
  .metric span { font-size: 10px; margin-top: 5px; }
  .metric:nth-child(3) { border-left: 0; border-top: 1px solid var(--line); }
  .metric:nth-child(4) { border-top: 1px solid var(--line); }

  /* 卡片 */
  .cards, .highlight-grid { gap: 14px; }
  .highlight-card { min-height: 0; padding: 22px 20px; }
  .highlight-card::after { font-size: 40px; right: 16px; }
  .highlight-card h3 { font-size: 18px; margin: 20px 0 10px; }
  .card { padding: 22px 20px; }

  /* 图文分栏与媒体 */
  .split { gap: 34px; }
  .media-card { min-height: 250px; }
  .icon-button { width: 48px; height: 48px; }

  /* 内页 Hero */
  .page-hero { padding: 50px 0 40px; }
  .page-hero h1 { font-size: 30px; }
  .page-hero p { font-size: 15px; }
  .breadcrumb { font-size: 10px; }

  /* 锚点导航：横向滑动胶囊 */
  .local-nav {
    top: calc(var(--header-h) + 8px);
    width: calc(100% - 24px);
    border-radius: 12px;
    padding: 6px;
    margin-bottom: 26px;
    -webkit-overflow-scrolling: touch;
  }
  .local-nav a { padding: 9px 12px; }

  /* 展览板块 */
  .expo-section { padding: 32px 0; scroll-margin-top: calc(var(--header-h) + 64px); }
  .expo-head h2 { font-size: 24px; }
  .expo-block { padding: 20px 18px; }
  .expo-block h3 { font-size: 15.5px; }
  .expo-block p { font-size: 13.5px; }
  .decor-wide { aspect-ratio: 16/10; margin-top: 22px; }

  /* 交通与案例 */
  .travel-card { padding: 16px; }
  .travel-group h2 { font-size: 23px; }
  .case-card { border-radius: var(--radius-lg); }
  .case-media { min-height: 200px; }
  .case-content { padding: 20px; }
  .case-content h2 { font-size: 17px; }

  /* 行动横幅 */
  .contact-band { padding: 26px 20px; border-radius: var(--radius-lg); gap: 18px; }
  .contact-band h2 { font-size: 24px; }
  .contact-band .btn { flex: 1 1 100%; }

  /* 表单：16px 输入避免 iOS 聚焦缩放，提交按钮通栏 */
  .field input, .field select, .field textarea { font-size: 16px; min-height: 50px; }
  .form-body { padding: 26px 20px; }
  .form-body h2 { font-size: 25px; }
  .form-visual { min-height: 200px; }
  .form-visual .visual-copy h3 { font-size: 21px; }
  .btn { min-height: 50px; }
  .registration-form .btn { width: 100%; }

  /* 其他 */
  .poem { font-size: 16px; padding: 24px 20px; }
  .footer-grid { gap: 26px; }
  a, .btn, .tab-item, .sheet-link { -webkit-tap-highlight-color: transparent; }
}

/* 弹层动画在系统“减少动态效果”下直接显示 */
@media (prefers-reduced-motion: reduce) {
  .mobile-sheet, .mobile-sheet-backdrop { transition: none; }
}
