/* ========== 恒峰电子官网 · 品牌风格（Logo 配色：深藏青 + 铜金，浅色底） ========== */
:root {
  --bg: #ffffff;
  --bg-2: #f6f8fb;
  --bg-3: #eef2f8;
  --border: #e4e8f0;
  --border-2: #cdd5e2;
  --text: #1b2536;
  --text-2: #55617a;
  --text-3: #8a94a8;
  /* 品牌主色：深藏青（沿用 --cyan 变量名，兼容页面内联引用） */
  --cyan: #1a3a66;
  --cyan-strong: #122a4c;
  --cyan-soft: rgba(26, 58, 102, 0.08);
  /* 品牌点缀：铜金 */
  --copper: #c9803f;
  --copper-bright: #e0a468;
  --copper-soft: rgba(201, 128, 63, 0.12);
  --radius: 12px;
  --shadow: 0 14px 34px rgba(18, 42, 76, 0.10);
  /* 兼容别名 */
  --blue-900: #122a4c;
  --copper-dark: #b26a2f;
  --text-400: #8a94a8;
  --text-600: #55617a;
  --line: #e4e8f0;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }
.container { width: min(1160px, 92%); margin: 0 auto; }

/* ---------- 顶部导航 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-logo { height: 42px; width: auto; }
/* 旧字符标，保留样式兜底 */
.brand-mark {
  width: 40px; height: 40px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--cyan), var(--cyan-strong));
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 18px; letter-spacing: 1px;
}
.brand-name { font-size: 17px; font-weight: 700; color: var(--text); letter-spacing: 0.5px; }
.brand-sub { font-size: 11px; color: var(--text-3); letter-spacing: 0.5px; }

.main-nav { display: flex; align-items: center; gap: 6px; }
.main-nav a {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 15px;
  color: var(--text-2);
  transition: all 0.2s;
}
.main-nav a:hover { color: var(--cyan); background: var(--cyan-soft); }
.main-nav a.active { color: var(--cyan); background: var(--cyan-soft); font-weight: 600; }

.nav-user { display: flex; align-items: center; gap: 10px; margin-left: 14px; }
.btn-login-nav {
  padding: 8px 20px;
  border-radius: 8px;
  border: 1px solid var(--cyan);
  color: var(--cyan);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  background: transparent;
}
.btn-login-nav:hover { background: var(--cyan); color: #fff; }
.nav-username { font-size: 14px; color: var(--cyan); font-weight: 600; }
.btn-logout {
  padding: 6px 14px; border-radius: 8px;
  border: 1px solid var(--border-2); background: transparent;
  color: var(--text-2); font-size: 13px; cursor: pointer;
}
.btn-logout:hover { border-color: var(--cyan); color: var(--cyan); }

/* ---------- Hero（深色藏青叠图，铜金点缀） ---------- */
.hero {
  position: relative;
  min-height: 600px;
  display: flex;
  align-items: center;
  background:
    linear-gradient(120deg, rgba(10, 20, 38, 0.94) 30%, rgba(18, 42, 76, 0.62)),
    url("../images/hero.png") center / cover no-repeat;
  color: #fff;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(224, 164, 104, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(224, 164, 104, 0.07) 1px, transparent 1px);
  background-size: 46px 46px;
  pointer-events: none;
  mask-image: radial-gradient(circle at 75% 40%, rgba(0,0,0,0.6), transparent 70%);
}
.hero-content { max-width: 660px; padding: 96px 0; position: relative; z-index: 2; }
.hero-tag {
  display: inline-block;
  padding: 6px 16px;
  border: 1px solid rgba(224, 164, 104, 0.55);
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: 2px;
  margin-bottom: 22px;
  color: var(--copper-bright);
}
.hero h1 { font-size: 46px; font-weight: 700; line-height: 1.3; margin-bottom: 18px; letter-spacing: 0.5px; color: #fff; }
.hero h1 .accent { color: var(--copper-bright); }
.hero p { font-size: 17px; color: rgba(255, 255, 255, 0.82); margin-bottom: 34px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
  display: inline-block;
  padding: 13px 34px;
  border-radius: 8px;
  font-size: 15px;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  font-family: inherit;
}
.btn-primary { background: var(--cyan); color: #fff; font-weight: 600; }
.btn-primary:hover { background: var(--cyan-strong); box-shadow: 0 8px 22px rgba(18, 42, 76, 0.35); }
.btn-ghost { background: transparent; color: #fff; border: 1px solid rgba(255, 255, 255, 0.5); }
.btn-ghost:hover { border-color: var(--copper-bright); color: var(--copper-bright); }

/* ---------- 通用区块 ---------- */
.section { padding: 92px 0; position: relative; }
.section-soft { background: var(--bg-2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 56px; }
.section-head .kicker {
  display: inline-block;
  color: var(--copper);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 3px;
  margin-bottom: 12px;
}
.section-head h2 { font-size: 32px; color: var(--text); margin-bottom: 14px; letter-spacing: 0.5px; }
.section-head p { color: var(--text-2); font-size: 15px; }

/* 卡片网格 */
.grid { display: grid; gap: 24px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 26px;
  transition: all 0.25s;
  position: relative;
  overflow: hidden;
}
.card::before {
  content: "";
  position: absolute; top: 0; left: 0; width: 100%; height: 3px;
  background: linear-gradient(90deg, var(--cyan), var(--copper-bright));
  opacity: 0; transition: opacity 0.25s;
}
.card:hover { border-color: var(--border-2); transform: translateY(-4px); box-shadow: var(--shadow); }
.card:hover::before { opacity: 1; }
.card .icon {
  width: 52px; height: 52px;
  border-radius: 12px;
  background: var(--cyan-soft);
  color: var(--cyan);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  margin-bottom: 18px;
}
.card h3 { font-size: 18px; color: var(--text); margin-bottom: 10px; }
.card p { font-size: 14px; color: var(--text-2); }

/* 数据条：深藏青底 + 铜金数字 */
.stats-band {
  background: linear-gradient(120deg, #122a4c, #0d1c33);
  color: #fff;
  padding: 60px 0;
}
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; text-align: center; }
.stat-num { font-size: 42px; font-weight: 700; color: var(--copper-bright); }
.stat-num span { font-size: 18px; margin-left: 2px; color: #fff; }
.stat-label { font-size: 14px; color: rgba(255, 255, 255, 0.72); margin-top: 4px; }

/* 产品卡 */
.product-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.25s;
  display: flex;
  flex-direction: column;
}
.product-card:hover { border-color: var(--cyan); transform: translateY(-4px); box-shadow: var(--shadow); }
.product-card .pic { height: 260px; overflow: hidden; border-bottom: 1px solid var(--border); }
.product-card .pic img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.product-card:hover .pic img { transform: scale(1.05); }
.product-body { padding: 28px 26px 30px; flex: 1; display: flex; flex-direction: column; }
.product-body h3 { font-size: 20px; color: var(--text); margin-bottom: 8px; }
.product-body .en { font-size: 12px; color: var(--text-3); letter-spacing: 1px; margin-bottom: 14px; text-transform: uppercase; }
.product-body p { font-size: 14px; color: var(--text-2); margin-bottom: 16px; flex: 1; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  padding: 4px 12px;
  background: var(--copper-soft);
  color: var(--copper-dark);
  border-radius: 999px;
  font-size: 12px;
}

/* 图文分栏 */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split .pic { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow); }
.split h2 { font-size: 30px; color: var(--text); margin-bottom: 16px; }
.split p { color: var(--text-2); font-size: 15px; margin-bottom: 14px; }
.check-list li {
  display: flex; align-items: flex-start; gap: 10px;
  margin-bottom: 12px; font-size: 15px; color: var(--text-2);
}
.check-list li::before {
  content: "✓";
  flex-shrink: 0;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--copper-soft);
  color: var(--copper);
  font-size: 13px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  margin-top: 3px;
}

/* 时间线 */
.timeline { position: relative; max-width: 760px; margin: 0 auto; }
.timeline::before {
  content: "";
  position: absolute;
  left: 12px; top: 6px; bottom: 6px;
  width: 2px;
  background: var(--border-2);
}
.timeline li { position: relative; padding: 0 0 34px 44px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: "";
  position: absolute;
  left: 5px; top: 8px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--copper);
}
.timeline .year { font-size: 18px; font-weight: 700; color: var(--cyan); }
.timeline .desc { font-size: 14px; color: var(--text-2); margin-top: 4px; }

/* 参数表 */
.spec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}
.spec-table th, .spec-table td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--border); }
.spec-table th { background: var(--cyan-strong); color: #fff; font-weight: 600; white-space: nowrap; letter-spacing: 0.5px; }
.spec-table tr:last-child td { border-bottom: none; }
.spec-table tr:hover td { background: var(--bg-2); }
.spec-table td:first-child { font-weight: 600; color: var(--cyan); }

/* CTA：藏青渐变，按钮反铜金 */
.cta-band {
  background: linear-gradient(120deg, #122a4c, #0b1a30);
  color: #fff;
  text-align: center;
  padding: 76px 0;
}
.cta-band h2 { font-size: 30px; margin-bottom: 12px; color: #fff; }
.cta-band p { color: rgba(255, 255, 255, 0.78); margin-bottom: 30px; }
.cta-band .btn-primary { background: var(--copper); }
.cta-band .btn-primary:hover { background: var(--copper-bright); box-shadow: 0 8px 22px rgba(201, 128, 63, 0.4); }

/* ---------- 联系页 ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: 40px; align-items: start; }
.info-card {
  background: #fff;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 30px;
}
.info-card h3 { font-size: 20px; margin-bottom: 24px; color: var(--cyan); }
.info-item { display: flex; gap: 14px; margin-bottom: 22px; align-items: flex-start; }
.info-item:last-child { margin-bottom: 0; }
.info-item .ic {
  flex-shrink: 0;
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--cyan-soft);
  color: var(--cyan);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}
.info-item .k { font-size: 12px; color: var(--text-3); margin-bottom: 2px; }
.info-item .v { font-size: 14px; line-height: 1.6; color: var(--text-2); }

.form-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 32px;
  box-shadow: var(--shadow);
}
.form-card h3 { font-size: 20px; color: var(--text); margin-bottom: 6px; }
.form-card .form-tip { font-size: 13px; color: var(--text-3); margin-bottom: 24px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 6px; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--border-2);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  background: #fff;
  transition: all 0.2s;
  color: var(--text);
}
.form-group input:focus, .form-group textarea:focus {
  outline: none;
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(26, 58, 102, 0.12);
}
.form-group input::placeholder, .form-group textarea::placeholder { color: var(--text-3); }
.form-group textarea { min-height: 120px; resize: vertical; }
.form-msg { font-size: 13px; margin-top: 10px; min-height: 18px; }
.form-msg.ok { color: #2e9e6b; }
.form-msg.err { color: #d05050; }

.my-inquiries { margin-top: 28px; }
.btn-outline {
  background: #fff;
  color: var(--cyan);
  border: 1px solid var(--cyan);
}
.btn-outline:hover { background: var(--cyan-soft); }
.mail-panel {
  margin-top: 14px;
  padding: 16px 18px;
  border: 1px solid var(--copper);
  border-radius: 10px;
  background: var(--copper-soft);
}
.mail-panel-desc { font-size: 13px; color: var(--text-2); margin-bottom: 12px; line-height: 1.7; }
.mail-panel-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.mail-panel-actions .btn { padding: 10px 22px; font-size: 14px; }
.inquiry-item {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px 18px;
  margin-bottom: 12px;
  background: var(--bg-2);
}
.inquiry-item .meta { font-size: 12px; color: var(--text-3); margin-bottom: 6px; display: flex; justify-content: space-between; }
.inquiry-item .content { font-size: 14px; color: var(--text-2); }
.inquiry-item .status {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  background: var(--copper-soft);
  color: var(--copper-dark);
}

/* ---------- 登录页 ---------- */
.auth-wrap {
  min-height: calc(100vh - 76px);
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 50% 0%, rgba(26, 58, 102, 0.06), transparent 55%),
    var(--bg-2);
  padding: 60px 0;
}
.auth-card {
  width: min(420px, 92%);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 40px 36px;
}
.auth-card .brand-mark { margin: 0 auto 14px; }
.auth-logo { height: 38px; width: auto; margin: 0 auto 16px; }
.auth-card h2 { text-align: center; font-size: 22px; color: var(--text); margin-bottom: 4px; }
.auth-card .sub { text-align: center; font-size: 13px; color: var(--text-3); margin-bottom: 28px; }
.auth-tabs { display: flex; border-bottom: 1px solid var(--border); margin-bottom: 26px; }
.auth-tabs button {
  flex: 1;
  background: none;
  border: none;
  padding: 12px 0;
  font-size: 15px;
  color: var(--text-3);
  cursor: pointer;
  font-family: inherit;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.auth-tabs button.active { color: var(--cyan); border-bottom-color: var(--cyan); font-weight: 600; }
.auth-card .btn { width: 100%; margin-top: 6px; }
.auth-note {
  margin-top: 18px;
  font-size: 12px;
  color: var(--text-3);
  text-align: center;
  line-height: 1.6;
}

/* ---------- 页脚：深藏青 ---------- */
.site-footer { background: #0d1a2e; color: rgba(255, 255, 255, 0.72); padding: 64px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.4fr; gap: 36px; margin-bottom: 44px; }
.footer-grid h4 { color: #fff; font-size: 15px; margin-bottom: 16px; }
.footer-grid p, .footer-grid li { font-size: 13px; line-height: 2; color: rgba(255, 255, 255, 0.72); }
.footer-grid a:hover { color: var(--copper-bright); }
.footer-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.footer-logo-box {
  display: inline-flex;
  align-items: center;
  background: #fff;
  border-radius: 8px;
  padding: 7px 12px;
}
.footer-logo-box img { height: 30px; width: auto; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  padding-top: 22px;
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.45);
  flex-wrap: wrap;
  gap: 8px;
}

/* toast */
.toast {
  position: fixed;
  top: 90px;
  left: 50%;
  transform: translateX(-50%) translateY(-16px);
  background: #fff;
  color: var(--text);
  border: 1px solid var(--cyan);
  padding: 12px 26px;
  border-radius: 999px;
  font-size: 14px;
  box-shadow: 0 10px 28px rgba(18, 42, 76, 0.18);
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s;
  z-index: 999;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* 小装饰：分割线 */
.circuit-deco { width: 100%; height: 2px; background:
  linear-gradient(90deg, transparent, var(--border-2) 20%, var(--border-2) 80%, transparent);
  margin: 0; }

/* ---------- 响应式 ---------- */
@media (max-width: 960px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero h1 { font-size: 34px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .grid-4, .grid-2 { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .main-nav { display: none; }
  .section { padding: 60px 0; }
  .brand-logo { height: 34px; }
}

/* ---------- 新闻公告 ---------- */
.news-item {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 38px;
  margin-bottom: 26px;
  box-shadow: 0 6px 18px rgba(18, 42, 76, 0.05);
}
.news-meta { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; flex-wrap: wrap; }
.news-badge {
  display: inline-block;
  padding: 4px 14px;
  background: var(--copper-soft);
  color: var(--copper-dark);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}
.news-date { font-size: 13px; color: var(--text-3); }
.news-title { font-size: 23px; color: var(--text); margin-bottom: 22px; line-height: 1.45; }
.notice-doc { font-size: 15px; color: var(--text-2); line-height: 1.95; }
.notice-doc p { margin-bottom: 14px; }
.notice-doc h4 { font-size: 16px; color: var(--cyan); margin: 22px 0 10px; }
.notice-doc strong { color: var(--text); font-weight: 600; }
.notice-doc a { color: var(--copper-dark); text-decoration: underline; }
.notice-sign { text-align: right; color: var(--text-2); margin-bottom: 4px; }
.news-banner-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.news-banner-text { max-width: 720px; }
.news-banner-text .kicker { margin-bottom: 8px; }
.news-banner-text h2 { font-size: 24px; margin: 8px 0 8px; }
.news-banner-text p { color: var(--text-2); font-size: 15px; }
