.best-course-item {
    position: relative;
    display: block;
    min-height: 430px;
    overflow: hidden;
    border-radius: 24px;
    background: #1d2939;
    color: #fff;
    text-decoration: none;
    isolation: isolate;
    transition: transform .2s ease, opacity .2s ease;
}

.best-course-item:hover {
    color: #fff;
    opacity: .96;
    transform: translateY(-2px);
    text-decoration: none;
}

.best-course-item__bg {
    position: absolute;
    inset: 0;
    z-index: -2;
    background-position: center;
    background-size: cover;
    transition: transform .35s ease;
}

.best-course-item:hover .best-course-item__bg {
    transform: scale(1.04);
}

.best-course-item::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(180deg, rgba(0, 0, 0, .35) 0%, rgba(0, 0, 0, .18) 42%, rgba(0, 0, 0, .72) 100%),
        rgba(0, 0, 0, .28);
}

.best-course-item--no-image {
    background: linear-gradient(135deg, #243b55 0%, #141e30 100%);
}

.best-course-item__inner {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 430px;
    padding: 28px;
}

.best-course-item__category {
    align-self: flex-start;
    max-width: 100%;
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.11;
    white-space: normal;
    overflow-wrap: anywhere;
}

.best-course-item__text {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.best-course-item__title {
    color: #fff;
    font-size: 28px;
    font-weight: 650;
    line-height: 1.14;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    overflow: hidden;
}

.best-course-item__desc {
    color: rgba(255, 255, 255, .9);
    font-size: 16px;
    font-weight: 500;
    line-height: 1.42;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    overflow: hidden;
}

@media (max-width: 1200px) {
    .best-course-item,
    .best-course-item__inner {
        min-height: 390px;
    }

    .best-course-item__title {
        font-size: 25px;
    }
}

@media (max-width: 768px) {
    .best-course-item,
    .best-course-item__inner {
        min-height: 340px;
    }

    .best-course-item {
        border-radius: 18px;
    }

    .best-course-item__inner {
        padding: 22px;
    }

    .best-course-item__title {
        font-size: 22px;
        line-height: 1.18;
    }

    .best-course-item__desc {
        font-size: 15px;
        line-height: 1.45;
    }
}
