
/* ========================================
   ONTDEK — COMPLETE STYLESHEET
   Oude layout + nieuwe lesbovenbalk
======================================== */

/* 1. BASIS */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 16px;
    line-height: 1.7;
    background: #0b0d12;
    color: #f5f7fb;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

img {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
}

button,
input,
textarea,
select {
    font: inherit;
}

button {
    -webkit-tap-highlight-color: transparent;
}

::selection {
    background: #43c59e;
    color: #08120f;
}

h1,
h2,
h3,
h4 {
    color: #ffffff;
    font-weight: 750;
    line-height: 1.25;
    overflow-wrap: break-word;
    text-wrap: balance;
}

p {
    overflow-wrap: break-word;
}

/* 2. HEADER — OUDE LAYOUT */

header {
    position: relative;
    z-index: 20;
    min-height: 82px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    padding: 16px 7%;
    border-bottom: 1px solid #252a35;
    background: rgba(11, 13, 18, 0.96);
}

.logo {
    flex-shrink: 0;
    color: #ffffff;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 4px;
    text-decoration: none;
    white-space: nowrap;
}

nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
}

nav a {
    color: #a7acb8;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s ease;
}

nav a:hover,
nav a:focus-visible {
    color: #ffffff;
}

/* 3. PUNTEN EN LEVELS */

.punten {
    position: relative;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    gap: 12px;
    padding: 9px 14px;
    border: 1px solid #292f3b;
    border-radius: 30px;
    background: #11151e;
    color: #a7acb8;
    font-size: 12px;
    white-space: nowrap;
}

#puntenTeller {
    color: #ffffff;
    font-weight: 700;
}

#levelTeller {
    color: #c5cbd6;
}

.level-knop {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 3px 0;
    border: 0;
    background: transparent;
    color: #c5cbd6;
    font-size: 12px;
    cursor: pointer;
    white-space: nowrap;
    transition: color 0.2s ease;
}

.level-knop:hover {
    color: #ffffff;
}

.level-knop:focus-visible {
    outline: 2px solid #43c59e;
    outline-offset: 4px;
    border-radius: 4px;
}

.levels-menu {
    display: none;
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: 290px;
    max-width: calc(100vw - 30px);
    padding: 22px;
    border: 1px solid #303746;
    border-radius: 18px;
    background: #11151e;
    color: #ffffff;
    white-space: normal;
    box-shadow: 0 20px 55px rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.levels-menu.zichtbaar {
    display: block;
    animation: menuVerschijnen 0.18s ease-out;
}

.levels-menu h3 {
    margin: 0 0 18px;
    font-size: 18px;
    line-height: 1.4;
}

.levels-menu p {
    margin: 12px 0;
    color: #b7bfcd;
    font-size: 13px;
    line-height: 1.6;
}

.voortgang-balk {
    width: 100%;
    height: 10px;
    margin: 18px 0;
    overflow: hidden;
    border-radius: 20px;
    background: #292f3b;
}

#voortgangVulling {
    width: 0%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #43c59e, #a3e879);
    transition: width 0.4s ease;
}

@keyframes menuVerschijnen {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 4. HOMEPAGE HERO */

.hero {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 620px;
    padding: 100px 7%;
    overflow: hidden;
    background:
        radial-gradient(
            ellipse at 75% 35%,
            rgba(50, 70, 115, 0.34),
            transparent 48%
        ),
        #0b0d12;
}

.hero-tekst {
    position: relative;
    z-index: 2;
    max-width: 700px;
}

.boven-titel {
    color: #8d98ad;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 3px;
    line-height: 1.8;
}

.hero h1 {
    margin: 24px 0;
    color: #ffffff;
    font-size: clamp(48px, 7.5vw, 100px);
    line-height: 0.98;
    letter-spacing: -4px;
}

.hero h1 span {
    color: #858fa4;
}

.intro {
    max-width: 560px;
    color: #b0b7c6;
    font-size: 19px;
    line-height: 1.8;
}

.sonic-tekst {
    margin-top: 16px;
    color: #9ca5b6;
    font-size: 15px;
    line-height: 1.8;
}

/* 5. AARDE EN STERREN */

.hero-wereld {
    position: absolute;
    top: 50%;
    right: 6%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 350px;
    height: 350px;
    transform: translateY(-50%);
}

.wereld {
    font-size: clamp(150px, 19vw, 240px);
    filter: drop-shadow(0 0 45px rgba(80, 140, 255, 0.25));
    animation: zweven 5s ease-in-out infinite;
}

.ster {
    position: absolute;
    color: #b3bed4;
    font-size: 20px;
}

.ster-1 {
    top: 20px;
    left: 35px;
}

.ster-2 {
    top: 90px;
    right: 15px;
}

.ster-3 {
    bottom: 45px;
    left: 20px;
    font-size: 30px;
}

.ster-4 {
    right: 60px;
    bottom: 15px;
}

@keyframes zweven {
    0%, 100% {
        translate: 0 0;
    }
    50% {
        translate: 0 -12px;
    }
}

/* 6. SECTIES EN TITELS */

.onderwerpen {
    padding: 100px 7%;
}

.sectie-titel {
    max-width: 850px;
}

.sectie-titel > p {
    margin-bottom: 12px;
    color: #8993a8;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2.5px;
    line-height: 1.7;
}

.sectie-titel h1,
.sectie-titel h2 {
    margin: 16px 0 28px;
    color: #ffffff;
    font-size: clamp(34px, 5vw, 56px);
    line-height: 1.12;
    letter-spacing: -1.5px;
}

.sectie-titel > span {
    color: #a7acb8;
    line-height: 1.8;
}

/* 7. KAARTEN */

.kaarten {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
    margin-top: 50px;
}

.kaart {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 0;
    min-height: 390px;
    padding: 30px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    color: #ffffff;
    text-decoration: none;
    transition:
        transform 0.25s ease,
        border-color 0.25s ease,
        filter 0.25s ease;
}

.kaart:hover {
    transform: translateY(-6px);
    border-color: rgba(255, 255, 255, 0.18);
}

.kaart:focus-visible {
    outline: 2px solid #43c59e;
    outline-offset: 4px;
}

.kaart::after {
    position: absolute;
    right: -65px;
    bottom: -75px;
    width: 190px;
    height: 190px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.035);
    content: "";
    pointer-events: none;
}

.kaart-boven {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.kaart-icoon {
    font-size: 42px;
}

.kaart p {
    color: #b3bdcd;
    font-size: 11px;
    letter-spacing: 2px;
    line-height: 1.7;
}

.kaart h3 {
    margin: 12px 0;
    color: #ffffff;
    font-size: clamp(26px, 3vw, 38px);
    line-height: 1.15;
    letter-spacing: -0.8px;
}

.kaart span {
    position: relative;
    z-index: 1;
    color: #b5bdcc;
    font-size: 14px;
    line-height: 1.7;
}

.ruimte {
    background: linear-gradient(145deg, #1a2b49, #101622);
}

.geschiedenis {
    background: linear-gradient(145deg, #3a2b1e, #1b1511);
}

.wetenschap {
    background: linear-gradient(145deg, #194238, #101c1a);
}

.kaart.les-vergrendeld {
    cursor: not-allowed;
}

.kaart.les-vergrendeld:hover {
    transform: none;
}

.les-slot {
    position: relative;
    z-index: 2;
    color: #ffffff !important;
}

/* 8. KNOPPEN */

.start-knop {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    min-height: 50px;
    margin-top: 25px;
    padding: 14px 24px;
    border: 1px solid #ffffff;
    border-radius: 50px;
    background: #ffffff;
    color: #0b0d12;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition:
        transform 0.2s ease,
        background 0.2s ease;
}

.start-knop:hover {
    transform: translateY(-3px);
    background: #dfe7f3;
}

.start-knop:focus-visible {
    outline: 2px solid #43c59e;
    outline-offset: 4px;
}

/* 9. LESPAGINA'S — TEKST EN TYPOGRAFIE */

main > .onderwerpen .sectie-titel {
    margin-bottom: 30px;
}

.les-tekst {
    max-width: 760px;
    margin-top: 28px;
    color: #c5cbd6;
    font-size: 17px;
    line-height: 1.9;
    overflow-wrap: break-word;
}

.les-tekst h1 {
    margin: 20px 0 28px;
    font-size: clamp(36px, 5vw, 54px);
    line-height: 1.12;
    letter-spacing: -1.3px;
}

.les-tekst h2,
.les-tekst h3 {
    margin: 38px 0 14px;
    color: #ffffff;
    font-size: clamp(23px, 3vw, 29px);
    line-height: 1.3;
    letter-spacing: -0.5px;
}

.les-tekst p {
    margin: 0 0 22px;
}

.les-tekst a {
    color: #77dfbd;
    text-underline-offset: 4px;
}

.les-tekst ul,
.les-tekst ol {
    padding-left: 24px;
}

.les-tekst li {
    margin: 10px 0;
    padding-left: 3px;
}

.les-tekst strong {
    color: #ffffff;
    font-weight: 700;
}

.les-tekst blockquote {
    margin: 24px 0;
    padding: 16px 22px;
    border-left: 3px solid #43c59e;
    border-radius: 0 10px 10px 0;
    background: #11151e;
    color: #c5cbd6;
}

/* 10. QUIZ */

.quiz {
    max-width: 800px;
    margin-top: 45px;
    padding: 30px;
    border: 1px solid #292f3b;
    border-radius: 20px;
    background: #11151e;
}

.quiz h2,
.quiz h3 {
    margin-top: 0;
    color: #ffffff;
    font-size: 25px;
    line-height: 1.35;
    letter-spacing: -0.4px;
}

.quiz > p {
    color: #b9c1ce;
    font-size: 16px;
    line-height: 1.8;
}

.vraag {
    margin-top: 24px;
    padding-bottom: 18px;
}

.vraag button {
    display: block;
    width: 100%;
    margin: 10px 0;
    padding: 15px 18px;
    border: 1px solid #353d4d;
    border-radius: 11px;
    background: #191e29;
    color: #f5f7fb;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 15px;
    line-height: 1.65;
    text-align: left;
    overflow-wrap: break-word;
    cursor: pointer;
    transition:
        background 0.2s ease,
        border-color 0.2s ease;
}

.vraag button:hover:not(:disabled) {
    border-color: #65758d;
    background: #242c3a;
}

.vraag button:focus-visible {
    outline: 2px solid #43c59e;
    outline-offset: 3px;
}

.vraag button:disabled {
    cursor: default;
    opacity: 0.7;
}

.vraag p[id^="resultaat"] {
    min-height: 24px;
    margin-top: 14px;
    color: #b9e9cd;
    font-weight: 700;
}

#lesVoltooidMelding {
    margin-top: 20px;
    color: #a7e5ba;
    font-weight: 700;
}

/* 11. VOORTGANG EN VERZAMELING */

#stenenTeller {
    color: #c5cbd6;
    font-weight: 700;
}

[data-steen-voor] {
    color: #b7bfcd;
}

/* 12. FOOTER */

footer {
    padding: 40px 7%;
    border-top: 1px solid #252a35;
    color: #8993a8;
    font-size: 13px;
    line-height: 1.8;
}

footer strong {
    color: #ffffff;
    font-size: 16px;
    letter-spacing: 3px;
}

footer p {
    margin-bottom: 0;
}

/* 13. TABLETS */

@media (max-width: 1100px) {
    header {
        gap: 18px;
        padding-right: 5%;
        padding-left: 5%;
    }

    nav {
        gap: 18px;
    }

    .hero-wereld {
        right: 0;
        opacity: 0.5;
    }

    .kaarten {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* 14. MOBIELE TELEFOONS */

@media (max-width: 800px) {
    header {
        min-height: 75px;
        flex-wrap: wrap;
        justify-content: space-between;
        gap: 12px;
        padding: 13px 5%;
    }

    .logo {
        font-size: 19px;
    }

    nav {
        display: none;
    }

    .punten {
        display: flex;
        max-width: 100%;
        gap: 8px;
        padding: 8px 10px;
        font-size: 11px;
    }

    .level-knop {
        font-size: 11px;
    }

    .levels-menu {
        position: fixed;
        top: 88px;
        right: 15px;
        width: 290px;
        max-width: calc(100vw - 30px);
    }

    .hero {
        min-height: auto;
        padding: 85px 5% 75px;
    }

    .hero-tekst {
        max-width: 100%;
    }

    .hero-wereld {
        display: none;
    }

    .hero h1 {
        font-size: clamp(44px, 12vw, 72px);
        letter-spacing: -2px;
    }

    .intro {
        font-size: 17px;
    }

    .onderwerpen {
        padding: 70px 5%;
    }

    .sectie-titel h1,
    .sectie-titel h2 {
        font-size: clamp(30px, 8vw, 40px);
        line-height: 1.15;
        letter-spacing: -0.8px;
    }

    .kaarten {
        grid-template-columns: 1fr;
        gap: 16px;
        margin-top: 35px;
    }

    .kaart {
        min-height: 320px;
        padding: 25px;
    }

    .kaart h3 {
        font-size: 32px;
    }

    .les-tekst {
        font-size: 16px;
        line-height: 1.8;
    }

    .les-tekst h1 {
        font-size: clamp(32px, 8vw, 42px);
        letter-spacing: -0.8px;
    }

    .les-tekst h2,
    .les-tekst h3 {
        margin-top: 30px;
        font-size: 23px;
        line-height: 1.35;
    }

    .quiz {
        padding: 22px;
    }

    footer {
        padding: 35px 5%;
    }
}

/* 15. KLEINE TELEFOONS */

@media (max-width: 420px) {
    header {
        align-items: flex-start;
    }

    .punten {
        flex-wrap: wrap;
        justify-content: flex-start;
        border-radius: 16px;
    }

    .levels-menu {
        top: 105px;
    }

    .hero {
        padding-top: 65px;
    }

    .hero h1 {
        font-size: 43px;
    }

    .kaart {
        min-height: 290px;
    }

    .quiz {
        padding: 17px;
    }

    .vraag button {
        padding: 13px;
        font-size: 14px;
    }
}

/* 16. MINDER ANIMATIE */

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* 17. LESPAGINA'S ONDER ELKAAR */

main > .onderwerpen {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.les-tekst {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 760px;
    gap: 0;
}

.les-tekst h1,
.les-tekst h2,
.les-tekst h3,
.les-tekst p,
.les-tekst ul,
.les-tekst ol {
    display: block;
    width: 100%;
}

.les-tekst p {
    margin-bottom: 22px;
    line-height: 1.9;
}

.quiz {
    display: block;
    width: 100%;
    max-width: 760px;
}

.vraag {
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.vraag button {
    display: block;
    width: 100%;
}

@media (max-width: 800px) {
    .kaarten {
        grid-template-columns: 1fr;
    }

    .les-tekst,
    .quiz {
        max-width: 100%;
    }
}

/* 18. CATEGORIEPAGINA'S */

.categorie-intro,
.sectie-titel {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    width: 100%;
}

.categorie-intro > *,
.sectie-titel > * {
    position: static !important;
    width: 100%;
    max-width: 760px;
    flex: none !important;
    margin-left: 0;
    margin-right: 0;
}

.categorie-intro h1,
.sectie-titel h1 {
    margin-top: 12px;
    margin-bottom: 24px;
}

.categorie-intro p,
.sectie-titel p {
    text-align: left;
}

/* ============================================
   19. ALLE LESSEN — ALLEEN DE BOVENBALK
   Homepage en vakpagina's blijven hetzelfde
   ============================================ */

:is(body[data-les-id], body:has(main #quiz)) > header {
    width: 100%;
    min-height: 86px;
    margin: 0;
    padding: 16px 4%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
    background: #111827;
    border: none;
    border-bottom: 1px solid #30394a;
    border-radius: 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, .15);
}

:is(body[data-les-id], body:has(main #quiz)) > header .logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    color: #fff;
    font-size: 25px;
    font-weight: 900;
    letter-spacing: 1px;
    text-decoration: none;
}

:is(body[data-les-id], body:has(main #quiz)) > header .logo::before {
    content: "✦";
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, #8b5cf6, #2563eb);
    color: white;
    font-size: 22px;
    letter-spacing: 0;
}

:is(body[data-les-id], body:has(main #quiz)) > header nav {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 5px;
    margin: 0;
    padding: 0;
}

:is(body[data-les-id], body:has(main #quiz)) > header nav a {
    padding: 10px 13px;
    border-radius: 9px;
    background: transparent;
    color: #cbd5e1;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

:is(body[data-les-id], body:has(main #quiz)) > header nav a:hover,
:is(body[data-les-id], body:has(main #quiz)) > header nav a[aria-current="page"] {
    background: #293349;
    color: white;
}

:is(body[data-les-id], body:has(main #quiz)) > header .punten {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

:is(body[data-les-id], body:has(main #quiz)) > header #puntenTeller,
:is(body[data-les-id], body:has(main #quiz)) > header #levelTeller {
    display: inline-flex;
    align-items: center;
    padding: 9px 12px;
    border: 1px solid #39445a;
    border-radius: 10px;
    background: #1e293b;
    color: white;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

/* TABLET */

@media (max-width: 950px) {
    :is(body[data-les-id], body:has(main #quiz)) > header nav {
        order: 3;
        width: 100%;
        padding-top: 12px;
        border-top: 1px solid #30394a;
    }
}

/* MOBIEL */

@media (max-width: 550px) {
    :is(body[data-les-id], body:has(main #quiz)) > header {
        padding: 15px;
        gap: 14px;
    }

    :is(body[data-les-id], body:has(main #quiz)) > header .logo {
        font-size: 21px;
    }

    :is(body[data-les-id], body:has(main #quiz)) > header .punten {
        width: 100%;
        justify-content: flex-start;
    }

    :is(body[data-les-id], body:has(main #quiz)) > header nav {
        justify-content: flex-start;
        gap: 3px;
    }

    :is(body[data-les-id], body:has(main #quiz)) > header nav a {
        padding: 8px 9px;
        font-size: 12px;
    }
}


/* Navigatiebalk van ONTDEK:
   behoud de normale website-opmaak */

body > header {
    box-sizing: border-box;
    width: 100%;
}

body > header nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

body > header .punten {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

@media (max-width: 700px) {
    body > header {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 12px;
    }

    body > header nav {
        justify-content: center;
    }

    body > header .punten {
        justify-content: center;
    }
}
