.activiteit {
    display: flex;
    flex-direction: column;
    /* Changed to column for better alignment */
    align-self: stretch;
    justify-self: stretch;
    flex-grow: 1;
    flex-basis: 50%;
    cursor: pointer;
    /* Change cursor to pointer */
    transition: transform 0.2s ease;
    /* Add a subtle hover effect */
    /* padding: 1.5rem; */
}

.activiteit:hover {
    transform: scale(1.02);
    /* Slightly enlarge the card on hover */
}

.activiteit > * {
    /* flex: 1; */
    padding: 1rem;
    /* Add padding for better spacing */
}

/* seperate container for the img to make them respect the flex ratios */
.activiteit-img-container {
    flex-basis: 60%;
    flex-shrink: 1;
    flex-grow: 0;
    height: 40vh;
    overflow: hidden;
}

.activiteit-img {
    max-height:100%;
    height:100%;
    max-width:100%;
    width:100%;
    object-fit: cover;
}

.activiteit-info {
    flex-basis: 40%;
    flex-grow: 1
}

.top-container {
    display: flex;
    justify-content: space-between;
    height: fit-content;

    gap: 1rem;
}

/* General styling for the grid container */
#day-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 2rem;
    /* Space between different days */
}

/* Default grid layout for activities on the same day */
#activiteiten-grid {
    display: flex;
    flex-direction: row;
    /* Two columns for activities on the same day */
    gap: 2rem;
    /* Space between activities */
    max-width: 100%;
    /* Ensure the grid spans the full width */
}

/* Individual activity cards inside the grid */
#activiteiten-grid>card {
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

/* Responsive design for smaller screens */
@media only screen and (max-width: 1300px) {
    #activiteiten-grid {
        flex-direction: column;
    }

    #activiteiten-grid {
        width: 100% !important;
    }

    .top-container {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .activiteit-img-container {
        /* vertical align image overflowing */
        display: flex;
        justify-content: center;
        flex-flow: column;
    }
}

h1 {
    width: 100%;
    text-align: center;
}

h5 {
    margin-top: 1.5rem;
}

.activiteit > .activiteit-voorstelling {
    margin-top: 0rem;
    overflow: auto;
    
    /* Initially hide the paragraph */
    max-height: 0;
    border-width: 0px;
    padding-top: 0px;
    padding-bottom: 0px;
    
    transition: all 0.3s ease;
    /* Add a smooth transition for visibility */
}

/* .activiteit is required for specifity rules */
.activiteit > .open {
    /* Show the element */
    max-height: 20rem;
    border-top: 2px solid var(--a-color);
    padding-top: inherit;
    padding-bottom: inherit;
}
