/*
Theme Name: Snipaste
Theme URI: https://www.snipaste.com/
Author: Snipaste Theme Team
Author URI: https://www.snipaste.com/
Description: 1:1 复刻 Snipaste 官网主页的原生 WordPress 主题。零第三方前端库（Bootstrap 仅作栅格），内置完整 SEO 输出（title / description / keywords / canonical / Open Graph / JSON-LD / hreflang / robots），支持自定义器配置购买链接、下载版本、社交与页脚。完全响应式，兼容主流浏览器。
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: snipaste
Tags: business, one-column, right-sidebar, custom-menu, custom-logo, featured-images, translation-ready, threaded-comments, full-width-template, block-styles, wide-blocks
*/

/* ==========================================================================
   1. 基础排版（原站 main.css 迁移，1:1 保留）
   ========================================================================== */

body {
  font-family: Helvetica, Arial, "Lucida Grande", "Hiragino Sans GB", "Microsoft Yahei", sans-serif;
  font-size: 15px;
  color: #555;
  background-color: #f9f9f9;
  padding-top: 50px;
  /* 移动端浏览器地址栏高度差导致的锚点偏移修正 */
  overflow-wrap: break-word;
}

h1, .h1,
h2, .h2,
h3, .h3,
h4, .h4,
h5, .h5,
h6, .h6 {
  margin-top: 0;
  font-family: Helvetica, Arial, "Lucida Grande", "Hiragino Sans GB", "Microsoft Yahei", sans-serif;
  font-weight: normal;
  color: #333;
}

a:focus {
  text-decoration: none;
}

a:focus-visible,
button:focus-visible,
.btn:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid #3c76f4;
  outline-offset: 2px;
}

.logo {
  max-height: 20px;
}

.content {
  padding-top: 25px;
  padding-bottom: 30px;
  background-color: #fff;
}

.navbar-inverse .navbar-brand {
  color: #fff;
}

.navbar-brand > img {
  margin-right: 8px;
  display: inline-block;
}

.collapse.in {
  margin-bottom: 8px;
}

.jumbotron {
  font-family: Helvetica, Arial, "Lucida Grande", sans-serif;
  text-align: center;
  background-color: #222;
  color: #fff;
  margin-bottom: 0;
}

.jumbotron h1 {
  font-size: 48px;
}

.jumbotron h3 {
  color: #fff;
}

.jumbotron h4 {
  color: #fff;
  font-size: 18px;
}

.jumbotron p {
  font-family: Helvetica, Arial, "Lucida Grande", sans-serif;
  color: #ddd;
  font-size: 14px;
}

.vertical-align {
  display: flex;
  align-items: center;
}

.jumbotron p > a,
.jumbotron h4 > a {
  color: #FDD04B;
  font-weight: 500;
}

.vcenter {
  display: inline-block;
  vertical-align: middle;
  float: none;
}

.blog-footer {
  padding: 20px 0;
  color: #999;
  text-align: center;
  background-color: #f9f9f9;
  border-top: 1px solid #e5e5e5;
}

.blog-footer p:last-child {
  margin-bottom: 0;
}

sup {
  top: -1em;
}

.badge {
  background-color: #FDD04B;
  border-radius: 4px;
}

.badge a {
  color: black;
}

.flex-row {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
}

.popover-title {
  color: black !important;
}

.preload {
  position: absolute;
  visibility: hidden;
}

code {
  overflow-wrap: break-word;
}

.gold {
  color: #FDD04B !important;
}

.section-title {
  display: flex;
  align-items: center;
  text-align: center;
  font-size: 18px;
  width: 100%;
}

.section-title::before,
.section-title::after {
  content: "";
  flex: 1;
  border-bottom: 1px solid #fff;
}

.section-title span {
  padding: 0 10px;
}

.jumbotron .dropdown a,
.jumbotron .bullet {
  color: #ddd;
}

.my-12 {
  margin-top: 12px;
  margin-bottom: 12px;
}

.mt-12 { margin-top: 12px; }
.mt-6  { margin-top: 6px; }
.mb-6  { margin-bottom: 6px; }

.w-100,
.dropdown-menu {
  width: 100%;
}

.my-auto {
  margin-top: auto;
  margin-bottom: auto;
}

.dropdown:hover .dropdown-menu,
.open .dropdown-menu {
  display: block;
  margin-top: 0;
}

.dropdown.no-hover:hover .dropdown-menu {
  display: none;
}

.dropdown.open .dropdown-menu {
  display: block !important;
}

li.dropdown-item > a {
  display: flex;
  justify-content: flex-start;
  text-align: center;
  align-items: center;
  width: 100%;
  gap: .4rem;
  padding: 3px 6px;
}

li.dropdown-item > a > img {
  max-height: 24px;
  display: block;
  fill: currentcolor;
  flex-shrink: 0;
  padding: 5px;
}

.flex-center {
  display: flex;
  text-align: center;
  align-items: center;
  gap: .4rem;
}

/* --- 其他内页专用（原站 main.css 保留规则） ---
 * 以下 ID 选择器在首页未使用，属于下载页/历史版本表格的样式。
 * 保留以便后续制作对应内页时视觉一致；首页不命中，不影响体积与渲染。 */
#buy-now {
  border: 1.2px solid #ddd;
  background-color: transparent;
  padding: 2px 6px;
  margin-bottom: 6px;
}

#buy-now:focus,
#buy-now:hover {
  background-color: #666 !important;
}

#buy-now:active {
  background-color: #888 !important;
}

#purchase-btn-group {
  display: flex;
  flex-direction: row;
  justify-content: space-around;
  column-gap: 6px;
}

#purchase-btn-group img {
  cursor: pointer;
}

#previous_versions tr > td:nth-child(1) {
  display: flex;
  text-align: center;
  align-items: center;
  gap: .4rem;
}

.latest-badge,
.beta-badge {
  padding: 0 6px;
  border-radius: 8px;
  font-size: 11px;
  color: #fff;
}

.latest-badge { background-color: #3c76f4; }
.beta-badge  { background-color: #f0ad4e; }

.purchase {
  display: flex !important;
  justify-content: space-between;
  text-align: left;
  align-items: center;
  width: 100%;
  gap: .8rem;
  padding: 4px 6px;
  border: 1px solid transparent;
  border-radius: 6px !important;
}

.purchase img {
  width: 28px;
}

.purchase .badge {
  color: #fff;
  border: none;
  padding: 4px;
  background-color: #3c76f4;
  font-weight: 400;
}

.purchase .flex-col {
  gap: 2px;
}

.price .label {
  background-color: #3c76f4;
  font-size: 13px;
  line-height: 18px;
  padding: .3em .6em;
}

.platform {
  color: #000;
}

.version {
  margin-left: auto;
  padding-left: 0.4rem;
  text-align: right;
  color: #aaa;
  font-size: 13px !important;
}

.price {
  margin-left: auto;
  padding-left: 0.4rem;
  text-align: right;
  color: #000;
  font-size: 13px !important;
}

.build {
  padding-left: 0.2rem;
  color: #999;
}

.flex-right {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

.flex-col {
  display: flex;
  flex-direction: column;
}

.mt-5 { margin-top: 5px; }

.filter-black {
  filter: brightness(0) saturate(100%);
}

.f-sm {
  font-size: 12px !important;
}

/* ==========================================================================
   2. FAQ 常见问题（手风琴）
   交互复用 Bootstrap 3 的 .collapse，视觉沿用本站既有配色：
   标题 #333、正文 #555、强调色 #3c76f4、悬停 #FDD04B。
   ========================================================================== */

.faq-section {
  padding: 10px 0 5px;
}

/* 与 support 区标题同级：h2 在本站用作区块主标题 */
.faq-section h2 {
  color: #333;
  text-align: center;
  font-size: 28px;
  margin-bottom: 6px;
}

.faq-lead {
  color: #999;
  text-align: center;
  margin-bottom: 26px;
}

/* 容器：白底浅边框，与站点其它卡片一致 */
.faq-accordion {
  max-width: 860px;
  margin: 0 auto;
  border: 1px solid #eee;
  border-radius: 6px;
  background-color: #fff;
  overflow: hidden;
}

.faq-item + .faq-item {
  border-top: 1px solid #eee;
}

/* 标题里不放 margin，避免手风琴项之间出现多余空隙 */
.faq-heading {
  margin: 0;
  font-size: 16px;
  line-height: 1.5;
}

/* 触发器：整行可点，padding 撑出足够的点击区域（移动端友好） */
.faq-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  margin: 0;
  padding: 16px 20px;
  border: 0;
  background-color: transparent;
  color: #333;
  font: inherit;
  font-size: 16px;
  line-height: 1.5;
  text-align: left;
  cursor: pointer;
  transition: background-color .2s, color .2s;
  -webkit-appearance: none;
  appearance: none;
}

.faq-toggle:hover,
.faq-toggle:focus {
  background-color: #fafafa;
  color: #3c76f4;
  text-decoration: none;
}

.faq-question {
  flex: 1 1 auto;
}

/*
 * 加号指示器：纯 CSS 绘制，两条线交叉成 +。
 * 展开时整体旋转 45° 并让竖线收缩，变成 −（与 Bootstrap 的 .collapsed 类联动）。
 */
.faq-icon {
  flex: 0 0 auto;
  position: relative;
  width: 14px;
  height: 14px;
  margin-top: 3px;
  color: #bbb;
}

.faq-icon::before,
.faq-icon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  background-color: currentColor;
  transition: transform .25s ease, opacity .2s ease;
}

/* 横线 */
.faq-icon::before {
  width: 14px;
  height: 2px;
  margin: -1px 0 0 -7px;
}

/* 竖线：展开时缩成 0，形成减号 */
.faq-icon::after {
  width: 2px;
  height: 14px;
  margin: -7px 0 0 -1px;
}

.faq-toggle:hover .faq-icon,
.faq-toggle:focus .faq-icon,
.faq-toggle[aria-expanded="true"] .faq-icon {
  color: #3c76f4;
}

/* 展开态：竖线消失 + 横线不变 → 视觉上是减号 */
.faq-toggle[aria-expanded="true"] .faq-icon::after {
  transform: scaleY(0);
}

/* 面板内容：内边距在这里给，展开动画由 Bootstrap .collapse 负责 */
.faq-answer {
  padding: 0 20px 18px;
  color: #555;
  font-size: 15px;
  line-height: 1.8;
}

.faq-answer p {
  margin-bottom: 0;
}

.faq-answer code {
  padding: 1px 5px;
  border-radius: 3px;
  background-color: #f5f5f5;
  color: #1c274c;
  font-size: 13px;
}

/* 尊重「减少动态效果」偏好 */
@media (prefers-reduced-motion: reduce) {
  .faq-toggle,
  .faq-icon::before,
  .faq-icon::after {
    transition: none;
  }
}

/* 平板及以下：加大点击区域，文字不挤压图标 */
@media (max-width: 767px) {
  .faq-section h2 {
    font-size: 24px;
  }

  .faq-lead {
    margin-bottom: 20px;
  }

  .faq-accordion {
    border-radius: 4px;
  }

  .faq-toggle {
    padding: 14px 16px;
    font-size: 15px;
  }

  .faq-answer {
    padding: 0 16px 16px;
    font-size: 14px;
    line-height: 1.75;
  }
}

/* ==========================================================================
   2.5 锚点定位补偿
   顶部是 height:50px 的 fixed 导航，若不补偿，
   点击「下载 / 常见问题 / 支持」后目标区块会被导航条盖住一截。
   scroll-padding-top 为主（覆盖所有锚点，含以后新增的区块），
   scroll-margin-top 为老浏览器兜底。
   ========================================================================== */

html {
  scroll-padding-top: 62px;
}

#download,
#faq,
#support,
#intro-container {
  scroll-margin-top: 62px;
}

/* 锚点跳转时给个短暂高亮，便于用户看清落点（不依赖 :target 的浏览器无效果） */
:target {
  scroll-margin-top: 62px;
}

/* ==========================================================================
   2.5 资讯页：列表 / 详情 / 侧栏 / 内链
   --------------------------------------------------------------------------
   设计令牌全部沿用前文，不引入新配色：
     主色 #3c76f4（与价格按钮/分页一致）、强调 #FDD04B（badge/pro）
     正文 #555、标题 #333、边框 #eee、圆角 6px（与 .widget 一致）
   同时补齐了原 main.css 里缺失、但通用模板已在用的
   .posts-list / .entry-card / .sidebar 样式，避免内页无样式。
   ========================================================================== */

/* --- 布局：主栏 8 + 侧栏 4（Bootstrap 栅格，移动端自动堆叠） --- */
.news-layout {
  margin-left: -15px;
  margin-right: -15px;
}

.news-layout__main,
.news-layout__aside {
  position: relative;
  min-height: 1px;
  padding-left: 15px;
  padding-right: 15px;
}

.news-layout__aside {
  margin-top: 30px;
}

@media (min-width: 992px) {
  .news-layout__aside {
    margin-top: 0;
  }
}

/* --- 列表页头部 --- */
.news-header {
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid #eee;
}

.news-header .page-title {
  margin-bottom: 8px;
  font-size: 26px;
  font-weight: normal;
  color: #333;
}

.news-header__desc {
  margin-bottom: 6px;
  color: #555;
}

.news-header__count {
  margin-bottom: 0;
  color: #999;
  font-size: 13px;
}

/* --- 列表：卡片 --- */
.news-list {
  margin-bottom: 10px;
}

.news-card {
  display: flex;
  gap: 20px;
  padding: 20px 0;
  border-bottom: 1px solid #eee;
}

.news-card:first-child {
  padding-top: 0;
}

@media (max-width: 767px) {
  .news-card {
    gap: 14px;
  }
}

/* 封面：固定比例，避免图片未加载时高度塌陷 */
.news-card__media {
  flex: 0 0 200px;
  width: 200px;
  height: 133px;
  overflow: hidden;
  border: 1px solid #eee;
  border-radius: 6px;
  background: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
}

.news-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* 无特色图时的首字占位，保持列表视觉完整 */
.news-card__initial {
  font-size: 40px;
  color: #c8c8c8;
  line-height: 1;
  user-select: none;
}

@media (max-width: 767px) {
  .news-card__media {
    flex-basis: 120px;
    width: 120px;
    height: 80px;
  }

  .news-card__initial {
    font-size: 28px;
  }
}

.news-card__body {
  flex: 1 1 auto;
  min-width: 0;
}

.news-card__title {
  margin-bottom: 8px;
  font-size: 18px;
  line-height: 1.4;
}

.news-card__title a {
  color: #333;
}

.news-card__title a:hover,
.news-card__title a:focus {
  color: #3c76f4;
  text-decoration: none;
}

.news-card__meta {
  margin-bottom: 8px;
  font-size: 13px;
  color: #999;
}

.news-card__term {
  display: inline-block;
  margin-right: 8px;
  padding: 1px 8px;
  border-radius: 10px;
  background: rgba(60, 118, 244, .1);
  color: #3c76f4;
}

.news-card__term:hover,
.news-card__term:focus {
  background: #3c76f4;
  color: #fff;
  text-decoration: none;
}

.news-card__date {
  color: #999;
}

.news-card__excerpt {
  margin-bottom: 10px;
  color: #555;
  line-height: 1.7;
}

.news-card__more {
  font-size: 14px;
  color: #3c76f4;
}

.news-card__more:hover,
.news-card__more:focus {
  color: #3c76f4;
  text-decoration: underline;
}

/* 空状态 */
.news-empty {
  padding: 40px 0;
  text-align: center;
}

.news-empty h2 {
  font-size: 20px;
  color: #333;
}

.news-empty p {
  color: #555;
}

/* --- 详情页 --- */
.news-entry {
  padding-bottom: 20px;
  border-bottom: 1px solid #eee;
}

.news-entry__title {
  margin-bottom: 12px;
  font-size: 28px;
  line-height: 1.4;
  color: #333;
}

@media (max-width: 767px) {
  .news-entry__title {
    font-size: 22px;
  }
}

.news-entry__meta {
  margin-bottom: 20px;
  font-size: 13px;
  color: #999;
}

.news-entry__sep {
  margin: 0 8px;
  color: #ddd;
}

.news-entry__term {
  color: #3c76f4;
}

.news-entry__term:hover,
.news-entry__term:focus {
  text-decoration: underline;
}

.news-entry__cover {
  margin: 0 0 24px;
}

.news-entry__cover img {
  width: 100%;
  height: auto;
  border: 1px solid #eee;
  border-radius: 6px;
}

/* 正文排版 */
.news-entry__content {
  font-size: 15px;
  line-height: 1.9;
  color: #555;
}

.news-entry__content p {
  margin-bottom: 18px;
}

.news-entry__content h2 {
  margin: 32px 0 14px;
  font-size: 20px;
  color: #333;
}

.news-entry__content h3 {
  margin: 24px 0 12px;
  font-size: 17px;
  color: #333;
}

.news-entry__content ul,
.news-entry__content ol {
  margin-bottom: 18px;
  padding-left: 24px;
}

.news-entry__content li {
  margin-bottom: 8px;
}

.news-entry__content blockquote {
  margin: 0 0 18px;
  padding: 12px 16px;
  border-left: 3px solid #FDD04B;
  background: #fffdf6;
  color: #555;
}

.news-entry__content pre {
  padding: 12px 14px;
  overflow-x: auto;
  border: 1px solid #eee;
  border-radius: 6px;
  background: #f5f5f5;
  font-size: 13px;
}

.news-entry__content code {
  padding: 1px 5px;
  border-radius: 3px;
  background: #f5f5f5;
  color: #c7254e;
  font-size: 13px;
}

.news-entry__content pre code {
  padding: 0;
  background: transparent;
  color: inherit;
}

.news-entry__content table {
  width: 100%;
  margin-bottom: 18px;
  border-collapse: collapse;
  font-size: 14px;
}

.news-entry__content th,
.news-entry__content td {
  padding: 8px 10px;
  border: 1px solid #eee;
  text-align: left;
}

.news-entry__content th {
  background: #f5f5f5;
  color: #333;
}

.news-entry__content img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
}

/*
 * 正文自动内链样式。
 * 刻意做得克制：只有下划线 + 主题蓝，不加背景色/加粗，
 * 避免读者一眼看出「这是自动塞的链接」，也避免正文视觉噪音。
 */
.news-entry__content .inline-link {
  color: #3c76f4;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.news-entry__content .inline-link:hover,
.news-entry__content .inline-link:focus {
  color: #3c76f4;
  text-decoration-thickness: 2px;
}

/* 底部分类标签 */
.news-entry__footer {
  padding-top: 18px;
}

.news-entry__footer-label {
  margin-right: 8px;
  font-size: 13px;
  color: #999;
}

.news-tag {
  display: inline-block;
  margin: 0 6px 6px 0;
  padding: 3px 12px;
  border: 1px solid #eee;
  border-radius: 14px;
  background: #fff;
  color: #555;
  font-size: 13px;
}

.news-tag:hover,
.news-tag:focus {
  border-color: #3c76f4;
  color: #3c76f4;
  text-decoration: none;
}

/* --- 相关阅读 --- */
.news-related {
  margin-top: 30px;
}

.news-related__title {
  margin-bottom: 16px;
  padding-left: 10px;
  border-left: 3px solid #3c76f4;
  font-size: 18px;
  color: #333;
}

.news-related__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

@media (max-width: 767px) {
  .news-related__grid {
    grid-template-columns: 1fr;
  }
}

.news-related__item {
  display: flex;
  flex-direction: column;
  padding: 14px;
  border: 1px solid #eee;
  border-radius: 6px;
  background: #fff;
  color: #333;
  text-decoration: none;
}

.news-related__item:hover,
.news-related__item:focus {
  border-color: #3c76f4;
  color: #333;
  text-decoration: none;
}

.news-related__title {
  margin-bottom: 10px;
  font-size: 15px;
  line-height: 1.5;
  color: #333;
}

.news-related__item:hover .news-related__title,
.news-related__item:focus .news-related__title {
  color: #3c76f4;
}

/* 有缩略图时改为左文右图 */
.news-related__thumb {
  order: -1;
  width: 100%;
  height: auto;
  max-height: 140px;
  object-fit: cover;
  border-radius: 4px;
  margin-bottom: 10px;
}

.news-related__date {
  margin-top: auto;
  font-size: 13px;
  color: #999;
}

/* --- 侧栏 --- */
.news-sidebar .widget {
  margin-bottom: 30px;
  padding: 20px;
  border: 1px solid #eee;
  border-radius: 6px;
  background: #fff;
}

.news-sidebar .widget-title {
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid #eee;
  font-size: 16px;
  color: #333;
}

.news-widget__empty {
  margin-bottom: 0;
  color: #999;
  font-size: 14px;
}

/* 热门阅读：带序号排名 */
.news-hot-list {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: none;
}

.news-hot-list__item {
  display: flex;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px dashed #eee;
}

.news-hot-list__item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.news-hot-list__rank {
  flex: 0 0 20px;
  height: 20px;
  line-height: 20px;
  text-align: center;
  border-radius: 3px;
  background: #f5f5f5;
  color: #999;
  font-size: 12px;
}

/* 前三名用主题色突出，形成视觉层级 */
.news-hot-list__item:nth-child(1) .news-hot-list__rank {
  background: #3c76f4;
  color: #fff;
}

.news-hot-list__item:nth-child(2) .news-hot-list__rank,
.news-hot-list__item:nth-child(3) .news-hot-list__rank {
  background: rgba(253, 208, 75, .35);
  color: #8a6d00;
}

.news-hot-list__body {
  min-width: 0;
}

.news-hot-list__link {
  display: block;
  color: #333;
  font-size: 14px;
  line-height: 1.5;
}

.news-hot-list__link:hover,
.news-hot-list__link:focus {
  color: #3c76f4;
  text-decoration: none;
}

.news-hot-list__date {
  display: block;
  margin-top: 3px;
  color: #999;
  font-size: 12px;
}

/* 分类导航 */
.news-cat-list,
.news-more-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.news-cat-list__item {
  border-bottom: 1px dashed #eee;
}

.news-cat-list__item:last-child {
  border-bottom: 0;
}

.news-cat-list__item a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  color: #555;
  font-size: 14px;
}

.news-cat-list__item a:hover,
.news-cat-list__item a:focus,
.news-cat-list__item.is-current a {
  color: #3c76f4;
  text-decoration: none;
}

.news-cat-list__count {
  color: #999;
  font-size: 12px;
}

.news-more-list li {
  border-bottom: 1px dashed #eee;
}

.news-more-list li:last-child {
  border-bottom: 0;
}

.news-more-list a {
  display: block;
  padding: 8px 0;
  color: #555;
  font-size: 14px;
}

.news-more-list a:hover,
.news-more-list a:focus {
  color: #3c76f4;
  text-decoration: none;
}

/* --- 通用列表/文章样式补齐（原 main.css 缺失，内页一直在用） --- */
.posts-list {
  margin-bottom: 20px;
}

.entry-card {
  padding: 20px 0;
  border-bottom: 1px solid #eee;
}

.entry-thumbnail {
  display: block;
  margin-bottom: 12px;
}

.entry-thumbnail img {
  width: 100%;
  height: auto;
  border-radius: 6px;
}

.entry-summary {
  color: #555;
  line-height: 1.7;
}

.entry .read-more {
  font-size: 14px;
  color: #3c76f4;
}

/* 侧栏（有后台小工具时用） */
.sidebar {
  margin-top: 30px;
}

@media (min-width: 992px) {
  .sidebar {
    margin-top: 0;
  }
}

/* ==========================================================================
   3. 主题增强：可访问性 / SEO / WordPress 规范
   ========================================================================== */

/* --- 跳转主内容链接（键盘与读屏用户可见） --- */
.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute !important;
  width: 1px;
  word-wrap: normal !important;
}

.screen-reader-text:focus {
  background-color: #fff;
  border-radius: 3px;
  box-shadow: 0 0 2px 2px rgba(0, 0, 0, .6);
  clip: auto !important;
  clip-path: none;
  color: #1c274c;
  display: block;
  font-size: 14px;
  font-weight: 700;
  height: auto;
  left: 5px;
  line-height: normal;
  padding: 15px 23px 14px;
  text-decoration: none;
  top: 5px;
  width: auto;
  z-index: 100000;
}

/* Bootstrap 3 自带的 sr-only 在隐藏导航下需要时可读 */
.navbar-toggle .sr-only:focus {
  clip: auto;
  clip-path: none;
  height: auto;
  width: auto;
  margin: -1px;
  overflow: visible;
  position: absolute;
}

/* --- 品牌 Logo：装饰性图形用空 alt，避免读屏重复朗读 --- */
.navbar-brand .logo,
.purchase img,
li.dropdown-item > a > img {
  /* 保留原视觉尺寸 */
}

/* --- 首屏主图：明确宽高比，减少 CLS --- */
.hero-figure img {
  width: 100%;
  height: auto;
}

/* --- 功能区图片 --- */
.feature-figure img {
  width: 100%;
  height: auto;
}

/* --- 导航：WordPress 菜单生成的 <ul> 需要去掉默认内边距 --- */
.navbar-nav {
  margin: 0;
  padding: 0;
  list-style: none;
}

.navbar-nav > li {
  position: relative;
}

.navbar-nav > li > a {
  display: block;
  padding: 15px;
  line-height: 20px;
}

.navbar-nav .sub-menu {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.navbar-nav .sub-menu a {
  padding-left: 30px;
}

/* --- 无障碍：仅键盘可见的跳转链接不占用布局 --- */

/* --- 表格：内页若有表格则横向滚动而非撑破布局 --- */
.content table {
  width: 100%;
  max-width: 100%;
  margin-bottom: 20px;
  border-collapse: collapse;
}

.content table th,
.content table td {
  border: 1px solid #ddd;
  padding: 8px 10px;
  text-align: left;
}

.content table thead th {
  background-color: #f5f5f5;
}

.content .table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* --- 图片：WordPress 自动添加的边框/阴影在原站视觉中不存在 --- */
.content img,
.jumbotron img {
  border: 0;
  box-shadow: none;
}

.wp-caption,
.wp-caption-text,
.gallery-caption {
  font-size: 13px;
  color: #999;
}

/* --- 文章/页面对齐类（对齐 WordPress 编辑器输出） --- */
.alignleft {
  float: left;
  margin: 0 1.5em 1em 0;
}

.alignright {
  float: right;
  margin: 0 0 1em 1.5em;
}

.aligncenter {
  display: block;
  margin: 0 auto 1em;
}

.alignnone {
  margin: 0 0 1em;
}

.wp-caption {
  max-width: 100%;
}

.wp-caption img[class*="wp-image-"] {
  display: block;
  margin: 0 auto;
}

.sticky .entry-title::after,
.gallery-caption::before {
  content: "";
}

/* --- 分页导航 --- */
.pagination {
  margin: 20px 0;
}

.pagination .page-numbers {
  display: inline-block;
  min-width: 34px;
  padding: 6px 10px;
  margin: 0 2px 4px;
  border: 1px solid #ddd;
  border-radius: 4px;
  color: #555;
  text-align: center;
  text-decoration: none;
}

.pagination .page-numbers:hover,
.pagination .page-numbers:focus {
  background-color: #3c76f4;
  border-color: #3c76f4;
  color: #fff;
}

.pagination .page-numbers.current {
  background-color: #3c76f4;
  border-color: #3c76f4;
  color: #fff;
  font-weight: 700;
}

.pagination .page-numbers.dots {
  border-color: transparent;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

/* --- 文章列表（内页） --- */
.entry-header {
  margin-bottom: 16px;
}

.entry-title {
  margin-bottom: 6px;
  font-size: 26px;
  line-height: 1.3;
}

.entry-title a {
  color: #333;
}

.entry-title a:hover,
.entry-title a:focus {
  color: #3c76f4;
  text-decoration: none;
}

.entry-meta {
  color: #999;
  font-size: 13px;
}

.entry-meta a {
  color: #999;
}

.entry-meta a:hover,
.entry-meta a:focus {
  color: #3c76f4;
}

.entry-content {
  line-height: 1.75;
}

.entry-content > *:last-child {
  margin-bottom: 0;
}

.entry-footer {
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid #eee;
  color: #999;
  font-size: 13px;
}

.post-navigation {
  margin: 30px 0 0;
}

.posts-navigation .nav-links {
  justify-content: space-between;
}

/* --- 404 --- */
.error-404 .page-content,
.search-no-results .page-content {
  padding: 40px 20px;
  text-align: center;
}

.error-404 .page-content h1,
.search-no-results .page-content h1 {
  font-size: 30px;
  color: #333;
}

.error-404 .page-content .lead,
.search-no-results .page-content .lead {
  font-size: 16px;
  color: #777;
}

/* --- 侧栏小工具 --- */
.widget {
  margin-bottom: 30px;
  padding: 20px;
  border: 1px solid #eee;
  border-radius: 6px;
  background-color: #fff;
}

.widget-title {
  margin-bottom: 14px;
  font-size: 16px;
  color: #333;
  border-bottom: 1px solid #eee;
  padding-bottom: 8px;
}

.widget ul {
  list-style: none;
  padding-left: 0;
  margin-bottom: 0;
}

.widget ul li {
  padding: 5px 0;
  border-bottom: 1px dashed #f0f0f0;
}

.widget ul li:last-child {
  border-bottom: 0;
}

.widget ul ul {
  padding-left: 18px;
}

.widget a {
  color: #555;
}

.widget a:hover,
.widget a:focus {
  color: #3c76f4;
}

.widget_search .input-group {
  width: 100%;
}

/* --- 搜索表单 --- */
.search-form .input-group {
  width: 100%;
}

.search-form input[type="search"] {
  width: 100%;
}

/* --- 评论 --- */
.comment-list {
  list-style: none;
  padding-left: 0;
}

.comment-list .children {
  list-style: none;
  padding-left: 30px;
}

.comment-body {
  padding: 14px 0;
  border-bottom: 1px solid #f0f0f0;
}

.comment-author .avatar {
  float: left;
  margin-right: 12px;
  border-radius: 50%;
}

.comment-metadata {
  font-size: 12px;
  color: #999;
}

.comment-content {
  clear: both;
  padding-top: 6px;
}

.comment-reply-link {
  font-size: 12px;
  color: #3c76f4;
}

.no-comments {
  color: #999;
  font-style: italic;
}

/* --- 站点页脚（WordPress 驱动的页脚小工具） --- */
.site-info {
  color: #999;
  font-size: 13px;
}

.site-info p {
  margin-bottom: 6px;
}

.social-links {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.social-links li {
  display: inline-block;
  margin: 0 6px 6px 0;
}

.social-links a {
  display: inline-block;
  width: 34px;
  height: 34px;
  line-height: 34px;
  border: 1px solid #ddd;
  border-radius: 4px;
  color: #555;
  text-align: center;
  text-decoration: none;
  transition: background-color .2s, color .2s, border-color .2s;
}

.social-links a:hover,
.social-links a:focus {
  background-color: #3c76f4;
  border-color: #3c76f4;
  color: #fff;
}

/* --- 隐藏的 SVG symbol 定义：不占位、不入读屏、无障碍树 --- */
.svg-sprite-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  border: 0;
}

/* --- 页脚底部：赞助标识在右，版权在左 --- */
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.footer-bottom .pull-left,
.footer-bottom .pull-right {
  float: none;
  margin: 0;
}

.site-info p:last-child {
  margin-bottom: 0;
}

.footer-legal a {
  color: #999;
  text-decoration: none;
}

.footer-legal a:hover,
.footer-legal a:focus {
  color: #3c76f4;
}

.footer-menu {
  list-style: none;
  padding-left: 0;
  margin: 0 0 6px;
}

.footer-menu li {
  display: inline-block;
  margin-right: 12px;
}

.footer-disclaimer {
  color: #999;
  font-size: 13px;
}

/* --- 打印：隐藏导航与促销区块 --- */
@media print {
  .navbar,
  .jumbotron,
  .site-footer,
  .pagination,
  .screen-reader-text {
    display: none !important;
  }

  body {
    padding-top: 0;
    background: #fff;
    color: #000;
  }
}

/* --- 尊重系统的减少动态效果偏好 --- */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
