/* 新闻详情页面样式 */

/* 面包屑导航 */
.breadcrumb {
    background: transparent;
    padding: 20px 0;
    border-bottom: 1px solid #e9ecef;
    margin-top: 86px; /* 为导航栏留出空间 */
    margin-bottom: 30px; /* 为内容区域留出空间 */
}

.breadcrumb-container {
    max-width: 1396px;
    margin: 0 auto;
    padding: 0 20px;
    font-size: 14px;
    color: #666;
}

.breadcrumb-container a {
    color: #007bff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb-container a:hover {
    color: #0056b3;
}

.breadcrumb-container span {
    color: #333;
    font-weight: 500;
}

/* 详情页横幅 */
.detail-banner {
    position: relative;
    width: 100%;
    height: 470px;
    margin-top: 86px; /* 为导航栏留出空间 */
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.detail-banner-img {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    opacity: 0.8;
}

.detail-banner-texts {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 2;
    color: #fff;
}

.detail-banner-title {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.detail-banner-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

/* 主要内容容器 - 参考news.php的宽度 */
.detail-container {
    width: 1396px;
    margin: 0 auto 85px;
    padding: 0 20px;
    /* 移除白色背景 */
}

/* 文章头部 */
.article-header {
    margin-bottom: 45px;
    padding-bottom: 28px;
    border-bottom: 2px solid #f0f0f0;
}

.article-title {
    font-size: 36px;
    font-family: SourceHanSansCN;
    font-weight: 500;
    color: #333333;
    line-height: 1.3;
    margin-bottom: 28px;
    word-wrap: break-word;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 40px;
    font-size: 16px;
    color: #999999;
    flex-wrap: wrap;
    font-family: Microsoft YaHei;
    font-weight: 400;
}

.article-date {
    color: #999999;
    font-weight: 400;
}

.article-read-time {
    background: transparent;
    padding: 4px 8px;
    border-radius: 4px;
}

.article-views {
    background: transparent;
    padding: 4px 8px;
    border-radius: 4px;
    color: #1976d2;
}

/* 文章内容 - 参考news.php的样式 */
.article-content {
    margin-bottom: 80px;
}

.article-image {
    margin-bottom: 30px;
    text-align: center;
}

.article-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.article-text {
    font-size: 22px;
    font-family: SourceHanSansCN;
    font-weight: 400;
    color: #333333;
    line-height: 1.8;
    margin-top: 80px;
}

.article-text p {
    margin-bottom: 20px;
}

.article-text h1, .article-text h2, .article-text h3, .article-text h4, .article-text h5, .article-text h6 {
    margin: 30px 0 15px 0;
    color: #222;
    font-weight: 600;
    font-family: SourceHanSansCN;
}

.article-text h1 { font-size: 36px; }
.article-text h2 { font-size: 32px; }
.article-text h3 { font-size: 28px; }
.article-text h4 { font-size: 24px; }

.article-text ul, .article-text ol {
    margin: 20px 0;
    padding-left: 30px;
}

.article-text li {
    margin-bottom: 8px;
}

.article-text blockquote {
    background: transparent;
    border-left: 4px solid #007bff;
    padding: 20px;
    margin: 20px 0;
    border-radius: 0 4px 4px 0;
    font-style: italic;
}

.article-text a {
    color: #007bff;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s ease;
}

.article-text a:hover {
    border-bottom-color: #007bff;
}

/* 文章导航 */
.article-navigation {
    display: flex;
    justify-content: space-between;
    /* margin: 80px 50px 50px 0; */
    padding: 30px 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

.nav-item {
    flex: 1;
    max-width: 45%;
}

.nav-item a {
    display: block;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
}

.nav-item a:hover {
    color: #007bff;
    transform: translateX(5px);
}

.nav-disabled {
    color: #999;
    cursor: not-allowed;
}

.nav-label {
    display: block;
    font-size: 20px;
    color: #666;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nav-title {
    display: block;
    font-size: 20px;
    line-height: 1.4;
    font-weight: 500;
    max-width: 630px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-next {
    text-align: right;
}

.nav-next a:hover {
    transform: translateX(-5px);
}

/* 热门标签 - 参考news.php的样式 */
.article-tags {
    margin: 90px 0 0 0;
    padding: 30px 0;
    border-top: 1px solid #eee;
}

.tags-title {
    font-size: 36px;
    font-family: Microsoft YaHei;
    font-weight: 400;
    color: #999999;
    margin-bottom: 31px;
}

.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag-item {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 10px;
    height: 38px;
    border: 2px solid #999999;
    border-radius: 5px;
    cursor: pointer;
    margin-right: 10px;
    background: transparent;
    color: #999999;
    text-decoration: none;
    font-size: 24px;
    font-weight: 400;
    transition: all 0.3s ease;
}

.tag-item:hover {
    color: #3677e1;
    border-color: #3677e1;
}

/* 相关推荐 */
.related-articles {
    margin: 40px 0;
    padding: 30px 0;
    border-top: 1px solid #eee;
}

.related-title {
    font-size: 1.2rem;
    color: #222;
    margin-bottom: 20px;
    font-weight: 600;
}

.related-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.related-item {
    background: transparent;
    padding: 20px;
    border-radius: 8px;
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

.related-item:hover {
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.related-item a {
    text-decoration: none;
    color: inherit;
}

.related-item .related-title {
    font-size: 18px;
    font-weight: 500;
    color: #333;
    line-height: 1.4;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-item .related-date {
    font-size: 12px;
    color: #666;
}

/* 返回列表按钮 */
.back-to-list {
    text-align: center;
    margin: 50px 0 30px 0;
}

.back-btn {
    display: inline-block;
    padding: 12px 30px;
    background: #007bff;
    color: #fff;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,123,255,0.3);
}

.back-btn:hover {
    background: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,123,255,0.4);
}

/* 响应式设计 - 参考news.php的断点 */
@media screen and (max-width: 1440px) {
    .detail-container {
        width: 90%;
    }
    
    .article-title {
        font-size: 32px;
    }
}

@media screen and (max-width: 1366px) {
    .detail-banner {
        height: 400px;
        margin-top: 86px;
    }
    
    .detail-banner-title {
        font-size: 2rem;
    }
    
    .article-title {
        font-size: 28px;
    }
    
    .article-text {
        font-size: 20px;
    }
    
    .article-meta {
        font-size: 18px;
        gap: 50px;
    }
}

@media screen and (max-width: 768px) {
    .detail-banner {
        height: 300px;
        margin-top: 86px;
    }
    
    .detail-banner-title {
        font-size: 1.8rem;
    }
    
    .detail-banner-subtitle {
        font-size: 1rem;
    }
    
    .article-title {
        font-size: 24px;
    }
    
    .article-text {
        font-size: 18px;
        margin-top: 40px;
    }
    
    .article-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        font-size: 16px;
    }
    
    .article-navigation {
        flex-direction: column;
        gap: 20px;
        margin: 40px 20px 30px 0;
    }
    
    .nav-item {
        max-width: 100%;
    }
    
    .nav-next {
        text-align: left;
    }
    
    .nav-title {
        max-width: 100%;
        white-space: normal;
    }
    
    .related-list {
        grid-template-columns: 1fr;
    }
    
    .detail-container {
        padding: 0 15px;
    }
    
    .tags-title {
        font-size: 28px;
    }
    
    .tag-item {
        font-size: 20px;
        height: 32px;
    }
}

@media screen and (max-width: 520px) {
    .detail-banner {
        height: 250px;
        margin-top: 86px;
    }
    
    .detail-banner-title {
        font-size: 1.4rem;
    }
    
    .article-title {
        font-size: 20px;
    }
    
    .article-text {
        font-size: 16px;
        margin-top: 30px;
    }
    
    .article-meta {
        font-size: 14px;
        gap: 8px;
    }
    
    .tags-title {
        font-size: 24px;
    }
    
    .tag-item {
        font-size: 18px;
        height: 28px;
        padding: 0 8px;
    }
    
    .detail-container {
        margin: 30px auto 50px;
    }
}

/* 打印样式 */
@media print {
    .breadcrumb,
    .detail-banner,
    .article-navigation,
    .article-tags,
    .related-articles,
    .back-to-list {
        display: none;
    }
    
    .detail-container {
        max-width: none;
        padding: 0;
        margin: 0;
    }
    
    .article-title {
        font-size: 1.8rem;
    }
    
    .article-text {
        font-size: 14px;
        line-height: 1.6;
        margin-top: 0;
    }
}

/* 彻底覆盖浏览器默认的 figure 缩进和图片居中问题 */
figure,
figure.image.align-center,
figure.align-center {
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
    text-align: center !important;
}
figure img,
figure.image.align-center img,
figure.align-center img {
    display: inline-block !important;
    margin: 0 auto !important;
    max-width: 100% !important;
    height: auto !important;
    float: none !important;
}
