/* 富文本内容中的图片响应式处理 */
.news-content img,
#editor-text-area img,
#content img {
    max-width: 100% !important;
    /* 图片最大宽度不超过容器 */
    height: auto !important;
    /* 保持图片比例 */
    display: block;
    /* 块级元素 */
    margin: 10px auto;
    /* 居中显示，上下间距 */
    border-radius: 0;
    /* 去除圆角，去卡片化 */
    box-shadow: none;
    /* 移除阴影效果 */
}

/* 富文本编辑器容器样式优化 */
.news-content,
#editor-text-area {
    font-size: 16px;
    /* 内容字体大小 */
    color: #555;
    /* 内容颜色 */
    line-height: 1.6;
    /* 行高 */
    margin-bottom: 20px;
    /* 下边距 */
    max-width: 100%;
    /* 最大宽度为100% */
    overflow-wrap: break-word;
    /* 处理长单词的换行 */
    word-wrap: break-word;
    /* 处理长单词的换行 */
    word-break: break-all;
    /* 强制换行 */
    overflow-x: auto;
    /* 水平溢出时显示滚动条 */
    flex: 1;
    /* 允许内容区域自动扩展 */
}

/* 富文本内容中的其他元素响应式处理 */
.news-content table,
#editor-text-area table {
    max-width: 100% !important;
    table-layout: fixed;
    word-wrap: break-word;
}

.news-content video,
#editor-text-area video {
    max-width: 100% !important;
    height: auto !important;
}

.news-detail-container {
    max-width: 1400px;
    /* 增加最大宽度 */
    margin: 40px auto 20px;
    /* 居中 */
    background-color: #fff;
    /* 背景颜色 */
    /* 去除卡片化设计 */
    overflow-x: hidden;
    /* 防止内容水平溢出 */
    min-height: calc(100vh - 23.45rem);
    display: flex;
    flex-direction: column;
    padding: 20px;
    box-sizing: border-box;
}

.news-header {
    display: flex;
    /* 使用 Flexbox 布局 */
    align-items: center;
    /* 垂直居中对齐 */
    justify-content: center;
    /* 水平居中 */
}

.return-icon {
    font-size: 24px;
    /* 图标大小 */
    color: #007bff;
    /* 图标颜色 */
    margin-right: 10px;
    /* 图标与标题之间的间距 */
    cursor: pointer;
    /* 鼠标悬停时显示手型 */
    transition: color 0.3s;
    /* 添加颜色变化效果 */
}

.return-icon:hover {
    color: #0056b3;
    /* 悬停时的颜色 */
}

.news-title {
    font-size: 32px;
    /* 增加标题字体大小 */
    font-weight: bold;
    /* 加粗 */
    color: #333;
    /* 标题颜色 */
    text-align: center;
    /* 标题居中对齐 */
    flex: 1;
    /* 使标题占据剩余空间 */
}

.news-meta {
    font-size: 16px;
    /* 增加元数据字体大小 */
    color: #6c757d;
    /* 使用更柔和的颜色 */
    text-align: center;
    /* 居中对齐 */
}

.news-date {
    font-style: normal;
    /* 正常字体，去除斜体 */
    margin-top: 5px;
    /* 上边距 */
}

/* 上一条/下一条导航样式 - 去卡片化设计 */
.news-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: auto;
    /* 自动推到底部 */
    padding-top: 40px;
    border-top: 1px solid #f0f0f0;
    gap: 30px;
}

.nav-item {
    flex: 1;
    max-width: 48%;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 12px 0;
    text-decoration: none;
    color: #333;
    transition: all 0.2s ease;
    position: relative;
}

.nav-link:hover {
    color: #007bff;
}

.nav-link:hover .nav-title {
    color: #007bff;
}

.nav-link.disabled {
    color: #ccc;
    cursor: not-allowed;
    opacity: 0.5;
}

.nav-link.disabled:hover {
    color: #ccc;
}

.nav-link.disabled:hover .nav-title {
    color: #ccc;
}

.prev-news .nav-link {
    text-align: left;
    justify-content: flex-start;
}

.next-news .nav-link {
    text-align: right;
    justify-content: flex-end;
}

.nav-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.nav-label {
    font-size: 12px;
    color: #999;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color 0.2s ease;
}

.nav-link:hover .nav-label {
    color: #007bff;
}

.nav-title {
    font-size: 15px;
    font-weight: 500;
    line-height: 1.5;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    transition: color 0.2s ease;
}

.nav-link i {
    font-size: 16px;
    color: #999;
    margin: 0 12px;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.prev-news .nav-link i {
    margin-right: 12px;
    margin-left: 0;
}

.next-news .nav-link i {
    margin-left: 12px;
    margin-right: 0;
    order: 1;
    /* 确保图标在最后 */
}

.nav-link:hover i {
    color: #007bff;
    transform: translateX(0);
}

.prev-news .nav-link:hover i {
    transform: translateX(-3px);
}

.next-news .nav-link:hover i {
    transform: translateX(3px);
}

@media (max-width: 768px) {
    .news-detail-container {
        margin: 0 auto 10px !important;
        /* 移动端去除边框 */
        border: none;
        padding: 15px;
    }

    .news-title {
        font-size: 24px;
        /* 移动端减小标题字体 */
    }

    .news-content,
    #editor-text-area {
        font-size: 14px;
        /* 移动端减小字体 */
    }

    /* 移动端图片额外优化 */
    .news-content img,
    #editor-text-area img,
    #content img {
        margin: 8px auto;
        /* 移动端减小图片间距 */
    }

    /* 移动端导航样式优化 - 保持一行显示 */
    .news-navigation {
        flex-direction: row;
        /* 保持一行显示 */
        gap: 10px;
        /* 减小间距 */
        padding-top: 30px;
    }

    .nav-item {
        max-width: 48%;
        flex: 1;
    }

    .nav-link {
        padding: 8px 0;
        justify-content: flex-start;
    }

    .next-news .nav-link {
        justify-content: flex-end;
        text-align: right;
    }

    .next-news .nav-link i {
        order: 1;
        /* 确保图标在文字后面 */
        margin-left: 8px;
        margin-right: 0;
    }

    .nav-title {
        font-size: 12px;
        /* 移动端减小字体 */
        -webkit-line-clamp: 1;
        /* 移动端只显示一行 */
    }

    .nav-label {
        font-size: 10px;
        /* 移动端减小标签字体 */
    }

    .nav-link i {
        font-size: 12px;
        /* 移动端减小图标 */
        margin: 0 8px;
    }

    .prev-news .nav-link i {
        margin-right: 8px;
        margin-left: 0;
    }
}

@media (min-width: 1536px) and (max-width: 1900px) {
    .news-detail-container {
        max-width: 1200px;
    }
}

@media (max-width: 1400px) and (min-width: 1024px) {

    .news-detail-container,
    .common-footer-content {
        max-width: 1200px;
    }

    .news-title {
        font-size: 28px;
    }
}