/* CSS Variables - 品牌色彩 */
:root {
  /* 主色调 - 科技蓝 */
  --primary-color: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #3b82f6;

  /* 辅助色 */
  --secondary-color: #0ea5e9;
  --accent-color: #8b5cf6;

  /* 中性色 */
  --dark: #0f172a;
  --dark-light: #1e293b;
  --gray: #64748b;
  --gray-light: #94a3b8;
  --light: #f1f5f9;
  --white: #ffffff;

  /* 渐变 */
  --gradient-primary: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  --gradient-dark: linear-gradient(135deg, var(--dark), var(--dark-light));

  /* 阴影 */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.15);

  /* 过渡 */
  --transition: all 0.3s ease;

  /* 间距 */
  --container-max-width: 1200px;
  --section-padding: 80px 0;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans SC', sans-serif;
  line-height: 1.6;
  color: var(--dark);
  background-color: var(--white);
  overflow-x: hidden;
}

.container {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 20px;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button {
  cursor: pointer;
  border: none;
  outline: none;
  font-family: inherit;
}

/* 按钮样式 */
.btn-primary {
  display: inline-block;
  padding: 14px 32px;
  background: var(--gradient-primary);
  color: var(--white);
  border-radius: 8px;
  font-weight: 600;
  font-size: 16px;
  transition: var(--transition);
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* ===== 导航栏 ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.navbar.scrolled {
  box-shadow: var(--shadow-md);
}

/* 导航容器 - 不使用 container 的 padding 限制 */
.navbar .container {
  max-width: 100%;
  padding: 0 2%;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px;
  width: 100%;
}

/* Logo 区域 - 最左侧 */
.logo-wrapper {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.logo {
  height: 35px;
}

.logo img {
  height: 100%;
  width: auto;
  object-fit: contain;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

/* 导航链接居中 */
.nav-links {
  display: flex;
  gap: clamp(20px, 3vw, 50px);
  flex: 1;
  justify-content: center;
}

/* 右侧按钮区域 */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-shrink: 0;
}

.nav-links a {
  font-weight: 500;
  color: var(--dark);
  transition: var(--transition);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  transition: var(--transition);
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-links a:hover {
  color: var(--primary-color);
}

.lang-toggle {
  padding: 8px 16px;
  background: transparent;
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
  border-radius: 6px;
  font-weight: 600;
  transition: var(--transition);
}

.lang-toggle:hover {
  background: var(--primary-color);
  color: var(--white);
}

.mobile-menu-btn {
  display: none;
  font-size: 24px;
  background: transparent;
  color: var(--dark);
}

/* ===== Hero 区域 ===== */
.hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-dark);
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,%3Csvg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"%3E%3Cg fill="none" fill-rule="evenodd"%3E%3Cg fill="%23ffffff" fill-opacity="0.03"%3E%3Cpath d="M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z"/%3E%3C/g%3E%3C/g%3E%3C/svg%3E');
  opacity: 0.5;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(15, 23, 42, 0.8) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  color: var(--white);
  max-width: 1200px;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.hero-content h1 {
  font-size: clamp(32px, 4vw, 56px);
  font-weight: 800;
  margin-bottom: 0;
  line-height: 1.2;
  white-space: nowrap;
  animation: fadeInUp 1s ease;
}

.hero-content p {
  font-size: clamp(16px, 1.8vw, 20px);
  opacity: 0.9;
  margin-bottom: 0;
  white-space: nowrap;
  animation: fadeInUp 1s ease 0.2s backwards;
}

.hero-content .btn-primary {
  animation: fadeInUp 1s ease 0.4s backwards;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== 关于我们 ===== */
.about {
  padding: var(--section-padding);
  background: var(--light);
}

.about h2 {
  text-align: center;
  font-size: clamp(28px, 3vw, 42px);
  margin-bottom: 50px;
  color: var(--dark);
}

.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.about-text p {
  font-size: 18px;
  line-height: 1.8;
  color: var(--gray);
  margin-bottom: 20px;
}

.stats {
  display: flex;
  gap: 40px;
  margin-top: 40px;
}

.stat-item {
  text-align: center;
}

.stat-number {
  display: block;
  font-size: 48px;
  font-weight: 800;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  display: block;
  font-size: 16px;
  color: var(--gray);
  margin-top: 5px;
}

.about-image .company-image {
  width: 100%;
  height: 400px;
  object-fit: cover;
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
}
  font-size: 20px;
  opacity: 0.8;
}

/* ===== 产品区域 ===== */
.products {
  padding: var(--section-padding);
}

/* 滚动定位边距 - 防止被导航栏遮挡 */
#products, #home, #about, #contact {
  scroll-margin-top: 120px;
}

.products h2 {
  text-align: center;
  font-size: clamp(28px, 3vw, 42px);
  margin-bottom: 15px;
}

.section-subtitle {
  text-align: center;
  color: var(--gray);
  font-size: 18px;
  margin-bottom: 50px;
}

/* 产品滚动画廊 */
.product-gallery {
  position: relative;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 60px;
}

.gallery-track-container {
  overflow: hidden;
  border-radius: 16px;
}

.gallery-track {
  display: flex;
  transition: transform 0.5s ease;
}

.product-card {
  min-width: 100%;
  position: relative;
  cursor: pointer;
}

.product-image {
  width: 100%;
  height: clamp(400px, 50vh, 600px);
  object-fit: cover;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

/* 产品图片容器 - 并排显示两张图片 */
.product-images-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  padding: 40px;
  background: var(--white);
  width: 100%;
  height: 100%;
}

.product-images-container.single-image {
  padding: 20px;
}

.product-img {
  max-width: 45%;
  max-height: 80%;
  object-fit: contain;
}

.product-images-container.single-image .product-img {
  max-width: 70%;
  max-height: 85%;
}

/* 产品卡片内容 - 大屏幕优化 */
.product-image-content {
  text-align: center;
  padding: 40px;
}

.product-emoji {
  font-size: clamp(80px, 10vw, 120px);
  line-height: 1;
  margin-bottom: 20px;
  display: block;
}

.product-emoji-text {
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 600;
  opacity: 0.95;
  display: block;
}

.product-card-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: clamp(20px, 4vw, 40px);
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
  color: var(--white);
}

.product-card-info h3 {
  font-size: clamp(24px, 4vw, 36px);
  margin-bottom: 10px;
  font-weight: 700;
}

.product-card-info p {
  opacity: 0.9;
  font-size: clamp(14px, 2vw, 18px);
}

.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--white);
  color: var(--dark);
  font-size: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-xl);
  transition: var(--transition);
  z-index: 10;
}

.gallery-nav:hover {
  background: var(--primary-color);
  color: var(--white);
  transform: translateY(-50%) scale(1.1);
}

.gallery-nav.prev {
  left: 0;
}

.gallery-nav.next {
  right: 0;
}

/* 模态框 */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.9);
  z-index: 2000;
  overflow-y: auto;
  padding: 40px 20px;
}

.modal.active {
  display: block;
}

.modal-content {
  position: relative;
  background: var(--white);
  border-radius: 16px;
  max-width: 1000px;
  width: 95%;
  max-height: calc(100vh - 80px);
  overflow-y: auto;
  margin: 0 auto;
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--dark);
  color: var(--white);
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: var(--transition);
}

.modal-close:hover {
  background: var(--primary-color);
}

.modal-body {
  padding: 40px;
}

.modal-product-image {
  width: 100%;
  height: 450px;
  border-radius: 12px;
  margin-bottom: 35px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 24px;
}

.modal-product-image.has-image {
  background: var(--white);
  padding: 30px;
}

.modal-product-info h3 {
  font-size: 32px;
  margin-bottom: 15px;
  color: var(--dark);
}

.modal-product-info .description {
  font-size: 18px;
  line-height: 1.8;
  color: var(--gray);
  margin-bottom: 30px;
}

.scenario-list h4 {
  font-size: 20px;
  margin-bottom: 15px;
  color: var(--dark);
  font-weight: 600;
}

.scenario-list ul {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
}

.scenario-list li {
  padding: 20px 24px;
  background: var(--light);
  border-radius: 8px;
  font-weight: 500;
  transition: var(--transition);
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.scenario-list li:hover {
  background: var(--gradient-primary);
  color: var(--white);
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

/* ===== 应用场景 ===== */
.scenarios {
  padding: var(--section-padding);
  background: var(--light);
}

.scenarios h2 {
  text-align: center;
  font-size: clamp(28px, 3vw, 42px);
  margin-bottom: 50px;
}

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

.scenario-card {
  background: var(--white);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}

.scenario-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-xl);
}

.scenario-image {
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 48px;
}

.scenario-card:nth-child(1) .scenario-image {
  background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
}

.scenario-card:nth-child(2) .scenario-image {
  background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
}

.scenario-card:nth-child(3) .scenario-image {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

.scenario-card:nth-child(4) .scenario-image {
  background: linear-gradient(135deg, #7c3aed 0%, #5b21b6 100%);
}

.scenario-card:nth-child(5) .scenario-image {
  background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%);
}

.scenario-card:nth-child(6) .scenario-image {
  background: linear-gradient(135deg, #0891b2 0%, #0e7490 100%);
}

.scenario-card:nth-child(7) .scenario-image {
  background: linear-gradient(135deg, #475569 0%, #1e293b 100%);
}

.scenario-card-info {
  padding: 25px;
}

.scenario-card-info h3 {
  font-size: 22px;
  margin-bottom: 10px;
  color: var(--dark);
}

.scenario-card-info p {
  color: var(--gray);
  line-height: 1.6;
}

/* ===== 联系方式 ===== */
.contact {
  padding: var(--section-padding);
}

.contact h2 {
  text-align: center;
  font-size: clamp(28px, 3vw, 42px);
  margin-bottom: 50px;
}

.contact-content {
  display: flex;
  justify-content: center;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 25px;
  align-items: center;
}

.contact-item {
  text-align: center;
}

.contact-item h4 {
  font-size: 14px;
  margin-bottom: 6px;
  color: var(--dark);
  font-weight: 600;
}

.contact-item p {
  color: var(--gray);
  font-size: 15px;
}

.contact-form form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.contact-form input,
.contact-form textarea {
  padding: 12px 16px;
  border: 2px solid var(--light);
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
  transition: var(--transition);
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--primary-color);
}

.contact-form textarea {
  resize: vertical;
}

/* ===== 页脚 ===== */
.footer {
  background: var(--dark);
  color: var(--white);
  padding: 40px 0;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-content p {
  opacity: 0.8;
}

.social-links {
  display: flex;
  gap: 20px;
}

.social-links a {
  opacity: 0.8;
  transition: var(--transition);
}

.social-links a:hover {
  opacity: 1;
  color: var(--primary-light);
}

/* ===== 响应式设计 ===== */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    padding: 20px;
    box-shadow: var(--shadow-lg);
    gap: 15px;
  }

  .nav-links.active {
    display: flex;
  }

  .mobile-menu-btn {
    display: block;
  }

  /* 移动端隐藏语言切换按钮 */
  .nav-actions .lang-toggle {
    display: none;
  }

  /* 移动端 nav-actions 只显示菜单按钮 */
  .nav-actions {
    min-width: auto;
  }

  .about-content,
  .contact-content {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .about-image .image-placeholder {
    height: 250px;
  }

  .stats {
    justify-content: center;
  }

  .product-image {
    height: 300px;
  }

  .product-images-container {
    flex-direction: column;
    gap: 20px;
    padding: 20px;
  }

  .product-img {
    max-width: 80%;
    max-height: 45%;
  }

  .gallery-nav {
    width: 40px;
    height: 40px;
    font-size: 24px;
  }

  .gallery-nav.prev {
    left: 10px;
  }

  .gallery-nav.next {
    right: 10px;
  }

  .modal.active {
    padding: 0;
  }

  .modal-content {
    width: 100%;
    max-height: calc(100vh - 40px);
    border-radius: 16px;
    margin: 20px auto;
  }

  .modal-body {
    padding: 20px;
  }

  .modal-product-image {
    height: 250px;
  }

  .modal-product-image.has-image {
    height: auto;
    padding: 20px;
  }

  .modal-product-image.has-image .product-images-container {
    flex-direction: column;
  }

  .modal-product-image.has-image .product-images-container.single-image {
    flex-direction: column;
  }

  .modal-product-image.has-image .product-img {
    max-width: 90%;
    max-height: 200px;
  }

  .scenario-list ul {
    grid-template-columns: 1fr;
  }

  .footer-content {
    flex-direction: column;
    gap: 20px;
    text-align: center;
  }
}

/* ===== 动画效果 ===== */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}
