/* ===== 全局重置 & 基础变量 ===== */
:root {
  --primary: #1a3a5c;
  --primary-light: #2a5a8c;
  --primary-dark: #0f2a44;
  --accent: #3a7aac;
  --accent-light: #5a9abc;
  --bg: #f8f9fc;
  --card-bg: #ffffff;
  --card-bg-alt: #f0f4f8;
  --text: #1a1a2e;
  --text-light: #666;
  --text-muted: #888;
  --border: #e0e0e0;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 20px;
  --shadow: 0 2px 8px rgba(0,0,0,0.04);
  --shadow-hover: 0 8px 24px rgba(0,0,0,0.10);
  --transition: 0.3s ease;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
  --max-width: 1200px;
  --header-height: 64px;
}

body.dark {
  --primary: #8ab4f8;
  --primary-light: #6a9cf0;
  --primary-dark: #3a6ab0;
  --accent: #6aaadc;
  --accent-light: #8ac4f0;
  --bg: #121212;
  --card-bg: #1e1e1e;
  --card-bg-alt: #2a2a2a;
  --text: #e0e0e0;
  --text-light: #aaa;
  --text-muted: #777;
  --border: #333;
  --shadow: 0 2px 8px rgba(0,0,0,0.3);
  --shadow-hover: 0 8px 24px rgba(0,0,0,0.5);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font);
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  scroll-behavior: smooth;
  transition: background var(--transition), color var(--transition);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  text-decoration: underline;
  color: var(--primary-light);
}

h1, h2, h3, h4 {
  font-weight: 600;
  line-height: 1.3;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 1.8rem; margin-bottom: 1.5rem; }
h3 { font-size: 1.3rem; margin-top: 1.5rem; margin-bottom: 0.8rem; }

p { margin-bottom: 1rem; }

ul, ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

li { margin-bottom: 0.3rem; }

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

button {
  cursor: pointer;
  font-family: inherit;
  transition: background var(--transition), color var(--transition), transform var(--transition);
}

button:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* ===== 滚动条美化 ===== */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: var(--primary-light);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* ===== 通用组件 ===== */
.section {
  max-width: var(--max-width);
  margin: 2rem auto;
  padding: 2.5rem 2rem;
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: background var(--transition), box-shadow var(--transition), transform 0.6s ease, opacity 0.6s ease;
}

.section:hover {
  box-shadow: var(--shadow-hover);
}

.section h2 {
  border-left: 4px solid var(--primary);
  padding-left: 1rem;
  color: var(--text);
}

body.dark .section h2 {
  border-left-color: var(--primary);
}

.btn {
  display: inline-block;
  padding: 0.75rem 2rem;
  background: var(--primary);
  color: #fff;
  border-radius: 30px;
  font-weight: 600;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  border: none;
  text-align: center;
}

.btn:hover {
  background: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(26, 58, 92, 0.3);
  text-decoration: none;
}

body.dark .btn {
  background: var(--primary);
  color: #121212;
}

body.dark .btn:hover {
  background: var(--primary-light);
  box-shadow: 0 6px 16px rgba(138, 180, 248, 0.3);
}

.read-more {
  font-weight: 600;
  color: var(--primary);
  display: inline-block;
  transition: transform var(--transition);
}

.read-more:hover {
  transform: translateX(4px);
  text-decoration: none;
}

/* ===== Header / 导航 ===== */
#header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--card-bg);
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  padding: 0 1.5rem;
  transition: background var(--transition), box-shadow var(--transition);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

body.dark #header {
  background: rgba(30, 30, 30, 0.95);
}

nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-width);
  margin: 0 auto;
  height: var(--header-height);
}

.logo a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  transition: opacity var(--transition);
}

.logo a:hover {
  opacity: 0.85;
  text-decoration: none;
}

.site-name {
  display: inline;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 1.5rem;
  align-items: center;
}

.nav-links a {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text);
  padding: 0.4rem 0;
  position: relative;
  transition: color var(--transition);
}

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

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

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

.search-toggle,
.dark-toggle,
.menu-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.4rem;
  color: var(--text);
  border-radius: 50%;
  transition: background var(--transition), color var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-toggle:hover,
.dark-toggle:hover,
.menu-toggle:hover {
  background: var(--card-bg-alt);
  color: var(--primary);
}

.menu-toggle {
  display: none;
}

/* 搜索条 */
.search-bar {
  max-width: 600px;
  margin: 0 auto 0.5rem;
  display: flex;
  gap: 0.5rem;
  padding: 0.5rem 0;
}

.search-bar input {
  flex: 1;
  padding: 0.6rem 1rem;
  border: 1px solid var(--border);
  border-radius: 30px;
  background: var(--card-bg);
  color: var(--text);
  font-size: 0.95rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.search-bar input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26, 58, 92, 0.15);
}

body.dark .search-bar input {
  background: #333;
  border-color: #555;
}

body.dark .search-bar input:focus {
  box-shadow: 0 0 0 3px rgba(138, 180, 248, 0.2);
}

.search-bar button {
  padding: 0.6rem 1.2rem;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 30px;
  font-weight: 600;
  transition: background var(--transition), transform var(--transition);
}

.search-bar button:hover {
  background: var(--primary-light);
  transform: scale(1.02);
}

body.dark .search-bar button {
  background: var(--primary);
  color: #121212;
}

body.dark .search-bar button:hover {
  background: var(--primary-light);
}

/* ===== 面包屑 ===== */
.breadcrumb {
  max-width: var(--max-width);
  margin: 0.5rem auto;
  padding: 0 2rem;
  font-size: 0.85rem;
  color: var(--text-light);
}

.breadcrumb ol {
  list-style: none;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.breadcrumb li + li::before {
  content: " / ";
  margin-right: 0.5rem;
  color: var(--text-muted);
}

.breadcrumb a {
  color: var(--primary);
}

/* ===== Banner 轮播 ===== */
.banner {
  position: relative;
  max-width: var(--max-width);
  margin: 1rem auto;
  overflow: hidden;
  border-radius: var(--radius-lg);
  min-height: 400px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.banner-slides {
  position: relative;
  width: 100%;
  height: 420px;
}

.slide {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
}

.slide.active {
  display: flex;
  animation: fadeIn 0.6s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(1.02); }
  to { opacity: 1; transform: scale(1); }
}

.slide-content {
  position: absolute;
  z-index: 10;
  text-align: center;
  color: #fff;
  padding: 2rem;
  max-width: 700px;
  width: 90%;
  background: rgba(0,0,0,0.15);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,0.1);
}

.slide-content h1 {
  font-size: 2.5rem;
  text-shadow: 0 2px 12px rgba(0,0,0,0.3);
  margin-bottom: 0.5rem;
}

.slide-content p {
  font-size: 1.2rem;
  margin: 1rem 0;
  text-shadow: 0 1px 6px rgba(0,0,0,0.3);
  opacity: 0.9;
}

.banner-svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.banner-nav {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.6rem;
  z-index: 20;
}

.dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
  border: 2px solid transparent;
}

.dot.active {
  background: #fff;
  transform: scale(1.2);
  border-color: rgba(255,255,255,0.5);
}

.dot:hover {
  background: rgba(255,255,255,0.7);
}

/* ===== 品牌介绍 ===== */
.brand-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
}

.brand-text h3 {
  color: var(--primary);
}

.brand-info ul {
  list-style: none;
  padding: 0;
}

.brand-info li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}

.brand-info li:last-child {
  border-bottom: none;
}

.team-intro {
  margin-top: 2rem;
  padding: 1.5rem;
  background: var(--card-bg-alt);
  border-radius: var(--radius-sm);
  transition: background var(--transition);
}

/* ===== 产品 ===== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.product-card {
  background: var(--card-bg-alt);
  padding: 2rem 1.5rem;
  border-radius: var(--radius);
  text-align: center;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
  cursor: default;
  position: relative;
  overflow: hidden;
}

.product-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition);
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 28px rgba(0,0,0,0.08);
}

.product-card:hover::before {
  transform: scaleX(1);
}

body.dark .product-card:hover {
  box-shadow: 0 12px 28px rgba(0,0,0,0.3);
}

.product-card svg {
  margin-bottom: 1rem;
  transition: transform var(--transition);
}

.product-card:hover svg {
  transform: scale(1.08);
}

.product-card h3 {
  margin-top: 0;
  color: var(--text);
}

.product-advantages {
  margin-top: 2rem;
  padding: 1.5rem 2rem;
  background: var(--card-bg-alt);
  border-radius: var(--radius-sm);
}

.product-advantages ul {
  list-style: none;
  padding: 0;
}

.product-advantages li {
  padding: 0.5rem 0;
  padding-left: 1.5rem;
  position: relative;
}

.product-advantages li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: bold;
}

/* ===== 解决方案 ===== */
.solution-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.solution-item {
  background: var(--card-bg-alt);
  padding: 1.5rem;
  border-radius: var(--radius);
  transition: transform var(--transition), box-shadow var(--transition);
  border-left: 4px solid var(--accent);
}

.solution-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.06);
}

body.dark .solution-item:hover {
  box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

.solution-item h3 {
  margin-top: 0;
  color: var(--primary);
}

/* ===== 案例 ===== */
.case-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.case-card {
  background: var(--card-bg-alt);
  padding: 1.5rem;
  border-radius: var(--radius);
  text-align: center;
  transition: transform var(--transition), box-shadow var(--transition);
}

.case-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 24px rgba(0,0,0,0.06);
}

body.dark .case-card:hover {
  box-shadow: 0 10px 24px rgba(0,0,0,0.3);
}

.case-card svg {
  margin: 0 auto 1rem;
  transition: transform var(--transition);
}

.case-card:hover svg {
  transform: scale(1.05);
}

.case-testimonial {
  margin-top: 2rem;
}

.case-testimonial blockquote {
  background: var(--card-bg-alt);
  padding: 1.5rem;
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  font-style: italic;
  position: relative;
}

.case-testimonial blockquote::before {
  content: '"';
  font-size: 3rem;
  position: absolute;
  top: -0.2rem;
  left: 0.5rem;
  color: var(--primary);
  opacity: 0.2;
  font-family: Georgia, serif;
}

.case-testimonial footer {
  margin-top: 0.5rem;
  font-style: normal;
  color: var(--text-light);
  font-weight: 500;
}

/* ===== 新闻中心 ===== */
.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.article-card {
  background: var(--card-bg-alt);
  padding: 1.5rem;
  border-radius: var(--radius);
  transition: transform var(--transition), box-shadow var(--transition);
  position: relative;
}

.article-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.06);
}

body.dark .article-card:hover {
  box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

.article-card time {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.article-card h3 {
  margin-top: 0;
  font-size: 1.1rem;
}

.article-card p {
  font-size: 0.95rem;
  color: var(--text-light);
}

/* ===== FAQ ===== */
.faq-list details {
  margin-bottom: 0.5rem;
  background: var(--card-bg-alt);
  border-radius: var(--radius-sm);
  padding: 0.8rem 1.2rem;
  transition: background var(--transition), box-shadow var(--transition);
}

.faq-list details[open] {
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

body.dark .faq-list details[open] {
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.faq-list summary {
  cursor: pointer;
  font-weight: 600;
  outline: none;
  padding: 0.3rem 0;
  color: var(--text);
  transition: color var(--transition);
}

.faq-list summary::-webkit-details-marker {
  color: var(--primary);
}

.faq-list summary:hover {
  color: var(--primary);
}

.faq-list details p {
  margin-top: 0.8rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--border);
  color: var(--text-light);
}

/* ===== HowTo ===== */
.howto-content {
  background: var(--card-bg-alt);
  padding: 1.5rem 2rem;
  border-radius: var(--radius);
}

.howto-steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
}

.howto-steps li {
  counter-increment: step;
  margin-bottom: 1rem;
  padding: 1rem 1rem 1rem 3rem;
  background: var(--card-bg);
  border-radius: var(--radius-sm);
  position: relative;
  transition: transform var(--transition), box-shadow var(--transition);
}

.howto-steps li:hover {
  transform: translateX(4px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

body.dark .howto-steps li:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.howto-steps li::before {
  content: counter(step);
  position: absolute;
  left: 0.8rem;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
}

body.dark .howto-steps li::before {
  background: var(--primary);
  color: #121212;
}

/* ===== 联系我们 ===== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
}

.contact-info p {
  margin-bottom: 0.5rem;
  padding: 0.3rem 0;
}

.contact-info p strong {
  color: var(--primary);
}

.contact-map svg {
  border-radius: var(--radius-sm);
  width: 100%;
  height: auto;
  max-width: 350px;
  margin: 0 auto;
  transition: transform var(--transition);
}

.contact-map svg:hover {
  transform: scale(1.02);
}

/* ===== 网站地图 ===== */
.sitemap-links {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

.sitemap-links ul {
  list-style: none;
  padding: 0;
}

.sitemap-links li {
  margin-bottom: 0.3rem;
}

.sitemap-links a {
  color: var(--text-light);
  font-size: 0.95rem;
}

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

.friend-links {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
  font-size: 0.9rem;
  color: var(--text-light);
}

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

/* ===== Footer ===== */
footer {
  background: var(--primary-dark);
  color: #fff;
  padding: 2.5rem 1.5rem;
  text-align: center;
  margin-top: 2rem;
}

body.dark footer {
  background: #0d1b2a;
}

footer p {
  margin-bottom: 0.3rem;
  font-size: 0.95rem;
  opacity: 0.9;
}

footer small {
  opacity: 0.7;
}

/* ===== 返回顶部 ===== */
#backToTop {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  border: none;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  z-index: 99;
  transition: background var(--transition), transform var(--transition), opacity var(--transition);
}

body.dark #backToTop {
  background: var(--primary);
  color: #121212;
}

#backToTop.show {
  display: flex;
}

#backToTop:hover {
  background: var(--primary-light);
  transform: translateY(-3px) scale(1.05);
}

#backToTop:active {
  transform: scale(0.95);
}

/* ===== 响应式 ===== */
@media (max-width: 1024px) {
  .brand-grid {
    grid-template-columns: 1fr;
  }
  
  .contact-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .contact-map svg {
    margin: 1rem auto;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--card-bg);
    padding: 1rem;
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    border-radius: 0 0 var(--radius) var(--radius);
    gap: 0.5rem;
    z-index: 100;
  }
  
  body.dark .nav-links {
    background: rgba(30, 30, 30, 0.98);
  }
  
  .nav-links.open {
    display: flex;
  }
  
  .nav-links a {
    padding: 0.6rem 0;
    font-size: 1rem;
  }
  
  .menu-toggle {
    display: flex;
  }
  
  .slide-content h1 {
    font-size: 1.6rem;
  }
  
  .slide-content p {
    font-size: 1rem;
  }
  
  .banner,
  .banner-slides,
  .slide {
    min-height: 300px;
    height: 300px;
  }
  
  .banner-svg {
    height: 300px;
  }
  
  .section {
    padding: 1.5rem 1rem;
    margin: 1rem 0.5rem;
  }
  
  .product-grid,
  .solution-grid,
  .case-grid,
  .article-grid {
    grid-template-columns: 1fr;
  }
  
  .brand-info li {
    font-size: 0.9rem;
  }
  
  .howto-content {
    padding: 1rem;
  }
  
  .howto-steps li {
    padding: 0.8rem 0.8rem 0.8rem 2.8rem;
  }
  
  .howto-steps li::before {
    width: 24px;
    height: 24px;
    font-size: 0.8rem;
    left: 0.5rem;
  }
  
  .sitemap-links {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .friend-links {
    flex-direction: column;
    align-items: flex-start;
  }
  
  #backToTop {
    bottom: 1rem;
    right: 1rem;
    width: 42px;
    height: 42px;
  }
}

@media (max-width: 480px) {
  .slide-content {
    padding: 1rem;
    width: 95%;
  }
  
  .slide-content h1 {
    font-size: 1.3rem;
  }
  
  .slide-content p {
    font-size: 0.9rem;
  }
  
  .banner,
  .banner-slides,
  .slide {
    min-height: 240px;
    height: 240px;
  }
  
  .banner-svg {
    height: 240px;
  }
  
  .section h2 {
    font-size: 1.4rem;
  }
  
  .product-card {
    padding: 1.2rem;
  }
  
  .btn {
    padding: 0.6rem 1.5rem;
    font-size: 0.9rem;
  }
}

/* ===== 暗黑模式微调 ===== */
body.dark .banner {
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

body.dark .slide-content {
  background: rgba(0,0,0,0.3);
  border-color: rgba(255,255,255,0.05);
}

body.dark .product-advantages li::before {
  color: var(--primary);
}

body.dark .faq-list summary::-webkit-details-marker {
  color: var(--primary);
}

/* ===== 打印样式 ===== */
@media print {
  #header,
  #backToTop,
  .banner-nav,
  .search-bar,
  .menu-toggle,
  .dark-toggle,
  .search-toggle {
    display: none !important;
  }
  
  .section {
    box-shadow: none;
    border: 1px solid #ddd;
    page-break-inside: avoid;
  }
  
  body {
    background: #fff;
    color: #000;
  }
}