/* ============================================================
   汽车轻量化零部件企业官网 - 自定义样式
   品牌色：科技蓝 #0988D6
   设计：现代极简 | 开阔留白 | 动效叙事
   ============================================================ */

/* ===== CSS 变量 ===== */
:root {
  --brand: #0988D6;
  --brand-dark: #0569a8;
  --brand-light: #2b9fe0;
  --brand-bg: rgba(9, 136, 214, 0.06);
  --charcoal: #1A1D24;
  --text-heading: #111111;
  --text-body: #444444;
  --text-muted: #888888;
  --text-footer: #BBBBBB;
  --bg-light: #F6F7F9;
  --bg-gray: #EDEEF0;
  --white: #FFFFFF;
  --border-light: #E8E9EB;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.12);
  --radius: 8px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== 全局基础 ===== */
html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Helvetica Neue", sans-serif;
  color: var(--text-body);
  background: var(--white);
  line-height: 1.7;
  overflow-x: hidden;
}

::selection {
  background: var(--brand);
  color: #fff;
}

/* ===== 自定义滚动条 ===== */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-light); }
::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover { background: #aaa; }

/* ===== 导航栏 ===== */
.navbar {
  transition: box-shadow var(--transition), background var(--transition);
}
.navbar.scrolled {
  box-shadow: 0 2px 20px rgba(0,0,0,0.08);
}
.nav-link {
  position: relative;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-heading);
  transition: color var(--transition);
  padding: 4px 0;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--brand), var(--brand-light));
  transition: width var(--transition);
  border-radius: 1px;
}
.nav-link:hover { color: var(--brand); }
.nav-link:hover::after { width: 100%; }
.nav-link.active { color: var(--brand); }
.nav-link.active::after { width: 100%; }

/* 下拉菜单 */
.dropdown-menu {
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.25s ease;
}
.dropdown:hover .dropdown-menu,
.dropdown.active .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* ===== Banner 轮播 ===== */
.banner-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.8s ease-in-out;
  z-index: 0;
}
.banner-slide.active {
  opacity: 1;
  z-index: 1;
}
.banner-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  border: 2px solid rgba(255,255,255,0.6);
  cursor: pointer;
  transition: all var(--transition);
}
.banner-dot.active,
.banner-dot:hover {
  background: var(--brand);
  border-color: var(--brand);
}
.banner-arrow {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
  color: #fff;
  font-size: 20px;
}
.banner-arrow:hover {
  background: var(--brand);
  border-color: var(--brand);
}

/* ===== 产品卡片 ===== */
.product-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1.5px solid transparent;
  transition: all var(--transition);
}
.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--brand);
}
.product-card .card-img {
  overflow: hidden;
}
.product-card .card-img img {
  transition: transform 0.5s ease;
}
.product-card:hover .card-img img {
  transform: scale(1.05);
}

/* 产品分类标签 */
.filter-tab {
  cursor: pointer;
  padding: 10px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-body);
  background: var(--bg-light);
  border: 1.5px solid transparent;
  transition: all var(--transition);
  white-space: nowrap;
}
.filter-tab:hover,
.filter-tab.active {
  background: var(--brand);
  color: #fff;
  border-color: transparent;
}

/* 合作伙伴分类标签 */
.partner-tab {
  cursor: pointer;
  padding: 10px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-body);
  background: var(--bg-light);
  border: 1.5px solid transparent;
  transition: all var(--transition);
  white-space: nowrap;
}
.partner-tab:hover,
.partner-tab.active {
  background: var(--brand);
  color: #fff;
  border-color: transparent;
}

/* ===== 按钮样式 ===== */
.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 32px;
  border: 1.5px solid var(--brand);
  color: var(--brand);
  border-radius: 30px;
  font-size: 15px;
  font-weight: 500;
  transition: all var(--transition);
  background: transparent;
  cursor: pointer;
}
.btn-outline:hover {
  background: var(--brand);
  color: #fff;
}
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 32px;
  background: var(--brand);
  color: #fff;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
}
.btn-primary:hover {
  background: var(--brand-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(9, 136, 214, 0.3);
}
.btn-white {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 32px;
  background: #fff;
  color: var(--brand);
  border-radius: 10px;
  font-size: 15px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
}
.btn-white:hover {
  background: var(--charcoal);
  color: #fff;
}

/* ===== 装饰分割线 ===== */
.divider {
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--brand), var(--brand-light));
  border-radius: 2px;
  margin: 0 auto;
}
.divider-left {
  margin: 0;
}

/* ===== 合作伙伴Logo卡片 ===== */
.partner-card {
  background: var(--bg-light);
  border-radius: var(--radius);
  padding: 28px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  min-height: 100px;
}
.partner-card:hover {
  background: #fff;
  box-shadow: var(--shadow-md);
}

/* ===== 资质证书卡片 ===== */
.cert-card {
  cursor: pointer;
  border-radius: var(--radius);
  overflow: hidden;
  transition: all var(--transition);
  border: 1.5px solid var(--border-light);
}
.cert-card:hover {
  border-color: var(--brand);
  box-shadow: var(--shadow-md);
}

/* 证书轮播方形切换按钮 */
.cert-dot {
  width: 12px;
  height: 12px;
  background: #d1d5db;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: all var(--transition);
}
.cert-dot:hover { background: #9ca3af; }
.cert-dot.active { background: var(--brand); }

/* 证书放大模态窗 */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition);
  cursor: pointer;
}
.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}
.cert-modal-body {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 90vw;
  max-height: 90vh;
}
.cert-modal-body img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.cert-modal-title {
  margin-top: 18px;
  color: #fff;
  font-size: 16px;
  line-height: 1.5;
  text-align: center;
  letter-spacing: 0.02em;
}
.cert-modal-close {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  color: #fff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--transition);
  z-index: 10;
}
.cert-modal-close:hover { background: rgba(255,255,255,0.28); }
.cert-modal-close svg { width: 22px; height: 22px; }
.cert-modal-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  color: #fff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--transition);
  z-index: 10;
}
.cert-modal-nav:hover { background: rgba(255,255,255,0.28); }
.cert-modal-nav svg { width: 22px; height: 22px; }
.cert-modal-prev { left: 20px; }
.cert-modal-next { right: 20px; }

/* ===== 资讯卡片 ===== */
.news-card {
  display: flex;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
  transition: all var(--transition);
}
.news-card:hover { padding-left: 8px; }
.news-card:hover .news-title { color: var(--brand); }
.news-card:last-child { border-bottom: none; }
.news-title {
  transition: color var(--transition);
  font-weight: 500;
}

/* ===== CTA 区域 ===== */
.cta-section {
  background: linear-gradient(135deg, #0569a8 0%, var(--brand) 40%, #2b9fe0 100%);
  position: relative;
  overflow: hidden;
}
.cta-section::before {
  content: '';
  position: absolute;
  top: -60%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(255,255,255,0.06) 0%, transparent 70%);
  border-radius: 50%;
}
.cta-section::after {
  content: '';
  position: absolute;
  bottom: -40%;
  left: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(255,255,255,0.04) 0%, transparent 70%);
  border-radius: 50%;
}
.service-icon-box {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  transition: all var(--transition);
}
.cta-service-item:hover .service-icon-box {
  background: rgba(255,255,255,0.25);
  transform: translateY(-4px);
}

/* ===== 页脚 ===== */
.footer-link {
  color: var(--text-footer);
  transition: color var(--transition);
  font-size: 14px;
  line-height: 2;
}
.footer-link:hover { color: var(--brand); }

/* ===== 右侧悬浮工具栏 ===== */
.side-tools {
  position: fixed;
  right: 20px;
  top: 70%;
  transform: translateY(-50%);
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.side-tool-item {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 2px 12px rgba(0,0,0,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  color: var(--text-body);
}
.side-tool-item:hover {
  background: var(--brand);
  color: #fff;
}
.side-tool-item .tool-tip {
  position: absolute;
  right: 68px;
  background: var(--charcoal);
  color: #fff;
  padding: 6px 14px;
  border-radius: 4px;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition);
}
.side-tool-item:hover .tool-tip {
  opacity: 1;
  visibility: visible;
}
.side-tool-item .qr-popup {
  position: absolute;
  right: 68px;
  bottom: 0;
  background: #fff;
  padding: 12px;
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition);
}
.side-tool-item .qr-popup img {
  width: 160px;
  height: auto;
  max-width: none;
  display: block;
}
.side-tool-item .qr-popup p {
  text-align: center;
  font-size: 12px;
  color: var(--text-body);
  margin-top: 6px;
}
.side-tool-item:hover .qr-popup {
  opacity: 1;
  visibility: visible;
}

/* ===== 回到顶部 ===== */
.back-to-top {
  position: fixed;
  bottom: 40px;
  right: 20px;
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all var(--transition);
  z-index: 998;
  box-shadow: 0 4px 16px rgba(9, 136, 214, 0.3);
}
.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.back-to-top:hover {
  background: var(--brand-dark);
  transform: translateY(-4px);
}

/* ===== 汉堡菜单 ===== */
.mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 300px;
  height: 100vh;
  background: #fff;
  z-index: 9999;
  transition: right var(--transition);
  box-shadow: -4px 0 30px rgba(0,0,0,0.15);
  padding: 24px;
  overflow-y: auto;
}
.mobile-menu.active { right: 0; }
.mobile-menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition);
}
.mobile-menu-overlay.active {
  opacity: 1;
  visibility: visible;
}
.mobile-nav-link {
  display: block;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-heading);
  font-size: 16px;
  font-weight: 500;
  transition: color var(--transition);
}
.mobile-nav-link:hover { color: var(--brand); }

/* ===== 淡入动画 ===== */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== 语言切换按钮组 ===== */
.lang-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 4px 12px;
  height: 30px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  line-height: 1;
  white-space: nowrap;
}
.lang-btn .iconfont {
  font-size: 14px;
}
.lang-btn:hover {
  color: var(--text-heading);
}
.lang-btn.active {
  background: #fff;
  color: var(--brand);
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  font-weight: 600;
}

/* 顶部信息栏语言按钮 */
.lang-btn-top {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  color: #6b7280;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  line-height: 1;
  white-space: nowrap;
}
.lang-btn-top .iconfont {
  font-size: 13px;
}
.lang-btn-top:hover {
  color: #111827;
}
.lang-btn-top.active {
  background: transparent;
  color: var(--brand);
  font-weight: 600;
}

/* ===== 子菜单样式 ===== */
.submenu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: #fff;
  min-width: 180px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 8px 0;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s ease;
  z-index: 100;
}
.nav-item:hover .submenu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}
.submenu a {
  display: block;
  padding: 10px 20px;
  font-size: 14px;
  color: var(--text-body);
  transition: all 0.2s ease;
}
.submenu a:hover {
  color: var(--brand);
  background: var(--brand-bg);
}

/* ===== 响应式 ===== */
@media (max-width: 1024px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .partner-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
  .product-grid { grid-template-columns: 1fr; }
  .partner-grid { grid-template-columns: repeat(2, 1fr); }
  .banner-title { font-size: 28px !important; }
  .banner-subtitle { font-size: 14px !important; }
  .section-title { font-size: 28px !important; }
  .nav-desktop { display: none !important; }
  .nav-mobile-toggle { display: flex !important; }
}

@media (max-width: 480px) {
  .partner-grid { grid-template-columns: repeat(2, 1fr); }
  .filter-tabs { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

/* ===== 内页统一页头（蓝渐变） ===== */
.page-hero {
  background: linear-gradient(135deg, #0569a8 0%, #0988D6 55%, #2b9fe0 100%);
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  top: -60%;
  right: -15%;
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, rgba(255,255,255,0.10) 0%, transparent 70%);
  border-radius: 50%;
}
.page-hero::after {
  content: '';
  position: absolute;
  bottom: -55%;
  left: -10%;
  width: 360px;
  height: 360px;
  background: radial-gradient(circle, rgba(255,255,255,0.06) 0%, transparent 70%);
  border-radius: 50%;
}

/* ===== 内页页头（背景图，资讯中心等） ===== */
.page-hero-img {
  position: relative;
  background: url('/images/b3.webp') center/cover no-repeat;
}
.page-hero-img::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(17, 17, 17, 0.75);
}

/* ===== 数字指标 ===== */
.stat-number {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}

/* ===== 服务/项目卡片 ===== */
.service-card {
  background: var(--white);
  border: 1px solid #f0f0f0;
  border-radius: 12px;
  transition: all 0.5s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.service-card:hover {
  box-shadow: 0 16px 40px rgba(0,0,0,0.08);
  transform: translateY(-6px);
}
.project-card {
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  transition: box-shadow 0.4s ease, transform 0.4s ease;
}
.project-card:hover {
  box-shadow: 0 16px 44px rgba(0,0,0,0.14);
  transform: translateY(-4px);
}
.project-card img { transition: transform 0.7s ease; }
.project-card:hover img { transform: scale(1.06); }

/* ===== 流程步骤 ===== */
.process-step { position: relative; }
.process-line {
  background: #e5e7eb;
  transition: background 0.4s ease;
}
.process-step:hover .process-line { background: var(--brand); }

/* ===== 滚动渐入（新模板风格） ===== */
.reveal-up {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s cubic-bezier(0.22, 0.61, 0.36, 1),
              transform 0.8s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.reveal-up.visible {
  opacity: 1;
  transform: translateY(0);
}
.delay-1 { transition-delay: 0.12s; }
.delay-2 { transition-delay: 0.24s; }
.delay-3 { transition-delay: 0.36s; }
