/* Grid columns keep the "Items gap" control from pushing items onto their own row. */
.ahura_element_post_list_5 {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
}

.ahura_element_post_list_5 .ah-item {
    gap: 30px;
    display: flex;
    align-items: center;
    background-color: #f9f9f9;
    border-radius: 20px;
    padding: 20px;
    /* The content drops below the thumbnail when the card is too narrow for both (e.g. a narrow column on tablet). */
    flex-wrap: wrap;
    container-type: inline-size;
}

.ahura_element_post_list_5 .ah-item .ah-image {
    flex-shrink: 0;
    width: 100px;
    height: 100px;
    background-color: #eaeaea;
    border-radius: 20px;
    overflow: hidden;
}

.ahura_element_post_list_5 .ah-item .ah-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ahura_element_post_list_5 .ah-item .ah-content .ah-title {
    font-size: 18px;
    font-weight: bold;
}

.ahura_element_post_list_5 .ah-item .ah-content .ah-excerpt {
    font-size: 15px;
}

.ahura_element_post_list_5 .ah-item .ah-meta {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

.ahura_element_post_list_5 .ah-item .ah-meta .ah-label,
.ahura_element_post_list_5 .ah-item .ah-meta .ah-value
{
    font-size: 15px;
}

.ahura_element_post_list_5 .ah-meta svg {
    width: 17px;
    height: 17px;
    vertical-align: middle;
    margin-left: 5px;
}

.ahura_element_post_list_5.is-ltr .ah-meta svg {
    margin-left: 0;
    margin-right: 5px;
}

.ahura_element_post_list_5 .ah-item .ah-content {
    flex: 1 1 0;
    min-width: min(140px, 100%);
}

.ahura_element_post_list_5 .post-button a {
    max-width: 100%;
}

/* With "Align button with text" on, a button that has to wrap under the title lines up with it. */
.ahura_element_post_list_5 .ah-item .ah-content.align-btn .post-button {
    justify-content: flex-start;
}

.ahura_element_post_list_5.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ahura_element_post_list_5.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* The button sits beside the text only when the card has room for both. */
@container (min-width: 320px) {
    .ahura_element_post_list_5 .ah-item .ah-content.align-btn {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
    }

    .ahura_element_post_list_5 .ah-item .ah-content.align-btn .content-container {
        flex: 1 1 auto;
        min-width: 0;
    }

    .ahura_element_post_list_5 .ah-item .ah-content.align-btn .post-button {
        flex: 0 0 auto;
    }

    .ahura_element_post_list_5 .ah-item .ah-content.align-btn .post-button a {
        white-space: nowrap;
    }
}

/* Breakpoints match Elementor's defaults, which the per-device "Columns" setting follows. */
@media screen and (max-width: 1024px){
    .ahura_element_post_list_5 .ah-item {
        justify-content: start;
    }
    .ahura_element_post_list_5.cols-tab-1 { grid-template-columns: minmax(0, 1fr); }
    .ahura_element_post_list_5.cols-tab-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ahura_element_post_list_5.cols-tab-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media screen and (max-width: 767px){
    .ahura_element_post_list_5 .ah-item {
        align-items: center;
        flex-direction: column;
    }
    .ahura_element_post_list_5 .ah-item .ah-content {
        width: 100%;
        text-align: center;
    }
    .ahura_element_post_list_5 .ah-item .ah-meta {
        justify-content: center;
    }
    /* :where() keeps this below the widget's button alignment control. */
    .ahura_element_post_list_5 :where(.post-button),
    .ahura_element_post_list_5 .ah-item .ah-content.align-btn .post-button {
        justify-content: center;
    }
    .ahura_element_post_list_5.cols-mob-1 { grid-template-columns: minmax(0, 1fr); }
    .ahura_element_post_list_5.cols-mob-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ahura_element_post_list_5.cols-mob-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}