/* Media Query voor GSM/Mobiel */
@media screen and (max-width: 768px) {

    html:root {
        -webkit-text-size-adjust: 100%;
        scrollbar-gutter: stable;
    }

    html:root:has(#menu-toggle:checked) body {
        overflow: hidden;
    }

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

    header {
        width:100%;
        word-wrap: break-word;
        margin-bottom: 0px;
        margin-top: 25px;
    }

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

    #divbigParent {
        scroll-margin-top: 150px;

        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;
    }

    /* menu */

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

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

    html:root section {
        left: 0;
        height: 56px;
        margin: 0;
        min-width: 0;
        box-sizing: border-box;
        border-bottom: 1px solid #222;
    }

    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;
    }

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

    html:root section .small-logo {
        position: fixed;
        top: 8px;
        left: 20px;
        right: auto;
        display: block;
        height: 40px;
        z-index: 3;
        animation: none;
    }

    html:root section a.small-logo img {
        position: static;
        height: 100%;
    }

    html:root body:has(#menu-toggle) section .small-logo {
        opacity: 1 !important;
    }

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

    html:root .hamburger {
        position: fixed;
        top: 0;
        right: 0;
        width: 56px;
        height: 56px;
        padding: 0;
        border: 0;
        font-size: 0;
        z-index: 1;
        background-color: rgba(0, 0, 0, 0);
        transition: background-color 0.3s ease, width 0s 0.3s, height 0s 0.3s;
        -webkit-tap-highlight-color: transparent;
    }

    html:root #menu-toggle:checked + .hamburger {
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.65);
        transition: background-color 0.3s ease;
    }

    html:root .hamburger::before,
    html:root .hamburger::after {
        content: "";
        position: fixed;
        top: 27px;
        right: 17px;
        width: 22px;
        height: 2px;
        background-color: white;
        transition: transform 0.3s ease;
    }

    html:root .hamburger::before {
        transform: translateY(-4px);
    }

    html:root .hamburger::after {
        transform: translateY(4px);
    }

    html:root #menu-toggle:checked + .hamburger::before {
        transform: rotate(45deg);
    }

    html:root #menu-toggle:checked + .hamburger::after {
        transform: rotate(-45deg);
    }

/*    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 menu als de checkbox is aangevinkt */

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

    html:root nav {
        display: contents;
    }

    /* 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;
    }

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

    html:root #menu-toggle ~ ul.first {
        position: fixed;
        top: 56px;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 2;
        box-sizing: border-box;
        margin: 0;
        padding: 28px 28px 80px;
        max-height: none;
        overflow-y: auto;
        background-color: black;
        font-size: 1.9rem;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.2s ease, visibility 0s 0.2s;
    }

    html:root #menu-toggle:checked ~ ul.first {
        visibility: visible;
        opacity: 1;
        transition: opacity 0.2s ease;
    }

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

    html:root nav ul ul {
        margin: 0;
        margin-left: 2px;
        padding: 0;
        padding-left: 18px;
        border-left: 1px solid #333;
        font-size: 1.45rem;
    }

    html:root nav ul li {
        padding: 9px 0;
        line-height: 1.2;
        opacity: 0;
        transform: translateY(18px);
        transition: opacity 0.2s ease, transform 0.2s ease;
    }

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

    html:root #menu-toggle:checked ~ ul.first li {
        opacity: 1;
        transform: none;
        transition: opacity 0.45s ease 0.15s, transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1) 0.15s;
    }

    html:root #menu-toggle:checked ~ ul.first > li:nth-child(2) { transition-delay: 0.19s; }
    html:root #menu-toggle:checked ~ ul.first > li:nth-child(3) { transition-delay: 0.23s; }
    html:root #menu-toggle:checked ~ ul.first > li:nth-child(4) { transition-delay: 0.27s; }
    html:root #menu-toggle:checked ~ ul.first > ul > li:nth-child(1) { transition-delay: 0.31s; }
    html:root #menu-toggle:checked ~ ul.first > ul > li:nth-child(2) { transition-delay: 0.35s; }
    html:root #menu-toggle:checked ~ ul.first > ul > li:nth-child(3) { transition-delay: 0.39s; }
    html:root #menu-toggle:checked ~ ul.first > ul > li:nth-child(4) { transition-delay: 0.43s; }
    html:root #menu-toggle:checked ~ ul.first > ul > li:nth-child(5) { transition-delay: 0.47s; }

    html:root #special {
        margin-top: 26px;
        padding-bottom: 12px;
        color: #777;
        font-size: 0.8rem;
        letter-spacing: 0.14em;
        text-transform: uppercase;
    }

    html:root #page::after {
        content: "";
        display: inline-block;
        width: 8px;
        height: 8px;
        margin-left: 12px;
        border-radius: 50%;
        background-color: red;
        vertical-align: middle;
    }

    html:root a.menu {
        display: block;
    }

    html:root a.menu::first-letter {
        text-transform: uppercase;
    }

    /* content */

    article.main {
        display: flex;
        flex-direction: column;
        padding-right: 0px;
        margin-top:53px;
        margin-left:8px;
        margin-right:8px;
        width: 98%;
    }

    html:root article.main {
        box-sizing: border-box;
        width: 100%;
        margin: 56px 0 0;
        padding: 0 20px;
    }

    article.main img {
        display: none;
    }

    article p , article h1, article h2, article h3 {
        margin: 0px;
        margin-top: 0.67rem;
        margin-bottom: 0.67rem;
        width:95%;
    }

    html:root article.main > h3,
    html:root article.main > h5 {
        width: auto;
        margin: 0 0 16px;
    }

    html:root article.main > h3:first-child {
        margin-top: 28px;
    }

    html:root article.main > h3 + img {
        display: block;
        float: none;
        width: 96px;
        margin: 0 0 14px;
        padding: 0;
    }

    article.content {
        margin-left:0px;
        width:95%;
    }

    html:root article.content {
        width: auto;
        margin: 0 0 8px;
    }

    html:root article.content p {
        width: auto;
        margin: 0 0 20px;
        color: #bbb;
    }

    html:root article.content h5 {
        margin: 0 0 10px;
        font-size: 0.8rem;
        letter-spacing: 0.1em;
        text-transform: uppercase;
    }

    html:root article.content ul {
        margin: 0 0 24px;
        padding: 0;
        list-style: none;
        line-height: 1.45;
    }

    html:root article.content ul ul {
        margin: 8px 0 0;
    }

    html:root article.content li {
        margin: 0 0 12px;
        padding-left: 14px;
        border-left: 1px solid #333;
    }

    html:root article.content ul li ul li {
        margin: 0;
        padding: 0;
        border: 0;
        color: #bbb;
    }

    html:root .jaar {
        display: block;
        color: #888;
        font-size: 0.85rem;
    }

    html:root .inspring {
        display: none;
    }

    /* footer */

    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.2rem;
        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 */
    }

    html:root p.footer-namen,
    html:root p.footer-copyright {
        width: auto;
        padding: 0 20px;
    }
}
