/* ==========================================================================
   WordPress 适配层
   静态页 CSS（assets/css/style.css）1:1 迁移，这里只补 WP 输出带来的差异，
   不改动原有视觉。新增规则一律以 .yuhong- / body 前缀限定范围。
   ========================================================================== */

/* 自定义 logo：WP 会包一层 .custom-logo-link，尺寸与静态页 .logo-brand 一致 */
.site-header .custom-logo-link {
  display: block;
  line-height: 0;
}

.site-header .custom-logo {
  height: 56px;
  width: auto;
  display: block;
}

/* 后台编辑器里连续 <p> 的间距，与静态页 .about-body p / .nd-body p 对齐 */
.entry-content > * + *,
.detail-article > * + * {
  margin-top: 16px;
}

.entry-content h2,
.entry-content h3,
.detail-article h2,
.detail-article h3 {
  margin-top: 28px;
}

/* 后台插入的图片默认不撑破容器 */
.entry-content img,
.detail-article img {
  max-width: 100%;
  height: auto;
}

/* 表格（编辑器产物）沿用静态页 kv-table 观感 */
.entry-content table {
  width: 100%;
  border-collapse: collapse;
}

.entry-content th,
.entry-content td {
  border-bottom: 1px solid #eee;
  padding: 10px 12px;
  text-align: left;
}

/* 分页：首尾不可点时灰掉 */
.pager .pager-btn {
  opacity: .45;
  cursor: default;
}

.pager a.pager-btn {
  opacity: 1;
  cursor: pointer;
}

/* WordPress 后台管理条在手机端别遮住固定头部 */
.admin-bar .site-header {
  top: 32px;
}

@media screen and (max-width: 782px) {
  .admin-bar .site-header {
    top: 46px;
  }
}

/* 屏幕阅读器专用文本 */
.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;
}

/* 静态页没有搜索框样式，给个低调的最小实现 */
.search-form {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
}

.search-form .search-field {
  flex: 1;
  border: 1px solid #ddd;
  border-radius: var(--radius);
  padding: 10px 14px;
  font-family: inherit;
  font-size: 14px;
}

.search-form .search-submit {
  background: var(--green);
  color: var(--white);
  border-radius: var(--radius);
  padding: 0 20px;
  font-size: 14px;
}

/* certifications / media 卡片里的 WP 图片 */
.cert-item figcaption a,
.media-card figcaption a {
  color: inherit;
}

/* 内容为空时的编辑器占位提示（仅后台预览可见） */
.page-content .detail-article:empty {
  display: none;
}

/* Issue #20: 首页新闻缩略图可点、分类归档描述 */
.news-cover {
  display: block;
}

.tax-description {
  margin: 0 0 22px;
  color: #666;
  line-height: 1.8;
}
