/* ==========================================================================
   Antsclouds 设计系统 —— 基于附录 D（蚁群×云 / 克制双模式）
   主题切换：html[data-theme="dark"|"light"]，首屏由内联脚本设置，防 FOUC。
   ========================================================================== */

/* ---------- 1. 设计令牌 ---------- */
html[data-theme="dark"] {
  color-scheme: dark;
  --c-bg: #0A0F1E;
  --c-bg-deep: #060B17;
  --c-surface: #101828;
  --c-surface-2: #0B1220;
  --c-primary: #38BDF8;
  --c-secondary: #6366F1;
  --c-accent: #F59E0B;
  --c-text: #E2E8F0;
  --c-text-muted: #94A3B8;
  --c-border: rgba(148, 163, 184, 0.22);
  --c-glow: rgba(56, 189, 248, 0.28);
  --c-glow-2: rgba(99, 102, 241, 0.22);

  /* 联动 Kadence 全局调色板（新旧两套命名兼容） */
  --global-palette-color1: #38BDF8;
  --global-palette-color2: #6366F1;
  --global-palette-color3: #E2E8F0;
  --global-palette-color4: #94A3B8;
  --global-palette-color5: #101828;
  --global-palette-color6: #0B1220;
  --global-palette-color7: #101828;
  --global-palette-color8: #0A0F1E;
  --global-palette-color9: #060B17;
  --global-palette1: #38BDF8;
  --global-palette2: #6366F1;
  --global-palette3: #E2E8F0;
  --global-palette4: #94A3B8;
  --global-palette5: #101828;
  --global-palette6: #0B1220;
  --global-palette7: #101828;
  --global-palette8: #0A0F1E;
  --global-palette9: #060B17;
  --global-palette1rgb: 56, 189, 248;
  --global-palette2rgb: 99, 102, 241;
  --global-palette3rgb: 226, 232, 240;
  --global-palette4rgb: 148, 163, 184;
  --global-palette5rgb: 16, 24, 40;
  --global-palette6rgb: 11, 18, 32;
  --global-palette7rgb: 16, 24, 40;
  --global-palette8rgb: 10, 15, 30;
  --global-palette9rgb: 6, 11, 23;
}

html[data-theme="light"] {
  color-scheme: light;
  --c-bg: #F8FAFC;
  --c-bg-deep: #EEF2F7;
  --c-surface: #FFFFFF;
  --c-surface-2: #F1F5F9;
  --c-primary: #2563EB;
  --c-secondary: #6366F1;
  --c-accent: #F59E0B;
  --c-text: #0F172A;
  --c-text-muted: #475569;
  --c-border: rgba(15, 23, 42, 0.14);
  --c-glow: rgba(37, 99, 235, 0.14);
  --c-glow-2: rgba(99, 102, 241, 0.12);

  --global-palette-color1: #2563EB;
  --global-palette-color2: #6366F1;
  --global-palette-color3: #0F172A;
  --global-palette-color4: #475569;
  --global-palette-color5: #FFFFFF;
  --global-palette-color6: #F1F5F9;
  --global-palette-color7: #FFFFFF;
  --global-palette-color8: #F8FAFC;
  --global-palette-color9: #EEF2F7;
  --global-palette1: #2563EB;
  --global-palette2: #6366F1;
  --global-palette3: #0F172A;
  --global-palette4: #475569;
  --global-palette5: #FFFFFF;
  --global-palette6: #F1F5F9;
  --global-palette7: #FFFFFF;
  --global-palette8: #F8FAFC;
  --global-palette9: #EEF2F7;
  --global-palette1rgb: 37, 99, 235;
  --global-palette2rgb: 99, 102, 241;
  --global-palette3rgb: 15, 23, 42;
  --global-palette4rgb: 71, 85, 105;
  --global-palette5rgb: 255, 255, 255;
  --global-palette6rgb: 241, 245, 249;
  --global-palette7rgb: 255, 255, 255;
  --global-palette8rgb: 248, 250, 252;
  --global-palette9rgb: 238, 242, 247;
}

/* 兜底（JS 未执行时默认深色，与内联脚本一致） */
html:not([data-theme]) { --c-bg: #0A0F1E; --c-surface: #101828; --c-primary: #38BDF8; --c-secondary: #6366F1; --c-accent: #F59E0B; --c-text: #E2E8F0; --c-text-muted: #94A3B8; --c-border: rgba(148,163,184,.22); --c-glow: rgba(56,189,248,.28); --c-glow-2: rgba(99,102,241,.22); }

/* ---------- 2. 基础 ---------- */
body {
  background-color: var(--c-bg);
  color: var(--c-text);
  transition: background-color .35s ease, color .35s ease;
}
.site-container, .site { background-color: transparent; }
a { color: var(--c-primary); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--c-secondary); text-decoration: none; }
::selection { background: var(--c-primary); color: #0B1220; }
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-thumb { background: var(--c-border); border-radius: 8px; }
h1, h2, h3, h4, h5, h6 { color: var(--c-text); }
.entry-content h1, .entry-content h2, .entry-content h3 { line-height: 1.25; letter-spacing: -0.01em; }
.entry-content h1 { font-size: 2.25rem; font-weight: 700; margin: 0 0 1.2rem; }
.entry-content h2 { font-size: 1.7rem; font-weight: 700; margin: 1.6rem 0 .8rem; }
.entry-content h3 { font-size: 1.35rem; font-weight: 700; margin: 1.4rem 0 .6rem; }
.entry-content h4 { font-size: 1.12rem; font-weight: 600; margin: 1.2rem 0 .5rem; }
.entry-content h5 { font-size: 1rem; font-weight: 600; }
.entry-content h6 { font-size: .92rem; font-weight: 600; color: var(--c-text-muted); }
.entry-content p { line-height: 1.8; }

/* 主题过渡平滑 */
body, .site-header, .site-footer, .entry-content, .wp-block-group, .wp-block-columns, .wp-block-kadence-rowlayout, .wp-block-kadence-column {
  transition: background-color .35s ease, color .35s ease, border-color .35s ease;
}

/* ---------- 3. 品牌化头部（Kadence Header 覆盖） ---------- */
.site-header {
  background: transparent;
  border-bottom: 1px solid var(--c-border);
}
.site-header .site-branding a { color: var(--c-text); font-weight: 700; }
.header-navigation .menu-item > a { color: var(--c-text); font-weight: 500; }
.header-navigation .menu-item > a:hover { color: var(--c-primary); }

/* LOGO 尺寸收敛（512 方标不再把 header 撑到 201px，紧凑 72px 头） */
.site-branding a.brand img { max-width: 48px !important; width: 48px; height: 48px; object-fit: contain; }
.site-main-header-inner-wrap { min-height: 72px; }
.header-html-inner { display: flex; align-items: center; gap: .9rem; }

/* 粘性玻璃头（Kadence 1.5.2 实际类为 .kadence-sticky-header.item-is-fixed；增强级，旧内核降级纯色） */
.kadence-sticky-header.item-is-fixed,
.kadence-sticky-header.item-is-fixed > .site-header-row-container-inner {
  background: var(--c-bg);
  box-shadow: 0 6px 24px rgba(0, 0, 0, .18);
}
@supports (backdrop-filter: blur(14px)) {
  .kadence-sticky-header.item-is-fixed,
  .kadence-sticky-header.item-is-fixed > .site-header-row-container-inner {
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
  }
}
@supports (backdrop-filter: blur(14px)) and (color-mix(in srgb, var(--c-bg), transparent)) {
  .kadence-sticky-header.item-is-fixed,
  .kadence-sticky-header.item-is-fixed > .site-header-row-container-inner {
    background: color-mix(in srgb, var(--c-bg) 72%, transparent);
  }
}

/* 粘性头部阴影恢复（Kadence 会在 stuck 态清零 box-shadow） */
.kadence-sticky-header.item-is-fixed.item-is-stuck { box-shadow: 0 6px 24px rgba(0, 0, 0, .18) !important; }
html[data-theme="light"] .kadence-sticky-header.item-is-fixed.item-is-stuck { box-shadow: 0 6px 24px rgba(0, 0, 0, .08) !important; }

/* ---------- 4. 组件：按钮 ---------- */
:root {
  --btn-radius: 12px;
  --btn-padding: .8rem 1.6rem;
}
.ants-btn, .wp-block-button__link, .kadence-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  border-radius: var(--btn-radius); font-weight: 600; text-decoration: none;
  transition: transform .22s ease, box-shadow .22s ease, background-color .22s ease;
}
.ants-btn { padding: var(--btn-padding); font-size: 1rem; line-height: 1.2; min-height: 44px; }
.ants-btn + .ants-btn { margin-left: .9rem; } /* flex gap 兜底（旧内核不支持 gap） */
.ants-btn-primary, .wp-block-button.is-style-fill .wp-block-button__link,
.wp-block-button.ants-btn-primary .wp-block-button__link {
  background: linear-gradient(135deg, var(--c-primary), var(--c-secondary));
  color: #0B1220;
}
.ants-btn-primary:hover, .wp-block-button.is-style-fill .wp-block-button__link:hover,
.wp-block-button.ants-btn-primary .wp-block-button__link:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px var(--c-glow);
  color: #0B1220;
}
.ants-btn-ghost {
  border: 1px solid var(--c-border); color: var(--c-text); background: transparent;
}
.ants-btn-ghost:hover { border-color: var(--c-primary); color: var(--c-primary); }
.wp-block-button.ants-btn-ghost .wp-block-button__link {
  background: transparent; border: 1px solid var(--c-border); color: var(--c-text);
}
.wp-block-button.ants-btn-ghost .wp-block-button__link:hover {
  background: transparent; border-color: var(--c-primary); color: var(--c-primary);
}
/* 浅色模式主按钮文字改白过 AA（深色模式保持深字压亮渐变） */
html[data-theme="light"] .ants-btn-primary,
html[data-theme="light"] .ants-btn-primary:hover,
html[data-theme="light"] .wp-block-button.is-style-fill .wp-block-button__link,
html[data-theme="light"] .wp-block-button.is-style-fill .wp-block-button__link:hover,
html[data-theme="light"] .wp-block-button.ants-btn-primary .wp-block-button__link,
html[data-theme="light"] .wp-block-button.ants-btn-primary .wp-block-button__link:hover {
  color: #fff;
}

/* ---------- 4b. 键盘焦点可见（WCAG 2.4.7） ---------- */
:focus-visible { outline: 2px solid var(--c-primary); outline-offset: 2px; }
.ants-btn-primary:focus-visible,
.wp-block-button__link:focus-visible { transform: translateY(-2px); box-shadow: 0 10px 30px var(--c-glow), 0 0 0 3px var(--c-border); }
.ants-card-link:focus-visible { outline: 2px solid var(--c-primary); outline-offset: 3px; }
.ants-card a:focus-visible { outline-offset: -2px; }

/* ---------- 5. 组件：Hero ---------- */
.ants-hero { position: relative; overflow: hidden; padding: 4.5rem 0; padding: clamp(4rem, 10vw, 7.5rem) 0; background: radial-gradient(circle at 50% 0%, var(--c-glow), transparent 55%), var(--c-bg); }
.ants-hero::before {
  content: ""; position: absolute; inset: -30% -10% auto auto; width: 60%; height: 60%;
  background: radial-gradient(circle at 70% 30%, var(--c-glow), transparent 60%);
  pointer-events: none;
}
.ants-hero::after {
  content: ""; position: absolute; inset: auto auto -35% -10%; width: 55%; height: 60%;
  background: radial-gradient(circle at 30% 70%, var(--c-glow-2), transparent 60%);
  pointer-events: none;
}
.ants-hero .ants-hero-title {
  font-size: 2.6rem; /* 微信/旧内核 clamp 兜底 */
  font-size: clamp(2rem, 4.5vw, 3.8rem);
  line-height: 1.22; letter-spacing: -0.02em; margin: 0 0 1.2rem;
  max-width: 22em; font-weight: 700;
}
.ants-hero .ants-hero-title .grad {
  background: linear-gradient(120deg, var(--c-primary), var(--c-secondary));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.ants-hero .ants-hero-sub { font-size: 1.1rem; font-size: clamp(1.05rem, 2vw, 1.3rem); color: var(--c-text-muted); max-width: 40em; }
.ants-hero .ants-hero-cta { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: 2rem; }
.ants-hero .ants-hero-meta { margin-top: 2.4rem; }

/* ---------- 5b. 首页首屏重构：去标题带、解盒、Hero 全出血 ---------- */
.home .entry-hero { display: none; }
.home .content-area { margin-top: 0; }
.home .entry-content-wrap { padding-top: 0; }
.home .content-bg { background: transparent; box-shadow: none; border-radius: 0; padding: 0; }

/* ---------- 6. 组件：Bento 卡片 ---------- */
.ants-bento { display: grid; grid-template-columns: repeat(12, 1fr); gap: 1.1rem; }
.ants-card {
  position: relative; overflow: hidden;
  background: var(--c-surface); border: 1px solid var(--c-border);
  border-radius: 18px; padding: 1.8rem; padding: clamp(1.4rem, 3vw, 2.2rem);
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.ants-card:hover {
  transform: translateY(-4px);
  border-color: var(--c-primary);
  box-shadow: 0 16px 44px var(--c-glow);
}
.ants-card .ants-card-icon { font-size: 1.9rem; margin-bottom: 1rem; display: inline-block; }
.ants-card h3 { margin: 0 0 .6rem; font-size: 1.25rem; line-height: 1.35; font-weight: 700; }
.ants-card p { color: var(--c-text-muted); margin: 0 0 1rem; font-size: .96rem; }
.ants-card .ants-card-link { font-weight: 600; color: var(--c-primary); text-decoration: none; }
.ants-card .ants-card-link:hover { color: var(--c-secondary); }
.ants-card-wide { grid-column: span 7; }
.ants-card-narrow { grid-column: span 5; }
.ants-card-half { grid-column: span 6; }
.ants-card-third { grid-column: span 4; }
@media (max-width: 900px) {
  .ants-card-wide, .ants-card-narrow, .ants-card-half, .ants-card-third { grid-column: span 12; }
}

/* ---------- 7. 组件：数据统计条 ---------- */
.ants-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1.4rem; }
.ants-stat .ants-stat-num {
  font-size: 2rem; font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 700; letter-spacing: -0.02em;
  color: var(--c-primary); font-variant-numeric: tabular-nums;
}
.ants-stat .ants-stat-label { color: var(--c-text-muted); font-size: .92rem; }

/* ---------- 8. 组件：标签/技术栈 ---------- */
.ants-tags { display: flex; flex-wrap: wrap; gap: .55rem; }
.ants-tag {
  border: 1px solid var(--c-border); border-radius: 999px;
  padding: .35rem .9rem; font-size: .85rem; color: var(--c-text-muted);
  background: var(--c-surface-2);
}

/* ---------- 9. 区块标题 ---------- */
.ants-section { padding: 4rem 0; padding: clamp(3rem, 7vw, 5.5rem) 0; }
.ants-section-head { max-width: 46em; margin-bottom: 2.4rem; }
.ants-eyebrow {
	display: inline-block; color: var(--c-primary); font-weight: 700;
	letter-spacing: .14em; text-transform: uppercase; font-size: .8rem; margin-bottom: .7rem;
}
.ants-section-title { font-size: 2rem; font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 700; line-height: 1.2; letter-spacing: -0.01em; margin: 0 0 .9rem; }

/* ---------- 10. 大 CTA 区 ---------- */
.ants-cta {
  text-align: center; border-radius: 24px; padding: 3rem; padding: clamp(2.4rem, 6vw, 4rem);
  background:
    radial-gradient(circle at 50% 0%, var(--c-glow), transparent 65%),
    var(--c-surface);
  border: 1px solid var(--c-border);
}
.ants-cta h2 { font-size: 2rem; font-size: clamp(1.6rem, 4vw, 2.4rem); margin: 0 0 .8rem; }

/* ---------- 11. 页脚微调 ---------- */
.site-footer { border-top: 1px solid var(--c-border); }
.site-footer a { color: var(--c-text-muted); }
.site-footer a:hover { color: var(--c-primary); }

/* ---------- 12. 头部控件：主题切换（单按钮）& 语言切换（单链接） ---------- */
.ants-theme-toggle,
.ants-lang-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 36px; padding: 0 1.1rem; border-radius: 999px;
  border: 1px solid var(--c-border); background: var(--c-surface);
  color: var(--c-text); font-size: .82rem; font-weight: 600; letter-spacing: .02em;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: color .2s ease, border-color .2s ease, background-color .2s ease, transform .2s ease;
}
.ants-theme-toggle { min-width: 52px; }
.ants-lang-toggle { text-transform: uppercase; letter-spacing: .08em; }
@media (hover: hover) {
  .ants-theme-toggle:hover,
  .ants-lang-toggle:hover { color: var(--c-primary); border-color: var(--c-primary); }
}
.ants-theme-toggle:focus-visible,
.ants-lang-toggle:focus-visible { outline: 2px solid var(--c-primary); outline-offset: 2px; }

/* ---------- 13. 入场动画（基础级：opacity/transform；增强级由 JS 触发 .ants-in） ---------- */
.ants-in { opacity: 0; transform: translateY(18px); transition: opacity .32s ease-out, transform .32s ease-out; }
.ants-in.ants-visible { opacity: 1; transform: none; }
.ants-card.ants-in { transition-delay: calc(var(--i, 0) * 60ms); }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ants-in { opacity: 1 !important; transform: none !important; transition: none !important; }
  * { animation-duration: .01ms !important; }
}

/* 微信内降级：去掉毛玻璃依赖、关闭滚动驱动动画等价物 */
body.is-wechat .ants-in { opacity: 1; transform: none; }
body.is-wechat * { transition-duration: .01ms !important; }
@supports not (backdrop-filter: blur(10px)) {
  .kadence-sticky-header.item-is-fixed,
  .kadence-sticky-header.item-is-fixed > .site-header-row-container-inner { background: var(--c-bg); }
}

/* ---------- 14. 表单（CF7 品牌化） ---------- */
.wpcf7-form input[type="text"], .wpcf7-form input[type="email"], .wpcf7-form input[type="tel"], .wpcf7-form textarea, .wpcf7-form select {
  width: 100%; background: var(--c-surface-2); border: 1px solid var(--c-border);
  border-radius: 10px; color: var(--c-text); padding: .7rem 1rem; font-size: 1rem;
}
.wpcf7-form input:focus, .wpcf7-form textarea:focus { outline: none; border-color: var(--c-primary); box-shadow: 0 0 0 3px var(--c-glow); }
.wpcf7-submit, .ants-submit { background: linear-gradient(135deg, var(--c-primary), var(--c-secondary)); color: #0B1220; border: 0; border-radius: 12px; padding: .8rem 1.8rem; font-weight: 600; cursor: pointer; }
.wpcf7-submit:hover { box-shadow: 0 10px 30px var(--c-glow); }
.wpcf7-form input[type="submit"].wpcf7-submit { border-radius: var(--btn-radius); }
/* 浏览器自动填充随主题（避免白底/黑字闪框） */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px var(--c-surface-2) inset;
  -webkit-text-fill-color: var(--c-text);
  caret-color: var(--c-text);
}

/* ---------- 15. 响应式微调 ---------- */
@media (max-width: 782px) {
  .ants-hero-cta .ants-btn { width: 100%; }
  .ants-hero-cta .wp-block-button,
  .ants-hero-cta .wp-block-button__link { width: 100%; }
  .ants-hero-cta .wp-block-button__link { justify-content: center; }
  .ants-stats { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- 16. 语言提示条 ---------- */
.ants-lang-bar[hidden] { display: none; }
.ants-lang-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center; gap: 1rem;
  padding: .8rem 1.2rem;
  background: var(--c-surface);
  border-top: 1px solid var(--c-border);
  box-shadow: 0 -8px 30px rgba(0, 0, 0, .18);
  font-size: .92rem; color: var(--c-text);
}
.ants-lang-bar a { color: var(--c-primary); font-weight: 600; }
.ants-lang-bar-close {
  border: 0; background: transparent; color: var(--c-text-muted); cursor: pointer;
  font-size: 1.2rem; line-height: 1; padding: .2rem .5rem;
}
.ants-lang-bar-close:hover { color: var(--c-text); }

/* ==========================================================================
   17. 主题切换修复 —— Kadence 自定义器直写具体色值（如 #masthead{background:#fff}）
       会覆盖上面的 CSS 变量。这里用 html[data-theme] 高特异性 + !important 强制同步
       头部三行 / 导航 / 下拉 / 移动抽屉 / 页脚 / 内容区，保证切换主题时文字永不与背景同色。
   ========================================================================== */

/* 头部背景（含 #masthead 与所有行容器） */
html[data-theme="dark"] #masthead,
html[data-theme="dark"] .site-header,
html[data-theme="dark"] .site-header-wrap,
html[data-theme="dark"] .site-header-inner-wrap,
html[data-theme="dark"] .site-header-upper-wrap,
html[data-theme="dark"] .site-header-upper-inner-wrap,
html[data-theme="dark"] .site-main-header-wrap,
html[data-theme="dark"] .site-header-row-container,
html[data-theme="dark"] .site-header-row-container-inner {
	background: var(--c-bg) !important;
}
html[data-theme="light"] #masthead,
html[data-theme="light"] .site-header,
html[data-theme="light"] .site-header-wrap,
html[data-theme="light"] .site-header-inner-wrap,
html[data-theme="light"] .site-header-upper-wrap,
html[data-theme="light"] .site-header-upper-inner-wrap,
html[data-theme="light"] .site-main-header-wrap,
html[data-theme="light"] .site-header-row-container,
html[data-theme="light"] .site-header-row-container-inner {
	background: var(--c-bg) !important;
}

/* 品牌文字 */
html[data-theme="dark"] .site-header .site-branding a,
html[data-theme="dark"] .site-header .site-title a,
html[data-theme="dark"] .site-header .site-description {
	color: var(--c-text) !important;
}
html[data-theme="light"] .site-header .site-branding a,
html[data-theme="light"] .site-header .site-title a,
html[data-theme="light"] .site-header .site-description {
	color: var(--c-text) !important;
}

/* 桌面导航链接 */
html[data-theme="dark"] .header-navigation .menu-item > a,
html[data-theme="dark"] .header-navigation .menu-item > a .link-inner,
html[data-theme="dark"] .main-navigation .menu-item > a {
	color: var(--c-text) !important;
}
html[data-theme="light"] .header-navigation .menu-item > a,
html[data-theme="light"] .header-navigation .menu-item > a .link-inner,
html[data-theme="light"] .main-navigation .menu-item > a {
	color: var(--c-text) !important;
}
html[data-theme="dark"] .header-navigation .menu-item > a:hover,
html[data-theme="dark"] .main-navigation .menu-item > a:hover {
	color: var(--c-primary) !important;
}
html[data-theme="light"] .header-navigation .menu-item > a:hover,
html[data-theme="light"] .main-navigation .menu-item > a:hover {
	color: var(--c-primary) !important;
}
html[data-theme="dark"] .header-navigation .menu-item.current-menu-item > a,
html[data-theme="dark"] .header-navigation .menu-item.current_page_item > a {
	color: var(--c-primary) !important;
}
html[data-theme="light"] .header-navigation .menu-item.current-menu-item > a,
html[data-theme="light"] .header-navigation .menu-item.current_page_item > a {
	color: var(--c-primary) !important;
}

/* 下拉子菜单（含 Kadence 反相修复：深色底深下拉/浅色底浅下拉） */
html[data-theme="dark"] .header-navigation ul.sub-menu,
html[data-theme="dark"] .header-navigation .sub-menu,
html[data-theme="dark"] .primary-menu-container .sub-menu {
	background: var(--c-surface) !important;
	border-color: var(--c-border) !important;
}
html[data-theme="light"] .header-navigation ul.sub-menu,
html[data-theme="light"] .header-navigation .sub-menu,
html[data-theme="light"] .primary-menu-container .sub-menu {
	background: var(--c-surface) !important;
	border-color: var(--c-border) !important;
}
html[data-theme="dark"] .header-navigation .sub-menu a,
html[data-theme="dark"] .header-navigation .sub-menu a .link-inner {
	color: var(--c-text) !important;
}
html[data-theme="light"] .header-navigation .sub-menu a,
html[data-theme="light"] .header-navigation .sub-menu a .link-inner {
	color: var(--c-text) !important;
}
html[data-theme="dark"] .header-navigation .sub-menu a:hover { color: var(--c-primary) !important; }
html[data-theme="light"] .header-navigation .sub-menu a:hover { color: var(--c-primary) !important; }

/* 移动端触发按钮（汉堡图标） */
html[data-theme="dark"] .menu-toggle-open .menu-toggle-icon,
html[data-theme="dark"] .menu-toggle-open,
html[data-theme="dark"] .menu-toggle-icon {
	color: var(--c-text) !important;
}
html[data-theme="light"] .menu-toggle-open .menu-toggle-icon,
html[data-theme="light"] .menu-toggle-open,
html[data-theme="light"] .menu-toggle-icon {
	color: var(--c-text) !important;
}

/* 移动抽屉 */
html[data-theme="dark"] #mobile-drawer,
html[data-theme="dark"] .popup-drawer .drawer-content,
html[data-theme="dark"] .popup-drawer .drawer-inner,
html[data-theme="dark"] .mobile-drawer {
	background: var(--c-bg-deep) !important;
}
html[data-theme="light"] #mobile-drawer,
html[data-theme="light"] .popup-drawer .drawer-content,
html[data-theme="light"] .popup-drawer .drawer-inner,
html[data-theme="light"] .mobile-drawer {
	background: var(--c-bg) !important;
}
html[data-theme="dark"] .mobile-drawer .menu-item > a,
html[data-theme="dark"] .popup-drawer .menu-item > a,
html[data-theme="dark"] .drawer-content .menu-item > a {
	color: var(--c-text) !important;
}
html[data-theme="light"] .mobile-drawer .menu-item > a,
html[data-theme="light"] .popup-drawer .menu-item > a,
html[data-theme="light"] .drawer-content .menu-item > a {
	color: var(--c-text) !important;
}

/* 页脚背景与文字 */
html[data-theme="dark"] .site-footer,
html[data-theme="dark"] .site-footer .site-footer-row-container-inner,
html[data-theme="dark"] .site-footer .footer-html-inner {
	background: var(--c-bg-deep) !important;
	color: var(--c-text-muted) !important;
}
html[data-theme="light"] .site-footer,
html[data-theme="light"] .site-footer .site-footer-row-container-inner,
html[data-theme="light"] .site-footer .footer-html-inner {
	background: var(--c-bg) !important;
	color: var(--c-text-muted) !important;
}
html[data-theme="dark"] .site-footer a { color: var(--c-text-muted) !important; }
html[data-theme="light"] .site-footer a { color: var(--c-text-muted) !important; }
html[data-theme="dark"] .site-footer a:hover { color: var(--c-primary) !important; }
html[data-theme="light"] .site-footer a:hover { color: var(--c-primary) !important; }

/* 内容区标题/正文（页面标题、区块标题、卡片标题） */
html[data-theme="dark"] .entry-content h1,
html[data-theme="dark"] .entry-content h2,
html[data-theme="dark"] .entry-content h3,
html[data-theme="dark"] .entry-content h4,
html[data-theme="dark"] .entry-content h5,
html[data-theme="dark"] .entry-content h6,
html[data-theme="dark"] .entry-header .entry-title,
html[data-theme="dark"] .entry-hero .entry-title {
	color: var(--c-text) !important;
}
html[data-theme="light"] .entry-content h1,
html[data-theme="light"] .entry-content h2,
html[data-theme="light"] .entry-content h3,
html[data-theme="light"] .entry-content h4,
html[data-theme="light"] .entry-content h5,
html[data-theme="light"] .entry-content h6,
html[data-theme="light"] .entry-header .entry-title,
html[data-theme="light"] .entry-hero .entry-title {
	color: var(--c-text) !important;
}

/* 页脚内容可能被 wpautop 包进 <p>，抹平额外间距 */
.ants-footer p, .ants-footer-bottom p { margin: 0; }

/* ==========================================================================
   18. 成品网格与页脚组件样式
   ========================================================================== */
.ants-product-grid {
	display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.4rem;
}
.ants-product-card { display: flex; flex-direction: column; grid-column: auto; }
.ants-product-card:hover { transform: translateY(-4px); }
.ants-product-thumb { display: block; border-radius: 14px; overflow: hidden; margin: -0.5rem -0.5rem 1rem; }
.ants-product-thumb img { width: 100%; height: 200px; object-fit: cover; display: block; }
.ants-product-title { font-size: 1.18rem; margin: 0 0 .5rem; }
.ants-product-title a { color: var(--c-text); text-decoration: none; }
.ants-product-title a:hover { color: var(--c-primary); }
.ants-product-excerpt { color: var(--c-text-muted); font-size: .94rem; margin: 0 0 1rem; flex: 1; }
.ants-empty { color: var(--c-text-muted); }

.ants-footer {
	background: var(--c-bg-deep);
	border-top: 1px solid var(--c-border);
	padding: 3rem 1.5rem 0; padding: clamp(2.5rem, 6vw, 4rem) 1.5rem 0;
	margin: 0 -1.5rem;
	color: var(--c-text-muted);
}
.ants-footer-grid {
	max-width: 1280px; margin: 0 auto; display: grid;
	grid-template-columns: 2fr 1fr 1fr 1.6fr; gap: 2rem; padding-bottom: 2.5rem;
}
.ants-footer-col h4 { color: var(--c-text); font-size: 1rem; margin: 0 0 1rem; }
.ants-footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .55rem; }
.ants-footer-col a { color: var(--c-text-muted); text-decoration: none; font-size: .92rem; }
.ants-footer-col a:hover { color: var(--c-primary); }
.ants-footer-logo-img { display: block; width: 40px; height: 40px; margin-bottom: .6rem; }
.ants-footer-logo { font-size: 1.25rem; font-weight: 700; color: var(--c-text); margin-bottom: .6rem; }
.ants-footer-slogan { font-size: .92rem; color: var(--c-text-muted); margin: 0; }
.ants-footer-contact li { font-size: .9rem; line-height: 1.6; }
.ants-footer-bottom { border-top: 1px solid var(--c-border); padding: 1.1rem 0; }
.ants-footer-bottom-inner {
	max-width: 1280px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: .6rem 1.4rem;
	align-items: center; font-size: .86rem; color: var(--c-text-muted);
}
.ants-footer-bottom-inner a { color: var(--c-text-muted); text-decoration: none; }
.ants-footer-bottom-inner a:hover { color: var(--c-primary); }
@media (max-width: 900px) {
	.ants-footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
	.ants-footer-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   19. 头部布局与子菜单下拉面板（round-4：LOGO 1:1 + 语言化标题 + 美观下拉）
   ========================================================================== */
/* 品牌区：1:1 LOGO + 右侧文字，水平居中 */
.site-branding a.brand,
.mobile-site-branding a.brand {
	display: inline-flex; align-items: center; gap: .7rem; text-decoration: none;
}
.site-branding a.brand img,
.mobile-site-branding a.brand img {
	width: 44px !important; height: 44px !important; max-width: 44px !important;
	object-fit: contain; flex: 0 0 auto;
}
.site-branding .site-title-wrap,
.site-branding .site-title {
	line-height: 1.2; margin: 0;
}
.site-branding .site-title {
	font-size: 1.18rem; font-weight: 700; letter-spacing: .01em; color: var(--c-text);
}

/* 头部右区控件（导航 + 主题/语言切换 + CTA）间距 */
.site-header-main-section-right { gap: .9rem; }
.header-html-inner { display: inline-flex; align-items: center; gap: .6rem; flex-wrap: nowrap; }

/* 子菜单下拉面板：浮起卡片 + 圆角 + 阴影 */
.header-navigation ul.sub-menu,
.header-navigation .sub-menu,
.primary-menu-container .sub-menu {
	min-width: 224px;
	border-radius: 14px;
	padding: .55rem;
	box-shadow: 0 20px 48px rgba(0, 0, 0, .30), 0 2px 10px rgba(0, 0, 0, .14);
}
.header-navigation .sub-menu li.menu-item { border-radius: 10px; }
.header-navigation .sub-menu li.menu-item > a {
	display: flex; align-items: center; gap: .55rem;
	padding: .62rem .95rem; border-radius: 10px;
	font-size: .92rem; font-weight: 500; line-height: 1.3;
	transition: background-color .18s ease, color .18s ease, padding-left .18s ease;
}
@media (hover: hover) {
	.header-navigation .sub-menu li.menu-item > a:hover {
		background: var(--c-surface-2); color: var(--c-primary); padding-left: 1.15rem;
	}
}
/* 有子菜单的父项箭头 */
.header-navigation .menu-item-has-children > a .dropdown-nav-toggle {
	margin-left: .4rem; opacity: .65; transition: opacity .2s ease, transform .2s ease;
}
.header-navigation .menu-item-has-children > a:hover .dropdown-nav-toggle { opacity: 1; transform: translateY(1px); }

/* 移动抽屉内的控件组：单列、全宽触控 */
#mobile-drawer .mobile-html-inner,
#mobile-drawer .header-html-inner {
	display: flex; flex-direction: column; gap: .8rem; padding: 1rem 0;
}
#mobile-drawer .ants-theme-toggle,
#mobile-drawer .ants-lang-toggle { width: 100%; min-height: 44px; justify-content: center; }
