.article-bottom-tabs {
    margin-top: 40px;
    padding-top: 20px;
}

/* 文章详情底部：外框内嵌时去掉重复上边距 */
.article-bottom-tabs-frame .article-bottom-tabs {
    margin-top: 0;
    padding-top: 0;
}

.article-bottom-tabs-header {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 30px;
    padding-bottom: 0;
}

/* 文章页脚法律模块：无外框分隔线，Tab 区也不画底边 */
.footer-legal-tabs .article-bottom-tabs-header {
    border-bottom: none;
    margin-bottom: 1.25rem;
}

.tab-btn {
    display: inline-flex;
    align-items: center;
    background: none;
    border: none;
    padding: 15px 20px;
    cursor: pointer;
    position: relative;
    font-size: 16px;
    color: #666;
    transition: color 0.3s ease;
    outline: none;
    overflow: hidden;
}

.tab-btn .tab-index-icon {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.625rem;
    height: 1.625rem;
    margin-right: 0.5rem;
    border: 2px solid currentColor;
    border-radius: 4px;
    font-size: 0.8125rem;
    font-weight: 700;
    line-height: 1;
    box-sizing: border-box;
    opacity: 0.9;
}

.tab-btn.active .tab-index-icon {
    background-color: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
    opacity: 1;
}

/* 页脚模块：序号用「1. 」文本，无方框 border */
.footer-legal-tabs .tab-btn .tab-index-prefix {
    margin-right: 0.35em;
    font-weight: 700;
    color: inherit;
}

.footer-legal-tabs .tab-btn.active .tab-index-prefix {
    color: var(--primary-color);
}

.footer-legal-tabs .tab-btn .tab-text {
    display: inline;
}

.tab-btn:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.tab-btn .tab-text {
    position: relative;
    z-index: 2;
    display: inline-block;
}

.tab-btn .tab-underline {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 0;
    height: 5px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
    z-index: 1;
}

.tab-btn.active {
    color: var(--primary-color);
}

.tab-btn.active .tab-underline {
    width: 100%;
}

.tab-btn:hover:not(.active) {
    color: var(--primary-color);
}

.tab-btn:hover:not(.active) .tab-underline {
    width: 100%;
}

.article-bottom-tabs-content {
    position: relative;
    min-height: 200px;
    transition: height 0.3s ease;
    overflow: visible;
    padding-bottom: 20px;
}

.tab-pane {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.tab-pane.active {
    position: relative;
    opacity: 1;
    visibility: visible;
}

.tab-pane h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 20px;
    font-weight: 600;
}

.tab-pane p {
    line-height: 1.8;
    margin-bottom: 15px;
    color: #333;
}

.tab-pane strong,
.tab-pane .footer-module-content strong,
.tab-pane .prose strong {
    color: inherit !important;
    font-weight: 600;
    text-decoration: none;
    border-bottom: 3px solid rgba(var(--primary-color-rgb, 51, 105, 227), 0.2);
    padding-bottom: 3px;
    display: inline;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.footer-legal-tabs .tab-pane .prose {
    font-size: 0.875rem;
    line-height: 1.75;
}

/*
 * 页脚 Tab：用 display 切换，避免依赖 JS 计算高度；防止固定 height 为 0 时整块内容不可见。
 */
.footer-legal-tabs .article-bottom-tabs-content {
    min-height: 0;
    height: auto !important;
}

.footer-legal-tabs .tab-pane:not(.active) {
    display: none !important;
    position: static !important;
}

.footer-legal-tabs .tab-pane.active {
    display: block !important;
    position: relative !important;
    opacity: 1 !important;
    visibility: visible !important;
}

@media (max-width: 768px) {
    .article-bottom-tabs-header {
        gap: 10px;
    }

    .tab-btn {
        padding: 12px 15px;
        font-size: 14px;
    }
}
