/* ========================================
   文章详情页样式 - detail.css
   支持有图片和无图片两种形式
   仅文章内图片生效全屏居中，p/span标签统一正文样式
   ======================================== */

/* ==================== 页面主体 ==================== */
.article-main {
    min-height: 100vh;
    padding: 6rem 0;
    background-color: #fff;
}
.article-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 40px;
}
/* 已删除全局img样式，避免影响网站其他区域图片 */

/* ==================== 文章标题 ==================== */
.article-title {
    font-size: 28px;
    font-weight: 600;
    color: #333;
    text-align: center;
    margin-bottom: 20px;
    line-height: 1.5;
}

/* ==================== 文章元信息 ==================== */
.article-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    font-size: 14px;
    color: #666;
    padding-bottom: 25px;
    border-bottom: 3px solid #1cb6c1;
    margin-bottom: 35px;
}

.article-meta span {
    white-space: nowrap;
}

/* ==================== 文章正文 ==================== */
.article-content {
    font-family: "仿宋_GB2312", FangSong_GB2312, FangSong, serif !important; /* 强制统一仿宋GB2312字体 */
    font-size: 16px !important; /* 3号字体（16px），强制生效 */
    color: #333;
    line-height: 1.4 !important; /* 强制1.4倍行高 */
    text-align: justify;
}

.article-content p {
    margin-bottom: 20px;
    /* 继承并强制生效，确保p标签样式统一 */
    font-family: inherit !important;
    font-size: inherit !important;
    line-height: inherit !important;
}

.article-content p:last-child {
    margin-bottom: 0;
}

/* 新增：span标签强制继承正文样式，与p标签保持一致 */
.article-content span {
    font-family: inherit !important;
    font-size: inherit !important;
    line-height: inherit !important;
    color: inherit !important;
}

/* ==================== 文章图片样式 ==================== */
/* 仅作用于.article-content内部的所有图片，精准生效不污染全局 */
.article-content img {
    max-width:100% !important; /* 全屏显示 */
    height:auto !important;
    display: block !important; /* 确保居中生效 */
    margin: 0 auto !important; /* 水平居中 */
    cursor: zoom-in !important; /* 提示可点击放大，强制生效 */
}

.article-content .article-image {
    display: block !important;
    width: 100% !important; /* 强制全屏，替代原max-width */
    margin: 25px auto !important;
    border-radius: 8px;
}

.article-content .image-wrapper {
    text-align: center !important;
    margin: 25px 0 !important;
    width: 100% !important; /* 图片容器全屏，强制生效 */
}

.article-content .image-wrapper img {
    width: 100% !important; /* 图片容器内的图片全屏，强制生效 */
    height: auto !important;
}

.article-content .image-caption {
    font-size: 14px;
    color: #888;
    margin-top: 10px;
    text-align: center;
    text-indent: 0;
    font-family: "仿宋_GB2312", FangSong_GB2312, FangSong, serif !important; /* 图片说明强制统一字体 */
}

/* ==================== 上一篇/下一篇导航 ==================== */
.article-nav {
    margin-top: 60px;
    padding-top: 30px;
    border-top: 1px solid #eee;
}

.nav-item {
    display: flex;
    align-items: baseline;
    margin-bottom: 15px;
    font-size: 15px;
    line-height: 1.6;
}

.nav-item:last-child {
    margin-bottom: 0;
}

.nav-label {
    color: #333;
    flex-shrink: 0;
}

.nav-link {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
    cursor: pointer;
}

.nav-link:hover {
    color: #1cb6c1;
}

/* ==================== 响应式布局 ==================== */
@media screen and (max-width: 768px) {
    .article-main {
        padding: 6rem 0 60px;
    }

    .article-container {
        padding: 0 20px;
    }

    .article-title {
        font-size: 22px;
    }

    .article-meta {
        flex-wrap: wrap;
        gap: 10px 20px;
    }

    .article-content {
        font-size: 16px !important; /* 移动端强制保持3号字体 */
        line-height: 1.4 !important; /* 移动端强制保持1.4行高 */
    }
}

@media screen and (max-width: 480px) {
    .article-title {
        font-size: 20px;
    }

    .article-meta {
        flex-direction: column;
        gap: 8px;
    }

    .article-content {
        font-size: 16px !important; /* 小屏强制保持3号字体 */
    }

    .nav-item {
        flex-direction: column;
        gap: 5px;
    }
}
/* 图片预览遮罩层 */
.image-preview-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: none; /* 默认隐藏 */
    justify-content: center;
    align-items: center;
    z-index: 9999;
    cursor: zoom-out;
}

/* 预览大图样式 */
.image-preview-img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    transition:transform 0.2s ease;
    transform-origin:center center;
    border-radius: 8px;
    position:relative;
    cursor:grab;//拖动光标提示
}
.image-preview-img:active{
     cursor:grabbing;//按住拖动时的光标
}