/* 全局重置与基础样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Microsoft Yahei", "PingFang SC", sans-serif;
}
:root {
  /* 青色系主色调（可根据需求调整） */
  --primary-color: #20c997; /* 主青色 */
  --primary-light: #75e6b9; /* 浅青色 */
  --primary-dark: #128c7e; /* 深青色 */
  --text-color: #333; /* 文字主色 */
  --text-light: #666; /* 文字浅色 */
  --bg-color: #f8f9fa; /* 背景色 */
  --white: #fff; /* 白色 */
  --gray: #e9ecef; /* 灰色 */
  --shadow: 0 2px 10px rgba(0, 0, 0, 0.1); /* 阴影 */
}
/* 容器（适配不同屏幕） */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}
/* 导航栏 */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: var(--white);
  box-shadow: var(--shadow);
  z-index: 999;
}
.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px;
}
.logo h1 {
  color: var(--primary-color);
  font-size: 24px;
  font-weight: 700;
}
.nav-links {
  display: flex;
  gap: 30px;
}
.nav-link {
  color: var(--text-color);
  text-decoration: none;
  font-size: 16px;
  transition: color 0.3s;
}
.nav-link:hover,
.nav-link.active {
  color: var(--primary-color);
}
.menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  color: var(--primary-color);
  cursor: pointer;
}
.mobile-menu {
  display: none;
  background: var(--white);
  padding: 20px;
  box-shadow: var(--shadow);
}
.mobile-link {
  display: block;
  padding: 10px 0;
  color: var(--text-color);
  text-decoration: none;
  border-bottom: 1px solid var(--gray);
}
.mobile-link:last-child {
  border-bottom: none;
}
/*主页*/
.hero {
  height: 80vh; /* 缩小高度，减少空旷感 */
  background: linear-gradient(135deg, var(--primary-light), var(--primary-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--white);
  padding-top: 70px;
  position: relative;
  overflow: hidden;
}

/* 背景纹理伪元素 - 关键：添加z-index: -1，避免遮挡按钮 */
.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.05)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.05)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
  opacity: 0.3;
  z-index: -1; /* 核心修复：将伪元素置于底层，不遮挡按钮 */
}

.hero h2 {
  font-size: 48px;
  margin-bottom: 20px;
  /* 渐变文字+艺术感 */
  background: linear-gradient(90deg, #ffffff, #e0f7fa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 2px 10px rgba(0,0,0,0.1);
  letter-spacing: 2px;
}

.hero p {
  font-size: 20px;
  margin-bottom: 30px;
  opacity: 0.9;
  max-width: 600px; /* 限制宽度，避免太散 */
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
  font-weight: 300;
}

.btn {
  display: inline-block; /* 确保按钮可点击 */
  padding: 12px 30px;
  background: var(--white);
  color: var(--primary-color);
  border-radius: 50px;
  text-decoration: none; /* 去除链接下划线 */
  font-weight: 600;
  transition: all 0.3s;
  border: none;
  cursor: pointer; /* 确保鼠标悬浮显示手型 */
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  position: relative; /* 配合z-index */
  z-index: 10; /* 核心修复：提升按钮层级，确保可点击 */
}

.btn:hover {
  background: var(--primary-dark);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}
/* 通用区块样式 */
.section {
  padding: 80px 0;
}

.section-title {
  text-align: center;
  font-size: 32px;
  color: var(--text-color);
  margin-bottom: 50px;
  position: relative;
}

.section-title::after {
  content: "";
  display: block;
  width: 60px;
  height: 3px;
  background: var(--primary-color);
  margin: 15px auto 0;
}
/* 公司简介 */
.company .content {
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.8;
  color: var(--text-light);
  font-size: 16px;
}
.company .content p {
  margin-bottom: 20px;
  padding: 15px 20px;
  background-color: #f8f9fa;
  border-left: 4px solid #27ae60;
  border-radius: 4px;
  font-size: 16px;
  line-height: 1.8;
  color: #34495e;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
/* 产品方案 */
.products {
  background: var(--bg-color);
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
  gap: 30px;
  align-items: start;
}

.product-card {
  background: var(--white);
  border-radius: 10px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform 0.3s;
  display: flex;
  flex-direction: column;
  padding: 40px 20px;
  height: 100%;
}

.product-card:hover {
  transform: translateY(-5px);
}

.card-icon {
  width: 80px;
  height: 80px;
  background: rgba(32, 201, 151, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  flex-shrink: 0;
}

.card-icon i {
  font-size: 32px;
  color: var(--primary-color);
}

/* 产品轮播核心样式 */
.product-carousel {
  position: relative;
  width: 100%;
  height: 220px; /* 固定轮播高度，保证卡片统一 */
  margin: 0 auto 20px;
  overflow: hidden;
  border-radius: 8px;
}

.carousel-inner {
  width: 100%;
  height: 100%;
}

.carousel-img {
  width: 100%;
  height: 100%;
  object-fit: contain; /* 改为contain，保证图片完整显示 */
  background: #f5f5f5; /* 背景色，避免透明图片显示异常 */
  display: none;
  transition: opacity 0.3s ease;
}

.carousel-img.active {
  display: block;
}

/* 轮播按钮样式 */
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.8);
  border: none;
  color: var(--primary-color);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  z-index: 10;
}

.carousel-btn:hover {
  background: var(--primary-color);
  color: white;
}

.prev-btn {
  left: 10px;
}

.next-btn {
  right: 10px;
}

.product-card h4 {
  font-size: 20px;
  color: var(--text-color);
  margin-bottom: 15px;
  flex-shrink: 0;
}

.product-desc {
  color: var(--text-light);
  line-height: 1.7;
  font-size: 15px;
  flex: 1;
  overflow-y: auto;
  padding-right: 5px;
  text-align: left; /* 描述文字左对齐更易读 */
  padding: 0 10px;
}
/* 联系方式 */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 40px;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.info-item {
  display: flex;
  align-items: flex-start;
  gap: 20px;
}

.info-item i {
  font-size: 24px;
  color: var(--primary-color);
  margin-top: 5px;
}

.info-item h5 {
  font-size: 18px;
  color: var(--text-color);
  margin-bottom: 10px;
}

.info-item ins {
  color: var(--text-light);
  line-height: 1.6;
}
.info-item p {
  color: var(--text-light);
  line-height: 1.6;
}

/* 页脚 */
.footer {
  background: var(--primary-dark);
  color: var(--white);
  text-align: center;
  padding: 30px 0;
}
.footer-beian {
  display: block; /* 让备案号单独占一行 */
  margin-top: 12px; /* 和版权信息拉开间距 */
  font-size: 16px; /* 和版权文字字号保持一致 */
  color: var(--white); /* 白色，和整体风格统一 */
  text-decoration: none; /* 去掉默认下划线 */
  opacity: 0.9; /* 稍微透明一点，避免太突兀 */
  transition: all 0.3s ease; /* hover 过渡效果 */
}
/* hover 效果：鼠标放上去时更醒目 */
.footer-beian:hover {
  opacity: 1;
  text-decoration: underline;
}
/* 响应式适配（移动端） */
@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .menu-btn {
    display: block;
  }

  .hero h2 {
    font-size: 36px;
  }

  .hero p {
    font-size: 18px;
  }

  .section {
    padding: 60px 0;
  }

  .section-title {
    font-size: 28px;
  }

  .contact-form {
    padding: 30px 20px;
  }

  /* 移动端轮播高度适配 */
  .product-carousel {
    height: 180px;
  }
}

/* 滚动行为优化 */
html {
  scroll-behavior: smooth;
}

/* 显示移动端菜单 */
.mobile-menu.show {
  display: block;
}

/* 滚动条美化（可选） */
.product-desc::-webkit-scrollbar {
  width: 6px;
}
.product-desc::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}
.product-desc::-webkit-scrollbar-thumb {
  background: var(--primary-light);
  border-radius: 3px;
}
.product-desc::-webkit-scrollbar-thumb:hover {
  background: var(--primary-color);
}

/* 产品详情按钮样式（链接形式） */
.detail-btn {
  margin-top: 20px;
  padding: 10px 25px;
  background: var(--primary-color);
  color: var(--white);
  border-radius: 5px;
  font-size: 14px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.detail-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(32, 201, 151, 0.2);
}

/* 适配移动端按钮样式 */
@media (max-width: 768px) {
  .detail-btn {
    padding: 8px 20px;
    width: 100%; /* 移动端按钮占满宽度 */
  }
}