/*前端页面*/


:root {
    --main-color: #642f83; /**/
    --primary-color: #7a1c4a; /* 主色调 */
    --secondary-color: #003366; /* 辅助色 */
    --hover-color: #9d2b5a;
    --header-height: 167px; /* 根据实际测量值调整 */
    --logo-height: 100px; /* 实际测量值 */
    --nav-height: 59px; /* 实际测量值 */
}


/* 固定导航容器 */
.fixed-header {
    position: fixed;
    top: 0;
    width: 100%;
    background: white;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* 主体内容间距 */
.body-height {
    min-height: 100vh; /* 至少占满整个屏幕高度 */
    display: flex; /* 启用 Flexbox */
    flex-direction: column; /* 垂直排列子元素 */
    padding-top: var(--header-height);
}

/* 主内容区域自动填充剩余空间 */
.main-content {
    flex: 1; /* 关键：自动拉伸以填充剩余空间 */
    display: flex; /* 新增：启用 Flexbox */
    flex-direction: column; /* 垂直排列子元素 */
}

/*头部宽度*/
.custom-container {
    width: 100%;
    padding-left: 15%; /* 自定义左右间距 */
    padding-right: 15%;
    margin: 0 auto;
    box-sizing: border-box;
}




/*#region logo和标题部分 */
.header-container {
    display: flex;
    align-items: center;
}

.header-img {
    height: var(--logo-height);
    width: auto;
    margin-right: 10px;
}

.text-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: var(--logo-height);
}

    .text-container h2 {
        margin: 0;
        text-align: left;
    }

    .text-container p {
        font-size: 14px;
        margin: 0;
        text-align: left;
    }
/*#endregion */



/* #region 右侧按钮组样式 */
.btn-outline-danger {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

    .btn-outline-danger:hover {
        background: var(--primary-color);
        color: white;
    }

.btn-outline-info {
    border-color: var(--secondary-color);
    color: var(--secondary-color);
}

    .btn-outline-info:hover {
        background: var(--secondary-color);
        color: white;
    }
/*#endregion */





/*底部样式*/
.site-footer {
    background: var(--main-color);
    overflow: hidden;
    text-align: center;
    color: #fff;
    padding-bottom: 1rem;
    font-size: 18px;
    background: -webkit-linear-gradient(0deg, #3b1985 0%, #5e1985 45.53%, #642e82 100%);
}


/*#region 组件样式*/
.component {
    min-height: 200px;
    margin-bottom: 100px;
    opacity: 0; /* 初始透明 */
    transform: translateY(20px); /* 初始向下偏移 */
    transition: all 1.0s ease-out;
    will-change: transform, opacity;
}

    /* 进入视口时的激活状态 */
    .component.visible {
        opacity: 1;
        transform: translateY(0);
    }

/*组件标题与竖线*/
.title-section {
    position: relative;
    padding-left: 10px; /* 竖线与文字的间距 */
}

    .title-section h1 {
        padding-left: 25px; /* 新增左内边距，调整文字与竖线的间距 */
        position: relative;
        display: inline-block;
        font-size: 3rem;
        font-weight: normal;
    }

        .title-section h1::before {
            content: '';
            position: absolute;
            left: 0;
            top: 50%;
            transform: translateY(-50%); /* 垂直居中 */
            height: 90%; /* 竖线高度，可调整 */
            width: 4px; /* 竖线宽度 */
            background-color: var(--main-color); /* 竖线颜色，这里用紫色 */
        }
/*#endregion */

/*#region 导航样式*/
/* 修改导航栏容器样式 */
.navbar-container {
    padding-left: 0;
    padding-right: 0;
    width: 100%;
}

    .navbar {
        background: linear-gradient(to right, #ffffff 0%, #ffffff 100%);
        /*padding: 0.5rem 0;*/
        width: 100%;
    }

    /* 导航菜单不换行 */
    .navbar-collapse {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
    }

    .navbar-nav {
        display: inline-flex;
        flex-direction: row;
        flex-wrap: nowrap;
    }

    .nav-link {
        color: var(--secondary-color) !important;
        font-weight: 500;
        font-size: 1.1rem;
        padding: 0.5rem 0.6rem !important;
        position: relative;
        transition: all 0.3s ease;
        white-space: nowrap;
    }

        .nav-link:hover {
            color: var(--primary-color) !important;
            transform: translateY(-2px);
        }

        .nav-link::after {
            content: '';
            position: absolute;
            bottom: 0;
            left: 50%;
            width: 0;
            height: 3px;
            background: var(--primary-color);
            transition: all 0.3s ease;
        }

        .nav-link:hover::after {
            width: 100%;
            left: 0;
        }

    .active .nav-link {
        color: var(--primary-color) !important;
        font-weight: 600;
    }

        .active .nav-link::after {
            width: 100%;
            left: 0;
        }
/*#endregion */


/* 隐藏水平滚动条（可选） */
.navbar-collapse::-webkit-scrollbar {
    display: none;
}

/* 恢复Tab组件的默认样式
.tab-pane {
    scroll-margin-top: 0 !important;
}

    .tab-pane::before {
        display: none !important;
    }
*/

/* #region 限定只在.custom-pagination下的page-link生效 */
/*! Disable cache: 2024-03-15 */
.custom-pagination .page-link {
    color: var(--main-color);
}

.custom-pagination .page-item.active .page-link {
    background-color: var(--main-color);
    border-color: var(--main-color);
    color: white;
}

.custom-pagination .page-link:hover {
    color: var(--hover-color);
}
/*#endregion */



/* #region 新闻列表样式 */
.news-list-container {
    margin: 0;
    padding: 20px, 0;
}


.news-items {
    /*margin-top: 15px;*/
}

.news-item {
    padding: 16px 0;
    border-bottom: 1px solid var(--main-color);
}

.news-link {
    text-decoration: none !important; /* 移除所有状态下的下划线 */
    display: block;
    text-decoration: none;
    color: #333;
    transition: color 0.3s;
}

    .news-link:hover {
        text-decoration: none !important; /* 确保悬停时也无下划线 */
        color: var(--primary-color); /* 悬停 */
    }

.news-content {
    display: flex;
    align-items: center; /* 垂直居中 */
    justify-content: space-between; /* 标题靠左，日期靠右 */
    width: 100%;
}


.news-title {
    flex: 1; /* 允许标题占据剩余空间 */
    padding-right: 15px; /* 与日期保持间距 */
    white-space: nowrap; /* 防止标题换行 */
    overflow: hidden;
    text-overflow: ellipsis; /* 标题过长显示省略号 */

    font-size: 24px;
    font-weight: normal;
    line-height: 1.5;
    margin-bottom: 5px;
}

.news-date {
    font-size: 18px;
    margin-right: 10px;
}

.news-divider {
    height: 1px;
    background-color: #eaeaea;
    margin: 10px 0 0 0;
}
/*#endregion*/

/*#region 课程列表*/
.course-list {
    width: 100%;
    border-top: 1px solid #e0e0e0;
}

.course-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid #e0e0e0;
}

.course-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary-color);
    flex: 1;
}

.course-teacher {
    font-size: 14px;
    color: #666;
    margin-left: 30px; /* 与课程名称的间距 */
    flex: 0 0 200px; /* 固定宽度防止换行 */
}

.course-hours {
    font-size: 14px;
    color: #888;
    text-align: right;
    flex: 0 0 120px; /* 固定宽度 */
}
/*#endregion*/


/*#region 学生*/
.student-title {
    font-size: 30px;
}

.student-content {
    display: flex;
    align-items: center; /* 垂直居中 */
    justify-content: space-between; /* 标题靠左，箭头靠右 */
    width: 100%;
}


.student-year {
    flex: 1; /* 允许标题占据剩余空间 */
    padding-right: 15px; /* 与日期保持间距 */
    white-space: nowrap; /* 防止标题换行 */
    overflow: hidden;
    text-overflow: ellipsis; /* 标题过长显示省略号 */

    font-size: 24px;
    font-weight: normal;
    line-height: 1.5;
    margin-bottom: 5px;
}

/* 箭头样式 */
.student-toggle {
    color: var(--main-color);
    transition: transform 0.3s;
}

/* 学生姓名容器 */
.student-names {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding-top: 10px;
}

/* 学生姓名链接 */
.student-name {
    color: #6c757d;
    text-decoration: none !important;
    white-space: nowrap;
    transition: color 0.3s;
    padding-right: 5px;
}

    .student-name:hover {
        color: var(--primary-color);
        text-decoration: none !important;
    }

/* 折叠内容样式 */
.student-details {
    padding-top: 10px;
    padding-right: 10px;
}

/* 旋转箭头动画 */
[aria-expanded="true"] .student-toggle {
    transform: rotate(180deg);
}
/*#endregion*/

.pagination-item {
    cursor: pointer;
    position: relative;
    z-index: auto !important; /* 覆盖可能存在的样式 */
}
    /* 防止锚点样式影响 */
    .pagination-item::before {
        display: none !important;
    }



/*#region 内容*/
.publications-head {
    text-align: center;
    padding: 30px 0;
    margin-bottom: 30px;
}

.publications-title {
    font-size: 2.2em;
    margin-bottom: 5px;
    padding-bottom: 10px;
    border-bottom: 1px dashed #eee;
}

.publications-meta-info {
    color: #666;
    font-size: 0.9em;
    padding: 8px 20px;
    border: 1px dashed #eee;
    display: inline-block;
    margin-top: 5px;
}



.publications-label {
    font-weight: 500;
    /*color: #6c757d;*/
    margin-bottom: 0.5rem;
}

.publications-html {
    white-space: pre-line;
    line-height: 1.6;
    min-height: 100px;
}

.publications-abstract {
    text-indent: 2em;
    text-align: justify; /* 两端对齐 */
    text-justify: inter-word; /* 优化单词间距（英文内容有效） */
}

.book-html {
    text-align: justify; /* 两端对齐 */
    line-height: 1.6;
    min-height: 100px;
}

    /* 对每个段落应用首行缩进 */
    .book-html p {
        text-indent: 2em;
        margin: 0; /* 可选：移除段落间的默认间距 */
    }

.courses-content {
    /* white-space: pre-line;*/
    line-height: 1.6;
    min-height: 200px;
    
}

    .courses-content p {
        text-indent: 2em; /* 首行缩进2个字符 */
        text-align: justify; /* 两端对齐 */
        margin: 5px 0 0 0; /* 段落间距 */
        padding: 0; /* 清除默认的下边距 */
    }

        /* 第一个段落不需要上边距 */
        .courses-content p:first-child {
            margin-top: 0;
        }
        .courses-content p:last-child {
            margin-bottom: 1rem;
        }

/* 内容包装器 - 让底部导航始终在底部 */
.publications-wrapper {
    flex: 1; /* 填充剩余空间 */
    display: flex;
    flex-direction: column;
}

/* 主要内容区域 - 可滚动 */
.publications-content {
    flex: 1; /* 自动拉伸，必要时可滚动 */
    overflow-y: auto; /* 内容过多时添加滚动条 */
}

.publications-foot {
    margin-top: auto; /* 关键：将元素推到底部 */
    margin-bottom: 20px;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    padding: 10px 0;
    display: flex;
    flex-direction: column; /* 改为垂直排列 */
    gap: 8px; /* 行间距 */
    align-items: flex-start; /* 左对齐 */
}

.publications-link {
    color: var(--secondary-color);
    text-decoration: none;
}

    .publications-link:hover {
        color: var(--hover-color);
        text-decoration: underline;
    }
/*#endregion*/

/*#region 人员*/
/* 自定义样式 */
.people-header {
    margin-top: 40px;
    text-align: center;
    margin-bottom: 40px;
}

.people-name {
    color: var(--main-color);
}

.people-avatar {
    width: 150px;
    height: 200px;
    /*xborder-radius: 50%;*/
    object-fit: cover;
    /*border: 3px solid var(--primary-color);*/
}

.section-title {
    color: var(--secondary-color);
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 8px;
    margin: 30px 0 20px;
    font-size: 1.5em;
}

.sub-section {
    /*margin-left: 5px;*/
    font-size: 0.9em;
}

.paper-item, .patent-item, .monograph-item {
    margin: 10px 0;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 4px;
}

.content-link {
    color: #666;
    text-decoration: none;
}

    .content-link:hover {
        color: var(--hover-color);
        text-decoration: underline;
    }
/*#endregion*/


/* ========== 移动端适配 ========== */
@media (max-width: 768px) {
    /* 基础调整 */
    :root {
        --header-height: 120px;
        --logo-height: 60px;
        --nav-height: 45px;
        font-size: 14px;
    }

    .custom-container {
        padding: 0 5% !important;
    }

    /* 头部区域 */
    .header-container {
        padding: 10px 0;
    }

    .header-img {
        height: 50px;
    }

    .text-container h2 {
        font-size: 1.2rem !important;
    }

    .text-container p {
        font-size: 0.8rem !important;
    }

    .btn-group-vertical {
        flex-direction: row;
        width: 100%;
        margin-top: 10px;
    }

    .btn-custom {
        min-width: auto;
        width: 48%;
    }

    /* 导航栏 */
    .navbar-nav {
        flex-wrap: wrap;
        gap: 5px;
    }

    .nav-link {
        font-size: 0.9rem !important;
        padding: 0.3rem 0.5rem !important;
    }

    /* 内容区块 */
    .title-section h1 {
        font-size: 1.8rem !important;
        padding-left: 15px;
    }

        .title-section h1::before {
            height: 70%;
        }

    .news-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .news-title {
        font-size: 1rem !important;
        white-space: normal;
    }

    .course-item {
        flex-direction: column;
        align-items: flex-start;
    }

    /* 图片适配 */
    img {
        max-width: 100%;
        height: auto;
    }

    .people-avatar {
        width: 120px;
        height: 120px;
    }
}

/* ========== 动画增强 ========== */
@media (prefers-reduced-motion: no-preference) {
    .component {
        will-change: transform, opacity;
    }
}

/* ========== 打印样式 ========== */
@media print {
    .fixed-header, .btn-group-vertical {
        display: none !important;
    }

    .body-height {
        padding-top: 0;
    }
}



.compact-paragraphs p {
    margin: 4px 0; /* 上下间距设为5px（根据需要调整） */
    line-height: 1.5; /* 统一行高 */
    /*  text-indent: 2em; 保持首行缩进 */
}

    /* 可选：第一个段落不加顶部间距 */
    .compact-paragraphs p:first-child {
        margin-top: 0;
    }

    /* 可选：最后一个段落不加底部间距 */
    .compact-paragraphs p:last-child {
        margin-bottom: 0;
    }