/* 1. Grid-Container auf Flexbox mit 3 gleich hohen Spalten pro Reihe umstellen */
.home .mpc-grid-posts {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: stretch !important;
    margin-left: -35px !important;
    margin-bottom: -35px !important;
    height: auto !important;
    overflow: visible !important;
}

/* Unsichtbares Isotope-Sizer-Element ausblenden */
.home .mpc-grid-posts .mpc-grid-sizer {
    display: none !important;
}

/* 2. Einzelne Beitrags-Karte auf 3 Spalten setzen & JS-Positionierung aufheben */
.home .mpc-grid-posts > .mpc-post {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    transform: none !important;
    width: 33.3333% !important;
    display: flex !important;
    flex-direction: column !important;
}

/* Tablet: 2 Spalten | Smartphone: 1 Spalte */
@media (max-width: 991px) {
    .home .mpc-grid-posts > .mpc-post {
        width: 50% !important;
    }
}
@media (max-width: 600px) {
    .home .mpc-grid-posts > .mpc-post {
        width: 100% !important;
    }
}

/* 3. Inneren Wrapper auf volle Kartenhöhe strecken */
.home .mpc-grid-posts .mpc-post__wrapper {
    display: flex !important;
    flex-direction: column !important;
    flex-grow: 1 !important;
    height: calc(100% - 35px) !important;
    margin-left: 35px !important;
    margin-bottom: 35px !important;
}

/* 4. Beitragsbild-Rahmen auf feste Höhe setzen & mit #2769B5 umranden */
.home .mpc-grid-posts .mpc-post__thumbnail {
    height: 253px !important; /* Gewünschte Bildhöhe anpassen */
    min-height: 253px !important;
    max-height: 253px !important;
    width: 100% !important;
    overflow: hidden !important;
    position: relative !important;
    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
    flex-shrink: 0 !important;
    box-sizing: border-box !important;
    border: 2px solid #2769B5 !important; /* Rahmenfarbe & -stärke */
    border-bottom: none !important; /* Nahtloser Übergang zum blauen Textblock */
}

/* Eingebettete Bilder exakt in den Rahmen einpassen */
.home .mpc-grid-posts .mpc-post__thumbnail img {
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    object-fit: cover !important;
    object-position: center center !important;
    display: block !important;
}

/* 5. NUR den Textblock UNTERHALB des Bildes auf gleiche Höhe strecken */
.home .mpc-grid-posts .mpc-post__wrapper > .mpc-post__content {
    flex-grow: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
}