/* ============================================================
   语轩设计官网 - 全站样式
   ============================================================ */
:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #a5b4fc;
  --info: #38bdf8;
  --ink: #0f172a;
  --muted: #64748b;
  --bg: #ffffff;
  --bg-soft: #f8fafc;
  --border: #e2e8f0;
  --danger: #ef4444;
  --success: #22c55e;
  --radius: 16px;
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, .06), 0 1px 2px rgba(15, 23, 42, .04);
  --shadow-lg: 0 12px 32px rgba(15, 23, 42, .10);
  --grad: linear-gradient(135deg, var(--primary) 0%, #7c3aed 55%, var(--info) 100%);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; font-size: 14px; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section { padding: 72px 0; }
.section-soft { background: var(--bg-soft); }

.section-head { text-align: center; margin-bottom: 48px; }
.section-eyebrow {
  display: inline-block; color: var(--primary); font-size: 13px;
  font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
}
.section-title { font-size: 32px; font-weight: 700; margin: 8px 0 12px; letter-spacing: -.01em; }
.section-desc { color: var(--muted); max-width: 640px; margin: 0 auto; }

/* ---------- 顶部导航 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.9); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; }
.brand-mark {
  width: 36px; height: 36px; border-radius: 10px; background: var(--grad);
  color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 16px;
}
.brand-sub { font-size: 11px; color: var(--muted); font-weight: 400; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a, .nav-links .nav-link { font-size: 15px; color: #334155; font-weight: 500; transition: color .2s; }
.nav-links a:hover, .nav-links a.active, .nav-links .nav-link:hover, .nav-links .nav-item:hover > .nav-link { color: var(--primary); }

/* ---------- VBA简易通 导航下拉 ---------- */
.nav-item { position: relative; display: flex; align-items: center; }
.nav-caret { font-size: 11px; color: #94a3b8; margin-left: 3px; transition: transform .2s; }
.nav-item:hover .nav-caret { transform: rotate(180deg); color: var(--primary); }
.drop-menu { position: absolute; top: calc(100% + 12px); left: -10px; min-width: 190px; background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; box-shadow: 0 12px 32px rgba(15,23,42,.12); padding: 8px; opacity: 0; visibility: hidden; transform: translateY(6px); transition: all .2s; z-index: 50; }
.nav-item:hover .drop-menu { opacity: 1; visibility: visible; transform: none; }
.drop-item { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 8px; font-size: 14px; color: #334155; font-weight: 500; white-space: nowrap; }
.drop-item:hover { background: #f1f5f9; color: var(--primary); }
.drop-item .di-ico { width: 30px; height: 30px; border-radius: 8px; background: #eef2ff; color: var(--primary); display: flex; align-items: center; justify-content: center; font-size: 15px; flex: none; }

/* ---------- VBA简易通 免费使用弹窗 ---------- */
.vba-trial-mask { position: fixed; inset: 0; background: rgba(15,23,42,.55); z-index: 200; display: flex; align-items: center; justify-content: center; padding: 20px; }
.vba-trial-box { position: relative; background: #fff; border-radius: 18px; max-width: 480px; width: 100%; padding: 34px 32px 30px; box-shadow: 0 24px 60px rgba(15,23,42,.25); }
.vba-trial-close { position: absolute; top: 14px; right: 14px; width: 32px; height: 32px; border: none; background: #f1f5f9; border-radius: 50%; font-size: 15px; cursor: pointer; color: #64748b; line-height: 32px; text-align: center; padding: 0; }
.vba-trial-close:hover { background: #e2e8f0; color: #0f172a; }
.vba-trial-box h3 { font-size: 20px; font-weight: 800; margin-bottom: 14px; color: #0f172a; }
.vba-trial-body p { font-size: 14px; line-height: 1.9; color: #475569; margin-bottom: 10px; }
.vba-trial-body strong { color: #0f172a; }
.vba-trial-box .btn { margin-top: 8px; }
.nav-admin {
  font-size: 13px; color: var(--muted) !important; border: 1px solid var(--border);
  padding: 5px 12px; border-radius: 999px; transition: all .2s;
}
.nav-admin:hover { border-color: var(--primary); color: var(--primary) !important; }

/* ---------- 页脚 ---------- */
.site-footer { background: #0f172a; color: #cbd5e1; padding: 56px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1.4fr; gap: 40px; }
.footer-brand { font-size: 20px; font-weight: 800; color: #fff; display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.footer-desc { font-size: 14px; color: #94a3b8; line-height: 1.8; }
.footer-col h4 { color: #fff; font-size: 15px; margin-bottom: 14px; }
.footer-col a { display: block; color: #94a3b8; font-size: 14px; margin-bottom: 10px; transition: color .2s; }
.footer-col a:hover { color: var(--primary-light); }
.footer-contact { font-size: 14px; color: #94a3b8; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.footer-bottom { border-top: 1px solid rgba(148,163,184,.15); margin-top: 40px; padding-top: 22px; text-align: center; font-size: 13px; color: #64748b; }
.footer-beian { margin-top: 6px; }
.footer-beian a { color: #64748b; }
.footer-beian a:hover { color: var(--primary-light); }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 26px;
  border-radius: 12px; font-size: 15px; font-weight: 600; border: none;
  transition: all .2s; cursor: pointer;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); }
.btn-outline { background: transparent; color: var(--primary); border: 2px solid var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-white { background: #fff; color: var(--primary); }
.btn-white:hover { background: #f1f5f9; }
.btn-ghost-white { background: transparent; color: #fff; border: 2px solid rgba(255,255,255,.8); }
.btn-ghost-white:hover { background: rgba(255,255,255,.12); }
.btn-sm { padding: 8px 16px; font-size: 13px; border-radius: 10px; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #dc2626; }

/* ---------- 首页 Hero ---------- */
.hero {
  position: relative; height: 560px; overflow: hidden;
  display: flex; align-items: center;
}
.hero-bg { position: absolute; inset: 0; background-size: cover; background-position: center; }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(79,70,229,.92) 0%, rgba(79,70,229,.72) 45%, rgba(56,189,248,.45) 100%); }
.hero-content { position: relative; max-width: 720px; color: #fff; }
.hero-content h1 { font-size: 48px; font-weight: 800; line-height: 1.25; margin-bottom: 22px; white-space: pre-line; }
.hero-content p { font-size: 19px; color: rgba(255,255,255,.85); margin-bottom: 36px; line-height: 1.7; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

/* ---------- 卡片 ---------- */
.card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px; transition: all .25s; box-shadow: var(--shadow-sm);
}
.card-hover:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); border-color: rgba(99,102,241,.35); }

.service-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.service-icon {
  width: 56px; height: 56px; border-radius: 14px; margin-bottom: 18px;
  background: rgba(99,102,241,.1); color: var(--primary); display: flex; align-items: center; justify-content: center;
  transition: all .25s;
}
.card-hover:hover .service-icon { background: var(--grad); color: #fff; }
.service-name { font-size: 18px; font-weight: 700; margin-bottom: 10px; }
.service-summary { font-size: 14px; color: var(--muted); margin-bottom: 18px; line-height: 1.7; }
.card-link { display: inline-flex; align-items: center; gap: 6px; color: var(--primary); font-size: 14px; font-weight: 600; }
.card-link .arrow { transition: transform .2s; }
.card-hover:hover .card-link .arrow { transform: translateX(4px); }

/* ---------- 案例卡片 ---------- */
.case-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.case-card { overflow: hidden; cursor: pointer; }
.case-cover { aspect-ratio: 16/10; overflow: hidden; }
.case-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.case-card:hover .case-cover img { transform: scale(1.05); }
.case-body { padding: 22px 24px; }
.case-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.tag-pill {
  display: inline-block; background: rgba(99,102,241,.1); color: var(--primary);
  font-size: 12px; font-weight: 600; padding: 4px 12px; border-radius: 999px;
}
.tag-pill-soft { background: #f1f5f9; color: var(--muted); font-weight: 500; }
.case-title { font-size: 18px; font-weight: 700; margin-bottom: 8px; transition: color .2s; }
.case-card:hover .case-title { color: var(--primary); }
.case-summary { font-size: 14px; color: var(--muted); line-height: 1.7; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- 统计 ---------- */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 34px; }
.stat { text-align: center; }
.stat-icon { width: 46px; height: 46px; margin: 0 auto 10px; border-radius: 12px; background: rgba(99,102,241,.1); color: var(--primary); display: flex; align-items: center; justify-content: center; }
.stat-value { font-size: 30px; font-weight: 800; }
.stat-label { font-size: 14px; color: var(--muted); margin-top: 2px; }

/* ---------- CTA ---------- */
.cta { background: var(--grad); color: #fff; padding: 52px 0; }
.cta-inner { display: flex; align-items: center; justify-content: center; gap: 40px; flex-wrap: wrap; text-align: center; }
.cta h2 { font-size: 28px; font-weight: 800; margin-bottom: 6px; }
.cta p { color: rgba(255,255,255,.85); }
.cta .btn { flex: none; }

/* ---------- 详情页 ---------- */
.page-hero { background: var(--grad); color: #fff; padding: 56px 0; }
.page-hero .crumbs { font-size: 13px; color: rgba(255,255,255,.75); margin-bottom: 10px; }
.page-hero h1 { font-size: 34px; font-weight: 800; margin-bottom: 8px; }
.page-hero p { color: rgba(255,255,255,.85); max-width: 720px; }
.breadcrumb a:hover { text-decoration: underline; }

.detail-layout { display: grid; grid-template-columns: 1fr 340px; gap: 40px; align-items: start; }
.prose h2 { font-size: 22px; font-weight: 700; margin: 30px 0 14px; }
.prose h3 { font-size: 18px; font-weight: 700; margin: 22px 0 10px; }
.prose p { color: #334155; margin-bottom: 14px; }
.prose ul { margin: 0 0 16px 20px; color: #334155; }
.prose li { margin-bottom: 8px; }
.feature-list li { display: flex; gap: 10px; align-items: flex-start; }
.feature-list .check {
  flex: none; width: 20px; height: 20px; margin-top: 2px; border-radius: 50%;
  background: rgba(34,197,94,.12); color: #16a34a; display: flex; align-items: center; justify-content: center; font-size: 12px;
}

.side-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-sm); }
.side-card h3 { font-size: 16px; font-weight: 700; margin-bottom: 14px; }
.side-card .link-item { display: flex; gap: 10px; align-items: flex-start; color: #334155; font-size: 14px; margin-bottom: 14px; }
.side-card .link-item svg { flex: none; margin-top: 2px; color: var(--primary); }
.side-cta { background: var(--grad); color: #fff; border-radius: var(--radius); padding: 26px; text-align: center; }
.side-cta h4 { font-size: 18px; margin-bottom: 8px; }
.side-cta p { font-size: 13px; color: rgba(255,255,255,.85); margin-bottom: 16px; }
.side-cta .wechat { font-size: 20px; font-weight: 800; letter-spacing: .05em; }

/* ---------- 筛选与分页 ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 40px; }
.filter-chip {
  padding: 8px 20px; border-radius: 999px; border: 1px solid var(--border);
  background: #fff; font-size: 14px; color: #334155; font-weight: 500; transition: all .2s;
}
.filter-chip:hover { border-color: var(--primary); color: var(--primary); }
.filter-chip.active { background: var(--primary); color: #fff; border-color: var(--primary); }

.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 40px; align-items: center; }
.page-btn {
  min-width: 38px; height: 38px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--border);
  background: #fff; font-size: 14px; color: #334155; transition: all .2s;
}
.page-btn:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.page-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.page-btn:disabled { opacity: .45; cursor: not-allowed; }
.page-info { color: var(--muted); font-size: 14px; margin-right: 8px; }

/* ---------- 联系我们 ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.contact-card { display: flex; gap: 16px; align-items: flex-start; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm); margin-bottom: 16px; }
.contact-card .icon { width: 44px; height: 44px; flex: none; border-radius: 12px; background: rgba(99,102,241,.1); color: var(--primary); display: flex; align-items: center; justify-content: center; }
.contact-card h3 { font-size: 15px; margin-bottom: 4px; }
.contact-card p { color: var(--muted); font-size: 14px; }
.contact-card .value { color: var(--ink); font-weight: 600; font-size: 16px; }
.copy-btn { margin-left: 8px; font-size: 12px; color: var(--primary); border: 1px solid var(--primary); background: transparent; padding: 2px 10px; border-radius: 999px; }
.copy-btn:hover { background: var(--primary); color: #fff; }
.wechat-extra { background: var(--grad); color: #fff; border-radius: var(--radius); padding: 26px; text-align: center; }
.wechat-extra h3 { font-size: 20px; margin-bottom: 8px; }
.wechat-extra .wechat-id { font-size: 24px; font-weight: 800; letter-spacing: .08em; margin: 10px 0; }

/* ---------- 页脚/加载态 ---------- */
.loading { text-align: center; color: var(--muted); padding: 80px 0; }
.error-box { text-align: center; color: var(--danger); padding: 60px 0; }
.spinner {
  width: 30px; height: 30px; margin: 0 auto 12px; border: 3px solid var(--border);
  border-top-color: var(--primary); border-radius: 50%; animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.hidden { display: none !important; }

/* ---------- 响应式 ---------- */
@media (max-width: 960px) {
  .service-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .detail-layout { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .hero-content h1 { font-size: 34px; }
  .nav-links { gap: 16px; }
}

/* 手机端（≤640px） */
@media (max-width: 640px) {
  .container { padding: 0 16px; }
  .section { padding: 48px 0; }
  .section-title { font-size: 26px; }

  /* 导航两行布局：品牌一行、链接一行 */
  .site-header { position: static; }
  .nav { flex-wrap: wrap; height: auto; padding: 10px 0 8px; row-gap: 8px; }
  .nav-links { width: 100%; justify-content: center; gap: 14px; flex-wrap: wrap; }
  .nav-links a, .nav-links .nav-link { font-size: 13px; }
  .nav-links .nav-text { display: none; }
  .drop-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: none; min-width: 0; padding: 0; display: none; }
  .nav-item:hover .drop-menu, .nav-item.open .drop-menu { display: block; }
  .drop-item { padding: 8px 6px; font-size: 13px; }

  /* Hero */
  .hero { height: 420px; }
  .hero-content h1 { font-size: 26px; }
  .hero-content p { font-size: 15px; }
  .hero-actions .btn { padding: 10px 18px; font-size: 14px; }

  /* 网格单列 */
  .service-grid, .case-grid, .stats { grid-template-columns: 1fr; gap: 16px; }

  /* CTA 纵向堆叠居中 */
  .cta { padding: 36px 16px; }
  .cta-inner { flex-direction: column; gap: 20px; }
  .cta h2 { font-size: 22px; }
  .cta p { font-size: 14px; }

  /* 页脚 */
  .site-footer { padding: 40px 0 20px; }
  .footer-bottom { margin-top: 24px; }

  /* 详情页 */
  .page-hero { padding: 40px 0; }
  .page-hero h1 { font-size: 26px; }
  .case-body { padding: 16px; }
  .filters { margin-bottom: 24px; }
  .pagination { flex-wrap: wrap; }
  .contact-card { padding: 16px; }
  .btn { padding: 10px 20px; font-size: 14px; }
}
