body {
    background-color: black ! important; /* de achtergrond wordt al niet belangrijk gezet */
    color: white;
    font-family: Calibri, Arial, sans-serif;
    margin-left: 0px;
    margin-right: 0px;
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 16px);
}

/* menu */

section {
    margin: 0px 3vw;
    min-width: 230px;
    flex-shrink: 0;
}

img.logo{
    position: absolute;
    top: -18px;
    left: 3vw;
    display: block;
    width: 100px;
}

.small-logo {
    display:none;
}

nav {
    padding-right: 20px;
    margin-top: 7px;
    border: solid 2px red;

    background-color: #111;
    /*background-color: black*/

    box-shadow: 0 10px 30px rgba(255, 0, 0, 0.5), 
                0 0 10px rgba(255, 0, 0, 0.2);
}

nav ul li {
    list-style: none;
    color: white;
    line-height: 40px;
}
nav ul li:hover {
    list-style: disc;
    color: red;
    font-size: 1.11em;
}

#special:hover {
    color: white;
    list-style: none;
    font-size: 1em;
}

#page {
    color: red;
}

a.menu {
    text-decoration: none;
    color: white;
}

article {
    margin: auto;

}

/* content */
a#beschrijving-link1, a#beschrijving-link2 {
    text-decoration: none;
    color: red;
}

header {
    /*border: solid white 1px;*/
    padding: 0px 2px;
    margin-bottom: 50px;
    width: 1120px;
}

header.title {
    margin-bottom: 0px;
}

h1 {
    font-size: 1.5rem;
    color: red;
    margin-top: 16px;
}

span {
    line-height: 25px;
}

/* tegelgrootte, aangepast door de knoppen boven de projecten */
article.main {
    --tegel-breedte: 90px;
    --tegel-hoogte: 66px;
}

/* 2 tegels per rij */
article.main:has(#kolommen-2:checked) {
    --tegel-breedte: 190px;
    --tegel-hoogte: 139px;
}

/* 3 tegels per rij */
article.main:has(#kolommen-3:checked) {
    --tegel-breedte: 124px;
    --tegel-hoogte: 91px;
}

img.album, img.video, img.mixed {
    width: var(--tegel-breedte);
    height: var(--tegel-hoogte);
    padding-right: 6px;
    padding-bottom: 6px;
    float: none;
    /*float: left;*/

    /* vult de tegel zonder de foto uit te rekken */
    object-fit: cover;
}

img.album {
    transition: opacity 0.25s ease;
}

div.images:hover img.album {
    opacity: 0.5;
}

div.images img.album:hover {
    opacity: 1;
}

/* knoppen voor het aantal tegels per rij, boven de projecten */
.kolommen {
    padding: 3px;
    padding-bottom: 6px;
}

.kolommen input {
    display: none;
}

.kolommen label {
    display: none;
    margin-right: 4px;
    width: 18px;
    height: 18px;
    color: white;
    font-size: 18px;
    line-height: 18px;
    text-align: center;
    cursor: pointer;
    user-select: none;
}

.kolommen label:hover {
    color: red;
}

#kolommen-4:checked ~ label.min[for="kolommen-4"],
#kolommen-3:checked ~ label.min[for="kolommen-4"],
#kolommen-2:checked ~ label.min[for="kolommen-3"],
#kolommen-4:checked ~ label.plus[for="kolommen-3"],
#kolommen-3:checked ~ label.plus[for="kolommen-2"],
#kolommen-2:checked ~ label.plus[for="kolommen-2"] {
    display: inline-block;
}

#kolommen-4:checked ~ label.min[for="kolommen-4"],
#kolommen-2:checked ~ label.plus[for="kolommen-2"] {
    color: grey;
    cursor: default;
}

figure {
    margin: 0; /* adjust as needed */
    padding: 0;
    left: 850px;
    /*float: left;*/
    /*left: 600px;*/
}


figure img, figure video {
    vertical-align: top;
    max-height: 400px;
    max-width: 680px;
    /*height: 400px;*/
}

video {
    visibility: visible;
    background-color: white;

}

figure figcaption {
    
    left: 710px;
    top: 640px;
    display: inline;
    /*text-align: center;*/
    max-width: 680px;
}


img.figcap {
    /*float: right;*/
    /*
    left: 600px;
    display: inline;*/
    padding: 5px;
    padding-top: 15px;
    width: 70px;
    height: 48px;

    /* vult de tegel zonder de foto uit te rekken */
    object-fit: cover;
}

img.figcap:hover {
    transform: scale(1.04);
}

/* footer */

article.center {
    border-top: 1px solid #333;
    padding-top: 15px;
    margin: 30px 0 20px;
    text-align: center;
    
    /*
     position

    left: 560%;
    bottom: 0;
    height: 50px;
    overflow: hidden;
    */

}

footer p {
    display: inline-block;
    color: grey;
}

p.footer:nth-child(even) {
    color: red;
}

footer p.footer:last-child {
    color: red;
    text-decoration: none;
}

a.email {
    text-decoration: none;
    color: red;
}

a.email:hover {
    text-decoration: underline;
}

.footer-text {
	display:block;
}

.footer-icons {
	display:none;
}

/* Info box */

.image-tooltip-wrapper {
    position: relative;
    display: inline-block; /* Zorgt dat de container niet breder is dan de foto */
}

.floating-bubble {
    position: absolute;
    top: 48%;           /* Start in het midden van de hoogte */
    left: 105%;         /* Plaatst de bubble direct rechts van de afbeelding */
    transform: translateY(-50%) translateX(10px); /* Centreert verticaal en start iets naar rechts */
    height:40px;
    width: 250px;
    padding: 13px;
    background-color: #222222;
    color: #fff;
    border-radius: 0px 10px 10px 0px;
    border-left: 5px solid red;
    
    /* Verbergen */
    visibility: hidden;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 999;       /* Zorgt dat hij bovenop ALLES zweeft */
    pointer-events: none;
}

.floating-bubble p{
    font-family: sans-serif;
    font-size: 14px;

margin-top: auto;

overflow: hidden;
white-space: nowrap; /* Don't forget this one */
text-overflow: ellipsis;
}


/* Hover effect */
.image-tooltip-wrapper:hover .floating-bubble {
    visibility: visible;
    opacity: 1;
    transform: translateY(-50%) translateX(0); /* Schuift zachtjes op zijn plek */
}



p.footer-namen {
    margin: 0 0 12px;
    color: grey;
}

/* copyright onder de contactgegevens */
p.footer-copyright {
    margin-top: 10px;
    font-size: 0.75em;
    color: #555;
}

/* positioning */
.flex-container {
    margin-top: 1vw;
    display: grid;
    grid-template-columns: minmax(auto, 1fr) auto minmax(auto, 1fr);
    flex-grow: 1;
    align-content: start;
}

section {
    justify-self: start;
}

nav {
    font-size: 1.1em;
    min-height: 420px;
    margin-top: 140px;
}

article.main {
    flex-shrink: 0;
    align-self:center;
}

figure {
    height: 550px;
    display:flex;
    flex-direction: column;
    justify-content: space-between;
}

img.big {
    flex-basis: auto;
    flex-grow:0;
    flex-shrink:0;
}



/* nieuwe opbouw: projectkeuze links, geselecteerd project rechts */
.projecten {
    display: grid;
    grid-template-columns: 406px 680px;
    grid-template-rows: auto 550px;
    column-gap: 34px;
}

/* beide kolommen delen dezelfde twee rijen, zodat de tegels op de grote foto uitkomen */
.projectkeuze, .projectweergave {
    display: grid;
    grid-row: span 2;
    grid-template-rows: subgrid;
    min-height: 0;
}

.projectkop {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

div.images {
    min-height: 0;
}

/* titel en projectnaam in de linkerkolom */
.projectkeuze header.title {
    width: auto;
    margin-bottom: 0;
}

.projectkeuze header.title h1 {
    margin-bottom: 0;
}

h2.paginatitel {
    margin: 0;
    font-size: 1.5rem;
    font-weight: normal;
    text-transform: uppercase;
    color: white;
}

/* beschrijving boven het geselecteerde project */
.projectweergave header.description {
    width: auto;
    height: 120px;
    margin-bottom: 20px;
    overflow: hidden;
}

/* Voeg dit toe helemaal onderaan je CSS bestand */

/* --- LIGHTBOX STIJLEN (Desktop) --- */
.lightbox {
    display: none; /* Wordt 'flex' via JS */
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
}

.lightbox-media-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90vh;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
    outline: none;
    will-change: transform;
}

.close-lightbox {
    position: absolute;
    top: 20px;
    right: 40px;
    color: white;
    font-size: 50px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10000;
}

.close-lightbox:hover {
    color: red;
}

.lightbox-nav {
    position: absolute;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 50px;
    box-sizing: border-box;
    pointer-events: none; /* Zodat je door de balk heen op de foto/video kan klikken indien nodig */
}

.nav-btn {
    background: rgba(255, 0, 0, 0.5);
    color: white;
    border: none;
    font-size: 40px;
    padding: 20px 25px;
    cursor: pointer;
    border-radius: 5px;
    pointer-events: auto;
    transition: background 0.3s;
}

.nav-btn:hover {
    background: red;
}

/* Cursor wordt op desktop twee rode pijlen naar buiten: "vergroten" (zoom-in als reserve).
   Het hotspot (9 9) is het midden van het icoon. */
#big {
    cursor: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2718%27 height=%2718%27 viewBox=%270 0 36 36%27%3E%3Cg fill=%27none%27 stroke-linecap=%27square%27%3E%3Cg stroke=%27%23000%27 stroke-width=%276%27%3E%3Cpath d=%27M21 5h10v10M31 5L20 16M15 31H5V21M5 31l11-11%27/%3E%3C/g%3E%3Cg stroke=%27%23ff0000%27 stroke-width=%273%27%3E%3Cpath d=%27M21 5h10v10M31 5L20 16M15 31H5V21M5 31l11-11%27/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") 9 9, zoom-in;
}


/* --- MOBIELE OVERRIDES (Verberg lightbox functionaliteit) --- */
@media screen and (max-width: 768px) {
    /* Zorg dat de lightbox NOOIT toont op mobiel */
    .lightbox {
        display: none !important;
    }
    
    /* Geen zoom cursor op mobiel */
    #big {
        cursor: default;
    }
}


/*phone compatibility*/
/* Verberg het hamburger icoon standaard (voor desktop) */
.hamburger {
    display: none;
    cursor: pointer;
    font-size: 1.2em;
    padding: 10px;
    color: white;
    /*text-align: center;*/
    border-bottom: 1px solid red;
}

.scroll-up-container {
    display: none;
}

/* Media Query voor GSM/Mobiel */
@media screen and (max-width: 768px) {
    #divbigParent {
        scroll-margin-top: 200px;

        touch-action: pan-y; /* Allows vertical scrolling but prevents browser interference with horizontal swipes */
        cursor: pointer;
    }

    #divbigParent::after {
        content: "swipe ↔";
        display: block;
        text-align: center;
        font-size: 0.8rem;
        color: rgba(255, 255, 255, 0.5);
        margin-top: 5px;
    }

    .floating-bubble {
    display: none;
    }

    div.images:hover img.album {
        opacity: 1;
    }

    /* Stapel de flexbox elementen onder elkaar */
    .flex-container {
        display: block;
	margin-top:0px;
    }

    section {
        margin: 10px auto;
	margin-top: 0px;
        padding-right: 0px;
        width: 100%;
        background-color: black;

        position: fixed;
        top: 0;
        z-index: 1000;
    }

    img.logo {
    display:none;
    }

    .small-logo {
        position: fixed;
        top: 8px;
	right:8px;
	display: block;
	height: 50px;

	opacity:1;
	transition: opacity 0.5s ease-in-out;
    }

    header {
        width:95%;
        word-wrap: break-word;
        margin-left:8px;
        margin-right:8px;
    }

/*    nav {
	margin-top: 10px;
        min-height: auto;
        padding-right: 0;
    }
*/
    nav {
	margin: auto;
	margin-left: 8px;
        margin-top: 10px; /* Verwijder de marge aan de bovenkant voor een naadloze aansluiting */
        min-height: auto;
        padding-right: 0;
        width: 10%;
        box-shadow: 0 2px 10px rgba(255, 0, 0, 0.5);

	transition: width 0.5s ease-in-out;
    }

    /* Toon het hamburger icoon */
    .hamburger {
        display: block;
    }

    /* Verberg het menu standaard op mobiel */
    nav ul.first {
        display: block;
	opacity:0;
	max-height:0;
	overflow: hidden;
	transition: max-height 0.5s ease-in-out, opacity 0.3s ease;

        padding: 0;
        margin: 0;
	margin-left: 30px;
    }

    /* Toon het menu als de checkbox is aangevinkt */

    nav:has(#menu-toggle:checked) {
        width: 95%;
    }

    #menu-toggle:checked ~ .small-logo {
        opacity:0;
    }

    #menu-toggle:checked ~ ul {
        max-height:1200px;
	opacity:1;
    }


    /* Sub-lijst (zorg, wonen, etc.) aanpassen voor mobiel */
    nav ul ul {
        display: block; /* Altijd tonen als het hoofdmenu open is */
    }

    article.main {
        display: flex;
	flex-direction: column;
        padding-right: 0;
        width: 100%;

	margin-top: 53px; /*Due to now fixed menu*/
    }

    header.description {
    margin-bottom: 0px;
    margin-top: 25px;
    border-top: 2px solid red;

    scroll-margin-top: 60px;
    }

    header.title {
    margin-bottom: 20px;
    margin-top: 0px;
    order: -2;
    }

    header h1 {
	font-size:0.85rem;
    }

    /* Zorg dat de afbeeldingen op mobiel goed schalen */
    div.images {
        text-align: center;

        scroll-margin-top: 60px;
    }

    /* geen keuze van tegels per rij op mobiel */
    .kolommen {
        display: none;
    }

    /* twee kolommen onder elkaar op mobiel */
    .projecten {
        display: contents;
    }

    .projectkeuze, .projectweergave {
        display: block;
    }

    .projectkeuze {
        order: -1;
    }

    figure {
        margin-left: 0;
        width: 100%;
    }

    #bigParent {
        padding-top: 10px;
    }
	
    .big {
        max-width: 100%;
        position: relative;
        left: 50%;
        transform: translateX(-50%);
    }

    .scroll-up-container {
        width: 100%;
        display: flex;
        justify-content: center;
        margin: 30px 0;
    }

    .back-to-projects {
        background-color: #111;
        color: red;
        border: 1px solid red;
        padding: 12px 24px;
        font-family: Calibri, Arial, sans-serif;
        font-size: 16px;
        border-radius: 5px;
        cursor: pointer;
        transition: background 0.3s;

	z-index:10;
    }

    .back-to-projects:active {
        background-color: red;
        color: white;
    }

    article.center {
        position: relative !important;
        top: 0 !important;
        margin: 40px 0 !important;
        transform: none !important;
        left: 0 !important;
    }


    .footer-text {
        display: none;
    }

    .footer-icons {
        display: flex;
        justify-content: center;
        gap: 30px; /* Ruimte tussen de iconen */
        margin-bottom: 15px;
    }

    .footer-icons a {
        color: red; /* Primaire kleur uit het ontwerp */
        font-size: 1.8rem;
        transition: transform 0.3s ease, color 0.3s ease;
        text-decoration: none;
    }

    .footer-icons a:hover {
        transform: scale(1.2);
        color: white; /* Kleurverandering bij hover */
    }

    .footer-icons {
        gap: 30px;
    }
    
    .footer-icons a {
        font-size: 1.2rem;
    }


}

@media screen and (min-width: 768px) {
    div.images {
        overflow-x: hidden;
        overflow-y: auto;
    }

    div.images::-webkit-scrollbar {
        width: 4px;
    }

    div.images::-webkit-scrollbar-thumb {
        background-color: red;
        border-radius: 2px;
    }

    div.images::-webkit-scrollbar-button {
        display: none;
    }

    @supports not selector(::-webkit-scrollbar) {
        div.images {
            scrollbar-width: thin;
            scrollbar-color: red transparent;
        }
    }

    @supports (anchor-name: --image-bubble-anchor) {
        .image-tooltip-wrapper {
            anchor-scope: --image-bubble-anchor;
        }

        img.album {
            anchor-name: --image-bubble-anchor;
        }

        .floating-bubble {
            position: fixed;
            position-anchor: --image-bubble-anchor;
            top: anchor(top);
            bottom: calc(anchor(bottom) + 6px);
            left: calc(anchor(right) + 5px);
            height: auto;
            transform: translateX(-10px);
        }

        .image-tooltip-wrapper:hover .floating-bubble {
            transform: translateX(0);
        }
    }

    #divbigParent {
        overflow: hidden; /* This is the "frame" that stays the same size */
        background-color: #000; /* Prevents seeing background during load */
        display: block;
        line-height: 0; /* Prevents small gap at bottom of image */
    }

    img#big {
        display: block;
        height: auto;
        transition: transform 1s ease; /* Smooth duration for the zoom */
    }

    #divbigParent:hover #big {
        transform: scale(1.08);
    }
}


@media screen and (min-width: 769px) {
    nav {
        width: 220px;
        padding-right: 0;
        border: none;
        background-color: transparent;
        box-shadow: none;
        font-size: 18px;
    }

    nav ul.first, nav ul.first ul {
        margin: 0;
        padding: 0;
    }

    nav ul.first {
        position: relative;
        padding-left: 14px;
    }

    nav ul.first li {
        position: relative;
        box-sizing: border-box;
        height: 42px;
        line-height: 41px;
        padding-left: 16px;
        text-transform: capitalize;
    }

    nav ul.first ul li {
        padding-left: 38px;
    }

    nav ul li:hover {
        list-style: none;
        color: white;
        font-size: 1em;
    }

    #special, #special:hover {
        color: #999;
    }

    a.menu {
        transition: color 0.2s;
    }

    a.menu:hover {
        color: red;
    }

    #page {
        font-weight: bold;
    }

    nav ul.first::before {
        content: "";
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        width: 1px;
        background-color: #444;
    }

    nav ul.first::after {
        content: "";
        position: absolute;
        left: -1px;
        top: 10px;
        width: 3px;
        height: 22px;
        background-color: red;
        transition: top 0.45s cubic-bezier(0.6, 0, 0.2, 1);
    }

    nav ul.first:has(> li:nth-child(2) [id="page"])::after { top: 52px; }
    nav ul.first:has(> li:nth-child(3) [id="page"])::after { top: 94px; }
    nav ul.first:has(> ul > li:nth-child(1) [id="page"])::after { top: 178px; }
    nav ul.first:has(> ul > li:nth-child(2) [id="page"])::after { top: 220px; }
    nav ul.first:has(> ul > li:nth-child(3) [id="page"])::after { top: 262px; }
    nav ul.first:has(> ul > li:nth-child(4) [id="page"])::after { top: 304px; }
    nav ul.first:has(> ul > li:nth-child(5) [id="page"])::after { top: 346px; }

    section nav ul.first:has(> li:nth-child(1):hover)::after { top: 10px; }
    section nav ul.first:has(> li:nth-child(2):hover)::after { top: 52px; }
    section nav ul.first:has(> li:nth-child(3):hover)::after { top: 94px; }
    section nav ul.first:has(> ul > li:nth-child(1):hover)::after { top: 178px; }
    section nav ul.first:has(> ul > li:nth-child(2):hover)::after { top: 220px; }
    section nav ul.first:has(> ul > li:nth-child(3):hover)::after { top: 262px; }
    section nav ul.first:has(> ul > li:nth-child(4):hover)::after { top: 304px; }
    section nav ul.first:has(> ul > li:nth-child(5):hover)::after { top: 346px; }
}
