/* ============================================================
   Xongyi — Hexo 通用企业官网主题
   Developer: XFM | https://www.lovou.pw
   ============================================================ */

/* ---------- CSS 变量（亮色默认） ---------- */
:root {
  --primary: #2563eb;
  --primary-strong: #1d4ed8;
  --primary-soft: #eff6ff;
  --primary-contrast: #ffffff;
  --accent: #0ea5e9;

  --bg: #ffffff;
  --bg-tint: #f5f8fc;
  --surface: #ffffff;
  --text: #0f172a;
  --text-secondary: #334155;
  --muted: #64748b;
  --border: #e2e8f0;

  --shadow-sm: 0 1px 3px rgba(15, 23, 42, .07);
  --shadow-md: 0 6px 24px -8px rgba(15, 23, 42, .12);
  --shadow-lg: 0 20px 50px -20px rgba(15, 23, 42, .22);

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;

  --container: 1180px;
  --header-h: 68px;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Helvetica Neue",
    Arial, sans-serif;
  --font-heading: var(--font-sans);
}

/* ---------- 暗色模式 ---------- */
:root[data-theme="dark"] {
  --primary: #3b82f6;
  --primary-strong: #60a5fa;
  --primary-soft: rgba(59, 130, 246, .12);
  --primary-contrast: #0b1220;

  --bg: #0b1220;
  --bg-tint: #0f1729;
  --surface: #111b2e;
  --text: #e6edf7;
  --text-secondary: #b8c4d9;
  --muted: #8494ad;
  --border: #233047;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, .4);
  --shadow-md: 0 6px 24px -8px rgba(0, 0, 0, .5);
  --shadow-lg: 0 20px 50px -20px rgba(0, 0, 0, .65);
}

/* ---------- 预设风格 ---------- */
/* 政务：中国红 */
body.preset-government {
  --primary: #c2372e;
  --primary-strong: #a32720;
  --primary-soft: #fdeeed;
  --accent: #d9534a;
}
body.preset-government h1, body.preset-government h2 { font-weight: 700; }
/* 教育：学院青 */
body.preset-education {
  --primary: #0e7490;
  --primary-strong: #155e75;
  --primary-soft: #ecfeff;
  --accent: #06b6d4;
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  transition: background-color .3s ease, color .3s ease;
}
img { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration: none; transition: color .2s ease, opacity .2s ease; }
a:hover { color: var(--primary-strong); }
ul, ol { list-style: none; }
h1, h2, h3, h4 { font-family: var(--font-heading); line-height: 1.3; font-weight: 700; color: var(--text); }
button { font-family: inherit; cursor: pointer; }
::selection { background: var(--primary); color: var(--primary-contrast); }

.container { max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--primary); color: #fff; padding: 8px 16px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }
.icon { display: inline-block; vertical-align: -0.14em; flex-shrink: 0; }
.empty-tip { text-align: center; color: var(--muted); padding: 48px 0; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 26px; border-radius: 999px; border: 1.5px solid transparent;
  font-size: 15px; font-weight: 600; line-height: 1.4; white-space: nowrap;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease, border-color .18s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--primary); color: var(--primary-contrast); box-shadow: 0 6px 18px -6px var(--primary); }
.btn--primary:hover { background: var(--primary-strong); color: var(--primary-contrast); }
.btn--ghost { border-color: var(--border); color: var(--text); background: transparent; }
.btn--ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn--light { background: #fff; color: var(--primary); box-shadow: 0 6px 18px -6px rgba(0,0,0,.35); }
.btn--light:hover { color: var(--primary-strong); }
.btn--sm { padding: 8px 18px; font-size: 14px; }
.btn .icon { font-size: 1em; }

/* ---------- 顶部导航 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease, box-shadow .25s ease, background-color .25s ease;
}
.site-header.is-scrolled { border-color: var(--border); box-shadow: var(--shadow-sm); }
.header-inner { display: flex; align-items: center; gap: 24px; height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; }
.brand__logo { height: 38px; width: auto; }
.brand__name { font-size: 18px; letter-spacing: .01em; }
.site-nav { margin-left: auto; }
.site-nav ul { display: flex; align-items: center; gap: 6px; }
.site-nav a {
  display: block; padding: 8px 14px; border-radius: 8px;
  color: var(--text-secondary); font-weight: 500; font-size: 15px;
}
.site-nav a:hover { color: var(--primary); background: var(--primary-soft); }
.site-nav a.active { color: var(--primary); background: var(--primary-soft); font-weight: 600; }
.header-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.site-nav + .header-actions { margin-left: 0; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 10px; border: none;
  background: transparent; color: var(--text-secondary); font-size: 18px;
  transition: background .2s ease, color .2s ease;
}
.icon-btn:hover { background: var(--primary-soft); color: var(--primary); }
.nav-cta { margin: 0 4px; }

/* 主题切换按钮（月亮/太阳互斥显示） */
#theme-toggle .icon-btn__sun { display: none; }
:root[data-theme="dark"] #theme-toggle .icon-btn__sun { display: inline-block; }
:root[data-theme="dark"] #theme-toggle .icon-btn__moon { display: none; }

/* 移动端菜单按钮 */
.nav-toggle { display: none; }
.nav-toggle__close { display: none; }
.nav-toggle.is-open .nav-toggle__open { display: none; }
.nav-toggle.is-open .nav-toggle__close { display: inline-block; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  padding: 84px 0 72px;
  background:
    radial-gradient(900px 420px at 85% -10%, var(--primary-soft), transparent 65%),
    radial-gradient(700px 380px at -10% 110%, var(--primary-soft), transparent 60%),
    var(--bg);
}
.hero__inner { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; }
.hero__inner--center { grid-template-columns: 1fr; text-align: center; justify-items: center; }
.hero__badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: 999px;
  background: var(--primary-soft); color: var(--primary);
  font-size: 13.5px; font-weight: 600; margin-bottom: 20px;
}
.hero__title { font-size: clamp(32px, 5vw, 52px); letter-spacing: -.01em; margin-bottom: 18px; }
.hero__title em { font-style: normal; color: var(--primary); }
.hero__subtitle { font-size: 17px; color: var(--muted); max-width: 560px; margin-bottom: 30px; }
.hero__inner--center .hero__subtitle { margin-left: auto; margin-right: auto; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; }
.hero__media img { width: 100%; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }

/* ---------- Section 通用 ---------- */
.section { padding: 84px 0; }
.section--tint { background: var(--bg-tint); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 48px; }
.section-head--left { text-align: left; margin: 0 0 22px; }
.section-head h2 { font-size: clamp(26px, 3.4vw, 36px); margin-bottom: 10px; }
.section-head p { color: var(--muted); font-size: 16px; }
.section-more { text-align: center; margin-top: 44px; }

/* ---------- 快捷入口 ---------- */
.quicklinks__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; }
.quicklink {
  display: flex; align-items: center; gap: 14px;
  padding: 20px 22px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text); box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.quicklink:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--primary); color: var(--text); }
.quicklink__icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 12px; font-size: 20px;
  background: var(--primary-soft); color: var(--primary);
}
.quicklink__name { font-weight: 600; font-size: 15.5px; }

/* ---------- 数据统计 ---------- */
.stats { background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff; }
body.preset-government .stats { background: linear-gradient(135deg, var(--primary), #e05a50); }
.stats__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; text-align: center; }
.stat__value { font-size: clamp(30px, 4vw, 44px); font-weight: 800; line-height: 1.15; }
.stat__suffix { font-size: .6em; font-weight: 700; margin-left: 2px; }
.stat__label { margin-top: 6px; font-size: 15px; opacity: .92; }

/* ---------- 核心业务 ---------- */
.services__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.service-card {
  padding: 30px 26px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.service-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); border-color: var(--primary); }
.service-card__icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 52px; height: 52px; border-radius: 14px; font-size: 24px;
  background: var(--primary-soft); color: var(--primary); margin-bottom: 18px;
}
.service-card h3 { font-size: 18px; margin-bottom: 8px; }
.service-card p { color: var(--muted); font-size: 14.5px; margin-bottom: 14px; }
.service-card__link { display: inline-flex; align-items: center; gap: 5px; font-size: 14px; font-weight: 600; }
.service-card__link .icon { transition: transform .2s ease; }
.service-card__link:hover .icon { transform: translateX(4px); }

/* ---------- 关于我们 ---------- */
.about__inner { display: grid; grid-template-columns: 1fr 1.1fr; gap: 56px; align-items: center; }
.about__media img { border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); width: 100%; }
.about__text { color: var(--text-secondary); margin-bottom: 26px; }
.about__text p { margin-bottom: 12px; }
.about__text ul { list-style: none; }
.about__text ul li { padding-left: 28px; position: relative; margin-bottom: 8px; }
.about__text ul li::before {
  content: ""; position: absolute; left: 0; top: .52em;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--primary-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232563eb' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center/10px no-repeat;
}

/* ---------- 产品与案例 ---------- */
.products__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.product-card {
  border-radius: var(--radius); overflow: hidden;
  background: var(--surface); border: 1px solid var(--border);
  box-shadow: var(--shadow-sm); color: var(--text); display: block;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.product-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); border-color: var(--primary); color: var(--text); }
.product-card__cover { aspect-ratio: 16 / 9; overflow: hidden; background: var(--bg-tint); }
.product-card__cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.product-card:hover .product-card__cover img { transform: scale(1.05); }
.product-card__body { padding: 20px 22px 24px; }
.product-card__tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.product-card__tags span {
  font-size: 12px; font-weight: 600; color: var(--primary);
  background: var(--primary-soft); padding: 2px 10px; border-radius: 999px;
}
.product-card h3 { font-size: 17px; margin-bottom: 6px; }
.product-card p { color: var(--muted); font-size: 14px; }

/* ---------- 新闻卡片 ---------- */
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.post-card {
  border-radius: var(--radius); overflow: hidden;
  background: var(--surface); border: 1px solid var(--border);
  box-shadow: var(--shadow-sm); display: flex; flex-direction: column;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.post-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); border-color: var(--primary); }
.post-card__cover { aspect-ratio: 16 / 9; overflow: hidden; background: var(--bg-tint); display: block; }
.post-card__cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.post-card:hover .post-card__cover img { transform: scale(1.05); }
.post-card__placeholder {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  font-size: 34px; color: var(--muted);
  background: linear-gradient(135deg, var(--primary-soft), var(--bg-tint));
}
.post-card__body { padding: 18px 20px 22px; display: flex; flex-direction: column; flex: 1; }
.post-card__meta { display: flex; gap: 16px; font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.post-card__meta .icon { margin-right: 4px; }
.post-card__title { font-size: 17px; line-height: 1.45; margin-bottom: 8px; }
.post-card__title a { color: var(--text); }
.post-card__title a:hover { color: var(--primary); }
.post-card__excerpt { color: var(--muted); font-size: 14px; margin-bottom: 14px; }
.post-card__more {
  margin-top: auto; display: inline-flex; align-items: center; gap: 5px;
  font-size: 14px; font-weight: 600; color: var(--primary);
}
.post-card__more .icon { transition: transform .2s ease; }
.post-card__more:hover .icon { transform: translateX(4px); }

/* ---------- 团队 ---------- */
.team__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.team-card {
  text-align: center; padding: 28px 20px;
  border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease;
}
.team-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.team-card__avatar {
  width: 84px; height: 84px; border-radius: 50%; object-fit: cover;
  margin: 0 auto 16px; border: 3px solid var(--primary-soft);
}
.team-card__avatar--text {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--primary-soft); color: var(--primary); font-size: 30px; font-weight: 700;
}
.team-card h3 { font-size: 17px; margin-bottom: 4px; }
.team-card__role { display: block; color: var(--primary); font-size: 13.5px; font-weight: 600; margin-bottom: 8px; }
.team-card p { color: var(--muted); font-size: 13.5px; }

/* ---------- 合作伙伴 ---------- */
.partners__grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.partner {
  display: flex; align-items: center; justify-content: center;
  padding: 22px 14px; border-radius: var(--radius-sm);
  background: var(--surface); border: 1px solid var(--border);
  color: var(--muted); font-weight: 600; font-size: 14.5px;
  transition: color .2s ease, border-color .2s ease, transform .2s ease;
  filter: grayscale(1); opacity: .85;
}
.partner:hover { color: var(--primary); border-color: var(--primary); filter: none; opacity: 1; transform: translateY(-3px); }
.partner img { max-height: 40px; width: auto; }
.partner .icon { margin-right: 7px; }

/* ---------- 图库 ---------- */
.gallery__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.gallery-item { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--bg-tint); }
.gallery-item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .35s ease; }
.gallery-item:hover img { transform: scale(1.06); }
.gallery-item figcaption {
  position: absolute; inset: auto 0 0 0; padding: 26px 14px 12px;
  background: linear-gradient(transparent, rgba(0, 0, 0, .65));
  color: #fff; font-size: 13.5px; font-weight: 500;
}

/* ---------- CTA 行动条 ---------- */
.cta-band { padding: 0 0 84px; }
.cta-band__inner {
  display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap;
  padding: 52px 56px; border-radius: var(--radius-lg); color: #fff;
  background: linear-gradient(120deg, var(--primary), var(--accent));
  box-shadow: var(--shadow-lg);
}
body.preset-government .cta-band__inner { background: linear-gradient(120deg, var(--primary), #e05a50); }
.cta-band h2 { color: #fff; font-size: clamp(22px, 3vw, 30px); margin-bottom: 6px; }
.cta-band p { opacity: .92; font-size: 15.5px; }
.cta-band .btn--light { flex-shrink: 0; }

/* ---------- 联系我们 ---------- */
.contact__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.contact__info { display: grid; gap: 20px; }
.contact-item { display: flex; gap: 16px; align-items: flex-start; }
.contact-item__icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; border-radius: 12px; font-size: 20px;
  background: var(--primary-soft); color: var(--primary); flex-shrink: 0;
}
.contact-item h4 { font-size: 15px; margin-bottom: 2px; }
.contact-item p { color: var(--muted); font-size: 14.5px; }
.contact-qrcode { width: 120px; border-radius: 8px; border: 1px solid var(--border); }
.contact-form {
  padding: 30px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm);
  display: grid; gap: 16px;
}
.form-row { display: grid; gap: 6px; }
.form-row label { font-size: 14px; font-weight: 600; color: var(--text-secondary); }
.form-row input, .form-row textarea {
  width: 100%; padding: 11px 14px; border-radius: 10px;
  border: 1.5px solid var(--border); background: var(--bg); color: var(--text);
  font-family: inherit; font-size: 14.5px; transition: border-color .2s ease;
}
.form-row input:focus, .form-row textarea:focus { outline: none; border-color: var(--primary); }
.contact-form .btn { justify-self: start; }
.contact-map { margin-top: 40px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
.contact-map iframe { width: 100%; height: 360px; border: 0; display: block; }

/* ---------- 关于我们 + 联系我们（左右合排） ---------- */
.about-contact__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 52px; align-items: start; }
.about-contact__col { min-width: 0; }
.about-contact__image {
  width: 100%; max-height: 190px; object-fit: cover;
  border-radius: var(--radius); box-shadow: var(--shadow-sm); margin-bottom: 22px;
}
.about-contact .about__text { margin-bottom: 22px; }
.about-contact .contact__info { gap: 18px; }

/* ---------- 页面 Hero（内页头图） ---------- */
.page-hero {
  padding: 64px 0 40px;
  background:
    radial-gradient(700px 300px at 80% -30%, var(--primary-soft), transparent 65%),
    var(--bg);
  border-bottom: 1px solid var(--border);
}
.page-hero h1 { font-size: clamp(26px, 4vw, 38px); }
.page-hero__subtitle { color: var(--muted); margin-top: 8px; font-size: 16px; }
.post-meta { display: flex; flex-wrap: wrap; gap: 18px; margin-bottom: 12px; color: var(--muted); font-size: 14px; }
.post-meta .icon { margin-right: 5px; }
.post-meta a { color: var(--muted); }
.post-meta a:hover { color: var(--primary); }

/* ---------- 正文内容 ---------- */
.page-content { padding-top: 44px; padding-bottom: 72px; }
.page-content { max-width: none; }
.page-content > .archive-list { max-width: 800px; }
.post-content, .page-content:not(.post-content) { max-width: 860px; margin-left: auto; margin-right: auto; }
.markdown-body h2, .post-content h2, .page-content h2 {
  font-size: 24px; margin: 34px 0 14px; padding-bottom: 10px; border-bottom: 1px solid var(--border);
}
.post-content h3, .page-content h3 { font-size: 20px; margin: 28px 0 12px; }
.post-content p, .page-content p { margin-bottom: 14px; color: var(--text-secondary); }
.post-content ul, .page-content ul { list-style: none; margin: 0 0 16px; }
.post-content ol, .page-content ol { margin: 0 0 16px 1.4em; list-style: decimal; }
.post-content ol li, .page-content ol li { margin-bottom: 6px; color: var(--text-secondary); }
.post-content ul li, .page-content ul li { position: relative; padding-left: 22px; margin-bottom: 8px; color: var(--text-secondary); }
.post-content ul li::before, .page-content ul li::before {
  content: ""; position: absolute; left: 2px; top: .6em;
  width: 7px; height: 7px; border-radius: 50%; background: var(--primary);
}
.post-content blockquote, .page-content blockquote {
  margin: 18px 0; padding: 14px 20px; border-left: 4px solid var(--primary);
  background: var(--primary-soft); border-radius: 0 10px 10px 0; color: var(--text-secondary);
}
.post-content table, .page-content table {
  width: 100%; border-collapse: collapse; margin: 18px 0; font-size: 14.5px;
  border-radius: 10px; overflow: hidden; box-shadow: var(--shadow-sm);
}
.post-content th, .page-content th, .post-content td, .page-content td {
  padding: 11px 16px; border: 1px solid var(--border); text-align: left;
}
.post-content th, .page-content th { background: var(--bg-tint); font-weight: 700; }
.post-content code, .page-content code {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Consolas, monospace;
  font-size: .88em; background: var(--primary-soft); color: var(--primary);
  padding: 2px 6px; border-radius: 6px;
}
.post-content pre, .page-content pre {
  margin: 18px 0; padding: 18px 20px; border-radius: 12px; overflow-x: auto;
  background: #0d1526; border: 1px solid var(--border);
}
:root[data-theme="dark"] .post-content pre, :root[data-theme="dark"] .page-content pre { background: #0a111f; }
.post-content pre code, .page-content pre code {
  background: transparent; color: #dbe4f3; padding: 0; font-size: 13.5px; line-height: 1.65;
}

/* 修复 Hexo highlight.js 表格结构 */
.post-content figure.highlight, .page-content figure.highlight {
  margin: 18px 0; border-radius: 12px; overflow: hidden;
  background: #0d1526; border: 1px solid var(--border);
}
.post-content figure.highlight table, .page-content figure.highlight table {
  margin: 0; padding: 0; border: none; width: 100%;
}
.post-content figure.highlight td, .page-content figure.highlight td {
  padding: 18px 20px; border: none; vertical-align: top;
}
.post-content figure.highlight td.gutter, .page-content figure.highlight td.gutter {
  width: 40px; text-align: right; color: #6b7a99; user-select: none;
  border-right: 1px solid #1e2d4a;
}
.post-content figure.highlight td.code, .page-content figure.highlight td.code {
  padding-left: 16px;
}
.post-content figure.highlight pre, .page-content figure.highlight pre {
  margin: 0; padding: 0; background: transparent; border: none;
}
.post-content figure.highlight .line, .page-content figure.highlight .line {
  color: #dbe4f3; font-size: 13.5px; line-height: 1.65;
}
:root[data-theme="dark"] .post-content figure.highlight,
:root[data-theme="dark"] .page-content figure.highlight { background: #0a111f; }
.post-content img, .page-content img { border-radius: 12px; margin: 10px 0; }

/* 文章标签 */
.post-tags { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 30px; color: var(--muted); font-size: 14px; }
.post-tags a {
  padding: 4px 12px; border-radius: 999px; background: var(--primary-soft);
  color: var(--primary); font-weight: 500; font-size: 13px;
}

/* 上一篇 / 下一篇 */
.post-nav {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
  padding-bottom: 72px;
}
.post-nav__item {
  display: flex; flex-direction: column; gap: 4px;
  padding: 18px 22px; border-radius: var(--radius);
  background: var(--bg-tint); border: 1px solid var(--border);
  transition: border-color .2s ease, transform .2s ease;
}
.post-nav__item:hover { border-color: var(--primary); transform: translateY(-2px); }
.post-nav__next { text-align: right; }
.post-nav__item span { font-size: 12.5px; color: var(--muted); }
.post-nav__item strong { color: var(--text); font-size: 15px; line-height: 1.4; }
a.post-nav__item:hover strong { color: var(--primary); }

/* ---------- 归档列表 ---------- */
.archive-list { max-width: 760px; margin: 0 auto; }
.archive-item {
  display: flex; align-items: baseline; gap: 18px;
  padding: 16px 6px; border-bottom: 1px solid var(--border);
}
.archive-item__date { color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; flex-shrink: 0; }
.archive-item__title { color: var(--text); font-weight: 600; flex: 1; }
.archive-item__title:hover { color: var(--primary); }
.archive-item__cat {
  flex-shrink: 0; font-size: 12.5px; color: var(--primary);
  background: var(--primary-soft); padding: 2px 10px; border-radius: 999px;
}

/* ---------- 分页 ---------- */
.pagination { display: flex; justify-content: center; align-items: center; gap: 12px; margin-top: 44px; }
.pagination__item {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 18px; border-radius: 999px; border: 1.5px solid var(--border);
  color: var(--text-secondary); font-size: 14px; font-weight: 500;
  transition: border-color .2s ease, color .2s ease;
}
a.pagination__item:hover { border-color: var(--primary); color: var(--primary); }
.pagination__current { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }

/* ---------- 页脚 ---------- */
.site-footer { background: var(--bg-tint); border-top: 1px solid var(--border); padding: 60px 0 28px; }
.footer-main {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1.4fr; gap: 40px; padding-bottom: 40px;
}
.brand--footer { margin-bottom: 6px; }
.footer-slogan { color: var(--primary); font-size: 14px; font-weight: 600; margin-bottom: 10px; }
.footer-about { color: var(--muted); font-size: 14px; max-width: 340px; }
.footer-social { display: flex; gap: 10px; margin-top: 16px; }
.footer-social a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 10px; font-size: 17px;
  background: var(--surface); border: 1px solid var(--border); color: var(--muted);
  transition: color .2s ease, border-color .2s ease, transform .2s ease;
}
.footer-social a:hover { color: var(--primary); border-color: var(--primary); transform: translateY(-3px); }
.footer-col h4 { font-size: 15px; margin-bottom: 16px; }
.footer-col ul { display: grid; gap: 10px; }
.footer-col a { color: var(--muted); font-size: 14px; }
.footer-col a:hover { color: var(--primary); }
.footer-contact li { display: flex; gap: 9px; align-items: flex-start; color: var(--muted); font-size: 14px; }
.footer-contact .icon { margin-top: .25em; color: var(--primary); }
.footer-bottom {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  padding-top: 24px; border-top: 1px solid var(--border);
}
.footer-copyright, .footer-powered { color: var(--muted); font-size: 13px; }
.footer-copyright a, .footer-powered a { color: var(--muted); }
.footer-copyright a:hover, .footer-powered a:hover { color: var(--primary); }
.dev-link { color: var(--primary) !important; font-weight: 600; }

/* ---------- 返回顶部 ---------- */
.back-to-top {
  position: fixed; right: 26px; bottom: 30px; z-index: 90;
  width: 44px; height: 44px; border-radius: 50%; border: none;
  background: var(--primary); color: var(--primary-contrast);
  box-shadow: var(--shadow-md); font-size: 19px;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: opacity .25s ease, visibility .25s ease, transform .25s ease, background .2s ease;
}
.back-to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: var(--primary-strong); }

/* ---------- 滚动淡入动画 ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- 响应式 ---------- */
@media (max-width: 1024px) {
  .services__grid, .products__grid, .post-grid { grid-template-columns: repeat(2, 1fr); }
  .team__grid { grid-template-columns: repeat(2, 1fr); }
  .partners__grid { grid-template-columns: repeat(3, 1fr); }
  .gallery__grid { grid-template-columns: repeat(2, 1fr); }
  .footer-main { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .hero { padding: 56px 0 52px; }
  .hero__inner { grid-template-columns: 1fr; gap: 36px; }
  .hero__inner--center { text-align: center; }
  .hero__media { order: -1; }
  .about__inner { grid-template-columns: 1fr; gap: 32px; }
  .about__media { order: -1; max-width: 520px; }
  .about-contact__grid { grid-template-columns: 1fr; gap: 40px; }
  .contact__grid { grid-template-columns: 1fr; }
  .stats__grid { grid-template-columns: repeat(2, 1fr); }
  .cta-band__inner { padding: 36px 30px; }

  /* 移动端抽屉菜单 */
  .nav-toggle { display: inline-flex; }
  .site-nav {
    position: fixed; top: var(--header-h); left: 0; right: 0; z-index: 99;
    background: var(--bg); border-bottom: 1px solid var(--border);
    max-height: 0; overflow: hidden; transition: max-height .3s ease;
    box-shadow: var(--shadow-md);
  }
  .site-nav.is-open { max-height: 70vh; }
  .site-nav ul { flex-direction: column; align-items: stretch; gap: 0; padding: 12px 20px 18px; }
  .site-nav a { padding: 13px 10px; font-size: 16px; border-radius: 10px; }
  .nav-cta { display: none; }
}

@media (max-width: 560px) {
  .services__grid, .products__grid, .post-grid, .team__grid,
  .partners__grid, .gallery__grid, .quicklinks__grid { grid-template-columns: 1fr; }
  .stats__grid { gap: 20px; }
  .section { padding: 60px 0; }
  .post-nav { grid-template-columns: 1fr; }
  .footer-main { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .brand__name { font-size: 16px; }
}
