/**
 * Блок «Наша команда» (TeamSectionWidget): локальные переменные + стили block4-glav.
 * Подключается на любой странице независимо от about-page.
 */
.team-section-widget {
    --color-dark: rgba(43, 43, 44, 1);
    --color-black: rgba(15, 18, 23, 1);
    --color-white: rgba(255, 255, 255, 1);
    --color-gray-icon: rgba(170, 173, 176, 0.4);
    --color-blue-dark: rgba(74, 90, 114, 1);
    --container-width: 1246px;
    --section-padding: 80px 30px;
    --padding-tablet: 60px 30px;
    --padding-mobile: 60px 15px 60px 15px;
    --font-family-primary: 'Open Sans', sans-serif;
    --font-size-h1: 40px;
    --font-size-text: 16px;
    --font-size-tablet-h1: 27px;
    --font-weight-semibold: 600;
}

.team-section-widget .card_nav {
    display: flex;
    align-items: center;
    justify-self: flex-end;
}

.team-section-widget .block4-glav {
    background-color: var(--color-white);
    padding: var(--section-padding);
}

.team-section-widget .block4-glav__h1 {
    font-family: var(--font-family-primary);
    font-size: var(--font-size-h1);
    font-weight: var(--font-weight-semibold);
    color: var(--color-dark);
    margin-bottom: 50px;
}

.team-section-widget .block4-glav__cards {
    margin-left: 43px;
    overflow: hidden;
    position: relative;
    width: 91.5%;
    transition: max-height 0.3s ease;
}

.team-section-widget .block4-glav__cards-wrapper {
    display: flex;
    gap: 30px;
    transition: transform 0.6s ease-in-out;
    will-change: transform;
}

.team-section-widget .block4-glav__card {
    flex: 0 0 calc((100% - 60px) / 3);
    max-width: calc((100% - 60px) / 3);
    min-width: calc((100% - 60px) / 3);
    width: calc((100% - 60px) / 3);
    background-color: var(--color-white);
    border-radius: 4px;
    padding: 0;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    flex-shrink: 0;
    overflow: hidden;
}

.team-section-widget .block4-glav__card-img {
    width: 100%;
    height: 456px;
    object-fit: cover;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

.team-section-widget .block4-glav__card-content {
    padding: 20px 10px 20px 12px;
    border-bottom-left-radius: 4px;
    border-bottom-right-radius: 4px;
    border-top: 2.44px solid #4A5A72;
    border-bottom: 1px solid var(--color-gray-icon);
    border-right: 1px solid var(--color-gray-icon);
    border-left: 1px solid var(--color-gray-icon);
}

.team-section-widget .block4-glav__card-title {
    font-size: var(--font-size-text);
    font-weight: 700;
    color: var(--color-black);
    margin-bottom: 8px;
}

.team-section-widget .block4-glav__card-text {
    font-size: var(--font-size-text);
    color: #0F1217;
    line-height: 1.3;
    margin: 0;
}

.team-section-widget .block4-glav__pagination {
    padding-right: 65px;
    display: flex;
    justify-content: flex-end;
    gap: 14px;
    margin-top: 30px;
}

.team-section-widget .block4-glav__pagination-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--color-blue-dark);
    box-shadow: 0 4px 4px rgba(0, 0, 0, 0.25);
    cursor: pointer;
    transition: opacity 0.3s ease, background-color 0.3s ease;
}

.team-section-widget .block4-glav__pagination-dot:not(.block4-glav__pagination-dot--active) {
    background-color: #DBDEE3;
    opacity: 1;
}

.team-section-widget .block4-glav__pagination-dot--active {
    background-color: var(--color-blue-dark);
}

.team-section-widget .block4-glav__pagination-dot:hover {
    opacity: 0.8;
}

.team-section-widget .block4-glav__more-btn {
    display: none;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    margin-top: 25px;
    font-family: var(--font-family-primary);
    font-size: var(--font-size-text);
    color: #4A5A72;
    align-items: center;
    gap: 8px;
}

.team-section-widget .block4-glav__more-btn-icon {
    width: 9px;
    height: 7px;
    transition: transform 0.3s ease;
}

.team-section-widget .block4-glav__more-btn.expanded .block4-glav__more-btn-icon {
    transform: rotate(180deg);
}

@media (max-width: 1000px) {
    .team-section-widget .block4-glav__cards {
        margin-left: 0;
        width: 100%;
    }

    .team-section-widget .block4-glav__card {
        flex: 0 0 calc((100% - 30px) / 2);
        max-width: calc((100% - 30px) / 2);
        min-width: calc((100% - 30px) / 2);
        width: calc((100% - 30px) / 2);
    }
}

@media (max-width: 800px) {
    .team-section-widget .block4-glav {
        padding: var(--padding-tablet);
    }

    .team-section-widget .block4-glav__card {
        flex: 0 0 calc((100% - 20px) / 2);
        max-width: calc((100% - 20px) / 2);
        min-width: calc((100% - 20px) / 2);
    }

    .team-section-widget .block4-glav__cards {
        margin: 0;
        width: 100%;
    }

    .team-section-widget .block4-glav__cards-wrapper {
        gap: 20px;
    }

    .team-section-widget .block4-glav__pagination {
        padding: 0;
        justify-content: center;
    }

    .team-section-widget .block4-glav__card-content {
        padding: 20px 5px 20px 12px;
    }
}

@media (max-width: 700px) {
    .team-section-widget .block4-glav {
        padding: var(--padding-mobile);
    }

    .team-section-widget .block4-glav__h1 {
        font-size: var(--font-size-tablet-h1);
        margin-bottom: 30px;
    }

    .team-section-widget .block4-glav__pagination {
        justify-content: center;
    }
}

@media (max-width: 500px) {
    .team-section-widget .block4-glav__cards {
        width: 100%;
        margin-left: 0;
        padding: 0;
        overflow: visible;
        max-height: none;
    }

    .team-section-widget .block4-glav__cards-wrapper {
        flex-direction: column;
        gap: 20px;
        min-width: 100%;
        width: 100%;
    }

    .team-section-widget .block4-glav__card {
        flex: 0 0 auto;
        width: 100%;
        min-width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .team-section-widget .block4-glav__card:nth-child(n+4) {
        display: none;
    }

    .team-section-widget .block4-glav__cards-wrapper.expanded .block4-glav__card:nth-child(n+4) {
        display: flex;
    }

    .team-section-widget .block4-glav__pagination {
        display: none;
    }

    .team-section-widget .block4-glav__more-btn {
        display: flex;
    }
}

@media (min-width: 501px) {
    .team-section-widget .block4-glav__pagination {
        display: flex;
    }

    .team-section-widget .block4-glav__more-btn {
        display: none;
    }
}

@media (min-width: 1001px) {
    .team-section-widget .block4-glav__card {
        flex: 0 0 calc((100% - 60px) / 3) !important;
        max-width: calc((100% - 60px) / 3) !important;
        min-width: calc((100% - 60px) / 3) !important;
        width: calc((100% - 60px) / 3) !important;
    }
}
