/* ==========================================================================
   科研动态页面专属样式 (Scoped with .rsd-page)
   ========================================================================== */
/* common.css */
html,
body,
#app {
    width: 100%;
    min-height: 100%;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    overflow-x: hidden; /* 防止横向滚动条 */
    background: #fff;
}

* {
    box-sizing: border-box;
}

a {
    text-decoration: none;
}

/* 页面背景 */
.rsd-page {
    width: 100%;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    background-image: url("./images/research-bg.png");
    background-repeat: no-repeat;
    background-position: center top;
    background-size: cover;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    overflow-x: hidden;
}

/* 整体内容宽度 */
.rsd-page .rsd-container {
    width: calc(100% - 80px);
    max-width: 1380px;
    margin: 0 auto;
    padding: 40px 0 60px;
    box-sizing: border-box;
}

/* PC端左右布局 */
.rsd-page .rsd-layout {
    display: grid;
    grid-template-columns: 270px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

/* ==================== 左侧侧边栏 ==================== */
.rsd-page .rsd-sidebar {
    position: relative;
    /* 侧边栏本身透明，背景由整体页面背景提供 */
}

.rsd-page .rsd-sidebar-title {
    font-size: 30px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 24px 0;
    padding-left: 16px;
    position: relative;
    line-height: 1.2;
}

/* 侧边栏标题左侧竖线 */
.rsd-page .rsd-sidebar-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 30px;
    background-color: #123d9c;
    border-radius: 2px;
}

.rsd-page .rsd-sidebar-menu {
    display: flex;
    flex-direction: column;
}

.rsd-page .rsd-sidebar-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    font-size: 16px;
    color: #475467;
    text-decoration: none;
    border-bottom: 1px solid #eaf3ff;
    transition: all 0.3s ease;
    border-radius: 6px;
    margin-bottom: 4px;
}

.rsd-page .rsd-sidebar-link:last-child {
    border-bottom: none;
}

.rsd-page .rsd-sidebar-arrow {
    font-size: 18px;
    font-family: simsun, serif; /* 宋体箭头更贴近要求 */
    transition: transform 0.3s ease;
}

.rsd-page .rsd-sidebar-link:hover {
    color: #123d9c;
    background-color: #f5f9ff;
}

.rsd-page .rsd-sidebar-link:hover .rsd-sidebar-arrow {
    transform: translateX(4px);
}

.rsd-page .rsd-sidebar-link-active,
.rsd-page .rsd-sidebar-link-active:hover {
    background-color: #123d9c;
    color: #ffffff;
    border-bottom-color: transparent;
}

.rsd-page .rsd-sidebar-link-active .rsd-sidebar-arrow {
    color: #ffffff;
}

/* ==================== 右侧新闻列表 ==================== */
.rsd-page .rsd-main {
    background-color: transparent;
}

.rsd-page .rsd-main-header {
    border-bottom: 1px solid #eaf3ff;
    margin-bottom: 24px;
    padding-bottom: 16px;
}

.rsd-page .rsd-main-title {
    font-size: 30px;
    font-weight: 700;
    color: #111827;
    margin: 0;
    padding-left: 16px;
    position: relative;
    line-height: 1.2;
}

/* 主内容标题左侧竖线 */
.rsd-page .rsd-main-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 30px;
    background-color: #123d9c;
    border-radius: 2px;
}

.rsd-page .rsd-news-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.rsd-page .rsd-news-item {
    display: flex;
    align-items: center;
    background-color: #ffffff;
    border: 1px solid #dce7f5;
    border-radius: 10px;
    padding: 20px;
    gap: 24px;
    transition: box-shadow 0.3s ease;
    box-sizing: border-box;
}

.rsd-page .rsd-news-item:hover {
    box-shadow: 0 4px 16px rgba(18, 61, 156, 0.06);
}

.rsd-page .rsd-news-image-link {
    flex-shrink: 0;
    width: 320px;
    border-radius: 6px;
    overflow: hidden;
    text-decoration: none;
    outline: none;
}

.rsd-page .rsd-news-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    aspect-ratio: 16 / 9;
    transition: transform 0.5s ease;
}

.rsd-page .rsd-news-image-link:hover .rsd-news-image {
    transform: scale(1.03);
}

.rsd-page .rsd-news-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0; /* 防止文本溢出撑开 flex 容器 */
}

.rsd-page .rsd-news-date {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #667085;
    margin-bottom: 12px;
}

.rsd-page .rsd-calendar-icon {
    width: 16px;
    height: 16px;
    margin-right: 6px;
    color: #8c98a9;
}

.rsd-page .rsd-news-title {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 12px 0;
    line-height: 1.4;
}

.rsd-page .rsd-news-title a {
    color: #101828;
    text-decoration: none;
    transition: color 0.3s ease;
    outline: none;
}

.rsd-page .rsd-news-title a:hover {
    color: #123d9c;
}

.rsd-page .rsd-news-summary {
    font-size: 15px;
    line-height: 1.8;
    color: #667085;
    margin: 0;
    /* 多行文本截断 */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.rsd-page .rsd-news-arrow {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    background-color: #eaf3ff;
    color: #123d9c;
    border-radius: 50%;
    text-decoration: none;
    font-size: 18px;
    font-weight: bold;
    font-family: simsun, serif;
    transition: all 0.3s ease;
    outline: none;
}

.rsd-page .rsd-news-item:hover .rsd-news-arrow,
.rsd-page .rsd-news-arrow:hover {
    background-color: #d6e6ff;
}

.rsd-page .rsd-news-item:hover .rsd-news-arrow {
    transform: translateX(2px);
}

/* ==================== 响应式设计 ==================== */

/* 平板及小屏PC (768px - 1199px) */
@media screen and (max-width: 1199px) {
    .rsd-page .rsd-container {
        width: calc(100% - 40px);
        padding: 30px 0 50px;
    }

    .rsd-page .rsd-layout {
        grid-template-columns: 220px minmax(0, 1fr);
        gap: 20px;
    }

    .rsd-page .rsd-news-item {
        padding: 16px;
        gap: 16px;
    }

    .rsd-page .rsd-news-image-link {
        width: 240px;
    }

    .rsd-page .rsd-news-title {
        font-size: 20px;
    }
}

/* 手机端 (768px以下) */
@media screen and (max-width: 767px) {
    .rsd-page .rsd-container {
        width: calc(100% - 30px);
        padding: 24px 0 40px;
    }

    .rsd-page .rsd-layout {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .rsd-page .rsd-sidebar-menu {
        flex-direction: row;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 8px;
        gap: 8px;
    }
    
    /* 隐藏滚动条但保留滚动功能 */
    .rsd-page .rsd-sidebar-menu::-webkit-scrollbar {
        height: 4px;
    }
    .rsd-page .rsd-sidebar-menu::-webkit-scrollbar-thumb {
        background-color: #dce7f5;
        border-radius: 2px;
    }

    .rsd-page .rsd-sidebar-link {
        flex-shrink: 0;
        padding: 10px 16px;
        border-bottom: none;
        border: 1px solid #eaf3ff;
        border-radius: 20px; /* 移动端可以用稍圆的按钮形式便于点击 */
    }

    .rsd-page .rsd-sidebar-link-active {
        border-color: #123d9c;
    }

    .rsd-page .rsd-sidebar-arrow {
        display: none; /* 移动端横向菜单不显示右箭头 */
    }

    .rsd-page .rsd-news-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .rsd-page .rsd-news-image-link {
        width: 100%;
    }

    .rsd-page .rsd-news-arrow {
        align-self: flex-end;
    }
}
