/* ==========================================================================
 * 无障碍：跳转到主内容（键盘 Tab 时显示在左上角）
 * ======================================================================== */
.skip-link {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1080;
  padding: 0.5rem 1rem;
  background: var(--brand-primary);
  color: #fff;
  text-decoration: none;
  border-radius: 0 0 0.5rem 0;
}
.skip-link:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* ==========================================================================
 * 列表卡片缩略图：统一 16:10 比例，避免不同尺寸图片导致卡片高度参差
 * ======================================================================== */
.post-card-thumb {
  display: block;
  overflow: hidden;
}
.post-card .card-img-top,
.featured-post .card-img-top {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}
.featured-post .card-img-top {
  aspect-ratio: 2 / 1;
}

/* ==========================================================================
 * 分页：Bootstrap 5 结构补充（wp_link_pages 输出的部分项没有原生样式）
 * ======================================================================== */
.pagination {
  gap: 0.25rem;
}
.pagination .page-link {
  border-radius: 0.5rem;
  border: 1px solid #dee2e6;
  color: var(--brand-primary);
}
.pagination .page-item.active .page-link {
  background: var(--brand-gradient);
  border-color: transparent;
  color: #fff;
}

/* ==========================================================================
 * Hero 备选风格（Customizer 中切换）
 * ======================================================================== */
.blog-hero-dark {
  background: linear-gradient(135deg, #212529 0%, #343a40 100%) !important;
}

/* ==========================================================================
 * 评论卡片
 * ======================================================================== */
.comment-card .comment-content > :last-child {
  margin-bottom: 0;
}
.comment-list .children {
  margin-left: 1.5rem;
  padding-left: 1rem;
  border-left: 2px solid #e9ecef;
  list-style: none;
}

/* ==========================================================================
 * 置顶文章标识（依赖模板中的 post_class() 才会生效）
 * ======================================================================== */
.post-card.sticky,
.featured-post.sticky {
  border-left: 3px solid var(--brand-primary);
}

.navbar-toggler:focus {
  box-shadow: none;
}

.post-card .card-body {
  padding: 1.25rem;
}

.post-card .card-title {
  font-weight: 600;
  font-size: 1rem;
}

.post-card .card-text {
  font-size: 0.875rem;
}

.featured-post .card-body {
  padding: 1.5rem;
}

.featured-post .card-title {
  font-weight: 700;
  font-size: 1.5rem;
}

.sidebar-card .list-group-item {
  border: none;
  padding: 0.6rem 0;
}

.sidebar-card .list-group-item-action:hover {
  background: #f8f9fa;
}

.subscribe-card .form-control {
  border: none;
}

.subscribe-card .btn-light {
  font-weight: 600;
}

.single-post-content p {
  line-height: 1.8;
  margin-bottom: 1.25rem;
}

.single-post-content h2,
.single-post-content h3 {
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.single-post-content blockquote {
  border-left: 4px solid var(--brand-primary);
  padding-left: 1rem;
  margin: 1.5rem 0;
  color: #6c757d;
}

.single-post-content pre {
  background: #f8f9fa;
  border-radius: 0.5rem;
  padding: 1rem;
  overflow-x: auto;
}

.single-post-content code {
  background: #f1f3f5;
  padding: 0.15rem 0.35rem;
  border-radius: 0.25rem;
  font-size: 0.875em;
}

.single-post-content pre code {
  background: none;
  padding: 0;
}

.comment-card .comment-author img {
  border-radius: 50%;
}

.comment-form input,
.comment-form textarea {
  border-radius: 0.5rem;
}

.comment-form .submit {
  background: var(--brand-gradient);
  border: none;
  color: #fff;
  font-weight: 600;
  padding: 0.6rem 1.5rem;
  border-radius: 0.5rem;
}

.comment-form .submit:hover {
  opacity: 0.9;
}

.wp-block-image img {
  border-radius: 0.5rem;
}

.entry-content a {
  color: var(--brand-primary);
  text-decoration: none;
}

.entry-content a:hover {
  text-decoration: underline;
}

.sticky {
  border-left: 3px solid var(--brand-primary);
}

@media (max-width: 991.98px) {
  .blog-hero {
    padding: 2rem 1.5rem;
  }
  .blog-hero h1 {
    font-size: 1.8rem;
  }
}

@media (max-width: 575.98px) {
  .blog-hero {
    padding: 1.5rem 1rem;
  }
  .blog-hero h1 {
    font-size: 1.5rem;
  }
  .single-post-header {
    padding: 1.5rem 1rem;
  }
}