﻿/**
 * News Single 新闻详情 Page Styles
 * News Single 新闻详情 页面样式
 * 
 * @package Milestrong
 * @since 2.0.0
 */

/* ============================================
   页面头部样式 - Page Header Styles
   ============================================ */

/* 页面头部容器 */
.page-news-single .milestrong-page-header {
    height: 800px;
    /* 可以调整此页面的头部高度 */
}

/* 背景遮罩层透明度 */
.page-news-single .milestrong-page-header-overlay {
    /* overlay removed */
    /* 可以调整此页面的遮罩透明度 */
}

/* ============================================
   正文头部标题区样式 - News Header Styles
   ============================================ */

.news-single-header {
    padding: 61px 0;
    position: relative;
    overflow: hidden;
}

.news-single-header-content {
    position: relative;
    z-index: 2;
}

.news-meta-info {
    max-width: 1440px;
    margin: 0 auto;
}

.news-title {
    font-size: 48px;
    font-weight: 700;
    /* 颜色通过内联样式设置，不在CSS中固定 */
    margin: 0 0 30px 0;
    line-height: 1.2;
    text-align: center;
}

.news-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.news-date {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    /* 颜色通过内联样式设置，不在CSS中固定 */
}

.news-date .icon-calendar {
    font-size: 18px;
    margin-right: 8px;
}

/* ============================================
   社会化分享按钮样式 - Share Buttons Styles
   ============================================ */

.news-share-buttons {
    display: flex;
    gap: 15px;
    align-items: center;
}

.news-share-buttons-container {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.share-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.share-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    background: #fff;
    border-color: #017fff;
}

.share-button img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.share-button .share-icon {
    font-size: 18px;
    line-height: 1;
    color: #333;
}

.share-button:hover .share-icon {
    color: #017fff;
}

/* ============================================
   正文内容区样式 - News Content Styles
   ============================================ */

.news-single-content {
    padding: 80px 0;
    /* 背景色通过内联样式设置，不在CSS中固定 */
}

.news-content-wrapper {
    max-width: 1440px;
    margin: 0 auto;
}

.news-article .entry-content {
    font-size: 18px;
    line-height: 1.8;
    color: #333;
}

/* 正文图片样式 */
.news-content-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 30px 0;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.news-content-image:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

/* 视频包装器 */
.news-video-wrapper {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 比例 */
    margin: 30px 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.news-video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* 正文标题样式 */
.news-article .entry-content h1,
.news-article .entry-content h2,
.news-article .entry-content h3,
.news-article .entry-content h4,
.news-article .entry-content h5,
.news-article .entry-content h6 {
    /* 颜色通过内联样式设置，不在CSS中固定 */
    font-weight: 600;
    margin: 40px 0 20px 0;
    line-height: 1.3;
}

.news-article .entry-content h2 {
    font-size: 32px;
}

.news-article .entry-content h3 {
    font-size: 26px;
}

.news-article .entry-content h4 {
    font-size: 22px;
}

/* 段落样式 */
.news-article .entry-content p {
    margin: 0 0 20px 0;
}

/* 链接样式 */
.news-article .entry-content a {
    color: #017fff;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
}

.news-article .entry-content a:hover {
    color: #0066cc;
    border-bottom-color: #0066cc;
}

/* 列表样式 */
.news-article .entry-content ul,
.news-article .entry-content ol {
    margin: 20px 0;
    padding-left: 30px;
}

.news-article .entry-content li {
    margin: 8px 0;
}

/* 引用样式 */
.news-article .entry-content blockquote {
    margin: 30px 0;
    padding: 20px 30px;
    background: #f8f9fa;
    border-left: 4px solid #017fff;
    font-style: italic;
    font-size: 20px;
    color: #555;
}

/* ============================================
   文章底部导航样式 - Article Navigation Styles
   ============================================ */

.news-single-navigation {
    padding: 40px 0;
    position: relative;
}

.news-navigation-wrapper {
    max-width: 1440px;
    margin: 0 auto;
    text-align: center;
}

.news-navigation-divider {
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, #ddd 20%, #999 50%, #ddd 80%, transparent 100%);
    margin: 0 0 40px 0;
    position: relative;
}

.news-navigation-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

/* 文章底部导航按钮 */
.news-navigation-buttons .nav-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    height: auto;
    border-radius: 0;
    background: transparent;
    border: none;
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: none;
    position: relative;
}

.news-navigation-buttons .nav-button::before {
    display: none;
}

.news-navigation-buttons .nav-button:hover {
    transform: none;
    box-shadow: none;
}

.news-navigation-buttons .nav-button.disabled {
    background: #f5f5f5;
    border-color: #e0e0e0;
    color: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.05);
}

.news-navigation-buttons .nav-button.disabled:hover {
    background: #f5f5f5;
    border-color: #e0e0e0;
    color: #ccc;
    transform: none;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.05);
}

.nav-icon {
    font-size: 20px;
    font-weight: bold;
    line-height: 1;
    font-style: normal;
}

/* 导航按钮图标图片 */
.nav-icon-img {
    width: auto;
    height: auto;
    object-fit: contain;
    pointer-events: none;
}

/* hover 图标默认隐藏 */
.nav-back-hover,
.nav-prev-hover,
.nav-next-hover {
    display: none;
}

/* hover 时切换：隐藏常态，显示 hover */
.nav-button.nav-back:hover .nav-back-default { display: none; }
.nav-button.nav-back:hover .nav-back-hover { display: inline; }
.nav-button.nav-prev:hover .nav-prev-default { display: none; }
.nav-button.nav-prev:hover .nav-prev-hover { display: inline; }
.nav-button.nav-next:hover .nav-next-default { display: none; }
.nav-button.nav-next:hover .nav-next-hover { display: inline; }

/* 特殊按钮样式 */
.nav-back {
    color: #fff;
}

/* 响应式设计 */
@media screen and (max-width: 768px) {
    .news-single-navigation {
        padding: 30px 0;
    }
    
    .news-navigation-buttons {
        gap: 15px;
    }
    
    .nav-button {
        width: 45px;
        height: 45px;
    }
    
    .nav-icon {
        font-size: 18px;
    }
}

@media screen and (max-width: 480px) {
    .news-single-navigation {
        padding: 25px 0;
    }
    
    .news-navigation-buttons {
        gap: 12px;
    }
    
    .nav-button {
        width: 40px;
        height: 40px;
    }
    
    .nav-icon {
        font-size: 16px;
    }
}

/* ============================================
   相关新闻区块样式 - Related News Styles
   ============================================ */

.news-related-section {
    padding: 80px 0;
    position: relative;
}

.related-news-wrapper {
    max-width: 1440px; /* 减小内容区域宽度，为按钮留出空间 */
    margin: 0 auto;
    position: relative;
    padding: 0 20px;
}

/* 确保有足够空间显示导航按钮 */
.news-related-section {
    overflow: hidden; /* 防止按钮撑宽页面 */
}

.news-related-section .container {
    max-width: 1440px; /* 限制最大宽度 */
    padding: 0 20px; /* 使用正常的内边距 */
    position: relative;
}

.related-news-title {
    font-size: 36px;
    font-weight: 700;
    color: #ffffff;
    text-align: center;
    margin: 0 0 60px 0;
}

.related-news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 40px;
}

.related-news-item {
    background: #181822;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
    margin: 15px; /* 四周边距 */
}

.related-news-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    background-color: var(--hover-bg-color, #ffffff) !important;
}

/* 确保hover时整个卡片区域都变色 */
.related-news-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    transition: background-color 0.3s ease;
    pointer-events: none;
    z-index: 1;
}

.related-news-item:hover::before {
    background-color: var(--hover-bg-color, #ffffff);
}

.news-item-image {
    width: calc(100% - 30px); /* 减去左右边距 */
    height: 200px;
    overflow: hidden;
    position: relative;
    margin: 15px; /* 四周边距 */
    border-radius: 12px;
    z-index: 2;
}

.news-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    border-radius: 12px;
}

.related-news-item:hover .news-item-image img {
    transform: scale(1.05);
}

.news-item-content {
    padding: 20px 25px 25px 25px;
    transition: all 0.3s ease;
    background-color: transparent;
    position: relative;
    z-index: 2;
}

/* 移除单独的内容区域hover效果，让整个卡片统一变色 */
.related-news-item:hover .news-item-content {
    color: #000; /* hover状态下黑色文字 */
}

.news-item-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 15px 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 2.8em; /* 确保两行高度 */
    max-height: 2.8em; /* 限制最大高度为两行 */
    word-wrap: break-word;
    word-break: break-word;
    color: #fff; /* 常态下白色文字 */
}

.news-item-title a {
    color: #fff; /* 常态下白色文字 */
    text-decoration: none;
    transition: color 0.3s ease;
}

.news-item-title a:hover,
.related-news-item:hover .news-item-title a {
    color: #000 !important; /* hover状态下黑色文字 */
}

/* 确保在整个卡片hover时标题颜色正确 */
.related-news-item:hover .news-item-title a {
    color: #000 !important; /* hover状态下黑色文字 */
}

.news-item-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
}

.news-item-date {
    font-size: 14px;
    color: #fff; /* 常态下白色文字 */
    margin: 0;
    flex: 1;
    transition: color 0.3s ease;
}

/* hover状态下日期颜色 */
.related-news-item:hover .news-item-date {
    color: #000 !important; /* hover状态下黑色文字 */
}

.news-item-button {
    display: inline-block;
    padding: 10px 20px;
    color: #fff;
    text-decoration: none;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    margin-left: 15px;
}

.news-item-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(1, 127, 255, 0.3);
    color: #fff;
}

/* 导航按钮 (PC端) */
.related-news-navigation {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    pointer-events: none;
}

/* 确保PC端显示导航按钮 */
@media screen and (min-width: 1200px) {
    .related-news-navigation {
        display: block !important;
    }
    
    .related-news-navigation .nav-btn {
        display: flex !important;
    }
}

/* 相关新闻导航按钮 */
.related-news-navigation .nav-btn {
    position: absolute;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid #e0e0e0;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #333;
    transition: all 0.3s ease;
    pointer-events: auto;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    z-index: 10;
}

.related-news-navigation .nav-btn:hover {
    background: #fff;
    border-color: #017fff;
    color: #017fff;
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(1, 127, 255, 0.3);
}

.related-news-navigation .nav-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: #f5f5f5;
    border-color: #ddd;
    color: #999;
}

.related-news-navigation .nav-btn:disabled:hover {
    transform: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.related-news-navigation .nav-btn.nav-prev {
    left: -70px; /* 左按钮在容器外部 */
}

.related-news-navigation .nav-btn.nav-next {
    right: -30px; /* 右按钮在容器外部 */
}

.related-news-navigation .nav-btn .icon-chevron-left::before {
    content: '‹';
}

.related-news-navigation .nav-btn .icon-chevron-right::before {
    content: '›';
}

/* 指示器 (平板/移动端) */
.related-news-indicators {
    display: none;
    justify-content: center;
    align-items: center;
    margin-top: 40px;
    padding: 0 20px; /* 左右内边距 */
}

.related-news-indicators .indicators-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px; /* 指示器之间的间距 */
    flex-wrap: nowrap; /* 防止换行 */
}

.indicator-dot {
    width: 14px; /* 稍微增大指示器尺寸 */
    height: 14px;
    border-radius: 50%;
    background: rgba(1, 127, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0; /* 防止压缩 */
}

.indicator-dot.active {
    background: #017fff;
    transform: scale(1.3); /* 稍微增大活跃状态的缩放 */
    box-shadow: 0 2px 8px rgba(1, 127, 255, 0.4); /* 添加阴影效果 */
}

/* 无相关新闻提示 */
.no-related-news {
    text-align: center;
    font-size: 18px;
    color: #666;
    padding: 40px 0;
}

/* 灯箱效果 */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.lightbox-overlay.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    position: relative;
}

.lightbox-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: #fff;
    font-size: 30px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 5px;
}

/* ============================================
   响应式设计 - Responsive Design
   ============================================ */

/* 平板端 (768px-1199px) */
@media screen and (max-width: 1199px) and (min-width: 768px) {
    /* 页面头部 */
    .page-news-single .milestrong-page-header {
        height: 500px;
    }
    
    .news-title {
        font-size: 40px;
    }
    
    .news-single-content {
        padding: 60px 0;
    }
    
    .news-related-section {
        padding: 60px 0;
    }
    
    .related-news-wrapper {
        padding: 0 60px; /* 平板端减少内边距 */
    }
    
    .news-related-section .container {
        padding: 0 70px; /* 平板端减少外层内边距 */
    }
    
    .related-news-navigation .nav-btn.nav-prev {
        left: -60px; /* 平板端调整按钮距离 */
    }
    
    .related-news-navigation .nav-btn.nav-next {
        right: 125px; /* PAD端右按钮位置调整 */
    }
    
    .related-news-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
    
    .related-news-item {
        margin: 10px;
    }
    
    .news-item-image {
        width: calc(100% - 20px); /* 平板端减少边距 */
        margin: 10px;
        height: 180px;
    }
    
    .news-item-content {
        padding: 15px 20px 20px 20px;
    }
    
    .news-item-title {
        font-size: 16px;
    }
    
    .related-news-title {
        font-size: 32px;
        margin-bottom: 50px;
    }
    
    .desktop-only {
        display: none !important;
    }
    
    .mobile-tablet-only {
        display: block !important;
    }
    
    .related-news-indicators {
        display: flex;
    }
    
    /* 正文图片宽度调整 */
    .news-content-image {
        width: 100%;
        max-width: 800px;
        margin-left: auto;
        margin-right: auto;
        display: block;
    }
    
    .news-share-buttons {
        flex-wrap: wrap;
        justify-content: flex-start;
    }
    
    .news-meta-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
}

/* 移动端 (<768px) */
@media screen and (max-width: 767px) {
    /* 页面头部 */
    .page-news-single .milestrong-page-header {
        height: 350px;
    }
    
    .news-single-header {
        padding: 40px 0;
    }
    
    .news-title {
        font-size: 28px;
        margin-bottom: 20px;
    }
    
    .news-meta-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .news-share-buttons {
        gap: 10px;
    }
    
    .share-button {
        width: 35px;
        height: 35px;
    }
    
    .share-button img {
        width: 18px;
        height: 18px;
    }
    
    .news-single-content {
        padding: 40px 0;
    }
    
    .news-article .entry-content {
        font-size: 16px;
    }
    
    .news-article .entry-content h2 {
        font-size: 24px;
    }
    
    .news-article .entry-content h3 {
        font-size: 20px;
    }
    
    .news-related-section {
        padding: 40px 0;
    }
    
    .related-news-wrapper {
        padding: 0 30px; /* 移动端进一步减少内边距 */
    }
    
    .news-related-section .container {
        padding: 0 40px; /* 移动端外层容器内边距 */
    }
    
    .related-news-title {
        font-size: 24px;
        margin-bottom: 30px;
    }
    
    .related-news-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .related-news-item {
        margin: 8px;
    }
    
    .news-item-image {
        width: calc(100% - 16px); /* 移动端进一步减少边距 */
        margin: 8px;
        height: 160px;
    }
    
    .news-item-content {
        padding: 12px 15px 15px 15px;
    }
    
    .news-item-title {
        font-size: 15px;
        margin-bottom: 12px;
    }
    
    .news-item-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .news-item-button {
        align-self: stretch;
        text-align: center;
        margin-left: 0;
    }
    
    .desktop-only {
        display: none !important;
    }
    
    .mobile-tablet-only {
        display: block !important;
    }
    
    .related-news-indicators {
        display: flex;
        margin-top: 50px; /* 移动端增加顶部间距 */
        padding: 0 15px; /* 移动端调整左右内边距 */
    }
    
    .related-news-indicators .indicators-wrapper {
        gap: 20px; /* 移动端增加指示器间距 */
    }
    
    .related-news-indicators .indicator-dot {
        width: 16px; /* 移动端稍微增大指示器 */
        height: 16px;
    }
    
    .related-news-indicators .indicator-dot.active {
        transform: scale(1.4); /* 移动端增大活跃状态缩放 */
    }
    
    /* 正文图片强制满宽 */
    .news-content-image {
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0;
        margin-right: 0;
    }
    
    .news-video-wrapper {
        margin: 20px 0;
    }
    
    .news-article .entry-content blockquote {
        padding: 15px 20px;
        font-size: 18px;
        margin: 20px 0;
    }
}

/* 超小屏幕 (<480px) */
@media screen and (max-width: 479px) {
    /* 页面头部 */
    .page-news-single .milestrong-page-header {
        height: 280px;
    }
    
    .news-title {
        font-size: 24px;
    }
    
    .news-single-header {
        padding: 30px 0;
    }
    
    .news-single-content {
        padding: 30px 0;
    }
    
    .news-related-section {
        padding: 30px 0;
    }
    
    .related-news-title {
        font-size: 20px;
    }
    
    .news-item-content {
        padding: 15px;
    }
    
    .news-item-title {
        font-size: 16px;
    }
    
    .news-item-button {
        padding: 10px 20px;
        font-size: 13px;
    }
}

/* 工具类 */
.desktop-only {
    display: block;
}

.mobile-tablet-only {
    display: none;
}

/* 容器内边距调整 */
.page-news-single .container {
    padding-left: 20px;
    padding-right: 20px;
}

@media screen and (max-width: 767px) {
    .page-news-single .container {
        padding-left: 15px;
        padding-right: 15px;
    }
}


/* ============================================
   正文内容图片样式 - Content Images Styles
   ============================================ */

/* 正文内容图片 - 固定宽度设置 */
.news-content img,
.news-content-image {
    max-width: 1000px;
    width: 100%;
    height: auto;
    display: block;
    margin: 20px auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.news-content img:hover,
.news-content-image:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

/* 响应式适配 */
@media screen and (max-width: 1200px) {
    .news-content img,
    .news-content-image {
        max-width: 90%;
    }
}

@media screen and (max-width: 768px) {
    .news-content img,
    .news-content-image {
        max-width: 100%;
        margin: 15px auto;
        border-radius: 6px;
    }
}

@media screen and (max-width: 480px) {
    .news-content img,
    .news-content-image {
        margin: 10px auto;
        border-radius: 4px;
    }
}