/* 语言切换按钮布局 */
.lang-switch {
    position: absolute;
    top: 22px;
    right: 20px;
    font-size: 1.0rem;
    z-index: 1000;
    color: black;
    opacity: 0.7;
}

.lang-btn {
    background: none;
    border: none; /* 去掉边框 */
    color: black;
    padding: 5px;
    cursor: pointer;
    transition: color 0.3s ease;
    font-size: 1.0rem;
    opacity: 0.7;
}

.lang-btn:hover {
    color: #0073aa; /* 按钮悬停时的颜色 */
}

/* 移动端适配 */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        text-align: center;
        padding: 15px 10px;
        position: relative;
        min-height: 80px; /* 确保有足够高度容纳两个元素 */
        }
     .lang-switch {
        position: static; /* 取消绝对定位 */
        margin-top: 5px;
        text-align: center;
        width: 100%;
     } 
    .logo {
        width: 100%;
        margin-bottom: 10px;
     }
    
    .logo h1 {
        font-size: 1.5rem; /* 移动端缩小标题字体 */
        margin: 0;
        line-height: 1.2;
     }
     .lang-btn {
        font-size: 0.9rem;
        padding: 3px 8px;
    }
}  
        
  /* 超小屏幕设备进一步优化 */
@media (max-width: 480px) {
    .header-container {
        min-height: 70px;
        padding: 10px 5px;
    }
    
    .logo h1 {
        font-size: 1.3rem;
    }
    
    .lang-switch {
        margin-top: 3px;
    }
    
    .lang-btn {
        font-size: 0.85rem;
        padding: 2px 6px;
    }
}

/* 中等屏幕调整（平板等） */
@media (min-width: 769px) and (max-width: 1024px) {
    .header-container {
        padding: 5px 15px;
    }
    
    .logo h1 {
        font-size: 1.6rem;
    }
    
    .lang-switch {
        right: 15px;
        top: 20px;
    }
}      

/* 新闻和研究亮点并排布局 */
.news-highlights {
    display: flex;
    gap: 30px;
    margin-bottom: 40px;
    align-items: flex-start; /* 改为顶部对齐，防止拉伸 */
}

.news-container, .highlights-container {
    flex: 1;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    padding: 25px 30px 30px;
    display: flex;
    flex-direction: column;
    height: 450px; /* 固定容器高度 */
    overflow: hidden; /* 防止内容溢出 */
}

.news-container h3, .highlights-container h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: var(--primary-color);
    font-size: 1.4rem;
    flex-shrink: 0; /* 防止标题被压缩 */
}

/* 新闻区域样式 */
.news-scroll {
    height: 350px; /* 固定高度 */
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    border-radius: 6px;
    transition: all 0.3s ease;
    border: none;
    /* 完全隐藏滚动条 */
    scrollbar-width: none;
    -ms-overflow-style: none;
    flex-grow: 1; /* 填充可用空间 */
}

/* 隐藏Webkit浏览器的滚动条 */
.news-scroll::-webkit-scrollbar {
    display: none;
}

/* 滚动时的视觉反馈 */
.news-scroll.scrolling {
    box-shadow: inset 0 0 10px rgba(52, 152, 219, 0.1);
}

.news-content {
    padding: 10px 5px;
}

.news-item {
    background: linear-gradient(to right, #f8f9fa, #e9ecef);
    padding: 18px;
    margin-bottom: 15px;
    border-radius: 10px;
    box-shadow: 0 3px 6px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border-left: 4px solid #3498db;
}

.news-item:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
    background: linear-gradient(to right, #e3f2fd, #bbdefb);
}

.news-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.news-date {
    font-weight: bold;
    color: #e74c3c;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 8px;
    }

.news-text {
    color: var(--text-color);
    line-height: 1.5;
    font-size: 0.95rem;
}

/* 滚动提示 */
.scroll-indicator {
    margin-top: 10px;
    text-align: center;
    flex-shrink: 0; /* 防止提示被压缩 */
}

.scroll-hint {
    font-size: 0.8rem;
    color: var(--text-light);
    font-style: italic;
}

/* 滚动边界效果 */
.news-scroll::before,
.news-scroll::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 20px;
    pointer-events: none;
    z-index: 2;
}

.news-scroll::before {
    top: 0;
    background: linear-gradient(to bottom, white, transparent);
}

.news-scroll::after {
    bottom: 0;
    background: linear-gradient(to top, white, transparent);
}

/* 研究亮点区域样式 */
.carousel {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    flex-grow: 1; /* 填充可用空间 */
    height: 350px; /* 固定高度 */
}

.carousel-inner {
    display: flex;
    transition: transform 0.5s ease;
    height: 100%;
}

.carousel-item {
    min-width: 100%;
    position: relative;
    height: 100%;
}

.carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 保持图片比例，同时填充整个容器 */
    border-radius: 6px;
}

.carousel-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    color: white;
    padding: 20px;
}

.carousel-controls {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background-color 0.3s;
}

.carousel-dot.active {
    background-color: white;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .news-highlights {
        flex-direction: column;
    }
    
    .news-container, .highlights-container {
        height: auto; /* 移动端恢复自动高度 */
        min-height: 400px; /* 设置最小高度 */
    }
    
    .news-scroll {
        height: 280px;
    }
    
    .carousel {
        height: 250px; /* 移动端调整轮播图高度 */
    }
    
    .carousel-item img {
        height: 200px;
    }
    
    .news-item {
        padding: 10px;
        margin-bottom: 12px;
        padding-bottom: 12px;
    }
    
    .news-text {
        font-size: 0.9rem;
    }
}

/* 小屏幕设备 */
@media (max-width: 480px) {
    .news-scroll {
        height: 250px;
    }
    
    .carousel {
        height: 200px;
    }
    
    .carousel-item img {
        height: 150px;
    }
}

/* 作者姓名高亮样式 */
.author-highlight {
    font-weight: 700;
}

/* 研究活动样式 */
.research-activities {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    padding: 30px;
    margin-bottom: 40px;
}

.activity-section {
    margin-bottom: 30px;
}

.activity-section:last-child {
    margin-bottom: 0;
}

.activity-section h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.activity-list {
    list-style: none;
}

.activity-list li {
    margin-bottom: 10px;
    padding-left: 20px;
    position: relative;
}

.activity-list li::before {
    content: '•';
    color: var(--secondary-color);
    font-weight: bold;
    position: absolute;
    left: 0;
}

/* 上课样式 */
.teaching {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    padding: 30px;
    margin-bottom: 40px;
}

.courses-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.course-item {
    margin-bottom: 25px;
    padding-left: 25px;
    position: relative;
}

.course-item:last-child {
    margin-bottom: 0;
}

.course-item::before {
    content: '•';
    color: var(--secondary-color);
    font-weight: bold;
    position: absolute;
    left: 0;
}

.course-name {
    color: var(--primary-color);
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 8px;
    margin-top: 0;
}

.course-description {
    color: var(--text-color);
    line-height: 1.6;
    margin-bottom: 0;
    font-size: 0.95rem;
}


/* 响应式设计 */
@media (max-width: 768px) {
    .course-item {
        padding-left: 20px;
        margin-bottom: 20px;
    }
    
    .course-name {
        font-size: 1.1rem;
    }
    
    .course-description {
        font-size: 0.9rem;
    }
}

/* 学生样式 */
.students {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    padding: 30px;
    margin-bottom: 40px;
}

.student-section {
    margin-bottom: 40px;
}

.student-section:last-child {
    margin-bottom: 0;
}

.student-section h3 {
    color: var(--primary-color);
    margin-bottom: 25px;
    font-size: 1.4rem;
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 10px;
}

.student-subcategory {
    color: var(--secondary-color);
    margin: 25px 0 15px 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.student-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.student-card {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

.student-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    background-color: white;
}

.student-photo {
    width: 120px;
    height: 120px;
    margin: 0 auto 15px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--secondary-color);
}

.student-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.student-info {
    flex: 1;
}

.student-name {
    color: var(--primary-color);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 10px;
    margin-top: 0;
}

.student-description {
    color: var(--text-color);
    line-height: 1.5;
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.graduation-info {
    color: var(--text-light);
    font-size: 0.85rem;
    font-style: italic;
    margin-bottom: 0;
}

/* 学生链接样式 */
.student-link {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 1px 3px;
    border-radius: 2px;
}

.student-link:hover {
    color: var(--primary-color);
    background-color: rgba(52, 152, 219, 0.1);
    text-decoration: underline;
}

/* 学生页面样式 */
.student-detail-page {
            max-width: 1200px;
            margin: 0 auto;
            padding: 40px 20px;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            text-align: center;
        }
        
.student-image-wrapper {
            width: 200px;
            height: 250px;
            margin: 10px auto 20px;
            display: flex;
            justify-content: center;
            align-items: center;
            overflow: hidden;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
        }
        
.student-image-wrapper img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            display: block;
        }
        
.student-content {
            max-width: 800px;
            text-align: center;
        }
        
.student-intro-text {
            text-align: justify;
            line-height: 1.8;
            margin: 20px 0;
        }

/* 响应式设计 */
@media (max-width: 768px) {
    .student-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
    }
    
    .student-card {
        padding: 15px;
    }
    
    .student-photo {
        width: 100px;
        height: 100px;
    }
    .student-detail-page {
        padding: 20px 15px;
    }
    .student-image-wrapper {
       width: 180px;
       height: 225px; 
    }
}

@media (max-width: 480px) {
    .student-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

/* 联系表单样式 */
.contact-section {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    padding: 30px;
}

.contact-form {
    background-color: none;
    border-radius: 8px;
    box-shadow: 0 0 0 0;
    padding: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.form-control:focus {
    outline: none;
    border-color: var(--secondary-color);
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}


/* 新增：按钮容器右对齐 */
.form-button-container {
    display: flex;
    justify-content: flex-end; /* 将按钮推到右侧 */
    margin-top: 10px;
}

.btn {
    background-color: var(--secondary-color);
    text-decoration: none;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #2980b9;
}



/* 小节描述样式 */
.section-intro {
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--text-color);
    margin-bottom: 25px;
    text-align: justify;
}

/* 介绍文本样式 */
.section-intro {
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--text-color);
    margin-bottom: 25px;
    text-align: justify;
}


/* 个人资料链接样式 */
.profile-link {
    color: black;
    text-decoration: none;
    font-weight: 500;
    font-style: italic;
    transition: color 0.3s;
}

.profile-link:hover {
    color: blue;
    text-decoration: underline;
}

.download-link {
    color: blue;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 2px 4px;
    border-radius: 3px;
}

.download-link:hover {
    color: var(--primary-color);
    background-color: rgba(52, 152, 219, 0.1);
    text-decoration: underline;
}

/* 出版物链接样式 */
.content-link {
    color: black;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.content-link:hover {
    color: blue;
    text-decoration: underline;
}

