/**
 * ============================================
 *  工业毛刷一站式数字化服务平台 — 全局公共样式
 *  配色体系: 主色#0a2540, 辅助蓝#1e3a5f, hover亮蓝#3b82f6
 * ============================================
 */

/* ---------- 全局平滑滚动 ---------- */
html {
  scroll-behavior: smooth;
}

/* ---------- 滚动动画 — 进入视口时淡入上移 ---------- */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.animate-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* 延迟动画 — 用于卡片依次入场 */
.animate-delay-1 { transition-delay: 0.1s; }
.animate-delay-2 { transition-delay: 0.2s; }
.animate-delay-3 { transition-delay: 0.3s; }
.animate-delay-4 { transition-delay: 0.4s; }

/* ---------- 优势卡片悬浮效果 ---------- */
.advantage-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.advantage-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(10, 37, 64, 0.15);
}

/* ---------- 产品卡片悬浮效果 ---------- */
.product-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(10, 37, 64, 0.15);
}

/* ---------- 场景卡片悬浮效果 ---------- */
.scene-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.scene-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(10, 37, 64, 0.15);
}

/* ---------- CTA 按钮脉冲动画（吸引用户注意） ---------- */
@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4);
  }
  50% {
    box-shadow: 0 0 0 16px rgba(59, 130, 246, 0);
  }
}
.cta-pulse {
  animation: pulse-glow 2s infinite;
}

/* ---------- 图标容器（优势/产品/场景通用） ---------- */
.icon-wrapper {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: #0a2540;
}
.icon-wrapper svg {
  width: 28px;
  height: 28px;
  stroke: #ffffff;
  fill: none;
  stroke-width: 2;
}
.icon-wrapper .fill-icon {
  fill: #ffffff;
  stroke: none;
}

/* ---------- 底部分隔线装饰 ---------- */
.section-divider {
  width: 60px;
  height: 3px;
  background: #3b82f6;
  border-radius: 2px;
  margin: 0 auto;
}

/* ---------- 移动端导航菜单动画 ---------- */
#mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, opacity 0.3s ease;
  opacity: 0;
}
#mobile-menu.open {
  max-height: 500px;
  opacity: 1;
}

/* ---------- 滚动时导航栏阴影 ---------- */
#navbar {
  transition: box-shadow 0.3s ease, background-color 0.3s ease;
  background-color: rgba(10, 37, 64, 0.95);
  backdrop-filter: blur(8px);
}
#navbar.scrolled {
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

/* ---------- 当前激活的导航菜单项 ---------- */
.nav-link-active {
  color: #3b82f6 !important;
  position: relative;
}
.nav-link-active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 2px;
  background: #3b82f6;
  border-radius: 1px;
}

/* ---------- Hero区域渐变叠加层 ---------- */
.hero-overlay {
  background: linear-gradient(
    135deg,
    rgba(10, 37, 64, 0.88) 0%,
    rgba(10, 37, 64, 0.75) 50%,
    rgba(30, 58, 95, 0.7) 100%
  );
}

/* ---------- 用户反馈 — prefers-reduced-motion 遵循系统无障碍设置 ---------- */
@media (prefers-reduced-motion: reduce) {
  .animate-on-scroll,
  .advantage-card,
  .product-card,
  .scene-card,
  .cta-pulse {
    transition: none !important;
    animation: none !important;
    transform: none !important;
  }
  html {
    scroll-behavior: auto;
  }
}
