/* 页面整体布局 */
.news-page {
    width: 1000px;
    margin: 35px auto;
}

/* 顶部标题栏 */
.news-header {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 18px 30px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fdf9 100%);
    border: 1px solid #d0e5d5;
    border-radius: 10px 10px 0 0;
    box-shadow: 0 2px 12px rgba(46, 139, 87, 0.06);
}

/* back-btn 样式 */
.back-btn {
    position: absolute;
    left: 30px;               /* 固定靠左 */
    color: #fff;
    text-decoration: none;
    font-size: 15px;
    padding: 8px 16px;
    background: #2e8b57;
    border-radius: 10px;
    transition: 0.2s;
    box-shadow: 0 2px 6px rgba(46, 139, 87, 0.3);
}

.back-btn:hover {
    transform: translateX(-4px);
    background: #1f6d38;
    box-shadow: 0 4px 12px rgba(46, 139, 87, 0.4);
}

.header-title {
    font-size: 50px;
    font-weight: 700;
    color: #1f6d38;
    text-align: center;
    margin: 0;
    letter-spacing: 6px;
    flex-shrink: 0;
    display: flex;
    align-items: center;      /* 垂直居中对齐 */
    gap: 10px;
}

/*内容区（左右布局） */
.news-card {
    background: #fff;
    border: 1px solid #d0e5d5;
    border-top: none;
    border-radius: 0 0 10px 10px;
    display: flex;
    min-height: 650px;
    box-shadow: 0 8px 32px rgba(46, 139, 87, 0.08);
    overflow: hidden;
}

/* 左侧：动态列表 */
.news-sidebar {
    width: 320px;
    background: linear-gradient(180deg, #f8fdf9 0%, #f0f9f2 100%);
    border-right: 1px solid #d0e5d5;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
}

.sidebar-title {
    font-size: 16px;
    color: #23412f;
    padding: 20px 24px;
    border-bottom: 2px solid #e0ece0;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-title::before {
    content: "";
    display: inline-block;
    width: 4px;
    height: 18px;
    background: #2E8B57;
    border-radius: 2px;
}

.news-list {
    list-style: none;
    flex: 1;
    padding: 8px 0;
    overflow-y: auto;
    max-height: 700px;
}

.news-list::-webkit-scrollbar {
    width: 4px;
}

.news-list::-webkit-scrollbar-track {
    background: transparent;
}

.news-list::-webkit-scrollbar-thumb {
    background: #c8e0cd;
    border-radius: 2px;
}

.news-list::-webkit-scrollbar-thumb:hover {
    background: #2E8B57;
}

.news-item {
    padding: 14px 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
    font-size: 14px;
    color: #555;
    line-height: 1.6;
    position: relative;
        
    /* 两行省略 */
    display: -webkit-box;
    -webkit-line-clamp: 2;           /* 最多显示2行 */
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-all;           /* 英文长单词也换行 */
}

.news-item:hover {
    background: rgba(46, 139, 87, 0.06);
    color: #2E8B57;
    border-left-color: rgba(46, 139, 87, 0.3);
}

.news-item.active {
    background: rgba(46, 139, 87, 0.1);
    border-left-color: #2E8B57;
    color: #23412f;
    font-weight: 600;
}

.news-item.active::after {
    content: "";
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    background: #2E8B57;
    border-radius: 50%;
}

/* 右侧：详细内容区 */
.news-detail {
    flex: 1;
    padding: 0;
    overflow-y: auto;
    max-height: 750px;
    background: #fff;
}

.news-detail::-webkit-scrollbar {
    width: 6px;
}

.news-detail::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.news-detail::-webkit-scrollbar-thumb {
    background: #c8e0cd;
    border-radius: 3px;
}

.news-detail::-webkit-scrollbar-thumb:hover {
    background: #2E8B57;
}

/* 封面图 */
.news-cover {
    height: auto;
    position: relative;
    overflow: hidden;
}

.news-cover img {
    width: 100%;
    height: auto;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.news-cover:hover img {
    transform: scale(1.03);
}

.news-cover::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    /* background: linear-gradient(to top, rgba(0,0,0,0.4), transparent); */
}

/* 标题栏 */
.news-title-bar {
    padding: 24px 40px;
    background: linear-gradient(135deg, #2E8B57 0%, #1f6d38 100%);
    border-bottom: 3px solid #1a5c30;
}

/* 标题文字 */
.news-title {
    font-size: 26px;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    line-height: 1.4;
    letter-spacing: 2px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* 正文 */
.news-content {
    padding: 10px 40px 50px;
    text-align: center;
}

.news-content p {
    font-size: 16px;
    line-height: 2;
    color: #444;
    margin-bottom: 20px;
    text-align: justify;
}

.news-content img {
    width: auto;
    border-radius: 5px;
    margin: 24px 0;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

/* 引用 */
.news-content blockquote {
    margin: 28px 0;
    padding: 22px 28px;
    background: #F4FBF6;
    border-left: 5px solid #2E8B57;
    border-radius: 0 12px 12px 0;
    color: #2E8B57;
    font-size: 18px;
    line-height: 1.8;
    font-style: italic;
}

/* 空状态 */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 400px;
    color: #aaa;
    font-size: 16px;
}

.empty-state svg {
    width: 80px;
    height: 80px;
    margin-bottom: 20px;
    opacity: 0.3;
}

/* 加载动画 */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 400px;
    color: #888;
}

.loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #e0e0e0;
    border-top-color: #2E8B57;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 12px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.news-meta {
    color: #888;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding: 8px 16px;
}

.news-meta .meta-icon {
    width: 30px;
    height: 30px;
    object-fit: cover;
}

.news-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.inline-image{
    text-align: center;
}

/* 单张图片：单独一排，较大 */
.news-img-single {
    margin: 24px 0;
    text-align: center;
}

.news-img-single img {
    max-width: 100%;
    max-height: 350px;
    width: auto;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

/* 两张图片：并排 */
.news-img-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin: 20px 0;
}

.news-img-pair img {
    width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    box-sizing: border-box;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

/* 大屏幕（台式机1921px到2560px） */
@media (max-width: 1920px) and (min-width: 1200px) {
    .news-page {
        width: 65%;
    }
}

@media (max-width: 1910px) and (min-width: 1000px) {
    .news-page {
        width: 85%;
    }
    .news-sidebar {
        width: 280px;
    }
}

/* 在小于1000px的屏幕上会出现横向滚动条 */
@media (max-width: 1000px) {
    .news-page {
        width: 100%;
        margin: 0;
    }
}