/* =========================================================================
   明道热能官网 — 全站样式
   配色：工业深蓝 #0B3C5D / 铝银灰 #8A9BA8 / 橙色 CTA #E67E22
   ========================================================================= */

:root {
  --navy: #0b3c5d;
  --navy-700: #093349;
  --navy-100: #e6eef4;
  --steel: #8a9ba8;
  --orange: #e67e22;
  --orange-dark: #c96a17;
  --ink: #17222b;
  --ink-soft: #4a5a66;
  --line: #e3e8ec;
  --surface: #f5f7f9;
  --white: #fff;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow: 0 1px 3px rgba(11, 60, 93, 0.08);
  --shadow-md: 0 6px 20px rgba(11, 60, 93, 0.1);
  --maxw: 1200px;
  --nav-h: 64px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--white);
  line-height: 1.75;
  font-size: 16px;
}

img { max-width: 100%; display: block; height: auto; }
a { color: var(--navy); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { line-height: 1.35; margin: 0 0 16px; font-weight: 600; color: var(--navy); }
h1 { font-size: 34px; }
h2 { font-size: 28px; }
h3 { font-size: 20px; }
p { margin: 0 0 14px; }

/* 焦点样式：键盘可达性必备，不要删 */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 2px;
  border-radius: 4px;
}

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

.skip-link {
  position: absolute; left: -9999px; top: 0; background: var(--navy); color: var(--white);
  padding: 10px 16px; z-index: 100;
}
.skip-link:focus { left: 8px; top: 8px; }

/* ------------------------------- 顶部工具条 ------------------------------- */
.topbar {
  background: var(--navy-700); color: #cfdbe4; font-size: 13px;
}
.topbar .container {
  display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center;
  justify-content: space-between; min-height: 38px;
}
.topbar a { color: #cfdbe4; }
.topbar .lang-switch { display: inline-flex; gap: 10px; align-items: center; }
.topbar .lang-switch a { padding: 2px 8px; border: 1px solid rgba(255,255,255,.25); border-radius: 4px; }
.topbar .lang-switch a.is-active { background: var(--orange); border-color: var(--orange); color: #fff; }

/* ------------------------------- 导航栏 ------------------------------- */
.navbar {
  position: sticky; top: 0; z-index: 50; background: var(--white);
  border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
}
.navbar .container {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: var(--nav-h);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 8px; background: var(--navy);
  color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 15px; letter-spacing: .5px;
  flex: none;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-size: 16px; color: var(--navy); }
.brand-text span { font-size: 12px; color: var(--steel); letter-spacing: 1px; }

.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-links li { margin: 0; }
.nav-links a {
  display: block; padding: 8px 12px; font-size: 15px; color: var(--ink);
  border-radius: 6px; white-space: nowrap;
}
.nav-links a:hover { background: var(--navy-100); text-decoration: none; }
.nav-links a.is-active { color: var(--navy); font-weight: 600; background: var(--navy-100); }

.nav-toggle {
  display: none; background: none; border: 1px solid var(--line); border-radius: 8px;
  width: 44px; height: 40px; cursor: pointer; padding: 0;
}
.nav-toggle span { display: block; width: 20px; height: 2px; background: var(--navy); margin: 4px auto; }

/* ------------------------------- 按钮 ------------------------------- */
.btn {
  display: inline-block; padding: 12px 22px; border-radius: 8px; font-size: 15px;
  border: 1px solid transparent; cursor: pointer; transition: background .15s, color .15s;
  text-decoration: none; line-height: 1.4;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--orange); color: #fff; }
.btn-primary:hover { background: var(--orange-dark); }
.btn-outline { border-color: rgba(255,255,255,.6); color: #fff; }
.btn-outline:hover { background: rgba(255,255,255,.12); }
.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--navy-700); }
.btn-sm { padding: 8px 16px; font-size: 14px; }

/* ------------------------------- 首屏 ------------------------------- */
.hero {
  position: relative; background: var(--navy); color: #fff; overflow: hidden;
}
.hero-img { position: absolute; inset: 0; }
.hero-img img { width: 100%; height: 100%; object-fit: cover; opacity: .32; }
.hero-inner { position: relative; padding: 96px 0 88px; }
.hero h1 { color: #fff; font-size: 42px; max-width: 18em; margin-bottom: 18px; }
.hero p.lead { color: #dbe6ee; font-size: 17px; max-width: 40em; margin-bottom: 28px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-tags { margin-top: 34px; display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; }
.hero-tags li {
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.22);
  border-radius: 999px; padding: 5px 14px; font-size: 13px; color: #eaf1f6;
}

/* ------------------------------- 通用区块 ------------------------------- */
.section { padding: 72px 0; }
.section-alt { background: var(--surface); }
.section-head { text-align: center; max-width: 46em; margin: 0 auto 44px; }
.section-head h2 { margin-bottom: 10px; }
.section-head p { color: var(--ink-soft); margin: 0; }

.page-hero {
  background: var(--navy); color: #fff; padding: 60px 0 56px;
}
.page-hero h1 { color: #fff; margin-bottom: 12px; }
.page-hero p { color: #dbe6ee; max-width: 44em; margin: 0; }

.breadcrumb { font-size: 13px; color: var(--ink-soft); padding: 14px 0 0; }
.breadcrumb a { color: var(--ink-soft); }

/* ------------------------------- 数据条 ------------------------------- */
.stats { background: var(--white); border-bottom: 1px solid var(--line); }
.stats .container {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; padding: 34px 20px;
}
.stat { text-align: center; }
.stat-num { font-size: 34px; font-weight: 700; color: var(--navy); line-height: 1.1; }
.stat-num small { font-size: 15px; font-weight: 500; color: var(--steel); margin-left: 3px; }
.stat-label { font-size: 14px; color: var(--ink-soft); margin-top: 6px; }

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

.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg);
  overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column;
  transition: transform .15s, box-shadow .15s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.card-media { background: var(--surface); aspect-ratio: 16 / 10; overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.card-body h3 { font-size: 19px; margin-bottom: 8px; }
.card-body p { color: var(--ink-soft); font-size: 15px; }
.card-tags { margin: 14px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.card-tags li {
  font-size: 13px; color: var(--navy); background: var(--navy-100);
  border-radius: 999px; padding: 3px 12px;
}

/* 占位图提示（确认用真实图片后，保留本类也无妨） */
.ph { position: relative; }
.ph::after {
  content: attr(data-ph); position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%);
  font-size: 11px; color: var(--steel); background: rgba(255,255,255,.85);
  border: 1px dashed var(--steel); border-radius: 4px; padding: 2px 8px; white-space: nowrap;
}

/* ------------------------------- 设备页 ------------------------------- */
.equip-group { margin-bottom: 52px; }
.equip-group > h2 { font-size: 24px; border-left: 4px solid var(--orange); padding-left: 12px; }
.equip-item {
  display: grid; grid-template-columns: 320px 1fr; gap: 28px; align-items: start;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 22px; margin-bottom: 20px; box-shadow: var(--shadow);
}
.equip-item .card-media { border-radius: var(--radius); }
.spec-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.spec-table th, .spec-table td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); }
.spec-table th { width: 40%; color: var(--ink-soft); font-weight: 500; }
.spec-table tr:last-child th, .spec-table tr:last-child td { border-bottom: 0; }
.equip-meta { display: flex; flex-wrap: wrap; gap: 10px; margin: 6px 0 14px; }
.equip-meta span {
  font-size: 13px; background: var(--navy-100); color: var(--navy);
  border-radius: 6px; padding: 3px 10px;
}

/* ------------------------------- 产品筛选 ------------------------------- */
.filters { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 32px; }
.filter-btn {
  border: 1px solid var(--line); background: var(--white); border-radius: 999px;
  padding: 8px 18px; font-size: 14px; cursor: pointer; color: var(--ink);
}
.filter-btn.is-active { background: var(--navy); border-color: var(--navy); color: #fff; }

/* ------------------------------- 关于页 ------------------------------- */
.about-media { border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); }
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before {
  content: ""; position: absolute; left: 78px; top: 8px; bottom: 8px; width: 2px; background: var(--line);
}
.timeline li { position: relative; display: grid; grid-template-columns: 60px 1fr; gap: 40px; padding: 0 0 26px; }
.timeline .year { font-weight: 700; color: var(--navy); font-size: 17px; }
.timeline .event { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; box-shadow: var(--shadow); }

.cert-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.cert-list li {
  background: var(--white); border: 1px solid var(--line); border-left: 3px solid var(--orange);
  border-radius: var(--radius); padding: 14px 18px; font-size: 15px; box-shadow: var(--shadow);
}

/* ------------------------------- 新闻 ------------------------------- */
.news-item { display: grid; grid-template-columns: 260px 1fr; gap: 24px; align-items: start; margin-bottom: 26px; }
.news-item .card-media { border-radius: var(--radius); }
.news-date { font-size: 13px; color: var(--steel); letter-spacing: .5px; }
.news-item h3 { margin: 4px 0 8px; }

/* ------------------------------- FAQ ------------------------------- */
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary {
  cursor: pointer; padding: 16px 4px; font-size: 17px; font-weight: 600; color: var(--navy);
  list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; color: var(--orange); font-size: 22px; font-weight: 400; }
.faq-item[open] summary::after { content: "−"; }
.faq-item p { padding: 0 4px 18px; margin: 0; color: var(--ink-soft); }

/* ------------------------------- 联系页 ------------------------------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.info-list { list-style: none; margin: 0; padding: 0; }
.info-list li { display: grid; grid-template-columns: 84px 1fr; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.info-list dt, .info-list .k { color: var(--ink-soft); font-size: 14px; }
.info-list .v { font-size: 15px; }

.form-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 28px; box-shadow: var(--shadow-md); }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 14px; margin-bottom: 6px; color: var(--ink); font-weight: 500; }
.field input, .field textarea, .field select {
  width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 8px;
  font-size: 15px; font-family: inherit; background: var(--white); color: var(--ink);
}
.field input:focus, .field textarea:focus { border-color: var(--navy); }
.field textarea { min-height: 110px; resize: vertical; }
.form-note { font-size: 13px; color: var(--ink-soft); margin-top: 10px; }
.form-status { margin-top: 14px; font-size: 14px; display: none; }
.form-status.is-ok { display: block; color: #1d7a4c; }
.form-status.is-err { display: block; color: #b3261e; }

/* ------------------------------- CTA 区块 ------------------------------- */
.cta-band { background: var(--navy); color: #fff; padding: 64px 0; text-align: center; }
.cta-band h2 { color: #fff; }
.cta-band p { color: #dbe6ee; max-width: 40em; margin: 0 auto 26px; }

/* ------------------------------- 页脚 ------------------------------- */
.footer { background: var(--navy-700); color: #c3d2dd; padding: 56px 0 24px; font-size: 14px; }
.footer h4 { color: #fff; font-size: 15px; margin-bottom: 14px; }
.footer-cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 32px; }
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer ul li { margin-bottom: 8px; }
.footer a { color: #c3d2dd; }
.footer a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.14); margin-top: 36px; padding-top: 18px;
  display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between; font-size: 13px; color: #9fb2c0;
}

/* ------------------------------- 悬浮工具条 ------------------------------- */
.float-bar {
  position: fixed; right: 16px; bottom: 16px; z-index: 60; display: flex; flex-direction: column; gap: 10px;
}
.float-btn {
  width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--white); box-shadow: var(--shadow-md); display: grid; place-items: center;
  cursor: pointer; color: var(--navy); font-size: 13px; padding: 0;
}
.float-btn:hover { background: var(--navy-100); }
#toTop { display: none; }

/* ------------------------------- 响应式 ------------------------------- */
@media (max-width: 1000px) {
  .nav-links {
    position: absolute; top: 100%; left: 0; right: 0; background: var(--white);
    flex-direction: column; align-items: stretch; gap: 0; padding: 8px;
    border-bottom: 1px solid var(--line); box-shadow: var(--shadow-md);
    display: none;
  }
  .nav-links.is-open { display: flex; }
  .nav-links a { padding: 12px 14px; }
  .nav-toggle { display: block; }
  .navbar { position: relative; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .footer-cols { grid-template-columns: repeat(2, 1fr); }
  .equip-item { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .news-item { grid-template-columns: 1fr; }
  .cert-list { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  body { font-size: 15px; }
  h1 { font-size: 26px; }
  h2 { font-size: 22px; }
  .hero-inner { padding: 60px 0 52px; }
  .hero h1 { font-size: 28px; }
  .section { padding: 48px 0; }
  .stats .container { grid-template-columns: repeat(2, 1fr); gap: 24px 10px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .footer-cols { grid-template-columns: 1fr; }
  .cert-list { grid-template-columns: 1fr; }
  .timeline::before { left: 30px; }
  .timeline li { grid-template-columns: 1fr; gap: 8px; padding-left: 56px; }
  .timeline .year { position: absolute; left: 0; top: 14px; font-size: 14px; }
  .info-list li { grid-template-columns: 1fr; gap: 2px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card:hover { transform: none; }
}
