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

.news-detail-page {
    padding: 30px 0;
    background-color: #fff;
}

/* 增大正文字体 */
.content-paragraph {
    font-size: 18px !important;
    line-height: 1.8;
    margin: 20px 0;
    text-align: justify;
}

/* 文章主体 */
.news-article {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
    padding: 30px;
    margin-bottom: 50px;
}

/* 文章头部 */
.article-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.article-title {
    color: #003366;
    font-size: 2.2rem;
    font-weight: bold;
    line-height: 1.4;
    margin-bottom: 15px;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    color: #666;
    font-size: 0.95rem;
}

.article-meta span {
    display: flex;
    align-items: center;
}

.article-meta span::before {
    content: "•";
    margin-right: 8px;
    color: #ccc;
}

.article-meta span:first-child::before {
    content: "";
    margin-right: 0;
}

/* 文章缩略图 */
.article-thumbnail {
    margin-bottom: 30px;
}

.article-thumbnail img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.image-caption {
    text-align: center;
    color: #666;
    font-size: 0.9rem;
    margin-top: 10px;
}

/* 文章内容 */
.article-content {
    color: #000; /* 黑色字体 */
    font-size: 1.2rem; /* 增大字体 */
    line-height: 2; /* 2倍行距 */
}

/* 关键词样式 - 蓝色 */
.article-content .name, .article-content .organization, .article-content .university,
.article-content .theme, .article-content .audience, .article-content .milestone,
.article_content .number, .article-content .keyword {
    color: #091DA3;
    font-weight: 500;
}

.article-content p {
    margin-bottom: 20px;
    font-size: 1.2rem; /* 增大正文字体 */
    text-indent: 2em; /* 首行缩进 */
    text-align: justify; /* 两端对齐 */
    line-height: 2; /* 2倍行距 */
}

.article-content h2 {
    color: #003366;
    font-size: 1.6rem;
    margin: 30px 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #003366;
}

.article-content h3 {
    color: #003366;
    font-size: 1.4rem; /* 增大副标题字体 */
    margin: 25px 0 15px 0;
    border-bottom: 2px solid #003366;
    padding-bottom: 8px;
}

.article-content ul {
    padding-left: 25px;
    margin-bottom: 20px;
}

.article-content li {
    margin-bottom: 10px;
}

.article-content blockquote {
    border-left: 4px solid #003366;
    padding: 15px 20px;
    margin: 25px 0;
    background-color: #f8f9fa;
    font-style: italic;
    color: #666;
}

/* 文章底部 */
.article-footer {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #eee;
}

.article-tags {
    margin-bottom: 20px;
}

.tag {
    display: inline-block;
    background-color: #003366;
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    margin-right: 10px;
    margin-bottom: 10px;
}

.article-share {
    color: #666;
    font-size: 0.95rem;
}

.article-share span {
    margin-right: 10px;
}

.share-link {
    color: #003366;
    text-decoration: none;
    margin-right: 15px;
    transition: color 0.3s ease;
}

.share-link:hover {
    color: #0055aa;
    text-decoration: underline;
}

/* 相关新闻 */
.related-news {
    margin-top: 50px;
}

.related-news h2 {
    color: #003366;
    font-size: 1.8rem;
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 2px solid #003366;
}

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

.related-news-item {
    display: flex;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.related-news-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.related-news-thumbnail {
    flex: 0 0 120px;
    height: 100px;
    overflow: hidden;
}

.related-news-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-news-content {
    flex: 1;
    padding: 15px;
}

.related-news-content h3 {
    margin-bottom: 10px;
    font-size: 1rem;
    line-height: 1.4;
}

.related-news-content h3 a {
    color: #003366;
    text-decoration: none;
    transition: color 0.3s ease;
}

.related-news-content h3 a:hover {
    color: #0055aa;
}

.related-news-date {
    color: #666;
    font-size: 0.85rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    /* 平板端图片优化 */
    .content-image {
        max-width: 90%;
        border-radius: 7px;
        box-shadow: 0 3px 10px rgba(0,0,0,0.12);
    }

    .news-article {
        padding: 20px;
    }
    
    .article-title {
        font-size: 1.8rem;
    }
    
    .article-meta {
        flex-direction: column;
        gap: 5px;
    }
    
    .article-thumbnail img {
        height: 250px;
    }
    
    .related-news-grid {
        grid-template-columns: 1fr;
    }
    
    .related-news-item {
        flex-direction: column;
    }
    
    .related-news-thumbnail {
        flex: none;
        height: 150px;
    }
}

@media (max-width: 480px) {
    /* 手机端图片优化 */
    .news-image {
        margin: 8px 0;
        padding: 0 5px;
    }

    .content-image {
        max-width: 100%;
        width: 100%;
        border-radius: 6px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        /* 禁用悬停缩放，使用触摸更友好 */
        transform: none !important;
    }

    /* 单独的图片（非轮播）在手机端显示更大 */
    .news-image .content-image {
        max-width: 100%;
        width: 100%;
        margin: 0 -10px;
        border-radius: 0;
    }

    /* 轮播图片保持原有样式 */
    .news-carousel-slide .content-image {
        margin: 0 -10px;
        border-radius: 0;
    }

    /* 手机端轮播图片特殊处理 */
    .news-carousel-slide .content-image {
        max-width: 100vw;
        width: 100vw;
        margin: 0 -10px;
        border-radius: 0;
    }

    /* 手机端轮播容器优化 */
    .news-image-carousel {
        margin: 10px -10px;
        border-radius: 0;
        overflow: hidden;
    }

    /* 移除手机端悬停效果 */
    .content-image:hover {
        transform: none !important;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    }

    /* 手机端轮播优化 */
    .news-image-carousel {
        margin: 10px 0;
        border-radius: 6px;
    }

    /* 手机端完全隐藏导航按钮 */
    .carousel-nav-btn {
        width: 30px;
        height: 30px;
        font-size: 12px;
        padding: 6px 8px;
        background: rgba(0, 51, 102, 0.3);
        opacity: 0;
        transition: all 0.3s ease;
        display: none; /* 手机端完全隐藏 */
    }

    /* 只在桌面端显示按钮 */
    @media (min-width: 769px) {
        .carousel-nav-btn {
            display: flex;
            opacity: 0.8;
        }

        .carousel-nav-btn:hover {
            background: rgba(0, 51, 102, 1);
            opacity: 1;
        }
    }

    .carousel-nav-btn.prev {
        left: 8px;
    }

    .carousel-nav-btn.next {
        right: 8px;
    }

    /* 桌面端按钮位置重置 */
    @media (min-width: 769px) {
        .carousel-nav-btn.prev {
            left: 10px;
        }

        .carousel-nav-btn.next {
            right: 10px;
        }
    }

    .carousel-indicator {
        width: 6px;
        height: 6px;
        background: rgba(255, 255, 255, 0.6);
    }

    .carousel-indicator.active {
        background: rgba(255, 255, 255, 0.9);
    }

    /* 支持触摸滑动，禁用缩放 */
    .news-carousel-track {
        cursor: grab;
        touch-action: pan-y; /* 只允许垂直滚动，水平滑动由JS处理 */
        -webkit-user-select: none; /* 禁用文本选择 */
        user-select: none;
        -webkit-touch-callout: none; /* 禁用iOS长按菜单 */
        -webkit-tap-highlight-color: transparent; /* 禁用点击高亮 */
    }

    .news-carousel-track:active {
        cursor: grabbing;
    }

    .news-carousel-slide {
        pointer-events: none; /* 防止干扰触摸事件 */
        -webkit-user-drag: none;
        user-select: none;
        -webkit-user-select: none;
        -webkit-touch-callout: none;
    }

    .news-carousel-slide img {
        pointer-events: auto; /* 图片可以点击 */
        -webkit-user-drag: none;
        user-select: none;
        -webkit-user-select: none;
        -webkit-touch-callout: none;
        -webkit-tap-highlight-color: transparent;
        /* 禁用图片双击缩放 */
        touch-action: manipulation;
        pointer-events: auto;
    }

    /* 轮播容器禁用缩放 */
    .news-image-carousel {
        touch-action: manipulation;
        -webkit-user-select: none;
        user-select: none;
        -webkit-touch-callout: none;
    }

    
    .article-title {
        font-size: 1.6rem;
    }

    .article-content {
        font-size: 0.95rem;
    }

    .article-thumbnail img {
        height: 200px;
    }

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

/* 图片样式 */
.news-image {
    margin: 15px 0;
    text-align: center;
}

/* 单独图片样式（不参与轮播） */
.news-image-single {
    margin: 15px 0;
    text-align: center;
}

/* 36号图片特殊样式 - 像轮播图一样大 */
.news-image-single.large-image .content-image {
    max-width: 100%;
    width: 100%;
    border-radius: 0;
    box-shadow: none;
}

.content-image {
    max-width: 85%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    display: block;
    margin: 0 auto;
    transition: all 0.3s ease;
    cursor: pointer;
}

/* 图片悬停效果 */
.content-image:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 16px rgba(0,0,0,0.2);
}

/* 超大屏幕优化 */
@media (min-width: 1200px) {
    .content-image {
        max-width: 70%;
    }
}

/* 大屏幕优化 */
@media (max-width: 992px) {
    .content-image {
        max-width: 80%;
    }
}

/* 图片轮播容器 */
.news-image-carousel {
    position: relative;
    margin: 15px 0;
    overflow: hidden;
    border-radius: 8px;
    background: #f8f9fa;
}

.news-carousel-track {
    display: flex;
    transition: transform 0.3s ease;
    scroll-behavior: smooth;
}

.news-carousel-slide {
    flex: 0 0 auto;
    width: 100%;
    text-align: center;
}

.news-carousel-slide .content-image {
    width: 100%;
    max-width: 100%;
    border-radius: 0;
    box-shadow: none;
}

/* 轮播控制按钮 */
.carousel-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 51, 102, 0.8);
    color: white;
    border: none;
    padding: 12px 16px;
    cursor: pointer;
    font-size: 16px;
    z-index: 10;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.carousel-nav-btn:hover {
    background: rgba(0, 51, 102, 1);
    transform: translateY(-50%) scale(1.1);
}

.carousel-nav-btn.prev {
    left: 10px;
}

.carousel-nav-btn.next {
    right: 10px;
}

/* 轮播指示器 */
.carousel-indicators {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.carousel-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-indicator.active {
    background: white;
    transform: scale(1.2);
}