/* 基础样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
  color: #333;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* 导航栏 */
.navbar {
  background: white;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
}

.logo {
  display: flex;
  align-items: center;
  font-size: 24px;
  font-weight: bold;
  color: #1890ff;
  text-decoration: none;
}

.logo img {
  height: 40px;
  margin-right: 10px;
}

.nav-links {
  display: flex;
  list-style: none;
}

.nav-links li {
  margin-left: 30px;
}

.nav-links a {
  text-decoration: none;
  color: #333;
  font-weight: 500;
  transition: color 0.3s;
}

.nav-links a:hover {
  color: #1890ff;
}

.cta-button {
  background: #1890ff;
  color: white !important;
  padding: 8px 20px;
  border-radius: 4px;
}

/* 首屏大图 */
.hero {
  background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)),
    url("../images/hero-bg.jpg");
  background-size: cover;
  background-position: center;
  color: white;
  text-align: center;
  padding: 180px 20px 100px;
  margin-top: 70px;
}

.hero h1 {
  font-size: 3.5rem;
  margin-bottom: 20px;
}

.tagline {
  font-size: 1.8rem;
  color: #40a9ff;
  margin-bottom: 15px;
}

.subtitle {
  font-size: 1.2rem;
  max-width: 800px;
  margin: 0 auto 30px;
  opacity: 0.9;
}

.btn-primary,
.btn-secondary {
  display: inline-block;
  padding: 12px 30px;
  border-radius: 4px;
  text-decoration: none;
  font-weight: bold;
  margin: 0 10px;
  transition: all 0.3s;
}

.btn-primary {
  background: #1890ff;
  color: white;
  border: 2px solid #1890ff;
}

.btn-primary:hover {
  background: #40a9ff;
  border-color: #40a9ff;
}

.btn-secondary {
  background: transparent;
  color: white;
  border: 2px solid white;
}

.btn-secondary:hover {
  background: white;
  color: #333;
}

/* 核心优势 */
.features {
  padding: 80px 20px;
  background: #f8f9fa;
}

.features h2 {
  text-align: center;
  margin-bottom: 50px;
  font-size: 2.5rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
}

.feature-card {
  background: white;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  text-align: center;
  transition: transform 0.3s;
}

.feature-card:hover {
  transform: translateY(-5px);
}

.feature-card .icon {
  font-size: 3rem;
  color: #1890ff;
  margin-bottom: 20px;
}

.feature-card h3 {
  margin-bottom: 15px;
}

/* 产品预览 */
.products-preview {
  padding: 80px 20px;
}

.products-preview h2 {
  text-align: center;
  margin-bottom: 50px;
  font-size: 2.5rem;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-bottom: 40px;
}

.product-item {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.product-item img {
  width: 100%;
  height: 250px; /* 或您想要的高度 */
  object-fit: contain; /* 关键改变：从 cover 改为 contain */
  object-position: center; /* 图片居中 */
  background-color: #f8f9fa; /* 添加背景色填充空白区域 */
  padding: 10px; /* 添加内边距，让图片不贴边 */
  border-radius: 8px 8px 0 0;
}

.product-item h3,
.product-item p {
  padding: 0 20px;
}

.product-item h3 {
  margin: 20px 0 10px;
}

.product-item p {
  color: #666;
  margin-bottom: 20px;
}

.product-item a {
  display: block;
  padding: 0 20px 20px;
  color: #1890ff;
  text-decoration: none;
  font-weight: bold;
}

.center {
  text-align: center;
}

/* 合作召唤 */
.cta-section {
  padding: 80px 20px;
  background: linear-gradient(135deg, #1890ff 0%, #096dd9 100%);
  color: white;
  text-align: center;
}

.cta-section h2 {
  font-size: 2.5rem;
  margin-bottom: 20px;
}

.cooperation-types {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 15px;
  margin: 30px 0;
}

.cooperation-tag {
  background: rgba(255, 255, 255, 0.2);
  padding: 8px 20px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

/* 页脚 */
footer {
  background: #333;
  color: white;
  padding: 50px 20px 20px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 30px;
}

.footer-section h3 {
  margin-bottom: 20px;
  color: #40a9ff;
}

.footer-section a {
  display: block;
  color: #ccc;
  text-decoration: none;
  margin-bottom: 10px;
}

.footer-section a:hover {
  color: white;
}

.copyright {
  text-align: center;
  color: #aaa;
  /* 稍浅于纯黑的灰色 */
  font-size: 0.9em;
  /* 稍小于正文字体 */
  padding: 25px 0 15px;
  /* 增大上下内边距 */
  line-height: 1.6;
  /* 行高更舒适 */
  border-top: 1px solid #eee;
  /* 上方添加分割线 */
  margin-top: 30px;
  /* 与上方内容保持距离 */
}

.copyright-divider {
  color: #ddd;
  /* 分隔符用更浅的颜色 */
  margin: 0 8px;
}

.beian-link {
  color: #888;
  /* 链接用灰色 */
  text-decoration: none;
  /* 去除下划线 */
  transition: color 0.3s ease;
  /* 添加颜色过渡效果 */
}

.beian-link:hover {
  color: #1890ff;
  /* 悬停时变为主题蓝色 */
  text-decoration: underline;
  /* 悬停时显示下划线 */
}

.beian-link:visited {
  color: #888; /* 与默认状态颜色保持一致 */
}

.beian-link .fas {
  margin-right: 5px;
  /* 图标与文字间距 */
  font-size: 0.95em;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .navbar .container {
    flex-direction: column;
  }

  .nav-links {
    margin-top: 20px;
    flex-wrap: wrap;
    justify-content: center;
  }

  .nav-links li {
    margin: 5px 15px;
  }

  .hero h1 {
    font-size: 2.5rem;
  }

  .tagline {
    font-size: 1.4rem;
  }

  .hero {
    padding: 150px 20px 80px;
  }
}

/* ======================
   下拉菜单样式 - 修正版
   ====================== */

/* 下拉菜单容器 */
.dropdown {
  position: relative;
}

/* 下拉菜单触发按钮 */
.dropdown-toggle {
  display: flex;
  align-items: center;
}

.dropdown-toggle .fa-chevron-down {
  font-size: 0.8em;
  margin-left: 6px;
  transition: transform 0.3s ease;
}

/* 下拉菜单内容 - 修正版 */
.dropdown-menu {
  position: absolute;
  top: 100%; /* 从父元素底部开始 */
  left: 0;
  background: white;
  min-width: 180px;
  max-height: 450px; /* 限制最大高度，避免过长 */
  overflow-y: auto; /* 如果内容太多，允许滚动 */
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  border-radius: 8px;
  padding: 10px 0;
  margin-top: 5px; /* 与触发按钮的小间隙 */
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px); /* 改为向上偏移，从上方展开 */
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.1);
  z-index: 9999; /* 非常高的 z-index */
  border: 1px solid #e8e8e8;
  overflow-x: hidden; /* 隐藏水平滚动 */
}

/* 悬停时显示 - 修正版 */
.dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0); /* 展开到正常位置 */
}

.dropdown:hover .dropdown-toggle .fa-chevron-down {
  transform: rotate(180deg);
}

/* 下拉菜单项 */
.dropdown-menu li {
  list-style: none;
  width: 100%;
}

.dropdown-menu a {
  display: block;
  padding: 10px 20px;
  color: #333;
  text-decoration: none;
  transition: all 0.2s;
  font-size: 0.95em;
  white-space: nowrap; /* 防止文字换行 */
}

.dropdown-menu a:hover {
  background: #f0f7ff;
  color: #1890ff;
  padding-left: 25px;
}

/* 下拉菜单分隔线 */
.dropdown-menu .divider {
  height: 1px;
  background: #e8e8e8;
  margin: 8px 20px; /* 左右留出边距 */
}

/* 禁止文本选择 */
* {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}