/* 双栏新闻标签页样式 */
.dual-tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 15px;
}

/* 每个标签栏的列样式 */
.news-tabs-column {
    flex: 1;
    min-width: 280px;
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border-radius: 4px;
    overflow: hidden;
    position: relative; /* 为绝对定位内容提供参考 */
    min-height: 300px; /* 提供一个默认的最小高度，防止内容切换时的抖动 */
}

/* 确保每列独立处理标签状态 */
.news-tabs-column .news-tabs {
    display: flex;
    border-bottom: 1px solid #e0e0e0;
    position: relative; /* 为伪元素提供定位参考 */
}

.news-tabs-column .news-tab {
    padding: 15px 0;
    flex: 1;
    text-align: center;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    position: relative; /* 为伪元素提供定位参考 */
    transition: all 0.3s;
    /* 移除与元素高度相关的过渡 */
}

.news-tabs-column .news-tab.active {
    color: #c52026;
}

/* 使用伪元素实现底部边框，不影响元素高度 */
.news-tabs-column .news-tab::after {
    content: '';
    position: absolute;
    bottom: -1px; /* 确保与底部完全对齐，不影响高度 */
    left: 0;
    width: 100%;
    height: 2px;
    background-color: transparent;
    transition: background-color 0.3s;
    z-index: 1; /* 确保边框在顶部 */
}

.news-tabs-column .news-tab.active::after {
    background-color: #c52026;
}

/* 新闻内容容器，用于定位和控制内容高度 */
.news-tabs-column .news-content-container {
    position: relative;
    min-height: 320px; /* 设置一个固定的最小高度 */
    transition: height 0.3s;
}

/* 确保每列的新闻内容独立显示 */
.news-tabs-column .news-content {
    position: absolute;
    top: 51px; /* 标签栏的高度 + 边框 */
    left: 0;
    width: 100%;
    height: calc(100% - 51px); /* 减去标签栏的高度 */
    padding: 15px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    overflow-y: auto; /* 允许内容滚动 */
    box-sizing: border-box; /* 包含内边距 */
}

.news-tabs-column .news-content.active {
    opacity: 1;
    visibility: visible;
}

/* 新闻列表元素固定样式，防止内容切换时高度变化 */
.news-tabs-column .news-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.news-tabs-column .news-list li {
    border-bottom: 1px dashed #e0e0e0;
    padding: 10px 0;
    height: 24px; /* 固定高度，确保所有项目高度一致 */
    line-height: 24px;
}

.news-tabs-column .news-list li:last-child {
    border-bottom: none;
}

.news-tabs-column .news-list a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #333;
    transition: color 0.3s;
    height: 100%;
}

.news-tabs-column .news-list a:hover {
    color: #c52026;
}

.news-tabs-column .news-icon {
    margin-right: 8px;
    color: #c52026;
    font-size: 12px;
    flex-shrink: 0;
}

.news-tabs-column .news-title {
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

/* 调整"查看更多"按钮靠左显示 */
.news-tabs-column .view-more {
    text-align: left;
    margin-top: 10px;
}

.news-tabs-column .view-more a {
    display: inline-block;
    color: #777;
    font-size: 14px;
    transition: color 0.3s;
    text-decoration: none;
}

.news-tabs-column .view-more a:hover {
    color: #c52026;
}

/* 响应式调整 */
@media (max-width: 767px) {
    .dual-tabs {
        flex-direction: column;
    }
    
    .news-tabs-column {
        width: 100%;
    }
}
