/* 团队页面特定样式 */

.team-page {
    padding: 30px 0;
    background-color: #fff;
}

.page-title {
    text-align: center;
    margin-bottom: 40px;
    font-size: 2.8rem;
    color: #003366;
    font-weight: bold;
}

/* 黄富强教授详细介绍 */
.professor-detail {
    margin-bottom: 50px;
    padding: 30px;
    background-color: #f8f9fa;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    max-width: 1300px;
    margin: 0 auto 50px auto;
    border-left: 5px solid #003366;
}

.professor-detail h2 {
    color: #003366;
    margin-bottom: 25px;
    font-size: 2.2rem;
    text-align: center;
    font-weight: bold;
}

.professor-profile-link {
    text-decoration: none !important;
    color: inherit;
    display: block;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 12px;
    overflow: hidden;
}

/* 确保所有链接元素都没有下划线 */
.professor-profile-link:hover,
.professor-profile-link:focus,
.professor-profile-link:visited {
    text-decoration: none !important;
    color: inherit;
}

.professor-profile-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0,51,102,0.15);
}

.professor-profile {
    display: flex;
    gap: 30px;
    align-items: flex-start;
    margin-bottom: 20px;
    justify-content: center;
    position: relative;
}

/* 添加点击提示图标 */
.professor-profile::after {
    content: '↗';
    position: absolute;
    top: 10px;
    right: 10px;
    background: #003366;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 10;
}

.professor-profile-link:hover .professor-profile::after {
    opacity: 1;
}

.professor-photo-large {
    flex: 0 0 220px;
    height: 280px;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.professor-photo-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.professor-info-large {
    flex: 1;
    max-width: 800px;
}

.professor-info-large h3 {
    color: #003366;
    margin-bottom: 10px;
    font-size: 1.8rem;
}

.professor-title {
    color: #666;
    font-weight: bold;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.professor-email {
    color: #003366;
    margin-bottom: 20px;
    font-size: 1rem;
}

.professor-bio-long p {
    color: #666;
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 15px;
}

/* 团队介绍 */
.team-intro {
    margin-bottom: 50px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.team-intro h2 {
    color: #003366;
    margin-bottom: 20px;
    font-size: 2rem;
}

.team-intro p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #666;
}

/* 团队成员 */
.team-members {
    margin-bottom: 50px;
}

.team-members h2 {
    color: #003366;
    margin-bottom: 30px;
    font-size: 2.2rem;
    text-align: center;
}

.member-category {
    margin-bottom: 40px;
}

.member-category h3 {
    color: #003366;
    margin-bottom: 25px;
    font-size: 1.8rem;
    padding-bottom: 10px;
    border-bottom: 2px solid #003366;
}

.members-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); /* 增加最小宽度以适应更多信息 */
    gap: 30px;
    margin-bottom: 20px;
}

.member-card {
    display: flex;
    background-color: #fff;
    border-radius: 10px; /* 增加圆角 */
    box-shadow: 0 4px 20px rgba(0,0,0,0.1); /* 增强阴影效果 */
    overflow: hidden;
    transition: all 0.3s ease; /* 增加过渡效果 */
    height: 220px; /* 统一设置固定高度 */
}

.member-card:hover {
    transform: translateY(-5px); /* 增加悬停效果 */
    box-shadow: 0 8px 30px rgba(0,0,0,0.15); /* 增强悬停阴影 */
}

/* 适配电脑端比例的团队成员图片 */
.member-photo {
    flex: 0 0 165px; /* 增加图片宽度 */
    height: auto;
    overflow: hidden;
    position: relative;
    aspect-ratio: 4 / 5; /* 调整为4:5比例，减少细长感 */
    border-right: 1px solid #eee; /* 添加分隔线 */
}

.member-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 保持图片比例并填充容器 */
}

.member-info {
    flex: 1;
    padding: 25px; /* 增加内边距 */
}

.member-info h4 {
    color: #003366;
    margin-bottom: 12px; /* 调整底部边距 */
    font-size: 1.4rem; /* 增大字体 */
    font-weight: 600; /* 增加字重 */
    word-wrap: break-word; /* 允许长单词换行 */
    word-break: break-word; /* 允许单词内换行 */
}

.member-title {
    color: #666;
    font-weight: 500; /* 调整字重 */
    margin-bottom: 15px; /* 调整底部边距 */
    font-size: 1rem; /* 调整字体 */
    line-height: 1.4; /* 调整行高 */
    word-wrap: break-word; /* 允许长单词换行 */
    word-break: break-word; /* 允许单词内换行 */
}

.member-bio {
    color: #666;
    font-size: 0.95rem; /* 调整字体 */
    margin-bottom: 15px;
    line-height: 1.4; /* 调整行高以适应固定高度 */
    word-wrap: break-word; /* 允许长单词换行 */
    word-break: break-word; /* 允许单词内换行 */
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3; /* 限制显示3行 */
    -webkit-box-orient: vertical;
}

.member-contact {
    color: #003366;
    font-size: 0.95rem; /* 调整字体 */
    font-weight: 500; /* 增加字重 */
    word-wrap: break-word; /* 允许长单词换行 */
    word-break: break-word; /* 允许单词内换行 */
}

/* 团队成员链接样式 */
.member-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.member-card-link:hover {
    text-decoration: none;
    color: inherit;
}

/* 研究环境 */
.research-environment {
    margin-top: 50px;
}

.research-environment h2 {
    color: #003366;
    margin-bottom: 25px;
    font-size: 2rem;
    text-align: center;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.gallery-item {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.gallery-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item img:hover {
    transform: scale(1.05);
}

.gallery-caption {
    padding: 10px;
    text-align: center;
    background-color: #f8f9fa;
    color: #666;
    font-size: 0.9rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .page-title {
        font-size: 2.2rem;
    }
    
    .professor-profile {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .professor-photo-large {
        flex: none;
        width: 180px;
        height: 220px;
        margin-bottom: 20px;
    }
    
    .professor-info-large {
        text-align: center;
    }
    
    /* 手机端每行显示两个成员 */
    .members-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        margin-bottom: 20px;
    }
    
    .member-card {
        display: flex;
        flex-direction: column;
        height: auto; /* 移动端允许自适应高度 */
        min-height: 320px; /* 移动端最小高度 */
        border-radius: 8px;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        width: 100%; /* 确保卡片占满网格单元格 */
    }
    
    .member-card:hover {
        transform: none;
        box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    }
    
    /* 手机端适配团队成员图片 */
    .member-photo {
        flex: none;
        width: 100%;
        height: auto;
        position: relative;
        aspect-ratio: 3 / 4;
        border-right: none;
        border-bottom: 1px solid #eee;
    }
    
    .member-info {
        padding: 20px;
    }
    
    .member-info h4 {
        font-size: 1.2rem;
        margin-bottom: 8px;
        font-weight: 600;
    }
    
    .member-title {
        font-size: 0.95rem;
        margin-bottom: 12px;
        font-weight: 500;
    }
    
    .member-bio {
        font-size: 0.9rem;
        margin-bottom: 12px;
        line-height: 1.4;
        overflow: hidden;
        display: -webkit-box;
        -webkit-line-clamp: 4; /* 移动端允许显示4行 */
        -webkit-box-orient: vertical;
    }
    
    .member-contact {
        font-size: 0.9rem;
        font-weight: 500;
    }
    
    .gallery {
        grid-template-columns: 1fr;
    }
    
    .professor-info-large h3 {
        font-size: 1.5rem;
    }
    
    .member-category h3 {
        font-size: 1.5rem;
    }
    
    .team-members h2 {
        font-size: 1.8rem;
    }
}

/* 针对小屏幕手机的进一步优化 */
@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }
    
    .members-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .member-card {
        border-radius: 6px;
        box-shadow: 0 1px 8px rgba(0,0,0,0.1);
        width: 100%;
    }
    
    .member-info {
        padding: 15px;
    }
    
    .member-info h4 {
        font-size: 1.1rem;
        margin-bottom: 6px;
    }
    
    .member-title {
        font-size: 0.9rem;
        margin-bottom: 10px;
    }
    
    .member-bio {
        font-size: 0.85rem;
        margin-bottom: 10px;
    }
    
    .member-contact {
        font-size: 0.85rem;
    }
}