/* ==================== 基础样式 ==================== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #3b82f6;
  --secondary: #0f172a;
  --accent: #06b6d4;
  --text: #1e293b;
  --text-light: #64748b;
  --text-lighter: #94a3b8;
  --bg: #ffffff;
  --bg-gray: #f8fafc;
  --bg-dark: #0f172a;
  --border: #e2e8f0;
  --shadow: 0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06);
  --shadow-lg: 0 10px 25px rgba(0,0,0,.1), 0 6px 10px rgba(0,0,0,.08);
  --shadow-xl: 0 20px 50px rgba(0,0,0,.12);
  --radius: 12px;
  --radius-lg: 20px;
  --transition: .3s cubic-bezier(.4,0,.2,1);
}

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  color: var(--text);
  line-height: 1.7;
  background: var(--bg);
  overflow-x: hidden;
}

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

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

/* ==================== 导航栏 ==================== */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0,0,0,.05);
  transition: var(--transition);
}
.navbar.scrolled { box-shadow: var(--shadow); }

.nav-container { display: flex; align-items: center; justify-content: space-between; height: 72px; }

.nav-logo {
  display: flex; align-items: center; gap: 10px;
  font-size: 22px; font-weight: 700; color: var(--secondary);
  text-decoration: none;
}
.nav-logo img { height: 36px; width: auto; }

.nav-menu {
  display: flex; list-style: none; gap: 8px;
}
.nav-link {
  display: block; padding: 8px 16px;
  color: var(--text-light); text-decoration: none;
  font-size: 15px; font-weight: 500;
  border-radius: 8px;
  transition: var(--transition);
}
.nav-link:hover, .nav-link.active { color: var(--primary); background: rgba(37,99,235,.06); }

.nav-toggle {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 8px;
}
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: var(--transition); }

/* ==================== Hero ==================== */
.hero {
  position: relative; min-height: 100vh;
  display: flex; align-items: center;
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 50%, #2563eb 100%);
  overflow: hidden;
}
.hero-bg { position: absolute; inset: 0; }
.hero-particles {
  position: absolute; inset: 0; overflow: hidden;
}
.hero-particles::before, .hero-particles::after {
  content: '';
  position: absolute; border-radius: 50%;
  background: rgba(255,255,255,.05);
  animation: float 20s infinite ease-in-out;
}
.hero-particles::before { width: 500px; height: 500px; top: -100px; right: -100px; }
.hero-particles::after { width: 400px; height: 400px; bottom: -80px; left: -80px; animation-delay: -10s; }

@keyframes float {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(30px, -30px) rotate(5deg); }
  66% { transform: translate(-20px, 20px) rotate(-3deg); }
}

.hero-content {
  position: relative; z-index: 2;
  text-align: center; color: #fff;
  padding: 120px 0 160px;
}
.hero-title {
  font-size: clamp(36px, 6vw, 64px);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
  animation: fadeUp .8s ease-out;
}
.hero-subtitle {
  font-size: clamp(16px, 2.5vw, 22px);
  color: rgba(255,255,255,.8);
  margin-bottom: 40px;
  max-width: 600px; margin-left: auto; margin-right: auto;
  animation: fadeUp .8s ease-out .2s both;
}
.hero-actions {
  display: flex; gap: 16px; justify-content: center; flex-wrap: wrap;
  animation: fadeUp .8s ease-out .4s both;
}

.hero-wave {
  position: absolute; bottom: -1px; left: 0; right: 0;
  line-height: 0;
}
.hero-wave svg { width: 100%; height: 80px; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==================== 按钮 ==================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 28px;
  font-size: 15px; font-weight: 600;
  border-radius: 10px; border: 2px solid transparent;
  cursor: pointer; transition: var(--transition);
  text-decoration: none; line-height: 1.4;
}
.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(37,99,235,.35); }
.btn-outline { background: transparent; color: #fff; border-color: rgba(255,255,255,.4); }
.btn-outline:hover { background: rgba(255,255,255,.1); border-color: #fff; }
.btn-lg { padding: 14px 36px; font-size: 16px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .6; cursor: not-allowed; }

/* ==================== 通用区块 ==================== */
.section { padding: 100px 0; }
.section:nth-child(even) { background: var(--bg-gray); }

.section-header { text-align: center; margin-bottom: 60px; }
.section-title {
  font-size: 36px; font-weight: 800; color: var(--secondary);
  letter-spacing: -0.02em;
}
.section-line {
  width: 60px; height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 2px; margin: 16px auto 0;
}
.section-desc { color: var(--text-light); font-size: 17px; margin-top: 16px; }

/* ==================== 关于我们 ==================== */
.about-content { max-width: 800px; margin: 0 auto; text-align: center; }
.about-text { font-size: 18px; color: var(--text-light); line-height: 1.9; }

/* ==================== 服务 ==================== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 28px;
}
.service-card {
  background: var(--bg);
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  transition: var(--transition);
  border: 1px solid var(--border);
  position: relative; overflow: hidden;
}
.service-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  opacity: 0; transition: var(--transition);
}
.service-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-xl); }
.service-card:hover::before { opacity: 1; }
.service-icon {
  width: 64px; height: 64px;
  background: linear-gradient(135deg, rgba(37,99,235,.1), rgba(6,182,212,.1));
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; margin-bottom: 20px;
}
.service-card h3 { font-size: 20px; font-weight: 700; margin-bottom: 12px; color: var(--secondary); }
.service-card p { color: var(--text-light); font-size: 15px; line-height: 1.7; }
.service-features { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 8px; }
.service-features span {
  display: inline-block; padding: 4px 12px;
  background: rgba(37,99,235,.06); color: var(--primary);
  border-radius: 20px; font-size: 13px; font-weight: 500;
}

/* ==================== 案例 ==================== */
.cases-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 28px;
}
.case-card {
  background: var(--bg);
  border-radius: var(--radius-lg);
  overflow: hidden; transition: var(--transition);
  border: 1px solid var(--border);
}
.case-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-xl); }
.case-image {
  width: 100%; height: 220px; object-fit: cover;
  background: linear-gradient(135deg, #e0e7ff, #dbeafe);
}
.case-body { padding: 28px; }
.case-category {
  display: inline-block; padding: 4px 14px;
  background: rgba(37,99,235,.08); color: var(--primary);
  border-radius: 20px; font-size: 13px; font-weight: 600;
  margin-bottom: 12px;
}
.case-card h3 { font-size: 19px; font-weight: 700; margin-bottom: 10px; color: var(--secondary); }
.case-card p { color: var(--text-light); font-size: 14px; line-height: 1.7; }
.case-result {
  margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border);
  font-size: 14px; color: var(--primary); font-weight: 500;
}

/* ==================== 新闻 ==================== */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 28px;
}
.news-card {
  background: var(--bg);
  border-radius: var(--radius-lg);
  overflow: hidden; transition: var(--transition);
  border: 1px solid var(--border);
  cursor: default;
}
.news-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.news-image {
  width: 100%; height: 200px; object-fit: cover;
  background: linear-gradient(135deg, #fef3c7, #fde68a);
}
.news-body { padding: 24px; }
.news-meta { display: flex; gap: 16px; margin-bottom: 10px; font-size: 13px; color: var(--text-lighter); }
.news-card h3 { font-size: 18px; font-weight: 700; margin-bottom: 10px; color: var(--secondary); line-height: 1.5; }
.news-card p { color: var(--text-light); font-size: 14px; line-height: 1.7; }

/* ==================== 联系我们 ==================== */
.contact { background: var(--bg-gray); }
.contact-wrapper {
  display: grid; grid-template-columns: 1fr 1.5fr; gap: 48px;
  max-width: 960px; margin: 0 auto;
}
.contact-item {
  display: flex; gap: 16px; align-items: flex-start;
  margin-bottom: 28px;
}
.contact-icon {
  width: 48px; height: 48px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
}
.contact-item h4 { font-size: 15px; font-weight: 600; color: var(--secondary); margin-bottom: 4px; }
.contact-item p { font-size: 14px; color: var(--text-light); }

.contact-form-wrapper {
  background: var(--bg);
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: var(--shadow);
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { margin-bottom: 20px; }
.form-group label {
  display: block; margin-bottom: 6px;
  font-size: 14px; font-weight: 600; color: var(--secondary);
}
.required { color: #ef4444; }
.form-group input, .form-group textarea {
  width: 100%; padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: 10px; font-size: 15px;
  transition: var(--transition);
  font-family: inherit; color: var(--text);
  background: var(--bg);
}
.form-group input:focus, .form-group textarea:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,.1);
}
.form-group textarea { resize: vertical; min-height: 100px; }

/* ==================== 页脚 ==================== */
.footer {
  background: var(--bg-dark); color: rgba(255,255,255,.7);
  padding: 60px 0 0;
}
.footer-content {
  display: flex; justify-content: space-between; align-items: flex-start;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.footer-brand h3 { color: #fff; font-size: 22px; margin-bottom: 8px; }
.footer-brand p { font-size: 14px; }
.footer-links { display: flex; gap: 24px; }
.footer-links a { color: rgba(255,255,255,.6); text-decoration: none; font-size: 14px; transition: var(--transition); }
.footer-links a:hover { color: #fff; }
.footer-bottom { padding: 24px 0; text-align: center; font-size: 13px; color: rgba(255,255,255,.4); }

/* ==================== 回到顶部 ==================== */
.back-to-top {
  position: fixed; bottom: 32px; right: 32px;
  width: 48px; height: 48px;
  background: var(--primary); color: #fff;
  border: none; border-radius: 14px;
  font-size: 20px; cursor: pointer;
  opacity: 0; visibility: hidden;
  transition: var(--transition);
  box-shadow: 0 4px 14px rgba(37,99,235,.4);
  z-index: 999;
}
.back-to-top.visible { opacity: 1; visibility: visible; }
.back-to-top:hover { transform: translateY(-3px); background: var(--primary-dark); }

/* ==================== 骨架屏 ==================== */
.skeleton {
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 8px;
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ==================== 空状态 ==================== */
.empty-state {
  text-align: center; padding: 60px 20px;
  color: var(--text-lighter); font-size: 16px;
}

/* ==================== 提示 ==================== */
.toast {
  position: fixed; top: 80px; left: 50%; transform: translateX(-50%) translateY(-20px);
  padding: 12px 28px; border-radius: 10px;
  font-size: 15px; font-weight: 500;
  z-index: 9999; opacity: 0;
  transition: var(--transition);
  box-shadow: var(--shadow-lg);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.success { background: #10b981; color: #fff; }
.toast.error { background: #ef4444; color: #fff; }

/* ==================== 响应式 ==================== */
@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .nav-menu {
    position: fixed; top: 72px; left: 0; right: 0;
    background: rgba(255,255,255,.98);
    backdrop-filter: blur(20px);
    flex-direction: column; padding: 16px;
    border-bottom: 1px solid var(--border);
    transform: translateY(-100%); opacity: 0;
    pointer-events: none; transition: var(--transition);
  }
  .nav-menu.open { transform: translateY(0); opacity: 1; pointer-events: all; }

  .section { padding: 60px 0; }
  .section-title { font-size: 28px; }
  .services-grid, .cases-grid, .news-grid { grid-template-columns: 1fr; }
  .contact-wrapper { grid-template-columns: 1fr; gap: 32px; }
  .form-row { grid-template-columns: 1fr; }
  .footer-content { flex-direction: column; gap: 24px; }
  .footer-links { flex-wrap: wrap; }
  .hero-content { padding: 100px 0 120px; }
}

@media (max-width: 480px) {
  .hero-actions { flex-direction: column; align-items: center; }
  .btn-lg { width: 100%; max-width: 280px; }
  .contact-form-wrapper { padding: 24px 20px; }
}
