/* RESET */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* BASE */
html, body {
    height: 100%;
    overflow: hidden;
}

body {
    background-color: #000;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* NAVIGATIE */
.topbar {
    position: absolute;
    top: 40px;
    width: 100%;
    z-index: 20;
    display: flex;
    justify-content: center;
    padding: 15px 0;
}

.nav {
    display: flex;
    align-items: center;
    gap: 32px;
    font-size: 1.15rem;
    font-weight: 600;
    font-family: Georgia, "Times New Roman", serif;
    margin-left: -60px;
}

.nav-link {
    text-decoration: none;
    color: #ffffff;
    position: relative;
    padding-bottom: 4px;
}

.nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 0;
    height: 3px;
    background-color: #c05621;
    transition: width 0.25s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* HERO */
.hero {
    height: 100vh;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.hero-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

/* CONTENT */
.hero-content {
    position: absolute;
    top: 140px;
    width: 100%;
    height: calc(100% - 140px);
    z-index: 2;
}

/* TITEL */
.title-right {
    position: absolute;
    right: 60px;
    top: 0;
    text-align: right;
}

.title-right h1 {
    font-size: 4rem;
    font-family: Georgia, serif;
    color: #fff;
    text-shadow: 0 0 12px rgba(0,0,0,0.6);
}

.subtitle {
    margin-top: 10px;
    font-size: 1.3rem;
    color: #e6d5c3;
}

/* BLOKKEN LINKS */
.left-side {
    position: absolute;
    left: 60px;
    top: 200px;
    width: 32%;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.project-card {
    background: rgba(43,43,43,0.85);
    padding: 20px;
    border-radius: 16px;
    color: #fff;
    box-shadow: 0 8px 20px rgba(0,0,0,0.4);
    transition: 0.2s ease;
}

.project-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 28px rgba(0,0,0,0.6);
}

.project-card h3 {
    color: #c05621;
    font-family: Georgia, serif;
}

/* HOVER-ZONE */
.hover-zone {
    position: relative;
}

/* SUBPROCESSEN */
.subprocess-container {
    position: absolute;
    left: 110%;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0;
    pointer-events: none;

    transition: opacity 0.4s ease, transform 0.4s ease;

    display: flex;
    gap: 70px;
    align-items: center;
}

/* ⭐ ACTIVE STATE (JS voegt .open toe) */
.subprocess-container.open {
    opacity: 1;
    pointer-events: auto;
}

/* SUBPROCESS-CARD */
.subprocess-card {
    display: block;
    text-decoration: none;
    color: #ffffff;

    position: relative;
    background: rgba(43,43,43,0.9);
    padding: 12px 16px;
    border-radius: 12px;
    width: 260px;
    max-width: 260px;
    font-size: 0.95rem;
    box-shadow: 0 6px 16px rgba(0,0,0,0.4);

    white-space: normal;
    word-break: break-word;

    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.5s ease, transform 0.5s ease;

    z-index: 5;
}

.subprocess-container.open .subprocess-card {
    opacity: 1;
    transform: scale(1);
}

.delay1 { transition-delay: 0.15s; }
.delay2 { transition-delay: 0.30s; }
.delay3 { transition-delay: 0.45s; }

/* CURVE */
.curve {
    position: absolute;
    left: -70px;
    top: 50%;
    transform: translateY(-50%);
    width: 70px;
    height: 40px;
    overflow: visible;
    pointer-events: none;
    z-index: 1;
}

.curve path {
    fill: none;
    stroke: #c05621;
    stroke-width: 3;
    stroke-linecap: round;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.subprocess-container.open .curve path {
    opacity: 1;
}
/* --- MOBIELE OPTIMALISATIE --- */

@media screen and (max-width: 1024px) {
    /* Stap 1: Zorg dat we kunnen scrollen op mobiel */
    html, body {
        overflow-y: auto; 
        height: auto;
    }

    /* Stap 2: Header en Navigatie aanpassen */
    .topbar {
        position: relative;
        top: 0;
        padding: 20px 0;
        background: rgba(0,0,0,0.8); /* Iets donkerder voor leesbaarheid */
    }

    .nav {
        margin-left: 0;
        gap: 20px;
        font-size: 1rem;
    }

    /* Stap 3: Hero sectie flexibel maken */
    .hero {
        height: auto;
        min-height: 100vh;
        display: flex;
        flex-direction: column;
    }

    .hero-content {
        position: relative;
        top: 0;
        height: auto;
        padding: 40px 20px;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    /* Stap 4: Titel centreren */
    .title-right {
        position: relative;
        right: 0;
        text-align: center;
        margin-bottom: 40px;
    }

    .title-right h1 {
        font-size: 2.5rem;
    }

    .subtitle {
        font-size: 1.1rem;
    }

    /* Stap 5: De blokken onder elkaar zetten */
    .left-side {
        position: relative;
        left: 0;
        top: 0;
        width: 100%;
        max-width: 500px; /* Zodat het op tablets niet té breed wordt */
        gap: 15px;
    }

    .project-card {
        padding: 15px;
        text-align: center;
    }

    /* Stap 6: Subprocessen (de popups) */
    /* Op mobiel werken die zwevende menu's aan de rechterkant niet. 
       We zetten ze nu simpelweg onder de hoofdkaart als ze open gaan. */
    .subprocess-container {
        position: relative;
        left: 0;
        top: 0;
        transform: none;
        flex-direction: column;
        gap: 10px;
        width: 100%;
        margin-top: 10px;
    }

    .subprocess-card {
        width: 100%;
        max-width: 100%;
        transform: none;
    }

    /* De verbindingslijntjes (curves) verbergen op mobiel, die zien er dan gek uit */
    .curve {
        display: none;
    }
}