/* ============================================================
   华辉应急安全官网 - 全站公共样式 common.css
   ============================================================ */

/* ---------- Reset ---------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --primary: #00A0E9;
  --primary-dark: #0078B3;
  --primary-light: #33B3ED;
  --accent: #E53935;
  --accent-dark: #C62828;
  --text-dark: #1a2332;
  --text-body: #4a5568;
  --text-light: #718096;
  --bg-white: #ffffff;
  --bg-light: #f5f8fb;
  --bg-dark: #0d1b2a;
  --bg-darker: #08111c;
  --border: #e2e8f0;
  --shadow-sm: 0 2px 10px rgba(13,27,42,.07);
  --shadow-md: 0 10px 34px rgba(13,27,42,.12);
  --shadow-lg: 0 24px 70px rgba(13,27,42,.18);
  --radius: 10px;
  --radius-lg: 18px;
  --nav-h: 78px;
  --ease: .35s cubic-bezier(.4,0,.2,1);
  --font-body: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-heading: 'Noto Sans SC', -apple-system, 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 10px); }

body {
  font-family: var(--font-body);
  font-size: 16px; line-height: 1.85; color: var(--text-body);
  background: var(--bg-white); overflow-x: hidden; -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; transition: var(--ease); }
ul { list-style: none; }
button { border: none; background: none; cursor: pointer; font-family: inherit; }
h1,h2,h3,h4 { font-family: var(--font-heading); color: var(--text-dark); line-height: 1.35; font-weight: 700; }

/* ---------- 布局 ---------- */
.container { max-width: 1240px; margin: 0 auto; padding: 0 32px; }
.section { padding: 100px 0; position: relative; }
.bg-light { background: var(--bg-light); }
.text-center { text-align: center; }
.mt-2 { margin-top: 16px; } .mt-4 { margin-top: 32px; }

/* ---------- 板块标题 ---------- */
.section-head { margin-bottom: 60px; }
.section-head.text-left { text-align: left; }
.section-head.text-center { text-align: center; }
.section-eyebrow {
  display: block; font-size: 14px; font-weight: 700; letter-spacing: 3px;
  color: var(--primary); text-transform: uppercase; margin-bottom: 14px;
}
.section-title { font-size: 38px; font-weight: 800; color: var(--text-dark); letter-spacing: 1px; }
.section-desc { margin-top: 16px; color: var(--text-light); font-size: 16px; }
.section-head.text-center .section-bar { margin: 22px auto 0; }
.section-bar { width: 64px; height: 4px; border-radius: 4px; background: linear-gradient(90deg,var(--primary),var(--primary-light)); margin: 22px 0 0; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px; padding: 14px 34px;
  border-radius: 50px; font-size: 15px; font-weight: 600; cursor: pointer;
  transition: var(--ease); white-space: nowrap; position: relative; overflow: hidden;
}
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 10px 26px rgba(0,160,233,.32); }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-3px); box-shadow: 0 16px 34px rgba(0,160,233,.4); }
.btn-outline { border: 2px solid rgba(255,255,255,.85); color: #fff; background: rgba(255,255,255,.06); backdrop-filter: blur(6px); }
.btn-outline:hover { background: #fff; color: var(--primary-dark); transform: translateY(-3px); }
.btn-ghost { border: 2px solid var(--primary); color: var(--primary); background: transparent; }
.btn-ghost:hover { background: var(--primary); color: #fff; }
.btn svg { width: 18px; height: 18px; }

/* ============================================================
   导航
   ============================================================ */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; height: var(--nav-h); z-index: 1000;
  display: flex; align-items: center; transition: var(--ease);
  background: rgba(255,255,255,.92); backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(226,232,240,.6);
}
.site-header.scrolled { box-shadow: var(--shadow-sm); background: rgba(255,255,255,.97); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; width: 100%; height: 100%; }
.nav-logo { display: flex; align-items: center; height: 100%; }
.nav-logo img { height: 52px; width: auto; object-fit: contain; }
.nav-menu { display: flex; align-items: center; gap: 6px; }
.nav-link {
  padding: 10px 16px; font-size: 15.5px; font-weight: 500; color: var(--text-body);
  border-radius: 8px; position: relative; white-space: nowrap;
}
.nav-link::after {
  content: ''; position: absolute; left: 50%; bottom: 4px; width: 0; height: 2px;
  background: var(--primary); transition: var(--ease); transform: translateX(-50%);
}
.nav-link:hover { color: var(--primary); }
.nav-link:hover::after, .nav-link.active::after { width: 26px; }
.nav-link.active { color: var(--primary); font-weight: 700; }
/* 内页「联系我们」与其他导航保持一致的普通文字链接 */
.nav-cta { margin-left: 0; }
.nav-toggle { display: none; flex-direction: column; gap: 5px; padding: 8px; }
.nav-toggle span { width: 26px; height: 2.5px; background: var(--text-dark); border-radius: 2px; transition: var(--ease); }

/* ============================================================
   内页顶部横幅
   ============================================================ */
.page-hero {
  position: relative; padding: 150px 0 90px; color: #fff; overflow: hidden;
  background: linear-gradient(120deg, rgba(8,17,28,.92), rgba(0,120,179,.78)), var(--primary-dark);
}
.page-hero img.ph-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.page-hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg,rgba(8,17,28,.55),rgba(8,17,28,.82)); z-index: -1; }
.page-hero h1 { color: #fff; font-size: 44px; font-weight: 800; letter-spacing: 2px; margin: 0; }
.page-hero .ph-eyebrow { font-size: 14px; letter-spacing: 4px; color: var(--primary-light); font-weight: 700; margin-bottom: 20px; text-transform: uppercase; }
.breadcrumb { margin-top: 20px; display: flex; align-items: center; gap: 10px; font-size: 14.5px; color: rgba(255,255,255,.75); }
.breadcrumb a:hover { color: #fff; }
.breadcrumb .sep { opacity: .5; }
.breadcrumb .current { color: #fff; }

/* ============================================================
   富文本内容（页面/业绩详情）
   ============================================================ */
.rich-content { font-size: 16.5px; line-height: 2; color: var(--text-body); }
.rich-content h2, .rich-content h3, .rich-content h4 { margin: 34px 0 16px; color: var(--text-dark); }
.rich-content h2 { font-size: 27px; } .rich-content h3 { font-size: 22px; } .rich-content h4 { font-size: 19px; }
.rich-content p { margin: 16px 0; }
.rich-content ul, .rich-content ol { margin: 16px 0; padding-left: 26px; }
.rich-content ul { list-style: disc; } .rich-content ol { list-style: decimal; }
.rich-content li { margin: 8px 0; }
.rich-content img { border-radius: var(--radius); margin: 22px auto; box-shadow: var(--shadow-md); }
.rich-content a { color: var(--primary); border-bottom: 1px solid var(--primary-light); }
.rich-content blockquote { margin: 22px 0; padding: 16px 24px; border-left: 4px solid var(--primary); background: var(--bg-light); border-radius: 0 var(--radius) var(--radius) 0; color: var(--text-body); }
.rich-content table { width: 100%; border-collapse: collapse; margin: 22px 0; }
.rich-content th, .rich-content td { border: 1px solid var(--border); padding: 12px 14px; text-align: left; }
.rich-content th { background: var(--bg-light); font-weight: 700; }
.rich-content strong { color: var(--text-dark); font-weight: 700; }

/* ============================================================
   页脚
   ============================================================ */
.site-footer { background: var(--bg-darker); color: rgba(255,255,255,.7); padding-top: 76px; position: relative; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1.2fr; gap: 50px; padding-bottom: 54px; }
.footer-brand img { height: 48px; margin-bottom: 22px; filter: brightness(0) invert(1); }
.footer-brand h3 { color: #fff; font-size: 19px; margin-bottom: 16px; }
.footer-brand p { font-size: 14.5px; line-height: 1.9; color: rgba(255,255,255,.6); }
.footer-title { color: #fff; font-size: 16.5px; margin-bottom: 24px; font-weight: 700; position: relative; padding-bottom: 12px; }
.footer-title::after { content: ''; position: absolute; left: 0; bottom: 0; width: 34px; height: 3px; background: var(--primary); border-radius: 3px; }
.footer-contact li { display: flex; gap: 12px; margin-bottom: 16px; font-size: 14.5px; align-items: flex-start; }
.footer-contact .ic { color: var(--primary-light); flex-shrink: 0; margin-top: 3px; }
.footer-contact svg { width: 18px; height: 18px; }
.footer-qr { text-align: center; }
.footer-qr .qr-box { display: inline-block; background: #fff; padding: 10px; border-radius: 12px; box-shadow: var(--shadow-md); }
.footer-qr img { width: 148px; height: 148px; border-radius: 6px; }
.footer-qr .qr-tip { margin-top: 14px; font-size: 14px; color: rgba(255,255,255,.75); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); padding: 24px 0; text-align: center; font-size: 13.5px; color: rgba(255,255,255,.5); }
.footer-bottom a:hover { color: var(--primary-light); }
.footer-bottom .police { margin-left: 14px; }

/* ---------- 返回顶部 ---------- */
.back-top {
  position: fixed; right: 28px; bottom: 28px; width: 48px; height: 48px; border-radius: 50%;
  background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 26px rgba(0,160,233,.4); opacity: 0; visibility: hidden; transform: translateY(16px); transition: var(--ease); z-index: 900;
}
.back-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.back-top:hover { background: var(--primary-dark); transform: translateY(-4px); }
.back-top svg { width: 22px; height: 22px; }

/* ---------- 通用动画 ---------- */
.reveal { opacity: 0; transform: translateY(36px); transition: opacity .8s cubic-bezier(.16,1,.3,1), transform .8s cubic-bezier(.16,1,.3,1); }
.reveal.in { opacity: 1; transform: none; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }

/* ---------- 加载/空状态 ---------- */
.loading-wrap { text-align: center; padding: 60px 0; color: var(--text-light); }
.spinner { width: 42px; height: 42px; border: 3.5px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin .8s linear infinite; margin: 0 auto 16px; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty-state { text-align: center; padding: 70px 20px; color: var(--text-light); }
.empty-state svg { width: 64px; height: 64px; margin-bottom: 16px; opacity: .4; }

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 992px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
  .footer-qr { grid-column: 1 / -1; }
}
@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  .nav-menu {
    position: fixed; top: var(--nav-h); left: 0; right: 0; flex-direction: column; align-items: stretch;
    background: #fff; padding: 14px 24px 26px; gap: 4px; box-shadow: var(--shadow-md);
    transform: translateY(-130%); transition: transform .4s cubic-bezier(.4,0,.2,1); height: auto; max-height: calc(100vh - var(--nav-h)); overflow-y: auto;
  }
  .nav-menu.open { transform: translateY(0); }
  .nav-link { padding: 13px 12px; font-size: 16px; border-radius: 8px; }
  .nav-link::after { display: none; }
  .nav-toggle.active span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
  .nav-toggle.active span:nth-child(2) { opacity: 0; }
  .nav-toggle.active span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }
  .section { padding: 72px 0; }
  .section-title { font-size: 30px; }
  .page-hero { padding: 124px 0 64px; }
  .page-hero h1 { font-size: 32px; }
  .container { padding: 0 20px; }
}
@media (max-width: 600px) {
  .footer-grid { grid-template-columns: 1fr; gap: 36px; }
  .section-head { margin-bottom: 42px; }
}

/* ============================================================
   页面可视化配置（PageBuilder）内容块
   ============================================================ */
.pb-mount { width: 100%; }
.pb-block { margin-bottom: 28px; }
.pb-block:last-child { margin-bottom: 0; }

/* 文本块 */
.pb-text p { margin: 12px 0; }
.pb-text h3, .pb-text h4 { margin: 18px 0 10px; }
.pb-text img { max-width: 100%; border-radius: 8px; }
.pb-text ul, .pb-text ol { padding-left: 22px; margin: 12px 0; }

/* 图文块 */
.pb-richtext { display: flex; }
.pb-richtext.img-left { flex-direction: row; }
.pb-richtext.img-right { flex-direction: row-reverse; }
.pb-richtext.img-top { flex-direction: column; }
.pb-richtext.img-bottom { flex-direction: column-reverse; }
.pb-richtext .pb-rt-body { flex: 1; min-width: 0; }
.pb-richtext .pb-rt-img { flex-shrink: 0; }
.pb-rt-html p { margin: 12px 0; }
.pb-rt-html h3, .pb-rt-html h4 { margin: 18px 0 10px; }
.pb-rt-html img { max-width: 100%; border-radius: 8px; }
.pb-rt-html ul, .pb-rt-html ol { padding-left: 22px; margin: 12px 0; }

/* 列表块 */
.pb-list-ul { margin: 0; padding-left: 22px; column-gap: 42px; }
.pb-list-ul li { margin: 8px 0; break-inside: avoid; }
.pb-list-ul[style*="list-style:none"] { padding-left: 0; }

@media (max-width: 760px) {
  .pb-richtext.img-left, .pb-richtext.img-right { flex-direction: column; }
  .pb-richtext.img-right .pb-rt-img { order: 0; }
  .pb-list-ul { columns: 1 !important; }
}
