/* 详情页渐变页头：与列表页设计语言保持一致 */
.detail-hero {
    text-align: center;
    background: radial-gradient(circle at 15% 20%, rgba(214, 19, 24, .06), transparent 40%), radial-gradient(circle at 85% 10%, rgba(214, 19, 24, .04), transparent 42%), linear-gradient(180deg, #fdf3f3 0%, #ffffff 100%);
    /* 导航固定定位且 body 无顶边距，hero 自 y=0 起，需让出 64px 导航高度再留约 40px 间距 */
    padding: 104px 20px 56px;
}
.detail-hero-inner { max-width: 900px; margin: 0 auto; }
.detail-breadcrumb { margin-bottom: 20px; }
.detail-breadcrumb ol {
    display: flex; align-items: center; justify-content: center;
    flex-wrap: wrap; list-style: none; margin: 0; padding: 0;
    font-size: var(--fs-xs); color: var(--text-secondary);
}
.detail-breadcrumb li { display: flex; align-items: center; }
.detail-breadcrumb li:not(:last-child)::after { content: "/"; margin: 0 10px; color: var(--border); }
.detail-breadcrumb a { color: var(--text-secondary); text-decoration: none; transition: color .2s ease; }
.detail-breadcrumb a:hover { color: var(--primary); }
.detail-title {
    font-size: var(--fs-2xl); font-weight: var(--fw-bold); color: var(--text-primary);
    line-height: 1.3; margin: 0 0 16px;
    /* 多行标题均衡断行，避免末行只剩一两个字 */
    text-wrap: balance;
}
.detail-excerpt {
    font-size: var(--fs-base); color: var(--text-secondary);
    line-height: 1.8; max-width: 760px; margin: 0 auto 18px;
}
.detail-meta {
    display: flex; align-items: center; justify-content: center;
    flex-wrap: wrap; gap: 8px; font-size: var(--fs-sm);
    color: var(--text-secondary); margin-bottom: 16px;
}
.detail-meta-dot { color: #cbd5e1; font-weight: var(--fw-bold); }
.detail-tags {
    display: flex; align-items: center; justify-content: center;
    flex-wrap: wrap; gap: 8px; margin-top: 16px;
}
.detail-tag {
    display: inline-flex; align-items: center; min-height: 28px;
    padding: 0 12px; border-radius: var(--radius-pill); background: #fdf3f3;
    color: var(--primary); font-size: var(--fs-2xs); font-weight: var(--fw-medium);
}

/* 主体两栏布局：左侧正文列自适应，右侧 320px 侧栏粘性吸顶 */
.detail-main-section { padding: 40px 0 80px; background: #f4f4f4; }
.detail-container {
    max-width: 1200px; margin: 0 auto; padding: 0 20px;
    display: grid; grid-template-columns: minmax(0, 1fr) 320px;
    gap: 40px; align-items: start;
}
/* 正文列防溢出保证网格在小屏或宽表格下不撑爆容器 */
.detail-main-col { min-width: 0; }

/* 正文卡片与卡片视觉 token */
.article-card {
    background: #fff; border-radius: var(--radius-lg);
    border: 1px solid #e0e0e0;
    box-shadow: var(--shadow-card);
    padding: 48px 56px;
}
.article-cover {
    aspect-ratio: 16 / 9; border-radius: var(--radius-md);
    overflow: hidden; margin-bottom: 32px; background: #fdf3f3;
}
/* 仅有封面图无正文时取消下外边距，维持卡片上下留白平衡 */
.article-card--cover-only .article-cover { margin-bottom: 0; }
.article-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* 正文长文排版体系 */
/* 长文阅读需要略大于全站正文的字号，保持 17px */
.article-body { font-size: calc(var(--fs-base) + 1px); line-height: 1.9; color: #334155; word-break: break-word; }
.article-body p { margin: 0 0 1em; }
.article-body h2 {
    font-size: var(--fs-xl); font-weight: var(--fw-bold); color: var(--text-primary);
    border-left: 4px solid var(--primary); padding-left: 12px;
    margin: 2em 0 0.8em; line-height: 1.4;
}
.article-body h2:first-child { margin-top: 0; }
.article-body h3 { font-size: var(--fs-lg); font-weight: var(--fw-bold); color: var(--text-primary); margin: 1.6em 0 0.6em; line-height: 1.4; }
.article-body h4 { font-size: var(--fs-md); font-weight: var(--fw-bold); color: var(--text-primary); margin: 1.4em 0 0.5em; line-height: 1.4; }
.article-body img { max-width: 100%; height: auto; display: block; margin: 1.5em auto; border-radius: var(--radius-md); }
.article-body ul, .article-body ol { margin: 1em 0; padding-left: 1.5em; }
.article-body ul { list-style: disc; }
.article-body ol { list-style: decimal; }
.article-body li { margin-bottom: 0.5em; }
.article-body blockquote {
    margin: 1.5em 0; padding: 14px 18px;
    border-left: 4px solid var(--primary); background: #f4f4f4;
    color: #475569; border-radius: 0 var(--radius-md) var(--radius-md) 0;
}
.article-body blockquote p:last-child { margin-bottom: 0; }
.article-body table { width: 100%; border-collapse: collapse; margin: 1.5em 0; }
.article-body th, .article-body td { border: 1px solid #e0e0e0; padding: 12px 14px; text-align: left; vertical-align: top; }
.article-body th { background: #f4f4f4; color: var(--text-primary); font-weight: var(--fw-medium); }
.article-body a { color: var(--primary); text-decoration: none; }
.article-body a:hover { text-decoration: underline; }
.article-body pre {
    padding: 16px 20px; overflow-x: auto; border-radius: var(--radius-md);
    background: #0f172a; color: #e0e0e0; margin: 1.5em 0;
}
.article-body code {
    font-family: Consolas, Monaco, monospace; font-size: 0.9em;
    padding: 2px 6px; border-radius: var(--radius-sm); background: #f4f4f4; color: #0f172a;
}
.article-body pre code { background: transparent; padding: 0; color: inherit; }

/* 上下篇翻页导航卡片 */
.case-navigation {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px; margin-top: 32px;
}
.nav-card {
    background: #fff; border-radius: var(--radius-lg);
    border: 1px solid #e0e0e0;
    box-shadow: var(--shadow-card);
    padding: 20px 24px; display: flex; flex-direction: column;
    justify-content: center; color: inherit; text-decoration: none;
    transition: transform .3s ease, box-shadow .3s ease;
}
a.nav-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); }
.nav-card-prev { text-align: left; align-items: flex-start; }
.nav-card-next { text-align: right; align-items: flex-end; }
.nav-card-label {
    font-size: var(--fs-xs); color: #8a94a6; margin-bottom: 8px;
    font-weight: var(--fw-medium); transition: color .2s ease;
}
a.nav-card:hover .nav-card-label, a.nav-card:hover .nav-card-title { color: var(--primary); }
.nav-card-title {
    font-size: var(--fs-sm); font-weight: var(--fw-medium); line-height: 1.45;
    color: var(--text-primary); display: -webkit-box;
    -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden; transition: color .2s ease;
}
/* 缺失单侧时占位以保持网格位置对称 */
.nav-card-empty {
    visibility: hidden; pointer-events: none;
    border: none; box-shadow: none; background: transparent;
}

/* 侧栏及常驻模块 */
.detail-sidebar {
    position: sticky; top: 100px;
    display: flex; flex-direction: column; gap: 24px;
}
.sidebar-cta {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: var(--radius-lg); padding: 32px 28px; color: #fff;
    box-shadow: var(--shadow-card);
}
.sidebar-cta-eyebrow {
    display: inline-block; font-size: var(--fs-2xs); font-weight: var(--fw-bold);
    letter-spacing: .08em; color: rgba(255, 255, 255, .8); margin-bottom: 8px;
}
.sidebar-cta-title {
    font-size: var(--fs-lg); font-weight: var(--fw-bold); color: #fff;
    margin: 0 0 10px; line-height: 1.35;
}
.sidebar-cta-desc {
    font-size: var(--fs-sm); line-height: 1.7; color: rgba(255, 255, 255, .85);
    margin: 0 0 20px;
}
.sidebar-cta-actions { display: flex; flex-direction: column; gap: 10px; }
.sidebar-btn {
    display: flex; align-items: center; justify-content: center;
    min-height: 42px; padding: 0 18px; border-radius: var(--radius-pill);
    font-size: var(--fs-sm); font-weight: var(--fw-medium); text-decoration: none;
    transition: all .2s ease;
}
.sidebar-btn-primary {
    background: #fff; color: var(--primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, .08);
}
.sidebar-btn-primary:hover {
    background: #f4f4f4; transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, .12);
}
.sidebar-btn-secondary {
    background: transparent; color: #fff;
    border: 1px solid rgba(255, 255, 255, .6);
}
.sidebar-btn-secondary:hover { background: rgba(255, 255, 255, .12); border-color: #fff; }
.sidebar-related {
    background: #fff; border-radius: var(--radius-lg);
    border: 1px solid #e0e0e0;
    box-shadow: var(--shadow-card);
    padding: 24px 20px;
}
.sidebar-related-header {
    display: flex; align-items: center; justify-content: space-between;
    padding-bottom: 14px; border-bottom: 1px solid #f4f4f4; margin-bottom: 4px;
}
.sidebar-related-heading { font-size: var(--fs-base); font-weight: var(--fw-bold); color: var(--text-primary); margin: 0; }
.sidebar-related-more { font-size: var(--fs-xs); color: var(--primary); text-decoration: none; font-weight: var(--fw-medium); }
.sidebar-related-more:hover { text-decoration: underline; }
.sidebar-related-list { display: flex; flex-direction: column; }
.sidebar-related-item {
    display: flex; align-items: center; gap: 12px;
    padding: 14px 0; color: inherit; text-decoration: none;
    border-bottom: 1px solid #f4f4f4;
}
.sidebar-related-item:last-child { border-bottom: none; padding-bottom: 0; }
.sidebar-related-thumb {
    width: 88px; height: 66px; border-radius: var(--radius-sm);
    overflow: hidden; flex-shrink: 0; background: #fdf3f3;
}
.sidebar-related-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* 无图时与列表卡片占位图保持一致渐变 */
.sidebar-related-thumb.placeholder {
    display: flex; align-items: center; justify-content: center;
    background: radial-gradient(circle at 15% 20%, rgba(214, 19, 24, .06), transparent 50%), radial-gradient(circle at 85% 80%, rgba(214, 19, 24, .04), transparent 50%), #fdf3f3;
}
.sidebar-related-badge {
    font-size: var(--fs-2xs); font-weight: var(--fw-bold); color: var(--primary);
    background: rgba(255, 255, 255, .72); border: 1px solid #f3d0d1;
    border-radius: var(--radius-pill); padding: 2px 8px; line-height: 1.4;
}
.sidebar-related-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.sidebar-related-title {
    font-size: var(--fs-sm); font-weight: var(--fw-medium); line-height: 1.45;
    color: var(--text-primary); margin: 0; display: -webkit-box;
    -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden; transition: color .2s ease;
}
.sidebar-related-item:hover .sidebar-related-title { color: var(--primary); }
.sidebar-related-date { font-size: var(--fs-2xs); color: #8a94a6; }

/* 响应式适配 */
@media (max-width: 1024px) {
    .detail-container { grid-template-columns: 1fr; gap: 32px; }
    .detail-sidebar { position: static; }
}
@media (max-width: 768px) {
    .detail-hero { padding: 84px 16px 40px; }
    .detail-title { font-size: var(--fs-xl); }
    .detail-excerpt { font-size: var(--fs-sm); }
    .article-card { padding: 24px 20px; }
    .article-cover { margin-bottom: 24px; border-radius: var(--radius-md); }
    .article-body { font-size: var(--fs-base); }
    .article-body h2 { font-size: var(--fs-lg); }
    .article-body h3 { font-size: var(--fs-md); }
    .detail-main-section { padding: 24px 0 60px; }
}
@media (max-width: 640px) {
    .case-navigation { grid-template-columns: 1fr; gap: 14px; }
    .nav-card-empty { display: none; }
    .nav-card-next { text-align: left; align-items: flex-start; }
}
