.banjica-posts-widget {
    --banjica-gap: 26px;
    --banjica-cols: 4;
    position: relative;
    width: 100%;
}

.banjica-posts-carousel {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
}

.banjica-posts-carousel__viewport {
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
}

.banjica-posts-carousel__viewport::-webkit-scrollbar {
    display: none;
}

.banjica-posts-track {
    display: flex;
    justify-content: center;
    gap: var(--banjica-gap);
}

.banjica-posts-widget--carousel .banjica-post-card {
    flex: 0 0 calc((100% - (var(--banjica-cols) - 1) * var(--banjica-gap)) / var(--banjica-cols));
    min-width: 0;
}

.banjica-posts-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--banjica-gap);
}

.banjica-posts-widget--grid_more .banjica-post-card {
    flex: 0 1 calc((100% - (var(--banjica-cols) - 1) * var(--banjica-gap)) / var(--banjica-cols));
    max-width: calc((100% - (var(--banjica-cols) - 1) * var(--banjica-gap)) / var(--banjica-cols));
}

.banjica-post-card {
    border-radius: 8px;
    background: #ececec;
    overflow: hidden;
}

.banjica-post-card__image-wrap {
    position: relative;
}

.banjica-post-card__image-link {
    display: block;
    aspect-ratio: 16 / 10;
    background: #d7dce0;
    overflow: hidden;
}

.banjica-post-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.25s ease;
}

.banjica-post-card:hover .banjica-post-card__image {
    transform: scale(1.04);
}

.banjica-post-card__image-placeholder {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    color: #5b646c;
    font-weight: 700;
}

.banjica-post-card__date-box {
    position: absolute;
    left: 0;
    bottom: 0;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 48px;
    border-radius: 2px;
    background: #f7f7f7;
    color: #0f1720;
    z-index: 2;
}

.banjica-post-card__date-day {
    font-size: 20px;
    line-height: 1;
    font-weight: 700;
}

.banjica-post-card__date-month {
    margin-top: 2px;
    text-transform: uppercase;
    font-size: 13px;
    line-height: 1;
    letter-spacing: 0.06em;
}

.banjica-post-card__body {
    padding: 14px 14px 14px;
}

.banjica-post-card__categories {
    margin: 0 0 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.banjica-post-card__category {
    font-size: 10px;
    line-height: 1.2;
    text-transform: uppercase;
    color: #3f464d;
    position: relative;
}

.banjica-post-card__category:not(:last-child)::after {
    content: "\2022";
    margin-left: 8px;
    color: #3f464d;
}

.banjica-post-card__title {
    margin: 0 0 8px;
    font-size: 15px;
    line-height: 1.25;
    letter-spacing: 0;
}

.banjica-post-card__title a {
    color: #111111;
    text-decoration: none;
}

.banjica-post-card__title a:hover {
    color: #000000;
}

.banjica-post-card__excerpt {
    margin: 0;
    color: #30363b;
    font-size: 12.5px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 7;
    line-clamp: 7;
    overflow: hidden;
}

.banjica-posts-nav {
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    background: #ffffff;
    color: #111111;
    font-size: 24px;
    line-height: 1;
    display: grid;
    place-items: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.banjica-posts-nav:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.banjica-posts-more-wrap {
    margin-top: 24px;
    text-align: center;
}

.banjica-posts-more-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 22px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 700;
    background: #111111;
    color: #ffffff;
}

.banjica-posts-more-button:hover {
    color: #ffffff;
    background: #000000;
}

.banjica-posts-empty {
    margin: 0;
    text-align: center;
}

@media (max-width: 1024px) {
    .banjica-posts-widget {
        --banjica-cols: 3;
    }

    .banjica-post-card__title { font-size: 15px; }
}

@media (max-width: 767px) {
    .banjica-posts-widget {
        --banjica-cols: 2;
    }

    .banjica-posts-carousel {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .banjica-posts-nav {
        justify-self: center;
    }

    .banjica-post-card__title { font-size: 15px; }
}

@media (max-width: 520px) {
    .banjica-posts-widget {
        --banjica-cols: 1;
    }
}
