.pecb-insights-posts {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: space-between;
}

.pecb-post {
    flex: 0 1 calc(33.333% - 10.67px);
    /* 3 columns with 16px gap */
    border-radius: 8px;
    position: relative;
}

.pecb-post-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    display: block;
    border-radius: 5px 5px 0 0;
}

.pecb-post a>img {
    display: block;
    width: 100%;
    height: auto;
    position: relative;
    z-index: 0;
    border-radius: 8px;
    min-height: 300px;
}

.pecb-post a>img::before {
    content: "";
    /* this won't work because ::before doesn't apply to <img> */
    /* so we apply overlay to the <a> instead */
}

.pecb-post a:has(> img) {
    position: relative;
    display: inline-block;
}

.pecb-post a:has(> img)::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1;
    pointer-events: none;
}


.pecb-post-detail {
    padding: 10px;
    position: absolute;
    bottom: 0px;
    z-index: 2;
    width: 100%;
}

.pecb-post-category {
    font-size: 12px;
    color: #fff;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.pecb-post h5 {
    margin: 10px 0;
    color: #FFF;
    font-family: Parabolica;
    font-size: 18px;
    font-style: normal;
    font-weight: 500;
    line-height: 22px;
}

.pecb-post h5 a {
    color: #fff;
    text-decoration: none;
    padding-bottom: 10px;
}

.pecb-post h5 a:hover {
    text-decoration: underline;
}

.pecb-post-meta {
    font-size: 12px;
    color: #fff;
    margin-bottom: 10px;
    border-top: 1px solid #fff;
    min-width: 100%;
    padding-top: 12px;
}

/* Responsive design */
@media (max-width: 768px) {
    .pecb-post {
        flex: 0 1 calc(50% - 8px);
        /* 2 columns on tablet */
    }
}

@media (max-width: 480px) {
    .pecb-post {
        flex: 0 1 100%;
        /* 1 column on mobile */
    }
}