/* 新闻详情页样式 */

/* 面包屑导航 */
.nd-breadcrumb {
    padding: 20px 0;
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.nd-breadcrumb-content {
    font-size: 14px;
    color: #6c757d;
}

.nd-breadcrumb-content a {
    color: #6c757d;
    text-decoration: none;
}

.nd-breadcrumb-content a:hover {
    color: #b91c1c;
    text-decoration: underline;
}

.nd-breadcrumb-current {
    font-weight: 500;
    color: #343a40;
}

/* 主体内容 */
.nd-main {
    padding: 30px 0;
}

.nd-wrapper {
    display: flex;
    gap: 30px;
    flex-direction: row-reverse;
}

/* 左侧内容区 */
.nd-content {
    flex: 0 0 80%;
}

/* 文章样式 */
.nd-article {
    background-color: #fff;
    border-radius: 4px;
    padding: 30px;
    margin-bottom: 30px;
}

.nd-title {
    font-size: 28px;
    font-weight: 700;
    color: #343a40;
    text-align: center;
    margin: 0 0 20px 0;
    line-height: 1.4;
}

.nd-meta {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e9ecef;
}

.nd-date {
    font-size: 14px;
    color: #6c757d;
}

.nd-body {
    font-size: 16px;
    line-height: 1.8;
    color: #343a40;
}

.nd-body p {
    margin-bottom: 20px;
    text-indent: 2em;
}

.nd-image {
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 20px 0;
    display: block;
}

.nd-body-image {
    display: flex;
    justify-content: center;
    margin: 30px 0;
    width: 100%;
}

.nd-body-image img {
    width: 100%;
    max-width: 80%;
    height: auto;
    border-radius: 4px;
    display: block;
}

/* 上一篇下一篇 */
.nd-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-top: 1px solid #e9ecef;
    margin-top: 30px;
}

.nd-prev,
.nd-next {
    flex: 1;
}

.nd-next {
    text-align: right;
}

.nd-pagination-label {
    font-size: 14px;
    color: #6c757d;
}

.nd-pagination-link {
    font-size: 14px;
    color: #b91c1c;
    text-decoration: none;
    transition: color 0.3s ease;
}

.nd-pagination-link:hover {
    color: #991b1b;
    text-decoration: underline;
}

/* 右侧侧边栏 */
.nd-sidebar {
    flex: 0 0 20%;
    max-width: 250px;
    background-color: #d93025;
    border-radius: 4px;
    overflow: hidden;
    height: fit-content;
}

.nd-sidebar-header {
    padding: 20px;
    text-align: center;
    color: #fff;
    background-color: #d93025;
}

.nd-sidebar-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
}

.nd-sidebar-list {
    background-color: #fff;
}

.nd-sidebar-item {
    border-bottom: 1px solid #e9ecef;
}

.nd-sidebar-item:last-child {
    border-bottom: none;
}

.nd-sidebar-link {
    display: block;
    padding: 15px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.nd-sidebar-link:hover {
    background-color: #f8f9fa;
}

.nd-sidebar-title {
    font-size: 14px;
    font-weight: 500;
    color: #343a40;
    margin: 0 0 8px 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nd-sidebar-link:hover .nd-sidebar-title {
    color: #b91c1c;
}

.nd-sidebar-date {
    font-size: 12px;
    color: #6c757d;
}

/* 移动端适配 */
@media (max-width: 991px) {
    .nd-wrapper {
        flex-direction: column;
    }

    .nd-content {
        flex: 0 0 100%;
    }

    .nd-sidebar {
        flex: 0 0 100%;
        max-width: 100%;
        margin-top: 30px;
    }

    .nd-title {
        font-size: 24px;
    }

    .nd-article {
        padding: 20px;
    }
}

@media (max-width: 767px) {
    .nd-breadcrumb {
        padding: 15px 0;
    }

    .nd-main {
        padding: 20px 0;
    }

    .nd-title {
        font-size: 20px;
    }

    .nd-body {
        font-size: 15px;
    }

    .nd-pagination {
        flex-direction: column;
        gap: 15px;
    }

    .nd-prev,
    .nd-next {
        text-align: center;
    }

    .nd-sidebar-list {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1px;
        background-color: #e9ecef;
    }

    .nd-sidebar-item {
        border-bottom: none;
        background-color: #fff;
    }
}

/* 小屏移动端适配 */
@media (max-width: 480px) {
    .nd-breadcrumb-content {
        font-size: 13px;
    }

    .nd-title {
        font-size: 18px;
    }

    .nd-article {
        padding: 15px;
    }

    .nd-body {
        font-size: 14px;
    }

    .nd-sidebar-list {
        grid-template-columns: 1fr;
    }

    .nd-sidebar-title {
        font-size: 13px;
    }
}
