/* ===== Algemene reset ===== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    overflow-x: hidden;
}

/* ===== Header / Onderdelen bovenaan ===== */
.onderdelen-container {
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 15px;
    width: 72.75%;
    height: 400px;
    margin: 2% auto 0 auto;
}

.foto-container {
    position: relative;
    width: 70%;
    height: 400px;
    display: flex;
    margin-left: 9%;
    justify-content: center;
    align-items: center;
}

/* Piston afbeeldingen */
.piston-arms {
    position: absolute;
    width: 75%;
    transform: translate(-11%, 8%);
}

.pistonheads {
    position: absolute;
    width: 20%;
}

.pistonhead-links {
    top: 1%;
    left: 13.75%;
    animation: rotate-shake 1.5s ease-out 3;
}

.pistonhead-rechts {
    top: 1%;
    right: 29%;
    animation: rotate-shake 1.5s ease-out 3;
}

/* ===== Carousel ===== */
.carousel-container {
    position: relative;
    width: 100%;
    max-width: 1210px;
    height: 400px;
    margin: 2% auto 0 auto;
    overflow: hidden;
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.carousel {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.carousel-item {
    flex: 0 0 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.carousel-item img {
    max-width: 45%;
    margin-top: 2.5%;
    margin-right: 4.75%;
    height: auto;
    border-radius: 8px;
}

.project-info {
    width: 45%;
}

.project-info h2 {
    margin-bottom: 10px;
    text-align: center;
    font-size: 1.5em;
    color: #333;
}

/* ===== Carousel knoppen ===== */
.button-container {
    display: flex;
    justify-content: center;
    margin-top: 2%;
}

.carousel-button {
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 10px;
    cursor: pointer;
    border-radius: 10px;
    font-size: 20px;
    width: 60px;
    margin: 0 10px;
    transition: background-color 0.3s ease;
}

.carousel-button:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

/* ===== Tabel sectie ===== */
.table-container {
    background-color: white;
    border-radius: 12px;
    padding: 25px;
    max-width: 1210px;
    width: 100%;
    margin: 40px auto;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    text-align: center;
}

.table-container h2 {
    margin-bottom: 20px;
}

.project-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 auto;
    background-color: #fafafa;
    border-radius: 8px;
    overflow: hidden;
}

.project-table th,
.project-table td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: center;
}

.project-table th {
    background-color: #db3434;
    color: white;
}

.project-table tbody tr {
    display: none;
}

.project-table tbody tr:nth-child(-n+3) {
    display: table-row;
}

/* ===== Lees meer knop ===== */
.lees-btn {
    display: block;
    max-width: 130px;
    margin: 20px auto;
    text-align: center;
    padding: 10px 20px;
    background-color: #db3434;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
}

.lees-btn:hover {
    background-color: #b02a2a;
}

/* ===== Animatie ===== */
@keyframes rotate-shake {
    0% { transform: rotate(0deg); }
    10% { transform: rotate(-10deg); }
    20% { transform: rotate(10deg); }
    30% { transform: rotate(-8deg); }
    40% { transform: rotate(8deg); }
    50% { transform: rotate(-6deg); }
    60% { transform: rotate(6deg); }
    70% { transform: rotate(-4deg); }
    80% { transform: rotate(4deg); }
    90% { transform: rotate(-2deg); }
    100% { transform: rotate(0deg); }
}

/* ===== Mobiel responsive ===== */
@media (max-width: 768px) {

    /* Header / piston */
    .onderdelen-container {
        width: 90%;
        height: 200px;
        padding: 10px;
    }

    .foto-container {
        width: 90%;
        height: 200px;
        margin-left: 0;
    }

    .piston-arms {
        width: 90%;
        transform: translate(-5%, 5%);
    }

    .pistonheads {
        width: 20%;
    }

    .pistonhead-links {
        top: 5%;
        left: 14%;
        animation: rotate-shake 1.2s ease-out 3;
    }

    .pistonhead-rechts {
        top: 5%;
        right: 21%;
        animation: rotate-shake 1.2s ease-out 3;
    }

    /* Carousel */
    .carousel-container {
        width: 100%;
        max-width: 390px;
        overflow: hidden;
        padding: 5px;
        height: auto; 
    }

    .carousel-item {
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding: 10px;
    }

    .carousel-item img {
        width: 100%;
        margin-bottom: 15px;
    }

    .project-info {
        width: 100%;
        padding: 0;
        text-align: center;
    }

    .project-info h2 {
        font-size: 1.2em;
        margin-bottom: 10px;
    }

    .lees-btn {
        max-width: 120px;
        margin: 10px auto 0 auto;
        font-size: 14px;
        padding: 8px 15px;
    }

    .carousel-button {
        width: 50px;
        height: 50px;
        font-size: 18px;
        border-radius: 8px;
    }

    /* Tabel */
    .table-container {
        max-width: 390px;
        padding: 15px;
    }

    .project-table th,
    .project-table td {
        padding: 8px;
        font-size: 14px;
    }
}