/* ----------------------------------------------------
   ALGEMENE NEWS CARD STYLE (voor alle views)
---------------------------------------------------- */
.mx_news_block_item,
.mx_news_category_item {
    display: flex;
    gap: 20px;
    padding: 20px;
    margin-bottom: 40px; /* ruimte voor uitstekende knop */
    background-color: var(--light-text);
    border-radius: var(--border-radius);
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
    border-bottom: none;
    position: relative;
}

.mx_news_block_item:hover,
.mx_news_category_item:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}

.mx_news_block_item:last-child,
.mx_news_category_item:last-child {
    margin-bottom: 40px;
}

/* ----------------------------------------------------
   AFBEELDINGEN
---------------------------------------------------- */
.mx_news_block_image,
.mx_news_category_image {
    flex: 0 0 300px;
}

.mx_news_block_image img,
.mx_news_category_image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: var(--border-radius);
    display: block;
}

/* ----------------------------------------------------
   CONTENT
---------------------------------------------------- */
.mx_news_block_content,
.mx_news_category_content {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
}

.mx_news_block_item h3,
.mx_news_category_item h3 {
    margin: 0 0 8px;
    font-size: 1.3rem;
    color: var(--secondary-color);
}

.mx_news_block_item p,
.mx_news_category_item p {
    margin: 10px 0 0;
    line-height: 1.5;
    color: #555;
}

/* ----------------------------------------------------
   LEES MEER KNOP – onderaan, gecentreerd, uitstekend
---------------------------------------------------- */

/* Het laatste <p> waar de knop in zit */
.mx_news_block_content p:last-of-type,
.mx_news_category_content p:last-of-type {
    margin-top: auto;            /* duwt het p-blok naar onder */
    text-align: left;          /* center de knop */
    padding-top: 25px;
    padding-bottom: 40px;        /* ruimte voor uitstekende knop */
    position: relative;
}

/* De knop zelf */
.mx_news_block_content p:last-of-type .btn,
.mx_news_category_content p:last-of-type .btn {
   position: absolute;
    bottom: -44px;
    left: 34%;
    transform: translateX(-50%);
    z-index: 2;
}

/* ----------------------------------------------------
   ITEM VIEW (item.html.twig)
---------------------------------------------------- */
#mx_news_item .addthis_toolbox {
    margin: 20px 0;
}

.mx_news_item_main_image {
    width: 100%;
    max-height: 350px;
    overflow: hidden;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
}

.mx_news_item_main_image img {
    width: 100%;
    height: 350px;
    object-fit: cover;
}

.mx_news_item_image {
    background: var(--light-text);
    border: 1px solid #ddd;
    padding: 10px;
    border-radius: var(--border-radius);
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
    width: 160px;
    text-align: center;
    margin: 10px 20px 20px 0;
}

.mx_news_item_image img {
    width: 100%;
    height: auto;
    border-radius: var(--border-radius);
}

.mx_news_item_image span {
    display: block;
    margin-top: 10px;
    font-size: 0.9rem;
    color: #666;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

/* ----------------------------------------------------
   MOBIEL – knop netjes onderaan en niet overlappende
---------------------------------------------------- */
@media (max-width: 640px) {

    .mx_news_block_item,
    .mx_news_category_item {
        flex-direction: column;
        padding-bottom: 50px; /* ruimte voor knop */
    }

    .mx_news_block_image,
    .mx_news_category_image {
        flex: unset;
        width: 100%;
    }

    .mx_news_block_image img,
    .mx_news_category_image img {
        height: 180px;
    }

    .mx_news_block_content p:last-of-type,
    .mx_news_category_content p:last-of-type {
        padding-bottom: 70px; /* extra ruimte */
    }

    .mx_news_block_content p:last-of-type .btn,
    .mx_news_category_content p:last-of-type .btn {
        position: absolute;
        bottom: -30px;
        left: 50%;
        transform: translateX(-50%);
    }
}
