/* ============================================
   TECH-DISPLAY 公共样式 - 头部和底部
   ============================================ */

/* CSS 变量定义 - 深色主题（与原版完全一致） */
:root {
  --background: 222 8% 8%;
  --foreground: 0 0% 98%;
  --card: 222 12% 12%;
  --card-foreground: 0 0% 98%;
  --popover: 222 14% 14%;
  --popover-foreground: 0 0% 98%;
  --primary: 215 55% 50%;
  --primary-foreground: 0 0% 100%;
  --primary-hover: 215 55% 58%;
  --secondary: 220 12% 20%;
  --secondary-foreground: 0 0% 98%;
  --accent: 180 70% 48%;
  --accent-foreground: 0 0% 100%;
  --muted: 220 10% 30%;
  --muted-foreground: 220 10% 65%;
  --border: 220 15% 20%;
  --input: 220 15% 20%;
  --ring: 215 55% 50%;
  --radius: 0.5rem;
  --font-sans: "Inter", "Segoe UI", "Helvetica Neue", system-ui, -apple-system, sans-serif;
  --shadow-soft: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-card: 0 4px 16px rgba(0, 0, 0, 0.12);
}

/* 重置样式 */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: #ffffff;
  /*color: hsl(var(--foreground));*/
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

ul, ol {
  list-style: none;
}

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

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

/* 页面主体内边距 - 公共类 */
.page-body {
  padding-top: 5rem;
  padding-bottom: 5rem;
}

@media (min-width: 768px) {
  .page-body {
    padding-top: 1rem;
    padding-bottom: 1rem;
  }
}

/* 容器 */
.page-container {
  width: 100%;
  max-width: 1500px;
  margin: 0 auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

@media (min-width: 1024px) {
  .page-container {
    padding-left: 4rem;
    padding-right: 4rem;
  }
}

/* ============================================
   头部样式 - Header
   ============================================ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  height: 80px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background-color: hsl(var(--background) / 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.3s ease;
}

.site-header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.logo-icon {
  width: 40px;
  height: 40px;
  /*background-color: hsl(var(--primary));*/
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 2px;
  transition: background-color 0.3s ease;
}

.logo:hover .logo-icon {
  background-color: hsl(var(--primary-hover));
}

.logo-icon svg {
  width: 24px;
  height: 24px;
  color: white;
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-title {
  font-size: 1.25rem;
  font-weight: 700;

  line-height: 1;
  color: hsl(var(--foreground));
}

.logo-subtitle {
  font-size: 0.625rem;
  color: hsl(var(--muted-foreground));
  letter-spacing: 0.2em;
  font-weight: 500;
  text-transform: uppercase;
  margin-top: 2px;
}

/* 导航菜单 */
.main-nav {
  display: none;
}

@media (min-width: 1024px) {
  .main-nav {
    display: flex;
    align-items: center;
    gap: 0.25rem;
  }
}

.nav-menu {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  list-style: none;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: hsl(var(--foreground));
  border-radius: 0.375rem;
  transition: all 0.2s ease;
  background-color: transparent;
}

.nav-link:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

.nav-link.active {
  color: hsl(var(--accent));
  font-weight: 600;
}

.nav-link svg {
  width: 12px;
  height: 12px;
  margin-left: 0.25rem;
  transition: transform 0.2s ease;
}

.nav-item:hover .nav-link svg {
  transform: rotate(180deg);
}

/* 下拉菜单 */
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 0.25rem;
  min-width: 200px;
  background-color: hsl(var(--popover));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
  z-index: 100;
}

.nav-item:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item {
  display: block;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  color: hsl(var(--foreground));
  transition: all 0.2s ease;
}

.dropdown-item:hover {
  background-color: hsl(var(--secondary));
  color: hsl(var(--accent));
}

.dropdown-item:first-child {
  border-radius: var(--radius) var(--radius) 0 0;
}

.dropdown-item:last-child {
  border-radius: 0 0 var(--radius) var(--radius);
}

/* 头部右侧操作区 */
.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.btn-faq {
  display: none;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: hsl(var(--foreground));
  transition: color 0.2s ease;
}

.btn-faq:hover {
  color: hsl(var(--accent));
}

.btn-faq svg {
  width: 18px;
  height: 18px;
}

@media (min-width: 768px) {
  .btn-faq {
    display: flex;
  }
}

.header-divider {
  display: none;
  width: 1px;
  height: 16px;
  background-color: rgba(255, 255, 255, 0.1);
}

@media (min-width: 768px) {
  .header-divider {
    display: block;
  }
}

/* 按钮样式 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 0.375rem;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-primary {
  background-color: hsl(var(--primary));
  color: white;
  padding: 0 2.3rem;
  height: 40px;
  font-weight: 700;
}

.btn-primary:hover {
  background-color: hsl(var(--primary-hover));
}

.btn-primary svg {
  width: 16px;
  height: 16px;
  transition: transform 0.2s ease;
}

.btn-primary:hover svg {
  transform: translateX(4px);
}

/* 移动端菜单按钮 */
.mobile-menu-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 0.375rem;
  transition: background-color 0.2s ease;
}

.mobile-menu-btn:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.mobile-menu-btn svg {
  width: 24px;
  height: 24px;
  pointer-events: none;
}

@media (min-width: 1024px) {
  .mobile-menu-btn {
    display: none;
  }
}

/* 移动端菜单 */
.mobile-menu {
  display: none;
  position: fixed;
  top: 80px;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: hsl(var(--background));
  z-index: 40;
  padding: 2.3rem;
  overflow-y: auto;
}

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

.mobile-nav-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.mobile-nav-link {
  display: block;
  padding: 1rem;
  font-size: 1rem;
  font-weight: 500;
  color: hsl(var(--foreground));
  border-radius: 0.5rem;
  transition: all 0.2s ease;
}

.mobile-nav-link:hover {
  background-color: hsl(var(--secondary));
}

.mobile-nav-link.active {
  color: hsl(var(--accent));
  font-weight: 600;
  background-color: hsl(var(--secondary));
}

/* 头部占位 */
.header-spacer {
  height: 80px;
}

/* ============================================
   底部样式 - Footer
   ============================================ */
.site-footer {
  background-color: hsl(var(--card));
  color: hsl(0deg 0% 100%);
  border-top: 1px solid hsl(var(--border));
  margin-top: auto;
  position: relative;
}

.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, hsl(var(--primary)), transparent);
  opacity: 0.3;
}

.footer-inner {
  padding: 4rem 1.5rem;
}

@media (min-width: 1024px) {
  .footer-inner {
    padding: 4rem;
  }
}

/* 底部链接网格 */
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  margin-bottom: 4rem;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .footer-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.footer-column {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.footer-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: hsl(0deg 0% 100%);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-link {
  font-size: 0.875rem;
  color: hsl(0deg 0% 84.2%);
  transition: color 0.2s ease;
}

.footer-link:hover {
  color: hsl(var(--accent));
}

/* 分隔线 */
.footer-divider {
  width: 100%;
  height: 1px;
  background-color: hsl(var(--border));
  opacity: 0.5;
  margin-bottom: 3rem;
}

/* 底部信息区 */
.footer-bottom {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

@media (min-width: 1024px) {
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

.footer-brand {
  max-width: 320px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.footer-logo svg {
  width: 28px;
  height: 28px;
  color: hsl(var(--primary));
}

.footer-logo-text {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.05em;
  text-transform: uppercase;
}

.footer-desc {
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
  line-height: 1.6;
}

/* 认证标志 */
.footer-certifications {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem;
}

@media (min-width: 1024px) {
  .footer-certifications {
    justify-content: flex-end;
  }
}

.cert-item {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  opacity: 0.6;
  transition: opacity 0.2s ease;
}

.cert-item:hover {
  opacity: 1;
}

.cert-item svg {
  width: 16px;
  height: 16px;
  color: hsl(var(--accent));
}

.cert-text {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: -0.05em;
}

/* 社交媒体 */
.footer-social {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

@media (min-width: 1024px) {
  .footer-social {
    justify-content: flex-end;
  }
}

.social-link {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: hsl(var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.social-link:hover {
  background-color: hsl(var(--primary));
}

.social-link svg {
  width: 20px;
  height: 20px;
  color: hsl(var(--muted-foreground));
  transition: color 0.2s ease;
}

.social-link:hover svg {
  color: white;
}

/* 版权信息 */
.footer-copyright {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid hsl(var(--border));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  font-size: 0.75rem;
  color: hsl(var(--muted-foreground));
}

@media (min-width: 768px) {
  .footer-copyright {
    flex-direction: row;
    justify-content: space-between;
  }
}

.footer-legal {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.footer-legal a:hover {
  color: hsl(var(--foreground));
}

/* ============================================
   大下拉面板 - Mega Dropdown
   ============================================ */

/* 覆盖产品中心 nav-item 为 static 定位以便面板全宽展开 */
.nav-item.has-mega {
  position: static;
}

/* 全宽下拉面板容器 */
.nav-mega-panel {
  position: absolute;
  top: 80px; /* 与 .site-header 同高 */
  left: 0;
  width: 100%;
  background-color: #ffffff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
  z-index: 200;
}

.nav-item.has-mega:hover .nav-mega-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* 面板内容区（最大宽 1280px 居中，与 page-container 一致） */
.nav-mega-inner {
  display: flex;
  width: 100%;
  max-width: 1700px;
  margin: 0 auto;
  padding: 0 4rem;
  min-height: 400px;
  position: relative;
}

/* 第一列：分类标题列 */
.nav-mega-col-title {
  width: 200px;
  flex-shrink: 0;
  border-right: 1px solid #f0f0f0;
  padding: 36px 20px 36px 0;
}

.nav-mega-col-title h3 {
  font-size: 22px;
  font-weight: 700;
  color: #111;
  border-bottom: 2px solid #e53e3e;
  padding-bottom: 10px;
  display: inline-block;
}

/* 二级栏目容器 */
.nav-mega-col-secondary {
  width: 200px;
  flex-shrink: 0;
  border-right: 1px solid #f0f0f0;
  padding: 36px 20px;
  position: relative;
}

.nav-mega-secondary-list {
  list-style: none;
}

.nav-mega-secondary-item {
  margin-bottom: 18px;
}

.nav-mega-secondary-link {
  text-decoration: none;
  color: #222;
  font-size: 15px;
  font-weight: 600;
  display: block;
  padding: 8px 0;
  cursor: pointer;
  transition: color 0.15s ease;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  font-family: inherit;
}

.nav-mega-secondary-link:hover,
.nav-mega-secondary-link.active {
  color: #3e96e5;
}

/* 嵌套的三级菜单 - 相对于 nav-mega-col-secondary 定位到右边 */
.nav-mega-tertiary-list {
  position: absolute;
  left: 100%; /* 相对于二级列的右边缘 */
  top: 0;
  width: 260px;
  height: 100%;
  list-style: none;
  background: #fff;
  padding: 36px 28px;
  border-right: 1px solid #f0f0f0;
  display: none;
  z-index: 10;
}

.nav-mega-secondary-item:hover .nav-mega-tertiary-list,
.nav-mega-secondary-item.active .nav-mega-tertiary-list {
  display: block;
}

.nav-mega-tertiary-item {
  margin-bottom: 16px;
}

.nav-mega-tertiary-link {
  text-decoration: none;
  color: #555;
  font-size: 14px;
  display: block;
  padding: 4px 0;
  cursor: pointer;
  transition: color 0.15s ease, font-weight 0.15s ease;
}

.nav-mega-tertiary-link:hover,
.nav-mega-tertiary-link.active {
  color: #3e96e5;
  font-weight: 600;
}

/* 第三列：三级菜单占位列 */
.nav-mega-col-tertiary {
  width: 260px;
  flex-shrink: 0;
  border-right: 1px solid #f0f0f0;
  padding: 36px 28px;
}

/* 第四列：预览区 */
.nav-mega-col-preview {
  width: 360px;
  flex-shrink: 0;
  padding: 36px 40px;
  display: flex;
  align-items: flex-start;
  gap: 20px;
}

/* 第四列：产品预览区 */
.nav-mega-col-preview {
  flex: 1;
  padding: 36px 40px;
  display: flex;
  align-items: flex-start;
  gap: 32px;
}

.nav-mega-product-img-wrap {
  flex-shrink: 0;
}

.nav-mega-product-img {
  width: 220px;
  height: 220px;
  background-color: #f7f7f7;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #eee;
  overflow: hidden;
}

.nav-mega-product-img img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
}

.nav-mega-product-info {
  margin-left: 20px;
  max-width: 360px;
}

.nav-mega-product-title {
  font-size: 18px;
  font-weight: 700;
  color: #111;
  margin-bottom: 14px;
}

.nav-mega-product-desc {
  font-size: 13px;
  line-height: 1.8;
  color: #666;
  margin-bottom: 24px;
}

.nav-mega-learn-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background-color: #3e96e5;
  color: #fff;
  border: none;
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.2s ease;
  font-family: inherit;
}

.nav-mega-learn-btn:hover {
  background-color: #3e96e5;
}

.nav-mega-learn-btn-icon {
  width: 22px;
  height: 22px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

/* 关闭按钮 */
.nav-mega-close {
  position: absolute;
  top: 16px;
  right: 0;
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: #444;
  line-height: 1;
  padding: 4px 8px;
  transition: color 0.15s ease;
}

.nav-mega-close:hover {
  color: #e53e3e;
}

/* ============================================
   移动端多级菜单 - Mobile Submenu
   ============================================ */

/* 含子菜单的 li 条目 */
.mobile-nav-item {
  width: 100%;
}

/* 一级条目行：链接 + 箭头按钮横向排列 */
.mobile-nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 0.5rem;
  transition: background-color 0.2s ease;
}

.mobile-nav-row:hover {
  background-color: hsl(var(--secondary));
}

/* 含子菜单时，一级链接不独占整行，让箭头按钮并排 */
.mobile-nav-item.has-sub > .mobile-nav-row > .mobile-nav-link {
  flex: 1;
  border-radius: 0.5rem 0 0 0.5rem;
}

/* 展开/收起箭头按钮 */
.mobile-sub-toggle {
  flex-shrink: 0;
  width: 44px;
  height: 52px; /* 与 .mobile-nav-link padding 对齐 */
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0 0.5rem 0.5rem 0;
  color: hsl(var(--muted-foreground));
  transition: background-color 0.2s ease, color 0.2s ease;
}

.mobile-sub-toggle:hover {
  color: hsl(var(--accent));
}

.mobile-sub-toggle svg {
  width: 18px;
  height: 18px;
  transition: transform 0.25s ease;
}

/* 展开时箭头旋转 */
.mobile-nav-item.has-sub.open > .mobile-nav-row > .mobile-sub-toggle svg {
  transform: rotate(180deg);
}

/* 二级子菜单列表 - 默认折叠 */
.mobile-sub-list {
  list-style: none;
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.3s ease;
  padding-left: 1rem;
}

/* 展开状态 */
.mobile-nav-item.has-sub.open > .mobile-sub-list {
  max-height: 400px; /* 足够容纳子项的安全值 */
}

/* 二级子菜单链接 */
.mobile-sub-link {
  display: block;
  padding: 0.65rem 1rem;
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
  border-radius: 0.375rem;
  transition: all 0.2s ease;
  position: relative;
}

.mobile-sub-link::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 0;
  background-color: hsl(var(--accent));
  border-radius: 2px;
  transition: height 0.2s ease;
}

.mobile-sub-link:hover {
  color: hsl(var(--accent));
  background-color: hsl(var(--secondary));
}

.mobile-sub-link:hover::before {
  height: 60%;
}

/* 第三级子菜单 */
.mobile-nav-item.has-sub-2 {
  width: 100%;
}

.mobile-nav-item.has-sub-2 > .mobile-nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-left: 0.5rem;
  border-radius: 0.5rem;
  transition: background-color 0.2s ease;
}

.mobile-nav-item.has-sub-2 > .mobile-nav-row:hover {
  background-color: hsl(var(--secondary));
}

.mobile-sub-toggle-2 {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: hsl(var(--muted-foreground));
  transition: color 0.2s ease;
}

.mobile-sub-toggle-2:hover {
  color: hsl(var(--accent));
}

.mobile-sub-toggle-2 svg {
  width: 16px;
  height: 16px;
  transition: transform 0.25s ease;
}

.mobile-nav-item.has-sub-2.open > .mobile-nav-row > .mobile-sub-toggle-2 svg {
  transform: rotate(180deg);
}

.mobile-sub-list-2 {
  list-style: none;
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.3s ease;
  padding-left: 1.5rem;
}

.mobile-nav-item.has-sub-2.open > .mobile-sub-list-2 {
  max-height: 300px;
}

.mobile-sub-link-2 {
  display: block;
  padding: 0.5rem 1rem;
  font-size: 0.8125rem;
  color: hsl(var(--muted-foreground));
  border-radius: 0.375rem;
  transition: all 0.2s ease;
  position: relative;
}

.mobile-sub-link-2::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 2px;
  height: 0;
  background-color: hsl(var(--accent));
  border-radius: 2px;
  transition: height 0.2s ease;
}

.mobile-sub-link-2:hover {
  color: hsl(var(--accent));
  background-color: hsl(var(--secondary));
}

.mobile-sub-link-2:hover::before {
  height: 50%;
}

@media (max-width: 767px) {
  .btn-primary {
    display: none;
  }
}