/*
Theme Name: GEO Boost · GEO/SEO 增强通用模板
Theme URI: https://yulinjun.top
Author: Yulinjun
Author URI: https://yulinjun.top
Description: 御林军 GEO 官网站群专用 WordPress 主题。SEO：语义化 HTML5、结构化标题层级、规范链接、Open Graph、面包屑、核心内链与性能优化；GEO（生成式引擎优化）：Article/FAQ/Breadcrumb/WebSite 结构化数据、llms.txt、AI 爬虫放行、摘要卡/目录锚点/问答块等 LLM 友好的内容结构。配合 yulinjun-geo 插件使用（组织级 JSON-LD 与线索表单由插件输出）。
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: Proprietary
Text Domain: geo-boost
Tags: blog, business, one-column, custom-menu, custom-logo, translation-ready
*/

/* =====================================================================
   设计令牌：默认御林军橙红主视觉，可在「自定义」→「GEO 站点品牌」改主色
   ===================================================================== */
:root {
  --yj-accent: #e8542f;
  --yj-accent-2: #ff7a45;
  --yj-accent-soft: rgba(232, 84, 47, .08);
  --yj-ink: #23262d;
  --yj-ink-2: #5a6070;
  --yj-line: #e8e9ee;
  --yj-bg: #ffffff;
  --yj-bg-soft: #f7f8fa;
  --yj-radius: 12px;
  --yj-shadow: 0 6px 24px rgba(30, 35, 45, .08);
  --yj-max: 1160px;
  --yj-article: 800px;
  --yj-font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  margin: 0;
  font-family: var(--yj-font);
  font-size: 16px;
  line-height: 1.75;
  color: var(--yj-ink);
  background: var(--yj-bg);
}
img { max-width: 100%; height: auto; }
a { color: var(--yj-accent); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--yj-accent); outline-offset: 2px; }

.yj-container { max-width: var(--yj-max); margin: 0 auto; padding: 0 20px; }
.yj-article-wrap { max-width: var(--yj-article); margin: 0 auto; padding: 0 20px; }
.screen-reader-text {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 12px; top: 12px; z-index: 99; background: #fff; padding: 8px 14px; border-radius: 8px; box-shadow: var(--yj-shadow); }

/* ==================== 头部 ==================== */
.yj-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--yj-line);
}
.yj-header-inner { display: flex; align-items: center; gap: 20px; min-height: 64px; }
.yj-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; color: var(--yj-ink); }
.yj-brand img { max-height: 40px; width: auto; }
.yj-brand:hover { text-decoration: none; }
.yj-nav { margin-left: auto; }
.yj-nav ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.yj-nav a {
  display: block; padding: 8px 14px; border-radius: 8px;
  color: var(--yj-ink); font-size: 15px;
}
.yj-nav a:hover, .yj-nav .current-menu-item > a, .yj-nav .current_page_item > a {
  color: var(--yj-accent); background: var(--yj-accent-soft); text-decoration: none;
}
.yj-nav .sub-menu { display: none; }
.yj-nav-toggle { display: none; margin-left: auto; border: 1px solid var(--yj-line); background: #fff; border-radius: 8px; padding: 8px 12px; font-size: 18px; cursor: pointer; }
.yj-hotline { font-size: 14px; color: var(--yj-ink-2); white-space: nowrap; }
.yj-hotline strong { color: var(--yj-accent); font-size: 16px; }
@media (max-width: 860px) {
  .yj-nav-toggle { display: block; }
  .yj-hotline { display: none; }
  .yj-nav { display: none; position: absolute; left: 0; right: 0; top: 100%;
    background: #fff; border-bottom: 1px solid var(--yj-line); padding: 8px 20px 16px; }
  .yj-nav.is-open { display: block; }
  .yj-nav ul { flex-direction: column; gap: 2px; }
}

/* ==================== 首页 Hero ==================== */
.yj-hero {
  background: linear-gradient(135deg, var(--yj-accent) 0%, var(--yj-accent-2) 100%);
  color: #fff; padding: 64px 0 56px;
}
.yj-hero h1 { margin: 0 0 12px; font-size: clamp(26px, 4.5vw, 40px); line-height: 1.3; }
.yj-hero p { margin: 0 0 24px; font-size: clamp(15px, 2vw, 18px); opacity: .94; max-width: 720px; }
.yj-hero-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.yj-btn {
  display: inline-block; padding: 12px 28px; border-radius: 999px;
  font-size: 15px; font-weight: 600; cursor: pointer; border: none;
}
.yj-btn-primary { background: #fff; color: var(--yj-accent); }
.yj-btn-primary:hover { text-decoration: none; transform: translateY(-1px); box-shadow: var(--yj-shadow); }
.yj-btn-ghost { background: rgba(255,255,255,.16); color: #fff; border: 1px solid rgba(255,255,255,.5); }
.yj-btn-ghost:hover { text-decoration: none; background: rgba(255,255,255,.26); }
.yj-btn-accent { background: linear-gradient(135deg, var(--yj-accent), var(--yj-accent-2)); color: #fff; }
.yj-btn-accent:hover { text-decoration: none; opacity: .92; }

/* ==================== 区块 ==================== */
.yj-section { padding: 56px 0; }
.yj-section-soft { background: var(--yj-bg-soft); }
.yj-section h2 { margin: 0 0 8px; font-size: clamp(22px, 3vw, 30px); }
.yj-section-sub { margin: 0 0 28px; color: var(--yj-ink-2); }
.yj-grid { display: grid; gap: 20px; }
.yj-grid-3 { grid-template-columns: repeat(3, 1fr); }
.yj-grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) { .yj-grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .yj-grid-3, .yj-grid-2 { grid-template-columns: 1fr; } }

/* ==================== 文章卡片 ==================== */
.yj-card {
  display: flex; flex-direction: column; gap: 8px;
  background: #fff; border: 1px solid var(--yj-line); border-radius: var(--yj-radius);
  padding: 20px; color: inherit;
  transition: transform .15s ease, box-shadow .15s ease;
}
.yj-card:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--yj-shadow); }
.yj-card h3 { margin: 0; font-size: 17px; line-height: 1.5; }
.yj-card p { margin: 0; color: var(--yj-ink-2); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.yj-card-meta { font-size: 13px; color: var(--yj-ink-2); display: flex; gap: 12px; flex-wrap: wrap; }
.yj-card-thumb { border-radius: 8px; aspect-ratio: 16 / 9; object-fit: cover; width: 100%; margin-bottom: 4px; }

/* ==================== 面包屑 ==================== */
.yj-breadcrumbs { padding: 14px 0 0; font-size: 13px; color: var(--yj-ink-2); }
.yj-breadcrumbs a { color: var(--yj-ink-2); }
.yj-breadcrumbs .sep { margin: 0 8px; color: #c3c7d1; }

/* ==================== 文章正文页 ==================== */
.yj-single-header { padding: 20px 0 8px; }
.yj-single-header h1 { margin: 8px 0 12px; font-size: clamp(24px, 3.4vw, 34px); line-height: 1.35; }
.yj-byline { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 13px; color: var(--yj-ink-2); }
.yj-byline time { color: inherit; }
.yj-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.yj-chip { font-size: 12px; padding: 3px 10px; border-radius: 999px; background: var(--yj-accent-soft); color: var(--yj-accent); }
.yj-featured { margin: 20px auto 0; border-radius: var(--yj-radius); overflow: hidden; }

/* 摘要卡（TL;DR）——面向 AI 引擎的快速事实卡 */
.yj-tldr {
  margin: 22px 0; padding: 18px 20px;
  background: var(--yj-accent-soft); border-left: 4px solid var(--yj-accent);
  border-radius: 0 var(--yj-radius) var(--yj-radius) 0;
}
.yj-tldr h2 { margin: 0 0 6px; font-size: 15px; color: var(--yj-accent); }
.yj-tldr p { margin: 0; font-size: 15px; }

/* 目录：h2/h3 自动锚点 */
.yj-toc { margin: 22px 0; padding: 16px 20px; border: 1px solid var(--yj-line); border-radius: var(--yj-radius); background: var(--yj-bg-soft); }
.yj-toc-h { font-size: 14px; font-weight: 700; margin-bottom: 8px; }
.yj-toc ol { margin: 0; padding-left: 20px; font-size: 14px; }
.yj-toc li { margin: 4px 0; }
.yj-toc .lvl3 { margin-left: 18px; list-style: circle; }

/* FAQ 问答块 */
.yj-faq { margin: 26px 0; }
.yj-faq-item { border: 1px solid var(--yj-line); border-radius: var(--yj-radius); margin-bottom: 10px; background: #fff; }
.yj-faq-item summary {
  cursor: pointer; padding: 14px 18px; font-weight: 600; font-size: 15px; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.yj-faq-item summary::after { content: "+"; color: var(--yj-accent); font-size: 18px; }
.yj-faq-item[open] summary::after { content: "−"; }
.yj-faq-item .a { padding: 0 18px 14px; color: var(--yj-ink); font-size: 15px; }

/* 正文排版 */
.entry-content { font-size: 16px; word-break: break-word; }
.entry-content h2 { margin: 40px 0 14px; font-size: 24px; padding-left: 12px; border-left: 4px solid var(--yj-accent); line-height: 1.4; }
.entry-content h3 { margin: 28px 0 10px; font-size: 19px; }
.entry-content p { margin: 0 0 16px; }
.entry-content ul, .entry-content ol { margin: 0 0 16px; padding-left: 24px; }
.entry-content li { margin: 6px 0; }
.entry-content blockquote { margin: 20px 0; padding: 12px 18px; border-left: 4px solid var(--yj-line); color: var(--yj-ink-2); background: var(--yj-bg-soft); border-radius: 0 8px 8px 0; }
.entry-content table { width: 100%; border-collapse: collapse; margin: 18px 0; font-size: 14px; }
.entry-content th, .entry-content td { border: 1px solid var(--yj-line); padding: 9px 12px; text-align: left; }
.entry-content th { background: var(--yj-bg-soft); }
.entry-content img { border-radius: 8px; }
.entry-content pre { overflow-x: auto; background: #1f2329; color: #e8eaef; padding: 16px; border-radius: 8px; font-size: 14px; }
.entry-content a { text-decoration: underline; text-underline-offset: 3px; }

/* 作者与相关阅读 */
.yj-author { display: flex; gap: 14px; align-items: flex-start; margin: 30px 0; padding: 18px; border: 1px solid var(--yj-line); border-radius: var(--yj-radius); background: var(--yj-bg-soft); }
.yj-author-avatar { width: 52px; height: 52px; border-radius: 50%; flex: none; background: linear-gradient(135deg, var(--yj-accent), var(--yj-accent-2)); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 20px; }
.yj-author h3 { margin: 0 0 4px; font-size: 15px; }
.yj-author p { margin: 0; font-size: 13px; color: var(--yj-ink-2); }
.yj-related { margin: 34px 0; }
.yj-related h2 { font-size: 20px; margin: 0 0 14px; }
.yj-tags { margin: 18px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.yj-tags a { font-size: 12px; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--yj-line); color: var(--yj-ink-2); }
.yj-pager { display: flex; justify-content: space-between; gap: 12px; margin: 30px 0; font-size: 14px; }
.yj-pager a { color: var(--yj-ink); border: 1px solid var(--yj-line); border-radius: 8px; padding: 8px 14px; max-width: 48%; }
.yj-pager a:hover { color: var(--yj-accent); border-color: var(--yj-accent); text-decoration: none; }

/* ==================== CTA / 线索表单 ==================== */
.yj-cta {
  margin: 40px 0; padding: 30px 24px; text-align: center;
  background: linear-gradient(135deg, var(--yj-accent), var(--yj-accent-2));
  border-radius: var(--yj-radius); color: #fff;
}
.yj-cta h2 { margin: 0 0 8px; font-size: 22px; }
.yj-cta p { margin: 0 auto 4px; opacity: .95; font-size: 14px; max-width: 560px; }
.yj-cta .yjgeo-form { max-width: 520px; margin: 14px auto 0 !important; }
.yj-cta .yjgeo-form h3 { color: #fff; }
.yj-cta .yjgeo-form input, .yj-cta .yjgeo-form textarea { border-radius: 8px; border: 1px solid rgba(255,255,255,.4); }
.yj-cta .yjgeo-form button { background: #fff; color: var(--yj-accent); border: none; border-radius: 999px; font-weight: 700; }

/* ==================== 列表/分页/搜索/404 ==================== */
.yj-list-head { padding: 34px 0 10px; }
.yj-list-head h1 { margin: 0 0 6px; font-size: clamp(22px, 3vw, 30px); }
.yj-list-head p { margin: 0; color: var(--yj-ink-2); }
.yj-pagination { display: flex; gap: 8px; justify-content: center; padding: 30px 0; }
.yj-pagination .page-numbers { padding: 8px 14px; border: 1px solid var(--yj-line); border-radius: 8px; color: var(--yj-ink); font-size: 14px; }
.yj-pagination .current, .yj-pagination .page-numbers:hover { background: var(--yj-accent); border-color: var(--yj-accent); color: #fff; text-decoration: none; }
.yj-search-form { display: flex; gap: 8px; max-width: 520px; margin: 16px 0; }
.yj-search-form input[type="search"] { flex: 1; padding: 10px 14px; border: 1px solid var(--yj-line); border-radius: 8px; font-size: 15px; }
.yj-search-form button { padding: 10px 20px; border: none; border-radius: 8px; background: var(--yj-accent); color: #fff; cursor: pointer; }

/* ==================== 页脚 ==================== */
.yj-footer { margin-top: 60px; background: #23262d; color: #b9bdc7; font-size: 14px; }
.yj-footer a { color: #d9dce3; }
.yj-footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 28px; padding: 44px 0 30px; }
@media (max-width: 760px) { .yj-footer-grid { grid-template-columns: 1fr; } }
.yj-footer h2, .yj-footer h3 { color: #fff; font-size: 16px; margin: 0 0 12px; }
.yj-footer p { margin: 0 0 8px; }
.yj-footer ul { list-style: none; margin: 0; padding: 0; }
.yj-footer li { margin: 6px 0; }
.yj-footer-bottom { border-top: 1px solid #3a3e48; padding: 16px 0; font-size: 12px; color: #8b8f9a; display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; }

/* ==================== 编辑器对齐与工具类 ==================== */
.alignwide { max-width: var(--yj-max); margin-left: auto; margin-right: auto; }
.alignfull { max-width: none; }
.wp-caption-text, figcaption { font-size: 13px; color: var(--yj-ink-2); text-align: center; margin-top: 6px; }
@media print {
  .yj-header, .yj-footer, .yj-cta, .yj-toc, .yj-pager, .yj-related { display: none !important; }
}
