/* ========== 全局变量 ========== */
:root {
  --main-green: #2d8240;
  --light-green: #4CAF50;
  --white: #fff;
  --gray: #f7f7f7;
  --dark-text: #333;
  --light-text: #666;
  --border-color: #ddd;
  --shadow: 0 3px 10px rgba(0,0,0,0.08);
  --transition: all 0.3s ease;
  --animate-duration: 0.4s;
}

/* ========== 滚动动画关键帧 ========== */
@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-60px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(60px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(60px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========== 动画类 ========== */
.animate-slide-left {
  animation: slideInLeft var(--animate-duration) ease-out forwards;
}

.animate-slide-right {
  animation: slideInRight var(--animate-duration) ease-out forwards;
}

.animate-slide-up {
  animation: slideInUp var(--animate-duration) ease-out forwards;
}

.animate-fade-up {
  animation: fadeInUp var(--animate-duration) ease-out forwards;
}

/* 页面加载时自动执行的动画（延长时间版本） */
.auto-animate {
  opacity: 0;
  transform: translateX(-60px);
  animation: slideInLeft 0.8s ease-out 0.3s forwards;
}

/* 默认状态：未进入视口时处于动画起始位置 */
.scroll-animate {
  opacity: 0;
}

.scroll-animate[data-animation="slide-left"] {
  transform: translateX(-60px);
}

.scroll-animate[data-animation="slide-right"] {
  transform: translateX(60px);
}

.scroll-animate[data-animation="slide-up"],
.scroll-animate[data-animation="fade-up"] {
  transform: translateY(60px);
}

/* 动画进行中的状态 */
.scroll-animate.animate-slide-left,
.scroll-animate.animate-slide-right,
.scroll-animate.animate-slide-up,
.scroll-animate.animate-fade-up {
  opacity: 1;
  transform: translate(0);
  transition: opacity var(--animate-duration) ease-out, transform var(--animate-duration) ease-out;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Microsoft YaHei", sans-serif;
  line-height: 1.6;
  color: var(--dark-text);
}

img {
  max-width: 100%;
  vertical-align: middle;
  border: none;
}

a {
  text-decoration: none;
  color: inherit;
}



/* ========== 轮播图 ========== */
.carousel {
  position: relative;
  width: 100%;
  height: 600px;
  margin: 70px auto 0;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.carousel-images {
  display: flex;
  height: 100%;
  transition: transform 0.5s ease;
}
.carousel-images img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  flex-shrink: 0;
}
/* 左右切换按钮 */
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 56px;
  height: 56px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.4);
  color: #fff;
  font-size: 32px;
  font-weight: normal;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  outline: none;
  padding: 0;
  margin: 0;
  line-height: 1;
  text-align: center;
}
.carousel-btn:hover {
  background: rgba(0, 0, 0, 0.6);
  transform: translateY(-50%) scale(1.1);
}
.carousel-btn:active {
  transform: translateY(-50%) scale(0.95);
}
.carousel-btn.prev {
  left: 25px;
}
.carousel-btn.next {
  right: 25px;
}
/* 箭头符号优化 */
.carousel-btn::before {
  display: inline-block;
  content: '';
  width: 0;
  height: 0;
  border-style: solid;
}
.carousel-btn.prev::before {
  border-width: 12px 16px 12px 0;
  border-color: transparent #fff transparent transparent;
}
.carousel-btn.next::before {
  border-width: 12px 0 12px 16px;
  border-color: transparent transparent transparent #fff;
}
.carousel-dots {
  position: absolute;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 14px;
  padding: 10px 20px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 25px;
  backdrop-filter: blur(5px);
}
.dot {
  width: 12px;
  height: 12px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid rgba(255, 255, 255, 0.3);
}
.dot:hover {
  background: rgba(255, 255, 255, 0.8);
  transform: scale(1.2);
}
.dot.active {
  background: #fff;
  width: 28px;
  border-radius: 6px;
  border-color: #fff;
}

/* ========== 横幅 ========== */
.banner {
  margin-top: 80px;
  height: 80vh;
  background-size: cover;
  background-position: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: var(--white);
  padding: 0 20px;
}
.banner h1 {
  font-size: 48px;
  margin-bottom: 20px;
}
.banner p {
  font-size: 18px;
  max-width: 800px;
  margin-bottom: 30px;
}
.btn {
  padding: 12px 30px;
  background: var(--white);
  color: var(--main-green);
  border: none;
  border-radius: 50px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: var(--transition);
}
.btn:hover {
  background: var(--light-green);
  color: var(--white);
}

/* ========== 通用区块 ========== */
.section {
  padding: 80px 5%;
}
.section-title {
  text-align: center;
  font-size: 32px;
  color: var(--main-green);
  margin-bottom: 50px;
  position: relative;
}
.section-title::after {
  content: '';
  width: 80px;
  height: 3px;
  background: var(--light-green);
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
}

/* ========== 关于我们 ========== */
.about {
  background: var(--gray);
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  align-items: center;
  justify-content: center;
}
.about-text {
  flex: 1;
  min-width: 300px;
  line-height: 1.8;
  color: var(--dark-text);
}
.about-img {
  flex: 1;
  min-width: 300px;
  max-width: 600px;
  text-align: center;
}
.about-img img {
  width: 100%;
  border-radius: 10px;
  object-fit: cover;
}

/* ========== 核心产品 ========== */
.products {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}
.product-card {
  background: var(--white);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
}
.product-card:hover {
  transform: translateY(-8px);
}
.product-img {
  width: 100%;
  height: 200px;
  background: var(--light-green);
  overflow: hidden;
}
.product-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.product-info {
  padding: 20px;
  text-align: center;
}
.product-info h3 {
  color: var(--main-green);
  margin-bottom: 10px;
}
.product-info p {
  color: var(--light-text);
  line-height: 1.6;
}

/* ========== 核心优势 ========== */
.advantages {
  background: var(--gray);
}
.adv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  text-align: center;
}
.adv-item {
  padding: 30px 20px;
  transition: var(--transition);
}
.adv-item:hover {
  transform: translateY(-4px);
}
.adv-item h3 {
  color: var(--main-green);
  margin: 15px 0;
}
.adv-item p {
  color: var(--light-text);
}
.adv-icon {
  width: 50px;
  height: 50px;
  object-fit: contain;
  margin-bottom: 15px;
}

/* ========== 应用场景 ========== */
.scene-section {
  width: 100%;
  max-width: 1400px;
  margin: 40px auto;
  padding: 0 20px;
}
.scene-tabs {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 30px;
}
.scene-tab {
  padding: 12px 30px;
  background: var(--white);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 16px;
  color: var(--dark-text);
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.scene-tab.active {
  background: var(--main-green);
  color: var(--white);
  border-color: var(--main-green);
}
.scene-tab:hover:not(.active) {
  border-color: var(--main-green);
  color: var(--main-green);
  transform: translateY(-2px);
}
.scene-content {
  width: 100%;
  min-height: 400px;
  background: var(--gray);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--light-text);
  padding: 40px;
  box-shadow: var(--shadow);
}
.scene-content-item {
  display: none;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
}
.scene-content-item.active {
  display: flex;
}

/* 应用场景左图右文 */
.scene-layout {
  display: flex;
  align-items: center;
  gap: 40px;
  width: 100%;
}
.scene-img {
  width: 280px;
  height: 200px;
  flex-shrink: 0;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.scene-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.scene-text {
  flex: 1;
}
.scene-text h3 {
  color: #2d8240;
  margin-bottom: 20px;
  font-size: 24px;
}
.scene-text p {
  line-height: 1.8;
  color: #555;
}

/* ========== 产品分类展示 ========== */
.product-module {
  width: 100%;
  max-width: 1200px;
  min-height: 624px;
  margin: 60px auto;
  padding: 0 20px;
}
.product-tabs {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 35px;
}
.product-tab {
  padding: 10px 24px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: var(--white);
  font-size: 15px;
  cursor: pointer;
  transition: var(--transition);
}
.product-tab.active {
  background: var(--main-green);
  color: var(--white);
  border-color: var(--main-green);
}
.product-tab:hover:not(.active) {
  color: var(--main-green);
  border-color: var(--main-green);
}
.product-grid {
  display: none;
  min-height: 484px;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.product-grid.active {
  display: grid;
}
.product-item {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  background: var(--white);
}
.product-item:hover {
  transform: translateY(-4px);
}
.product-item img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  background: #f8f8f8;
}
.product-info {
  padding: 12px;
  text-align: center;
}
.product-name {
  font-size: 15px;
  color: var(--dark-text);
  margin-bottom: 4px;
}
.product-desc {
  font-size: 12px;
  color: var(--light-text);
}

/* ========== 响应式 ========== */
@media (max-width: 1200px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  html, body {
    width: 100%;
    overflow-x: hidden;
  }
  .banner h1 { font-size: 32px; }
  .scene-tab { padding: 10px 15px; font-size: 13px; }
  .scene-content { min-height: 280px; padding: 15px; }
  .carousel { height: 320px; margin-top: 65px; }
  .carousel-btn { display: none; }
  .scene-layout { flex-direction: column; text-align: center; }
  .scene-img { max-width: 280px; width: 100%; }
  .section { padding: 40px 15px; }
  .section-title { font-size: 24px; }
  .about-content { padding: 20px 15px; }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 500px) {
  .product-grid { grid-template-columns: 1fr; }
  .section { padding: 30px 10px; }
  .section-title { font-size: 22px; }
  .scene-tab { padding: 8px 12px; font-size: 12px; }
  .carousel { height: 260px; }
}