:root {
  --primary-dark: #0E2E1F;
  --primary: #1B7A3E;
  --primary-light: #2E8B57;
  --primary-bright: #43A047;
  --accent: #F37021;
  --accent-light: #FF8C42;
  --text: #0E2E1F;
  --text-secondary: #455A64;
  --text-muted: #7A8B8B;
  --bg: #F6FAF8;
  --bg-white: #FFFFFF;
  --bg-card: rgba(255, 255, 255, 0.96);
  --border: rgba(27, 122, 62, 0.12);
  --shadow: 0 4px 24px rgba(14, 46, 31, 0.08);
  --shadow-lg: 0 20px 60px rgba(14, 46, 31, 0.15);
  --shadow-xl: 0 30px 80px rgba(14, 46, 31, 0.22);
  --radius: 16px;
  --radius-sm: 10px;
  --max-width: 1280px;
  --header-height: 72px;
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; transition: var(--transition); }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
ul, ol { list-style: none; }

.container { width: 92%; max-width: var(--max-width); margin: 0 auto; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 32px; border-radius: 100px; font-size: 16px; font-weight: 600;
  transition: var(--transition); position: relative; overflow: hidden;
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: #fff; box-shadow: 0 8px 24px rgba(27, 122, 62, 0.35);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(27, 122, 62, 0.45); }
.btn-accent {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
  color: #fff; box-shadow: 0 8px 24px rgba(243, 112, 33, 0.35);
}
.btn-accent:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(243, 112, 33, 0.45); }
.btn-outline {
  border: 2px solid var(--primary); color: var(--primary); background: transparent;
}
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-white {
  background: #fff; color: var(--primary); font-weight: 700;
}
.btn-white:hover { background: rgba(255,255,255,0.9); }
.btn-sm { padding: 10px 22px; font-size: 14px; }

/* Typography */
.section-header { text-align: center; margin-bottom: 56px; }
.section-kicker {
  display: inline-block; padding: 6px 18px; border-radius: 100px;
  background: rgba(27, 122, 62, 0.08); color: var(--primary);
  font-size: 14px; font-weight: 700; letter-spacing: 1px; margin-bottom: 16px;
}
.section-title { font-size: 38px; font-weight: 800; line-height: 1.25; margin-bottom: 14px; }
.section-subtitle { font-size: 18px; color: var(--text-secondary); max-width: 680px; margin: 0 auto; }

@media (max-width: 768px) {
  .section-title { font-size: 28px; }
  .section-subtitle { font-size: 16px; }
}

/* Cards */
.card {
  background: var(--bg-card); border-radius: var(--radius);
  box-shadow: var(--shadow); border: 1px solid var(--border);
  transition: var(--transition); overflow: hidden;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }

/* Forms */
.form-group { margin-bottom: 20px; }
.form-label { display: block; margin-bottom: 8px; font-weight: 600; color: var(--text); }
.form-input, .form-textarea, .form-select {
  width: 100%; padding: 14px 18px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); font-size: 15px; background: #fff;
  transition: var(--transition); color: var(--text);
}
.form-input:focus, .form-textarea:focus, .form-select:focus {
  outline: none; border-color: var(--primary-light); box-shadow: 0 0 0 4px rgba(27,122,62,0.08);
}
.form-textarea { min-height: 120px; resize: vertical; }
.form-required { color: var(--accent); margin-left: 4px; }

/* Topbar */
#topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: var(--header-height); background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px); border-bottom: 1px solid var(--border);
  transition: var(--transition);
}
.topbar-inner { display: flex; align-items: center; justify-content: space-between; height: 100%; }
.logo { display: flex; align-items: center; gap: 12px; font-weight: 800; font-size: 22px; color: var(--primary-dark); }
.logo img { height: 42px; width: auto; }
.nav { display: flex; align-items: center; gap: 36px; }
.nav a { font-size: 15px; font-weight: 600; color: var(--text-secondary); position: relative; }
.nav a:hover, .nav a.active { color: var(--primary); }
.nav a::after {
  content: ''; position: absolute; bottom: -6px; left: 0; width: 0; height: 2px;
  background: var(--accent); transition: var(--transition); border-radius: 2px;
}
.nav a:hover::after, .nav a.active::after { width: 100%; }
.menu-toggle { display: none; flex-direction: column; gap: 5px; padding: 8px; }
.menu-toggle span { display: block; width: 24px; height: 2px; background: var(--text); transition: var(--transition); }
.nav-actions { display: flex; align-items: center; gap: 10px; margin-left: 8px; }
.nav-btn { display: inline-flex; align-items: center; justify-content: center; padding: 8px 14px; border-radius: var(--radius-sm); font-size: 13px; font-weight: 700; white-space: nowrap; transition: var(--transition); }
.nav-btn-primary { background: var(--accent); color: #fff; }
.nav-btn-primary:hover { background: #e06016; }
.nav-btn-outline { border: 1px solid var(--primary); color: var(--primary); }
.nav-btn-outline:hover { background: var(--primary); color: #fff; }

@media (max-width: 1024px) {
  .nav-actions { display: none; }
  .menu-toggle { display: flex; }
  .nav {
    display: flex;
    position: fixed;
    top: var(--header-height);
    right: 0;
    width: min(280px, 78vw);
    max-width: 280px;
    height: auto;
    max-height: calc(100vh - var(--header-height));
    min-height: 280px;
    background: rgba(255,255,255,0.98);
    backdrop-filter: blur(12px);
    flex-direction: column;
    padding: 20px 16px;
    gap: 4px;
    box-shadow: -8px 0 32px rgba(14, 46, 31, 0.18);
    border-left: 1px solid var(--border);
    border-radius: 0 0 0 var(--radius);
    transform: translateX(110%);
    opacity: 0;
    visibility: hidden;
    transition: transform .32s cubic-bezier(0.25, 0.8, 0.25, 1), opacity .25s ease, visibility .25s;
    z-index: 999;
  }
  .nav.open {
    transform: translateX(0);
    opacity: 1;
    visibility: visible;
  }
  .nav a {
    font-size: 15px;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    color: var(--text);
  }
  .nav a:hover, .nav a.active {
    background: rgba(27, 122, 62, 0.08);
  }
  .nav a::after { display: none; }
  .menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.35);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s ease, visibility .25s;
  }
  .menu-overlay.open { opacity: 1; visibility: visible; }
}

/* Footer */
.footer { background: var(--primary-dark); color: rgba(255,255,255,0.85); padding: 64px 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 48px; margin-bottom: 48px; }
.footer-brand .logo { color: #fff; margin-bottom: 18px; }
.footer-desc { color: rgba(255,255,255,0.65); font-size: 14px; line-height: 1.8; }
.footer-title { color: #fff; font-size: 16px; font-weight: 700; margin-bottom: 20px; }
.footer-links li { margin-bottom: 12px; }
.footer-links a { color: rgba(255,255,255,0.7); font-size: 14px; }
.footer-links a:hover { color: var(--accent-light); padding-left: 4px; }
.footer-contact p { display: flex; align-items: center; gap: 10px; font-size: 14px; margin-bottom: 10px; color: rgba(255,255,255,0.7); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.08); padding: 24px 0; text-align: center; font-size: 13px; color: rgba(255,255,255,0.5); }
.footer-bottom a { color: rgba(255,255,255,0.5); text-decoration: none; }
.footer-bottom a:hover { color: var(--accent-light); }

@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
}

/* Chat widget */
/* 注意：HTML 中容器为 <div id="chatWidget">（无 class），选择器必须匹配 id */
#chatWidget, .chat-widget { position: fixed; right: 18px; top: 50%; transform: translateY(-50%); z-index: 999; }
.chat-btn {
  width: 60px; height: 60px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: #fff; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgba(27,122,62,0.35); transition: var(--transition);
}
.chat-btn:hover { transform: scale(1.05); }
.chat-panel {
  position: absolute; right: 78px; top: 50%; transform: translateY(-50%);
  width: 360px; height: 500px;
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-lg);
  border: 1px solid var(--border); overflow: hidden; display: none; flex-direction: column;
}
.chat-panel.open { display: flex; }
.chat-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: #fff; padding: 16px 20px; display: flex; align-items: center; gap: 12px;
}
.chat-avatar {
  width: 42px; height: 42px; border-radius: 50%; background: rgba(255,255,255,0.2);
  display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700;
}
.chat-meta h4 { font-size: 16px; margin-bottom: 2px; }
.chat-meta p { font-size: 12px; opacity: 0.9; }
.chat-body { padding: 16px; flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; background: #f9fafb; }
.chat-msg {
  max-width: 85%; padding: 12px 14px; border-radius: 14px; font-size: 14px; line-height: 1.6;
  animation: msgIn .25s ease;
}
@keyframes msgIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.chat-msg.bot { align-self: flex-start; background: #fff; color: var(--text-secondary); border: 1px solid var(--border); border-bottom-left-radius: 4px; }
.chat-msg.user { align-self: flex-end; background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%); color: #fff; border-bottom-right-radius: 4px; }
.chat-msg.action-card { width: 100%; max-width: 100%; }
.chat-msg.action-card p { margin-bottom: 10px; }
.chat-quick { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.chat-quick button {
  padding: 8px 12px; border-radius: 100px; border: 1px solid var(--border);
  background: #fff; color: var(--primary); font-size: 13px; font-weight: 600;
}
.chat-quick button:hover { background: rgba(27,122,62,0.08); }
.chat-footer {
  padding: 12px 14px; border-top: 1px solid var(--border); background: #fff;
  display: flex; gap: 10px;
}
.chat-footer input {
  flex: 1; padding: 10px 14px; border: 1px solid var(--border); border-radius: 100px;
  font-size: 14px; outline: none;
}
.chat-footer input:focus { border-color: var(--primary-light); }
.chat-footer button {
  padding: 10px 18px; border-radius: 100px; background: var(--primary); color: #fff;
  font-size: 14px; font-weight: 600;
}
.chat-footer button:hover { background: var(--primary-light); }
.chat-close { position: absolute; top: 14px; right: 14px; color: #fff; font-size: 22px; cursor: pointer; z-index: 2; }

@media (max-width: 768px) {
  #chatWidget, .chat-widget { top: auto; bottom: 90px; transform: none; right: 12px; }
  .chat-btn { width: 50px; height: 50px; }
  .chat-btn svg { width: 22px; height: 22px; }
  .chat-panel {
    position: fixed; top: auto; bottom: 152px; left: 12px; right: 12px; width: auto;
    height: 62vh; max-height: 460px; transform: none;
    border-radius: var(--radius);
  }
  .chat-header { padding: 14px 16px; }
  .chat-avatar { width: 36px; height: 36px; font-size: 12px; }
  .chat-meta h4 { font-size: 14px; }
  .chat-meta p { font-size: 11px; }
  .chat-body { padding: 12px; }
  .chat-msg { font-size: 13px; padding: 10px 12px; }
  .chat-footer { padding: 10px 12px; }
  .chat-footer input { padding: 8px 12px; font-size: 13px; }
  .chat-footer button { padding: 8px 14px; font-size: 13px; }
  .chat-close { top: 10px; right: 10px; font-size: 20px; }
}

@media (max-width: 375px) {
  #chatWidget, .chat-widget { bottom: 80px; right: 10px; }
  .chat-panel { bottom: 138px; left: 10px; right: 10px; height: 64vh; max-height: 440px; }
}

/* Breadcrumb */
.breadcrumb { padding: 24px 0; font-size: 14px; color: var(--text-muted); }
.breadcrumb a { color: var(--text-secondary); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb span { margin: 0 8px; }

/* Page banner */
.page-banner {
  background: linear-gradient(135deg, #061812 0%, var(--primary-dark) 60%, var(--primary) 100%);
  color: #fff;
  height: 400px;
  min-height: 400px;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}
.page-banner::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 80% 20%, rgba(67,160,71,0.25) 0%, transparent 45%),
              radial-gradient(circle at 20% 80%, rgba(243,112,33,0.12) 0%, transparent 40%);
}
/* 页头横幅背景图（后台可上传，统一 1920×400） */
.page-banner .pb-cover {
  position: absolute; inset: 0; background-size: cover; background-position: center;
}
.page-banner .pb-cover::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(3,12,8,0.78) 0%, rgba(3,12,8,0.5) 55%, rgba(3,12,8,0.3) 100%);
}
.page-banner .container { position: relative; z-index: 1; width: 100%; }
.page-banner h1 { font-size: 44px; font-weight: 800; margin-bottom: 16px; }
.page-banner p { font-size: 18px; opacity: 0.85; max-width: 600px; }

@media (max-width: 768px) {
  .page-banner { height: 280px; min-height: 280px; }
  .page-banner h1 { font-size: 32px; }
}

/* Utility */
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 40px; }
.mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; } .mb-4 { margin-bottom: 40px; }
.text-center { text-align: center; }
.flex { display: flex; } .items-center { align-items: center; } .justify-between { justify-content: space-between; } .gap-2 { gap: 16px; }
.hidden { display: none; }

/* ===== Mobile H5 compact spacing ===== */
@media (max-width: 768px) {
  :root {
    --header-height: 64px;
    --radius: 14px;
    --radius-sm: 8px;
  }
  .btn { padding: 12px 24px; font-size: 15px; }
  .btn-sm { padding: 9px 18px; font-size: 13px; }
  .section { padding: 40px 0; }
  .section-header { margin-bottom: 22px; }
  .section-kicker { font-size: 13px; padding: 5px 14px; margin-bottom: 12px; }
  .section-title { font-size: 24px; margin-bottom: 10px; }
  .section-subtitle { font-size: 15px; }
  .container { width: 94%; }
  .form-input, .form-textarea, .form-select { padding: 12px 14px; font-size: 15px; }
  .mt-4 { margin-top: 28px; }
  .mb-4 { margin-bottom: 28px; }
  .page-banner { height: 220px; min-height: 220px; }
  .page-banner h1 { font-size: 26px; margin-bottom: 10px; }
  .page-banner p { font-size: 15px; }
  .breadcrumb { padding: 16px 0; font-size: 13px; }
  .footer { padding-top: 40px; }
  .footer-grid { gap: 24px; margin-bottom: 28px; }
  .footer-bottom { padding: 16px 0; }
}
@media (max-width: 375px) {
  .section { padding: 30px 0; }
  .section-title { font-size: 22px; }
  .btn { padding: 11px 20px; font-size: 14px; }
}
