/* Base type + main width */
i {
    font-style: italic;
}

main {
    width: 97%;
    max-width: 2100px;
}

body>header {
    height: auto;
    flex: 0 0 auto;
}

body>header .first {
    display: flex;
    align-items: center;
    width: 23%;
    margin-left: 1.5rem;
    border-right: solid 2px rgba(0, 0, 0, 0.2);
    max-width: 20rem;
}

body>header .main:nth-child(1) {
    width: 100%;
    padding-top: 1rem !important;
    padding-bottom: 1rem;
    max-width: unset;

}

body>header .second ul {
    font-size: 18px;
    margin-bottom: auto;
    margin-top: auto;
    max-width: 56rem;
}

body>header .first img {
    height: 57px;
}

body>header .second {
    position: relative;
    padding-right: 21%;
    width: 65%;
}

body>header .second img {
    position: absolute;
    right: 3%;
    top: -2rem;
    height: 87px;
    transform: rotate(5deg);
}

body>header .first h1 {
    font-size: 16px;
    text-align: left;
    margin-bottom: 0;
    margin-left: 0.2rem;
    width: 100%;
}

/* INTRO */
.intro {
    margin-top: 2rem;
}

/* ========================================================= */
/* DOCS LAYOUT                                               */
/* ========================================================= */

main {
    width: 95%;
    margin-left: auto;
    margin-right: 0;
}

.banner {
    display: flex;
    margin-top: 1.5rem;
}

.banner div {
    display: flex;
    min-width: 15%;
    align-items: center;
    margin-top: 1rem;
    padding: 0.5rem;
    margin-bottom: 1rem;
    cursor: pointer;
    border-bottom: rgba(0, 0, 0, 0.2) solid;
    padding-right: 2rem;
}

.banner img {
    margin-right: 0.5rem;
    margin-left: 1rem;
}

/* Universal active state */
.banner div.active {
    border-top: rgba(0, 0, 0, 0.2) solid;
    border-right: rgba(0, 0, 0, 0.2) solid;
    border-bottom: none;
    font-family: SohneHalbfett;
}

/* EXTRA: left border only for technical + manual */
.banner .technical.active,
.banner .manual.active {
    border-left: rgba(0, 0, 0, 0.2) solid;
}

/* Filler remains filler */
.banner .filler {
    flex-grow: 1;
    border-bottom: rgba(0, 0, 0, 0.2) solid;
}


.docmain {
    display: flex;
    margin-top: 3rem;
}

.docNav {
    position: sticky;
    top: 2rem; /* adjust how far from the top when scrolling */
    min-width: 350px;
    font-size: 15px;
    margin-left: 3rem;
    align-self: flex-start;
}


.docNav .heading{
    display: flex;
    font-family: SohneHalbfett;
}

.docNav img {
    height: 18px;
    margin-right: 0.15rem;
}

.docNav ul {
    margin-left: 0.5rem;
    width: 60%;
    border-left: rgba(128,128,128,0.1) solid 3px;
    margin-top: 1rem;
}

.docNav li {
    padding-top: 0.7rem;
    padding-bottom: 0.7rem;
    padding-left: 1.5rem;
}

.docNav li p {
    padding: 0.2rem;
    border-radius: 0.2rem;
}

.docNav li p:hover {
    background-color: rgba(128, 128, 128, 0.05);
}

.docNav li:first-child {
    padding-top: 0.3rem;
}

.docNav a {
    color: black;
    text-decoration: none;
}

.docNav li p:hover a {
    text-decoration: underline black;
}

.docBody {
    width: 55%;
    line-height: 1.4rem;
    font-size: 16.3px;
    margin-bottom: 4rem;
}


.docBody h2 {
    font-size: 35px;
    margin-bottom: 1.4rem;
    margin-top: 3.5rem;
    line-height: 2rem;
}

.docBody h2:first-child {
    margin-top: 0;
}

.docBody p {
    margin-bottom: 1rem;
}

/* Top-level list in docBody */
.docBody ul {
  list-style-type: disclosure-closed;      /* klassieke bolletjes */
  padding-left: 1.5rem;       /* ruimte voor bullets */
  margin: 0 0 1rem 0;         /* optioneel */
}

.docBody li {
  margin-bottom: 0.25rem;     /* optioneel wat ruimte tussen items */
}

/* Nested lists (2nd level) */
.docBody ul ul {
  list-style-type: circle;    /* andere stijl voor sublevel */
  padding-left: 1.5rem;       /* extra inspringing */
  margin: 0 0 0.3rem 0;       /* optioneel */
}

/* Optional: style nested li separately if needed */
.docBody ul ul li {
  margin-bottom: 0.15rem;
}


.docBody a {
    text-decoration: underline solid black;
    color: black;
}

.docBody a:hover {
    color: var(--green);
    text-decoration: underline solid var(--green);
}

.docBody h3 {
    font-size: 20px;
    margin-bottom: 0.2rem;
    margin-top: 1.8rem;
}

.docBody h4 {
    font-size: 18px;
    margin-bottom: 0.2rem;
    margin-top: 1rem;
}


.docBody img {
    max-width: 100%;
    margin-left: 1rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12)
}


/* Utility */
.hidden {
    display: none !important;
}

/* === Mobile hamburger from v2 === */
.hamburger {
    display: none;
    position: absolute;
    right: 1rem;
    top: 1rem;
    width: 42px;
    height: 42px;
    border: 0;
    background: transparent;
    z-index: 100001;
}

.hamburger span {
    display: block;
    width: 28px;
    height: 2px;
    background: #111;
    border-radius: 1px;
    transition: transform .25s ease, opacity .25s ease;
}

.hamburger[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.hamburger[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}

.hamburger[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Full-screen mobile menu overlay */
.mobileMenu {
    position: fixed;
    inset: 0;
    z-index: 100000;
    background: rgba(255, 255, 255, .98);
    display: none;
    padding: 6rem 2rem 2rem;
}

.mobileMenu.open {
    display: block;
}

.mobileMenu ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 1.25rem;
}

.mobileMenu li a {
    font-family: SohneHalbfett, system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: clamp(1.35rem, 3.5vw, 2rem);
    text-decoration: none;
    color: #111;
}

body.menu-open {
    overflow: hidden;
}

.mobileVersion {
    display: none !important;
}

/* ===== Mobile/iOS resilience ===== */
html {
    -webkit-text-size-adjust: 100%;
}

:root {
    --vh: 1vh;
    --header-h: 56px;
}

@supports (height: 100dvh) {
    :root {
        --vh: 1dvh;
    }
}

.vh-100 {
    height: calc(var(--vh)*100);
}

html,
body {
    min-height: 100%;
}

body {
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1 1 auto;
    min-height: 0;
}

input,
select,
textarea {
    font-size: 16px;
}

body,
p,
li {
    overflow-wrap: anywhere;
}

/* ===== Mobile layout (<=800px or <=500px height) ===== */
@media (max-width:800px) {

    /* mobile CSS */
    header .main {
        position: relative;
    }


    .mobileMenu .mobileLogo {
        position: absolute;
        left: 1rem;
        top: 1.5rem;
        height: 28px;
        width: auto;
        display: block;
    }


    *,
    *::before,
    *::after {
        box-sizing: border-box;
    }

    html,
    body {
        margin: 0;
        padding: 0;
    }

    header {
        height: auto;
        margin-left: calc(50% - 50vw);
        margin-right: calc(50% - 50vw);
        padding-left: 1rem;
    }

    header .main h1 {
        display: none;
    }

    header .main {
        width: 100% !important;
        max-width: none !important;
        align-items: center;
        display: block !important;
        background-color: var(--white);
        padding-top: 1.5rem !important;
    }



    header .main :nth-child(1)>img {
        display: none
    }

    header .main .mobileLogo {
        display: block;
        margin: 0;
        padding: 0;
        height: 28px !important;
        width: auto;
    }

    header .second {
        width: 100% !important;
        margin: 0;
        margin-top: 1rem !important;
        position: initial !important;
    }

    header .second h1 {
        font-size: 28px !important;
        margin: 0.25rem 0 0.5rem !important;
        text-align: left !important;
        color: var(--green)
    }

    header .second ul {
        display: none
    }

    header .mobileBird {
        position: absolute !important;
        top: 8.3px !important;
        right: 53px !important;
        height: 3.8rem !important;
    }

    .mobileVersion {
        display: initial !important;
    }

    header>.main:nth-child(1) {
        display: none !important;
    }

    .hamburger {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex-direction: column;
        gap: 6px;
        position: absolute;
        right: 1rem;
        top: 1rem;
        width: 42px;
        height: 42px;
        border: 0;
        background: transparent;
        z-index: 100003;
    }

    header .second ul {
        display: none;
    }

    header .main {
        position: relative;
    }

    header {
        top: env(safe-area-inset-top, 0px);
        background: var(--white, #fff);
        height: auto;
        margin-left: calc(50% - 50vw);
        margin-right: calc(50% - 50vw);
        padding-left: 1rem;
    }

    .mobileMenu {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        overscroll-behavior: contain;
        z-index: 100002;
    }

    header .main h1 {
        display: none;
    }

    body>header .main {
        width: 100% !important;
        max-width: none !important;
        align-items: center;
        display: block !important;
        background: var(--white);
        padding-top: 1.5rem !important;
    }

    header .main .mobileLogo {
        display: block;
        height: 28px !important;
        width: auto;
    }

    header .mobileBird {
        position: absolute !important;
        top: 8.3px !important;
        right: 53px !important;
        height: 3.8rem !important;
    }

    .intro {
        margin: .8rem 0 0 1.3rem !important;
    }

    .docs {
        display: block;
    }

    .docsTOC {
        position: relative;
        top: auto;
        max-height: none;
        margin: 0 1rem 1rem;
    }

    .docsContent {
        padding: 0 1rem;
    }
}

@media (max-width:800px) {

    /* MAIN: give content some breathing room */
    main {
        width: 100%;
        margin: 0;
        padding: 0 1.25rem 2rem;
    }

    /* ========================================================= */
    /* BANNER: horizontal tabs with nice active state             */
    /* ========================================================= */

    .banner {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        margin: 1rem 0 0.75rem;
        padding: 0 0 0.5rem;
        overflow-x: auto;
        border-bottom: 1px solid rgba(0, 0, 0, 0.12);
    }

    .banner div {
        flex: 0 0 auto;
        display: inline-flex;
        align-items: center;
        margin: 0;
        padding: 0.45rem 0.9rem;
        min-width: auto;
        border: none;
        border-radius: 999px;
        background: transparent;
        cursor: pointer;
        white-space: nowrap;
    }

    .banner img {
        margin-left: 0;
        margin-right: 0.4rem;
    }

    .banner div.active {
        border: none;
        background: rgba(0, 0, 0, 0.06);
        box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12);
        font-family: SohneHalbfett;
    }

    .banner .technical.active,
    .banner .manual.active {
        border-left: none; /* no weird extra borders on mobile */
    }

    .banner .filler {
        display: none;
    }

    /* ========================================================= */
    /* DOCS LAYOUT: stack nav + content, no squished text        */
    /* ========================================================= */

    .docmain {
        display: block;
        margin-top: 1.8rem;
    }

    /* Nav: full-width block above content, not sticky on mobile */
    .docNav {
        position: static;
        top: auto;
        min-width: 0;
        margin: 0 0 1.5rem;
        font-size: 14px;
    }

    .docNav .heading {
        margin-left: 0.25rem;
    }

    .docNav ul {
        width: 100%;
        margin: 0.5rem 0 0;
        border-left: 2px solid rgba(128, 128, 128, 0.15);
    }

    .docNav li {
        padding-top: 0.45rem;
        padding-bottom: 0.45rem;
        padding-left: 1rem;
    }

    /* Content: full width, readable line length */
    .docBody {
        width: 100%;
        margin: 0;
        font-size: 16px;
        line-height: 1.6rem;
    }

    .docBody h2 {
        font-size: 26px;
        margin-top: 2rem;
        margin-bottom: 1rem;
        line-height: 1.6rem;
    }

    .docBody h3 {
        font-size: 18px;
    }

    .docBody h4 {
        font-size: 16px;
    }

    .docBody img {
        margin-left: 0;
        margin-top: 0.5rem;
    }
}
