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

.news-detail-section {
    margin-bottom: 50px;
}

.news-detail-wrapper {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.news-detail-header {
    padding: 30px 30px 20px;
    border-bottom: 1px solid #f0f0f0;
}

#news-detail-title {
    font-size: 26px;
    font-weight: 700;
    color: #222;
    margin-bottom: 15px;
    line-height: 1.4;
}

.news-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    color: #777;
    font-size: 14px;
    position: relative;
}

.news-detail-meta i {
    margin-right: 5px;
    color: #0056b3;
}

.news-detail-meta span {
    display: inline-flex;
    align-items: center;
}

/* 确保日期信息正确显示 */
.news-date, #news-detail-date {
    position: static !important;
    top: auto !important;
    left: auto !important;
    transform: none !important;
    background: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    color: #777 !important;
    width: auto !important;
    height: auto !important;
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    z-index: 1 !important;
}

.news-detail-content {
    padding: 30px;
}

.news-detail-image {
    margin-bottom: 25px;
    border-radius: 8px;
    overflow: hidden;
    max-height: 500px;
    text-align: center;
}

.news-detail-image img {
    max-width: 100%;
    max-height: 500px;
    height: auto;
    display: inline-block;
    object-fit: contain;
}

#news-detail-text {
    line-height: 1.8;
    color: #444;
}

#news-detail-text p {
    margin-bottom: 20px;
}

#news-detail-text h3 {
    font-size: 20px;
    font-weight: 600;
    color: #222;
    margin: 30px 0 15px;
}

#news-detail-text blockquote {
    border-left: 4px solid #0056b3;
    padding: 15px 20px;
    background-color: #f9f9f9;
    margin: 20px 0;
    font-style: italic;
    color: #555;
}

#news-detail-text .news-lead {
    font-size: 18px;
    color: #333;
    font-weight: 500;
    line-height: 1.6;
}

.news-detail-nav {
    display: flex;
    justify-content: space-between;
    padding: 20px 30px;
    border-top: 1px solid #f0f0f0;
    background-color: #f9f9f9;
}

.news-nav-prev,
.news-nav-next,
.news-nav-list {
    display: inline-flex;
    align-items: center;
    color: #444;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.news-nav-prev i,
.news-nav-list i {
    margin-right: 8px;
}

.news-nav-next i {
    margin-left: 8px;
}

.news-nav-prev:hover,
.news-nav-next:hover,
.news-nav-list:hover {
    background-color: #0056b3;
    color: #fff;
}

.news-nav-prev.disabled,
.news-nav-next.disabled {
    pointer-events: none;
    opacity: 0.5;
    cursor: not-allowed;
}

/* 相关新闻 */
.related-news-section {
    padding: 60px 0;
}

.related-news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.related-news-item {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.related-news-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.related-news-image {
    position: relative;
    height: 200px;
    overflow: hidden;
    cursor: pointer;
    background-color: #f8f9fa;
}

.related-news-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
    padding: 5px;
}

.related-news-item:hover .related-news-image img {
    transform: scale(1.05);
}

/* 添加新闻图片点击指示器 */
.related-news-image::before {
    content: '\f06e'; /* 眼睛图标 */
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 50px;
    height: 50px;
    background-color: rgba(0, 86, 179, 0.8);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    z-index: 2;
    opacity: 0;
    transition: all 0.3s ease;
}

.related-news-image:hover::before,
.related-news-image.active::before {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

.related-news-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0);
    transition: background-color 0.3s ease;
    z-index: 1;
}

.related-news-image:hover::after,
.related-news-image.active::after {
    background-color: rgba(0, 0, 0, 0.3);
}

.related-news-content {
    padding: 20px;
}

.related-news-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.4;
}

.related-news-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.related-news-title a:hover {
    color: #0056b3;
}

.related-news-date {
    color: #777;
    font-size: 14px;
    margin-bottom: 15px;
    position: static !important;
    display: inline-flex !important;
    align-items: center !important;
    background: none !important;
}

.related-news-date i {
    margin-right: 5px;
    color: #0056b3;
}

.related-news-excerpt {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 错误消息样式 */
.error-message {
    text-align: center;
    padding: 50px 20px;
}

.error-message .icon {
    font-size: 50px;
    color: #e74c3c;
    margin-bottom: 20px;
}

.error-message p {
    font-size: 18px;
    color: #555;
    margin-bottom: 30px;
}

/* 响应式样式 */
@media (max-width: 768px) {
    .news-detail-header {
        padding: 20px 20px 15px;
    }
    
    #news-detail-title {
        font-size: 22px;
    }
    
    .news-detail-meta {
        gap: 15px;
        font-size: 13px;
    }
    
    .news-detail-content {
        padding: 20px;
    }
    
    /* 移动设备上调整图片高度 */
    .news-detail-image {
        max-height: 350px;
    }
    
    .news-detail-image img {
        max-height: 350px;
    }
    
    .news-detail-nav {
        flex-direction: column;
        gap: 15px;
        padding: 20px;
    }
    
    .news-nav-prev,
    .news-nav-next,
    .news-nav-list {
        width: 100%;
        justify-content: center;
        padding: 12px;
    }
    
    .news-nav-list {
        order: 2;
    }
    
    .news-nav-prev {
        order: 1;
    }
    
    .news-nav-next {
        order: 3;
    }
    
    .related-news-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
    }
    
    .related-news-image {
        height: 180px;
    }
}

/* 新闻图片轮播样式 */
.news-detail-gallery {
    margin-bottom: 25px;
}

.gallery-main {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 15px;
    height: 450px;
}

.gallery-slider {
    width: 100%;
    height: 100%;
    position: relative;
}

.gallery-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f9f9f9;
}

.gallery-slide.active {
    opacity: 1;
    z-index: 1;
}

.gallery-slide img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.gallery-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background-color: rgba(0, 0, 0, 0.5);
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    opacity: 0.7;
    transition: all 0.3s ease;
}

.gallery-arrow:hover {
    opacity: 1;
    background-color: rgba(0, 86, 179, 0.8);
}

.gallery-arrow.prev {
    left: 20px;
}

.gallery-arrow.next {
    right: 20px;
}

.gallery-thumbs {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 5px;
}

.gallery-thumb {
    width: 80px;
    height: 60px;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    opacity: 0.6;
    transition: all 0.3s ease;
    flex-shrink: 0;
    border: 2px solid transparent;
}

.gallery-thumb:hover {
    opacity: 0.9;
}

.gallery-thumb.active {
    opacity: 1;
    border-color: #0056b3;
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 当只有一张图片时隐藏箭头和缩略图 */
.single-image .gallery-arrow,
.single-image .gallery-thumbs {
    display: none;
}

@media (max-width: 768px) {
    .gallery-main {
        height: 350px;
    }
    
    .gallery-thumb {
        width: 60px;
        height: 45px;
    }
    
    .gallery-arrow {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }
} 