/* ===== 首页专用样式 ===== */

/* Hero 横幅区域 */
.hero {
  background: #0d2338 linear-gradient(135deg, var(--primary) 0%, var(--textile-blue) 50%, var(--secondary) 100%);
  color: var(--light);
  padding: 90px 0 80px;
  position: relative;
  overflow: hidden;
  min-height: 74vh; /* 略降低避免小屏首屏溢出 */
  display: flex;
  align-items: center;
  background-position:center; background-size:cover; background-repeat:no-repeat;
}
.hero .hero-img-holder{position:absolute;inset:0;z-index:0;overflow:hidden;}
.hero .hero-img-holder img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:center;transition:opacity .6s ease;}
.hero .hero-content,.hero .hero-stats{position:relative;z-index:2;}
.hero.hero-dynamic{height:var(--hero-h);min-height:var(--hero-h);padding:0;}
@media (max-width:900px){.hero.hero-dynamic{height:auto;min-height:auto;padding:60px 0 56px;}}

/* 简化后轮播：固定自适高度，图片覆盖 */
.hero.hero-carousel{padding:0;position:relative;min-height:240px;height:clamp(240px,50vw,480px);background:#000;overflow:hidden;}
.hero.hero-carousel .hero-img-holder img{object-fit:cover;object-position:center;}
@media (max-width:680px){.hero.hero-carousel{height:clamp(200px,62vw,360px);min-height:200px;}}

/* 手机端超宽图（mobile-wide）使用 contain 完整展示，不再左右裁切 */
@media (max-width:680px){
  .hero.hero-carousel.mobile-wide{padding:0;}
  .hero.hero-carousel.mobile-wide .hero-img-holder{position:absolute;inset:0;}
  .hero.hero-carousel.mobile-wide .hero-img-holder img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;background:#000;}
}

/* 轮播导航箭头 */
.hero-arrow { position:absolute; top:50%; transform:translateY(-50%); z-index:5; width:56px; height:56px; border:none; border-radius:50%; background:rgba(0,0,0,.35); backdrop-filter:blur(4px); color:#fff; cursor:pointer; display:flex; align-items:center; justify-content:center; font-size:22px; transition:.35s; }
.hero-arrow:hover { background:rgba(0,0,0,.55); }
.hero-arrow.prev { left:25px; }
.hero-arrow.next { right:25px; }
@media (max-width:768px){ .hero-arrow{width:46px;height:46px;font-size:18px;} .hero-arrow.prev{left:12px;} .hero-arrow.next{right:12px;} }

/* 分页圆点 */
.hero-dots { position:absolute; left:50%; bottom:30px; transform:translateX(-50%); display:flex; gap:12px; z-index:6; }
.hero-dot { width:14px; height:14px; border-radius:50%; background:rgba(255,255,255,.4); border:none; cursor:pointer; position:relative; transition:.4s; }
.hero-dot.active { background:var(--secondary); box-shadow:0 0 0 4px rgba(255,255,255,.25); }
@media (max-width:600px){ .hero-dots{bottom:18px;} .hero-dot{width:10px;height:10px;} }

/* contain 模式遮罩（可选） */
.hero-bg-contain::after { content:""; position:absolute; inset:0; background:linear-gradient(to bottom, rgba(0,0,0,.4), rgba(0,0,0,.3) 40%, rgba(0,0,0,.55)); pointer-events:none; }
.hero.hero-bg-contain { 
  /* 第一层：主图 contain 以保证整图展示；第二层颜色作为最后兜底 */
  background: var(--hero-img, none) center/contain no-repeat, linear-gradient(135deg,#173049,#224768) !important; 
  position:relative; 
}
/* 模糊填充：使用更高亮度避免“黑边”观感，放大比例覆盖所有区域 */
.hero.hero-bg-contain::before{content:"";position:absolute;inset:0;background:var(--hero-img, none) center/cover no-repeat;filter:blur(45px) brightness(.9) saturate(1.05);transform:scale(1.25);z-index:0;}
/* 渐变遮罩轻量化，减少过暗压黑 */
.hero.hero-bg-contain::after{z-index:1;background:linear-gradient(to bottom, rgba(0,0,0,.25), rgba(0,0,0,.25) 40%, rgba(0,0,0,.35));}
.hero.hero-bg-contain .hero-content{position:relative;z-index:2;}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    url('data:image/svg+xml,<svg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><g fill="%23ffffff" fill-opacity="0.05"><path d="M30 30c0-16.569 13.431-30 30-30v30H30zM0 30c0-16.569 13.431-30 30-30v30H0z"/></g></g></svg>');
  animation: float 20s ease-in-out infinite;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.hero h1 {
  font-size: 48px;
  font-weight: 700;
  margin-bottom: 20px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
  line-height: 1.2;
}

.hero h1 span {
  color: var(--secondary);
  position: relative;
}

.hero h1 span::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--secondary);
  border-radius: 2px;
}

.hero p {
  font-size: 20px;
  margin-bottom: 40px;
  opacity: 0.9;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

.hero-cta {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 50px;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 50px;
  margin-top: 60px;
  flex-wrap: wrap;
}

.stat-item {
  text-align: center;
  opacity: 0.9;
}

.stat-number {
  font-size: 36px;
  font-weight: 700;
  color: var(--secondary);
  margin-bottom: 5px;
}

.stat-label {
  font-size: 16px;
  color: var(--light);
}

/* 服务特色区域 */
.features {
  padding: 80px 0;
  background: var(--cream);
  position: relative;
}

.features::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: var(--textile-pattern);
  opacity: 0.3;
}

.features .container {
  position: relative;
  z-index: 2;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 50px;
}

.feature-card {
  background: var(--light);
  padding: 40px 30px;
  border-radius: 12px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient);
}

.feature-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-hover);
}

.feature-icon {
  width: 80px;
  height: 80px;
  background: var(--gradient);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 36px;
  color: var(--light);
  position: relative;
}

.feature-icon::after {
  content: '';
  position: absolute;
  width: 100px;
  height: 100px;
  border: 2px solid var(--secondary);
  border-radius: 50%;
  opacity: 0.3;
  animation: pulse 2s ease-in-out infinite;
}

.feature-card h3 {
  font-size: 24px;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 15px;
}

.feature-card p {
  color: var(--text-gray);
  line-height: 1.6;
  margin-bottom: 20px;
}

.feature-link {
  color: var(--primary);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: var(--transition);
}

.feature-link:hover {
  gap: 10px;
}

/* 产品展示区域 */
.products {
  padding: 80px 0;
  background: var(--light);
}

.product-categories {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.category-btn {
  padding: 12px 24px;
  background: transparent;
  border: 2px solid var(--border-light);
  border-radius: 25px;
  color: var(--text-gray);
  cursor: pointer;
  transition: var(--transition);
  font-weight: 500;
}

.category-btn.active,
.category-btn:hover {
  background: var(--primary);
  color: var(--light);
  border-color: var(--primary);
}

.products-grid {
  /* wrapper for product groups; each .products-for is a 3-column grid */
  display: block;
}

.products-for {
  display: grid;
  grid-template-columns: repeat(auto-fill,minmax(260px,1fr));
  gap: 30px;
  margin-bottom: 30px;
  opacity: 1;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
@media (max-width:1200px){.products-for{grid-template-columns:repeat(auto-fill,minmax(240px,1fr));}}
@media (max-width:1024px){.products-for{grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:26px;}}
@media (max-width:900px){.products-for{grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:24px;}}
@media (max-width:760px){.products-for{grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:22px;}}
@media (max-width:620px){.products-for{grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:18px;}}
@media (max-width:520px){.products-for{grid-template-columns:repeat(auto-fill,minmax(100%,1fr));gap:20px;}}
.products-for.hidden{display:none !important;}

.products-for .product-card { display: block; }

/* 让每个卡片高度一致并使用 flex 布局，使底部的规格和价格对齐 */
.products-for {
  grid-auto-rows: 1fr; /* 每一行单元格等高 */
}
.products-for .product-card {
  display: flex;
  flex-direction: column;
  height: 100%; /* 填满网格单元格 */
}
.product-content {
  padding: 25px;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto; /* 剩余空间由内容区域占满 */
}

/* 将规格推到内容底部，保持按钮在最下方 */
.product-specs {
  list-style: none;
  margin-top: auto; /* 推到底部 */
  margin-bottom: 10px;
  padding: 0;
}
.product-specs li {
  display: flex;
  justify-content: space-between;
  padding: 5px 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 14px;
}
.product-price {
  font-size: 18px;
  font-weight: 600;
  color: var(--primary);
  text-align: center;
  margin-top: 8px;
}

.product-card {
  background: var(--light);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.product-image {
  width: 100%;
  height: 200px;
  background: var(--accent);
  position: relative;
  overflow: hidden;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.product-card:hover .product-image img {
  transform: scale(1.1);
}

.product-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(43, 87, 151, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition);
}

.product-card:hover .product-overlay {
  opacity: 1;
}

.product-content {
  padding: 25px;
}

.product-card h3 {
  font-size: 20px;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 10px;
  line-height:1.35;
  display:-webkit-box;
  -webkit-line-clamp:2;
  line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
}

/* 新闻卡片在超窄屏强制单列避免拥挤 */
@media (max-width:560px){.news-grid{grid-template-columns:1fr !important;}}

.product-card p {
  color: var(--text-gray);
  line-height: 1.6;
  margin-bottom: 15px;
}

.product-specs {
  list-style: none;
  margin-bottom: 20px;
}

.product-specs li {
  display: flex;
  justify-content: space-between;
  padding: 5px 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 14px;
}

.product-specs li:last-child {
  border-bottom: none;
}

.product-price {
  font-size: 18px;
  font-weight: 600;
  color: var(--primary);
  text-align: center;
}

/* 关于我们区域 */
.about {
  padding: 80px 0;
  background: var(--accent);
}

.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.about-text h2 {
  font-size: 36px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 20px;
}

.about-text p {
  color: var(--text-gray);
  line-height: 1.8;
  margin-bottom: 20px;
  font-size: 16px;
}

.about-highlights {
  list-style: none;
  margin: 30px 0;
}

.about-highlights li {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  color: var(--text-gray);
}

.about-highlights li i {
  color: var(--primary);
  font-size: 18px;
}

.about-image {
  position: relative;
}

.about-image img {
  width: 100%;
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.about-badge {
  position: absolute;
  top: 20px;
  right: 20px;
  background: var(--gradient);
  color: var(--light);
  padding: 15px 20px;
  border-radius: 8px;
  text-align: center;
  font-weight: 600;
}

/* 新闻资讯区域 */
.news {
  padding: 80px 0;
  background: var(--light);
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 30px;
  grid-auto-rows: 1fr; /* 保证每行单元格等高 */
}

.news-card {
  background: var(--light);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  height: 100%; /* 填满网格单元格以实现等高 */
}

.news-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.news-image {
  width: 100%;
  height: 200px;
  background: var(--accent);
  overflow: hidden;
}

.news-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.news-card:hover .news-image img {
  transform: scale(1.05);
}

.news-content {
  padding: 25px;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
}

.news-meta {
  display: flex;
  gap: 15px;
  font-size: 14px;
  color: var(--text-gray);
  margin-bottom: 15px;
}

.news-meta span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.news-card h3 {
  font-size: 20px;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 10px;
  line-height: 1.4;
}

.news-card p {
  color: var(--text-gray);
  line-height: 1.6;
  margin-bottom: 20px;
}

.news-link {
  color: var(--primary);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: var(--transition);
  margin-top: auto; /* 推到卡片底部，保证按钮在同一水平线 */
}

.news-link:hover {
  gap: 10px;
}

/* 合作伙伴区域 */
.partners {
  padding: 60px 0;
  background: var(--cream);
}

.partners-slider {
  display: flex;
  gap: 40px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  opacity: 0.7;
}

.partner-logo {
  width: 150px;
  height: 80px;
  background: var(--light);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
  transition: var(--transition);
  filter: grayscale(100%);
}

.partner-logo:hover {
  opacity: 1;
  filter: grayscale(0%);
  transform: scale(1.05);
}

.partner-logo img {
  max-width: 120px;
  max-height: 60px;
}

/* 页脚 */
.footer {
  background: var(--dark);
  color: var(--light);
  padding: 60px 0 20px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.footer-section h3 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 20px;
  color: var(--secondary);
}

.footer-section p,
.footer-section li {
  color: #bbb;
  line-height: 1.6;
  margin-bottom: 10px;
}

.footer-section ul {
  list-style: none;
}

.footer-section a {
  color: #bbb;
  transition: var(--transition);
}

.footer-section a:hover {
  color: var(--secondary);
}

.social-links {
  display: flex;
  gap: 15px;
  margin-top: 20px;
}

.social-link {
  width: 40px;
  height: 40px;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--light);
  transition: var(--transition);
}

.social-link:hover {
  background: var(--secondary);
  transform: translateY(-2px);
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid #444;
  color: #999;
}

/* 动画效果 */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-20px); }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.6s ease-out;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .hero {
    padding: 60px 0;
    min-height: 60vh;
  }
  
  .hero h1 {
    font-size: 32px;
  }
  
  .hero p {
    font-size: 16px;
  }
  
  .hero-cta {
    flex-direction: column;
    align-items: center;
  }
  
  .hero-stats {
    gap: 30px;
  }
  
  .stat-number {
    font-size: 28px;
  }
  
  .features-grid,
  .products-grid,
  .news-grid {
    grid-template-columns: 1fr;
  }
  
  .about-content {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }
  
  .partners-slider {
    gap: 20px;
  }
  
  .partner-logo {
    width: 120px;
    height: 60px;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 28px;
  }
  
  .feature-card,
  .product-card,
  .news-card {
    margin: 0 10px;
  }
  
  .about-text h2 {
    font-size: 28px;
  }
}
