/* =============================================================================
 *  06-responsive.css — 响应式（手机 / 平板 / PC / 大屏）
 *  兼容：iOS Safari、Android Chrome、鸿蒙 HarmonyOS 浏览器、微信内置浏览器
 *  说明：只使用广泛支持的 CSS，不用 :has()、容器查询等新特性，避免旧内核白屏
 * ========================================================================== */

/* ---------------------------------------------------------------- 大屏微调 */
@media (min-width: 1440px) {
  :root { --maxw: 1280px; }
}

/* ---------------------------------------------------------------- 平板及以下 */
@media (max-width: 1023px) {
  .layout.has-side { grid-template-columns: minmax(0, 1fr); }
  .layout.has-side .sidebar { display: none; }
  .nav { display: none; }              /* 平板/手机改用抽屉菜单 */
  .menu-toggle { display: grid; }
  .hero { border-radius: var(--radius); }
}

/* 移动端导航抽屉 */
.drawer {
  position: fixed; inset: 0; z-index: 90; display: none;
  background: rgba(20,16,12,.42);
}
.drawer.open { display: block; }
.drawer-panel {
  position: absolute; inset-block: 0; inset-inline-start: 0;
  width: min(84vw, 330px); background: var(--paper);
  padding: 18px; overflow-y: auto; box-shadow: var(--shadow-l);
  display: flex; flex-direction: column; gap: 4px;
}
html[dir="rtl"] .drawer-panel { inset-inline-start: auto; inset-inline-end: 0; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.drawer-panel a.nav-link { font-size: 16px; padding: 11px 12px; border-radius: 10px; }
.drawer-group-title { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: 12px 12px 4px; }

/* ---------------------------------------------------------------- 手机 */
@media (max-width: 767px) {
  :root { --gutter: 15px; --fs-base: 16.5px; }
  .header-inner { min-height: 56px; }
  .brand-sub { display: none; }
  .brand-name { font-size: 16px; }
  .page { padding-block: 16px 44px; }
  .hero { padding: 26px 18px; }
  .hero-stats { gap: 18px; }
  .hero-stats div b { font-size: 19px; }
  h1 { font-size: 27px; }
  .grid, .grid-3, .paths, .why { grid-template-columns: 1fr; }
  .featured .f-visual { min-height: 130px; font-size: 44px; }
  .to-top { bottom: 108px; inset-inline-end: 12px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  table { display: block; overflow-x: auto; white-space: nowrap; }
  .route-head { flex-direction: column; align-items: flex-start; }
}

/* ---------------------------------------------------------------- 超小屏 */
@media (max-width: 380px) {
  .lang-btn span.lbl { display: none; }
  .hero-stats { gap: 14px; }
  .footer-grid { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------- 打印 */
@media print {
  .site-header, .site-footer, .ad-slot, .to-top, .share-bar, .drawer, .ad-anchor { display: none !important; }
  body { background: #fff; }
  a { color: #000; text-decoration: underline; }
}

/* ------------------------------------------------- 目的地详情页的小屏适配 */
@media (max-width: 700px) {
  .dest-head { gap: 12px; }
  .dest-head-emoji { width: 56px; height: 56px; font-size: 34px; }
  /* 速览框改成上下两行，标签不再挤成一列 */
  .facts li { grid-template-columns: 1fr; gap: 2px; padding: 10px 13px; }
  .fact-k { font-size: 13px; }
  .dest-strip { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
  .ticks li { padding-inline-start: 20px; font-size: 14.5px; }
}
@media (max-width: 380px) {
  .dest-strip { grid-template-columns: repeat(2, 1fr); }
}
/* 触屏设备不做 hover 位移，避免点击后卡片「粘」在抬起状态 */
@media (hover: none) {
  a.dest-card:hover { transform: none; box-shadow: none; }
  .dest-chip:hover { transform: none; }
}
