/* ==============================================
   Responsive v2 — 响应式适配（修复移动端溢出）
   ============================================== */

/* 防止移动端左右拖动溢出 */
html, body {
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
  position: relative;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 1024px) {
  .func-grid { grid-template-columns: repeat(2, 1fr); }
  .info-module { grid-template-columns: 1fr; gap: var(--space-xl); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .news-slide { min-width: 300px; max-width: 320px; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .hamburger-circle { display: flex; }
  .nav-capsule { gap: 4px; padding: 2px 8px 2px 4px; }
  .nav-capsule .nc-name { max-width: 50px; font-size: 0.72rem; }

  nav#navbar {
    top: 8px;
    max-width: calc(100% - 16px);
    width: calc(100% - 16px);
    border-radius: 60px;
  }
  nav#navbar.scrolled { top: 6px; max-width: calc(100% - 12px); }

  .hero { min-height: 85vh; padding-top: calc(var(--nav-h) + var(--space-2xl)); }
  .hero h1 { font-size: clamp(1.8rem, 8vw, 2.8rem); }

  .func-grid { grid-template-columns: repeat(2, 1fr); gap: var(--space-sm); }
  .func-item { padding: var(--space-lg) var(--space-md); }

  .news-slide { min-width: 280px; max-width: 300px; }
  .news-track { gap: var(--space-md); }

  .news-carousel {
    margin: 0 calc(-1 * var(--space-md));
    padding: 0 var(--space-md);
  }

  .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--space-lg); }

  .light-bar-value { font-size: 2rem; }
  .light-bar-track { width: 60px; }

  section { padding: var(--space-3xl) 0; }

  .info-module { gap: var(--space-lg); }
}

@media (max-width: 480px) {
  .nav-inner { padding: 0 var(--space-md); }
  .section-inner { padding: 0 var(--space-md); }
  .hero { padding-left: var(--space-md); padding-right: var(--space-md); }

  .auth-capsule .label { display: none; }
  .auth-capsule { padding: 4px; gap: 0; }
  .auth-capsule .avatar-ring { width: 32px; height: 32px; }

  .func-grid { grid-template-columns: 1fr; }

  .news-slide { min-width: calc(100vw - 48px); max-width: calc(100vw - 48px); }

  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; gap: var(--space-sm); }

  .func-item { padding: var(--space-md); }

  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .light-bar-value { font-size: 1.6rem; }
}

/* ─── 减少动画模式 ─── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }

  .reveal-fade-up, .reveal-scale, .reveal-blur {
    opacity: 1;
    transform: none;
    filter: none;
  }

  .hero-grid {
    -webkit-mask-image: none;
    mask-image: none;
  }
}

/* ─── 统计数据专用（移动端修复秒数溢出）─── */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-xl); text-align: center; }

@media (max-width: 768px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: var(--space-lg); }
  .light-bar-value { font-size: 1.6rem; word-break: break-all; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: var(--space-md); }
  .light-bar-value { font-size: 1.2rem; }
  .light-bar-track { width: 50px; }
}

/* ─── 服务页面移动端 ─── */
@media (max-width: 768px) {
  .services-list .section-inner { grid-template-columns: 1fr; }
}
