/* 资讯页样式 */

/* 资讯头部 */
.news-header {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--bg-dark) 100%);
    padding: 30px 0;
    color: var(--white);
    text-align: center;
}

.news-header h1 {
    font-size: 28px;
    margin-bottom: 10px;
}

.news-header p {
    font-size: 14px;
    opacity: 0.8;
}

/* 资讯分类标签 */
.news-categories {
    background: var(--white);
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.category-tabs {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.category-tab {
    padding: 8px 20px;
    background: var(--bg-light);
    border: none;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
}

.category-tab.active,
.category-tab:hover {
    background: var(--primary-color);
    color: var(--white);
}

/* 资讯内容区 */
.news-content {
    padding: 30px 0;
}

.news-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 20px;
}

/* 左侧资讯列表 */
.news-main .section-title {
    margin-bottom: 20px;
}

.news-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.news-item {
    display: flex;
    gap: 15px;
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.news-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.news-item-img {
    width: 220px;
    height: 140px;
    flex-shrink: 0;
    overflow: hidden;
}

.news-item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.news-item:hover .news-item-img img {
    transform: scale(1.05);
}

.news-item-content {
    flex: 1;
    padding: 15px;
    display: flex;
    flex-direction: column;
}

.news-item-category {
    display: inline-block;
    padding: 4px 12px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--white);
    border-radius: 15px;
    font-size: 11px;
    margin-bottom: 10px;
    align-self: flex-start;
}

.news-item-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-item-desc {
    font-size: 13px;
    color: var(--text-light);
    line-height: 1.5;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.news-item-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--text-light);
}

.news-item-meta-left {
    display: flex;
    gap: 15px;
}

.news-item-meta-left span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.news-item-meta-right {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--primary-color);
    font-weight: 500;
}

/* 右侧侧边栏 */
.news-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sidebar-box {
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.sidebar-box-header {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-box-header h3 {
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-box-header h3 i {
    color: var(--primary-color);
}

.sidebar-box-content {
    padding: 15px;
}

/* 热门文章 */
.hot-articles {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.hot-article-item {
    display: flex;
    gap: 10px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.hot-article-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.hot-article-rank {
    width: 24px;
    height: 24px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 12px;
    flex-shrink: 0;
}

.hot-article-rank.top {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--white);
}

.hot-article-rank.normal {
    background: var(--bg-light);
    color: var(--text-light);
}

.hot-article-info {
    flex: 1;
}

.hot-article-title {
    font-size: 13px;
    color: var(--text-dark);
    line-height: 1.4;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hot-article-meta {
    font-size: 11px;
    color: var(--text-light);
}

/* 标签云 */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-cloud-item {
    padding: 6px 12px;
    background: var(--bg-light);
    border-radius: 15px;
    font-size: 12px;
    color: var(--text-dark);
    cursor: pointer;
    transition: var(--transition);
}

.tag-cloud-item:hover {
    background: var(--primary-color);
    color: var(--white);
}

/* 推荐关注 */
.recommend-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.recommend-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.recommend-item img {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
}

.recommend-info {
    flex: 1;
}

.recommend-info .name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 2px;
}

.recommend-info .desc {
    font-size: 11px;
    color: var(--text-light);
}

.recommend-btn {
    padding: 5px 12px;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 12px;
    font-size: 11px;
    cursor: pointer;
    transition: var(--transition);
}

.recommend-btn:hover {
    background: var(--primary-dark);
}

/* 精选专题 */
.featured-section {
    background: var(--white);
    padding: 30px 0;
    margin-top: 20px;
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.featured-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    height: 160px;
}

.featured-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.featured-item:hover img {
    transform: scale(1.05);
}

.featured-item-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 15px;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 100%);
    color: var(--white);
}

.featured-item-content h4 {
    font-size: 14px;
    margin-bottom: 4px;
}

.featured-item-content p {
    font-size: 12px;
    opacity: 0.8;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .news-layout {
        grid-template-columns: 1fr;
    }

    .news-sidebar {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
    }

    .featured-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .news-item {
        flex-direction: column;
    }

    .news-item-img {
        width: 100%;
        height: 200px;
    }

    .news-sidebar {
        grid-template-columns: 1fr;
    }

    .category-tabs {
        justify-content: flex-start;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 10px;
    }

    .category-tab {
        white-space: nowrap;
    }
}

@media (max-width: 768px) {
    .news-header h1 {
        font-size: 28px;
    }

    .news-item-content {
        padding: 15px;
    }

    .news-item-title {
        font-size: 16px;
    }

    .news-item-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .featured-grid {
        grid-template-columns: 1fr;
    }
}
