﻿#team-content {
    min-width:1400px;
    border-color: #7cd63c;
    z-index: 7;
    padding: 1.5rem 1rem;
    display:flex;
    align-items: center;
    container-type: inline-size;
    container-name: team-content;
}


#team-content :has(.section-title) {
    border-color: #7cd63c;
    left: calc(14vw - 35px);
    background-color: #7cd63c;
}

#dynamic-team {
    display: flex;
}

#dynamic-team .team-display {
    min-height: 390px;
    padding: 1.5rem;
    padding-bottom: 0;
    display: flex;
    gap: 3.5rem;
}


#dynamic-team .team-display:not(.active-tab) {
    display: none;
}

#dynamic-team .team-image {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

#dynamic-team .team-image img {
    border-radius: 20px;
    border: 4px solid var(--green);
    width: 250px;
    height: 325px;
    object-fit: cover;
}

#dynamic-team h5 {
    text-align: center;
    font-weight: 600;
    font-size: 25px;
    width: 18ch;
}

@container team-content (max-width: 900px) {
    #dynamic-team .team-display {
        flex-direction: column;
        gap: 1rem;
        padding-top: 0;
    }
}

/* set tab count */
#team-list {
    --tab-count: 3;
    --tab-height: 2.3rem;
    --tab-spacing: calc(100% / var(--tab-count)  + 1px);
    min-height: 315px;
    height: 360px;
    max-height: 430px;
    max-width: 60ch;
    padding: 0rem 1rem 0rem .5rem;
    margin: 0;
    font-size: 1.1rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
}
@media (max-width: 1450px) {
    #team-content {
        min-width: 50px;
    }
    #team-list {
        display: none;
    }
}
/*is used to change --active variable according to active tab*/
#team-list:has(:nth-child(1).active-tab) {
    --active: 0;
}
#team-list:has(:nth-child(2).active-tab) {
    --active: 1;
}
#team-list:has(:nth-child(3).active-tab) {
    --active: 2;
}
#team-list:has(:nth-child(4).active-tab) {
    --active: 3;
}
#team-list:has(:nth-child(5).active-tab) {
    --active: 4;
}
#team-list:has(:nth-child(6).active-tab) {
    --active: 5;
}
#team-list:has(:nth-child(7).active-tab) {
    --active: 6;
}
#team-list:has(:nth-child(8).active-tab) {
    --active: 7;
}
#team-list:has(:nth-child(9).active-tab) {
    --active: 8;
}
#team-list:has(:nth-child(10).active-tab) {
    --active: 9;
}
#team-list:has(:nth-child(11).active-tab) {
    --active: 10;
}
#team-list:has(:nth-child(12).active-tab) {
    --active: 11;
}
#team-list:has(:nth-child(13).active-tab) {
    --active: 12;
}
/*used to set the --current-hover*/
#team-list:has(:nth-child(1):hover) {
    --current-hover: 0;
}
#team-list:has(:nth-child(2):hover) {
    --current-hover: 1;
}
#team-list:has(:nth-child(3):hover) {
    --current-hover: 2;
}
#team-list:has(:nth-child(4):hover) {
    --current-hover: 3;
}
#team-list:has(:nth-child(5):hover) {
    --current-hover: 4;
}
#team-list:has(:nth-child(6):hover) {
    --current-hover: 5;
}
#team-list:has(:nth-child(7):hover) {
    --current-hover: 6;
}
#team-list:has(:nth-child(8):hover) {
    --current-hover: 7;
}
#team-list:has(:nth-child(9):hover) {
    --current-hover: 8;
}
#team-list:has(:nth-child(10):hover) {
    --current-hover: 9;
}
#team-list:has(:nth-child(11):hover) {
    --current-hover: 10;
}
#team-list:has(:nth-child(12):hover) {
    --current-hover: 11;
}
#team-list:has(:nth-child(13):hover) {
    --current-hover: 12;
}
#team-list > div {
    margin-inline: auto;
    padding: .15rem;
    height: var(--tab-height);
    width: 100%;
    white-space: nowrap;
    font-weight: 600;
    -webkit-transition: 100ms;
    -moz-transition: 100ms;
    -ms-transition: 100ms;
    -o-transition: 100ms;
    transition: 100ms;
    z-index: 10;
}
#team-list > div.active-tab{
    color: white;
}

#team-list::after {
    content: "";
    position: absolute;
    inset: .2rem;
    top: calc(var(--active) * var(--tab-spacing) - .15rem) ;
    right: .5rem;
    height: var(--tab-height);
    border-radius: 10px;
    background-color: var(--blue);
    -webkit-transition: 100ms;
    -moz-transition: 100ms;
    -ms-transition: 100ms;
    -o-transition: 100ms;
    transition: 100ms;
    z-index: 0;
    min-height: 20px;
}

#team-list > div:hover::after {
    content: "";
    position: absolute;
    inset: .2rem;
    top: calc(var(--current-hover) * var(--tab-spacing) - .15rem);
    right: .5rem;
    min-height: 20px;
    height: var(--tab-height);
    border-radius: 10px;
    outline: 2px solid grey;
    color: white;
    z-index: 0;
    cursor: pointer;
}

#home-team-pagination{
    width: 100%;
    position: absolute;
    bottom: .5rem;
    justify-content: center;
}

.section-link {
    cursor: pointer;
}