/* 新闻/文章详情页样式 */

/* 主体布局 */
.news-main {
    padding: 40px 0 60px;
    background: var(--bg-light);
}

.news-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 40px;
    align-items: start;
}

/* 文章区域 */
.news-article {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

/* 文章头部 */
.news-header {
    padding: 40px 50px 30px;
    border-bottom: 1px solid var(--border-light);
}

.news-title {
    font-size: 32px;
    font-weight: var(--font-weight-bold);
    color: var(--text-primary);
    line-height: 1.4;
    margin-bottom: 20px;
}

.news-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.news-meta__left,
.news-meta__right{
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.news-author,
.news-date,
.news-views {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: var(--text-secondary);
}

.news-author i,
.news-date i,
.news-views i {
    color: var(--primary-color);
}

.news-tags {
    display: flex;
    gap: 8px;
}

/* 文章摘要 */
.news-summary {
    padding: 30px 50px;
    background: linear-gradient(135deg, rgba(8, 158, 248, 0.05), rgba(255, 167, 38, 0.05));
    border-left: 4px solid var(--primary-color);
    margin: 0;
    position: relative;
}

.news-summary__icon {
    position: absolute;
    top: 30px;
    left: 20px;
    font-size: 24px;
    color: var(--primary-color);
    opacity: 0.3;
}

.news-summary p {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-secondary);
    font-style: italic;
    margin: 0;
}

/* 文章封面 */
.news-cover {
    width: 100%;
    height: 0;
    padding-bottom: 50%;
    position: relative;
    overflow: hidden;
}

.news-cover img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 文章正文 */
.news-content {
    padding: 50px 50px 40px;
    font-size: 16px;
    line-height: 1.9;
    color: var(--text-primary);
}

.news-content h2 {
    font-size: 24px;
    font-weight: var(--font-weight-bold);
    color: var(--text-primary);
    margin: 40px 0 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--primary-color);
    position: relative;
}

.news-content h2::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background: var(--secondary-color);
}

.news-content h3 {
    font-size: 20px;
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
    margin: 30px 0 15px;
}

.news-content p {
    margin: 16px 0;
}

.news-content ul,
.news-content ol {
    margin: 20px 0;
    padding-left: 24px;
}

.news-content li {
    margin: 10px 0;
    line-height: 1.8;
}

.news-content strong {
    color: var(--primary-color);
    font-weight: var(--font-weight-semibold);
}

/* 提示框 */
.news-alert {
    display: flex;
    gap: 15px;
    padding: 20px;
    margin: 25px 0;
    border-radius: var(--radius-md);
    background: var(--bg-light);
    border-left: 4px solid var(--primary-color);
}

.news-alert__icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.news-alert__content {
    flex: 1;
    font-size: 15px;
    line-height: 1.7;
}

.news-alert--warning {
    background: rgba(255, 152, 0, 0.08);
    border-left-color: #ff9800;
}

.news-alert--warning .news-alert__icon {
    color: #ff9800;
}

.news-alert--info {
    background: rgba(33, 150, 243, 0.08);
    border-left-color: #2196f3;
}

.news-alert--info .news-alert__icon {
    color: #2196f3;
}

.news-alert--success {
    background: rgba(76, 175, 80, 0.08);
    border-left-color: #4caf50;
}

.news-alert--success .news-alert__icon {
    color: #4caf50;
}

/* 图片组 */
.news-gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin: 30px 0;
}

.news-gallery__item img {
    width: 100%;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.news-gallery__caption {
    margin-top: 10px;
    font-size: 14px;
    color: var(--text-secondary);
    text-align: center;
}

/* 引用 */
.news-quote {
    margin: 30px 0;
    padding: 25px 30px;
    background: linear-gradient(135deg, rgba(8, 158, 248, 0.05), rgba(255, 167, 38, 0.05));
    border-left: 4px solid var(--secondary-color);
    border-radius: var(--radius-md);
}

.news-quote p {
    font-size: 17px;
    line-height: 1.8;
    color: var(--text-secondary);
    font-style: italic;
    margin: 0 0 15px;
}

.news-quote footer {
    font-size: 14px;
    color: var(--text-light);
    text-align: right;
}

/* 表格 */
.news-table {
    margin: 30px 0;
    overflow-x: auto;
}

.news-table table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.news-table thead {
    background: var(--primary-color);
    color: var(--text-white);
}

.news-table th {
    padding: 15px 20px;
    text-align: left;
    font-weight: var(--font-weight-semibold);
}

.news-table td {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-light);
}

.news-table tbody tr:hover {
    background: var(--bg-light);
}

.news-table tbody tr:last-child td {
    border-bottom: none;
}

/* 清单 */
.news-checklist {
    margin: 25px 0;
}

.news-checklist__item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    font-size: 15px;
}

.news-checklist__item i {
    color: var(--grass-green);
    font-size: 18px;
    flex-shrink: 0;
}

/* 文章底部 */
.news-footer {
    padding: 40px 50px;
    border-top: 1px solid var(--border-light);
}

/* 互动按钮 */
.news-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 40px;
}

.news-actions__btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
}

.news-actions__btn:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--text-white);
    transform: translateY(-2px);
}

.news-actions__btn i {
    font-size: 16px;
}

/* 作者卡片 */
.news-author卡片 {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 25px;
    background: var(--bg-light);
    border-radius: var(--radius-md);
}

.news-author卡片__头像 {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.news-author卡片__头像 img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-author卡片__信息 {
    flex: 1;
}

.news-author卡片__名字 {
    font-size: 16px;
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
    margin-bottom: 6px;
}

.news-author卡片__简介 {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

.news-author卡片__关注 {
    flex-shrink: 0;
}

/* 侧边栏 */
.news-sidebar {
    position: sticky;
    top: 100px;
}

.news-sidebar__block {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-md);
}

.news-sidebar__title {
    font-size: 18px;
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border-light);
}

/* 目录 */
.news-toc {
    display: flex;
    flex-direction: column;
}

.news-toc__item {
    padding: 12px 15px;
    color: var(--text-secondary);
    font-size: 14px;
    border-left: 3px solid transparent;
    transition: var(--transition);
    text-decoration: none;
}

.news-toc__item:hover,
.news-toc__item.active {
    color: var(--primary-color);
    background: rgba(30, 90, 125, 0.05);
    border-left-color: var(--primary-color);
}

/* 推荐文章 */
.news-related {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.news-related__item {
    display: flex;
    gap: 12px;
    text-decoration: none;
    transition: var(--transition);
}

.news-related__item:hover {
    transform: translateX(5px);
}

.news-related__item img {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

.news-related__content {
    flex: 1;
    min-width: 0;
}

.news-related__content h4 {
    font-size: 14px;
    font-weight: var(--font-weight-medium);
    color: var(--text-primary);
    margin: 0 0 6px;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.news-related__views {
    font-size: 12px;
    color: var(--text-light);
    margin: 0;
}

/* 标签云 */
.news-tags云 {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.news-tags云 .cw-tag {
    font-size: 13px;
    cursor: pointer;
}

.news-tags云 .cw-tag:hover {
    background: var(--primary-color);
    color: var(--text-white);
    transform: translateY(-2px);
}

/* 响应式 */
@media (max-width: 1024px) {
    .news-layout {
        grid-template-columns: 1fr;
    }
    
    .news-sidebar {
        position: static;
    }
}

@media (max-width: 768px) {
    .news-header,
    .news-summary,
    .news-content,
    .news-footer {
        padding-left: 25px;
        padding-right: 25px;
    }
    
    .news-title {
        font-size: 24px;
    }
    
    .news-meta {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .news-gallery {
        grid-template-columns: 1fr;
    }
    
    .news-table {
        font-size: 14px;
    }
    
    .news-actions {
        flex-wrap: wrap;
    }
    
    .news-author卡片 {
        flex-direction: column;
        text-align: center;
    }
}

