/* ================================
   PARALLAX SECTIES
   ================================ */
.aprilia-parallax,
.berini21-parallax,
.berini36-parallax,
.jamathi1-parallax,
.jamathi2-parallax,
.magneet-parallax {
    min-height: 100vh;
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

.parallex-content {
    background-color: #e0dddd;
    padding: 50px;
    text-align: center;
}

/* Achtergrond afbeeldingen per project */
.aprilia-parallax {
    background-image: url('../images/projecten/aprilia/aprilia.jpg');
}
.berini21-parallax {
    background-image: url('../images/projecten/berini21/berini.jpg');
}
.berini36-parallax {
    background-image: url('../images/projecten/berini36/berini36.jpg');
}
.jamathi1-parallax {
    background-image: url('../images/projecten/jamathiGeel/jamathi.jpg');
}
.jamathi2-parallax {
    background-image: url('../images/projecten/jamathiRood/jamathi.jpg');
}
.magneet-parallax {
    background-image: url('../images/projecten/magneet/magneetWallpaper.png');
}


/* ================================
   PROJECT CONTAINER
   ================================ */
.project-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    width: 100%;
}

.project-container img {
    width: 100%;
    height: clamp(180px, 18vw, 300px);
    border-radius: 8px;
    object-fit: cover;
    display: block;
    cursor: zoom-in;
}


/* ================================
   TABELLEN / CONTAINERS
   ================================ */
.table-container {
    background-color: #fff;
    border-radius: 12px;
    padding: 25px;
    max-width: 1200px;
    width: 100%;
    margin: 40px auto;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

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

.table-container table {
    margin: 0 auto;
}

.project-table {
    width: 90%;
    border-collapse: collapse;
    margin-top: 20px;
    background-color: #fafafa;
    border-radius: 8px;
    overflow: hidden;
}

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

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

.projecten-info hr {
    border: 1px solid #ddd;
    margin-bottom: 15px;
}

table {
    width: 100%;
    border-collapse: collapse;
}

table td {
    padding: 8px;
    border-bottom: 1px solid #ddd;
}

table td:first-child {
    font-weight: bold;
    width: 20%;
}

.project-table tbody tr {
    display: none; /* standaard verberg alles */
}

.project-table tbody tr:nth-child(-n+3) {
    display: table-row; /* toon de eerste 3 rijen */
}

.lees-meer-btn {
    display: block;
    margin: 20px auto;
    padding: 10px 20px;
    background-color: #db3434;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
}

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


/* ================================
   TEKST BLOK
   ================================ */
.text-container {
    max-width: 900px;
    width: 100%;
    margin: 50px auto;
    padding: 0 20px;
    text-align: center;
    line-height: 1.6;
    box-sizing: border-box;
}


/* ================================
   SPECS SECTIE
   ================================ */
.specs-container {
    display: flex;
    gap: 80px;
    align-items: flex-start;
    max-width: 1200px;
    width: 100%;
    margin-top: 75px;
}

.specs-image img {
    width: 100%;
    max-width: 650px;
    border-radius: 8px;
    cursor: zoom-in;
}

.specs-table-container {
    flex: 1;
}

.specs-table-container h2 {
    text-align: center;
    margin-bottom: 12px;
    font-size: 26px;
    font-weight: 700;
    position: relative;
}

.specs-table-container h2::after {
    content: "";
    display: block;
    width: 100%;
    height: 2px;
    background-color: #000;
    margin: 8px auto 0;
}

.specs-table {
    margin-top: 18px;
    position: relative;
}

.specs-table::before {
    content: "";
    position: absolute;
    left: 200px;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: #000;
}

.specs-table .row {
    display: grid;
    grid-template-columns: 200px 1fr;
    margin-bottom: 14px;
    gap: 20px;
}

.specs-table .label {
    font-weight: 700;
    font-size: 18px;
}

.specs-table .value {
    font-size: 18px;
    line-height: 1.45;
}

.divider {
    width: 100%;
    height: 2px;
    background-color: #000;
    margin: 100px 0;
}


/* ================================
   WERK / SLIDER SECTIE
   ================================ */
.werk-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    width: 100%;
    margin: 40px auto;
    padding: 0 20px;
    gap: 0;
}

.werk-tekst {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: center;
}

.werk-tekst h2 {
    font-size: 28px;
    margin-bottom: 15px;
    margin-left: 35%;
    text-align: center;
}

.werk-foto {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin: 0;
    padding: 0;
}

.slider {
    position: relative;
    width: auto;
    display: block;
}

.slides {
    display: block;
}

.slide {
    width: 75%;
    height: auto;
    display: none;
    border-radius: 8px;
    object-fit: cover;
    margin-left: auto;
    cursor: zoom-in;
}

.slide.active {
    display: block;
}

.nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    border: none;
    font-size: 28px;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 6px;
    z-index: 10;
}

.prev {
    left: calc(25% - 45px);
}

.next {
    right: -48px;
}

.nav:hover {
    background: rgba(0, 0, 0, 0.7);
}


/* ================================
   MERK / CATEGORIE KAARTEN
   ================================ */
.merk-tekst-boven {
    max-width: 900px;
    margin: 40px auto 20px;
    padding: 0 20px;
    text-align: center;
    line-height: 1.6;
}

.merk-container {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 30px;
}

.merk-container > div {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-align: center;
    padding: 16px;
    cursor: pointer;
}

.merk-container > div img {
    width: 100%;
    max-width: 280px;
    height: auto;
    display: block;
    margin: 0 auto;
    border-radius: 8px;
    object-fit: contain;
    cursor: default;
}

@media (max-width: 900px) {
    .merk-container {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    .merk-container {
        grid-template-columns: 1fr;
    }
}


/* ================================
   INFO SECTIES + GALLERY
   ================================ */
.info-sections {
    width: 100%;
}

.info-section {
    max-width: 1200px;
    margin: 60px auto;
    padding: 0 20px;
    box-sizing: border-box;
}

.info-section__text {
    max-width: 900px;
    margin: 0 auto 24px;
    text-align: center;
    line-height: 1.6;
}

.info-section__text h2 {
    margin-bottom: 12px;
}

.info-gallery {
    display: grid;
    gap: 20px;
    justify-content: center;
    align-items: start;
}

.info-gallery img {
    width: 100%;
    height: clamp(180px, 22vw, 320px);
    border-radius: 8px;
    object-fit: cover;
    display: block;
    cursor: zoom-in;
}

.info-gallery--1 {
    grid-template-columns: minmax(260px, 650px);
}

.info-gallery--2 {
    grid-template-columns: repeat(2, minmax(240px, 520px));
}

.info-gallery--3 {
    grid-template-columns: repeat(3, minmax(220px, 1fr));
}

@media (max-width: 900px) {
    .info-gallery--3 {
        grid-template-columns: repeat(2, minmax(220px, 1fr));
    }
}

@media (max-width: 620px) {
    .info-gallery--2,
    .info-gallery--3 {
        grid-template-columns: minmax(260px, 650px);
    }
}


/* ================================
   LIGHTBOX
   ================================ */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.86);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    z-index: 9999;
}

.lightbox.is-open {
    display: flex;
}

.lightbox__img {
    max-width: min(92vw, 1200px);
    max-height: 88vh;
    width: auto;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.lightbox__close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    border: none;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    font-size: 30px;
    line-height: 44px;
    cursor: pointer;
}

.lightbox__close:hover {
    background: rgba(255, 255, 255, 0.22);
}

body.lightbox-open {
    overflow: hidden;
}

/* ================================
   MOBILE RESPONSIVE OVERRIDES
   ================================ */
@media (max-width: 768px) {

    /* ------------------------------
       BASIS OVERRIDES
    ------------------------------ */
    html, body {
        overflow-x: hidden;
    }

    /* ===== PARALLAX SECTIES ===== */
    .aprilia-parallax,
    .berini21-parallax,
    .berini36-parallax,
    .jamathi1-parallax,
    .jamathi2-parallax,
    .magneet-parallax {
        background-attachment: scroll; /* fixed werkt niet goed op mobiel */
        min-height: 50vh;              /* iets korter voor mobiel */
    }

    /* ===== PROJECT CONTAINER ===== */
    .project-container {
        grid-template-columns: 1fr; /* stapel alle afbeeldingen onder elkaar */
    }

    /* ===== SPECS SECTIE ===== */
    .specs-container {
        flex-direction: column; /* stapel afbeelding boven tabel */
        text-align: center;
        align-items: center;
        gap: 30px;
    }

    .specs-image img {
        max-width: 100%;
        width: 100%;
    }

    .specs-table-container {
        width: 100%;
    }

    .specs-table::before {
        display: none; /* verwijder verticale lijn voor mobiel */
    }

    .specs-table .row {
        grid-template-columns: 1fr; /* label boven value */
        gap: 8px;
    }

    .specs-table .label,
    .specs-table .value {
        font-size: 16px;
    }

    /* ===== WERK / SLIDER ===== */
    .werk-container {
        flex-direction: column;
        align-items: center;
        gap: 20px;
        padding: 0 10px;
    }

    .werk-tekst {
        align-items: center;
        text-align: center;
        margin: 0;
    }

    .werk-tekst h2 {
        margin-left: 0;
        font-size: 22px;
    }

    .werk-foto {
        justify-content: center;
    }

    .slider {
        width: 100%;
        position: relative; /* container blijft display: block zodat JS werkt */
    }

    /* ------------------------------
       SLIDES RESPONSIVE
       - standaard: halve scherm breedte
       - groter: 65% scherm breedte
    ------------------------------ */
    .slide {
        width: 50%;         /* standaard breedte */
        max-width: 320px;   /* voorkom te grote afbeeldingen */
        height: auto;
        margin-left: auto;
        margin-right: auto;
        display: block;     /* essentieel voor actieve slide */
    }

    .slide.active {
        display: block;     /* actieve slide zichtbaar */
    }

    .slide:not(.active) {
        display: none;      /* niet-actieve slides verborgen */
    }

    /* grotere slides op mobiel */
    .slide {
        width: 65%;         /* groter dan 50% */
        max-width: 380px;
    }

    /* pijlen naast actieve slide */
    .prev {
        left: calc(50% - 200px);
    }

    .next {
        right: calc(50% - 200px);
    }

    /* ===== MERK / CATEGORIE KAARTEN ===== */
    .merk-container {
        grid-template-columns: 1fr; /* stapel kaarten op klein scherm */
        gap: 20px;
    }

    /* ===== INFO SECTIES + GALLERY ===== */
    .info-gallery--1,
    .info-gallery--2,
    .info-gallery--3 {
        grid-template-columns: 1fr; /* alles onder elkaar op mobiel */
    }

    /* ===== TABLE CONTAINERS ===== */
    .table-container,
    .specs-table-container {
        width: 100%;
        max-width: 100%;
        margin: 20px auto;
        padding: 10px 15px;
        box-sizing: border-box;
    }

    .table-container table,
    .project-table,
    .specs-table {
        width: 100%;
        max-width: 100%;
        margin: 0 auto;
        display: table;
    }

    .table-container table td,
    .project-table td,
    .specs-table .row {
        word-break: break-word;
    }

    /* Specs labels en values stapelen */
    .specs-table .row {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    /* ===== TEKST BLOK ===== */
    .text-container {
        padding: 0 15px;
        margin-top: 30px;
        margin-bottom: 30px;
    }
}