.vk_container {
    margin-top: 20px;
}

.vk_row {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

.vk_card {
    flex-basis: calc(19.33% - 13px);
    /* min-width:0 - иначе длинный текст поста распирает карточку шире экрана
       и вся страница получает горизонтальный скролл на мобильных */
    min-width: 0;
    max-width: 100%;
    margin-bottom: 20px;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    position: relative;
}

.vk_card-img-container {
    height: 200px;
    overflow: hidden;
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
}

.vk_card-img-top {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.vk_card-body {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.vk_card-text {
    margin-bottom: 10px;
    flex-grow: 1;
    overflow-wrap: break-word;
    word-break: break-word;
}

.vk_card-date {
    font-size: 14px;
    color: #888;
    margin-top: auto;
}

.vk_card-body a.default-btn {
    font-size: 16px;
    text-align: center;
    margin: 10px 0 0;
}

.vk_card-footer {
    display: flex;
    justify-content: center;
    margin-top: 15px;
}

.vk_card-video {
    position: relative;
}

.vk_card-video-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 64px;
    height: 64px;
    background-image: url('../images/play-icon.png');
    background-size: cover;
    cursor: pointer;
}

@media (max-width: 900px) {
    .vk_card {
        flex-basis: calc(50% - 10px);
    }
}

@media (max-width: 600px) {
    .vk_card {
        flex-basis: 100%;
    }

    .vk_card:last-child {
        margin-bottom: 0;
    }
}

@media (max-width: 400px) {
    .vk_card-body a.default-btn {
        font-size: 18px;
    }
}