.programs {
    overflow: hidden;
}

.programs__head {
    margin-bottom: 30px;
}

.programs__title {
    margin-bottom: 16px;
    text-align: center;
}

.programs__filter-item {
    display: inline-block;
    margin: 0 40px 0 0;
}

.programs__filter-text {
    font-size: 18px;
    line-height: 120%;
    color: #666666;
    cursor: pointer;
    transition: color 0.3s;
}

@media (prefers-reduced-motion: reduce) {
    .programs__filter-text {
        transition: none;
    }
}

.programs__filter-text:hover {
    color: #ED7453;
}

.programs__filter-input:checked + .programs__filter-text {
    color: #ED7453;
}

.programs__list-wrapper {
    flex-direction: column;
}

.programs__col {
    margin-bottom: 20px;
}

.program-item {
    height: 100%;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    min-height: 359px;
    padding: 104px 20px 30px;
    background: #F5F3F8;
    border-radius: 30px 0;
}

.program-item::before {
    content: '';
    position: absolute;
    top: 104px;
    left: 0;
    z-index: -1;
    width: 168px;
    height: 153px;
    background: linear-gradient(180deg, #F5F3F8 0%, rgba(255, 255, 255, 0) 100%), #EAE3F1;
    border-radius: 45px 0;
}

.program-item__label {
    position: absolute;
    top: 34px;
    left: 0;
    display: inline-block;
    padding: 9px 22px;
    font-size: 14px;
    line-height: 130%;
    background: #FFD974;
    border-radius: 0 0 5px 0;
    color: #222222;
}

.program-item__picture {
    position: absolute;
    top: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 104px;
    height: 104px;
    background: linear-gradient(180deg, #F5F3F8 0%, rgba(255, 255, 255, 0) 100%), #EEE8F3;
    border-radius: 45px 0;
}

.program-item__img {
    width: 53px;
    height: 52px;
    filter: drop-shadow(0px 0px 50px #C9B5DB);
}

.program-item__direction {
    margin-bottom: 23px;
    font-size: 14px;
    line-height: 120%;
    color: rgba(102, 102, 102, 0.5);
}

.program-item__direction-name {
    color: #572F8E;
}

.program-item__name {
    margin-bottom: 23px;
    font-weight: 700;
    font-size: 20px;
    line-height: 120%;
    color: #333333;
    flex: 1;
}
.program-item__price {
    font-weight: 700;
    margin-bottom: 15px;
}

.program-item__clinic {
    margin-top: auto;
    font-size: 14px;
    line-height: 140%;
}

.program-item__clinic a {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.program-item__clinic a::after {
    content: '';
    flex-shrink: 0;
    width: 11px;
    height: 18px;
    margin-left: 10px;
    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 fill-rule='evenodd' clip-rule='evenodd' d='M0.686129 0.71907C1.04945 0.320129 1.66738 0.291254 2.06632 0.654574L10.1123 7.98215C10.3156 8.1673 10.4315 8.42953 10.4315 8.7045C10.4315 8.97946 10.3156 9.2417 10.1123 9.42684L2.06632 16.7544C1.66738 17.1177 1.04945 17.0889 0.686129 16.6899C0.322809 16.291 0.351684 15.6731 0.750625 15.3097L8.00343 8.7045L0.750625 2.09926C0.351684 1.73594 0.322809 1.11801 0.686129 0.71907Z' fill='%23ED7453'/%3E%3C/svg%3E%0A");
    background-repeat: no-repeat;
    background-position: center;
}

.programs__buttons_pc {
    display: none;
}

.programs__all {
    text-align: center;
}

.programs__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-gap: 20px;
}
.section_clinics_programs .wrap_ajax_pagination {
	grid-column: 1/5;
}

@media (max-width: 1188px) {
    .programs__grid {
        grid-template-columns: repeat(3, 1fr);
    }
	.section_clinics_programs .wrap_ajax_pagination {
		grid-column: 1/4;
	}
}
@media (max-width: 868px) {
    .programs__col:nth-child(n + 4) {
        display: none;
    }
    .programs__button-prev,
    .programs__button-next {
        display: none;
    }

    .programs__grid {
        grid-template-columns: repeat(2, 1fr);
    }
	.section_clinics_programs .wrap_ajax_pagination {
		grid-column: 1/3;
	}
}

@media (max-width: 460px) {
    .programs__grid {
        grid-template-columns: 1fr;
    }
	.section_clinics_programs .wrap_ajax_pagination {
		grid-column: 1/2;
	}
}

@media (min-width: 869px) {
    .programs__list {
        position: relative;
    }

    .programs__list-wrapper {
        flex-direction: row;
    }

    .programs__button-prev,
    .programs__button-next {
        width: 52px;
        height: 52px;
        background-color: #FFFFFF;
        border: 0;
        border-radius: 50%;
        box-shadow: 0 0 0 rgba(87, 67, 142, 0.0);
        transition: box-shadow .5s ease;
    }

    .programs__button-prev {
        left: -26px;
    }

    .programs__button-next {
        right: -26px;
    }

    .programs__button-prev::after,
    .programs__button-next::after {
        font-size: 14px;
        font-weight: 700;
        color: #666666;
    }

    .programs__button-prev:hover,
    .programs__button-next:hover {
        box-shadow: 0 7px 39px rgba(87, 67, 142, 0.3);
    }
}

@media (min-width: 1189px) {
    .programs__head {
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .programs__title {
        margin-bottom: 0;
        margin-right: auto;
        text-align: left;
    }

    .programs__buttons_pc {
        display: block;
    }

    .programs__buttons_mobile {
        display: none;
    }

    .programs__button-prev {
        left: -70px;
    }

    .programs__button-next {
        right: -70px;
    }
}
