/* === FLEXBOX LAYOUT === */
.team-bio-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
}

.team-bio-grid .team-bio-item {
    flex: 0 1 calc(33.333% - 20px);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 15px;
    box-sizing: border-box;
    text-align: center;
    cursor: pointer;
}

/* === CSS GRID LAYOUT (3-column fixed) === */
.team-bio-grid-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.team-bio-grid-grid .team-bio-item {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 15px;
    text-align: center;
    box-sizing: border-box;
    cursor: pointer;
}

/* === IMAGE WRAPPING AND SIZING === */
.team-bio-thumb {
    width: 100% !important;
    height: auto !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    margin-bottom: 10px !important;
    overflow: hidden;
}

.team-bio-thumb img {
    max-width: 100%;
    height: auto !important;
    object-fit: contain;
    display: block;
}

/* === TEXT ELEMENTS === */
.team-bio-level-title {
    font-size: 32px !important;
    font-weight: 800 !important;
    color: #93222b !important;
    margin-bottom: 10px !important;
}

.team-bio-title {
    font-size: 18px !important;
    font-weight: 600 !important;
    color: #333 !important;
    margin-bottom: 5px !important;
}

.team-bio-level {
    font-weight: bold;
    color: #666;
    margin-bottom: 8px;
}

.team-bio-content {
    font-size: 14px !important;
    color: #555 !important;
    margin-bottom: 10px !important;
    flex-grow: 1;
}

/* === POPUP STYLES === */
.team-bio-popup-overlay {
    display: none;
    position: fixed;
    z-index: 9999;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    justify-content: center;
    align-items: center;
}

.team-bio-popup {
    background: #fff;
    padding: 30px;
    max-width: 600px;
    width: 90%;
    border-radius: 10px;
    position: relative;
    box-shadow: 0 5px 25px rgba(0,0,0,0.3);
}

.team-bio-popup h2 {
    font-size: 24px !important;
    font-weight: 700 !important;
    color: #333 !important;
    margin: 10px 0 !important;
}

.team-bio-popup .team-bio-role {
    font-size: 16px !important;
    font-weight: 500 !important;
    color: #777 !important;
    margin-bottom: 10px !important;
}

.team-bio-popup p {
    font-size: 15px !important;
    color: #444 !important;
    line-height: 1.6 !important;
}

.team-bio-popup .close-popup {
    display: inline-block;
    padding: 8px 16px;
    background-color: #93222b;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    margin-top: 10px;
}

.team-bio-open-btn {
    margin-top: 10px;
    padding: 8px 16px;
    background-color: #93222b;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    cursor: pointer;
}

.team-bio-open-btn:hover {
    background-color: #5a0f14;
}

/* === RESPONSIVE FOR MOBILE === */
@media screen and (max-width: 768px) {
    .team-bio-grid,
    .team-bio-grid-grid {
        grid-template-columns: repeat(1, 1fr);
        flex-direction: column;
    }

    .team-bio-popup {
        max-width: 90%;
    }
}
