* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  background: #fff;
  color: #222;
}

.page-wrapper {
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

.main-content {
  flex: 1;
}

.container {
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 32px;
}

.intro-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 32px;
  text-align: center;
}

.page-title {
  font-size: 36px;
  color: #12165d;
  margin-bottom: 48px;
}

header {
  background: #ffffff;
}

.site-header {
  background: #ffffff;
  border-bottom: 1px solid rgba(0, 0, 0, 0.15);
}

.nav-bar {
  max-width: 1200px;
  margin: 0 auto;
  height: 80px; 
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between; 
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 40px; 
}

.logo img {
  height: 66px;
  display: block;
}

.nav-menu {
  display: flex;
  gap: 28px;
}

.nav-menu a {
  color: #000000;
  font-weight: 600;
  text-decoration: none;
}

.nav-menu a:hover {
  text-decoration: underline;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 20px; 
}

.nav-search {
  position: relative;
  height: 36px;
  display: flex;
  align-items: center;
}

.search-icon {
  font-size: 16px;
  color: #000000;
  cursor: pointer;
  z-index: 2;
}

.nav-search input {
  position: absolute;
  right: 0;
  width: 0;
  height: 36px;
  padding: 0 14px 0 36px;
  border-radius: 18px;
  border: none;
  outline: none;
  font-size: 14px;
  opacity: 0;
  transition: all 0.35s ease;
}

.nav-search:hover input,
.nav-search input:focus {
  width: 220px;
  opacity: 1;
  background: #f1f1f1;
}

.nav-search:hover .search-icon,
.nav-search input:focus + .search-icon {
  color: #ffffff;
}

.search-icon img {
  width: 16px;
  height: 16px;
  display: block;
}

.footer {
  background: #f4f4f4;
  text-align: center;
  padding: 20px 0;
  font-size: 13px;
  color: #666;
  width: 100%;
}


.section {
  padding: 80px 0;
}

.company-intro {
  background: #f7f8fa;
  padding: 30px 0;
}

.company-intro h2 {
  font-size: 28px;
  margin-bottom: 20px;
  font-weight: 600;
}

.company-intro p {
  font-size: 16px;
  line-height: 1.8;
  color: #555;  
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

.product-card {
  background: #ffffff;
  border: 1px solid #f1f1f1; 
  border-radius: 24px;
  padding: 40px 32px;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  transition: all 0.25s ease; 
  display: block; 
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
}

.product-card img {
  width: 200px;
  height: 280px;
  object-fit: contain;
  margin-bottom: 24px;
}

.product-card h3 {
  font-size: 20px;
  color: #12165d;
  margin-bottom: 10px;
}

.product-card p {
  font-size: 14px;
  color: #3b3b3b;
  line-height: 1.6;
}

.lang-switch {
  display: flex;
  gap: 8px;
  align-items: center;
}

.lang-btn {
  padding: 4px 12px;
  border-radius: 16px;
  border: 1px solid #ccc;
  background: #fff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  transition: all 0.2s ease;
  height: 28px;
  line-height: 1;
}

.lang-btn.active {
  background: #12165d;
  color: #fff;
  border-color: #12165d;
}

.lang-btn:hover:not(.active) {
  border-color: #12165d;
  color: #12165d;
}

/* --- 1. 修改导航栏定位 --- */
.site-header {
  background: #ffffff;
  border-bottom: 1px solid rgba(0, 0, 0, 0.15);
  
  /* 核心：固定在顶部 */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  
  /* 确保导航栏在所有页面内容（如视频、图片轨道）的上方 */
  z-index: 1000; 
  
  /* 可选：添加轻微阴影，增强滚动时的视觉深度 */
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* --- 2. 修正内容偏移 --- */
.main-content {
  flex: 1;
  /* 关键：因为 header 固定后脱离了文档流，下方内容会向上“钻”。
     你原来的 .nav-bar 高度是 80px，所以这里必须加 80px 的间距。
  */
  padding-top: 80px; 
}

/* --- 3. 针对响应式的微调 (可选) --- */
@media (max-width: 768px) {
  /* 如果你在移动端导航栏高度变小了，请同步调整这里的 padding-top */
  .main-content {
    padding-top: 80px; 
  }
}

/* === 系统暗黑模式自动切换 === */
@media (prefers-color-scheme: dark) {
  /* 整体背景和文字 */
  html, body {
    background-color: #0d0d0d;
    color: #e5e5e5;
  }

  /* Header 和导航栏 */
  header,
  .site-header {
    background-color: #1a1a1a;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
  }

  .nav-menu a {
    color: #e5e5e5;
  }

  .nav-menu a:hover {
    text-decoration: underline;
  }

  .nav-search input {
    background-color: #333;
    color: #fff;
  }


  /* 各个版块 */
  .section {
    background-color: #0f0f0f;
    color: #e5e5e5;
  }

  .company-intro {
    background-color: #1a1a1a;
  }

  .company-intro h2,
  .company-intro p {
    color: #e5e5e5;
  }

  /* 产品卡片 */
  .product-card {
    background-color: #1c1c1c;
    border: 1px solid #333;
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.05);
  }

  .product-card:hover {
    box-shadow: 0 12px 30px rgba(255, 255, 255, 0.08);
  }

  .product-card h3 {
    color: #ffffff;
  }

  .product-card p {
    color: #ccc;
  }

  /* 语言切换按钮 */
  .lang-btn {
    background: #333;
    border-color: #555;
    color: #e5e5e5;
  }

  .lang-btn.active {
    background: #12165d; /* 保留品牌色 */
    color: #fff;
    border-color: #12165d;
  }

  .lang-btn:hover:not(.active) {
    border-color: #12165d;
    color: #fff;
  }
}

/* 修改 .nav-search input */
.nav-search input {
  position: absolute;
  right: 0;
  width: 40px;          /* 默认给它一点宽度，像个圆形按钮 */
  height: 40px;
  border-radius: 20px;
  opacity: 1;           /* 初始可见 */
  cursor: pointer;
  
  /* --- 核心优化：纯白背景专用 --- */
  background: rgba(255, 255, 255, 0.6); /* 半透明白 */
  backdrop-filter: blur(12px);          /* 毛玻璃模糊 */
  -webkit-backdrop-filter: blur(12px);
  
  /* 极细边框：模拟玻璃边缘 */
  border: 1px solid rgba(0, 0, 0, 0.06); 
  
  /* 微弱阴影：让它从白色背景中“跳”出来 */
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  
  transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

/* 展开状态 */
.nav-search:hover input,
.nav-search input:focus {
  width: 260px;
  background: rgba(255, 255, 255, 0.9); /* 展开后更接近实色，方便阅读 */
  padding: 0 16px 0 40px;
  border-color: rgba(0, 0, 0, 0.1);    /* 边框稍微加深 */
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08); /* 展开后阴影更深，更有层次感 */
}

/* ==========================================================================
   暗黑模式优化 (重点修复搜索框)
   ========================================================================== */
@media (prefers-color-scheme: dark) {
  /* 1. 搜索图标适配：将图标颜色转为白色 */
  .search-icon {
    color: #ffffff;
    /* 如果你的图标是 img 图片，使用 filter 反色 */
    filter: brightness(0) invert(1); 
  }

  .nav-search input {
    background: rgba(40, 40, 40, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    color: #fff;
  }
  
  .nav-search:hover input {
    background: rgba(50, 50, 50, 0.8);
    border-color: rgba(255, 255, 255, 0.2);
  }
}

/* ==========================================================================
   页脚/版权信息暗黑模式适配
   ========================================================================== */
@media (prefers-color-scheme: dark) {
    /* 1. 整个页脚背景适配 */
    .footer, footer {
        background-color: #111111 !important; /* 比卡片颜色更深一点，增加层级感 */
        border-top: 1px solid #333;
    }

    /* 2. 版权文字颜色适配 */
    .copyright, 
    .footer p, 
    .footer-bottom {
        color: #777777 !important; /* 降低对比度，不抢眼 */
    }

    /* 3. 如果页脚有链接 */
    .footer a {
        color: #8ab4f8 !important; /* 链接使用淡蓝色 */
        text-decoration: none;
    }

    .footer a:hover {
        color: #ffffff !important;
        text-underline-offset: 4px;
        text-decoration: underline;
    }
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}