/* Container Grid */
.mx_news_container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto 50px;
    padding: 0 20px;
}

/* Nieuws Blokken Styling */
.mx_news_block_item,
.mx_news_category_item {
    background-color: #fff;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    overflow: hidden;
    text-align: center;
    padding-bottom: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.mx_news_block_item:hover,
.mx_news_category_item:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* Afbeeldingen */
.mx_news_block_image img,
.mx_news_category_image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    margin-bottom: 20px;
    border-radius: var(--border-radius);
}

/* Content flex */
.mx_news_block_content,
.mx_news_category_content {
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* Tekst styling */
.mx_news_block_content h3,
.mx_news_category_content h3 {
    color: var(--primary-color);
    padding: 0 20px;
    margin-bottom: 0.8em;
}

.mx_news_block_content p,
.mx_news_category_content p {
    color: var(--text-light);
    padding: 0 20px;
    font-size: 0.95em;
    flex: 1;
}

/* Knop altijd gecentreerd onderaan */
.mx_news_block_content .btn-link,
.mx_news_category_content .btn-link {
    display: block;
    max-width: fit-content;
    margin: 15px auto 0;
}

/* Afbeelding centeren */
.mx_news_block_image,
.mx_news_category_image {
  
}

/* ===================== */
/* NIEUWS ITEM (detail)  */
/* ===================== */

#mx_news_item {
    max-width: 1000px;
   
}

/* Hoofdafbeelding */
.mx_news_item_main_image {
    width: 100%;
    margin-bottom: 30px;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.mx_news_item_main_image img {
    width: 100%;
    max-height: 450px;
    object-fit: cover;
    border-radius: var(--border-radius);
    display: block;
}

/* Hoofdafbeelding hover */
.mx_news_item_main_image a {
    display: block;
    overflow: hidden;
    border-radius: var(--border-radius);
}

.mx_news_item_main_image a:hover img {
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

/* Content tekst */
#mx_news_item .mx_news_item_main_image + * {
    color: var(--text-color);
    line-height: 1.8;
    font-size: 1em;
}

/* Extra afbeeldingen galerij */
.mx_news_item_images {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    margin-top: 40px;
}

.mx_news_item_images .mx_news_item_image {
    border-radius: var(--border-radius);
    overflow: hidden;
}

.mx_news_item_images .mx_news_item_image a {
    display: block;
}

.mx_news_item_images .mx_news_item_image img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: var(--border-radius);
    transition: opacity 0.3s ease, transform 0.3s ease;
    display: block;
}

.mx_news_item_images .mx_news_item_image img:hover {
    opacity: 0.85;
    transform: scale(1.03);
}

/* Terug naar overzicht link */
#mx_news_item > a:last-of-type {
    display: inline-block;
    margin-top: 40px;
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 2px;
    transition: opacity 0.2s ease;
}

#mx_news_item > a:last-of-type:hover {
    opacity: 0.7;
}

/* ===================== */
/* RESPONSIVE GRID       */
/* ===================== */

/* Tablets: 2 blokken per rij */
@media (max-width: 1024px) {
    .mx_news_container {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobiel: 1 blok per rij */
@media (max-width: 600px) {
    .mx_news_container {
        grid-template-columns: 1fr;
    }

    .mx_news_item_images {
        grid-template-columns: repeat(2, 1fr);
    }

    .mx_news_item_main_image img {
        max-height: 280px;
    }
}