.team-grid__row {
    --bs-gutter-y: 4rem;
}

.team-grid__title {
    color: #1A3258;
}

.team-grid-item {
    width: 100%;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
}

.team-grid-item__toggler {
    aspect-ratio: 1/1;
    width: 3rem;
    background: var(--color-tertiary);
    border-radius: 100%;
    color: var(--color-primary);
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 1;
    cursor: pointer;
    transition: var(--trans);
}

.team-grid-item.active .team-grid-item__toggler {
    background: var(--color-primary);
    color: var(--color-tertiary);
}

.team-grid-item.active .team-grid-item__toggler {
    transform: rotate(45deg);
}

.team-grid-item__toggler::before,
.team-grid-item__toggler::after {
    content: '';
    display: block;
    width: 1rem;
    height: 0.1rem;
    background: currentColor;
    position: absolute;
    top: 50%;
    left: 50%;
    translate: -50% -50%;
}

.team-grid-item__toggler::after {
    transform: rotate(90deg);
}

.team-grid-item__wrapper {
    position: relative;
    margin-bottom: 1.5rem;
}

.team-grid-item__image {
    aspect-ratio: 295/375;
    width: 100%;
    border: solid 1px #E1E8EC;
    border-radius: 1rem;
}

.team-grid-item__info {
    border-radius: 1rem;
    overflow: hidden;
    position: absolute;
    inset: 0;
    pointer-events: none;

    transform: translateX(-200%);
    transition: 1s transform;
    transition-delay: 0.2s;
    overflow: hidden;
    backdrop-filter: blur(7.5px);
}

.team-grid-item.active .team-grid-item__info {
    transition-delay: 0s;
    transform: translateX(0);
    pointer-events: all;
}

.team-grid-item__info-overlay {
    width: 100%;
    height: 100%;
    background: var(--color-tertiary);
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0.3;
}

.team-grid-item__info-inner {
    justify-content: space-between;
    gap: 2rem;
    padding: 4rem;
    height: 100%;
    background: #FFFAF4;

    position: relative;
    z-index: 1;
    transform: translateX(-100%);  
    transition: 1s ease-out;
}

.team-grid-item.active .team-grid-item__info-inner {
    transform: translateX(0);
    transition-delay: 0.2s;
}

.team-grid-item__text {
    --clamp: 12;
    max-height: 85%;
    overflow-y: auto;
}

.team-grid-item__name {
    font-weight: 700;
}

.team-grid-item__profession {
    color: var(--color-primary);
}

.team-grid-item .socials {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.team-grid-item .socials__item {
    width: 2.2rem;
    transition: var(--trans);
    cursor: pointer;
}

.team-grid__header:has(.team-grid__text) {
    align-items: center;
    justify-content: flex-start;
    column-gap: 4rem;
}

.team-grid__text {
    color: var(--color-primary);
    flex: 1;
    max-width: 610px;
}

@media (hover: hover) and (pointer: fine) {
    .team-grid-item__toggler:hover {
        background: var(--color-primary);
        color: var(--color-tertiary);
    }

    .team-grid-item .socials__item:hover {
        opacity: 0.5;
    }
}

@media screen and (max-width: 1024.9px) {
    .team-grid__btns {
        padding-top: 3rem;
    }

    .team-grid__text {
        text-align: center;
    }
}

@media screen and (max-width: 575.9px) {
    .team-grid-item__image {
        aspect-ratio: 335/364;
    }
}