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

/* Banner区域 */
.detail-banner {
    margin-top: 0;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.detail-banner .banner-image {
    width: 1200px;
    height: 300px;
    margin: 0 auto;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

.detail-banner .banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.5));
}


/* 面包屑样式 - 参考列表页 */
.detail-banner + .breadcrumb {
    margin-bottom: 10px;
    padding-bottom: 15px;
}

/* 新闻详情内容区域 */
.news-detail-main {
    padding: 30px 0 60px 0;
    background-color: transparent;
    position: relative;
}

.news-detail-main > * {
    position: relative;
    z-index: 1;
}

.detail-title {
    max-width: 1200px;
    margin: 0 auto 40px;
    padding: 0 calc(20px + 320px + 40px) 0 20px;
    text-align: center;
    box-sizing: border-box;
}

/* 分享图标侧边栏 */
.share-sidebar {
    position: fixed;
    left: calc((100vw - 1200px) / 2 - 70px);
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

@media (max-width: 1240px) {
    .share-sidebar {
        left: 20px;
    }
}

.share-title {
    font-size: 16px;
    color: var(--text-color);
    font-weight: 500;
    margin-bottom: 5px;
}

.share-icons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.share-item {
    position: relative;
}

.share-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-color);
    transition: all 0.3s ease;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.share-link i {
    font-size: 20px;
    line-height: 1;
}

.share-link.wechat:hover {
    background-color: #07c160;
    color: white;
    border-color: #07c160;
}

.share-link.bilibili:hover {
    background-color: #fb7299;
    color: white;
    border-color: #fb7299;
}

.share-link.douyin:hover {
    background-color: #000000;
    color: white;
    border-color: #000000;
}

.share-link.weibo:hover {
    background-color: #e6162d;
    color: white;
    border-color: #e6162d;
}

/* 左右两栏布局 */
.detail-layout {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

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

/* 右侧相关新闻 */
.related-news {
    width: 320px;
    flex-shrink: 0;
    background-color: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    padding: 30px 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.related-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-color);
    margin: 0 0 25px 0;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--primary-color);
}

.related-news-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.related-news-item {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    transition: transform 0.3s ease, opacity 0.3s ease;
    border-radius: 6px;
    overflow: hidden;
    background-color: rgba(255, 255, 255, 0.03);
    border: 2px solid #dd640d;
}

.related-news-item:hover {
    transform: translateY(-3px);
    opacity: 0.9;
    border-color: #dd640d;
}

.related-thumbnail {
    width: 100%;
    height: 180px;
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0.3);
}

.related-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.related-news-title {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-color);
    margin: 0;
    padding: 15px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}


/* 正文内容 */
.detail-body {
    color: var(--text-color);
    line-height: 1.8;
}

.content-block {
    margin-bottom: 40px;
}

.content-text {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.9);
    margin: 0 0 30px 0;
    line-height: 1.8;
    text-align: justify;
}

/* 内容图片区域 */
.content-images {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin: 30px 0;
    justify-content: flex-start;
}

.content-image-item {
    flex: 0 0 auto;
    max-width: 300px;
}

.content-image-item.large {
    max-width: 400px;
}

.content-image-item img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
    margin-bottom: 10px;
}

.image-caption {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
    text-align: center;
    line-height: 1.5;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .detail-banner .banner-image {
        width: 100%;
        max-width: 1200px;
    }

    .detail-layout {
        flex-direction: column;
        gap: 30px;
    }

    .related-news {
        width: 100%;
    }

    .related-news-list {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .detail-banner {
        margin-top: 0;
    }

    .detail-banner .banner-image {
        width: 100%;
        max-width: 1200px;
        height: 250px;
    }

    .share-sidebar {
        display: none;
    }

    .news-detail-main {
        padding: 20px 0 40px 0;
    }

    .detail-title {
        font-size: 28px;
        margin-bottom: 30px;
        padding: 0 20px;
        max-width: 100%;
        margin-left: 0;
        margin-right: 0;
    }

    .detail-layout {
        padding: 0 20px;
    }

    .content-text {
        font-size: 15px;
    }

    .content-images {
        flex-direction: column;
        align-items: center;
        gap: 20px;
        margin: 20px 0;
    }

    .content-image-item {
        max-width: 100%;
        width: 100%;
    }

    .content-image-item.large {
        max-width: 100%;
    }

    .content-block {
        margin-bottom: 30px;
    }

    .related-news {
        padding: 25px 15px;
    }

    .related-title {
        font-size: 20px;
        margin-bottom: 20px;
    }

    .related-news-list {
        grid-template-columns: 1fr;
    }

    .related-thumbnail {
        height: 160px;
    }

    .related-news-title {
        font-size: 15px;
        padding: 12px;
    }
}

@media (max-width: 480px) {
    .detail-banner .banner-image {
        width: 100%;
        max-width: 1200px;
        height: 200px;
    }

    .detail-title {
        font-size: 24px;
        margin-bottom: 25px;
        padding: 0 15px;
        max-width: 100%;
        margin-left: 0;
        margin-right: 0;
    }

    .detail-layout {
        padding: 0 15px;
    }

    .content-text {
        font-size: 14px;
    }

    .image-caption {
        font-size: 13px;
    }

    .content-block {
        margin-bottom: 25px;
    }

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

    .related-title {
        font-size: 18px;
        margin-bottom: 15px;
    }

    .related-thumbnail {
        height: 140px;
    }

    .related-news-title {
        font-size: 14px;
        padding: 10px;
    }
}

/* 上一篇/下一篇导航 */
.news-navigation {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-prev,
.nav-next {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px;
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
    min-height: 80px;
    justify-content: center;
}

.nav-prev:hover,
.nav-next:hover {
    background-color: rgba(255, 165, 0, 0.1);
    border-color: var(--primary-color);
    transform: translateY(-3px);
}

.nav-prev {
    text-align: left;
}

.nav-next {
    text-align: right;
}

.nav-label {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 8px;
    display: block;
}

.nav-title {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-color);
    display: block;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-prev:hover .nav-label,
.nav-next:hover .nav-label {
    color: var(--primary-color);
}

.nav-prev:hover .nav-title,
.nav-next:hover .nav-title {
    color: var(--primary-color);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .news-navigation {
        flex-direction: column;
        gap: 15px;
        margin-top: 40px;
        padding-top: 30px;
    }

    .nav-prev,
    .nav-next {
        min-height: 70px;
        padding: 15px;
    }

    .nav-label {
        font-size: 13px;
        margin-bottom: 6px;
    }

    .nav-title {
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .news-navigation {
        margin-top: 30px;
        padding-top: 25px;
    }

    .nav-prev,
    .nav-next {
        min-height: 60px;
        padding: 12px;
    }

    .nav-label {
        font-size: 12px;
        margin-bottom: 5px;
    }

    .nav-title {
        font-size: 14px;
    }
}
