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

/* 页面Banner样式 - 复用news.css中的样式 */
/* 新闻详情主体内容 */
.news-detail-content {
    padding: 40px 0;
}

/* 左侧内容区 */
.news-detail-main {
    background-color: #fff;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

/* 新闻标题 */
.news-title {
    font-size: 28px;
    font-weight: 700;
    color: #212529;
    margin-bottom: 20px;
    line-height: 1.4;
}

/* 新闻元信息 */
.news-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e9ecef;
    font-size: 14px;
}

.news-meta .news-category {
    padding: 6px 16px;
    background-color: #e3f2fd;
    color: #1976d2;
    border-radius: 4px;
    font-weight: 500;
}

.news-meta .news-date,
.news-meta .news-views {
    color: #6c757d;
    display: flex;
    align-items: center;
}

.news-meta .news-date i,
.news-meta .news-views i {
    margin-right: 5px;
}

/* 新闻正文 */
.news-body {
    margin-bottom: 30px;
}

.news-body p {
    font-size: 16px;
    line-height: 1.8;
    color: #495057;
    margin-bottom: 20px;
    text-align: justify;
}

.news-body h3 {
    font-size: 22px;
    font-weight: 600;
    color: #212529;
    margin: 30px 0 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e3f2fd;
}

.news-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.news-body img:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
    transform: scale(1.01);
}

/* 标签样式 */
.news-tags {
    margin-bottom: 25px;
    padding: 20px 0;
    border-top: 1px solid #e9ecef;
    border-bottom: 1px solid #e9ecef;
}

.news-tags span {
    color: #6c757d;
    font-size: 14px;
    font-weight: 500;
    margin-right: 10px;
}

.news-tags .tag {
    display: inline-block;
    padding: 6px 16px;
    background-color: #f8f9fa;
    color: #495057;
    border-radius: 30px;
    font-size: 14px;
    text-decoration: none;
    margin-right: 10px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

.news-tags .tag:hover {
    background-color: #3a7bd5;
    color: #fff;
    border-color: #3a7bd5;
    transform: translateY(-2px);
}

/* 分享按钮样式 */
.news-share {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e9ecef;
}

.news-share span {
    color: #6c757d;
    font-size: 14px;
    font-weight: 500;
    margin-right: 15px;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: #fff;
    margin-right: 10px;
    font-size: 16px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.share-btn.weixin {
    background-color: #07c160;
}

.share-btn.weibo {
    background-color: #e6162d;
}

.share-btn.linkedin {
    background-color: #0077b5;
}

.share-btn.twitter {
    background-color: #1da1f2;
}

.share-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* 上一篇/下一篇导航 */
.news-navigation {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 30px;
}

.prev-news,
.next-news {
    flex: 1;
    min-width: 200px;
}

.prev-news span,
.next-news span {
    display: block;
    color: #6c757d;
    font-size: 14px;
    margin-bottom: 8px;
    font-weight: 500;
}

.prev-news a,
.next-news a {
    color: #212529;
    font-size: 14px;
    text-decoration: none;
    transition: color 0.3s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.prev-news a:hover,
.next-news a:hover {
    color: #3a7bd5;
    text-decoration: underline;
}

/* 右侧边栏 */
.news-sidebar {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* 相关阅读 */
.related-news {
    background-color: #fff;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.related-news h3 {
    font-size: 18px;
    font-weight: 600;
    color: #212529;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e3f2fd;
    position: relative;
}

.related-news h3::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 50px;
    height: 2px;
    background-color: #3a7bd5;
}

.related-news-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.related-news-list li {
    margin-bottom: 15px;
    position: relative;
    padding-left: 20px;
}

.related-news-list li:last-child {
    margin-bottom: 0;
}

.related-news-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #3a7bd5;
}

.related-news-list li a {
    color: #495057;
    font-size: 14px;
    line-height: 1.6;
    text-decoration: none;
    transition: all 0.3s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-news-list li a:hover {
    color: #3a7bd5;
    transform: translateX(5px);
}

/* 热门新闻 */
.hot-news {
    background-color: #fff;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.hot-news h3 {
    font-size: 18px;
    font-weight: 600;
    color: #212529;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e3f2fd;
    position: relative;
}

.hot-news h3::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 50px;
    height: 2px;
    background-color: #3a7bd5;
}

.hot-news-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.hot-news-item {
    margin-bottom: 15px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.hot-news-item:last-child {
    margin-bottom: 0;
}

.hot-news-rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background-color: #3a7bd5;
    color: #fff;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
}

.hot-news-item:nth-child(1) .hot-news-rank {
    background-color: #ff4757;
}

.hot-news-item:nth-child(2) .hot-news-rank {
    background-color: #ff6348;
}

.hot-news-item:nth-child(3) .hot-news-rank {
    background-color: #ffa502;
}

.hot-news-item a {
    color: #495057;
    font-size: 14px;
    line-height: 1.6;
    text-decoration: none;
    transition: color 0.3s ease;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hot-news-item a:hover {
    color: #3a7bd5;
}

/* 订阅资讯 */
.subscribe-news {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    border-left: 4px solid #3a7bd5;
}

.subscribe-news h3 {
    font-size: 18px;
    font-weight: 600;
    color: #212529;
    margin-bottom: 15px;
}

.subscribe-news p {
    color: #6c757d;
    font-size: 14px;
    margin-bottom: 20px;
    line-height: 1.5;
}

.subscribe-form .form-group {
    margin-bottom: 15px;
}

.subscribe-form .form-control {
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 10px 15px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.subscribe-form .form-control:focus {
    border-color: #3a7bd5;
    box-shadow: 0 0 0 0.2rem rgba(58, 123, 213, 0.25);
    outline: none;
}

.subscribe-form .btn-primary {
    background-color: #3a7bd5;
    border-color: #3a7bd5;
    padding: 10px 15px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.subscribe-form .btn-primary:hover {
    background-color: #285db0;
    border-color: #285db0;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(58, 123, 213, 0.3);
}

/* 订阅成功提示 */
.subscribe-success {
    text-align: center;
    padding: 20px 0;
}

.success-icon {
    font-size: 48px;
    color: #28a745;
    margin-bottom: 15px;
}

.subscribe-success h4 {
    font-size: 18px;
    color: #212529;
    margin-bottom: 10px;
}

.subscribe-success p {
    font-size: 14px;
    color: #6c757d;
    margin-bottom: 0;
}

/* 图片预览样式 */
.image-preview-container {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.image-preview-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.image-preview-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    z-index: 1001;
}

.image-preview-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
    transition: all 0.3s ease;
}

.image-preview-close:hover {
    color: #3a7bd5;
    transform: rotate(90deg);
}

.image-preview-img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
}

.image-preview-alt {
    color: #fff;
    text-align: center;
    margin-top: 15px;
    font-size: 14px;
}

/* 响应式设计 */
@media (max-width: 991px) {
    .news-detail-content {
        padding: 30px 0;
    }
    
    .news-detail-main {
        padding: 25px;
    }
    
    .news-title {
        font-size: 24px;
    }
    
    .news-body h3 {
        font-size: 20px;
    }
    
    .news-body p {
        font-size: 15px;
    }
    
    .news-sidebar {
        margin-top: 30px;
    }
}

@media (max-width: 767px) {
    .news-detail-main {
        padding: 20px;
    }
    
    .news-title {
        font-size: 20px;
    }
    
    .news-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .news-body h3 {
        font-size: 18px;
    }
    
    .news-body p {
        font-size: 14px;
    }
    
    .news-navigation {
        flex-direction: column;
    }
    
    .prev-news,
    .next-news {
        min-width: auto;
    }
    
    .share-btn {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }
    
    .news-sidebar > div {
        padding: 20px;
    }
    
    .related-news h3,
    .hot-news h3,
    .subscribe-news h3 {
        font-size: 16px;
    }
}

@media (max-width: 575px) {
    .news-detail-content {
        padding: 20px 0;
    }
    
    .news-tags .tag {
        padding: 5px 12px;
        font-size: 13px;
        margin-right: 8px;
    }
    
    .image-preview-close {
        top: -30px;
        font-size: 20px;
    }
}