/* ============================================================
   宝塑管业官网 · 响应式断点 (Mobile First 覆盖)
   在桌面默认样式基础上，按屏幕缩小逐级适配
   ============================================================ */

/* ============================ 大屏 ≤ 1279px ============================ */
@media (max-width: 1279px) {
  :root {
    --space-3xl: 80px;
    --space-2xl: 56px;
  }
  .hero__title { font-size: 3rem; }
  .section-head__title { font-size: 2rem; }

  /* 五大环节网格：PC端保持5列，大屏改为4列 */
  .grid--5-links { grid-template-columns: repeat(4, 1fr); }
}

/* ============================ 笔记本 ≤ 1023px ============================ */
@media (max-width: 1023px) {
  /* 栅格降列 */
  .grid--5 { grid-template-columns: repeat(3, 1fr); }
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .grid--5-links { grid-template-columns: repeat(3, 1fr); }
  .stats__grid { grid-template-columns: repeat(3, 1fr); }
  .stat-card:nth-child(3) { border-right: none; }
  .cert-grid { grid-template-columns: repeat(3, 1fr); }

  /* 两列改单列 */
  .split,
  .split--wide-left,
  .split--wide-right,
  .case-showcase,
  .solution-panel.is-active,
  .detail-layout {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }

  /* 隐藏主导航文字 → 移动抽屉 */
  .nav__list { display: none; }
  .nav-toggle { display: flex; }
  .header-lang { display: none; }

  /* Hero 缩小 */
  .hero { min-height: 90vh; }
  .hero__title { font-size: 2.5rem; }
  .hero__desc { font-size: 1.125rem; }

  /* 页脚改 2 列 */
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-xl);
  }
}

/* ============================ 平板 ≤ 767px （手机） ============================ */
@media (max-width: 767px) {
  :root {
    --space-3xl: 56px;
    --space-2xl: 40px;
    --container-padding: 16px;
  }

  /* 栅格全部单列 */
  .grid--2,
  .grid--3,
  .grid--4,
  .grid--5,
  .grid--5-links,
  .grid--1-auto,
  .grid--2-auto,
  .grid--3-auto,
  .stats__grid,
  .cert-grid,
  .form-row {
    grid-template-columns: 1fr;
  }
  .grid--1-auto { max-width: 100%; }
  .grid--2-auto,
  .grid--3-auto { grid-template-columns: 1fr; }

  /* 产品列表页 · 移动端图片高度适配 */
  .product-category .product-card__media { height: 240px; }

  /* 产品中心 · 主打产品卡片移动端 */
  .hero-product-card--lr { flex-direction: column; }
  .hero-product-card__media { flex: none; }
  .hero-product-card__body { padding: var(--space-lg); }
  .hero-product-card__title { font-size: 1.375rem; }
  .hero-product-card__desc { font-size: 0.9375rem; }
  .hero-product-card__actions { flex-direction: column; }
  .hero-product-card__actions .btn { width: 100%; }

  /* 完美服务体系 · 五大环节卡片移动端单列 */
  .system-grid--top, .system-grid--bottom { display: grid; grid-template-columns: 1fr; gap: var(--space-md); }
  .system-card { padding: var(--space-lg); gap: var(--space-md); }
  .system-card__icon { width: 48px; height: 48px; font-size: 1.25rem; }

  /* 区块标题 */
  .section-head__title { font-size: 1.625rem; }
  .section-head__desc { font-size: 0.9375rem; }

  /* Hero */
  .hero { min-height: 100vh; }
  .hero__inner { padding-top: 80px; }
  .hero__title { font-size: 2rem; line-height: 1.25; }
  .hero__desc { font-size: 1rem; }
  .hero__actions { flex-direction: column; align-items: stretch; }
  .hero__actions .btn { width: 100%; }
  .hero__trust-inner { flex-direction: column; align-items: flex-start; gap: var(--space-sm); }
  .hero__trust-item { font-size: 0.875rem; }

  /* Hero轮播移动端适配 */
  .hero-slider__prev,
  .hero-slider__next {
    width: 40px;
    height: 40px;
  }
  .hero-slider__prev { left: 12px; }
  .hero-slider__next { right: 12px; }
  .hero-slider__dots { bottom: 100px; gap: 8px; }
  .hero-slider__dot { width: 10px; height: 10px; }
  .hero__inner { padding-bottom: 80px; }

  /* 数字看板 */
  .stat-card {
    border-right: none;
    border-bottom: 1px solid var(--color-border);
    padding: var(--space-lg) var(--space-md);
  }
  .stat-card:last-child { border-bottom: none; }
  .stat-card__num { font-size: 2.5rem; }

  /* Page Banner */
  .page-banner {
    padding-top: calc(var(--space-xl) + 80px);
    padding-bottom: var(--space-xl);
  }
  .page-banner__title { font-size: 1.875rem; }

  /* 解决方案 Tab */
  .solution-tabs { gap: 8px; }
  .solution-tab { padding: 10px 20px; font-size: 0.875rem; }
  .solution-panel__title { font-size: 1.5rem; }

  /* CTA 区 */
  .cta-band__inner { flex-direction: column; text-align: center; }
  .cta-band__title { font-size: 1.5rem; }

  /* 工程案例新版列表 */
  .case-feature { min-height: 360px; }
  .case-feature__content { padding: var(--space-xl); }
  .case-side-card,
  .case-list-card {
    grid-template-columns: 1fr;
  }
  .case-side-card img {
    width: 100%;
    height: 180px;
  }
  .case-list-card__media {
    min-height: 220px;
  }
  .case-list-head {
    flex-direction: column;
    align-items: flex-start;
  }
  .case-category-nav,
  .case-directory,
  .case-hero-strip,
  .case-directory-grid,
  .case-hero-strip__facts {
    grid-template-columns: 1fr;
  }
  .case-directory__aside {
    position: static;
  }
  .case-category-nav__item {
    min-height: auto;
  }
  .case-hero-strip__media {
    min-height: 220px;
  }
  .case-hero-strip__body {
    padding: var(--space-xl);
  }
  .case-simple-grid {
    grid-template-columns: 1fr;
  }
  .case-simple-filter {
    justify-content: flex-start;
  }
  .case-simple-filter__item {
    min-width: auto;
    flex: 1 1 calc(50% - 8px);
    padding: 10px 16px;
  }

  /* 工程案例详情页 */
  .detail-layout {
    gap: var(--space-lg);
  }
  .detail-main {
    min-width: 0;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
  }
  .detail-aside {
    position: static !important;
    padding: var(--space-lg) !important;
    min-width: 0;
  }
  .detail-aside .btn {
    width: 100%;
    min-width: auto;
  }
  .detail-main .case-gallery {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
  }
  .detail-main .case-gallery__stage {
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
  }
  .detail-main .case-gallery__stage-img {
    width: 100%;
    height: auto;
    display: block;
  }
  .detail-main .case-gallery__tabs {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 6px;
    padding-bottom: 4px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
  }
  .detail-main .case-gallery__tab {
    flex: 0 0 calc((100% - 18px) / 4);
    min-width: 0;
    overflow: hidden;
  }
  .detail-main .case-gallery__tab img {
    width: 100%;
    height: auto;
    display: block;
  }
  .detail-main .case-gallery__tab span {
    display: block;
    padding: 6px 8px;
    font-size: 0.75rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
  }
  .detail-meta {
    flex-wrap: wrap;
    gap: 6px;
  }
  .detail-section h2 {
    font-size: 1.25rem;
    word-break: break-word;
  }
  .detail-section p {
    font-size: 0.9375rem;
    line-height: 1.8;
    word-break: break-word;
  }

  /* 页脚 */
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-xl);
    text-align: center;
  }
  .footer-brand,
  .footer-grid .footer-col:last-child {
    grid-column: 1 / -1;
  }
  .footer-col ul {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .footer-contact li {
    justify-content: center;
  }
  .footer-slogan-lg {
    font-size: 1.375rem;
    letter-spacing: 2px;
    white-space: normal;
  }
  .footer-qr-group { flex-wrap: wrap; }
  .footer-bottom { flex-direction: column; text-align: center; }

  /* 产品荣誉 */
  .product-honor-cards { grid-template-columns: repeat(2, 1fr); }
  .solution-banner__title { font-size: 1.375rem; }
  .solution-banner__inner { flex-direction: column; text-align: center; }
  .solution-banner__content { text-align: center; }
  .solution-banner__desc { max-width: 100%; }
  .solution-banner__action { width: 100%; }
  .solution-banner__link { width: 100%; justify-content: center; }

  /* 发展历程与荣誉资质 */
  .vertical-timeline__line { left: 60px; }
  .vertical-timeline__node { width: 60px; }
  .cert-grid { display: none; }
  .cert-tabs-mobile { display: block; }
  .product-honors__grid { grid-template-columns: 1fr; }

  /* 悬浮工具栏缩小 */
  .float-tools { right: 12px; bottom: 24px; }
  .float-tool { width: 44px; height: 44px; }

  /* 按钮 */
  .btn { padding: 12px 24px; font-size: 0.9375rem; }

  /* 产品/案例卡片间距 */
  .product-card__body,
  .news-card__body { padding: var(--space-md); }

  /* 时间轴 */
  .timeline { padding-left: 32px; }
  .timeline-item__dot { left: -28px; }
}

/* ============================ 超小屏 ≤ 380px ============================ */
@media (max-width: 380px) {
  .hero__title { font-size: 1.625rem; }
  .stat-card__num { font-size: 2.25rem; }
}

/* ============================ 减少动效偏好 ============================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
