/*=======================
 * TEAM PAGE STYLES
 * 1. Team Hero Section
 * 2. Team Categories & Titles
 * 3. Team Album Layout
 * 4. Team Cards
 * 5. User Profile Styles
 * 6. Research Ethics Styles
 * 7. Responsive Design
 =======================*/

/*======================
 * 1. Team Hero Section
 =======================*/
.team_area {
    height: 360px;
    background-color: #f7eaa0; 
    padding: 50px 0; 
    text-align: center; 
}

.team-row {
    display: flex;
    flex-wrap: wrap; 
    justify-content: center; 
    text-align: center;
}

.team__title--2 {
    margin-bottom: 20px; 
}

.title__line {
    font-size: 80px; 
    color: #f8f8f6; 
    margin-bottom: 20px; 
    margin-top: 100px;
}

/*======================
 * 2. Team Categories & Titles
 =======================*/
.team-category {
    margin: 60px 0 40px 0;
    text-align: center;
    width: 100%;
}

.team-category:first-child {
    margin-top: 0;
}

.team-category h2 {
    font-size: 36px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
}

.team-category h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, #eab44f 0%, #f7eaa0 100%);
    border-radius: 2px;
}

/*======================
 * 3. Team Album Layout - FIXED
 =======================*/
.team-album {
    display: flex;
    flex-wrap: nowrap; /* 改为不换行 */
    justify-content: center;
    gap: 30px;
    margin-top: 40px;
    width: 100%;
}

.resource__school__area {
    background-color: #ffffff;
    padding: 50px 0 80px;
    margin-bottom: 30px;
}

/*======================
 * 4. Team Cards - FIXED
 =======================*/
.team-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.3s ease;
    text-align: center;
    border: 1px solid #f0f0f0;
    width: 280px;
    flex-shrink: 0; /* 防止卡片被压缩 */
}

.team-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

/* Team Card Image - FIXED */
.team-card-img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.team-card:hover .team-card-img {
    transform: scale(1.05);
}

/* Team Card Content - FIXED */
.team-card-content {
    padding: 25px 20px;
    text-align: center;
}

/* 统一所有团队成员的名字样式 */
.team-card-name {
    font-size: 20px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 10px 0;
    line-height: 1.3;
}

/* 特别处理长名字 - 阿爾弗雷多·包蒂斯塔 */
.team-card-content h3.team-card-name {
    font-size: 20px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 10px 0;
    line-height: 1.3;
}

/* 为阿爾弗雷多·包蒂斯塔设置更小的字号 */
.team-card[alt="阿爾弗雷多·包蒂斯塔"] .team-card-name,
.team-card[alt="BAUTISTA ARELLANO Alfredo"] .team-card-name {
    font-size: 18px;
    line-height: 1.4;
}

.team-card-title {
    font-size: 16px;
    font-weight: 600;
    color: #eab44f;
    margin: 0 0 12px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.team-card-institution {
    font-size: 14px;
    color: #7f8c8d;
    margin: 0;
    line-height: 1.5;
}

/*======================
 * 5. User Profile Styles
 =======================*/
.user-profile {
    position: relative;
    display: inline-block;
    cursor: pointer;
    padding: 0;
    margin-left: 15px;
    display: none;
}

.user-profile.visible {
    display: inline-block;
}

.profile-btn {
    color: #333;
    font-size: 14px;
    font-weight: 500;
    height: 80px;
    line-height: 60px;
    display: block;
    position: relative;
    transition: color 0.3s ease;
    text-decoration: none;
    font-family: 'Poppins', sans-serif;
    text-transform: uppercase;
    padding: 0 15px;
}

.profile-btn:hover {
    color: #4285f4;
}

.profile-btn::after {
    content: "▼";
    font-size: 8px;
    margin-left: 6px;
    vertical-align: middle;
}

.user-profile .dropdown-content {
    display: none;
    position: absolute;
    background-color: white;
    min-width: 180px;
    box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.1);
    z-index: 1;
    border-radius: 0px;
    right: 0;
    top: 80px;
    padding: 0;
}

.user-profile:hover .dropdown-content {
    display: block;
}

.user-profile .dropdown-content a {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 15px !important;
    color: #333333 !important;
    margin-top: 1px;
    text-decoration: none !important;
    font-size: 14px;
    font-family: 'Poppins', sans-serif;
    transition: background-color 0.3s ease;
    white-space: nowrap;
}

.user-profile .dropdown-content a:last-child {
    border-bottom: none;
}

.user-profile .dropdown-content a:hover {
    background-color: #f0f0f0 !important;
    color: #4285f4 !important;
}

.auth-buttons.hidden {
    display: none !important;
}

/*======================
 * 6. Research Ethics Styles
 =======================*/
.ethics-content {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-top: 20px;
}

.ethics-image {
    flex: 0 0 300px;
}

.ethics-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.ethics-text {
    flex: 1;
    min-width: 300px;
}

.ethics-text h3 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: #333;
}

/* Ethics Accordion Styles */
.ethics-accordion {
    margin-top: 20px;
    border-radius: 8px;
    overflow: hidden;
}

.ethics-accordion-item {
    margin-bottom: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
}

.ethics-accordion-header {
    padding: 15px 20px;
    background-color: #f5f5f5;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ethics-accordion-header h4 {
    margin: 0;
    font-size: 18px;
    font-weight: 500;
}

.accordion-icon {
    font-size: 24px;
    font-weight: bold;
    color: #555;
    transition: transform 0.3s;
}

.ethics-accordion-content {
    max-height: 0;
    overflow: hidden;
    padding: 0 20px;
    transition: all 0.3s ease;
    background-color: #fff;
}

.ethics-accordion-item.active .ethics-accordion-content {
    max-height: 1000px;
    padding: 20px;
}

.ethics-accordion-content h5 {
    font-size: 16px;
    font-weight: 500;
    margin-top: 0;
    margin-bottom: 12px;
    color: #333;
}

.ethics-accordion-content p {
    margin-top: 0;
    margin-bottom: 16px;
    line-height: 1.5;
}

.ethics-accordion-content ul {
    padding-left: 20px;
    margin-bottom: 16px;
}

.ethics-accordion-content li {
    margin-bottom: 8px;
    line-height: 1.5;
}

.ethics-contact {
    margin-top: 25px;
    margin-bottom: 50px;
    padding: 15px;
    background-color: #f9f9f9;
    border-left: 4px solid #4c86af;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/*======================
 * 7. Responsive Design
 =======================*/
@media (max-width: 1400px) {
    .team-card {
        width: 260px;
    }
}

@media (max-width: 1200px) {
    .team-card {
        width: 240px;
    }
    .team-card-name {
        font-size: 18px;
    }
    /* 阿爾弗雷多·包蒂斯塔在中等屏幕上更小的字号 */
    .team-card[alt="阿爾弗雷多·包蒂斯塔"] .team-card-name,
    .team-card[alt="BAUTISTA ARELLANO Alfredo"] .team-card-name {
        font-size: 16px;
    }
}

@media (max-width: 992px) {
    .team-album {
        flex-wrap: wrap; /* 在小屏幕上允许换行 */
        justify-content: center;
    }
    .team-card {
        width: 280px;
    }
}

@media (max-width: 768px) {
    .team-album {
        gap: 20px;
    }

    .team-card {
        width: calc(50% - 20px);
        max-width: 280px;
    }

    .ethics-image {
        flex: 0 0 100%;
        margin-bottom: 20px;
    }
    
    .team-category h2 {
        font-size: 28px;
    }
    
    .team-card-content {
        padding: 20px 15px;
    }
    
    .team-card-name {
        font-size: 18px;
    }
    
    .team-card-img {
        height: 250px;
    }
}

@media (max-width: 576px) {
    .team-card {
        width: 100%;
        max-width: 280px;
    }
    
    .team-category {
        margin: 40px 0 30px 0;
    }
    
    .team-category h2 {
        font-size: 24px;
    }
    
    .team-card-content {
        padding: 15px;
    }
    
    .team-card-name {
        font-size: 18px;
    }
    
    .team-card-title {
        font-size: 14px;
    }
    
    .team-card-institution {
        font-size: 13px;
    }
    
    .team-card-img {
        height: 220px;
    }
}

/* Remove conflicting styles */
.team-card-img-wrapper,
.team-grid,
.team-grid-single,
.team-title-section,
.research-team-title,
.research-team-subtitle {
    display: none;
}