/* 全局样式 */
:root {
  --primary-color: #3498db;
  --secondary-color: #2c3e50;
  --accent-color: #e74c3c;
  --light-color: #ecf0f1;
  --dark-color: #2c3e50;
  --text-color: #333;
  --text-light: #777;
  --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: #fff;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
}

.btn {
  display: inline-block;
  background-color: var(--primary-color);
  color: white;
  padding: 12px 30px;
  border-radius: 30px;
  text-transform: uppercase;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 1px;
  transition: var(--transition);
  border: none;
  cursor: pointer;
}

.btn:hover {
  background-color: var(--secondary-color);
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.section-title {
  text-align: center;
  margin-bottom: 50px;
  font-size: 2.5rem;
  color: var(--secondary-color);
  position: relative;
  padding-bottom: 15px;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background-color: var(--primary-color);
}

/* 头部样式 */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: var(--secondary-color);
  color: white;
  box-shadow: var(--shadow);
  z-index: 1000;
  padding: 15px 0;
  transition: var(--transition);
}

header.scrolled {
  padding: 10px 0;
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
}

.logo-img {
  height: auto; /* 移除固定高度，让图片按比例自适应 */
  width: 200px; /* 设置宽度以匹配图片比例 */
  margin-right: 0; /* 移除右边距，因为图片已包含文字 */
}

nav ul {
  display: flex;
}

nav ul li {
  margin-left: 30px;
}

nav ul li a {
  font-weight: 500;
  color: white;
  position: relative;
}

nav ul li a::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary-color);
  transition: var(--transition);
}

nav ul li a:hover {
  color: var(--primary-color);
}

nav ul li a:hover::after {
  width: 100%;
}

.menu-toggle {
  display: none;
  font-size: 1.5rem;
  color: white;
  cursor: pointer;
}

/* 英雄区域样式 */
.hero {
  height: 100vh;
  background-color: #fff;
  background-image: url("https://source.unsplash.com/random/1920x1080/?technology");
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;
  display: flex;
  align-items: center;
  text-align: center;
  color: var(--secondary-color);
  margin-bottom: 80px;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px;
}

.hero-content h2 {
  font-size: 3.5rem;
  margin-bottom: 20px;
  color: var(--secondary-color);
  animation: fadeInDown 1s ease;
}

.hero-content p {
  font-size: 1.2rem;
  margin-bottom: 30px;
  color: var(--text-color);
  animation: fadeInUp 1s ease;
}

.hero-content .btn {
  animation: fadeIn 1.5s ease;
}

/* 关于我们区域样式 */
.about {
  padding: 100px 0;
  background-color: var(--light-color);
}

.about-content {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
}

.about-text {
  flex: 1;
  min-width: 300px;
  padding-right: 30px;
}

.about-text p {
  margin-bottom: 20px;
  color: var(--text-light);
  font-size: 1.1rem;
}

.about-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  flex: 1;
  min-width: 300px;
}

.stat-item {
  text-align: center;
  padding: 30px;
  background-color: white;
  border-radius: 10px;
  box-shadow: var(--shadow);
  margin: 10px;
  flex: 1;
  min-width: 120px;
  transition: var(--transition);
}

.stat-item:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.stat-item h3 {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 10px;
}

/* 服务区域样式 */
.services {
  padding: 100px 0;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
}

.service-card {
  background-color: white;
  border-radius: 10px;
  padding: 40px 30px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.service-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.service-card i {
  font-size: 3rem;
  color: var(--primary-color);
  margin-bottom: 20px;
}

.service-card h3 {
  font-size: 1.5rem;
  margin-bottom: 15px;
  color: var(--secondary-color);
}

.service-card p {
  color: var(--text-light);
}

/* 产品区域样式 */
.products {
  padding: 100px 0;
  background-color: var(--light-color);
}

.product-slider {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
}

.product-card {
  background-color: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow);
  width: 300px;
  transition: var(--transition);
}

.product-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.product-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.product-card h3 {
  padding: 20px 20px 10px;
  font-size: 1.3rem;
  color: var(--secondary-color);
}

.product-card p {
  padding: 0 20px 20px;
  color: var(--text-light);
}

/* 联系我们区域样式 */
.contact {
  padding: 100px 0;
  background-color: var(--light-color);
}

.contact-content {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* 联系卡片样式 */
.contact-card {
  max-width: 800px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.contact-info {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
}

.info-item {
  flex: 1;
  min-width: 300px;
  display: flex;
  align-items: flex-start;
  background-color: white;
  border-radius: 10px;
  padding: 25px;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.info-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.info-item i {
  font-size: 2rem;
  color: var(--primary-color);
  margin-right: 20px;
}

.info-text {
  flex: 1;
}

.info-text h4 {
  font-size: 1.2rem;
  color: var(--secondary-color);
  margin: 0 0 10px 0;
}

.info-text p {
  margin: 0;
  font-size: 1rem;
  color: var(--text-light);
  line-height: 1.5;
}

.info-sub {
  font-size: 0.9rem;
  margin-top: 5px !important;
  opacity: 0.8;
}

.contact-map-links {
  display: flex;
  gap: 20px;
}

.map-link {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 15px 20px;
  border-radius: 10px;
  color: white;
  font-weight: 500;
  transition: var(--transition);
  box-shadow: var(--shadow);
}

.map-link.baidu {
  background-color: #3385ff;
}

.map-link.gaode {
  background-color: #00b2a9;
}

.map-link i {
  font-size: 1.2rem;
  margin-right: 10px;
}

.map-link:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* 页脚样式 */
footer {
  background-color: var(--secondary-color);
  color: white;
  padding: 70px 0 20px;
}

.footer-content {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  margin-bottom: 50px;
}

.footer-logo {
  display: flex;
  align-items: center;
}

.footer-logo-img {
  height: auto; /* 移除固定高度，让图片按比例自适应 */
  width: 200px; /* 设置宽度以匹配图片比例 */
  margin-right: 0; /* 移除右边距，因为图片已包含文字 */
}

.footer-links {
  flex: 1;
  min-width: 200px;
  margin-bottom: 30px;
}

.footer-links h3,
.footer-social h3 {
  font-size: 1.2rem;
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 10px;
}

.footer-links h3::after,
.footer-social h3::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px;
  height: 2px;
  background-color: var(--primary-color);
}

.footer-links ul li {
  margin-bottom: 10px;
}

.footer-links ul li a:hover {
  color: var(--primary-color);
  padding-left: 5px;
}

.footer-social {
  flex: 1;
  min-width: 200px;
}

.social-icons {
  display: flex;
}

.social-icons a {
  width: 40px;
  height: 40px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 10px;
  transition: var(--transition);
}

.social-icons a:hover {
  background-color: var(--primary-color);
  transform: translateY(-5px);
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(76, 47, 47, 0.1);
}

.footer-bottom p {
  margin-bottom: 10px;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
}

.icp a {
  color: rgba(255, 255, 255, 0.7);
}

.icp a:hover {
  color: var(--primary-color);
}

/* 动画 */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 响应式设计 */
@media (max-width: 992px) {
  .hero-content h2 {
    font-size: 2.5rem;
  }

  .about-text {
    padding-right: 0;
    margin-bottom: 40px;
  }

  .contact-card {
    max-width: 600px;
  }
}

@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  nav {
    position: fixed;
    top: 70px;
    left: -100%;
    width: 80%;
    height: calc(100vh - 70px);
    background-color: var(--secondary-color);
    color: white;
    flex-direction: column;
    box-shadow: var(--shadow);
    transition: var(--transition);
    z-index: 999;
  }

  nav.active {
    left: 0;
  }

  nav ul {
    flex-direction: column;
    padding: 30px;
  }

  nav ul li {
    margin: 15px 0;
  }

  .hero-content h2 {
    font-size: 2rem;
  }

  .section-title {
    font-size: 2rem;
  }

  .logo-img {
    width: 180px; /* 移动端缩小宽度 */
  }

  .footer-logo-img {
    width: 180px; /* 移动端缩小宽度 */
  }

  .logo-text h1 {
    font-size: 1.6rem;
  }

  .logo-text p {
    font-size: 0.7rem;
  }

  .contact-map-links {
    flex-direction: column;
  }
}

@media (max-width: 576px) {
  .hero-content h2 {
    font-size: 1.8rem;
  }

  .hero-content p {
    font-size: 1rem;
  }

  .stat-item {
    min-width: 100%;
  }

  .logo-img {
    width: 150px; /* 进一步缩小宽度 */
  }

  .footer-logo-img {
    width: 150px; /* 进一步缩小宽度 */
  }

  .logo-text h1 {
    font-size: 1.4rem;
  }

  .logo-text p {
    font-size: 0.7rem;
  }

  .footer-logo {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-logo-img {
    margin-bottom: 10px;
  }

  .info-item {
    padding: 20px;
  }

  .info-item i {
    font-size: 1.5rem;
    margin-right: 15px;
  }

  .info-text h4 {
    font-size: 1.1rem;
  }

  .info-text p {
    font-size: 0.9rem;
  }

  .map-link {
    padding: 12px 15px;
  }

  .map-link i {
    font-size: 1rem;
  }
}

/* 添加动画效果的样式 */
.service-card,
.product-card,
.stat-item,
.section-title,
.info-item,
.map-link {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.service-card.animate,
.product-card.animate,
.stat-item.animate,
.section-title.animate,
.info-item.animate,
.map-link.animate {
  opacity: 1;
  transform: translateY(0);
}

/* 菜单图标动画 */
.menu-toggle.active i {
  transform: rotate(90deg);
}

/* 添加一些额外的交互效果 */
.btn:active {
  transform: translateY(0);
}
