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

:root {
  --primary: #1e5eff;
  --primary-dark: #1646c4;
  --ink: #1f2937;
  --muted: #6b7280;
  --line: #e5e7eb;
  --bg-alt: #f5f7fb;
  --radius: 10px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  line-height: 1.7;
  background: #fff;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 820px; }

/* ---------- 顶部导航 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; font-size: 22px; font-weight: 700; color: var(--primary); }
.brand img { height: 36px; }
.main-nav { display: flex; gap: 4px; }
.main-nav a {
  padding: 8px 14px; border-radius: 8px; font-size: 15px; color: var(--ink);
  transition: background .2s, color .2s;
}
.main-nav a:hover { color: var(--primary); background: #eef2ff; }
.main-nav a.active { color: var(--primary); font-weight: 600; background: #eef2ff; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, #16306b 0%, #1e5eff 55%, #3b82f6 100%);
  color: #fff; text-align: center; padding: 110px 20px;
}
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .18; }
.hero-inner { position: relative; }
.hero h1 { font-size: clamp(30px, 4.5vw, 48px); font-weight: 700; margin-bottom: 18px; }
.hero p { font-size: clamp(15px, 2vw, 18px); max-width: 640px; margin: 0 auto 30px; opacity: .92; }
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-block; padding: 11px 26px; border-radius: 999px;
  font-size: 15px; font-weight: 600; border: 1px solid transparent; cursor: pointer;
  transition: transform .15s, box-shadow .15s, background .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); box-shadow: 0 8px 20px rgba(30, 94, 255, .35); }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .7); }
.btn-ghost:hover { background: rgba(255, 255, 255, .15); }
.btn-white { background: #fff; color: var(--primary); }
.btn-white:hover { box-shadow: 0 8px 20px rgba(0, 0, 0, .15); }
.btn-danger { background: #ef4444; color: #fff; }
.btn-sm { padding: 6px 14px; font-size: 13px; }

/* ---------- 通用区块 ---------- */
.section { padding: 72px 0; }
.section-alt { background: var(--bg-alt); }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 44px; }
.section-head h2 { font-size: 30px; font-weight: 700; margin-bottom: 12px; }
.section-head p { color: var(--muted); }
.link-more { color: var(--primary); font-weight: 600; font-size: 14px; }
.link-more:hover { text-decoration: underline; }
.empty-tip { color: var(--muted); text-align: center; padding: 30px 0; }

/* ---------- 卡片 ---------- */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: transform .2s, box-shadow .2s;
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(31, 41, 55, .10); }
.card-media { aspect-ratio: 16 / 9; overflow: hidden; background: var(--bg-alt); }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card-body h3 { font-size: 18px; }
.card-body p { color: var(--muted); font-size: 14px; }

/* ---------- 文章列表 ---------- */
.article-list { display: flex; flex-direction: column; gap: 14px; }
.article-item {
  display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 22px; transition: box-shadow .2s, border-color .2s;
}
.article-item:hover { box-shadow: 0 8px 20px rgba(31, 41, 55, .08); border-color: #c7d6ff; }
.article-date { color: var(--muted); font-size: 13px; white-space: nowrap; }
.article-title { font-weight: 600; flex: 1; min-width: 200px; }
.article-summary { flex-basis: 100%; color: var(--muted); font-size: 14px; }
.tag {
  display: inline-block; background: #eef2ff; color: var(--primary);
  font-size: 12px; padding: 2px 10px; border-radius: 999px;
}

/* ---------- 分页 / 筛选 ---------- */
.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 40px; flex-wrap: wrap; }
.pagination a {
  padding: 7px 14px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px;
}
.pagination a:hover, .pagination a.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.filter-bar { display: flex; gap: 10px; justify-content: center; margin-bottom: 32px; flex-wrap: wrap; }
.chip {
  padding: 7px 18px; border: 1px solid var(--line); border-radius: 999px; font-size: 14px;
}
.chip:hover { border-color: var(--primary); color: var(--primary); }
.chip.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ---------- 文章详情 ---------- */
.page-banner { background: linear-gradient(135deg, #16306b, #1e5eff); color: #fff; text-align: center; padding: 64px 20px; }
.page-banner-sm { padding: 46px 20px; }
.page-banner h1 { font-size: 30px; margin-bottom: 8px; }
.page-banner p { opacity: .9; }
.article-meta { font-size: 14px; }
.article-cover { border-radius: var(--radius); margin-bottom: 26px; max-height: 420px; width: 100%; object-fit: cover; }
.article-summary-block {
  background: var(--bg-alt); border-left: 4px solid var(--primary);
  padding: 16px 20px; border-radius: 0 var(--radius) var(--radius) 0; margin-bottom: 26px; color: var(--muted);
}
.article-back { margin-top: 40px; }

/* ---------- Markdown 正文 ---------- */
.markdown-body { font-size: 16px; }
.markdown-body h1, .markdown-body h2, .markdown-body h3 { margin: 28px 0 14px; line-height: 1.4; }
.markdown-body h2 { font-size: 24px; }
.markdown-body h3 { font-size: 19px; }
.markdown-body p { margin-bottom: 14px; }
.markdown-body ul, .markdown-body ol { margin: 0 0 14px 24px; }
.markdown-body blockquote {
  border-left: 4px solid var(--primary); background: var(--bg-alt);
  padding: 12px 18px; border-radius: 0 var(--radius) var(--radius) 0; color: var(--muted);
}
.markdown-body code {
  background: #f1f3f5; padding: 2px 6px; border-radius: 4px; font-size: 14px;
}
.markdown-body img { border-radius: var(--radius); margin: 10px 0; }
.product-desc, .case-desc { border-top: 1px dashed var(--line); padding-top: 10px; font-size: 14px; }

/* ---------- 联系页 ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 44px; }
.contact-info h3, .contact-form-box h3 { font-size: 20px; margin-bottom: 22px; }
.info-item { display: flex; gap: 18px; margin-bottom: 18px; }
.info-item > span { min-width: 56px; color: var(--muted); font-weight: 600; }
.info-item .qr { width: 130px; border-radius: 8px; }
.contact-form-box {
  background: var(--bg-alt); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 28px;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-field { margin-bottom: 16px; }
.form-field label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.form-field input, .form-field textarea {
  width: 100%; padding: 10px 14px; border: 1px solid var(--line);
  border-radius: 8px; font-size: 14px; font-family: inherit; background: #fff;
}
.form-field input:focus, .form-field textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(30, 94, 255, .12); }
.alert { padding: 12px 16px; border-radius: 8px; margin-bottom: 18px; font-size: 14px; }
.alert-success { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.alert-error { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }

/* ---------- CTA 带 ---------- */
.cta-band { background: linear-gradient(135deg, #16306b, #1e5eff); color: #fff; padding: 60px 0; }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.cta-inner h2 { font-size: 26px; margin-bottom: 6px; }
.cta-inner p { opacity: .9; }

/* ---------- 页脚 ---------- */
.site-footer { background: #0f172a; color: #cbd5e1; }
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 36px; padding: 52px 20px;
}
.footer-name { font-size: 20px; font-weight: 700; color: #fff; margin-bottom: 6px; }
.footer-slogan { font-size: 14px; color: #94a3b8; }
.footer-col h4 { font-size: 15px; color: #fff; margin-bottom: 14px; }
.footer-col a { display: block; margin-bottom: 8px; font-size: 14px; color: #cbd5e1; }
.footer-col a:hover { color: #fff; }
.footer-col div { font-size: 14px; margin-bottom: 8px; }
.footer-qr .qr { width: 110px; border-radius: 8px; }
.footer-qr .qr-tip { color: #94a3b8; }
.footer-bottom { border-top: 1px solid #1e293b; padding: 18px 0; }
.footer-bottom-inner { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 13px; color: #94a3b8; }
.footer-bottom-inner a:hover { color: #fff; }

/* ---------- 404 ---------- */
.notfound { text-align: center; padding: 90px 0; }
.notfound h1 { font-size: 72px; color: var(--primary); }
.notfound p { color: var(--muted); margin-bottom: 24px; }

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .header-inner { flex-direction: column; height: auto; padding: 14px 0; gap: 10px; }
  .main-nav { flex-wrap: wrap; justify-content: center; }
  .card-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .section { padding: 52px 0; }
}
