/* Responsive design for mobile */
@media (max-width: 700px) {
    main.evenementen {
        max-width: 100%;
        padding: 0.5rem;
    }
    .Evenement {
        flex-direction: column;
        align-items: center;
        text-align: center;
        max-width: 100%;
        min-height: auto;
        padding: 0.5rem;
    }
    .Evenement img {
        width: 100%;
        height: 160px;
        flex: 0 0 auto;
    }
    .EventInfo {
        text-align: center;
        font-size: 1rem;
        padding: 0.5rem;
    }
}
/* Modal centering en styling zoals Optocht.css */
.modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.5);
    z-index: 1500;
}
.modal[hidden] {
    display: none !important;
}
.modal-form {
    background: #fff;
    padding: 1.5rem;
    max-width: 520px;
    width: 95%;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.modal-form label { display: block; margin-bottom: 1rem; }
.modal-form input, .modal-form textarea {
    width: 100%;
    padding: .5rem;
    margin-top: .25rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}
.modal-form .buttons {
    margin-top: 1rem;
    text-align: right;
    gap: .5rem;
    display: flex;
    justify-content: flex-end;
}
.modal-form button {
    padding: .5rem 1rem;
    border-radius: 4px;
    border: 1px solid #ddd;
    background: #fff;
    cursor: pointer;
}
.modal-form button[type="submit"] {
    background: #4CAF50;
    color: white;
    border-color: #45a049;
}
 main.evenementen {
            max-width: 1000px;
            margin: 1rem auto;
            padding: 0 1rem;
            display: flex;
            flex-direction: column; /* 1 kaart per rij */
            align-items: center;    /* centreer de kaarten */
            gap: 1rem;
        }
        /* Elke evenementkaart: vaste breedte en minimale hoogte (250px) */
        .Evenement {
            display: flex;
            flex-direction: row; /* foto links, content rechts */
            gap: 1rem;
            align-items: flex-start;
            background: #fff;
            padding: 1rem;
            border-radius: 6px;
            box-shadow: 0 1px 4px rgba(0,0,0,0.05);
            width: 100%;          /* gebruik volledige rijbreedte binnen max-width */
            max-width: 700px;     /* beperk maximale breedte voor leesbaarheid */
            min-height: 140px;
            box-sizing: border-box;
            text-align: left;
        }
        /* Maak de afbeelding binnen de kaart passen en zet deze links */
        .Evenement img {
            width: 180px;
            height: 200px;
            flex: 0 0 180px;
            border-radius: 6px;
            object-fit: cover;
            display: block;
        }
        .EventInfo {
            flex: 1 1 auto;
            text-align: left;
        }
        .EventInfo h3 {
            margin:0 0 .25rem 0; font-size: 1rem; 
        }

        /* Responsive: op smalle schermen stapelen we weer */
        @media (max-width: 600px) {
            .Evenement {
                flex-direction: column;
                align-items: center;
                text-align: center;
            }
            .Evenement img {
                width: 100%;
                height: 180px;
                flex: 0 0 auto;
            }
            .EventInfo { text-align: center; }
        }

/* Image modal (lightbox) */
.image-modal {
    position: fixed;
    inset: 0;
    display: none; /* shown via JS */
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.85);
    z-index: 2000;
    padding: 1rem;
}
.image-modal.open { display: flex; }
.image-modal img {
    max-width: 95%;
    max-height: 90%;
    border-radius: 6px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.6);
}
.image-modal .caption {
    color: #fff;
    margin-top: 0.75rem;
    text-align: center;
}
.image-modal .close-btn {
    position: absolute;
    right: 16px;
    top: 12px;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 28px;
    cursor: pointer;
}
        .event-date {
            font-weight:600; margin:0 0 .5rem 0;
         }
        
        .event-form { 
            max-width:520px; margin:0 auto; background:#fff; padding:1rem; border-radius:8px; 
        }
        .event-form input, .event-form textarea { 
            width:100%; padding:.5rem; margin-top:.25rem; border:1px solid #ddd; border-radius:4px; 
        }
        .event-form .buttons { 
            display:flex; justify-content:flex-end; gap:.5rem; margin-top:.5rem; 
        }
        .event-form label { 
            display: block; margin-bottom: 1rem; 
        }
        .event-form .current-image { 
            max-width: 200px; margin-top: 0.5rem; 
        }