/* 首页分类卡片标题：小号强调 */
.nav-category-card > .card-header > .nav-category-card__title {
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.35;
    margin-bottom: 0;
}

/* ITEM 默认 .post-other-style { max-width: 800px } 已去掉；外层仍占满容器，正文区在 PC 上单独限宽见下 */
.post-other-style {
    max-width: none;
    width: 100%;
}

/* 跳转须知：card 凸显（色条 + 浅底），无阴影；最大 800px 居中 */
.post.card .post-other-style > .post-jump-notice {
    max-width: 800px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
    overflow: hidden;
    border: 1px solid rgba(47, 102, 255, 0.22);
    border-left: 4px solid var(--color-primary);
    border-radius: var(--radius-md);
    background: linear-gradient(
        135deg,
        rgba(47, 102, 255, 0.08) 0%,
        var(--bg-secondary) 38%,
        var(--bg-body) 100%
    );
    box-shadow: none;
}

[data-bs-theme="dark"] .post.card .post-other-style > .post-jump-notice {
    border-color: rgba(120, 160, 255, 0.32);
    border-left-color: var(--color-primary);
    background: linear-gradient(
        135deg,
        rgba(47, 102, 255, 0.14) 0%,
        var(--bg-secondary) 40%,
        var(--bg-body) 100%
    );
    box-shadow: none;
}

.post-jump-notice__body {
    font-size: 0.9375rem;
    line-height: 1.6;
}

/* 文章/独立页：正文 card-body 在 PC 上最大 800px 居中；相关推荐全宽 */
@media (min-width: 992px) {
    .post.card .post-other-style > .card-body {
        max-width: 800px;
        width: 100%;
        margin-left: auto;
        margin-right: auto;
        box-sizing: border-box;
    }
}

/* 热门站点两列：.list-item 须为 #card__popular 直接子元素；去掉 list-bordered 横线后在此统一间距 */
#card__popular.list-number {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    width: 100%;
    box-sizing: border-box;
    gap: 0.5rem 0.75rem;
    align-content: start;
    align-items: center;
}

#card__popular.list-number > .list-item {
    display: flex;
    flex-direction: row;
    min-width: 0;
    border-top: none !important;
    margin-top: 0 !important;
    align-items: center;
}

/* 序号圆与标题同一水平中线：覆盖主题里 :before 的 display:block + line-height */
#card__popular.list-number > .list-item::before {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    line-height: 1 !important;
    flex-shrink: 0;
}

#card__popular.list-number > .list-item .list-content {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    justify-content: center;
}

#card__popular.list-number > .col-12 {
    grid-column: 1 / -1;
}

/* 详情页相关推荐：全宽；移动端一行 1 个；768+ 两列；992+ 一行 5 个 × 2 行（PHP 取 10 条） */
.post-related {
    width: 100%;
    max-width: 100%;
}

.post-related .card-body,
.post-related .post-related__grid {
    width: 100%;
    max-width: 100%;
}

.post-related__grid {
    display: grid !important;
    grid-template-columns: 1fr;
    gap: 0.5rem 0.75rem;
    box-sizing: border-box;
}

.post-related__grid > .post-related__cell {
    min-width: 0;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
}

/* 移动端：flex 子项默认 min-width:auto 会按内容撑破 card，链式 min-width:0 + 盒模型 */
.post-related__grid > .post-related__cell > .list-item.block.shadow-none {
    min-width: 0;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
}

.post-related__grid .list-item .list-content {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
}

@media (max-width: 767.98px) {
    .post-related .card-body {
        overflow-x: clip;
    }
}

@media (min-width: 768px) {
    .post-related__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 992px) {
    .post-related__grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}
