/* ==========================================================
   豪弘电子商务集团官网 - 样式表
   主色调取自切图：蓝色 #1e57c3
   ========================================================== */

/* ---------- 基础 ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --blue: #1e57c3;
  --blue-dark: #16448f;
  --blue-light: #3a7ce0;
  --text: #333333;
  --footer-bg: #1e2b3e;
}

body {
  font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", "Helvetica Neue", Arial, sans-serif;
  /* 科技感底色：氛围光晕 + 微网格（切图为不透明图片，只在留白处可见） */
  background:
    radial-gradient(1100px 520px at 88% -60px, rgba(58, 124, 224, 0.07), transparent 65%),
    radial-gradient(900px 500px at -8% 38%, rgba(30, 87, 195, 0.05), transparent 65%),
    linear-gradient(rgba(30, 87, 195, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30, 87, 195, 0.035) 1px, transparent 1px),
    #ffffff;
  background-size: auto, auto, 46px 46px, 46px 46px, auto;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }

/* ---------- 顶部导航 ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  /* 玻璃拟态导航 */
  background: rgba(255, 255, 255, 0.7);
  -webkit-backdrop-filter: blur(16px) saturate(1.5);
  backdrop-filter: blur(16px) saturate(1.5);
  box-shadow: 0 2px 10px rgba(30, 60, 120, 0.06);
  transition: box-shadow .3s ease, background .3s ease;
}
/* 底部流光渐变线（滚动后亮起） */
.topbar::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(30, 87, 195, 0.35) 30%, rgba(34, 211, 238, 0.45) 70%, transparent);
  opacity: 0;
  transition: opacity .4s ease;
}
.topbar.scrolled { box-shadow: 0 6px 22px rgba(30, 60, 120, 0.14); }
.topbar.scrolled::after { opacity: 1; }

.topbar-inner {
  max-width: 1400px;
  margin: 0 auto;
  height: 72px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand { display: flex; align-items: center; flex-shrink: 0; }
.brand img { height: 50px; width: auto; }

.main-nav { display: flex; align-items: center; gap: 6px; }

.nav-link {
  position: relative;
  padding: 10px 14px;
  font-size: 16px;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
  transition: color .25s ease;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 2px;
  width: 0;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--blue), #22d3ee);
  box-shadow: 0 0 8px rgba(58, 124, 224, 0.7);
  transform: translateX(-50%);
  transition: width .3s ease;
}
.nav-link:hover { color: var(--blue); }
.nav-link:hover::after { width: 22px; }
.nav-link.active { color: var(--blue); font-weight: 700; }
.nav-link.active::after { width: 26px; }

/* 移动端菜单内的电话项，桌面隐藏 */
.nav-phone { display: none; }

.hotline {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  font-size: 17px;
  font-weight: 700;
  color: var(--blue);
  text-decoration: none;
  white-space: nowrap;
  transition: color .25s ease;
}
.hotline:hover { color: var(--blue-dark); }
.hotline img { width: 20px; height: 20px; }

/* 汉堡按钮 */
.menu-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  padding: 9px;
  border: none;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
}
.menu-btn span {
  display: block;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: #2b3a55;
  transition: transform .3s ease, opacity .3s ease;
}
.menu-btn.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-btn.open span:nth-child(2) { opacity: 0; }
.menu-btn.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- 页面切换 ---------- */
.page { display: none; }
.page.active {
  display: block;
  position: relative;
  overflow: hidden;
  animation: pageIn .55s ease both;
}

@keyframes pageIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}

/* ---------- 切图拼接 ---------- */
.slice {
  background: #fff;
  scroll-margin-top: 84px;
}

/* 切图之间的空白间隔块 */
.slice-gap { height: 70px; }

.slice img { width: 100%; height: auto; }

/* 全宽横幅（1920px 切图） */
.slice.full { position: relative; }

/* 内容切图（1200px，居中拼接） */
.slice.content { max-width: 1200px; margin: 0 auto; }

/* ---------- 首页滚动提示 ---------- */
.scroll-hint {
  position: absolute;
  left: 50%;
  bottom: 34px;
  width: 32px;
  height: 50px;
  margin-left: -16px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 16px;
  background: transparent;
  cursor: pointer;
  outline: none;
}
.scroll-hint:hover { background: rgba(255, 255, 255, 0.12); }
/* 外圈虚线光环缓慢旋转 */
.scroll-hint::after {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 20px;
  border: 1px dashed rgba(255, 255, 255, 0.55);
  animation: fxSpin 9s linear infinite;
}
.scroll-hint span {
  position: absolute;
  left: 50%;
  top: 8px;
  width: 5px;
  height: 11px;
  margin-left: -2.5px;
  border-radius: 3px;
  background: #fff;
  animation: wheel 1.8s ease-in-out infinite;
}
@keyframes wheel {
  0%   { opacity: 0; transform: translateY(0); }
  35%  { opacity: 1; }
  100% { opacity: 0; transform: translateY(17px); }
}

/* ---------- 科技感装饰层 ---------- */
/* 粒子网络画布：screen 混合，只在深色横幅/页脚上显现 */
.fx-layer {
  position: fixed;
  inset: 0;
  z-index: 400;
  pointer-events: none;
  mix-blend-mode: screen;
}

/* 鼠标跟随光晕（仅桌面端） */
.fx-cursor {
  position: fixed;
  left: 0;
  top: 0;
  width: 520px;
  height: 520px;
  margin: -260px 0 0 -260px;
  border-radius: 50%;
  z-index: 405;
  pointer-events: none;
  mix-blend-mode: screen;
  background: radial-gradient(circle, rgba(58, 124, 224, 0.16) 0%, rgba(58, 124, 224, 0.05) 42%, transparent 70%);
  opacity: 0;
  transition: opacity .8s ease;
  will-change: transform;
}
html.fx-ready .fx-cursor { opacity: 1; }
@media (hover: none) { .fx-cursor { display: none; } }

/* 顶部滚动进度条 */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  z-index: 1200;
  pointer-events: none;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, #1e57c3, #3a7ce0, #22d3ee);
  box-shadow: 0 0 10px rgba(58, 124, 224, 0.65);
}

@keyframes fxSpin { to { transform: rotate(360deg); } }

/* ---------- 底部 ---------- */
.footer { background: var(--footer-bg); }
.footer-img { width: 100%; height: auto; }
.footer-text { display: none; }

/* ---------- 悬浮工具 ---------- */
.side-tools {
  position: fixed;
  right: 22px;
  bottom: 96px;
  z-index: 900;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tool {
  position: relative;
  width: 52px;
  height: 52px;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .3s ease, box-shadow .3s ease, opacity .3s ease, visibility .3s;
}
.tool:hover { transform: translateY(-3px); }

/* 电话按钮：朴素样式，无光环无呼吸动画 */
.tool-call {
  background: linear-gradient(135deg, var(--blue-light), var(--blue));
  box-shadow: 0 8px 22px rgba(30, 87, 195, 0.4);
}
.tool-call img { width: 24px; height: 24px; filter: brightness(0) invert(1); }

.tool-top {
  background: #fff;
  box-shadow: 0 6px 18px rgba(20, 40, 80, 0.18);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
}
.tool-top.show { opacity: 1; visibility: visible; transform: none; }
.arrow-up {
  width: 10px;
  height: 10px;
  margin-top: 5px;
  border-top: 2.5px solid var(--blue);
  border-left: 2.5px solid var(--blue);
  transform: rotate(45deg);
}

/* ---------- 响应式：平板 / 手机 ---------- */
@media (max-width: 900px) {
  .menu-btn { display: flex; }
  .hotline { display: none; }

  .main-nav {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    max-height: calc(100vh - 72px);
    overflow-y: auto;
    padding: 8px 0 14px;
    background: #fff;
    box-shadow: 0 14px 26px rgba(10, 30, 70, 0.14);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity .3s ease, transform .3s ease, visibility .3s;
  }
  .main-nav.open { opacity: 1; visibility: visible; transform: none; }

  .nav-link {
    padding: 14px 28px;
    font-size: 16px;
    border-bottom: 1px solid #f0f3f8;
  }
  .nav-link::after { display: none; }
  .nav-link.active { background: #f2f6fd; border-left: 3px solid var(--blue); }

  .nav-phone {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 28px;
    color: var(--blue);
    font-weight: 700;
    font-size: 16px;
    text-decoration: none;
  }
  .nav-phone img { width: 18px; height: 18px; }
}

@media (max-width: 640px) {
  /* 移动端切图间隔收紧 */
  .slice-gap { height: 20px; }

  /* 首页滚动提示隐藏 */
  .scroll-hint { display: none; }

  /* 底部切图在手机上文字不可读，改用文字版 */
  .footer-img { display: none; }
  .footer-text {
    display: block;
    padding: 26px 20px;
    text-align: center;
    color: #cdd6e4;
    font-size: 13px;
    line-height: 1.8;
  }
  .footer-bar {
    height: 1px;
    background: rgba(255, 255, 255, 0.16);
    margin: 14px auto;
    max-width: 320px;
  }
  .footer-copy { color: #9fb0c8; font-size: 12px; }
}

/* ---------- 减少动效偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
