/* =============================================================
   华芯科技企业CMS — 前端设计系统 (theme.css)
   品牌: 华芯科技 | 主色 #2563EB | 深色 #0F172A | 字体 Noto Sans SC
   严格还原设计稿的配色 / 圆角 / 间距 / 排版
   ============================================================= */
:root {
  /* 品牌色 */
  --brand: #2563EB;
  --brand-700: #1D4ED8;
  --brand-800: #1E40AF;
  --brand-50: #EFF4FF;
  --brand-100: #DBEAFE;
  --brand-600: #2563EB;

  /* 中性色 */
  --ink: #0F172A;          /* 深色 / 标题 */
  --text: #1E293B;         /* 正文 */
  --text-2: #475569;       /* 次级文字 */
  --text-3: #94A3B8;       /* 弱化文字 */
  --line: #E2E8F0;         /* 描边 */
  --line-2: #EEF2F7;
  --bg: #F8FAFC;           /* 页面浅底 */
  --surface: #FFFFFF;      /* 卡片 */

  /* 状态色 */
  --success: #16A34A;
  --success-bg: #DCFCE7;
  --danger: #DC2626;
  --danger-bg: #FEE2E2;
  --warning: #F59E0B;
  --warning-bg: #FEF3C7;
  --info: #0EA5E9;

  /* 圆角 */
  --r1: 6px;
  --r2: 8px;
  --r3: 12px;
  --r4: 16px;
  --r-pill: 999px;

  /* 阴影 */
  --sh1: 0 1px 2px rgba(15,23,42,.06), 0 1px 3px rgba(15,23,42,.08);
  --sh2: 0 6px 16px rgba(15,23,42,.08);
  --sh-brand: 0 10px 30px rgba(37,99,235,.25);

  /* 间距尺度 */
  --s1: 4px;  --s2: 8px;  --s3: 12px; --s4: 16px;
  --s5: 20px; --s6: 24px; --s7: 32px; --s8: 40px; --s9: 56px; --s10: 72px;

  /* 字体 */
  --font: "Noto Sans SC", system-ui, -apple-system, "Segoe UI", Roboto, "Microsoft YaHei", sans-serif;
  --container: 1200px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { margin: 0; padding: 0; list-style: none; }
h1,h2,h3,h4,h5 { color: var(--ink); margin: 0; font-weight: 700; line-height: 1.3; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.container-wide { width: 100%; max-width: 1320px; margin: 0 auto; padding: 0 24px; }

/* ---------------- 按钮 ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 24px; border-radius: var(--r2);
  font-size: 15px; font-weight: 600; cursor: pointer; border: 1px solid transparent;
  transition: .18s ease; white-space: nowrap;
}
.btn-primary { background: var(--brand); color: #fff; box-shadow: var(--sh-brand); }
.btn-primary:hover { background: var(--brand-700); transform: translateY(-1px); }
.btn-ghost { background: #fff; color: var(--brand); border-color: var(--brand-100); }
.btn-ghost:hover { background: var(--brand-50); }
.btn-outline { background: transparent; color: var(--text); border-color: var(--line); }
.btn-outline:hover { border-color: var(--brand); color: var(--brand); }
.btn-sm { height: 36px; padding: 0 16px; font-size: 14px; border-radius: var(--r1); }
.btn-block { width: 100%; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #b91c1c; }

/* ---------------- 卡片 ---------------- */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r3); box-shadow: var(--sh1); overflow: hidden;
}
.card-pad { padding: var(--s6); }

/* ---------------- 徽标 ---------------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px;
  border-radius: var(--r-pill); font-size: 12px; font-weight: 600;
}
.badge-blue { background: var(--brand-50); color: var(--brand-700); }
.badge-green { background: var(--success-bg); color: var(--success); }
.badge-red { background: var(--danger-bg); color: var(--danger); }
.badge-gray { background: #F1F5F9; color: var(--text-2); }
.badge-amber { background: var(--warning-bg); color: #B45309; }

/* ---------------- 通用区块标题 ---------------- */
.section { padding: var(--s10) 0; }
.section-head { text-align: center; max-width: 720px; margin: 0 auto var(--s8); }
.section-head .eyebrow {
  display: inline-block; color: var(--brand); font-weight: 700; font-size: 14px;
  letter-spacing: 2px; margin-bottom: var(--s3);
}
.section-head h2 { font-size: 34px; margin-bottom: var(--s3); }
.section-head p { color: var(--text-2); font-size: 16px; }
.text-center { text-align: center; }

/* =============================================================
   前端站点头部 (Header)
   ============================================================= */
.site-header {
  position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.9);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
.site-header .bar { display: flex; align-items: center; height: 72px; gap: var(--s7); }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; color: var(--ink); }
.logo .mark {
  width: 36px; height: 36px; border-radius: 10px; background: linear-gradient(135deg, var(--brand), #38BDF8);
  display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 18px;
}
.main-nav { display: flex; gap: var(--s2); margin-left: auto; }
.main-nav a {
  padding: 8px 16px; border-radius: var(--r1); font-weight: 600; color: var(--text-2); font-size: 15px;
  transition: .15s;
}
.main-nav a:hover, .main-nav a.active { color: var(--brand); background: var(--brand-50); }
.header-cta { display: flex; gap: var(--s2); align-items: center; }

/* 移动端菜单按钮 */
.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: var(--r1); width: 42px; height: 42px; cursor: pointer; }

/* =============================================================
   Hero
   ============================================================= */
.hero {
  position: relative; overflow: hidden;
  background: radial-gradient(1200px 500px at 80% -10%, rgba(56,189,248,.25), transparent),
              linear-gradient(135deg, #0B1220 0%, #0F172A 55%, #1E293B 100%);
  color: #fff; padding: var(--s10) 0 calc(var(--s10) + 40px);
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: 26px 26px; opacity: .5; pointer-events: none;
}
.hero .container { position: relative; z-index: 1; }
.hero h1 { color: #fff; font-size: 48px; line-height: 1.2; margin-bottom: var(--s5); max-width: 760px; }
.hero p.lead { font-size: 18px; color: #CBD5E1; max-width: 620px; margin-bottom: var(--s7); }
.hero .hero-actions { display: flex; gap: var(--s3); flex-wrap: wrap; }
.hero .btn-ghost { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.2); }
.hero .btn-ghost:hover { background: rgba(255,255,255,.16); }
.hero-stats { display: flex; gap: var(--s9); margin-top: var(--s9); flex-wrap: wrap; }
.hero-stats .num { font-size: 38px; font-weight: 800; color: #fff; }
.hero-stats .lbl { color: #94A3B8; font-size: 14px; }

/* =============================================================
   栅格
   ============================================================= */
.grid { display: grid; gap: var(--s6); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 980px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* 特性卡片 */
.feature { padding: var(--s6); border-radius: var(--r3); border: 1px solid var(--line); background: #fff; transition: .18s; }
.feature:hover { box-shadow: var(--sh2); transform: translateY(-3px); }
.feature .ico {
  width: 52px; height: 52px; border-radius: 14px; background: var(--brand-50); color: var(--brand);
  display: grid; place-items: center; font-size: 24px; margin-bottom: var(--s4);
}
.feature h3 { font-size: 18px; margin-bottom: var(--s2); }
.feature p { color: var(--text-2); font-size: 14px; margin: 0; }

/* 产品/文章卡 */
.post-card { background: #fff; border: 1px solid var(--line); border-radius: var(--r3); overflow: hidden; transition: .18s; display: flex; flex-direction: column; }
.post-card:hover { box-shadow: var(--sh2); transform: translateY(-3px); }
.post-card .thumb { aspect-ratio: 16/10; background: linear-gradient(135deg, var(--brand-50), #E0F2FE); display: grid; place-items: center; color: var(--brand); font-size: 40px; }
.post-card .body { padding: var(--s5); display: flex; flex-direction: column; gap: var(--s2); flex: 1; }
.post-card h3 { font-size: 17px; }
.post-card .meta { color: var(--text-3); font-size: 13px; display: flex; gap: var(--s3); }
.post-card p { color: var(--text-2); font-size: 14px; margin: 0; flex: 1; }
.post-card .more { color: var(--brand); font-weight: 600; font-size: 14px; }

/* 列表页布局 */
.layout-2 { display: grid; grid-template-columns: 280px 1fr; gap: var(--s7); align-items: start; }
@media (max-width: 900px) { .layout-2 { grid-template-columns: 1fr; } }
.side-card { background: #fff; border: 1px solid var(--line); border-radius: var(--r3); padding: var(--s5); }
.side-card h4 { font-size: 15px; margin-bottom: var(--s3); }
.cat-list a { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border-radius: var(--r1); color: var(--text-2); font-weight: 500; }
.cat-list a:hover, .cat-list a.active { background: var(--brand-50); color: var(--brand); }
.cat-list a .count { font-size: 12px; color: var(--text-3); }

/* 文章列表行 */
.news-row { display: flex; gap: var(--s5); padding: var(--s5) 0; border-bottom: 1px solid var(--line-2); }
.news-row:last-child { border-bottom: 0; }
.news-row .date { flex: 0 0 64px; text-align: center; }
.news-row .date .d { font-size: 26px; font-weight: 800; color: var(--brand); }
.news-row .date .m { font-size: 12px; color: var(--text-3); }
.news-row .info { flex: 1; }
.news-row .info h3 { font-size: 17px; margin-bottom: 6px; }
.news-row .info p { color: var(--text-2); font-size: 14px; margin: 0; }

/* 面包屑 */
.breadcrumb { display: flex; gap: 8px; align-items: center; color: var(--text-3); font-size: 14px; padding: var(--s5) 0; }
.breadcrumb a:hover { color: var(--brand); }
.breadcrumb .sep { color: var(--line); }

/* 分页 */
.pager { display: flex; gap: 8px; justify-content: center; margin-top: var(--s7); }
.pager a { min-width: 40px; height: 40px; padding: 0 12px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: var(--r1); color: var(--text-2); font-weight: 600; }
.pager a.active, .pager a:hover { background: var(--brand); color: #fff; border-color: var(--brand); }

/* 表单 */
.field { margin-bottom: var(--s5); }
.field label { display: block; font-weight: 600; margin-bottom: var(--s2); font-size: 14px; }
.field .req { color: var(--danger); }
.input, .textarea, .select {
  width: 100%; border: 1px solid var(--line); border-radius: var(--r2); padding: 12px 14px;
  font-size: 15px; font-family: var(--font); color: var(--text); background: #fff; transition: .15s;
}
.input:focus, .textarea:focus, .select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-100); }
.textarea { resize: vertical; min-height: 140px; }
.form-card { max-width: 640px; margin: 0 auto; background: #fff; border: 1px solid var(--line); border-radius: var(--r3); padding: var(--s8); box-shadow: var(--sh1); }
.form-note { color: var(--text-3); font-size: 13px; margin-top: var(--s2); }

/* 信息条 */
.alert { padding: 14px 16px; border-radius: var(--r2); font-size: 14px; margin-bottom: var(--s5); display: flex; gap: 10px; align-items: center; }
.alert-success { background: var(--success-bg); color: #15803D; }
.alert-error { background: var(--danger-bg); color: #B91C1C; }

/* 统计条 / CTA */
.cta {
  background: linear-gradient(135deg, var(--brand), var(--brand-800));
  border-radius: var(--r4); padding: var(--s9) var(--s8); color: #fff; text-align: center;
}
.cta h2 { color: #fff; font-size: 32px; margin-bottom: var(--s3); }
.cta p { color: #DBEAFE; font-size: 16px; margin-bottom: var(--s6); }

/* 时间线 / 发展历程 */
.timeline { position: relative; padding-left: 28px; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 4px; bottom: 4px; width: 2px; background: var(--line); }
.timeline li { position: relative; padding: 0 0 var(--s5) 0; }
.timeline li::before { content: ""; position: absolute; left: -28px; top: 6px; width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 3px solid var(--brand); }
.timeline .y { font-weight: 800; color: var(--brand); }

/* 价值观 */
.value-card { text-align: center; padding: var(--s6); border: 1px solid var(--line); border-radius: var(--r3); background: #fff; }
.value-card .v-ico { font-size: 32px; margin-bottom: var(--s3); }

/* =============================================================
   前端页脚 (Footer)
   ============================================================= */
.site-footer { background: var(--ink); color: #CBD5E1; padding: var(--s9) 0 var(--s6); margin-top: var(--s10); }
.site-footer a { color: #CBD5E1; }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: var(--s7); }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer .f-logo { color: #fff; font-weight: 800; font-size: 20px; display: flex; gap: 10px; align-items: center; margin-bottom: var(--s4); }
.site-footer h5 { color: #fff; font-size: 15px; margin: 0 0 var(--s4); }
.site-footer .f-links li { padding: 6px 0; font-size: 14px; }
.site-footer .contact-line { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; padding: 6px 0; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); margin-top: var(--s7); padding-top: var(--s5); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: 13px; color: #94A3B8; }

/* 联系方式卡片（地址页） */
.contact-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: var(--s7); align-items: start; }
@media (max-width: 900px){ .contact-grid { grid-template-columns: 1fr; } }
.contact-info .ci { display: flex; gap: 14px; padding: var(--s4) 0; border-bottom: 1px solid var(--line-2); }
.contact-info .ci .ci-ico { width: 44px; height: 44px; border-radius: 12px; background: var(--brand-50); color: var(--brand); display: grid; place-items: center; font-size: 20px; flex: 0 0 auto; }
.contact-info .ci .ci-t { font-weight: 700; color: var(--ink); }
.contact-info .ci .ci-d { color: var(--text-2); font-size: 14px; }
.map-box { aspect-ratio: 16/10; border-radius: var(--r3); border: 1px solid var(--line); background:
  linear-gradient(rgba(37,99,235,.06), rgba(37,99,235,.06)), repeating-linear-gradient(45deg,#EEF2F7 0 12px,#fff 12px 24px); display: grid; place-items: center; color: var(--text-3); }

/* 详情页正文 */
.article-body { font-size: 16px; line-height: 1.9; color: var(--text); }
.article-body p { margin: 0 0 var(--s5); }
.article-body h3 { font-size: 22px; margin: var(--s7) 0 var(--s3); }
.article-body img { border-radius: var(--r3); margin: var(--s5) 0; }
.article-cover { width: 100%; aspect-ratio: 16/8; border-radius: var(--r3); background: linear-gradient(135deg, var(--brand-50), #E0F2FE); display: grid; place-items: center; color: var(--brand); font-size: 56px; margin-bottom: var(--s6); }

/* 工具类 */
.mt-0{margin-top:0}.mt-4{margin-top:var(--s4)}.mt-6{margin-top:var(--s6)}.mt-8{margin-top:var(--s8)}
.mb-0{margin-bottom:0}.mb-4{margin-bottom:var(--s4)}.mb-6{margin-bottom:var(--s6)}
.flex{display:flex}.items-center{align-items:center}.justify-between{justify-content:space-between}.gap-3{gap:var(--s3)}.gap-4{gap:var(--s4)}
.muted{color:var(--text-3)}.text-2{color:var(--text-2)}.brand{color:var(--brand)}.ink{color:var(--ink)}
