/* ============================================================
   enhance.css - 全站轻量交互增强
   1) 滚动入场动画（配合 js/enhance.js 的 IntersectionObserver）
   2) 列表/卡片 hover 微交互
   3) 返回顶部按钮（配合 js/enhance.js 注入）
   4) 首页留言表单聚焦效果
   主题色沿用站内绿色 #187e3c
   ============================================================ */

/* ---------- 1. 滚动入场动画 ----------
   仅当 html 含 .fx-ready（由 enhance.js 添加）时才应用初始隐藏，
   JS 不可用时页面内容照常显示，不影响无 JS 环境 */

html.fx-ready .fx {
  opacity: 0;
  -webkit-transform: translateY(28px);
  transform: translateY(28px);
  -webkit-transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 0.61, 0.36, 1);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 0.61, 0.36, 1);
  will-change: opacity, transform;
}

html.fx-ready .fx-in {
  opacity: 1;
  -webkit-transform: none;
  transform: none;
}

/* 用户系统开启"减少动态效果"时全部禁用 */
@media (prefers-reduced-motion: reduce) {
  html.fx-ready .fx {
    opacity: 1;
    transform: none;
    transition: none;
    will-change: auto;
  }
}

/* ---------- 2. hover 微交互（仅精确指针设备生效） ---------- */
@media (hover: hover) and (pointer: fine) {

  /* 企业实力图片卡（article/sale、page/sale） */
  .sale ul li {
    -webkit-transition: transform 0.4s ease;
    transition: transform 0.4s ease;
  }
  .sale ul li .workImg {
    overflow: hidden;
  }
  .sale ul li .workImg img {
    -webkit-transition: transform 0.6s ease;
    transition: transform 0.6s ease;
  }
  .sale ul li .workText {
    -webkit-transition: background-color 0.4s ease, color 0.4s ease;
    transition: background-color 0.4s ease, color 0.4s ease;
  }
  .sale ul li:hover {
    -webkit-transform: translateY(-6px);
    transform: translateY(-6px);
  }
  .sale ul li:hover .workImg img {
    -webkit-transform: scale(1.08);
    transform: scale(1.08);
  }
  .sale ul li:hover .workText {
    background-color: #187e3c;
    color: #fff;
  }

  /* 新闻列表卡（article/news） */
  .news .news_content ul li .n_newsImg_box img {
    -webkit-transition: transform 0.6s ease;
    transition: transform 0.6s ease;
  }
  .news .news_content ul li:hover {
    -webkit-transform: translateY(-8px);
    transform: translateY(-8px);
    border-bottom-color: #187e3c;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
  }
  .news .news_content ul li:hover .n_newsImg_box img {
    -webkit-transform: scale(1.08);
    transform: scale(1.08);
  }

  /* 相关产品（article/product_detailed） */
  .rexiao ul li .rexiao_img {
    overflow: hidden;
    -webkit-transition: border-color 0.4s ease, box-shadow 0.4s ease;
    transition: border-color 0.4s ease, box-shadow 0.4s ease;
  }
  .rexiao ul li .rexiao_img img {
    -webkit-transition: transform 0.5s ease;
    transition: transform 0.5s ease;
  }
  .rexiao ul li:hover .rexiao_img {
    border-color: #187e3c;
    box-shadow: 0 8px 20px rgba(24, 126, 60, 0.15);
  }
  .rexiao ul li:hover .rexiao_img img {
    -webkit-transform: scale(1.06);
    transform: scale(1.06);
  }

  /* 荣誉资质卡（page/honor） */
  .certificate_item ul .cfLi {
    -webkit-transition: transform 0.4s ease;
    transition: transform 0.4s ease;
  }
  .certificate_item ul .cfLi:hover {
    -webkit-transform: translateY(-6px);
    transform: translateY(-6px);
  }

  /* 企业文化条目（page/culture） */
  .culture .culture_content .culture_item .culture_itemName {
    -webkit-transition: padding-left 0.3s ease, border-color 0.3s ease;
    transition: padding-left 0.3s ease, border-color 0.3s ease;
  }
  .culture .culture_content .culture_item:hover .culture_itemName {
    padding-left: 28px;
    border-left-color: #187e3c;
  }

  /* 上一篇/下一篇（详情页） */
  .page_list a,
  .pre a,
  .next a {
    -webkit-transition: color 0.3s ease, transform 0.3s ease;
    transition: color 0.3s ease, transform 0.3s ease;
  }
  .page_list a:hover,
  .pre a:hover,
  .next a:hover {
    color: #187e3c;
  }
  .page_list a.fl:hover,
  .pre a.fl:hover {
    -webkit-transform: translateX(-3px);
    transform: translateX(-3px);
  }
  .page_list a.fr:hover,
  .next a.fr:hover {
    -webkit-transform: translateX(3px);
    transform: translateX(3px);
  }

  /* 分页按钮 */
  .pagination .page-item a {
    -webkit-transition: background-color 0.3s ease, color 0.3s ease;
    transition: background-color 0.3s ease, color 0.3s ease;
  }
  .pagination .page-item a:hover {
    background-color: #187e3c;
    color: #fff;
  }
}

/* ---------- 3. 返回顶部按钮 ---------- */
#toTop {
  position: fixed;
  right: 28px;
  bottom: 80px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background-color: #187e3c;
  color: #fff;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  justify-content: center;
  cursor: pointer;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  -webkit-transform: translateY(16px);
  transform: translateY(16px);
  -webkit-transition: opacity 0.35s ease, visibility 0.35s ease, transform 0.35s ease, background-color 0.3s ease;
  transition: opacity 0.35s ease, visibility 0.35s ease, transform 0.35s ease, background-color 0.3s ease;
  box-shadow: 0 6px 16px rgba(24, 126, 60, 0.35);
}
#toTop.show {
  opacity: 1;
  visibility: visible;
  -webkit-transform: none;
  transform: none;
}
#toTop:hover {
  background-color: #136630;
}
@media (max-width: 767px) {
  #toTop {
    right: 16px;
    bottom: 60px;
    width: 40px;
    height: 40px;
  }
}

/* ---------- 4. 首页 hover 微交互 ---------- */
@media (hover: hover) and (pointer: fine) {

  /* 轮播数字指示器：悬停下划线延伸 + 数字变绿 */
  .index_main .section1 .number span:after {
    -webkit-transition: width 0.35s ease, opacity 0.35s ease, visibility 0.35s ease;
    transition: width 0.35s ease, opacity 0.35s ease, visibility 0.35s ease;
  }
  .index_main .section1 .number span:hover {
    color: #177e3a;
  }
  .index_main .section1 .number span:hover:after {
    width: 100%;
    opacity: 1;
    visibility: visible;
  }

  /* 关于我们：左图轻微放大 */
  .index_main .aboutus .aboutus_center .left .img img {
    -webkit-transition: transform 0.6s ease;
    transition: transform 0.6s ease;
  }
  .index_main .aboutus .aboutus_center .left .img:hover img {
    -webkit-transform: scale(1.05);
    transform: scale(1.05);
  }

  /* 关于我们：查看更多按钮反色 */
  .index_main .aboutus .aboutus_center .right .text a {
    -webkit-transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  }
  .index_main .aboutus .aboutus_center .right .text a:hover {
    background-color: #187e3c;
    border-color: #187e3c;
    color: #fff;
  }

  /* 关于我们：企业文化/荣誉资质/企业实力三卡，链接右移加深 */
  .index_main .aboutus .aboutus_center .about_bottom > div > a {
    -webkit-transition: color 0.3s ease, transform 0.3s ease;
    transition: color 0.3s ease, transform 0.3s ease;
  }
  .index_main .aboutus .aboutus_center .about_bottom > div:hover > a {
    color: #0f5e28;
    -webkit-transform: translateX(6px);
    transform: translateX(6px);
  }

  /* 主营产品：分类标签反色 */
  .index_main .product .product_center .product_top .list ul li {
    -webkit-transition: background-color 0.3s ease, border-color 0.3s ease;
    transition: background-color 0.3s ease, border-color 0.3s ease;
  }
  .index_main .product .product_center .product_top .list ul li:hover {
    background-color: #187e3c;
    border-color: #187e3c;
  }

  /* 主营产品：产品卡片图片放大 + 阴影加深 + 标题上浮 */
  .index_main .product .product_center .swiper-slide .pro_img {
    overflow: hidden;
    -webkit-transition: box-shadow 0.4s ease;
    transition: box-shadow 0.4s ease;
  }
  .index_main .product .product_center .swiper-slide .pro_img img {
    -webkit-transition: transform 0.5s ease;
    transition: transform 0.5s ease;
  }
  .index_main .product .product_center .swiper-slide .pro_text {
    -webkit-transition: transform 0.3s ease;
    transition: transform 0.3s ease;
  }
  .index_main .product .product_center .swiper-slide a:hover .pro_img {
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.25);
  }
  .index_main .product .product_center .swiper-slide a:hover .pro_img img {
    -webkit-transform: scale(1.06);
    transform: scale(1.06);
  }
  .index_main .product .product_center .swiper-slide a:hover .pro_text {
    -webkit-transform: translateY(-3px);
    transform: translateY(-3px);
  }

  /* 合作考察：电话/地址图标变色放大 */
  .index_main .contact .contact_center .contact_left .contact_info .tel .icon i,
  .index_main .contact .contact_center .contact_left .contact_info .add .icon i {
    display: inline-block;
    -webkit-transition: color 0.3s ease, transform 0.3s ease;
    transition: color 0.3s ease, transform 0.3s ease;
  }
  .index_main .contact .contact_center .contact_left .contact_info .tel:hover .icon i,
  .index_main .contact .contact_center .contact_left .contact_info .add:hover .icon i {
    color: #187e3c;
    -webkit-transform: scale(1.12);
    transform: scale(1.12);
  }
}

/* ---------- 5. 首页留言表单聚焦效果 ---------- */
.index_main .contact .contact_center .contact_right form input[type="text"],
.index_main .contact .contact_center .contact_right form textarea {
  -webkit-transition: border-color 0.3s ease, box-shadow 0.3s ease;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.index_main .contact .contact_center .contact_right form input[type="text"]:focus,
.index_main .contact .contact_center .contact_right form textarea:focus {
  border-color: #187e3c;
  box-shadow: 0 0 0 3px rgba(24, 126, 60, 0.12);
  outline: none;
}
.index_main .contact .contact_center .contact_right form .subBtn {
  -webkit-transition: background-color 0.3s ease, box-shadow 0.3s ease;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}
.index_main .contact .contact_center .contact_right form .subBtn:hover {
  background-color: #187e3c;
  box-shadow: 0 6px 14px rgba(24, 126, 60, 0.3);
}
