/* ==========================================================
   福清文旅 · 全站响应式（适配手机 / 平板 / 小屏笔记本）
   手机端所有图文模块统一改为「上下结构」
   ========================================================== */
/* 只给 html 加 overflow-x（会传播到视口）；若加在 body 上，body 会成为滚动容器，
   使内部 position:sticky 失效——侧栏吸顶依赖这一点，勿改回 html,body */
html { overflow-x: hidden; }
img { max-width: 100%; }

/* ---------- 通用：隐藏手机端汉堡 / 电话按钮 ---------- */
.nav-toggle { display: none; }
.mo-phone { display: none; }

/* ---------- 顶部导航：居中 + 防变形保护 ---------- */
/* 注意：不要改写 .topbar 的 position —— 首页头部是 fixed，
   一旦变成静态占位会把全屏轮播整体下推，导致每屏底部被裁切。
   内页头部本身已为 relative，天然提供居中定位上下文。 */
.logo, .weather, .top-right { flex-shrink: 0; }
/* 导航在头部绝对居中（不受左右模块宽度影响）；
   极端窄屏时菜单横滑兜底，绝不换行变形 */
.nav {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  flex: none; justify-content: center; min-width: 0;
  max-width: calc(100% - 36px);
  overflow-x: auto; scrollbar-width: none;
}
.nav::-webkit-scrollbar { display: none; }
/* 右侧工具组靠右 */
.top-right, .mo-phone { margin-left: auto; }
/* 菜单横滑容器会裁切溢出元素，当前项下划线改为内置，避免在容器边界被切断 */
.nav a.active::after { bottom: 2px; }

/* ==========================================================
   〇A0、大屏（≥1681px）：导航文字适当加大，提升大屏可读性
   ========================================================== */
@media (min-width: 1681px) {
  .nav { gap: 10px; }
  .nav a {
    font-size: 17px; letter-spacing: 2px; padding: 9px 15px;
  }
  .nav a.active::after { height: 2px; }
}
@media (min-width: 1921px) {
  .nav { gap: 16px; }
  .nav a {
    font-size: 18.5px; letter-spacing: 3px; padding: 10px 20px;
  }
  .nav a.active::after { height: 3px; }
}
@media (min-width: 2400px) {
  .nav { gap: 22px; }
  .nav a { font-size: 20px; letter-spacing: 4px; padding: 10px 24px; }
}

/* ==========================================================
   〇A、超大屏（≥1600px）：首页场景内容块上限对齐 1680 并等比舒展
   ========================================================== */
@media (min-width: 1600px) {
  .scroll-wrap, .news-wrap { width: min(1480px, 88vw); }
  .guide-wrap { width: min(1680px, 92vw); }
  .spot .photo img { height: 360px; }
  .news-photo { width: 440px; height: 440px; }
  .stat-card { width: 224px; }
  .stat-card .ribbon { width: 176px; font-size: 16px; }
  .pavilion { padding: 72px 56px 50px; }
  .hang { width: 178px; }
  .hang .disc { width: 86px; height: 86px; font-size: 38px; }
  .news-card { padding: 50px 52px 34px; }
  .news-item h3 { font-size: 27px; }
}

/* ==========================================================
   〇B、超宽屏（≥1400px）：栅格提密，充分利用 1680 内容宽度
   ========================================================== */
@media (min-width: 1400px) {
  .grid { grid-template-columns: repeat(4, 1fr); }
  .card-grid { grid-template-columns: repeat(4, 1fr); }
  .relate .rel-row a { width: calc(25% - 11px); }
  .sidemenu { width: 240px; }
  .sidemenu a { padding: 16px 24px; font-size: 17px; }
  .info-table th { width: 170px; }
  .content, .crumbs, .foot-inner { padding-left: 32px; padding-right: 32px; }
}

/* ==========================================================
   〇、1680px 以下：头部阶梯降级（优先隐藏非核心模块）
   ========================================================== */
/* 隐藏：语言切换 */
@media (max-width: 1680px) {
  .topbar { padding: 0 26px; }
  .logo { margin-right: 20px; }
  .logo .seal { width: 42px; height: 42px; font-size: 28px; }
  .logo .name { font-size: 22px; letter-spacing: 3px; }
  .logo .name small { font-size: 9.5px; letter-spacing: 2px; }
  .weather { margin-right: 24px; font-size: 13.5px; }
  .nav { gap: 4px; }
  .nav a { font-size: 14.5px; padding: 8px 9px; }
  .top-right { gap: 14px; font-size: 12.5px; }
  .u-lang { display: none; }
}

/* 再隐藏：无障碍、投诉建议 */
@media (max-width: 1500px) {
  .logo .seal { width: 40px; height: 40px; font-size: 27px; }
  .logo .name { font-size: 21px; }
  .nav a { font-size: 14px; padding: 8px 8px; }
  .top-right { gap: 13px; }
  .u-access, .u-feedback { display: none; }
}

/* 再隐藏：天气模块 */
@media (max-width: 1360px) {
  .logo { margin-right: 16px; }
  .weather { display: none; }
  .nav a { font-size: 14px; }
}

/* 再隐藏：登录/注册、副标题，整体压缩 */
@media (max-width: 1200px) {
  .topbar { height: 66px; padding: 0 20px; }
  .logo .seal { width: 38px; height: 38px; font-size: 25px; }
  .logo .name { font-size: 19px; letter-spacing: 2px; }
  .logo .name small { display: none; }
  .nav a { font-size: 13.5px; padding: 7px 7px; letter-spacing: 0; }
  .top-right { font-size: 12.5px; gap: 12px; }
  .u-login { display: none; }
}

/* 保只剩电话：进一步压缩 */
@media (max-width: 1000px) {
  .topbar { height: 62px; padding: 0 16px; }
  .logo .name { font-size: 18px; }
  .nav a { font-size: 13px; padding: 6px 6px; }
  .top-right { font-size: 12px; gap: 10px; }
}

/* ==========================================================
   一、平板 / 小屏笔记本  <=1100px
   ========================================================== */
@media (max-width: 1100px) {
  .page-body { max-width: 100%; padding: 0 16px; }
  .foot-inner { padding: 0 16px; }
  .content { padding: 28px 26px; }
  .sidemenu { width: 180px; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .order-box { flex-wrap: wrap; }
}

/* ==========================================================
   二、手机端通用  <=860px
   ========================================================== */
@media (max-width: 860px) {

  /* ---------- 顶部导航变抽屉 ---------- */
  .topbar { height: 56px; padding: 0 12px; }
  .logo { gap: 8px; margin-right: auto; }
  .logo .seal { width: 36px; height: 36px; font-size: 24px; }
  .logo .name { font-size: 18px; letter-spacing: 2px; }
  .logo .name small { display: none; }
  .weather { display: none; }
  .top-right { display: none; }

  .mo-phone {
    display: inline-flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; margin-right: 6px; border-radius: 50%;
    background: rgba(176, 58, 42, .85); color: #ffe9c8; font-size: 16px;
  }

  /* 汉堡按钮 */
  .nav-toggle {
    display: flex; flex-direction: column; justify-content: center; gap: 4px;
    width: 38px; height: 34px; padding: 0 6px; cursor: pointer;
    border: 1px solid rgba(201, 160, 99, .5); border-radius: 6px;
    background: rgba(0, 0, 0, .25); -webkit-tap-highlight-color: transparent;
  }
  .nav-toggle span {
    display: block; height: 2px; background: #f0e4c8; border-radius: 2px;
    transition: transform .3s, opacity .25s;
  }
  .nav-toggle.on span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .nav-toggle.on span:nth-child(2) { opacity: 0; }
  .nav-toggle.on span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

  /* 抽屉菜单 */
  .nav {
    position: fixed; left: 0; right: 0; top: 56px; max-width: none;
    flex: none; flex-direction: column; gap: 0;
    background: linear-gradient(180deg, rgba(18, 11, 5, .985), rgba(18, 11, 5, .96));
    padding: 4px 0 10px; box-shadow: 0 12px 26px rgba(0, 0, 0, .55);
    transform: translateY(-140%); transition: transform .35s ease;
    visibility: hidden; z-index: 200;
  }
  .nav.open { transform: translateY(0); visibility: visible; }
  .nav a {
    padding: 14px 22px; font-size: 17px; letter-spacing: 3px; color: #f4e7cb;
    border-bottom: 1px dashed rgba(201, 160, 99, .28);
  }
  .nav a:last-child { border-bottom: none; }
  .nav a.active::after { left: 22px; transform: none; width: 34px; bottom: 7px; }

  /* ---------- 内页：横幅 / 面包屑 / 主体 ---------- */
  .page-banner { height: 120px; }
  .crumbs { padding: 14px 14px 0; font-size: 12.5px; line-height: 1.9; }
  .page-body {
    flex-direction: column; gap: 14px; padding: 0 14px; margin: 14px auto 34px;
  }

  /* 侧栏 → 横向滑动 Tab */
  .sidemenu {
    width: 100%; display: flex; overflow-x: auto; overflow-y: hidden;
    border-radius: 8px; box-shadow: 0 3px 10px rgba(120, 90, 40, .14);
    -webkit-overflow-scrolling: touch; scrollbar-width: none;
  }
  .sidemenu::-webkit-scrollbar { display: none; }
  .sidemenu a {
    flex: 0 0 auto; padding: 11px 16px; font-size: 15px; letter-spacing: 1px;
    border-bottom: none; border-right: 1px dashed #d9c294; white-space: nowrap;
  }
  .sidemenu a:last-child { border-right: none; }
  .sidemenu a.on { background: linear-gradient(160deg, #b03a2a, #8e2418); }

  .content {
    width: 100%; padding: 18px 15px 24px; min-height: 0; border-radius: 8px;
  }
  .content h2.title { font-size: 21px; letter-spacing: 1px; margin-bottom: 16px; }
  .content p.para { font-size: 14.5px; line-height: 1.95; }
  .content .lead-img { max-height: 200px; margin-bottom: 16px; }

  /* ---------- 动态列表：上下结构 ---------- */
  .news-row { flex-direction: column; align-items: stretch; gap: 12px; padding: 14px; }
  .news-row img { width: 100%; height: 170px; border-radius: 6px; }
  .news-row h4 { font-size: 17px; line-height: 1.55; margin-bottom: 6px; }
  .pager { flex-wrap: wrap; margin-top: 22px; }

  /* ---------- 图库 / 视频网格 ---------- */
  .grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .cell img { height: 128px; }
  .cell .cap { font-size: 13px; padding: 8px 10px; }
  .cell .play { width: 42px; height: 42px; font-size: 16px; }

  /* ---------- 列表卡片（游玩指南） ---------- */
  .card-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .card img { height: 116px; }
  .card .cbody { padding: 10px 11px 12px; }
  .card h4 { font-size: 15px; line-height: 1.45; }
  .card p { font-size: 11.5px; height: 36px; }
  .count-bar { font-size: 12px; margin-bottom: 14px; }

  /* ---------- 详情页 ---------- */
  .art-title { font-size: 21px; line-height: 1.5; }
  .art-meta { gap: 6px 18px; font-size: 12px; padding-bottom: 12px; margin-bottom: 18px; }
  .art-body p { font-size: 14.5px; line-height: 1.95; }
  .art-body img { max-height: 210px; }
  .art-h3 { font-size: 18px; margin: 22px 0 12px; padding-left: 10px; }
  .art-fig { margin: 4px 0 18px; }
  .art-fig img { max-height: 230px; }
  .art-fig figcaption { font-size: 12px; margin-top: 7px; }
  .art-fig.multi { grid-template-columns: 1fr; gap: 10px; }
  .art-fig.multi img { max-height: 200px; }
  .hero-img { height: 200px; }
  .gallery { flex-wrap: wrap; gap: 8px; }
  .gallery img { flex: 1 1 30%; height: 92px; }

  .info-table th { width: 84px; white-space: normal; }
  .info-table th, .info-table td { padding: 10px 12px; font-size: 13.5px; }

  .order-box { flex-direction: column; align-items: stretch; gap: 14px; padding: 18px 16px; }
  .order-box .price { font-size: 26px; }
  .order-box .qr { align-self: center; }
  .btn-order { width: 100%; padding: 12px 0; }

  .relate .rel-row { flex-direction: column; }
  .relate .rel-row a { width: 100%; }

  /* ---------- 商品详情（酒店/美食/文创） ---------- */
  .gd-head { flex-direction: column; gap: 14px; margin-bottom: 18px; }
  .gd-head img { width: 100%; height: 200px; }
  .gd-head h1 { font-size: 21px; }
  .gd-head p { font-size: 14px; line-height: 1.9; }

  /* ---------- 联系我们 ---------- */
  .contact-card { padding: 18px 16px; }
  .contact-card h4 { font-size: 17px; }
  .contact-card p { line-height: 1.95; }
  .contact-card p b { display: block; min-width: 0; }
  .photo-row { flex-direction: column; gap: 12px; }
  .photo-row img { height: 180px; }
  .form-grid { grid-template-columns: 1fr; gap: 12px; }
  .submit-btn { width: 100%; padding: 12px 0; letter-spacing: 4px; }

  /* ---------- 页脚 ---------- */
  .footer { padding-top: 26px; }
  .foot-nav { flex-wrap: wrap; gap: 10px 18px; justify-content: center; font-size: 14.5px; }
  .foot-links { font-size: 12px; line-height: 2.1; }
  .foot-about { font-size: 12px; padding: 16px 0 22px; line-height: 2; }

  /* ==========================================================
     地图导览页：整体改为上下结构
     ========================================================== */
  /* 同样只给 html 加 overflow-x，避免 body 成为滚动容器导致侧栏 sticky 失效 */
  html, body { height: auto; overflow: visible; }
  html { overflow-x: hidden; }
  .map-top {
    height: auto; flex-wrap: wrap; gap: 6px; padding: 8px 12px; font-size: 13px;
  }
  .map-top .clock { font-size: 19px; }
  .map-top .clock small { display: block; margin: 2px 0 0; font-size: 11.5px; }
  .map-wrap { flex-direction: column; height: auto; }
  .map-rail {
    width: 100%; flex-direction: row; overflow-x: auto; overflow-y: hidden;
    border-right: none; border-bottom: 1px solid #d9c294; -webkit-overflow-scrolling: touch;
  }
  .map-rail::-webkit-scrollbar { display: none; }
  .map-rail .ritem {
    flex: 0 0 auto; width: 74px; padding: 10px 4px;
    border-bottom: none; border-right: 1px dashed #dcc99b;
  }
  .map-canvas { height: 46vh; min-height: 260px; }
  .map-list {
    width: 100%; border-left: none; border-top: 1px solid #d9c294;
  }
  .map-list .items { overflow-y: visible; }
  .mrow img { width: 56px; height: 56px; }

  /* ==========================================================
     首页：全屏轮播 → 竖向流式滚动，图文全部上下排列
     ========================================================== */
  .slides { height: auto !important; transform: none !important; }
  .slide {
    height: auto; min-height: 100vh; padding: 74px 14px 40px;
    display: flex; flex-direction: column; justify-content: center;
  }
  .slide-dots, .scroll-hint, .floatbar { display: none !important; }

  /* 第1屏：Hero + 数据卡（两列网格） */
  .mb-hero { display: block !important; margin-bottom: 26px; text-align: center; }
  .stats {
    position: static; display: grid; grid-template-columns: repeat(2, 1fr);
    gap: 12px; margin: 0;
  }
  .stat-card { width: auto; padding: 0 8px 14px; }
  .stat-card .ribbon { width: 100%; max-width: 150px; font-size: 13.5px; letter-spacing: 2px; }
  .stat-card .val { font-size: 24px; margin-top: 12px; }
  .stat-card .txt { font-size: 19px; }
  .stat-card:last-child { grid-column: 1 / -1; }

  /* 第2屏：玩转福清（卷轴 → 卡片纵向） */
  .scroll-wrap {
    position: static; transform: none; width: auto;
    display: block; margin: 0;
  }
  .roller { display: none; }
  .paper { padding: 30px 15px 20px; border-radius: 10px; }
  .paper::before { font-size: 16px; letter-spacing: 4px; padding: 8px 22px 9px; white-space: nowrap; }
  .spot { flex-direction: column; gap: 14px; margin-top: 14px; }
  .spot .photo { width: 100%; }
  .spot .photo img { height: 190px; }
  .spot .photo .arrow { top: auto; bottom: 10px; transform: none; opacity: .95; }
  .spot .photo .prev { left: 10px; }
  .spot .photo .next { right: 10px; }
  .spot .info { width: 100%; }
  .spot h3 { font-size: 21px; letter-spacing: 2px; margin-bottom: 10px; }
  .spot p { font-size: 14px; line-height: 1.85; }

  /* 第3屏：最新活动（圆形图在上，卡在下方） */
  .news-wrap {
    position: static; transform: none; width: auto;
    flex-direction: column; gap: 0; margin: 0;
  }
  .news-photo {
    width: 210px; height: 210px; margin: 0 auto -46px; border-width: 7px; z-index: 2;
  }
  .news-photo .cap { top: auto; bottom: 14px; font-size: 13px; padding: 4px 14px; }
  .news-card { width: 100%; padding: 52px 16px 22px; border-radius: 8px; }
  .news-card::before { display: none; }
  .news-item h3 { font-size: 19px; line-height: 1.5; }
  .news-item p { min-height: 0; font-size: 14px; line-height: 1.85; }
  .news-card .dots { margin-top: 14px; }

  /* 第4屏：游玩指南（挂轴两列） */
  .guide-wrap { position: static; transform: none; width: auto; margin: 0; }
  .pavilion { padding: 46px 14px 30px; border-radius: 10px; }
  .pavilion .roof { top: -20px; left: -10px; right: -10px; height: 44px; }
  .pavilion .sign {
    top: -34px; font-size: 17px; letter-spacing: 6px; padding: 6px 22px 6px 28px;
  }
  .hangs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px 14px; }
  .hang { width: auto; padding: 26px 8px 18px; }
  .hang:last-child { grid-column: 1 / -1; width: calc(50% - 7px); justify-self: center; }
  .hang .disc { width: 60px; height: 60px; font-size: 27px; margin-bottom: 12px; }
  .hang h4 { font-size: 16px; letter-spacing: 2px; margin: 0 6px; }
  .hang p { font-size: 11.5px; }

  .btn-detail { display: block; text-align: center; padding: 11px 0; }
}

/* ==========================================================
   三、超小屏手机  <=400px
   ========================================================== */
@media (max-width: 400px) {
  .logo .name { font-size: 16px; }
  .grid, .card-grid { grid-template-columns: 1fr; }
  .card img { height: 170px; }
  .card p { height: auto; }
  .news-row img { height: 150px; }
  .stats { gap: 10px; }
  .hangs { gap: 20px 10px; }
  .info-table th { width: 74px; }
}
