/* ============================================================
   HOME.CSS — 首页专属样式
   包含：Hero 轮播、About、Products、Solutions、News、CTA
   ============================================================ */

/* ============================================================
   HERO — 轮播
   ============================================================ */
.hero {
  width: 100%;
  height: 600px;
  max-height: 600px;
  position: relative;
  overflow: hidden;
  margin-top: 0;
}
.hero-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.8s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.hero-slide {
  position: relative;
  min-width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
}
.hero-slide::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.3) 90%);
  z-index: 1;
}
.hero-slide:nth-child(1) { background-color: #0F2E1A; background-image: url('/images/banner1.jpg'); }
.hero-slide:nth-child(2) { background-color: #0D2E1A; background-image: url('/images/banner2.jpg'); }
.hero-slide:nth-child(3) { background-color: #142F1E; background-image: url('/images/banner3.jpg'); }

.hero-content {
  position: relative;
  z-index: 2;
  padding: 0 40px;
  margin-left: 80px;
  width: 100%;
  max-width: 700px;
}

.hero-inner {
  opacity: 0;
  transform: translateY(60px);
  transition: opacity 2s cubic-bezier(0.22, 0.61, 0.36, 1),
              transform 2s cubic-bezier(0.22, 0.61, 0.36, 1);
  will-change: opacity, transform;
}
.hero-slide.active .hero-inner {
  opacity: 1;
  transform: translateY(0);
}

.hero-content h1 {
  color: white;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
  white-space: nowrap;
}
.hero-content p {
  color: rgba(255,255,255,0.9);
  font-size: 1.5rem;
  font-weight: 600;
  max-width: 100%;
  margin-bottom: 28px;
}
.hero-content .btn-primary {
  background: rgb(215, 215, 215);
  color: var(--green-dark);
}
.hero-content .btn-primary:hover {
  background: var(--green-light);
  color: var(--green-dark);
}

.hero-indicators {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}
.hero-indicators span {
  width: 40px;
  height: 3px;
  border-radius: 4px;
  background: rgba(255,255,255,0.2);
  cursor: pointer;
  transition: 0.3s;
}
.hero-indicators span.active { background: white; width: 56px; }

/* ============================================================
   ABOUT — 公司简介
   ============================================================ */
.section-about { padding: 80px 0 64px; background: white; }
.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 60px;
  align-items: center;
}
.about-text h2 { font-weight: 300; margin-bottom: 4px; }
.about-text h2 span { color: var(--green); font-weight: 400; }
.about-text .lead { font-size: 1.05rem; color: var(--gray-500); margin-bottom: 14px; }
.about-text p { margin: 8px 0; }
.stats { display: flex; gap: 48px; margin: 24px 0 20px; }
.stats .stat .num {
  font-size: 2.4rem;
  font-weight: 400;
  color: var(--green);
  line-height: 1;
}
.stats .stat .label {
  font-size: 0.8rem;
  color: var(--gray-500);
  letter-spacing: 0.3px;
}

.about-media { display: flex; flex-direction: column; justify-content: center; align-self: stretch; }
.about-media .video-wrap {
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-hover);
  background: #0A2A18;
  flex: 1;
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.about-media .video-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; }
.about-media .caption {
  font-size: 0.85rem;
  color: var(--gray-400);
  text-align: center;
  margin-top: 12px;
  font-style: italic;
}

/* ============================================================
   PRODUCTS — 产品线
   ============================================================ */
.section-products { padding: 72px 0; background: var(--gray-50); }
.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  max-width: 100%;
  margin: 0 auto;
}
.prod-card {
  display: block;
  background: white;
  border-radius: 12px;
  padding: 28px 24px 32px;
  border: 1px solid var(--gray-200);
  transition: 0.25s;
  text-align: center;
  cursor: pointer;
  color: inherit;
  text-decoration: none;
  box-shadow: var(--shadow);
}
.prod-card:hover {
  border-color: var(--green);
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px);
}
.prod-card .img {
  height: 280px;
  border-radius: 10px;
  overflow: hidden;
  background: #E4EDE7;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}
.prod-card .img img { width: 100%; height: 100%; object-fit: cover; }
.prod-card .img .fallback { font-size: 3rem; color: var(--green); opacity: 0.2; }
.prod-card h4 {
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--gray-700);
  margin-bottom: 6px;
}
.prod-card p { font-size: 0.9rem; color: var(--gray-400); margin-top: 4px; }
.prod-card .learn {
  font-size: 0.85rem;
  color: var(--green);
  font-weight: 500;
  margin-top: 12px;
  display: inline-block;

}
.solutions-grid .img {
  height: 280px;
  border-radius: 10px;
  overflow: hidden;
  background: #E4EDE7;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}
.solutions-grid .img img { width: 100%; height: 100%; object-fit: cover; }
.solutions-grid .img .fallback { font-size: 3rem; color: var(--green); opacity: 0.2; }
.solutions-grid .learn {
  font-size: 0.85rem;
  color: var(--green);
  font-weight: 500;
  margin-top: 12px;
  display: inline-block;

}
.prod-card p,
.sol-card p {
  display: -webkit-box;
  -webkit-line-clamp: 3;      /* 最多两行 */
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 3em;            /* 两行高度，保证对齐 */
  line-height: 1.5em;
}

/* ============================================================
   SOLUTIONS — 解决方案
   ============================================================ */
.section-solutions { padding: 72px 0; background: white; }
.solutions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  max-width: 100%;
  margin: 0 auto;
}
.sol-card {
  display: block;
  background: var(--gray-50);
  border-radius: var(--radius);
  padding: 44px 28px 40px;
  border: 1px solid var(--gray-200);
  transition: 0.25s;
  text-align: center;
  cursor: pointer;
  color: inherit;
  text-decoration: none;
}
.sol-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: var(--green);
}
.sol-card .icon {
  font-size: 3.4rem;
  color: var(--green);
  margin-bottom: 20px;
  opacity: 0.8;
  display: block;
}
.sol-card h4 { font-weight: 500; font-size: 1.2rem; margin-bottom: 6px; color: var(--gray-700); }
.sol-card p { font-size: 0.9rem; color: var(--gray-400); max-width: 100%; }

/* ============================================================
   NEWS — 新闻与洞察
   ============================================================ */
.section-news { padding: 72px 0; background: var(--gray-50); }
.news-list { display: grid; grid-template-columns: 1fr; gap: 20px; max-width: 100%; }
.news-item {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 24px;
  background: white;
  border-radius: var(--radius);
  padding: 16px;
  border: 1px solid var(--gray-200);
  transition: 0.2s;
  align-items: start;
  cursor: pointer;
  color: inherit;
  text-decoration: none;
}
.news-item:hover { box-shadow: var(--shadow-hover); border-color: var(--green); }
.news-item:hover .news-body h4 { color: var(--green); }
.news-item .news-img {
  height: 150px;
  border-radius: 8px;
  overflow: hidden;
  background: #DCE8E0;
  flex-shrink: 0;
}
.news-item .news-img img { width: 100%; height: 100%; object-fit: cover; }
.news-item .news-img .fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  font-size: 2rem;
  color: var(--gray-300);
}
.news-item .news-body .date { font-size: 0.78rem; color: var(--gray-400); margin-bottom: 2px; }
.news-item .news-body h4 {
  font-weight: 500;
  font-size: 1rem;
  transition: 0.15s;
  color: var(--gray-700);
}
.news-item .news-body p { font-size: 0.88rem; color: var(--gray-500); margin: 2px 0 6px; }
.news-item .news-body .read {
  font-size: 0.8rem;
  color: var(--green);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* ============================================================
   CTA
   ============================================================ */
.section-cta { padding: 72px 0; background: var(--green-bg); text-align: center; }
.section-cta h2 { color: white; font-weight: 300; letter-spacing: 0.3px; }
.section-cta p {
  color: rgba(255,255,255,0.5);
  font-size: 1.05rem;
  margin: 8px 0 28px;
  max-width: 100%;
}
.section-cta .btn-primary { background: white; color: var(--green-dark); }
.section-cta .btn-primary:hover { background: var(--green-light); color: var(--green-dark); }

/* ============================================================
   HOME 响应式
   ============================================================ */
@media (max-width: 1024px) {
  .products-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; }
  .solutions-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; }
}

@media (max-width: 820px) {
  .solutions-grid { grid-template-columns: repeat(2, 1fr); }
  .products-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .hero { height: 460px; max-height: 460px; min-height: 400px; }
  .hero-slide { background-size: cover; background-position: 50% 30%; }
  .hero-slide:nth-child(1) { background-position: 50% 25%; }
  .hero-slide:nth-child(2) { background-position: 50% 35%; }
  .hero-slide:nth-child(3) { background-position: 50% 30%; }
  .hero-content {
    margin-left: 0;
    padding: 0 20px;
    text-align: center;
    width: 100%;
    max-width: 100%;
    margin-top: 30px;
  }
  .hero-content h1 { font-size: 1.6rem; font-weight: 600; white-space: normal; }
  .hero-content p { font-size: 0.95rem; font-weight: 500; margin-bottom: 18px; }
  .hero-content .btn-primary { font-size: 0.75rem; padding: 8px 24px; }

  .stats { gap: 12px 20px; flex-wrap: nowrap; }
  .stats .stat .num { font-size: 1.3rem; }
  .stats .stat .label { font-size: 0.65rem; }

  .about-grid { grid-template-columns: 1fr; gap: 32px; }
  .products-grid { grid-template-columns: repeat(1, 1fr); gap: 16px; max-width: 100%; }
  .solutions-grid { grid-template-columns: repeat(1, 1fr); gap: 16px; max-width: 100%; }

  .news-item { grid-template-columns: 1fr; gap: 12px; }
  .news-item .news-img { height: 260px; }
}

@media (max-width: 480px) {
  .hero { height: 340px; max-height: 340px; min-height: 300px; }
  .hero-slide { background-position: 50% 20%; }
  .hero-slide:nth-child(1) { background-position: 50% 15%; }
  .hero-slide:nth-child(2) { background-position: 50% 25%; }
  .hero-slide:nth-child(3) { background-position: 50% 20%; }
  .hero-content { margin-top: 20px; }
  .hero-content h1 { font-size: 1.3rem; }
  .hero-content p { font-size: 0.8rem; margin-bottom: 14px; }
  .hero-content .btn-primary { font-size: 0.65rem; padding: 6px 18px; }

  .stats { gap: 8px 14px; }
  .stats .stat .num { font-size: 1.1rem; }
  .stats .stat .label { font-size: 0.55rem; }

  .solutions-grid { grid-template-columns: 1fr; max-width: 100%; margin: 0 auto; }
  .products-grid { grid-template-columns: 1fr; max-width: 100%; margin: 0 auto; }
}

@media (min-width: 1600px) {
  .hero-slide { background-size: cover; }
}