/* ==========================================================================
   aw_berichten_popup
   ========================================================================== */

.aw-berichten-popup {
    --aw-bp-primary: #282358;
    --aw-bp-accent: #2683b8;
    --aw-bp-border: #e6e7ee;
    --aw-bp-text: #282358;
    --aw-bp-muted: #6b6f8a;
    --aw-bp-bg: #ffffff;
    --aw-bp-overlay: rgba(28, 33, 70, 0.72);
    --aw-bp-radius: 8px;
    --aw-bp-shadow: 0 4px 24px rgba(28, 33, 70, 0.10);
    --aw-bp-shadow-hover: 0 8px 32px rgba(28, 33, 70, 0.18);

    color: var(--aw-bp-text);
    font-family: inherit;
    width: 100%;
}

.aw-berichten-popup--leeg {
    padding: 24px;
    text-align: center;
    color: var(--aw-bp-muted);
}

/* ---------- Grid ---------- */

.aw-berichten-popup__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

/* ---------- Card ---------- */

.aw-berichten-popup__kaart {
    display: flex;
    flex-direction: column;
    background: var(--aw-bp-bg);
    border: 1px solid var(--aw-bp-border);
    border-radius: var(--aw-bp-radius);
    overflow: hidden;
    cursor: pointer;
    box-shadow: var(--aw-bp-shadow);
    transition: transform .25s ease, box-shadow .25s ease;
    text-align: left;
    outline: none;
}

.aw-berichten-popup__kaart:hover,
.aw-berichten-popup__kaart:focus-visible {
    transform: translateY(-3px);
    box-shadow: var(--aw-bp-shadow-hover);
}

.aw-berichten-popup__kaart:focus-visible {
    outline: 2px solid var(--aw-bp-accent);
    outline-offset: 2px;
}

.aw-berichten-popup__thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #f3f4f9;
}

.aw-berichten-popup__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .35s ease;
}

.aw-berichten-popup__kaart:hover .aw-berichten-popup__thumb img {
    transform: scale(1.04);
}

.aw-berichten-popup__thumb--leeg {
    background: linear-gradient(135deg, #e6e7ee 0%, #f3f4f9 100%);
}

.aw-berichten-popup__body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 18px 20px 20px;
    flex: 1;
}

.aw-berichten-popup__datum {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--aw-bp-muted);
}

.aw-berichten-popup__titel {
    margin: 0;
    font-size: 18px;
    line-height: 1.3;
    color: var(--aw-bp-primary);
}

.aw-berichten-popup__samenvatting {
    margin: 0;
    font-size: 14px;
    line-height: 1.55;
    color: var(--aw-bp-text);
    flex: 1;
}

.aw-berichten-popup__meer {
    margin-top: 6px;
    font-size: 14px;
    font-weight: 600;
    color: var(--aw-bp-accent);
    transition: color .2s ease;
}

.aw-berichten-popup__kaart:hover .aw-berichten-popup__meer {
    color: var(--aw-bp-primary);
}

/* ---------- Modal ---------- */

.aw-berichten-popup__modal[hidden] {
    display: none !important;
}

.aw-berichten-popup__modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    animation: awBpFade .2s ease-out;
}

@keyframes awBpFade {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.aw-berichten-popup__modal-overlay {
    position: absolute;
    inset: 0;
    background: var(--aw-bp-overlay);
    cursor: pointer;
}

.aw-berichten-popup__modal-dialog {
    position: relative;
    background: var(--aw-bp-bg);
    border-radius: var(--aw-bp-radius);
    max-width: 820px;
    width: 100%;
    max-height: calc(100vh - 48px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: awBpSlide .25s ease-out;
}

@keyframes awBpSlide {
    from { transform: translateY(16px); opacity: 0; }
    to   { transform: translateY(0); opacity: 1; }
}

.aw-berichten-popup__modal-sluit,
.aw-berichten-popup__modal-sluit:focus,
.aw-berichten-popup__modal-sluit:active {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.95);
    color: var(--aw-bp-primary);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
    transition: background .2s ease, color .2s ease, box-shadow .2s ease;
    padding: 0;
    outline: none;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}

.aw-berichten-popup__modal-sluit svg {
    display: block;
    margin-top: -1px;
}

.aw-berichten-popup__modal-sluit:hover {
    background: var(--aw-bp-primary);
    color: #fff;
}

.aw-berichten-popup__modal-sluit:focus-visible {
    background: var(--aw-bp-primary);
    color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18), 0 0 0 3px rgba(38, 131, 184, 0.45);
}

.aw-berichten-popup__modal-inhoud {
    overflow-y: auto;
    padding: 0 0 32px;
}

.aw-berichten-popup__modal-thumb {
    width: 100%;
    max-height: 360px;
    overflow: hidden;
    background: #f3f4f9;
}

.aw-berichten-popup__modal-thumb img {
    width: 100%;
    height: 100%;
    max-height: 360px;
    object-fit: cover;
    display: block;
}

.aw-berichten-popup__modal-datum {
    margin: 24px 32px 0;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--aw-bp-muted);
}

.aw-berichten-popup__modal-titel {
    margin: 8px 32px 20px;
    font-size: 28px;
    line-height: 1.25;
    color: var(--aw-bp-primary);
}

.aw-berichten-popup__modal-body {
    margin: 0 32px;
    font-size: 16px;
    line-height: 1.65;
    color: var(--aw-bp-text);
}

.aw-berichten-popup__modal-body > *:first-child {
    margin-top: 0;
}

.aw-berichten-popup__modal-body img {
    max-width: 100%;
    height: auto;
}

.aw-berichten-popup__modal-permalink {
    margin: 24px 32px 0;
    font-size: 14px;
}

.aw-berichten-popup__modal-permalink a {
    color: var(--aw-bp-accent);
    text-decoration: none;
    font-weight: 600;
}

.aw-berichten-popup__modal-permalink a:hover {
    text-decoration: underline;
}

/* ---------- Body lock ---------- */

body.aw-berichten-popup-open {
    overflow: hidden;
}

/* ---------- Responsive ---------- */

@media (max-width: 600px) {
    .aw-berichten-popup__grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .aw-berichten-popup__modal {
        padding: 0;
    }

    .aw-berichten-popup__modal-dialog {
        border-radius: 0;
        max-height: 100vh;
        height: 100vh;
    }

    .aw-berichten-popup__modal-titel {
        margin: 8px 20px 16px;
        font-size: 22px;
    }

    .aw-berichten-popup__modal-datum,
    .aw-berichten-popup__modal-permalink {
        margin-left: 20px;
        margin-right: 20px;
    }

    .aw-berichten-popup__modal-body {
        margin-left: 20px;
        margin-right: 20px;
        font-size: 15px;
    }
}
