/* 全局样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-color: #2563eb;
  --secondary-color: #1e40af;
  --text-color: #1f2937;
  --light-bg: #f3f4f6;
  --white: #ffffff;
}

body {
  font-family: "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
  color: var(--text-color);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* 导航栏样式 */
.navbar {
  background-color: var(--white);
  box-shadow: 0 2px 4px 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: 1rem 20px;
}

.logo img {
  width: 200px;
  height: auto;
}

.logo h1 {
  font-size: 1.5rem;
  color: var(--primary-color);
}

.slogan {
  font-size: 1.5rem;
  color: var(--primary-color);
}

.nav-links a {
  text-decoration: none;
  color: var(--text-color);
  margin-left: 2rem;
  font-weight: 500;
  transition: color 0.3s ease;
}

.nav-links a:hover {
  color: var(--primary-color);
}

.menu-btn {
  display: none;
  font-size: 1.5rem;
  cursor: pointer;
}

/* 首页横幅样式 */
.hero {
  /* background: linear-gradient(rgba(37, 99, 235, 0.9), rgba(30, 64, 175, 0.9)),
    url("images/hero-bg.jpg"); */
  background: linear-gradient(rgb(37 99 235 / 34%), rgb(30 64 175 / 0%)),
    url(images/hero-bg.jpg);
  background-size: cover;
  background-position: center;
  height: 100vh;
  display: flex;
  align-items: center;
  text-align: center;
  color: var(--white);
  padding-top: 80px;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
}

.cta-button {
  display: inline-block;
  padding: 1rem 2rem;
  background-color: var(--white);
  color: var(--primary-color);
  text-decoration: none;
  border-radius: 5px;
  font-weight: bold;
  transition: transform 0.3s ease;
}

.cta-button:hover {
  transform: translateY(-3px);
}

/* 产品展示样式 */
.products {
  padding: 5rem 0;
  background-color: var(--light-bg);
}

.products h2 {
  text-align: center;
  margin-bottom: 3rem;
  font-size: 2.5rem;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.product-card {
  background: var(--white);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.product-card:hover {
  transform: translateY(-10px);
}

.product-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-bottom: 1px solid #ccc;
}

.product-card h3 {
  padding: 1rem;
  font-size: 1.5rem;
}

.product-card p {
  padding: 0 1rem 1rem;
  color: #666;
}

.learn-more {
  display: inline-block;
  padding: 0.5rem 1rem;
  margin: 1rem;
  color: var(--primary-color);
  text-decoration: none;
  font-weight: bold;
}

/* 优势卡片样式 */
.advantage-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  align-items: center;
  margin-top: 3rem;
}

.advantage-card {
  text-align: center;
  padding: 2rem 1rem;
  background: var(--white);
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
  min-height: 300px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.advantage-card p {
  width: 80%;
}

.advantage-card:hover {
  transform: translateY(-5px);
}

.advantage-card i {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.advantage-card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  color: var(--text-color);
}

.advantage-card p {
  font-size: 0.9rem;
  color: #666;
  line-height: 1.4;
}

/* 关于我们样式 */
.about {
  padding: 5rem 0;
  position: relative;
}

.about h2 {
  text-align: center;
  margin-bottom: 3rem;
  font-size: 2.5rem;
}

.about-content {
  display: flex;
  align-items: center;
  flex-direction: column;
}

.about-content .about-text {
  margin-bottom: 4rem;
}

.about-yewu {
  display: flex;
  align-items: center;
  flex-direction: column;
}

.about-yewu .about-text {
  margin-bottom: 4rem;
}

.about-yewu img {
  width: 100%;
  height: auto;
}

.about-text p {
  font-size: 1.1rem;
  line-height: 1.8;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2rem;
  text-align: center;
}

.about .container {
  position: relative;
  z-index: 1;
}

.about-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.about-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.stat-item h3 {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

/* 联系我们样式 */
.contact {
  padding: 5rem 0;
  /* background-color: var(--light-bg); */
}

.contact h2 {
  text-align: center;
  margin-bottom: 3rem;
  font-size: 2.5rem;
}

.contact-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.info-item {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.info-item i {
  font-size: 1.5rem;
  color: var(--primary-color);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-form input,
.contact-form textarea {
  padding: 1rem;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 1rem;
}

.contact-form textarea {
  height: 150px;
  resize: vertical;
}

.submit-btn {
  padding: 1rem;
  background-color: var(--primary-color);
  color: var(--white);
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: bold;
  transition: background-color 0.3s ease;
}

.submit-btn:hover {
  background-color: var(--secondary-color);
}

/* 页脚样式 */
.footer {
  background-color: var(--text-color);
  color: var(--white);
  padding: 3rem 0 1rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-info h3 {
  margin-bottom: 1rem;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-links a {
  color: var(--white);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: var(--primary-color);
}

.footer-social {
  display: flex;
  gap: 1rem;
}

.footer-social a {
  color: var(--white);
  font-size: 1.5rem;
  transition: color 0.3s ease;
}

.footer-social a:hover {
  color: var(--primary-color);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* 响应式设计 */
@media (max-width: 1200px) {
  .advantage-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .advantage-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .advantage-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 0;
    right: -300px;
    width: 300px;
    height: 100vh;
    background-color: var(--white);
    display: flex;
    flex-direction: column;
    padding: 80px 20px 20px;
    box-shadow: -2px 0 5px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease;
    z-index: 1000;
  }

  .nav-links.active {
    right: 0;
  }

  .nav-links a {
    margin: 15px 0;
    font-size: 1.2rem;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
  }

  .menu-btn {
    display: block;
    position: relative;
    z-index: 1001;
  }

  /* 添加遮罩层 */
  .nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    z-index: 999;
  }

  .nav-overlay.active {
    display: block;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .about-content,
  .contact-content {
    grid-template-columns: 1fr;
  }

  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-links,
  .footer-social {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .product-grid {
    grid-template-columns: 1fr;
  }

  .about-stats {
    grid-template-columns: 1fr;
  }
}

/* 专业施工调试样式 */
.construction {
  padding: 5rem 0;
  /* background-color: var(--light-bg); */
}

.construction h2 {
  text-align: center;
  margin-bottom: 3rem;
  font-size: 2.5rem;
  color: var(--text-color);
}

.construction-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.construction-card {
  background: var(--white);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.construction-card:hover {
  transform: translateY(-10px);
}

.construction-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-bottom: 1px solid #eee;
}

.construction-content {
  padding: 1.5rem;
  text-align: center;
}

.construction-content h3 {
  font-size: 1.3rem;
  color: var(--text-color);
  margin-bottom: 1rem;
}

.construction-content p {
  font-size: 1rem;
  color: #666;
  line-height: 1.6;
}

/* 响应式设计 */
@media (max-width: 1200px) {
  .construction-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .construction-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  .construction-card img {
    height: 180px;
  }

  .construction-content {
    padding: 1.2rem;
  }

  .construction-content h3 {
    font-size: 1.2rem;
  }
}

@media (max-width: 480px) {
  .construction-grid {
    grid-template-columns: 1fr;
  }

  .construction-card img {
    height: 200px;
  }
}
