/* ==========================================
   新闻模块样式
   版本：1.0.0
   创建日期：2025-02-03
   ========================================== */

/* ==================== 页面标题 ==================== */
.page-header {
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-green));
    color: var(--text-white);
    padding: 80px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><rect fill="rgba(255,255,255,0.05)" x="0" y="0" width="50" height="50"/><rect fill="rgba(255,255,255,0.05)" x="50" y="50" width="50" height="50"/></svg>');
    opacity: 0.5;
}

.page-title {
    font-size: 42px;
    font-weight: bold;
    margin-bottom: 15px;
    position: relative;
    z-index: 1;
}

.page-subtitle {
    font-size: 18px;
    opacity: 0.9;
    position: relative;
    z-index: 1;
}

/* ==================== 新闻列表页面 ==================== */
.news-section {
    padding: 60px 0;
    background-color: var(--background-gray);
}

.news-layout {
    display: flex;
    gap: 40px;
}

/* 左侧主内容区 */
.news-main {
    flex: 1;
}

/* 分类切换按钮 */
.news-categories {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

.category-btn {
    flex: 1;
    padding: 14px 20px;
    background-color: var(--text-white);
    border: 2px solid var(--border-light);
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    color: var(--text-dark);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.category-btn:hover {
    border-color: var(--primary-green);
    color: var(--primary-green);
    transform: translateY(-2px);
}

.category-btn.active {
    background-color: var(--primary-green);
    border-color: var(--primary-green);
    color: var(--text-white);
}

.category-btn i {
    font-size: 18px;
}

/* 新闻列表 */
.news-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.news-item {
    background-color: var(--text-white);
    border-radius: 8px;
    padding: 25px;
    box-shadow: var(--shadow-card);
    display: flex;
    gap: 25px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.news-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.news-item.active {
    border: 2px solid var(--primary-green);
}

/* 新闻图片 */
.news-item-image {
    flex-shrink: 0;
    width: 280px;
    height: 180px;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
}

.news-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.news-item:hover .news-item-image img {
    transform: scale(1.05);
}

.news-category-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    color: var(--text-white);
    background-color: var(--primary-blue);
}

.news-category-badge.party {
    background-color: #e74c3c;
}

.news-category-badge.law {
    background-color: var(--primary-green);
}

/* 新闻内容 */
.news-item-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.news-item-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
    font-size: 13px;
    color: #999;
}

.news-item-date {
    display: flex;
    align-items: center;
    gap: 5px;
}

.news-item-date i {
    color: var(--primary-green);
}

.news-item-views {
    display: flex;
    align-items: center;
    gap: 5px;
}

.news-item-views i {
    color: var(--primary-green);
}

.news-item-title {
    font-size: 20px;
    font-weight: bold;
    color: var(--primary-blue);
    margin-bottom: 12px;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.news-item:hover .news-item-title {
    color: var(--primary-green);
}

.news-item-excerpt {
    font-size: 14px;
    color: #666;
    line-height: 1.8;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-item-footer {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.read-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--primary-green);
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
}

.read-more-btn i {
    transition: transform 0.3s ease;
}

.news-item:hover .read-more-btn i {
    transform: translateX(3px);
}

/* 分页 */
.news-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 40px;
}

.pagination-btn {
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    background-color: var(--text-white);
    border: 1px solid var(--border-light);
    border-radius: 4px;
    font-size: 14px;
    color: var(--text-dark);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pagination-btn:hover {
    border-color: var(--primary-green);
    color: var(--primary-green);
}

.pagination-btn.active {
    background-color: var(--primary-green);
    border-color: var(--primary-green);
    color: var(--text-white);
}

.pagination-btn:disabled {
    background-color: #f5f5f5;
    border-color: var(--border-light);
    color: #ccc;
    cursor: not-allowed;
}

/* ==================== 侧边栏 ==================== */
.news-sidebar {
    flex: 0 0 350px;
}

.sidebar-widget {
    background-color: var(--text-white);
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: var(--shadow-card);
}

.widget-title {
    font-size: 18px;
    font-weight: bold;
    color: var(--primary-blue);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-green);
}

/* 搜索框 */
.search-widget .search-box {
    display: flex;
    gap: 10px;
}

.search-input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid var(--border-light);
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-green);
}

.search-btn {
    padding: 12px 20px;
    background-color: var(--primary-green);
    border: none;
    border-radius: 4px;
    color: var(--text-white);
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.search-btn:hover {
    background-color: #23847a;
}

/* 热门新闻列表 */
.popular-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.popular-item {
    display: flex;
    gap: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-light);
    transition: all 0.3s ease;
    cursor: pointer;
}

.popular-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.popular-item:hover {
    transform: translateX(5px);
}

.popular-item-number {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    background-color: var(--primary-green);
    color: var(--text-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
}

.popular-item-content {
    flex: 1;
}

.popular-item-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-dark);
    line-height: 1.5;
    margin-bottom: 5px;
    transition: color 0.3s ease;
}

.popular-item:hover .popular-item-title {
    color: var(--primary-green);
}

.popular-item-date {
    font-size: 12px;
    color: #999;
}

/* 归档列表 */
.archive-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.archive-list li a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    color: var(--text-dark);
    border-radius: 4px;
    transition: all 0.3s ease;
}

.archive-list li a:hover {
    background-color: rgba(42, 157, 143, 0.1);
    color: var(--primary-green);
    padding-left: 15px;
}

.archive-list li a span {
    background-color: var(--primary-green);
    color: var(--text-white);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
}

/* ==================== 新闻详情页面 ==================== */
.news-detail-section {
    padding: 60px 0;
    background-color: var(--background-gray);
}

.news-detail-layout {
    display: flex;
    gap: 40px;
}

.news-detail-main {
    flex: 1;
}

/* 新闻文章 */
.news-article {
    background-color: var(--text-white);
    border-radius: 8px;
    padding: 40px;
    box-shadow: var(--shadow-card);
}

.news-article-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-light);
}

.news-article-title {
    font-size: 28px;
    font-weight: bold;
    color: var(--primary-blue);
    margin-bottom: 15px;
    line-height: 1.4;
}

.news-article-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    font-size: 14px;
    color: #999;
}

.news-article-meta i {
    color: var(--primary-green);
    margin-right: 5px;
}

.news-article-image {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 30px;
}

.news-article-content {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-dark);
}

.news-article-content p {
    margin-bottom: 20px;
    text-indent: 2em;
}

.news-article-content h3 {
    font-size: 20px;
    font-weight: bold;
    color: var(--primary-blue);
    margin: 30px 0 15px;
    padding-left: 10px;
    border-left: 4px solid var(--primary-green);
}

.news-article-content ul {
    margin: 20px 0;
    padding-left: 30px;
}

.news-article-content li {
    margin-bottom: 10px;
    line-height: 1.8;
}

.news-article-tags {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border-light);
}

.news-article-tags span {
    display: inline-block;
    padding: 6px 12px;
    background-color: rgba(42, 157, 143, 0.1);
    color: var(--primary-green);
    border-radius: 15px;
    font-size: 13px;
    margin-right: 10px;
    margin-bottom: 10px;
}

/* 上一篇/下一篇导航 */
.news-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border-light);
}

.news-nav-item {
    flex: 1;
    padding: 15px;
    background-color: rgba(42, 157, 143, 0.05);
    border-radius: 6px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.news-nav-item:hover {
    background-color: rgba(42, 157, 143, 0.15);
}

.news-nav-item.next {
    text-align: right;
}

.news-nav-label {
    font-size: 12px;
    color: #999;
    margin-bottom: 5px;
}

.news-nav-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--primary-blue);
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 分享按钮 */
.news-share {
    margin-top: 30px;
    padding: 25px;
    background-color: rgba(42, 157, 143, 0.05);
    border-radius: 8px;
}

.news-share h4 {
    font-size: 16px;
    font-weight: bold;
    color: var(--primary-blue);
    margin-bottom: 15px;
}

.share-buttons {
    display: flex;
    gap: 10px;
}

.share-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--text-white);
    transition: all 0.3s ease;
}

.share-btn.weibo {
    background-color: #e74c3c;
}

.share-btn.wechat {
    background-color: #2ecc71;
}

.share-btn.qq {
    background-color: #3498db;
}

.share-btn.link {
    background-color: #95a5a6;
}

.share-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* 相关新闻 */
.related-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.related-item {
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-light);
    cursor: pointer;
    transition: all 0.3s ease;
}

.related-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.related-item:hover {
    transform: translateX(5px);
}

.related-item-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-dark);
    line-height: 1.5;
    margin-bottom: 5px;
    transition: color 0.3s ease;
}

.related-item:hover .related-item-title {
    color: var(--primary-green);
}

.related-item-date {
    font-size: 12px;
    color: #999;
}

/* 返回按钮 */
.back-widget .back-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 20px;
    background-color: var(--primary-blue);
    color: var(--text-white);
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.back-widget .back-btn:hover {
    background-color: var(--primary-green);
    transform: translateX(-5px);
}

/* 加载状态 */
.news-loading {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.news-loading i {
    font-size: 48px;
    color: var(--primary-green);
    margin-bottom: 20px;
}

.news-loading p {
    font-size: 16px;
}

/* 空状态 */
.news-empty {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.news-empty i {
    font-size: 64px;
    color: var(--border-light);
    margin-bottom: 20px;
}

.news-empty p {
    font-size: 16px;
}
