/*
Theme Name: wjbxs
Theme URI: https://wjbxs.com
Author: wjbxs Dev Team
Author URI: https://wjbxs.com
Description: 万卷编修社——轻量级中国文化文献编纂机构官网主题。适用于志书年鉴编纂、家谱修撰、古籍修复、文献数字化等文化服务企业。无外部依赖、加载迅速，采用国产中文字体方案与中国传统视觉元素（印章、云纹、宣纸底色）。
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: wjbxs
Tags: one-column, custom-logo, custom-menu, featured-images, translation-ready, blog
*/

/* =========================================================
   一、设计令牌（品牌色 / 辅助色 / 中性色 / 字体 / 圆角 / 阴影）
   字体：全部采用中国境内可用的中文字体（思源黑体/宋体、苹方、微软雅黑），
   不引用任何境外字体服务。
   ========================================================= */
:root {
  --brand: #a6322a;          /* 品牌色·绛红（印章红） */
  --brand-dark: #7e251e;     /* 品牌色·深绛 */
  --brand-light: #f7e9e7;    /* 品牌色·浅衬底 */
  --gold: #c2a45c;           /* 辅助色·描金 */
  --gold-light: #efe6cf;     /* 辅助色·浅金 */
  --ink: #2b2622;            /* 中性色·墨色 */
  --text: #4a4239;           /* 中性色·正文 */
  --gray: #6f675c;           /* 中性色·次级文字 */
  --line: #e7dfd2;           /* 中性色·分割线 */
  --paper: #f8f4ea;          /* 中性色·宣纸底 */
  --white: #ffffff;
  --font-serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --font-sans: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", "Source Han Sans CN", "WenQuanYi Micro Hei", sans-serif;
  --radius: 6px;
  --radius-lg: 12px;
  --shadow: 0 6px 24px rgba(43, 38, 34, 0.08);
  --shadow-hover: 0 12px 32px rgba(166, 50, 42, 0.16);
  --wrap: 1200px;
}

/* ============ 二、Reset 与基础 ============ */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  background: var(--white);
}
img, svg { max-width: 100%; height: auto; vertical-align: middle; display: block; }
a { color: var(--brand); text-decoration: none; transition: color 0.25s ease; }
a:hover { color: var(--brand-dark); }
ul, ol { list-style-position: inside; }
p { margin-bottom: 0.9em; }
h1, h2, h3, h4 { font-family: var(--font-serif); color: var(--ink); font-weight: 700; line-height: 1.4; }
.wrap { width: 92%; max-width: var(--wrap); margin: 0 auto; }
.section { padding: 64px 0; }
.section--paper { background: var(--paper); }
.screen-reader-text {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
}
/* 页顶加载动画 */
#wjbxs-loading {
  position: fixed; top: 0; left: 0; height: 3px; width: 0;
  background: linear-gradient(90deg, var(--brand), var(--gold));
  z-index: 9999; transition: width 0.4s ease; opacity: 1;
}

/* ============ 三、顶部信息条 ============ */
.topbar { background: var(--ink); color: #cfc6b8; font-size: 13px; }
.topbar .wrap { display: flex; justify-content: space-between; align-items: center; height: 36px; }
.topbar a { color: #d8cfbf; margin-left: 14px; }
.topbar a:hover { color: var(--gold); }
.topbar .topbar__links span { color: #8a8175; }

/* ============ 四、页头 / Logo / 主导航 ============ */
.site-header { background: var(--white); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 999; box-shadow: none; transition: box-shadow 0.3s; }
.site-header.is-stuck { box-shadow: 0 4px 18px rgba(43, 38, 34, 0.10); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand img, .brand svg { width: 46px; height: 46px; }
.brand__name { font-family: var(--font-serif); font-size: 24px; font-weight: 700; color: var(--ink); letter-spacing: 2px; }
.brand__tagline { font-size: 11px; color: var(--gray); letter-spacing: 3px; display: block; margin-top: 2px; }
.main-nav ul { list-style: none; display: flex; gap: 6px; }
.main-nav li { position: relative; }
.main-nav a {
  display: block; padding: 8px 16px; color: var(--ink); font-size: 16px;
  border-radius: var(--radius); position: relative;
}
.main-nav a::after {
  content: ""; position: absolute; left: 16px; right: 16px; bottom: 2px; height: 2px;
  background: var(--brand); transform: scaleX(0); transform-origin: center; transition: transform 0.25s;
}
.main-nav a:hover::after, .main-nav .current-menu-item > a::after, .main-nav .current_page_item > a::after { transform: scaleX(1); }
.main-nav a:hover, .main-nav .current-menu-item > a, .main-nav .current_page_item > a { color: var(--brand); }
/* 汉堡按钮 */
.nav-toggle { display: none; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); cursor: pointer; padding: 10px; }
.nav-toggle span { display: block; height: 2px; background: var(--ink); margin: 6px 0; transition: 0.3s; }
.nav-toggle.is-open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ============ 五、Banner 主视觉轮播 ============ */
.hero { position: relative; overflow: hidden; background: var(--ink); }
.hero__slide { position: relative; display: none; }
.hero__slide.is-active { display: block; animation: heroIn 0.8s ease both; }
@keyframes heroIn { from { opacity: 0.2; } to { opacity: 1; } }
.hero__slide svg, .hero__slide img { width: 100%; height: 520px; object-fit: cover; }
.hero__caption {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  justify-content: center; padding: 0 8%; pointer-events: none;
}
.hero__slide svg + .hero__caption { pointer-events: none; }
.hero__caption .hero__kicker { color: var(--gold); letter-spacing: 6px; font-size: 14px; }
.hero__caption h2 { font-size: 40px; color: #fff; margin: 10px 0 14px; letter-spacing: 4px; text-shadow: 0 2px 12px rgba(0,0,0,.35); }
.hero__caption p { color: #efe6d4; max-width: 560px; font-size: 17px; text-shadow: 0 1px 8px rgba(0,0,0,.4); }
.hero__dots { position: absolute; bottom: 22px; left: 8%; display: flex; gap: 10px; z-index: 5; }
.hero__dots button { width: 28px; height: 4px; border: none; background: rgba(255,255,255,.4); cursor: pointer; }
.hero__dots button.is-active { background: var(--gold); }

/* ============ 六、通用标题 / 分割线 / 装饰 ============ */
.sec-head { text-align: center; margin-bottom: 42px; }
.sec-head .sec-kicker { color: var(--gold); letter-spacing: 4px; font-size: 13px; text-transform: uppercase; display: block; margin-bottom: 6px; }
.sec-head h2 { font-size: 30px; letter-spacing: 3px; display: inline-block; position: relative; padding-bottom: 14px; }
.sec-head h2::after { content: ""; position: absolute; left: 50%; transform: translateX(-50%); bottom: 0; width: 48px; height: 3px; background: var(--brand); }
.sec-head p { color: var(--gray); margin-top: 12px; }
.divider-cloud { text-align: center; color: var(--gold); margin: 34px 0; font-size: 20px; letter-spacing: 12px; }

/* ============ 七、首页：核心业务简介 + 数据 ============ */
.intro-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center; }
.intro-grid h2 { font-size: 26px; margin-bottom: 16px; }
.intro-grid .lead { font-size: 17px; }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.stat-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 26px 20px; text-align: center; transition: transform .3s, box-shadow .3s; }
.stat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.stat-card .num { font-family: var(--font-serif); font-size: 38px; color: var(--brand); font-weight: 700; }
.stat-card .num small { font-size: 16px; }
.stat-card .label { color: var(--gray); font-size: 14px; letter-spacing: 2px; }

/* ============ 八、服务 / 产品卡片 ============ */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.svc-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 30px 26px; transition: transform .3s, box-shadow .3s, border-color .3s; display: flex; flex-direction: column; }
.svc-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); border-color: rgba(166,50,42,.35); }
.svc-card svg { width: 52px; height: 52px; margin-bottom: 16px; }
.svc-card h3 { font-size: 20px; margin-bottom: 10px; }
.svc-card p { font-size: 14.5px; color: var(--gray); flex: 1; }
.svc-card .more { margin-top: 14px; font-size: 14px; color: var(--brand); font-weight: 600; }
.svc-card .more::after { content: " →"; transition: margin .25s; }
.svc-card:hover .more::after { margin-left: 6px; }

/* ============ 九、企业优势 ============ */
.adv-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.adv-item { text-align: center; padding: 30px 18px; background: var(--white); border-top: 3px solid var(--gold); border-radius: 0 0 var(--radius-lg) var(--radius-lg); box-shadow: var(--shadow); }
.adv-item .no { font-family: var(--font-serif); font-size: 15px; color: var(--gold); letter-spacing: 2px; display: block; margin-bottom: 8px; }
.adv-item h3 { font-size: 18px; margin-bottom: 8px; }
.adv-item p { font-size: 14px; color: var(--gray); }

/* ============ 十、案例 ============ */
.case-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; transition: transform .3s, box-shadow .3s; }
.case-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); }
.case-card .case-cover svg { width: 100%; height: 190px; }
.case-card .case-body { padding: 20px 22px; }
.case-card .case-tag { display: inline-block; font-size: 12px; color: var(--brand); background: var(--brand-light); border-radius: 99px; padding: 2px 12px; margin-bottom: 10px; }
.case-card h3 { font-size: 17px; margin-bottom: 6px; }
.case-card p { font-size: 14px; color: var(--gray); }
.client-strip { margin-top: 34px; display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.client-strip span { font-family: var(--font-serif); color: var(--gray); border: 1px solid var(--line); padding: 8px 22px; border-radius: 99px; font-size: 14px; background: var(--white); }

/* ============ 十一、新闻 ============ */
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.news-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 26px; transition: box-shadow .3s, transform .3s; display: flex; flex-direction: column; }
.news-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-4px); }
.news-card time { color: var(--gold); font-size: 13px; letter-spacing: 1px; }
.news-card h3 { font-size: 18px; margin: 10px 0 8px; }
.news-card p { font-size: 14px; color: var(--gray); flex: 1; }
.news-list { max-width: 860px; margin: 0 auto; }
.news-list article { display: flex; gap: 18px; align-items: baseline; padding: 20px 8px; border-bottom: 1px dashed var(--line); }
.news-list time { color: var(--gold); font-size: 14px; white-space: nowrap; font-family: var(--font-serif); }
.news-list h2 { font-size: 18px; flex: 1; }
.news-list h2 a { color: var(--ink); }
.news-list h2 a:hover { color: var(--brand); }

/* ============ 十二、联系模块 ============ */
.contact-panel { background: linear-gradient(135deg, var(--brand-dark), var(--brand)); border-radius: var(--radius-lg); color: #f6e8e0; padding: 46px 48px; display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; }
.contact-panel h2 { color: #fff; font-size: 26px; letter-spacing: 3px; margin-bottom: 12px; }
.contact-panel p { color: #f0dcd3; }
.contact-panel dl { font-size: 15px; }
.contact-panel dt { color: var(--gold-light); margin-top: 10px; letter-spacing: 2px; }
.contact-panel dd { color: #fff; }
/* 按钮 */
.btn { display: inline-block; padding: 12px 30px; border-radius: 99px; background: var(--brand); color: #fff; font-size: 15px; letter-spacing: 2px; border: 1px solid var(--brand); transition: all .3s; cursor: pointer; }
.btn:hover { background: var(--brand-dark); color: #fff; box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.btn--ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.6); }
.btn--ghost:hover { background: rgba(255,255,255,.14); }
.btn--gold { background: var(--gold); border-color: var(--gold); color: #fff; }
.btn--gold:hover { background: #b0924a; }

/* ============ 十三、面包屑 ============ */
.breadcrumb { background: var(--paper); border-bottom: 1px solid var(--line); font-size: 13.5px; }
.breadcrumb .wrap { display: flex; align-items: center; height: 46px; gap: 8px; color: var(--gray); flex-wrap: wrap; }
.breadcrumb a { color: var(--gray); }
.breadcrumb a:hover { color: var(--brand); }
.breadcrumb .sep { color: #c8bfae; }

/* ============ 十四、内页通用 ============ */
.page-hero { background: var(--paper); border-bottom: 1px solid var(--line); padding: 44px 0; text-align: center; }
.page-hero h1 { font-size: 32px; letter-spacing: 4px; }
.page-hero .page-desc { color: var(--gray); margin-top: 10px; max-width: 640px; margin-left: auto; margin-right: auto; }
.entry-content { padding: 56px 0; }
.entry-content .wrap { max-width: 860px; }
.entry-content h2 { font-size: 24px; margin: 36px 0 14px; padding-left: 14px; border-left: 4px solid var(--brand); }
.entry-content h3 { font-size: 19px; margin: 26px 0 10px; }
.entry-content ul, .entry-content ol { padding-left: 8px; margin: 0 0 1em 1.2em; }
.entry-content li { margin-bottom: 6px; }
.entry-content blockquote { background: var(--paper); border-left: 4px solid var(--gold); padding: 16px 22px; margin: 20px 0; color: var(--text); }
/* 关于我们时间轴 */
.timeline { position: relative; margin: 30px 0; padding-left: 26px; border-left: 2px solid var(--line); }
.timeline li { list-style: none; margin-bottom: 26px; position: relative; }
.timeline li::before { content: ""; position: absolute; left: -33px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--brand); border: 3px solid #fff; box-shadow: 0 0 0 2px var(--brand); }
.timeline .year { font-family: var(--font-serif); color: var(--brand); font-weight: 700; margin-right: 10px; }
/* FAQ 折叠 */
.faq-list { max-width: 820px; margin: 0 auto; }
.faq-item { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 14px; overflow: hidden; }
.faq-item summary { cursor: pointer; padding: 16px 20px; font-family: var(--font-serif); font-weight: 700; color: var(--ink); font-size: 16.5px; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "＋"; color: var(--brand); font-size: 18px; transition: transform .3s; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item .faq-body { padding: 0 20px 18px; color: var(--gray); font-size: 15px; }
/* 表格 */
.table-plain { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: 15px; }
.table-plain th, .table-plain td { border: 1px solid var(--line); padding: 10px 14px; text-align: left; }
.table-plain th { background: var(--paper); font-family: var(--font-serif); color: var(--ink); }
/* 表单 */
.form { max-width: 620px; margin: 0 auto; }
.form .field { margin-bottom: 18px; }
.form label { display: block; margin-bottom: 6px; color: var(--ink); font-size: 14.5px; }
.form input, .form textarea, .form select {
  width: 100%; padding: 11px 14px; border: 1px solid var(--line); border-radius: var(--radius);
  font-family: var(--font-sans); font-size: 15px; background: var(--white); transition: border-color .25s, box-shadow .25s;
}
.form input:focus, .form textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(166,50,42,.12); }
.form-msg { text-align: center; margin-top: 14px; font-size: 14.5px; }

/* ============ 十五、服务详情 ============ */
.detail-grid { display: grid; grid-template-columns: 280px 1fr; gap: 40px; align-items: start; }
.side-nav { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 24px; position: sticky; top: 96px; }
.side-nav h3 { font-size: 17px; padding-bottom: 12px; border-bottom: 1px solid var(--line); margin-bottom: 10px; }
.side-nav a { display: block; padding: 9px 10px; color: var(--text); border-radius: var(--radius); font-size: 14.5px; }
.side-nav a:hover, .side-nav a.is-current { background: var(--brand-light); color: var(--brand); }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 28px 0; counter-reset: step; }
.step { background: var(--paper); border-radius: var(--radius); padding: 18px; position: relative; counter-increment: step; }
.step::before { content: counter(step, cjk-ideographic); font-family: var(--font-serif); color: var(--brand); font-size: 22px; font-weight: 700; display: block; margin-bottom: 6px; }

/* ============ 十六、页脚 ============ */
.site-footer { background: var(--ink); color: #b3a895; margin-top: 70px; }
.site-footer .footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 36px; padding: 56px 0 40px; }
.site-footer h3 { color: #e8dfc9; font-size: 17px; letter-spacing: 2px; margin-bottom: 16px; position: relative; padding-bottom: 10px; }
.site-footer h3::after { content: ""; position: absolute; left: 0; bottom: 0; width: 26px; height: 2px; background: var(--gold); }
.site-footer p, .site-footer li { font-size: 14px; line-height: 2; }
.site-footer ul { list-style: none; }
.site-footer a { color: #b3a895; }
.site-footer a:hover { color: var(--gold); }
.site-footer .f-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.site-footer .f-logo svg { width: 42px; height: 42px; }
.site-footer .f-logo strong { font-family: var(--font-serif); color: #f2ead6; font-size: 20px; letter-spacing: 2px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); padding: 18px 0; font-size: 13px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.footer-bottom a { color: #948a79; }

/* ============ 十七、404 ============ */
.error-404 { text-align: center; padding: 90px 0 110px; }
.error-404 .code404 { font-family: var(--font-serif); font-size: 110px; color: var(--brand); line-height: 1; }
.error-404 h1 { font-size: 26px; margin: 18px 0 10px; }
.error-404 p { color: var(--gray); margin-bottom: 26px; }
.error-404 .searchform { display: flex; max-width: 420px; margin: 0 auto 26px; }
.error-404 .searchform input { flex: 1; border: 1px solid var(--line); border-right: 0; border-radius: var(--radius) 0 0 var(--radius); padding: 10px 14px; }
.error-404 .searchform button { border: none; background: var(--brand); color: #fff; padding: 0 24px; border-radius: 0 var(--radius) var(--radius) 0; cursor: pointer; }

/* ============ 十八、返回顶部 ============ */
#back-top { position: fixed; right: 26px; bottom: 30px; width: 44px; height: 44px; border-radius: 50%; background: var(--brand); color: #fff; border: none; cursor: pointer; opacity: 0; pointer-events: none; transition: opacity .3s, transform .3s; z-index: 99; font-size: 18px; }
#back-top.is-show { opacity: 1; pointer-events: auto; }
#back-top:hover { transform: translateY(-4px); background: var(--brand-dark); }

/* ============ 十九、栅格与移动端适配 ============ */
@media (max-width: 1024px) {
  .grid-3, .adv-grid, .news-grid, .steps { grid-template-columns: repeat(2, 1fr); }
  .intro-grid, .contact-panel, .detail-grid { grid-template-columns: 1fr; }
  .site-footer .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .hero__caption h2 { font-size: 30px; }
}
@media (max-width: 768px) {
  .topbar .topbar__links { display: none; }
  .nav-toggle { display: block; }
  .main-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--white); border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
  }
  .main-nav.is-open { display: block; animation: navIn .25s ease; }
  @keyframes navIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; } }
  .main-nav ul { flex-direction: column; gap: 0; padding: 10px 4%; }
  .main-nav a { padding: 13px 8px; border-bottom: 1px dashed var(--line); border-radius: 0; }
  .section { padding: 44px 0; }
  .grid-3, .adv-grid, .news-grid, .steps, .stats { grid-template-columns: 1fr; }
  .hero__slide svg, .hero__slide img { height: 380px; }
  .hero__caption h2 { font-size: 24px; letter-spacing: 2px; }
  .hero__caption p { font-size: 14px; }
  .site-footer .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .footer-bottom { justify-content: center; text-align: center; }
  .brand__name { font-size: 20px; }
  .entry-content { padding: 34px 0; }
}

/* ============ 二十、悬停与滚动显现（加载动画） ============ */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  * { animation: none !important; }
}
