/* ============================= */
/* IMAGE CONTAINER + ACHTERGROND */
/* ============================= */

#mx_news_block .mx_news_block_image {
    position: relative;
    height: 200px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding-top: 15px;
}

/* Gekleurde SVG achtergrond */
#mx_news_block .mx_news_block_image::before {
    content: "";
    position: absolute;
    inset: 0;
    background-size: contain;
    background-position: top center;
    background-repeat: no-repeat;
    z-index: 0;
}

/* Icoon bovenop foto (optioneel, kan leeg blijven) */
#mx_news_block .mx_news_block_image::after {
    content: "";
    position: absolute;
    inset: 0;
    background-size: 80px 80px;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 3;
    pointer-events: none;
}

/* Ronde foto */
#mx_news_block .mx_news_block_image img {
    position: relative;
    z-index: 2;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    background-color: #fff;
    margin-bottom: 0;
}


/* ============================= */
/* FLEX LAYOUT VOOR BLOKKEN       */
/* ============================= */

#mx_news_block .mx_news_block_item {
    display: flex;
    flex-direction: column;
    height: 100%;
}

#mx_news_block .mx_news_block_content {
    display: flex;
    flex-direction: column;
    flex: 1;               /* vult de resterende hoogte */
}

#mx_news_block .mx_news_block_content .btn-link {
    margin-top: auto;      /* duwt de knop naar onderkant */
    align-self: center;
}


/* ===================== */
/* ACHTERGRONDEN PER VAK */
/* ===================== */

#mx_news_block .mx_news_block_item:nth-child(1) .mx_news_block_image::before {
    background-image: url("/templates/images/Groen_achter_foto.svg");
}

#mx_news_block .mx_news_block_item:nth-child(2) .mx_news_block_image::before {
    background-image: url("/templates/images/Blauw_achter_foto.svg");
}

#mx_news_block .mx_news_block_item:nth-child(3) .mx_news_block_image::before {
    background-image: url("/templates/images/Paars_achter_foto.svg");
}

#mx_news_block .mx_news_block_item:nth-child(4) .mx_news_block_image::before {
    background-image: url("/templates/images/Oranje_achter_foto.svg");
}


/* ===================== */
/* KNOPKLEUREN PER BLOK  */
/* ===================== */

#mx_news_block .mx_news_block_item:nth-child(1) .btn-link {
    background-color: #f3f3f3 !important;
    color: #12a19a !important;
}

#mx_news_block .mx_news_block_item:nth-child(2) .btn-link {
    background-color: #f3f3f3 !important;
    color: #2b2e83 !important;
}

#mx_news_block .mx_news_block_item:nth-child(3) .btn-link {
    background-color: #f3f3f3 !important;
    color: #951b81 !important;
}

#mx_news_block .mx_news_block_item:nth-child(4) .btn-link {
    background-color: #f3f3f3 !important;
    color: #f39200 !important;
}


/* ===================== */
/* GRID CONTAINER        */
/* ===================== */

.news_block_header {
    margin: 50px 0 25px;
}
.news_block_header h2 {
 color:#951b81;
 font-size: 3.2em;
    margin-bottom: 1.2em;
}

#mx_news_block {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto 50px;
    padding: 0 20px;
}


/* ===================== */
/* BLOK STIJLING         */
/* ===================== */

.mx_news_block_item {
    background-color: #fff;
    border-radius: var(--border-radius);
     overflow: hidden;
    text-align: center;
    padding-bottom: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.mx_news_block_item:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}


/* ===================== */
/* TEKST & BUTTONS       */
/* ===================== */

.mx_news_block_content h3 {
    color: var(--primary-color);
    padding: 0 20px;
    margin-bottom: 0.8em;
    margin-top: 0.8em;
}

.mx_news_block_content p {
    color: var(--text-light);
    padding: 0 20px;
    font-size: 0.95em;
}


/* ===================== */
/* RESPONSIVE GRID       */
/* ===================== */

@media (max-width: 1024px) {
    #mx_news_block {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    #mx_news_block {
        grid-template-columns: 1fr;
    }
}
