.teacher-section {
    margin-top: 100px;
}

.teacher-section__title {
    font-family: "Montserrat", sans-serif;
    font-weight: 700;
    font-size: 36px;
    line-height: 1.3;
    margin: 0 0 40px;
    color: #000;
}

.teacher-section__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.teacher-section__controls {
    display: inline-flex;
    align-items: center;
    gap: 20px;
    position: relative;
    top: 4px;
    left: 1px;
    flex-shrink: 0;
}

.teacher-section__control {
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background-color: #38c4bd;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-position: center;
    background-repeat: no-repeat;
    background-image: url("data:image/svg+xml,%3Csvg width='11' height='18' viewBox='0 0 11 18' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1.5 17L9.5 9L1.5 1' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.teacher-section__control img {
    display: none;
}

.teacher-section__control--prev {
    transform: rotate(180deg);
}

.teacher-swiper {
    width: 100%;
    overflow: hidden;
}

.teacher-swiper .swiper-wrapper {
    justify-content: flex-start;
    align-items: stretch;
}

.teacher-swiper .swiper-slide {
    height: auto;
    display: flex;
    width: 640px;
    flex: 0 0 640px;
}

.teacher-section__list {
    padding: 0;
    margin: 0;
    list-style: none;
}

.teacher-section__item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
    width: 100%;
    padding: 30px;
    border-radius: 30px;
    border: none;
    background: #FFFFFF;
    box-sizing: border-box;
    border: 1px solid #EBEFFF;
    height: 100%;
}

.teacher-section__control.swiper-button-disabled {
    background-color: #c4c4c4;
    cursor: default;
}

.teacher-section__item-header {
    display: flex;
    align-items: center;
    gap: 20px;
    width: 100%;
}

.teacher-section__item-header-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.teacher-section__item-image {
    width: 88px;
    height: 88px;
    border-radius: 111px;
    object-fit: cover;
    flex-shrink: 0;
}

.teacher-section__item-image-rotate {
    transform: rotate(45deg);
}

.teacher-section__item-title {
    margin: 0;
    font-family: "Montserrat", sans-serif;
    font-weight: 600;            
    font-size: 20px;
    line-height: 1.3;
    letter-spacing: 0;
    text-align: left;
    color: #000000;
}

.teacher-section__item-description {
    margin: 0;
    font-family: "Montserrat", sans-serif;
    font-weight: 400;             
    font-size: 14px;
    line-height: 1.3;
    letter-spacing: 0;
    color: #4A4C58;
}

.teacher-section__item-text {
    margin: 0;
    font-family: "Montserrat", sans-serif;
    font-weight: 500;              
    font-size: 16px;
    line-height: 1.3;
    letter-spacing: 0;
    color: #B1B1B1;
}

.teacher-section__item-text-span {
    font-family: "Montserrat", sans-serif;
    font-weight: 500;              
    font-size: 18px;
    line-height: 1.3;
    letter-spacing: 0;
    color: #000000;
}

.teacher-section__certificate-title,
.teacher-section__education-title,
.teacher-section__courses-title {
    margin: 0;
    font-family: "Montserrat", sans-serif;
    font-weight: 500;
    font-size: 16px;
    line-height: 1.3;
    letter-spacing: 0;
    color: #B1B1B1;
    margin-top: 20px;
}

.teacher-section__certificate {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 10px;
    align-items: flex-start;
}

.teacher-section__certificate-title {
    flex: 0 0 100%;
}

.teacher-section__certificate-text {
    margin: 0;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    width: auto;
    height: 28px;
    padding: 6px;
    gap: 5px;
    border-radius: 8px;
    background: #9086FF;
    font-family: "Montserrat", sans-serif;
    font-weight: 500;
    font-size: 12px;
    line-height: 1.3;
    letter-spacing: 0;
    color: #FFFFFF;
    white-space: nowrap;
}

.teacher-section__certificate-flag {
    width: 20px;
    height: 14px;
    object-fit: contain;
    flex: 0 0 20px;
    display: block;
}

.teacher-section__education-list {
    margin: 0 0 10px;
    padding: 0;
    list-style: none;
}

.teacher-section__education-item {
    display: grid;
    grid-template-columns: 8px 1fr;
    column-gap: 10px;
    row-gap: 10px;
    align-items: flex-start;
}

.teacher-section__education-icon {
    width: 8px;
    height: 8px;
    flex-shrink: 0;
    border-radius: 50%;
    object-fit: cover;
    margin-top: 7px; 
}

.teacher-section__education-title {
    margin-bottom: 10px;
}

.teacher-section__education-text {
    margin: 0;
    font-family: "Montserrat", sans-serif;
    font-weight: 400;
    font-size: 14px;
    line-height: 1.3;
    letter-spacing: 0;
    color: #000000;
}

.teacher-section__courses {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 10px;
    align-content: flex-start;
    min-height: 150px;
}

.teacher-section__courses-title {
    flex: 0 0 100%;
}

.teacher-section__courses-text {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 10px;
    border-radius: 10px; 
    background: #EBEFFF;
    font-family: "Montserrat", sans-serif;
    font-weight: 500;
    font-size: 14px;
    line-height: 1.3;
    letter-spacing: 0;
    color: #4A4C58;
    margin: 0;
    width: fit-content;
    white-space: normal;
    max-width: 350px;
}

.teacher-section__button {
    width: 100%;
    max-width: 580px;
    height: 49px;
    padding: 14px 24px;
    border-radius: 8px;
    border: 1px solid transparent;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: "Montserrat", sans-serif;
    font-weight: 500;
    font-size: 16px;
    line-height: 1.3;
    letter-spacing: 0;
    color: #1EC7BF;
    background-color: #FFFFFF;
    cursor: pointer;
    background-image: linear-gradient(#FFFFFF, #FFFFFF),
        linear-gradient(90deg, #38C4BD 0%, #2CAAA4 100%);
    background-origin: border-box;
    background-clip: padding-box, border-box;
    margin-top: auto;
    transition: background-image 0.2s ease, filter 0.2s ease;
    text-decoration: none;
}

@media (hover: hover) {
    .teacher-section__button:hover {
        background-image: linear-gradient(#F4F6FA, #F4F6FA),
            linear-gradient(90deg, #38C4BD 0%, #2CAAA4 100%);
        filter: brightness(0.96);
    }
}

.teacher-section__button:active {
    background-image: linear-gradient(#ECEFF5, #ECEFF5),
        linear-gradient(90deg, #38C4BD 0%, #2CAAA4 100%);
}

@media screen and (max-width: 1199px) {
    .teacher-swiper .swiper-slide {
        width: 458px;
        flex-basis: 458px;
    }

    .teacher-section__item {
        width: 458px;
        min-height: 687px;
        padding: 30px;
        gap: 20px;
        border-radius: 30px;
        border: 1px solid #EBEFFF;
        box-sizing: border-box;    
    }

    .teacher-section__item-header {
        gap: 12px;
    }

    .teacher-section__item-image {
        width: 72px;
        height: 72px;
    }

    .teacher-section__item-title {
        font-size: 18px;
    }

    .teacher-section__courses {
        min-height: 130px;
    }

    .teacher-section__courses-text {
        max-width: 280px;
    }
}

@media screen and (max-width: 991px) {
    .teacher-swiper .swiper-slide {
        width: 100%;
        flex: 0 0 100%;
        max-width: 100%;
    }

    .teacher-section__button {
        display: flex;
        box-sizing: border-box;
        width: 100%;
        max-width: none;
    }
}

@media screen and (max-width: 575px) {
    .teacher-section__title {
        font-size: 26px;
    }

    .teacher-section__button {
        width: 100%;
        max-width: none;
    }
}

@media screen and (max-width: 374px) {
    .teacher-section__title {
        margin-bottom: 0;
    }

    .teacher-section__header {
        flex-direction: column;
        margin-bottom: 40px;
    }

    .teacher-section__controls {
        align-self: flex-end;
    }
}