section, header {
    min-width: 0;
}

.filter-section {
    margin-top: 15px;
    margin-bottom: 15px;
}

.specialists-cards {
    display: grid;
    grid-template-columns: repeat(4, minmax(250px, 1fr));
    grid-auto-rows: auto;
    width: 100%;
    gap: 20px;
}
.specialist-card {
    border-radius: 20px;
    overflow: hidden;
    width: 100%;
    position: relative;
}
.specialist-card-image {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}
.sp-ci-wrap {
    position: relative;
}
.specialist-card-image img {
    width: 240px;
    height: 240px;
    display: block;
    border-radius: 20px;
    object-fit: cover;
}
.heart {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 25px;
    height: 25px;
    cursor: pointer;
}
.heart-path {
    stroke: #A6A6A6;
    fill: none;
    transition: fill 0.3s ease, stroke 0.3s ease;
}
.specialist-card-name {
    background-color: #9AC355;
    padding: 5px;
    text-align: center;
    font-size: 18px;
    font-weight: bold;
    color: #fff;
    border-radius: 20px;
    width: 100%;
    margin-top: -50px;
    position: relative;
    z-index: 1;
}
.specialist-card-name p:first-child {
    line-height: 1;
    margin-bottom: 5px;
}
.specialist-card-name p:last-child {
    line-height: 1;
    font-size: 16px;
    height: 48px;
}
.specialist-discription {
    font-family: Montserrat, serif;
    font-weight: 400;
    font-style: normal;
    font-size: 18px;
    line-height: 100%;
    letter-spacing: 0;
    text-align: center;
    vertical-align: middle;
}
.specialist-card-description {
    position: relative;
    top: -17px;
    background-color: white;
    border-radius: 0 0 20px 20px;
    padding: 15px;
    font-size: 14px;
    color: #333;
    border: 1px solid var(--color-primary);
    height: 120px;
    flex: 1;
}
.specialist-card-description p {
    margin: 5px 0;
}
.specialist-card-description ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0 10px;
    line-height: 1.3;
}
.specialist-card-description li {
    position: relative;
    padding-left: 15px;
    font-size: 14px;
}
.adult::before {
    background-color: #BEF574;
}
.teen::before {
    background-color: #8E74F5;
}
.family::before {
    background-color: #F58E74;
}
.specialist-card-description li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
}
/*@media (max-width: 1280px) {
    .specialist-card-name {
        font-size: 16px;
        margin-top: -45px;
    }
    .specialist-card-description {
        font-size: 12px;
    }
}*/
@media (max-width: 1100px) {
    .specialists-cards {
        grid-template-columns: repeat(3, minmax(250px, 1fr));
    }
}
@media (max-width: 860px) {
    .specialists-cards {
        grid-template-columns: repeat(2, minmax(250px, 1fr));
    }
}
@media (max-width: 767px) {
    .specialists-cards {
        grid-template-columns: repeat(1, 1fr);
        justify-content: center;
    }
    .specialist-card {
        display: flex;
        flex-direction: column;
        /*justify-content: center;*/
        align-items: center;
    }
    .specialist-card-name {
        left: 0;
        width: 100%;
        margin-top: -50px;
        font-size: 16px;
    }
    .specialist-card-name p:last-child {
        height: auto;
        min-height: 16px;
    }
    .specialist-card a,
    .specialist-card-description {
        max-width: 362px;
        width: 100%;
    }
    .specialist-card-description {
        font-size: 12px;
        height: auto;
        top: -20px;
    }
}