/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif; color: #333; line-height: 1.6; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

/* ===== VARIABLES ===== */
:root {
  --primary: #fe2c55;
  --primary-dark: #c4002c;
  --accent: #25f4ee;
  --dark: #111;
  --gray: #f5f5f5;
  --text-muted: #666;
  --border: #e8e8e8;
  --radius: 12px;
  --shadow: 0 4px 20px rgba(0,0,0,0.08);
  --shadow-hover: 0 8px 32px rgba(254,44,85,0.18);
  --transition: 0.3s ease;
}

/* ===== CONTAINER ===== */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ===== HEADER ===== */
.header {
  position: sticky; top: 0; z-index: 100;
  background: #fff;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.header-inner {
  display: flex; align-items: center; gap: 24px;
  height: 70px;
}
.logo {
  font-size: 22px; font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.5px;
  white-space: nowrap;
}
.nav { display: flex; gap: 0; flex: 1; min-width: 0; }

/* Nav item wrapper — controls the dropdown */
.nav-item {
  position: relative;
}
.nav-item > .nav-link {
  display: flex; align-items: center; gap: 3px;
  padding: 0 16px;
  height: 70px;           /* 与 header 等高，撑满整行 */
  font-size: 15px;
  font-weight: 600;       /* 加粗 */
  color: #333;
  cursor: pointer; white-space: nowrap;
  transition: var(--transition);
  text-decoration: none;
  border-bottom: 3px solid transparent;  /* 底部高亮线占位 */
  box-sizing: border-box;
}
.nav-item > .nav-link:hover,
.nav-item > .nav-link.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  background: transparent;
}
/* Caret arrow */
.nav-link .caret {
  font-size: 11px; opacity: 0.6;
  transition: transform var(--transition);
  display: inline-block;
}
.nav-item:hover > .nav-link .caret { transform: rotate(180deg); opacity: 1; }

/* ===== DROPDOWN ===== */
.dropdown {
  position: absolute; top: 100%; left: 0;
  /* padding-top 桥接触发区，防止鼠标移动过程中 hover 丢失 */
  padding-top: 10px;
  background: transparent;
  min-width: 200px;
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  pointer-events: none;
}
/* 真正的下拉卡片 */
.dropdown-inner {
  background: #fff;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,0.08);
  box-shadow: 0 12px 40px rgba(0,0,0,0.14);
  padding: 10px 0;
  position: relative; z-index: 2;
}
/* 小箭头 */
.dropdown-inner::before {
  content: '';
  position: absolute; top: -6px; left: 20px;
  width: 12px; height: 12px;
  background: #fff;
  border-left: 1px solid rgba(0,0,0,0.08);
  border-top: 1px solid rgba(0,0,0,0.08);
  transform: rotate(45deg);
}
.nav-item:hover > .dropdown {
  opacity: 1; visibility: visible;
  transform: translateY(0); pointer-events: auto;
}
.dropdown-label {
  padding: 6px 18px 10px;
  font-size: 13px; font-weight: 700; color: #333;
  border-bottom: 1px solid #f0f0f0; margin-bottom: 6px;
}
.dropdown-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 18px; cursor: pointer;
  transition: background var(--transition);
  text-decoration: none; color: #444;
  font-size: 14px;
}
.dropdown-item:hover {
  background: #fff0f3; color: var(--primary);
}
.dropdown-item:hover .d-icon { transform: scale(1.1); }
.d-icon {
  width: 32px; height: 32px; border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: transform var(--transition);
}

/* Text-only dropdown (关于海盟) */
.dropdown-text-only { min-width: 140px; }
.dropdown-item-text {
  display: block; padding: 10px 20px;
  font-size: 14px; color: #444;
  transition: color var(--transition), background var(--transition);
  text-decoration: none;
}
.dropdown-item-text:hover { background: #fff0f3; color: var(--primary); }
.header-right { display: flex; align-items: center; gap: 16px; margin-left: auto; flex-shrink: 0; }
.hotline { font-size: 15px; font-weight: 600; color: var(--primary); white-space: nowrap; }
.btn-login {
  padding: 6px 18px; border-radius: 6px;
  border: 1.5px solid var(--primary); color: var(--primary);
  font-size: 14px; transition: var(--transition);
}
.btn-login:hover { background: var(--primary); color: #fff; }

/* ===== BANNER ===== */
.banner {
  position: relative;
  background: linear-gradient(135deg, #0a0a1a 0%, #1a0020 50%, #0d1a2d 100%);
  padding: 80px 0;
  overflow: hidden;
}
.banner::before {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23fe2c55' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.banner-overlay {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 30% 50%, rgba(254,44,85,0.15) 0%, transparent 60%);
}
.banner-content {
  position: relative; z-index: 1;
  display: flex; align-items: center; gap: 60px;
}
.banner-text { flex: 1; color: #fff; }
.banner-text h1 {
  font-size: 48px; font-weight: 900;
  line-height: 1.15; margin-bottom: 16px;
  background: linear-gradient(90deg, #fff 0%, var(--accent) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.banner-text p { font-size: 18px; color: rgba(255,255,255,0.75); margin-bottom: 28px; }
.banner-tags { display: flex; flex-direction: column; gap: 10px; }
.banner-tags li { font-size: 15px; color: rgba(255,255,255,0.85); }
.banner-tags li::before { color: var(--accent); }

.consult-form {
  width: 360px; flex-shrink: 0;
  background: #fff; padding: 32px;
  border-radius: var(--radius);
  box-shadow: 0 16px 48px rgba(0,0,0,0.3);
}
.consult-form h3 { font-size: 20px; margin-bottom: 20px; color: var(--dark); }
.consult-form input,
.consult-form textarea {
  width: 100%; padding: 12px 14px;
  border: 1.5px solid var(--border); border-radius: 8px;
  font-size: 14px; font-family: inherit;
  margin-bottom: 12px; outline: none;
  transition: border-color var(--transition);
}
.consult-form input:focus,
.consult-form textarea:focus { border-color: var(--primary); }
.consult-form textarea { resize: vertical; }

/* ===== BUTTONS ===== */
.btn-primary {
  width: 100%; padding: 13px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff; border: none; border-radius: 8px;
  font-size: 16px; font-weight: 600; cursor: pointer;
  transition: var(--transition);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: var(--shadow-hover); }
.btn-outline {
  padding: 8px 20px; border-radius: 6px;
  border: 1.5px solid var(--primary); color: var(--primary);
  background: transparent; cursor: pointer;
  font-size: 13px; font-weight: 500;
  transition: var(--transition);
}
.btn-outline:hover { background: var(--primary); color: #fff; }

/* ===== SECTIONS ===== */
.section { padding: 80px 0; }
.bg-gray { background: var(--gray); }
.section-title {
  text-align: center; font-size: 32px; font-weight: 800;
  margin-bottom: 8px; color: var(--dark);
}
.section-sub {
  text-align: center; font-size: 15px; color: var(--text-muted);
  margin-bottom: 48px;
}

/* ===== SERVICES GRID ===== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.service-card {
  background: #fff; border-radius: var(--radius);
  padding: 28px 20px; text-align: center;
  border: 1.5px solid var(--border);
  box-shadow: var(--shadow);
  transition: var(--transition);
  display: flex; flex-direction: column; gap: 12px; align-items: center;
}
.service-card:hover {
  border-color: var(--primary); transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}
.service-icon { font-size: 36px; }
.service-card h4 { font-size: 16px; font-weight: 700; }
.service-card p { font-size: 13px; color: var(--text-muted); flex: 1; }

/* ===== MONETIZE ===== */
.monetize-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
}
.monetize-card {
  background: #fff; border-radius: var(--radius);
  padding: 36px 28px; border: 1.5px solid var(--border);
  box-shadow: var(--shadow); transition: var(--transition);
}
.monetize-card:hover { transform: translateY(-4px); }
.monetize-card h3 { font-size: 20px; margin-bottom: 20px; }
.monetize-card ul { display: flex; flex-direction: column; gap: 10px; }
.monetize-card li {
  padding: 8px 12px; border-radius: 6px;
  background: rgba(0,0,0,0.04); font-size: 14px;
  transition: background 0.32s ease;
}

/* ===== MARKETING ===== */
.marketing-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px;
}
.marketing-card {
  background: #fff; border-radius: var(--radius);
  padding: 32px 28px; border: 1.5px solid var(--border);
  box-shadow: var(--shadow); transition: var(--transition);
  display: flex; flex-direction: column; gap: 12px;
}
.marketing-card:hover { border-color: var(--primary); transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.marketing-num {
  font-size: 40px; font-weight: 900;
  color: var(--primary); opacity: 0.15; line-height: 1;
}
.marketing-card h4 { font-size: 18px; font-weight: 700; margin-top: -8px; }
.marketing-card p { font-size: 14px; color: var(--text-muted); flex: 1; }

/* ===== CAROUSEL ===== */
.carousel-wrapper { position: relative; overflow: hidden; }
.carousel {
  display: flex; gap: 20px;
  transition: transform 0.4s ease;
}
.case-card {
  min-width: calc(33.333% - 14px);
  background: #fff; border-radius: var(--radius);
  padding: 28px 24px; border: 1.5px solid var(--border);
  box-shadow: var(--shadow); flex-shrink: 0;
  display: flex; flex-direction: column; gap: 10px;
  transition: var(--transition);
}
.case-card:hover { border-color: var(--primary); transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.case-tag {
  display: inline-block; padding: 3px 10px;
  background: #fff0f3; color: var(--primary);
  border-radius: 4px; font-size: 12px; font-weight: 600;
  align-self: flex-start;
}
.case-card h4 { font-size: 15px; font-weight: 700; line-height: 1.4; }
.case-card p { font-size: 13px; color: var(--text-muted); flex: 1; }
.case-date { font-size: 12px; color: #aaa; }
.carousel-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 40px; height: 40px; border-radius: 50%;
  background: #fff; border: 1.5px solid var(--border);
  font-size: 22px; cursor: pointer; z-index: 10;
  box-shadow: var(--shadow); transition: var(--transition);
  display: flex; align-items: center; justify-content: center;
}
.carousel-btn:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.carousel-btn.prev { left: -20px; }
.carousel-btn.next { right: -20px; }
.carousel-dots {
  display: flex; justify-content: center; gap: 8px; margin-top: 24px;
}
.dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #ddd; cursor: pointer; transition: var(--transition);
}
.dot.active { background: var(--primary); transform: scale(1.3); }

/* ===== PROCESS ===== */
.process-steps {
  display: flex; gap: 0;
  justify-content: space-between;
  position: relative;
}
.process-steps::before {
  content: '';
  position: absolute; top: 28px; left: 40px; right: 40px;
  height: 2px; background: var(--border); z-index: 0;
}
.process-step {
  flex: 1; text-align: center; position: relative; z-index: 1;
  padding: 0 8px; cursor: pointer;
}
.step-circle {
  width: 56px; height: 56px; border-radius: 50%;
  background: #fff; border: 2.5px solid var(--border);
  color: #aaa; font-size: 18px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 14px;
  transition: var(--transition);
  position: relative; z-index: 1;
}
.process-step.active .step-circle,
.process-step:hover .step-circle {
  background: var(--primary); border-color: var(--primary); color: #fff;
  box-shadow: 0 0 0 6px rgba(254,44,85,0.15);
}
.process-step h5 { font-size: 14px; font-weight: 700; margin-bottom: 6px; }
.process-step p { font-size: 12px; color: var(--text-muted); }

/* ===== CTA ===== */
.cta {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  padding: 60px 0;
}
.cta-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 40px;
}
.cta-text h2 { font-size: 28px; font-weight: 800; color: #fff; margin-bottom: 8px; }
.cta-text p { font-size: 15px; color: rgba(255,255,255,0.8); }
.cta-form { display: flex; gap: 12px; }
.cta-form input {
  padding: 13px 18px; border-radius: 8px; border: none;
  font-size: 15px; width: 280px; outline: none;
}
.cta-form .btn-primary {
  width: auto; padding: 13px 32px;
  background: #fff; color: var(--primary);
}
.cta-form .btn-primary:hover { background: var(--dark); color: #fff; }

/* ===== FOOTER ===== */
.footer { background: #0a0a14; color: rgba(255,255,255,0.7); padding: 60px 0 0; }
.footer-inner {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px;
  padding-bottom: 40px;
}
.footer-col h4 { color: #fff; font-size: 16px; margin-bottom: 16px; }
.footer-col p { font-size: 14px; margin-bottom: 6px; }
.footer-phone { font-size: 22px; font-weight: 700; color: var(--primary); }
.footer-col a, .footer-col > span {
  display: block; font-size: 14px;
  color: rgba(255,255,255,0.6); margin-bottom: 8px;
  white-space: nowrap; width: 100%;
}
.footer-col a { transition: color var(--transition); }
.footer-col a:hover { color: var(--primary); }
.qrcode-placeholder {
  width: 100px; height: 100px; background: rgba(255,255,255,0.08);
  border-radius: 8px; display: flex; align-items: center; justify-content: center;
  font-size: 12px; text-align: center;
}
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 20px 0; text-align: center;
  font-size: 13px; color: rgba(255,255,255,0.3);
}

/* ===== TOAST ===== */
.toast {
  position: fixed; bottom: 32px; left: 50%; transform: translateX(-50%);
  background: #222; color: #fff; padding: 14px 28px;
  border-radius: 8px; font-size: 14px; z-index: 9999;
  opacity: 0; pointer-events: none; transition: opacity 0.3s;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}
.toast.show { opacity: 1; }

/* ===== ANIMATIONS ===== */
.animate-in {
  opacity: 0; transform: translateY(24px);
  transition: opacity 0.5s ease, transform 0.5s ease;
  /* 兜底：500ms 后无论如何显示，防止 observer 未触发导致空白 */
  animation: fallback-show 0s 0.5s forwards;
}
@keyframes fallback-show { to { opacity: 1; transform: none; } }
.animate-in.visible {
  opacity: 1; transform: none;
  animation: none;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .process-steps { flex-wrap: wrap; gap: 24px; }
  .process-steps::before { display: none; }
}
@media (max-width: 768px) {
  .header-inner { gap: 16px; }
  .nav { display: none; }
  .banner-content { flex-direction: column; }
  .consult-form { width: 100%; }
  .banner-text h1 { font-size: 32px; }
  .monetize-grid, .marketing-grid { grid-template-columns: 1fr; }
  .case-card { min-width: calc(100% - 0px); }
  .cta-inner { flex-direction: column; text-align: center; }
  .cta-form { flex-direction: column; }
  .cta-form input { width: 100%; }
  .footer-inner { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .section { padding: 48px 0; }
  .section-title { font-size: 24px; }
  .services-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
}
