/* ENT 企业主题主样式 */
:root {
  --brand: #2b6cff;
  --brand-dark: #1c4fd6;
  --ink: #1f2533;
  --muted: #6b7280;
  --bg: #ffffff;
  --bg-alt: #f5f7fb;
  --line: #e6e9f0;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(31, 37, 51, .08);
  --maxw: 1200px;
}
/* 配色预设 */
body[data-scheme="red"]   { --brand:#e63946; --brand-dark:#c1121f; }
body[data-scheme="green"] { --brand:#1a9e63; --brand-dark:#127a4b; }
body[data-scheme="black"] { --brand:#1f2533; --brand-dark:#0f172a; }
body[data-scheme="purple"]{ --brand:#7c3aed; --brand-dark:#5b21b6; }
body[data-scheme="orange"]{ --brand:#f97316; --brand-dark:#ea580c; }
/* 暗色模式 */
body[data-dark="1"] {
  --bg:#0f172a; --bg-alt:#16203a; --ink:#e6ecf5; --muted:#9aa6bd;
  --line:#26314d; --shadow:0 10px 30px rgba(0,0,0,.4);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink); background: var(--bg); line-height: 1.7; transition: background .3s, color .3s;
}
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-dark); }
img { max-width: 100%; height: auto; }
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.clear { clear: both; }
.section { padding: 72px 0; }
.section-alt { background: var(--bg-alt); }
.section-title { text-align: center; font-size: 32px; font-weight: 800; margin: 0 0 8px; }
.section-lead { text-align: center; color: var(--muted); margin: 0 0 40px; }

/* 顶部栏 */
.topbar { background: var(--ink); color: #cbd5e1; font-size: 13px; }
.topbar .container { display: flex; justify-content: space-between; align-items: center; height: 38px; }
.topbar a { color: #cbd5e1; }
.topbar .tb-right { display: flex; gap: 16px; align-items: center; }
.topbar-ico { margin-right: 5px; }

/* 导航 */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
body[data-dark="1"] .site-header { background: rgba(15,23,42,.94); }
.nav-wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { font-size: 21px; font-weight: 800; color: var(--ink); }
.site-nav > ul { display: flex; gap: 24px; list-style: none; margin: 0; padding: 0; }
.site-nav a { color: var(--ink); font-weight: 500; }
.site-nav a:hover { color: var(--brand); }
.site-nav .nav-ico { margin-right: 4px; }
.site-nav li { position: relative; }
.site-nav .sub { display: none; position: absolute; top: 100%; left: -10px; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); padding: 8px 0; min-width: 160px; }
body[data-dark="1"] .site-nav .sub { background: #16203a; }
.site-nav li:hover > .sub { display: block; }
.site-nav .sub li { padding: 6px 16px; }
.nav-cta { background: var(--brand); color: #fff; padding: 9px 20px; border-radius: 999px; font-weight: 600; font-size: 14px; }
.nav-cta:hover { background: var(--brand-dark); color: #fff; }
.nav-toggle { display: none; background: none; border: none; font-size: 26px; cursor: pointer; color: var(--ink); }

/* Hero 轮播 */
.hero { position: relative; overflow: hidden; }
.hero .slide { display: none; min-height: 460px; align-items: center; background-size: cover; background-position: center; }
.hero .slide.active { display: flex; }
.hero .slide::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(15,23,42,.75), rgba(15,23,42,.25)); }
.hero .slide .container { position: relative; color: #fff; }
.hero-title { font-size: 46px; font-weight: 800; margin: 0 0 12px; }
.hero-sub { font-size: 20px; opacity: .92; margin: 0 0 22px; }
.hero-dots { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; }
.hero-dots span { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,.5); cursor: pointer; }
.hero-dots span.on { background: #fff; }
/* 无 Banner 时降级到纯色 Hero */
.hero-fallback { background: linear-gradient(135deg, var(--brand), var(--brand-dark)); min-height: 420px; display: flex; align-items: center; color: #fff; }

/* 按钮 */
.btn { display: inline-block; padding: 12px 28px; border-radius: 999px; font-weight: 600; font-size: 15px; cursor: pointer; border: none; transition: .2s; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); color: #fff; }
.btn-ghost { background: transparent; color: #fff; border: 1.5px solid #fff; }
.btn-ghost:hover { background: #fff; color: var(--brand); }

/* 公司简介 */
.about-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center; }
.about-text p { color: var(--muted); font-size: 16px; }
.about-img { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 30px; }
.stat { text-align: center; padding: 18px; background: var(--bg-alt); border-radius: var(--radius); }
.stat .num { font-size: 30px; font-weight: 800; color: var(--brand); }
.stat .label { color: var(--muted); font-size: 14px; }

/* 卡片网格 */
.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 24px; box-shadow: var(--shadow); transition: .2s; }
body[data-dark="1"] .card { background: #16203a; }
.card:hover { transform: translateY(-5px); border-color: var(--brand); }
.card-icon { font-size: 32px; margin-bottom: 12px; }
.card h3 { margin: 0 0 8px; font-size: 18px; }
.card p { margin: 0; color: var(--muted); font-size: 14px; }
.card a { color: inherit; }

/* 案例 */
.case-item { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: #fff; }
body[data-dark="1"] .case-item { background: #16203a; }
.case-item img { width: 100%; height: 200px; object-fit: cover; }
.case-body { padding: 18px 20px; }
.case-body h3 { margin: 0 0 6px; font-size: 17px; }
.case-body p { margin: 0; color: var(--muted); font-size: 14px; }

/* 新闻 Tab */
.tabs { display: flex; gap: 10px; justify-content: center; margin-bottom: 30px; }
.tab-btn { padding: 8px 22px; border: 1px solid var(--line); border-radius: 999px; background: #fff; cursor: pointer; font-weight: 600; color: var(--muted); }
body[data-dark="1"] .tab-btn { background:#16203a; }
.tab-btn.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.news-item { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; box-shadow: var(--shadow); }
body[data-dark="1"] .news-item { background:#16203a; }
.news-title { margin: 0 0 6px; font-size: 19px; }
.news-title a { color: var(--ink); }
.news-meta { color: var(--muted); font-size: 13px; margin-bottom: 8px; }
.news-intro { color: #444; margin: 0; }
body[data-dark="1"] .news-intro { color:#cbd5e1; }

/* 合作伙伴 */
.partners { display: flex; gap: 30px; flex-wrap: wrap; justify-content: center; align-items: center; }
.partners img { height: 46px; filter: grayscale(1); opacity: .7; transition: .2s; }
.partners img:hover { filter: none; opacity: 1; }

/* CTA */
.cta { background: linear-gradient(135deg, var(--brand), var(--brand-dark)); color: #fff; text-align: center; border-radius: var(--radius); padding: 56px 24px; }
.cta h2 { font-size: 30px; margin: 0 0 12px; }
.cta p { opacity: .9; margin: 0 0 24px; }
.cta .btn-ghost { border-color: #fff; }

/* 页脚 */
.site-footer { background: #0f172a; color: #cbd5e1; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 30px; padding: 50px 0 30px; }
.footer-grid h4 { color: #fff; font-size: 15px; margin: 0 0 14px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { padding: 5px 0; }
.footer-grid a { color: #cbd5e1; }
.footer-grid a:hover { color: #fff; }
.footer-qr { width: 110px; border-radius: 8px; }
.footer-bottom { border-top: 1px solid #1e293b; padding: 16px 0; font-size: 13px; color: #94a3b8; }
.footer-bottom .container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }

/* 文章内容页 */
.post-container { display: grid; grid-template-columns: 1fr 320px; gap: 36px; align-items: start; }
.post-main { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 34px 36px; box-shadow: var(--shadow); }
body[data-dark="1"] .post-main { background:#16203a; }
.post-title { font-size: 30px; margin: 0 0 12px; }
.post-meta { color: var(--muted); font-size: 13px; border-bottom: 1px solid var(--line); padding-bottom: 14px; margin-bottom: 22px; }
.post-body { font-size: 16px; }
.post-body img { border-radius: 8px; }
.breadcrumb { font-size: 13px; color: var(--muted); margin-bottom: 16px; }
.breadcrumb a { color: var(--muted); }
.side .widget { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 18px; box-shadow: var(--shadow); }
body[data-dark="1"] .side .widget { background:#16203a; }
.side .widget h3 { margin: 0 0 12px; font-size: 16px; }
.side .widget li { list-style: none; padding: 7px 0; border-bottom: 1px dashed var(--line); }
.side .widget li:last-child { border-bottom: none; }

/* 表单 */
.form-row { margin-bottom: 16px; }
.form-row label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 14px; }
.form-row input, .form-row textarea, .form-row select {
  width: 100%; padding: 11px 14px; border: 1px solid var(--line); border-radius: 8px; font: inherit; background: var(--bg); color: var(--ink);
}
.form-row .req { color: #e63946; }
.inquiry-form { max-width: 560px; }
.inquiry-box { background: var(--bg-alt); border-radius: var(--radius); padding: 30px; }

/* 联系页 */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.contact-info li { list-style: none; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.contact-info .k { font-weight: 600; display: inline-block; min-width: 64px; color: var(--brand); }

/* FAQ */
.faq-item { border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 12px; overflow: hidden; }
.faq-q { padding: 16px 20px; font-weight: 600; cursor: pointer; display: flex; justify-content: space-between; align-items: center; background: var(--bg-alt); }
.faq-a { padding: 0 20px; max-height: 0; overflow: hidden; transition: max-height .3s; }
.faq-item.open .faq-a { padding: 16px 20px; max-height: 400px; }

/* 团队 */
.team-card { text-align: center; }
.team-card img { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; margin: 0 auto 14px; box-shadow: var(--shadow); }
.team-card h3 { margin: 0 0 4px; font-size: 18px; }
.team-card .role { color: var(--brand); font-size: 14px; font-weight: 600; }
.team-card p { color: var(--muted); font-size: 14px; margin-top: 8px; }

/* 分页 */
.pagebar { text-align: center; margin-top: 30px; }
.pagebar a, .pagebar span { display: inline-block; padding: 8px 14px; margin: 0 4px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); }
.pagebar .now-page { background: var(--brand); color: #fff; border-color: var(--brand); }

/* 404 */
.error404 .section { text-align: center; }
.error404 .code { font-size: 88px; font-weight: 800; color: var(--brand); margin: 0; }

/* 后台配置面板 */
.ent-admin { max-width: 980px; }
.ent-admin h2 { font-size: 20px; margin: 28px 0 12px; padding-bottom: 8px; border-bottom: 2px solid var(--brand); }
.ent-field { margin-bottom: 16px; }
.ent-field label { display: block; font-weight: 600; margin-bottom: 6px; }
.ent-field input[type=text], .ent-field textarea, .ent-field select, .ent-field input[type=number] {
  width: 100%; max-width: 640px; padding: 9px 12px; border: 1px solid #ccd2dd; border-radius: 6px; font: inherit;
}
.ent-field textarea { min-height: 80px; }
.ent-tabs { display: flex; gap: 6px; border-bottom: 1px solid #e2e8f0; margin-bottom: 20px; flex-wrap: wrap; }
.ent-tab { padding: 10px 16px; cursor: pointer; border: 1px solid transparent; border-bottom: none; border-radius: 8px 8px 0 0; background: #f1f5f9; }
.ent-tab.on { background: #fff; border-color: #e2e8f0; color: var(--brand); font-weight: 700; }
.ent-panel { display: none; }
.ent-panel.on { display: block; }
.ent-sortable li { list-style: none; padding: 10px 14px; background: #fff; border: 1px solid #e2e8f0; border-radius: 8px; margin-bottom: 8px; display: flex; align-items: center; gap: 12px; }
.ent-sortable li .handle { cursor: move; color: #94a3b8; }
.ent-sortable li .hide-chk { margin-left: auto; }
.ent-banner-row { display: grid; grid-template-columns: 1.4fr 1fr 1.4fr 1fr 40px; gap: 8px; margin-bottom: 8px; align-items: center; }
.ent-banner-row input { padding: 7px 10px; border: 1px solid #ccd2dd; border-radius: 6px; width: 100%; }

/* 响应式 */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .site-nav { display: none; position: absolute; top: 68px; left: 0; right: 0; background: var(--bg); border-bottom: 1px solid var(--line); padding: 10px 20px; }
  .site-nav.open { display: block; }
  .site-nav > ul { flex-direction: column; gap: 0; }
  .site-nav li { padding: 10px 0; border-bottom: 1px solid var(--line); }
  .site-nav .sub { position: static; box-shadow: none; border: none; padding-left: 16px; }
  .nav-toggle { display: block; }
  .about-grid, .contact-grid, .post-container { grid-template-columns: 1fr; }
  .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero-title { font-size: 32px; }
  .ent-banner-row { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  .hero-title { font-size: 26px; }
}
