/*! ============================================================
 *  Valverz 主题层 —— 现代工业蓝灰配色 + 深色模式 + 七项交互组件样式
 *  叠加在 style.css 之上，不修改任何既有结构与 SEO。
 *  安全降级：本文件未加载时，页面保持原样。
 * ============================================================ */

/* ---------- 配色变量（浅色为默认） ---------- */
:root {
  --vz-primary:   #16385f;   /* 深钢蓝 主色 */
  --vz-primary-2: #2f7fd1;   /* 亮蓝 辅色/链接 */
  --vz-accent:    #f5a623;   /* 琥珀 强调 */
  --vz-text:      #2c3038;
  --vz-muted:     #6b7280;
  --vz-line:      #e6e9ef;
  --vz-bg:        #ffffff;
  --vz-bg-soft:   #f4f7fb;
  --vz-card:      #ffffff;
  --vz-header-bg: #ffffff;
  --vz-footer-bg: #1b2330;
  --vz-footer-text:#c2cad6;
  --vz-shadow:    0 10px 30px rgba(22,56,95,.12);
}
/* 深色模式 */
:root[data-theme="dark"] {
  --vz-primary:   #3b82c4;
  --vz-primary-2: #5aa9ef;
  --vz-accent:    #ffb43b;
  --vz-text:      #e7ebf2;
  --vz-muted:     #9aa3b2;
  --vz-line:      #2a3340;
  --vz-bg:        #12161c;
  --vz-bg-soft:   #171c24;
  --vz-card:      #1b212b;
  --vz-header-bg: #161b22;
  --vz-footer-bg: #0d1117;
  --vz-footer-text:#9aa3b2;
  --vz-shadow:    0 10px 30px rgba(0,0,0,.45);
}

/* ---------- 基础配色覆盖（浅/深共用变量） ---------- */
body { background: var(--vz-bg); color: var(--vz-text); transition: background .35s ease, color .35s ease; }
a { color: var(--vz-primary-2); }
a:hover { color: var(--vz-primary); }
.header, .top-nav, .top { background: var(--vz-header-bg); transition: background .35s ease; }
.nav-list1 li a:hover, .nav-list1 li.active > a,
.nav-list2 li a:hover { color: var(--vz-primary); }
.header .right, .btn, .more a, .box-product .note span,
.title-product b, .title-news b, .title-about b { color: var(--vz-primary); }
.title-product b, .title-news b, .title-about b { border-color: var(--vz-accent) !important; }
.btn, .more a { background: var(--vz-primary); }
.btn:hover, .more a:hover { background: var(--vz-primary-2); }
.box, .wrapper, .content { background: var(--vz-bg); }
.box-product .item, .news .item, .wrap-right .item,
.layui-card, .item { background: var(--vz-card); }
.footer { background: var(--vz-footer-bg); color: var(--vz-footer-text); }
.footer a { color: var(--vz-footer-text); }
.footer .title-foot b { color: #fff; }
.box-product .note span { color: var(--vz-accent); font-weight: 700; }

/* 深色模式：图片轻微压暗，减少刺眼 */
:root[data-theme="dark"] img { filter: brightness(.92) contrast(1.02); }
:root[data-theme="dark"] .banner, :root[data-theme="dark"] .slickbanner { filter: brightness(.8); }

/* ===================== 1) Hero 视差光效 ===================== */
.vz-hero-light {
  position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background:
    radial-gradient(620px 420px at 22% 18%, rgba(63,160,255,.30), transparent 60%),
    radial-gradient(520px 360px at 82% 30%, rgba(245,166,35,.20), transparent 62%),
    radial-gradient(900px 600px at 50% 120%, rgba(22,56,95,.28), transparent 70%);
  mix-blend-mode: screen;
  opacity: 0; transition: opacity .8s ease;
  will-change: transform;
}
.banner:hover .vz-hero-light, .vz-hero-light.vz-on { opacity: 1; }
.vz-hero-grain {
  position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: .07;
  background-image: radial-gradient(rgba(255,255,255,.8) 1px, transparent 1px);
  background-size: 4px 4px;
}
.banner { overflow: hidden; }

/* ===================== 2) 滚动累加数据数字带 ===================== */
.vz-stats {
  background: linear-gradient(120deg, var(--vz-primary), var(--vz-primary-2));
  color: #fff; padding: 38px 0; position: relative; z-index: 3;
}
.vz-stats .container { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 18px; }
.vz-stat { flex: 1 1 160px; text-align: center; padding: 6px 10px; }
.vz-stat .num {
  font-size: 40px; font-weight: 800; line-height: 1.1; color: #fff;
  font-variant-numeric: tabular-nums; text-shadow: 0 4px 18px rgba(0,0,0,.18);
}
.vz-stat .num .suf { font-size: 20px; font-weight: 700; color: var(--vz-accent); margin-left: 2px; }
.vz-stat .lab { margin-top: 6px; font-size: 15px; letter-spacing: .5px; opacity: .92; }
@media (max-width: 768px){ .vz-stat .num{font-size:30px;} .vz-stat{flex-basis:45%;} }

/* ===================== 3) 认证项目 Tab 切换 ===================== */
.vz-cert-tabs { margin-top: 26px; }
.vz-cert-nav {
  display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px;
  border-bottom: 2px solid var(--vz-line); padding-bottom: 10px;
}
.vz-cert-nav button {
  border: 1px solid var(--vz-line); background: var(--vz-bg-soft); color: var(--vz-text);
  padding: 9px 16px; border-radius: 22px; cursor: pointer; font-size: 14px;
  transition: all .25s ease; white-space: nowrap;
}
.vz-cert-nav button:hover { border-color: var(--vz-primary-2); color: var(--vz-primary); }
.vz-cert-nav button.active {
  background: var(--vz-primary); color: #fff; border-color: var(--vz-primary);
  box-shadow: 0 6px 16px rgba(22,56,95,.25);
}
.vz-cert-panel { display: none; }
.vz-cert-panel.active { display: block; animation: vzFade .5s ease; }
@keyframes vzFade { from{opacity:0;transform:translateY(10px);} to{opacity:1;transform:none;} }
/* 横向滚动条（类目多时） */
.vz-cert-nav::-webkit-scrollbar{height:5px;}
.vz-cert-nav::-webkit-scrollbar-thumb{background:var(--vz-line);border-radius:4px;}

/* ===================== 4) 常见问题手风琴 ===================== */
.vz-faq { max-width: 880px; margin: 0 auto; }
.vz-faq-item { border: 1px solid var(--vz-line); border-radius: 10px; margin-bottom: 12px; overflow: hidden; background: var(--vz-card); }
.vz-faq-q {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 20px; cursor: pointer; font-size: 16px; font-weight: 600; color: var(--vz-text);
  transition: background .2s ease;
}
.vz-faq-q:hover { background: var(--vz-bg-soft); }
.vz-faq-q .ico { flex: 0 0 auto; width: 22px; height: 22px; position: relative; transition: transform .3s ease; }
.vz-faq-q .ico:before, .vz-faq-q .ico:after {
  content: ""; position: absolute; background: var(--vz-primary-2); border-radius: 2px;
  top: 50%; left: 50%; transform: translate(-50%,-50%);
}
.vz-faq-q .ico:before { width: 14px; height: 2px; }
.vz-faq-q .ico:after { width: 2px; height: 14px; transition: transform .3s ease; }
.vz-faq-item.open .vz-faq-q .ico:after { transform: translate(-50%,-50%) scaleY(0); }
.vz-faq-a { max-height: 0; overflow: hidden; transition: max-height .35s ease; }
.vz-faq-a .inner { padding: 0 20px 18px; color: var(--vz-muted); line-height: 1.8; font-size: 15px; }
.vz-faq-a .inner a { color: var(--vz-primary-2); }

/* ===================== 5) 图片点击放大（fancybox 触发） ===================== */
.vz-zoom { cursor: zoom-in; }

/* ===================== 6) 深色模式开关 ===================== */
.vz-dark-toggle {
  position: fixed; right: 22px; bottom: 82px; width: 46px; height: 46px; border-radius: 50%;
  background: var(--vz-card); color: var(--vz-primary); display: flex; align-items: center; justify-content: center;
  cursor: pointer; z-index: 9998; box-shadow: var(--vz-shadow); border: 1px solid var(--vz-line);
  transition: transform .25s ease, background .25s ease;
}
.vz-dark-toggle:hover { transform: translateY(-3px) rotate(12deg); }
.vz-dark-toggle svg { width: 22px; height: 22px; }

/* ===================== 7) 站内搜索浮层 ===================== */
.vz-search-btn {
  position: fixed; right: 22px; bottom: 136px; width: 46px; height: 46px; border-radius: 50%;
  background: var(--vz-primary); color: #fff; display: flex; align-items: center; justify-content: center;
  cursor: pointer; z-index: 9998; box-shadow: var(--vz-shadow);
  transition: transform .25s ease, background .25s ease;
}
.vz-search-btn:hover { transform: translateY(-3px); background: var(--vz-primary-2); }
.vz-search-btn svg { width: 21px; height: 21px; }
.vz-search {
  position: fixed; inset: 0; z-index: 100000; display: none;
  background: rgba(10,16,26,.62); backdrop-filter: blur(4px);
  align-items: flex-start; justify-content: center; padding-top: 12vh;
}
.vz-search.open { display: flex; }
.vz-search-box {
  width: min(680px, 92vw); background: var(--vz-card); border-radius: 14px; overflow: hidden;
  box-shadow: 0 30px 80px rgba(0,0,0,.4); animation: vzPop .25s ease;
}
@keyframes vzPop { from{opacity:0;transform:translateY(-14px) scale(.98);} to{opacity:1;transform:none;} }
.vz-search-head { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--vz-line); }
.vz-search-head svg { width: 20px; height: 20px; color: var(--vz-muted); flex: 0 0 auto; }
.vz-search-head input {
  flex: 1; border: 0; outline: 0; font-size: 17px; background: transparent; color: var(--vz-text);
}
.vz-search-head .close { cursor: pointer; color: var(--vz-muted); font-size: 22px; line-height: 1; padding: 0 4px; }
.vz-search-res { max-height: 56vh; overflow: auto; padding: 6px 0; }
.vz-search-res .it { display: block; padding: 12px 18px; border-bottom: 1px solid var(--vz-line); color: var(--vz-text); text-decoration: none; }
.vz-search-res .it:hover { background: var(--vz-bg-soft); }
.vz-search-res .it .t { font-weight: 600; }
.vz-search-res .it .d { font-size: 13px; color: var(--vz-muted); margin-top: 3px; }
.vz-search-res .it .k { color: var(--vz-accent); }
.vz-search-res .empty { padding: 22px 18px; color: var(--vz-muted); text-align: center; }
.vz-search-foot { padding: 8px 16px; font-size: 12px; color: var(--vz-muted); border-top: 1px solid var(--vz-line); }
