/* Basisstijl voor de carrousel */
.projectcarrousel {
    display: flex;
    flex-wrap: wrap;
    /* Laat items naar nieuwe regels gaan indien nodig */
    justify-content: space-between;
    /* Ruimte tussen items */
    gap: 20px;
    /* Ruimte tussen de items */
    padding: 10px;
    margin-bottom: 20px;
    margin-top: 20px;
}

/* Stijl voor individuele carrousel-items */
.carousel-item {
    flex: 1 1 calc(25% - 20px);
    /* Basis: 4 items naast elkaar */
    max-width: calc(25% - 20px);
    /* Beperking voor consistentie */
    border-radius: 10px;
    background-color: rgb(18, 26, 38);
    color: white;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    padding-bottom: 20px;
    padding-top: 20px;
}

.carousel-item img {
    max-width: 100%;
    /* Schaal de afbeelding proportioneel */
    height: auto;
    border-radius: 10px;
    margin-bottom: 10px;
}

.carousel-item h3 {
    font-size: 28px;
    margin: 10px 0;
}

.carousel-item p {
    font-size: 14px;
    margin: 10px 0;
    flex-grow: 1;
    /* Laat de beschrijving flexibel groeien */
    font-family: Arial, Helvetica, sans-serif;
    margin-left: 20px;
    margin-right: 2px;
}

.carousel-item a {
    text-decoration: none;
    color: white;
    background-color: red;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.carousel-item a:hover {
    background-color: darkred;
    transform: scale(1.05);
}

.carousel-item:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
}

/* Responsieve aanpassingen */

/* Bij schermen kleiner dan 1200px: 3 items naast elkaar */
@media (max-width: 1200px) {
    .carousel-item {
        flex: 1 1 calc(33.33% - 20px);
        /* 3 items naast elkaar */
        max-width: calc(33.33% - 20px);
    }
}

/* Bij schermen kleiner dan 900px: 2 items naast elkaar */
@media (max-width: 900px) {
    .carousel-item {
        flex: 1 1 calc(50% - 20px);
        /* 2 items naast elkaar */
        max-width: calc(50% - 20px);
    }
}

/* Bij schermen kleiner dan 600px: 1 item per regel */
@media (max-width: 600px) {
    .carousel-item {
        flex: 1 1 100%;
        /* Volledige breedte per item */
        max-width: 100%;
    }
}