/* ===== 中企界官网 · 单页样式 ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --brand: #e60606;
  --brand-dark: #b80000;
  --brand-light: #ffe5e5;
  --text: #222;
  --text-sub: #666;
  --bg-light: #f7f7f7;
  --border: #e6e6e6;
}

html { scroll-behavior: smooth; }

body {
  font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", sans-serif;
  color: var(--text);
  line-height: 1.7;
  background: #fff;
}

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

a { text-decoration: none; color: inherit; }

/* ===== 顶部导航 ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 10px rgba(0,0,0,0.04);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-logo {
  width: 40px; height: 40px;
  border-radius: 6px;
  object-fit: contain;
  overflow: hidden;
  display: block;
  background: var(--brand);
}
.brand-name {
  font-size: 26px;
  font-weight: 800;
  color: #000;
  letter-spacing: 2px;
}
.official-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  background: #1aad19;
  padding: 2px 8px;
  border-radius: 4px;
  margin-left: 6px;
  line-height: 1.4;
  vertical-align: middle;
  letter-spacing: 1px;
}
.site-nav { display: flex; gap: 36px; }
.site-nav a {
  font-size: 16px;
  color: #000;
  font-weight: 600;
  transition: color .2s;
}
.site-nav a:hover { color: var(--brand); }

/* ===== 首屏 ===== */
.hero {
  background: var(--brand);
  color: #fff;
  min-height: 480px;
  padding: 0;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
.hero-inner {
  width: 100%;
  max-width: none;
  padding: 0 36px;
  text-align: center;
}
.hero-brand {
  font-size: 96px;
  font-weight: 900;
  letter-spacing: 12px;
  margin-bottom: 40px;
  text-shadow: 0 4px 20px rgba(0,0,0,.18);
}
.hero-brand span { color: var(--brand-light); }
.hero-slogan p {
  font-size: 24px;
  font-weight: 600;
  margin: 10px 0;
  letter-spacing: 1px;
}
.btn {
  display: block !important;
  width: max-content !important;
  margin: 42px auto 0 !important;
  padding: 14px 46px;
  border-radius: 999px;
  font-size: 18px;
  font-weight: 700;
  transition: transform .15s, box-shadow .15s;
}
.btn-primary {
  background: #fff;
  color: var(--brand);
  box-shadow: 0 6px 20px rgba(0,0,0,.15);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(0,0,0,.22);
}

/* ===== 通用区块 ===== */
.section { padding: 80px 0; }
.section-title {
  text-align: center;
  font-size: 34px;
  font-weight: 800;
  margin-bottom: 12px;
}
.section-title::after {
  content: "";
  display: block;
  width: 56px;
  height: 4px;
  background: var(--brand);
  border-radius: 2px;
  margin: 16px auto 0;
}
.section-sub {
  text-align: center;
  color: var(--text-sub);
  font-size: 15px;
  margin-bottom: 40px;
}

/* ===== 板块网格（3列2行） ===== */
#modules .container {
  max-width: none;
  padding: 0 36px;
}
.modules-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.mod-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: box-shadow .2s, border-color .2s;
}
.mod-card:hover {
  box-shadow: 0 6px 20px rgba(230,6,6,.10);
  border-color: var(--brand);
}
.mod-head {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 22px 22px;
  background: #fff;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: background .2s;
}
.mod-head:hover { background: var(--bg-light); }
.mod-no {
  font-size: 15px;
  font-weight: 700;
  color: var(--brand);
  font-style: italic;
}
.mod-icon {
  width: 36px; height: 36px;
  flex-shrink: 0;
  background: var(--brand);
  color: #fff;
  border-radius: 50%;
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mod-title {
  flex: 1;
  font-size: 19px;
  font-weight: 700;
}
.mod-arrow {
  width: 12px; height: 12px;
  border-right: 2.5px solid var(--text-sub);
  border-bottom: 2.5px solid var(--text-sub);
  transform: rotate(45deg);
  transition: transform .25s;
  flex-shrink: 0;
}
.mod-card.open .mod-arrow { transform: rotate(-135deg); }
.mod-card.open .mod-head { background: #fff5f5; }
.mod-card.open .mod-title { color: var(--brand); }

.mod-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height .3s ease;
  background: var(--bg-light);
}
.mod-body-inner {
  padding: 0 22px 22px 22px;
  color: var(--text-sub);
  font-size: 15px;
}
.mod-card.open .mod-body-inner { padding-top: 4px; }

/* ===== 标语带 ===== */
.slogan-band {
  background: var(--brand);
  color: #fff;
  padding: 70px 0;
  text-align: center;
}
.slogan-line {
  font-size: 26px;
  font-weight: 700;
  margin: 14px 0;
  letter-spacing: 1px;
}
.slogan-line:first-child { color: var(--brand-light); }
.slogan-line:last-child { color: #fff; }

/* ===== 扫码加入 ===== */
.join-section { background: var(--bg-light); }
.join-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 48px;
  flex-wrap: wrap;
}
.join-qr { text-align: center; }
.qr-title {
  font-size: 26px;
  font-weight: 800;
  color: #000;
  margin-bottom: 24px;
  letter-spacing: 2px;
}
.qr-box {
  width: 200px; height: 200px;
  background: #fff;
  border: 2px solid var(--border);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  overflow: hidden;
}
.qr-box img { width: 100%; height: 100%; object-fit: contain; padding: 12px; }
.qr-tip {
  color: #bbb;
  font-size: 15px;
  text-align: center;
  line-height: 1.8;
  padding: 10px;
}
.qr-tip span { font-size: 12px; color: #ccc; }
.qr-captions {
  display: flex;
  justify-content: center;
  gap: 48px;
  margin-top: 24px;
  flex-wrap: wrap;
}
.qr-caption {
  margin-top: 0;
  font-size: 16px;
  font-weight: 600;
  color: #000;
}

/* ===== 页脚 ===== */
.site-footer {
  background: var(--brand);
  color: #f0d0d0;
  text-align: center;
  padding: 40px 0;
}
.footer-company { font-size: 16px; color: #fff; margin-bottom: 10px; }
.footer-icp { font-size: 14px; margin-bottom: 8px; }
.footer-icp a:hover { color: #fff; }
.footer-sep { display: inline-block; margin: 0 8px; color: #f0d0d0; }
.footer-copy { font-size: 13px; color: #ffe5e5; }

/* ===== 响应式（移动端） ===== */
@media (max-width: 992px) {
  .modules-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .header-inner { height: 58px; }
  .brand-name { font-size: 22px; }
  .brand-logo { width: 34px; height: 34px; }
  .site-nav { gap: 18px; }
  .site-nav a { font-size: 14px; }

  .hero { min-height: 360px; padding: 0; }
  .hero-brand { font-size: 54px; letter-spacing: 6px; margin-bottom: 20px; }
  .hero-slogan p { font-size: 16px; margin: 6px 0; }
  .btn { padding: 12px 36px; font-size: 16px; margin-top: 24px; }

  .section { padding: 56px 0; }
  .section-title { font-size: 26px; }

  .modules-grid { grid-template-columns: 1fr; gap: 16px; }
  .mod-head { padding: 18px 18px; gap: 12px; }
  .mod-title { font-size: 17px; }
  .mod-icon { width: 32px; height: 32px; font-size: 14px; }
  .mod-body-inner { padding: 0 18px 18px 18px; font-size: 15px; }

  .slogan-band { padding: 50px 0; }
  .slogan-line { font-size: 18px; }

  .join-inner { flex-direction: column; text-align: center; }
}

/* ===== 站点配置编辑 ===== */
.cfg-gear {
  position: fixed;
  right: 16px;
  bottom: 16px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: var(--brand);
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,.2);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .2s;
}
.cfg-gear:hover { transform: rotate(60deg); }

.cfg-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 300;
  padding: 20px;
}
.cfg-modal.cfg-open { display: flex; }

.cfg-panel {
  background: #fff;
  border-radius: 12px;
  padding: 28px;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 12px 40px rgba(0,0,0,.2);
  max-height: 88vh;
  overflow-y: scroll;
}
/* 编辑面板滚动条始终可见 */
.cfg-panel::-webkit-scrollbar { width: 8px; }
.cfg-panel::-webkit-scrollbar-track { background: #f1f1f1; border-radius: 4px; }
.cfg-panel::-webkit-scrollbar-thumb { background: #ccc; border-radius: 4px; }
.cfg-panel::-webkit-scrollbar-thumb:hover { background: var(--brand); }
.cfg-panel h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--brand);
  text-align: center;
}
.cfg-panel label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #333;
  margin: 14px 0 6px;
}
.cfg-panel input[type="text"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 15px;
  box-sizing: border-box;
  outline: none;
  transition: border-color .15s;
}
.cfg-panel input[type="text"]:focus { border-color: var(--brand); }
.cfg-panel textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
  line-height: 1.6;
  box-sizing: border-box;
  outline: none;
  resize: vertical;
  min-height: 44px;
  transition: border-color .15s;
}
.cfg-panel textarea:focus { border-color: var(--brand); }
.cfg-panel input[type="file"] {
  font-size: 14px;
  padding: 8px;
  border: 1px dashed var(--border);
  border-radius: 8px;
  width: 100%;
  box-sizing: border-box;
}
.cfg-actions {
  display: flex;
  gap: 10px;
  margin-top: 22px;
  flex-wrap: wrap;
}
.cfg-actions button {
  flex: 1;
  min-width: 100px;
  padding: 10px 16px;
  border-radius: 8px;
  border: none;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  background: var(--brand);
  color: #fff;
  transition: opacity .15s;
}
.cfg-actions button:hover { opacity: .85; }
.cfg-actions .cfg-secondary {
  background: #eee;
  color: #555;
}
.cfg-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
}
.cfg-tab {
  flex: 0 0 auto;
  white-space: nowrap;
  padding: 6px 14px;
  border: none;
  background: #f5f5f5;
  border-radius: 6px 6px 0 0;
  font-size: 14px;
  font-weight: 600;
  color: #666;
  cursor: pointer;
  transition: all .15s;
}
.cfg-tab:hover { color: var(--brand); }
.cfg-tab.cfg-tab-active {
  background: var(--brand);
  color: #fff;
}
.cfg-tab-pane { display: block; }
.cfg-tab-pane-hidden { display: none; }

.cfg-card-editor {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 12px;
  background: #fafafa;
}
.cfg-card-head {
  font-size: 13px;
  font-weight: 700;
  color: var(--brand);
  margin-bottom: 8px;
}
.cfg-card-editor label {
  margin: 6px 0;
  font-size: 13px;
}
.cfg-card-editor input[type="text"] {
  padding: 6px 10px;
  font-size: 14px;
}
.cfg-card-editor textarea {
  width: 100%;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  box-sizing: border-box;
  resize: vertical;
  outline: none;
}
.cfg-card-editor textarea:focus { border-color: var(--brand); }
