/* ==========================================================================
   NOVAMUNDI NIEUWS STYLING (GEOPTIMALISEERD VOOR GRID & MOBILE)
   ========================================================================== */

/* 1. OVERZICHTSWEERGAVE (Blokken & Categorieën) */

.mx_news_block_item, 
.mx_news_category_item {
    display: grid;
    /* We gebruiken grid-columns: de foto krijgt 35% en de tekst de rest. 
       Dit is flexibeler dan een vaste 400px. */
    grid-template-columns: 350px 1fr; 
    gap: 0;
    margin-bottom: 50px;
    background-color: #ffffff; /* Wit vlak nu onderdeel van de hele kaart */
    border-radius: 40px;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.06));
    transition: transform 0.3s ease;
    overflow: hidden; /* Zorgt dat alles binnen de bochten van de kaart blijft */
}

/* Tablet optimalisatie: Tussen 992px en 1200px maken we de foto iets smaller */
@media (max-width: 1200px) {
    .mx_news_block_item, .mx_news_category_item {
        grid-template-columns: 300px 1fr;
    }
}

.mx_news_block_item:hover, 
.mx_news_category_item:hover {
    transform: translateY(-5px);
}

/* Afbeelding container */
.mx_news_block_image, 
.mx_news_category_image {
    width: 100%;
    height: 100%;
    display: block;
}

.mx_news_block_image img, 
.mx_news_category_image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Vult altijd het hele vlak zonder te vervormen */
    border-radius: 40px 0 0 40px;
    display: block;
}

/* Witte Content container */
.mx_news_block_content, 
.mx_news_category_content {
    padding: 40px; /* Meer ademruimte */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Tekst styling */
.mx_news_text_top h3, 
.mx_news_text_wrapper h3 {
    font-family: 'Quicksand', sans-serif;
    font-size: 1.8rem;
    color: var(--text-blue);
    margin: 0 0 10px 0;
    line-height: 1.2;
}

.mx_news_date {
    display: block;
    margin-bottom: 15px;
    font-size: 0.9rem;
    color: #999;
    font-style: italic;
}

.mx_news_text_top p, 
.mx_news_text_wrapper p {
    font-size: 1.05rem;
    line-height: 1.6;
    color: #444;
    margin: 0;
}

/* Lees meer knop */
.mx_read_more {
    position: relative;
    align-self: flex-end;
    background-color: var(--geel);
    color: white !important;
    padding: 12px 35px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.95rem;
    box-shadow: 0 4px 12px rgba(253, 185, 19, 0.25);
    transition: all 0.3s ease;
    margin-top: 20px;
    overflow: hidden;
    z-index: 1;
}

.mx_read_more::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #f8af41, #e94539, #be1d2e, #64318a, #2b3b8e, #1275bb, #39b072, #8dc044, #d5da2e);
    transition: left 0.5s ease;
    z-index: -1;
    border-radius: 8px;
}

.mx_read_more:hover::before {
    left: 0;
}

.mx_read_more:hover {
    transform: scale(1.05);
}

/* 2. DETAILPAGINA */

.mx_news_item_main_image img {
    width: 100%;
    /* FIX: 14vh was veel te klein, veranderd naar 500px of 50vh */
    max-height: 200px; 
    object-fit: cover;
    border-radius: 40px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
}

/* 3. MOBIELE RESPONSIVENESS (De fix voor het stapelen) */

@media (max-width: 992px) {
    .mx_news_block_item, 
    .mx_news_category_item {
        /* Hier schakelen we over naar 1 kolom: foto boven, tekst onder */
        grid-template-columns: 1fr; 
        filter: none;
        margin-bottom: 30px;
    }
    
    #mx_news_category {
    display: grid;
    grid-template-columns: 1fr 1fr; /* twee kolommen naast elkaar */
    gap: 20px; /* ruimte tussen de items */
    margin-bottom: 30px;
    filter: none;
}
    
    .mx_news_category_item {
    display: flex;
    flex-direction: column;
}

    .mx_news_block_image img, 
    .mx_news_category_image img {
        height: 280px; /* Vaste hoogte op mobiel zodat de foto goed zichtbaar is */
        border-radius: 40px 40px 0 0; /* Hoeken alleen boven rond */
    }

    .mx_news_block_content, 
    .mx_news_category_content {
        border-radius: 0 0 40px 40px; /* Hoeken alleen onder rond */
        padding: 30px 25px;
    }

    .mx_news_text_top h3 {
        font-size: 1.5rem;
    }

    .mx_read_more {
        align-self: stretch; /* Knop over de hele breedte op mobiel = makkelijker klikken */
        text-align: center;
    }
}

@media (max-width: 680px) {
    #mx_news_category {
        grid-template-columns: 1fr; /* onder elkaar op mobiel */
    }
}


/* Extra kleine schermen (telefoons) */
@media (max-width: 480px) {
    .mx_news_block_image img {
        height: 200px;
    }
    .mx_news_block_content {
        padding: 20px;
    }
}

/* --- NIEUWS ITEM GALLERIJ (Onderaan detailpagina) --- */

.mx_news_item_gallery {
 
    border-top: 2px solid var(--geel2); /* Subtiele scheiding met de tekst */
}

.mx_news_item_gallery h3 {
    font-family: 'Quicksand', sans-serif;
    color: var(--text-blue);
    font-size: 1.8rem;
    margin-bottom: 25px;
}

/* Het Grid voor de foto's */
.mx_gallery_grid {
    display: grid;
    /* Automatisch schalen: minimaal 180px breed per foto */
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
}

/* Individuele foto container */
.mx_news_item_image {
    position: relative;
    border-radius: 30px; /* NovaMundi ronde hoeken */
    overflow: hidden;
    aspect-ratio: 1 / 1;  /* Maakt de foto's perfect vierkant */
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    background-color: #eee;
}

.mx_news_item_image a {
    display: block;
    width: 100%;
    height: 100%;
}

.mx_news_item_image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

/* --- VERGROOTGLAS EFFECT (Zelfde als fotoalbum) --- */

.mx_news_item_image a::before {
    content: '\f00e'; /* FontAwesome magnifying glass plus */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.5);
    width: 50px;
    height: 50px;
    background-color: var(--primary-yellow);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 5;
}

/* Donkere overlay bij hover */
.mx_news_item_image a::after {
    content: '';
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0);
    transition: background-color 0.3s ease;
    z-index: 4;
}

/* Hover interactie */
.mx_news_item_image:hover img {
    transform: scale(1.1);
}

.mx_news_item_image:hover a::before {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.mx_news_item_image:hover a::after {
    background-color: rgba(0, 0, 0, 0.2);
}

/* --- MOBIEL --- */

@media (max-width: 600px) {
    .mx_gallery_grid {
        /* Op kleine telefoons 2 foto's naast elkaar */
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .mx_news_item_image {
        border-radius: 20px; /* Iets kleinere hoeken op mobiel */
    }
}