.zar-course .widget-ajaxpager {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    overflow-x: visible;
}

.zar-course .widget-ajaxpager > .posts-item {
    box-sizing: border-box;
    flex: 0 0 calc(50% - 5px);
    max-width: calc(50% - 5px);
}

.zar-course .ajaxpager.posts-mini-lists {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    overflow-x: visible;
}

.zar-course .ajaxpager.posts-mini-lists > .posts-mini.ajax-item {
    box-sizing: border-box;
    flex: 0 0 calc(50% - 5px);
    max-width: calc(50% - 5px);
}

.zar-course .posts-mini .item-heading > a:not([class]) {
    color: #333;
}

.zar-course .posts-mini .item-heading > a:not([class]):hover {
    color: #333;
}

.zar-course .ajaxpager.posts-mini-lists > .post_ajax_trigger:not(.hide),
.zar-course .ajaxpager.posts-mini-lists > .post_ajax_loader,
.zar-course .ajaxpager.posts-mini-lists > .ajax-pag,
.zar-course .ajaxpager.posts-mini-lists > .no-more {
    flex: 0 0 100%;
    width: 100%;
}

.zar-course .post_ajax_trigger:not(.hide) {
    display: flex;
    justify-content: center;
    margin-top: 8px;
}

.zar-course .post_ajax_trigger:not(.hide) > a.ajax-next {
    align-items: center;
    display: inline-flex;
    justify-content: center;
    min-height: 44px;
    min-width: 44px;
    padding: 0 20px;
}

.zar-student-case .posts-item.card .item-heading > a,
.zar-student-case .posts-item.card .item-heading > a:hover {
    color: #333 !important;
}

/* Hide a legacy module left by the retired auto-insert plugin. */
.single-post .zap-module {
    display: none !important;
}

.zar-course .ajaxpager.posts-mini-lists {
    margin-bottom: 4px !important;
}

@media (max-width: 767px) {
    .zar-course .widget-ajaxpager {
        flex-direction: column;
        flex-wrap: nowrap;
        overflow-x: visible;
    }

    .zar-course .widget-ajaxpager > .posts-item {
        flex-basis: 100%;
        max-width: 100%;
        width: 100%;
    }

    .zar-course .ajaxpager.posts-mini-lists {
        flex-direction: column;
        flex-wrap: nowrap;
        overflow-x: visible;
    }

    .zar-course .ajaxpager.posts-mini-lists > .posts-mini.ajax-item {
        flex-basis: 100%;
        max-width: 100%;
        width: 100%;
    }

    .zar-student-case .zar-student-card-row {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        scroll-behavior: smooth;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .zar-student-case .zar-student-card-row::-webkit-scrollbar {
        display: none;
    }

    .zar-student-case .zar-student-card-row > .posts-item.card {
        box-sizing: border-box;
        flex: 0 0 calc(50% - 10px);
        max-width: calc(50% - 10px);
        min-width: calc(50% - 10px);
        scroll-snap-align: start;
        scroll-snap-stop: always;
    }
}
