/* 新闻页面专用样式 */

/* 新闻列表样式 */
.news-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* 新闻项目样式 */
.news-item {
    display: flex;
    margin-bottom: 30px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    transition: all 0.3s ease;
}

/* 内容标题下划线装饰 - 统一黄蓝杠效果 */
.table-content-title {
    font-size: 28px;
    color: #0056b3;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 3px solid #0066cc;
    position: relative;
}

.table-content-title::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 60px;
    height: 3px;
    background-color: #ffcc00;
}

/* 新闻分类选中状态样式 */
.dropdown-item.active {
    background-color: #0066cc;
    color: white;
    font-weight: bold;
}

.dropdown-item.active:hover {
    background-color: #004085;
    color: white;
}

/* 左侧栏选中状态样式 */
.table-sidebar-link.active {
    background-color: #0066cc;
    color: white;
    font-weight: bold;
    position: relative;
}

.table-sidebar-link.active::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 30px;
    background-color: #ffcc00;
}

.table-sidebar-link.active:hover {
    background-color: #004085;
    color: white;
}

.news-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.news-item-image {
    flex: 0 0 200px;
    margin-right: 20px;
    overflow: hidden;
    border-radius: 8px;
}

.news-item-image img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.news-item:hover .news-item-image img {
    transform: scale(1.05);
}

.news-item-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.news-item-title {
    font-size: 18px;
    color: #0056b3;
    margin-bottom: 10px;
    font-weight: bold;
}

.news-item-title a {
    color: inherit;
    text-decoration: none;
}

.news-item-title a:hover {
    color: #004085;
}

.news-item-date {
    font-size: 14px;
    color: #999;
    margin-bottom: 10px;
}

.news-item-summary {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.view-detail-btn {
    align-self: flex-start;
    padding: 8px 20px;
    background-color: #0066cc;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.view-detail-btn:hover {
    background-color: #004085;
}

.news-item-link {
    margin-top: auto;
}

.view-detail {
    display: inline-block;
    padding: 8px 20px;
    background-color: #0066cc;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.view-detail:hover {
    background-color: #004085;
    color: white;
}

/* 新闻详情展示区域 */
#news-detail {
    display: none;
    position: relative;
    padding: 40px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

#news-detail .back-button {
    position: absolute;
    top: 20px;
    right: 20px;
    padding: 8px 20px;
    background-color: #f0f0f0;
    color: #333;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

#news-detail .back-button:hover {
    background-color: #e0e0e0;
}

#news-detail .detail-content {
    max-width: 800px;
    margin: 0 auto;
}

#news-detail .detail-title {
    font-size: 28px;
    color: #0056b3;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e0e0e0;
}

#news-detail .detail-date {
    font-size: 16px;
    color: #666;
    margin-bottom: 30px;
}

/* 关键：新闻详情图片样式 */
#news-detail .detail-image {
    max-width: 100%;
    height: 300px !important;
    object-fit: cover !important;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: block;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 30px;
}

#news-detail .detail-text {
    font-size: 16px;
    line-height: 1.8;
    color: #333;
}

#news-detail .detail-text p {
    margin-bottom: 20px;
    text-align: justify;
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 40px;
    gap: 10px;
}

.pagination a {
    display: inline-block;
    padding: 8px 16px;
    color: #666;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.pagination a:hover {
    background-color: #f0f0f0;
    color: #0056b3;
}

.pagination .page-item.active {
    background-color: #0066cc;
    color: white;
}

.pagination .page-ellipsis {
    color: #999;
    margin: 0 5px;
}

/* ===================== 响应式设计（移动端适配） ===================== */

/* 小屏幕设备（平板，768px以下） */
@media (max-width: 768px) {
    /* 新闻列表适配 */
    .news-item {
        flex-direction: column;
        margin-bottom: 25px;
        padding: 15px;
    }
    
    .news-item-image {
        flex: 0 0 auto;
        margin-right: 0;
        margin-bottom: 15px;
    }
    
    .news-item-image img {
        height: 180px;
    }
    
    .news-item-title {
        font-size: 16px;
        margin-bottom: 8px;
    }
    
    .news-item-date {
        font-size: 13px;
        margin-bottom: 8px;
    }
    
    .news-item-summary {
        font-size: 13px;
    }
    
    .view-detail-btn,
    .view-detail {
        padding: 6px 16px;
        font-size: 13px;
    }
    
    /* 新闻详情适配 */
    #news-detail {
        padding: 30px 20px;
    }
    
    #news-detail .detail-title {
        font-size: 24px;
        margin-bottom: 12px;
        padding-bottom: 12px;
    }
    
    #news-detail .detail-date {
        font-size: 14px;
        margin-bottom: 25px;
    }
    
    /* 新闻详情图片适配 */
    #news-detail .detail-image {
        height: 250px !important;
        margin-bottom: 25px;
    }
    
    #news-detail .detail-text {
        font-size: 15px;
        line-height: 1.7;
    }
    
    /* 分页适配 */
    .pagination {
        margin-top: 30px;
        gap: 8px;
    }
}

/* 移动设备（手机，480px以下） */
@media (max-width: 480px) {
    /* 新闻列表进一步适配 */
    .news-item {
        margin-bottom: 20px;
        padding: 12px;
    }
    
    .news-item-image img {
        height: 150px;
    }
    
    .news-item-title {
        font-size: 15px;
        margin-bottom: 6px;
    }
    
    .news-item-date {
        font-size: 12px;
        margin-bottom: 6px;
    }
    
    .news-item-summary {
        font-size: 12px;
        -webkit-line-clamp: 2;
    }
    
    .view-detail-btn,
    .view-detail {
        padding: 5px 12px;
        font-size: 12px;
    }
    
    /* 新闻详情进一步适配 */
    #news-detail {
        padding: 20px 15px;
    }
    
    #news-detail .back-button {
        top: 15px;
        right: 15px;
        padding: 6px 16px;
        font-size: 13px;
    }
    
    #news-detail .detail-title {
        font-size: 20px;
        margin-bottom: 10px;
        padding-bottom: 10px;
    }
    
    #news-detail .detail-date {
        font-size: 13px;
        margin-bottom: 20px;
    }
    
    /* 新闻详情图片进一步适配 */
    #news-detail .detail-image {
        height: 200px !important;
        margin-bottom: 20px;
    }
    
    #news-detail .detail-text {
        font-size: 14px;
        line-height: 1.6;
    }
    
    #news-detail .detail-text p {
        margin-bottom: 15px;
    }
    
    /* 分页进一步适配 */
    .pagination {
        margin-top: 25px;
        gap: 5px;
        flex-wrap: wrap;
    }
    
    .pagination a {
        padding: 5px 10px;
        font-size: 12px;
    }
   
}

.pagination a:hover {
    background-color: #f0f0f0;
    color: #0056b3;
}

.pagination .page-item.active {
    background-color: #0066cc;
    color: white;
}

.pagination .page-ellipsis {
    color: #999;
    margin: 0 5px;
}



/* 响应式设计 - 平板设备 */
@media (max-width: 991px) {
    .table-container {
        gap: 20px;
    }
    
    .table-sidebar {
        width: 220px;
    }
}

/* 响应式设计 - 小平板设备 */
@media (max-width: 768px) {
    .table-container {
        flex-direction: column;
        gap: 20px;
        margin-top: 20px;
    }
    
    .table-sidebar {
        width: 100%;
        background-color: #f8f9fa;
        border-radius: 8px;
        padding: 15px;
        margin-bottom: 10px;
    }
    
    .table-sidebar-menu {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        padding: 0;
        margin: 0;
    }
    
    .table-sidebar-item {
        list-style: none;
        flex: 1;
        min-width: 100px;
    }
    
    .table-sidebar-link {
        display: block;
        padding: 10px 15px;
        text-align: center;
        background-color: white;
        border: 1px solid #e0e0e0;
        border-radius: 4px;
        color: #333;
        text-decoration: none;
        transition: all 0.3s ease;
    }
    
    .table-sidebar-link.active {
        background-color: #0066cc;
        color: white;
        border-color: #0066cc;
    }
    
    .page-title {
        font-size: 20px;
        margin-bottom: 15px;
    }
    
    .table-content-title {
        font-size: 18px;
        margin-bottom: 20px;
        padding-bottom: 10px;
    }
    
    .news-item {
        flex-direction: column;
    }
    
    .news-item-image {
        flex: none;
        margin-right: 0;
        margin-bottom: 15px;
        width: 100%;
    }
    
    #news-detail {
        padding: 20px;
    }
    
    #news-detail .detail-image {
        height: 200px !important;
    }
}

/* 移动端汉堡菜单显示控制 */
@media (max-width: 991px) {
    .menu-toggle {
        display: block !important;
        position: fixed;
        right: 15px;
        top: 15px;
        z-index: 1000;
        background-color: transparent;
        color: white;
        border: none;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 10px;
        transition: all 0.3s ease;
    }
    
    /* 保持原始menu-icon样式，不做修改 */
    
    /* 响应式侧边栏调整 */
    .table-container {
        flex-direction: column;
    }
    
    .table-sidebar {
        width: 100%;
        margin-bottom: 20px;
    }
    
    .table-sidebar-menu {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .table-sidebar-item {
        flex: 1;
        min-width: 100px;
    }
}

/* 响应式设计 - 手机设备 */
@media (max-width: 480px) {
    .table-sidebar-menu {
        flex-direction: column;
    }
    
    .table-sidebar-item {
        width: 100%;
    }
    
    .page-title {
        font-size: 18px;
        margin-bottom: 10px;
    }
    
    .table-content-title {
        font-size: 16px;
        margin-bottom: 15px;
        padding-bottom: 8px;
    }
    
    .table-content-title::after {
        width: 40px;
    }
    
    /* 新闻条目优化 */
    .news-item {
        padding: 15px;
        margin-bottom: 20px;
    }
    
    .news-item-content {
        padding: 0;
    }
}
