/* 欣一荣环保 单模板响应式兼容层 2026-11-26
   桌面模板为唯一 HTML 骨架；<=1279 叠加 mobile.css，
   <=1024 再叠加 mobile-adapt.css；本文件修正两套模板合并后的
   宽度、侧栏、页脚和手机底栏。 */

/* 底部快捷栏只在手机宽度出现 */
.toolbar_move {
  display: none;
}

@media screen and (max-width: 1279px) {
  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }

  /* 桌面模板 header 有 min-width:1280px，窄屏必须解除 */
  .header {
    min-width: 0 !important;
    width: 100% !important;
  }

  .header .nav {
    width: 100% !important;
    min-width: 0 !important;
  }

  /* 桌面 header 的 movelogo 取的是旧占位图，统一改用站点 logo */
  .header .nav img.movelogo {
    display: block !important;
    width: auto;
    max-width: 62%;
    height: auto;
    max-height: 52px;
    margin: 14px 0 0 18px;
  }

  .header .nav img.pclogo {
    display: none !important;
  }

  /* 合并后不再保留桌面侧栏 */
  .aside {
    display: none !important;
  }

  .twotab {
    width: 95% !important;
    max-width: 1200px !important;
    box-sizing: border-box;
  }

  .main_slide {
    width: 100% !important;
    float: none !important;
  }

  /* 业务范围卡是浮动 li；mobile-adapt 放开 overflow 后 ul 高度会塌成 0，
     导致“查看更多”按钮和下一段“关于我们”叠在一起。flow-root 既收住浮动，
     又不会裁掉卡片阴影。 */
  #list_nav ul.list_nav_ul {
    display: flow-root !important;
  }

  /* 桌面页脚固定 1152px，窄屏改流式 */
  .new_footer_in {
    width: 100% !important;
    max-width: none !important;
    padding-left: 4% !important;
    padding-right: 4% !important;
    box-sizing: border-box;
  }

  .new_footer_bottm {
    width: 100% !important;
    box-sizing: border-box;
  }
}

@media screen and (max-width: 640px) {
  /* 手机端内容区与现有移动版一致，去掉桌面 twotab 的 5% 外边距 */
  .twotab {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .main_slide {
    width: 100% !important;
  }

  /* 手机底栏：保留四条入口，位置固定在底部 */
  .toolbar_move.MovePnly {
    display: block !important;
  }

  /* 给固定底栏留出空间，版权和备案号不被压住 */
  .new_footer {
    padding-bottom: 80px !important;
  }

  /* 手机版页脚不显示桌面端的第二组导航 */
  .new_footer_box.nf_box2 {
    display: none !important;
  }

  .header_pic_nav {
    box-sizing: border-box;
  }
}

@media screen and (min-width: 641px) {
  .toolbar_move {
    display: none !important;
  }
}

/* 平板任务区与最新区：641—767 两列、第三张居中半宽；
   768 起三列，避免第三张单独占一行。 */
@media screen and (min-width: 641px) and (max-width: 767px) {
  .xyr-task-grid,
  .xyr-latest-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .xyr-task-card:nth-child(3),
  .xyr-latest-card:nth-child(3) {
    grid-column: 1 / -1;
    width: calc(50% - 8px);
    justify-self: center;
  }
}

@media screen and (min-width: 768px) and (max-width: 1279px) {
  .xyr-task-grid,
  .xyr-latest-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}
