/* AAI Lab People Page Styles - Redesigned */

.bg-dark-blue {
    background: linear-gradient(135deg, #0d47a1 0%, #1565c0 100%) !important;
}

.navbar-dark .navbar-brand {
    color: #ffffff !important;
}

.navbar-dark .navbar-brand:hover {
    color: #e3f2fd !important;
}

.navbar-dark .navbar-nav .nav-link {
    color: #ffffff !important;
}

.navbar-dark .navbar-nav .nav-link:hover {
    color: #e3f2fd !important;
}

.navbar-dark .navbar-nav .nav-link.active {
    color: #bbdefb !important;
    font-weight: 600;
}

.navbar-dark .navbar-toggler {
    border-color: rgba(255,255,255,0.3);
}

.navbar-dark .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.85%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* AAI Lab People Page Styles - Compact Version */
/* === COLLAPSIBLE BUTTON STYLES (This section is correct) === */

.collapsible-btn {
    width: 100%;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.3s ease, border-color 0.3s ease, border-radius 0.3s ease;
    text-align: left;
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
}
.collapsible-btn:hover {
    background-color: #e9ecef;
    border-color: #ced4da;
}
.collapsible-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(21, 101, 192, 0.25);
}
.collapsible-btn:not(.collapsed) {
    background-color: #e3f2fd;
    border-color: #1565c0;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}
.category-header {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.2rem;
    font-weight: 600;
    color: #495057;
}
.category-header i {
    color: #2e7d32;
}
.category-header .badge {
    background-color: #6c757d !important;
}
.toggle-icon {
    transition: transform 0.3s ease-in-out;
    font-size: 1.2rem;
    color: #1565c0;
}
.collapsible-btn:not(.collapsed) .toggle-icon {
    transform: rotate(180deg);
}


/* === STYLING FOR THE COLLAPSIBLE CONTENT AREA === */

/*
 *  DELETE THE BLOCK BELOW FROM YOUR CSS FILE. IT IS THE CAUSE OF THE PROBLEM.
 */
/*
.collapse.show {
    padding: 20px;
    border: 1px solid #1565c0;
    border-top: none;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    background-color: #ffffff;
}
*/
/*
 *  END OF BLOCK TO DELETE
 */


/* THIS IS THE CORRECT RULE. KEEP THIS ONE. */
/* It targets the inner wrapper div, not the .collapse div that Bootstrap animates. */
.collapse-content-wrapper {
    padding: 20px;
    border: 1px solid #1565c0; /* Match active button border */
    border-top: none; /* Remove top border to connect with button */
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    background-color: #ffffff;
}


/* This is optional but good practice to ensure Bootstrap's transition is defined */
.collapsing {
    transition: height 0.35s ease;
}



.people-header {
    padding: 30px 0;
    background: linear-gradient(135deg, #1565c0 0%, #42a5f5 100%);
    color: white;
    border-radius: 15px;
    margin-bottom: 40px;
    text-align: center;
}

.page-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.page-subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    margin: 0;
    max-width: 600px;
    margin: 0 auto;
}

.section-title {
    font-size: 1.8rem;
    font-weight: 600;
    color: #1565c0;
    margin-bottom: 30px;
    text-align: center;
    position: relative;
    padding-bottom: 10px;
}

.section-title::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #1565c0, #42a5f5);
    border-radius: 2px;
}

/* Lab Director Styles - Compact */
.lab-director {
    margin-bottom: 50px;
}

.director-card.compact {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    text-align: center;
    border: 2px solid #e3f2fd;
    transition: transform 0.3s ease;
}

.director-card.compact:hover {
    transform: translateY(-3px);
}

.director-image {
    width: 140px;
    height: 140px;
    margin: 0 auto 20px auto;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid #1565c0;
    box-shadow: 0 6px 20px rgba(21, 101, 192, 0.3);
}

.director-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.director-image .image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1565c0;
}

.director-image .image-placeholder i {
    font-size: 3rem;
}

.director-info h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1565c0;
    margin-bottom: 8px;
}

.director-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2e7d32;
    margin-bottom: 4px;
}

.director-dept {
    font-size: 1rem;
    color: #666;
    margin-bottom: 4px;
}

.director-inst {
    font-size: 0.95rem;
    color: #888;
    margin-bottom: 20px;
}

.director-contact {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.contact-link {
    color: #1565c0;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 2px solid #1565c0;
    border-radius: 20px;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.contact-link:hover {
    background-color: #1565c0;
    color: white;
    text-decoration: none;
}

/* Member Category Styles */
.member-category {
    margin-bottom: 40px;
}

.category-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: #2e7d32;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding-left: 15px;
    border-left: 4px solid #2e7d32;
}

/* Collapsible Category Styles */
.collapsible-title {
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 15px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 10px;
    border: 2px solid #dee2e6;
    justify-content: space-between;
}

.collapsible-title:hover {
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
    border-color: #2e7d32;
}

.toggle-icon {
    transition: transform 0.3s ease;
}

.collapsible-title[aria-expanded="true"] .toggle-icon {
    transform: rotate(180deg);
}

/* Present Members Styles - Compact */
.present-members {
    margin-bottom: 50px;
}

.member-card.compact {
    background: white;
    border-radius: 12px;
    padding: 18px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    border: 2px solid #e8f5e8;
}

.member-card.compact:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.member-image {
    width: 80px;
    height: 80px;
    margin: 0 auto 15px auto;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #2e7d32;
}

.member-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.member-image .image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #e8f5e8, #c8e6c9);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2e7d32;
}

.member-image .image-placeholder i {
    font-size: 2rem;
}

.member-info h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1565c0;
    margin-bottom: 5px;
}

.member-status {
    font-size: 0.9rem;
    font-weight: 500;
    color: #2e7d32;
    margin: 0;
}

.member-affiliation {
    font-size: 0.8rem;
    color: #666;
    margin: 0;
    display: none; /* Hidden in compact mode */
}

.member-links {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 8px;
}

.member-links a {
    color: #1565c0;
    font-size: 1.05rem;
    line-height: 1;
    transition: color 0.2s ease;
}

.member-links a:hover {
    color: #2e7d32;
}

.past-member-info .member-links {
    justify-content: flex-start;
    margin-top: 4px;
}

/* Past Members Styles - Compact */
.past-members {
    margin-bottom: 50px;
}

.past-member-card.compact {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 3px 12px rgba(0,0,0,0.08);
    transition: transform 0.3s ease;
    height: 100%;
    border: 2px solid #e9ecef;
    display: flex;
    align-items: center;
    gap: 15px;
}

.past-member-card.compact:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}

.past-member-image {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid #6c757d;
    flex-shrink: 0;
}

.past-member-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.past-member-image .image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #e9ecef, #dee2e6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
}

.past-member-image .image-placeholder i {
    font-size: 1.5rem;
}

.past-member-info h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #495057;
    margin-bottom: 3px;
}

.current-position {
    font-size: 0.85rem;
    font-weight: 500;
    color: #1565c0;
    margin: 0;
}

/* Team Statistics - Compact */
.team-stats {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 40px 0;
    border-radius: 12px;
    margin-bottom: 30px;
}

.stat-item {
    padding: 15px;
    transition: transform 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-3px);
}

.stat-item i {
    font-size: 2.5rem;
    color: #1565c0;
    margin-bottom: 10px;
}

.stat-item h3 {
    font-size: 2rem;
    font-weight: 700;
    color: #1565c0;
    margin-bottom: 5px;
}

.stat-item p {
    font-size: 1rem;
    color: #666;
    margin: 0;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 992px) {
    .page-title {
        font-size: 2.2rem;
        flex-direction: column;
        gap: 10px;
    }
    
    .director-contact {
        flex-direction: column;
        align-items: center;
    }
    
    .past-member-card.compact {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
}

@media (max-width: 768px) {
    .director-card.compact {
        padding: 20px 15px;
    }
    
    .director-image {
        width: 120px;
        height: 120px;
    }
    
    .member-card.compact {
        padding: 15px 12px;
    }
    
    .past-member-card.compact {
        padding: 12px;
    }
    
    .category-title {
        font-size: 1.2rem;
        padding-left: 12px;
    }
    
    .people-header {
        padding: 25px 15px;
    }
}

@media (max-width: 576px) {
    .page-title {
        font-size: 1.8rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .director-info h3 {
        font-size: 1.3rem;
    }
    
    .stat-item h3 {
        font-size: 1.8rem;
    }
    
    .stat-item i {
        font-size: 2rem;
    }
}