/**
 * Gedeelde moderne verhaal-kaart (.story-card) voor alle kaart-rasters.
 *
 * Actief op elke container met de class .imb-cardgrid:
 *   - #vz-results          (zoekpagina + homepage-v2)
 *   - #related-verhalen-wrapper (single verhaal – "wellicht ook interessant")
 *   - #thema-verhalen-container (single thema)
 *
 * Wordt site-breed geladen via inc/story-cards.php (harmloos waar geen
 * .imb-cardgrid staat). Huisstijl: #db0e12, Pathway Gothic One, Cardo.
 *
 * @package understrap
 */

/* gelijke hoogtes in Bootstrap-kolom-contexten (related + thema) */
.imb-cardgrid .col-md-4 {
    display: flex;
    margin-bottom: 26px;
}

/* ---- kaart ---- */
.imb-cardgrid .story-card {
    height: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #ececec;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.05);
    padding: 0 20px 22px;
    text-align: left;
    font-size: 0.9rem;
    line-height: 1.45;
    color: #666;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.imb-cardgrid .story-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.12);
    border-color: #e0e0e0;
}

/* afbeelding – full-bleed bovenaan met hover-zoom */
.imb-cardgrid .entry-header {
    position: relative;
    margin: 0;
}

.imb-cardgrid .entry-header > a:first-child {
    display: block;
    margin: 0 -20px 14px;
    overflow: hidden;
    background: #f3f3f1;
    line-height: 0;
}

.imb-cardgrid .entry-header > a:first-child:empty {
    display: none;
}

.imb-cardgrid .entry-header > a:first-child img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.imb-cardgrid .story-card:hover .entry-header > a:first-child img {
    transform: scale(1.06);
}

/* thema-badge */
.imb-cardgrid .thema-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: #f7f7f5;
    border-radius: 999px;
    padding: 5px 12px;
    font-size: 0.78rem;
    font-weight: 700;
    color: #333;
    text-decoration: none;
    margin-bottom: 10px;
    transition: color 0.15s ease;
}

.imb-cardgrid .thema-link:hover {
    color: #db0e12;
}

.imb-cardgrid .thema-link .dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
}

/* titel */
.imb-cardgrid .entry-header > a:last-child {
    display: block;
    text-decoration: none;
}

.imb-cardgrid .entry-header h4 {
    margin: 0;
    text-align: left;
    font-family: "Pathway Gothic One", sans-serif;
    font-weight: 300;
    font-size: 1.4rem;
    line-height: 1.15;
    letter-spacing: 0.01em;
    color: #1f1f1f;
    transition: color 0.15s ease;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.imb-cardgrid .entry-header > a:last-child:hover h4 {
    color: #db0e12;
}

/* locatie */
.imb-cardgrid .story-card > span {
    display: block;
    text-align: left;
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #db0e12;
    margin-top: 9px;
    line-height: 1.3;
}

.imb-cardgrid .story-card > span:empty {
    display: none;
    margin: 0;
}

.imb-cardgrid .story-card > span a {
    color: inherit;
    text-decoration: none;
}

.imb-cardgrid .story-card > span a:hover {
    text-decoration: underline;
}

/* scheiding + meta-tekst */
.imb-cardgrid .story-card > hr {
    margin: 12px 0;
    border: 0;
    border-top: 1px solid #eee;
}

.imb-cardgrid .story-card > p {
    margin: 0;
}

@media (max-width: 575px) {
    .imb-cardgrid .story-card {
        padding: 0 14px 16px;
    }

    .imb-cardgrid .entry-header > a:first-child {
        margin: 0 -14px 12px;
    }

    .imb-cardgrid .entry-header > a:first-child img {
        height: 150px;
    }

    .imb-cardgrid .entry-header h4 {
        font-size: 1.2rem;
    }
}
