/* ===== 海硕官网 - 工业蓝主题样式 ===== */

:root {
  --brand-blue: #003580;
  --brand-blue-deep: #002663;
  --brand-light: #0077c8;
  --brand-sea: #00a3e0;
  --brand-orange: #ff6b00;
  --brand-orange-light: #ff8533;
  --bg-light: #f4f6f8;
  --bg-dark: #0f172a;
  --text-dark: #1a1a1a;
  --text-mid: #4b5563;
  --text-light: #94a3b8;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  color: var(--text-dark);
  line-height: 1.7;
  background: #fff;
  overflow-x: hidden;
}

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

a { text-decoration: none; color: inherit; transition: color 0.3s; }

/* ===== 顶部联系条 ===== */
.top-bar {
  background: var(--brand-blue-deep);
  color: rgba(255, 255, 255, 0.85);
  font-size: 13px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.top-bar a:hover { color: var(--brand-orange-light); }

/* ===== 主导航栏 ===== */
.main-nav {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: all 0.3s;
}
.nav-link {
  position: relative;
  padding: 28px 0;
  display: inline-block;
  color: var(--text-dark);
  font-weight: 500;
  font-size: 15px;
  transition: color 0.3s;
}
.nav-link:hover { color: var(--brand-blue); }
.nav-link.active { color: var(--brand-blue); }
.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 30px;
  height: 3px;
  background: var(--brand-orange);
  border-radius: 2px;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 30px;
  height: 3px;
  background: var(--brand-orange);
  border-radius: 2px;
  transition: transform 0.3s;
}
.nav-link:hover::after { transform: translateX(-50%) scaleX(1); }

/* 二级菜单 */
.nav-dropdown {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: white;
  min-width: 200px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
  padding: 8px 0;
}
.nav-item:hover .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}
.nav-dropdown a {
  display: block;
  padding: 10px 20px;
  font-size: 14px;
  color: var(--text-mid);
  white-space: nowrap;
  transition: all 0.2s;
}
.nav-dropdown a:hover {
  background: var(--bg-light);
  color: var(--brand-blue);
  padding-left: 26px;
}

/* ===== 通用按钮 ===== */
.btn {
  display: inline-block;
  padding: 12px 32px;
  font-weight: 600;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s;
  border: none;
  font-size: 15px;
  text-align: center;
}
.btn-primary {
  background: linear-gradient(135deg, var(--brand-orange), var(--brand-orange-light));
  color: white;
  box-shadow: 0 4px 14px rgba(255, 107, 0, 0.35);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(255, 107, 0, 0.5);
}
.btn-secondary {
  background: var(--brand-blue);
  color: white;
}
.btn-secondary:hover {
  background: var(--brand-blue-deep);
  transform: translateY(-2px);
}
.btn-outline {
  background: transparent;
  border: 2px solid white;
  color: white;
}
.btn-outline:hover {
  background: white;
  color: var(--brand-blue);
}

/* ===== 通用区块 ===== */
.section { padding: 80px 0; }
.section-sm { padding: 60px 0; }
.section-title {
  text-align: center;
  margin-bottom: 60px;
}
.section-title h2 {
  font-size: 36px;
  font-weight: 700;
  color: var(--brand-blue);
  margin-bottom: 16px;
  position: relative;
  display: inline-block;
}
.section-title h2::after {
  content: '';
  position: absolute;
  bottom: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--brand-blue), var(--brand-orange));
  border-radius: 2px;
}
.section-title p {
  color: var(--text-mid);
  font-size: 16px;
  margin-top: 24px;
}

/* ===== Hero / 首页大图 ===== */
.hero-slide {
  position: relative;
  height: 600px;
  background-size: cover;
  background-position: center;
}
.hero-slide::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 53, 128, 0.85) 0%, rgba(0, 119, 200, 0.4) 70%);
}
.hero-content {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  align-items: center;
  color: white;
}
.hero-content h1 {
  font-size: 56px;
  line-height: 1.2;
  font-weight: 800;
  margin-bottom: 20px;
}
.hero-content p {
  font-size: 20px;
  margin-bottom: 36px;
  opacity: 0.95;
  max-width: 600px;
}
.hero-content .highlight { color: var(--brand-orange); }

/* ===== 子页面 banner ===== */
.page-banner {
  position: relative;
  height: 320px;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}
.page-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0, 53, 128, 0.9), rgba(0, 119, 200, 0.7));
}
.page-banner-content {
  position: relative;
  z-index: 1;
  text-align: center;
}
.page-banner-content h1 {
  font-size: 44px;
  font-weight: 700;
  margin-bottom: 12px;
}
.page-banner-content .breadcrumb {
  font-size: 14px;
  opacity: 0.9;
}
.page-banner-content .breadcrumb a:hover { color: var(--brand-orange-light); }

/* ===== 卡片 ===== */
.card {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  transition: all 0.4s;
}
.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 53, 128, 0.15);
}
.card-img {
  position: relative;
  height: 240px;
  overflow: hidden;
  background: var(--bg-light);
}
.card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s;
}
.card:hover .card-img img { transform: scale(1.08); }
.card-body { padding: 24px; }
.card-body h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--brand-blue);
}
.card-body p {
  color: var(--text-mid);
  font-size: 14px;
  line-height: 1.7;
}

/* ===== 标签 ===== */
.tag {
  display: inline-block;
  padding: 4px 12px;
  font-size: 12px;
  background: rgba(0, 53, 128, 0.08);
  color: var(--brand-blue);
  border-radius: 100px;
  margin: 4px 6px 4px 0;
  font-weight: 500;
}
.tag-orange {
  background: rgba(255, 107, 0, 0.1);
  color: var(--brand-orange);
}

/* ===== 数字统计 ===== */
.stat-num {
  font-size: 56px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--brand-blue), var(--brand-sea));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}
.stat-label {
  font-size: 15px;
  color: var(--text-mid);
  margin-top: 8px;
}

/* ===== 特性图标 ===== */
.feature-icon {
  width: 72px;
  height: 72px;
  background: linear-gradient(135deg, var(--brand-blue), var(--brand-light));
  color: white;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  margin: 0 auto 24px;
  box-shadow: 0 8px 24px rgba(0, 53, 128, 0.25);
}
.feature-icon-orange {
  background: linear-gradient(135deg, var(--brand-orange), var(--brand-orange-light));
  box-shadow: 0 8px 24px rgba(255, 107, 0, 0.25);
}

/* ===== 时间线（发展历程） ===== */
.timeline {
  position: relative;
  padding: 40px 0;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--brand-blue), var(--brand-orange));
  transform: translateX(-50%);
}
.timeline-item {
  display: flex;
  margin-bottom: 60px;
  position: relative;
}
.timeline-item:nth-child(odd) { flex-direction: row-reverse; }
.timeline-item:nth-child(odd) .timeline-content { text-align: right; padding-right: 50px; }
.timeline-item:nth-child(even) .timeline-content { padding-left: 50px; }
.timeline-content {
  width: 50%;
  padding: 24px;
}
.timeline-content h4 {
  color: var(--brand-orange);
  font-size: 24px;
  margin-bottom: 8px;
}
.timeline-content p { color: var(--text-mid); }
.timeline-dot {
  position: absolute;
  left: 50%;
  top: 24px;
  width: 16px;
  height: 16px;
  background: var(--brand-orange);
  border: 4px solid white;
  border-radius: 50%;
  transform: translateX(-50%);
  box-shadow: 0 0 0 4px var(--brand-blue);
  z-index: 1;
}

/* ===== 客服浮窗 ===== */
.chat-trigger {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--brand-orange), var(--brand-orange-light));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(255, 107, 0, 0.4);
  z-index: 999;
  color: white;
  font-size: 28px;
  transition: all 0.3s;
  animation: pulse-orange 2s infinite;
}
.chat-trigger:hover { transform: scale(1.1); }

@keyframes pulse-orange {
  0%, 100% { box-shadow: 0 8px 24px rgba(255, 107, 0, 0.4), 0 0 0 0 rgba(255, 107, 0, 0.5); }
  50% { box-shadow: 0 8px 24px rgba(255, 107, 0, 0.4), 0 0 0 14px rgba(255, 107, 0, 0); }
}

.chat-panel {
  position: fixed;
  right: 24px;
  bottom: 100px;
  width: 360px;
  height: 520px;
  background: white;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  z-index: 998;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform-origin: bottom right;
}
.chat-header {
  background: linear-gradient(135deg, var(--brand-blue), var(--brand-light));
  color: white;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.chat-header h4 { font-size: 16px; font-weight: 600; }
.chat-header .status {
  font-size: 12px;
  opacity: 0.9;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}
.chat-header .status::before {
  content: '';
  width: 8px; height: 8px;
  background: #4ade80;
  border-radius: 50%;
  animation: blink 1.5s infinite;
}
@keyframes blink { 50% { opacity: 0.4; } }

.chat-body {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  background: var(--bg-light);
}
.chat-msg {
  margin-bottom: 12px;
  display: flex;
  gap: 8px;
}
.chat-msg.bot { justify-content: flex-start; }
.chat-msg.user { justify-content: flex-end; }
.chat-msg .bubble {
  max-width: 75%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.5;
}
.chat-msg.bot .bubble {
  background: white;
  color: var(--text-dark);
  border-top-left-radius: 4px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}
.chat-msg.user .bubble {
  background: var(--brand-blue);
  color: white;
  border-top-right-radius: 4px;
}
.chat-quick {
  padding: 12px 20px;
  background: white;
  border-top: 1px solid #e5e7eb;
}
.chat-quick-item {
  display: inline-block;
  padding: 6px 12px;
  margin: 4px 4px 4px 0;
  font-size: 12px;
  background: var(--bg-light);
  color: var(--brand-blue);
  border-radius: 100px;
  cursor: pointer;
  transition: all 0.2s;
}
.chat-quick-item:hover {
  background: var(--brand-blue);
  color: white;
}
.chat-input {
  display: flex;
  padding: 12px 16px;
  border-top: 1px solid #e5e7eb;
  background: white;
  gap: 8px;
}
.chat-input input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 14px;
  outline: none;
  transition: border 0.2s;
}
.chat-input input:focus { border-color: var(--brand-blue); }
.chat-input button {
  padding: 10px 16px;
  background: var(--brand-blue);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
}
.chat-input button:hover { background: var(--brand-blue-deep); }

/* ===== 页脚 ===== */
.site-footer {
  background: var(--bg-dark);
  color: rgba(255, 255, 255, 0.75);
  padding: 60px 0 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
}
.footer-col h3 {
  color: white;
  font-size: 18px;
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 12px;
}
.footer-col h3::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 36px;
  height: 3px;
  background: var(--brand-orange);
  border-radius: 2px;
}
.footer-col p { font-size: 14px; line-height: 2; }
.footer-col a { font-size: 14px; line-height: 2.2; display: block; }
.footer-col a:hover { color: var(--brand-orange); padding-left: 6px; }
.footer-col i { color: var(--brand-orange); margin-right: 8px; }
.footer-qr {
  display: flex;
  gap: 16px;
  margin-top: 12px;
}
.footer-qr-item { text-align: center; }
.footer-qr-item img {
  width: 100px; height: 100px;
  border-radius: 8px;
  background: white;
  padding: 6px;
}
.footer-qr-item p {
  margin-top: 8px;
  font-size: 12px;
}
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 20px 0;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
}
.footer-bottom a { color: rgba(255, 255, 255, 0.6); }
.footer-bottom a:hover { color: var(--brand-orange); }

.footer-bottom-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: center;
  gap: 20px;
}
.footer-bottom-grid .fb-left { text-align: left; }
.footer-bottom-grid .fb-center { text-align: center; }
.footer-bottom-grid .fb-right { text-align: right; }
.footer-bottom-grid .fb-dot { margin: 0 8px; opacity: 0.5; }

/* 公安备案 */
.fb-police {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.fb-police-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
  vertical-align: middle;
}

@media (max-width: 768px) {
  .footer-bottom-grid {
    grid-template-columns: 1fr;
    gap: 8px;
    text-align: center;
  }
  .footer-bottom-grid .fb-left,
  .footer-bottom-grid .fb-right,
  .footer-bottom-grid .fb-center { text-align: center; }
}

/* ===== 滚动动画 ===== */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease;
}
.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== 响应式 ===== */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero-content h1 { font-size: 42px; }
  .timeline::before { left: 20px; }
  .timeline-item, .timeline-item:nth-child(odd) { flex-direction: column; }
  .timeline-item .timeline-content,
  .timeline-item:nth-child(odd) .timeline-content {
    width: 100%;
    text-align: left;
    padding: 20px 20px 20px 60px;
  }
  .timeline-dot { left: 20px; }
}
@media (max-width: 768px) {
  .nav-links-desktop { display: none !important; }
  .top-bar .right-info { display: none; }
  .hero-content h1 { font-size: 32px; }
  .hero-content p { font-size: 16px; }
  .hero-slide { height: 480px; }
  .section { padding: 50px 0; }
  .section-title h2 { font-size: 28px; }
  .footer-grid { grid-template-columns: 1fr; }
  .page-banner { height: 220px; }
  .page-banner-content h1 { font-size: 32px; }
  .chat-panel { width: calc(100vw - 32px); right: 16px; }
}

/* 移动端菜单 */
.mobile-menu {
  position: fixed;
  top: 0; right: -100%;
  width: 280px;
  height: 100vh;
  background: white;
  z-index: 200;
  transition: right 0.3s;
  padding: 80px 24px 24px;
  box-shadow: -10px 0 40px rgba(0,0,0,0.1);
  overflow-y: auto;
}
.mobile-menu.open { right: 0; }
.mobile-menu a {
  display: block;
  padding: 14px 0;
  border-bottom: 1px solid #f1f5f9;
  font-weight: 500;
}
.mobile-menu-close {
  position: absolute;
  top: 24px; right: 24px;
  font-size: 24px;
  cursor: pointer;
}
.mobile-mask {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 199;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
}
.mobile-mask.open { opacity: 1; visibility: visible; }

/* 滚动条美化 */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: var(--brand-blue); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--brand-blue-deep); }

/* ===== 横版宽屏 Hero 海报（双层：模糊底 + 完整图，用 <img> 实现） ===== */
.hero-banner-slide {
  position: relative;
  height: min(72vh, 760px);
  min-height: 480px;
  overflow: hidden;
  background-color: #1a1a1a;
}

/* 底层：模糊放大同图（兜满四周不留白） */
.hero-banner-slide .hero-bg-blur {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: blur(40px) brightness(0.55) saturate(1.2);
  transform: scale(1.15);
  z-index: 0;
  display: block;
  pointer-events: none;
}

/* 上层：完整图（contain 不裁不变形） */
.hero-banner-slide .hero-bg-main {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  z-index: 1;
  display: block;
  pointer-events: none;
}

/* 底部按钮浮层 */
.hero-banner-actions {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  padding: 12px 24px;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(16px);
  border-radius: 100px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

@media (max-width: 1024px) {
  .hero-banner-slide { height: min(60vh, 520px); min-height: 380px; }
}

@media (max-width: 768px) {
  .hero-banner-slide { height: min(56vh, 440px); min-height: 320px; }
  .hero-banner-actions {
    bottom: 16px;
    padding: 8px 14px;
    gap: 8px;
  }
  .hero-banner-actions .btn {
    padding: 8px 16px !important;
    font-size: 12px !important;
  }
}

/* 工具类 */
.bg-pattern {
  background-color: #f4f6f8;
  background-image: radial-gradient(circle at 1px 1px, rgba(0,53,128,0.08) 1px, transparent 0);
  background-size: 24px 24px;
}
.gradient-text {
  background: linear-gradient(135deg, var(--brand-blue), var(--brand-sea));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.divider-line {
  height: 4px;
  width: 60px;
  background: linear-gradient(90deg, var(--brand-blue), var(--brand-orange));
  border-radius: 2px;
  margin: 16px 0 24px;
}
