/* ============================================================
   POPUP MODAL
   ============================================================ */
.popup-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(15, 37, 56, 0.75);
    backdrop-filter: blur(5px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

.popup-overlay.is-visible,
.popup-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.popup-overlay.is-closed {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

.popup-container {
    position: relative;
    background: var(--wit);
    width: 92vw;
    max-width: 680px;
    max-height: 90vh;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
    display: grid;
    grid-template-columns: 1fr;
    transform: scale(0.95);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.popup-container.has-media,
.popup-container:has(.popup-media),
.popup-container:has(.popup-right) {
    max-width: 1240px;
    grid-template-columns: 480px 1fr;
}

.popup-overlay.is-visible .popup-container,
.popup-overlay.active .popup-container {
    transform: scale(1);
}

.popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    font-size: 1.4rem;
    color: var(--blauw);
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: background 0.3s ease, color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.popup-close:hover {
    background: var(--goud);
    color: var(--wit);
    transform: scale(1.05);
}

.popup-close:active {
    transform: scale(0.95);
}

.popup-body,
.popup-left {
    padding: 40px 36px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow-y: auto;
    max-height: 90vh;
}

.popup-title {
    font-size: clamp(1.2rem, 1.8vw, 1.6rem);
    font-weight: var(--font-weight-title);
    color: var(--blauw);
    margin-bottom: 0.25rem;
}

.popup-subtitle,
.popup-date {
    font-family: var(--font-heading);
    font-size: clamp(0.75rem, 1.2vw, 0.95rem);
    font-weight: 600;
    color: var(--goud);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.popup-text {
    font-size: 0.9rem;
    color: var(--grijs-donker);
    line-height: 1.55;
    margin-bottom: 0.75rem;
}

.popup-list {
    margin: 0.5rem 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.popup-list li {
    padding-left: 1.25rem;
    position: relative;
    font-size: 0.88rem;
    line-height: 1.5;
}

.popup-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--goud);
}

.popup-btn-wrapper,
.popup-actions {
    padding-top: 1rem;
}

.popup-media,
.popup-right {
    position: relative;
    width: 100%;
    min-height: 100%;
    background-color: var(--grijs-licht);
    border-left: 2px solid var(--goud);
}

.popup-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
}

@media (max-width: 1024px) {

    .popup-container,
    .popup-container.has-media,
    .popup-container:has(.popup-media),
    .popup-container:has(.popup-right) {
        grid-template-columns: 1fr;
        max-height: 90vh;
        overflow-y: auto;
        max-width: 520px;
    }

    .popup-media,
    .popup-right {
        height: 250px;
        min-height: 250px;
        border-top: 2px solid var(--goud);
        border-left: none;
    }

    .popup-body,
    .popup-left {
        padding: 32px 24px;
        order: -1;
        max-height: none;
        overflow-y: visible;
    }

    .popup-close {
        top: 12px;
        right: 12px;
        background: var(--wit);
    }
}