.flex_layout.team_switcher {
    --border-color: rgba(0,0,0,0.25);
    --space-between: 4rem;
    --highlight-bg: #ecfef1;
    --active-color: #a2fa00;
}

.flex_layout.team_switcher .subtitel {
    margin-bottom: 1rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* Tabs (leave as is) */
.flex_layout.team_switcher .tab_container {
    position: relative;
    display: flex;
    border-block: 1px solid var(--border-color);
    margin-top: 3rem;
}
.flex_layout.team_switcher .tab_container .indicator {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    background-color: var(--circuit-blue);
    transition: all 0.3s ease;
}

.flex_layout.team_switcher .tab {
    cursor: pointer;
    flex-basis: 33%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    position: relative;
    isolation: isolate;
    padding-block: 2rem;
    transition: font-weight 300ms ease-in-out;
}

.flex_layout.team_switcher .tab:not(:last-child)::after {
    content: '';
    height: calc(100% + var(--space-between));
    width: 1px;
    position: absolute;
    top: 0;
    right: 0;
    background-image: linear-gradient(var(--border-color) calc(100% - var(--space-between)), transparent 100%);
}

.flex_layout.team_switcher .tab.active {
    font-weight: var(--weight-bold);
}

.flex_layout.team_switcher .tab::before {
    content: '';
    background-image: linear-gradient(transparent, rgba(0, 58, 81, 0.05));
    inset: 0;
    position: absolute;
    z-index: -1;
    opacity: 0;
    transition: opacity 300ms ease-in-out;
}

.flex_layout.team_switcher .tab.active::before {
    opacity: 1;
}

.flex_layout.team_switcher .tab .icon {
    width: 2rem;
    height: 2rem;
    mask-size: contain;
    mask-repeat: no-repeat;
    mask-position: center;
    -webkit-mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
    text-align: center;
    position: relative;
}

.flex_layout.team_switcher .tab .icon svg{
    position: absolute;
    left: 50%;
    transform: translate(-50%, 0);
}

.flex_layout.team_switcher .tab .title {
    font-size: var(--body-xl);
}

/* Two-column layout */
.flex_layout.team_switcher .team-region-members {
    display: none;
}

.flex_layout.team_switcher .team-region-members.active {
    display: block;
}

.flex_layout.team_switcher .team_list_details_container{
    display: flex;
    justify-content: space-between;
    gap: 3rem;
    padding-top: 3rem;
}

.flex_layout.team_switcher .team_list_details_container.no-tabs{
    padding-top: 1rem;
}

.flex_layout.team_switcher .team_list_details_container > div{
    flex: 1;
}

/* Left: Team member list */
.flex_layout.team_switcher .member-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 0px;
    flex: 1;
}

.flex_layout.team_switcher .team-member {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 0rem;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.3s ease;
    gap: 1rem;
    position: relative;
}
.flex_layout.team_switcher .team-member.active {
    border-color: var(--circuit-blue);
}

.flex_layout.team_switcher .team-member .avatar {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}
.flex_layout.team_switcher .team-member .avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.flex_layout.team_switcher .team-member > div:nth-child(2),
.flex_layout.team_switcher .team-member .name {
    flex-grow: 1;
    margin: 0px;
}
.flex_layout.team_switcher .team-member .arrow {
    display: flex;
    align-items: center;
    justify-content: center;
}
.flex_layout.team_switcher .team-member .arrow svg rect{
    transition: all 0.3s;
}

.flex_layout.team_switcher .team-member.active .arrow svg rect {
    fill: var(--active-color);
}
.flex_layout.team_switcher .team-member:not(.active):hover .arrow svg path{
    animation: arrow-slide-back 0.3s ease-in-out;
}

/* Right: Detail card */
.flex_layout.team_switcher .team-details {
    position: relative;
}

.flex_layout.team_switcher .member-detail {
    display: none;
    background-color: #fff;
    border-radius: 1rem;
    padding: 2.25rem 3rem;
    transition: all 0.3s ease;
    margin-top: 0.5rem;
}
.flex_layout.team_switcher .member-detail.active {
    display: block;
    position: sticky;
    top: 110px;
}

.flex_layout.team_switcher .member-detail .avatar {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 1rem;
}
.flex_layout.team_switcher .member-detail .avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.flex_layout.team_switcher .member-detail h4 {
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.flex_layout.team_switcher .member-detail .dot {
    color: var(--active-color);
    font-size: 1.25rem;
    line-height: 0;
    margin-top: 0.3em;
}
.flex_layout.team_switcher .member-detail .role {
    font-weight: 500;
    font-size: 20px;
    color: #555;
    margin-top: 0.3em;
    display: inline-block;
}
.flex_layout.team_switcher .member-detail .content {
    margin-top: 1rem;
    font-size: 1rem;
    line-height: 1.75;
    color: #333;
}

.flex_layout.team_switcher .member-info{
    display: none;
}

/* Responsive adjustments */
@media only screen and (max-width: 767px) {
    .flex_layout.team_switcher {
        --space-between: 1rem;
    }

    .flex_layout.team_switcher .tab_container {
        overflow-x: auto;
        overflow-y: hidden;
        margin-inline: -20px;
    }

    .flex_layout.team_switcher .tab {
        padding-block: 1rem;
        flex-shrink: 0;
        gap: 0.5rem;
        padding-inline: 1rem;
    }

    .flex_layout.team_switcher .tab .icon {
        width: 1.5rem;
        height: 1.5rem;
    }
    .flex_layout.team_switcher .tab .title {
        font-size: var(--body-m);
        min-width: max-content;
    }
    
    .flex_layout.team_switcher .team_list_details_container.no-tabs{
        padding-top: 0rem;
    }

    .flex_layout.team_switcher .team-member {
        padding: 20px 0;
    }

    .flex_layout.team_switcher .team_list_details_container{
        flex-direction: column;
    }
    .flex_layout.team_switcher .member-info{
        list-style: none;
    }

    .flex_layout.team_switcher .member-info .content-wrapper{
        display: grid; grid-template-rows: 0fr;
        padding: 0px 0 0 0;
        transition: grid-template-rows 300ms ease-in-out, padding 300ms ease-in-out;
    }
    .flex_layout.team_switcher .member-info .content{
        overflow: hidden;
    }
    .flex_layout.team_switcher .member-info .content .role{
        font-size: 1.2em;
        font-weight: var(--weight-bold);
        margin-bottom: .5em;
    }

    .flex_layout.team_switcher .member-info .content p{
        margin-bottom: 0;
    }
    
    .flex_layout.team_switcher .team-member + .member-info{
        display: block;
    }

    .flex_layout.team_switcher .team-member.active + .member-info .content-wrapper{
        grid-template-rows: 1fr;
        padding: 20px 0 0 0;
    }
    
    .flex_layout.team_switcher .member-detail {
        display: none;
        background-color: #fff;
        border-radius: 1rem;
        padding: 2rem 20px 1.5rem 20px;
        transition: all 0.3s ease;
        margin-top: 0.5rem;
    }

    .flex_layout.team_switcher .team-details{
        display: none;
    }
}