/* ======================================= */
/* ALGEMEEN EN BASIS */
/* ======================================= */
body {
    margin: 0;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f4f4f4;
    color: #333;
}

h2 {
    font-size: 28px;
    margin-bottom: 20px;
    color: #2a9d8f;
}

h3 {
    font-size: 20px;
    margin-bottom: 15px;
    color: #264653;
}

/* ======================================= */
/* HEADER */
/* ======================================= */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #1d8f8a;
    padding: 20px 30px;
    color: white;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.logo {
    font-weight: bold;
    font-size: 22px;
}

.titel {
    font-size: 24px;
}

/* ======================================= */
/* NAVIGATIE + JAAR FILTER */
/* ======================================= */
.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #264653;
    padding: 12px 20px;
    color: white;
    flex-wrap: wrap;
}

.nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.jaar-filter {
    background: #ffffff;
    color: #2a2a2a;
    border: 1px solid #ddd;
    padding: 8px 14px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.25s ease;
}

.jaar-filter:hover {
    background: #2a9d8f;
    color: white;
    border-color: #2a9d8f;
    transform: translateY(-1px);
}

.jaar-filter.active {
    background: #2a9d8f;
    color: white;
    border-color: #2a9d8f;
    box-shadow: 0 3px 8px rgba(0,0,0,0.1);
}

.zoek input {
    padding: 7px 10px;
    border-radius: 6px;
    border: none;
    font-size: 14px;
    margin-left: 10px;
}

/* ======================================= */
/* LAYOUT CONTAINER */
/* ======================================= */
.container {
    display: flex;
}

/* ======================================= */
/* SIDEBAR */
/* ======================================= */
.sidebar {
    width: 260px;
    background-color: #ffffff;
    padding: 20px;
    min-height: 100vh;
    box-shadow: 2px 0 6px rgba(0,0,0,0.1);
    border-right: 1px solid #e0e0e0;
    overflow-y: auto;
    transition: transform 0.3s ease;
}

.sidebar ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.sidebar li {
    margin-bottom: 6px;
    position: relative;
}

/* ======================================= */
/* HOOFDVAK (1e niveau) */
/* ======================================= */
.hoofdlink {
    font-weight: 600;
    font-size: 16px;
    display: block;
    padding: 8px 12px;
    border-radius: 6px;
    color: #264653;
    cursor: pointer;
    transition: all 0.2s ease;
}

.hoofdlink:hover {
    background-color: #2a9d8f;
    color: white;
    padding-left: 16px;
}

.hoofdlink::after {
    content: "▶";
    font-size: 12px;
    float: right;
    transition: transform 0.3s ease;
}

li.active > .hoofdlink::after {
    transform: rotate(90deg);
}

/* ======================================= */
/* SUBMENU (2e niveau: periode) */
/* ======================================= */
.submenu {
    margin-left: 8px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

li.active > .submenu {
    max-height: 500px;
}

.periode-link {
    font-weight: 600;
    font-size: 14px;
    padding: 6px 12px;
    display: block;
    color: #2a9d8f;
    border-radius: 6px;
    margin-top: 4px;
    transition: all 0.2s ease;
}

.periode-link:hover {
    background-color: #e0f3f1;
    color: #1d8f8a;
    padding-left: 16px;
}

.submenu .submenu {
    border-left: 2px solid #e0e0e0;
    margin-left: 8px;
    padding-left: 6px;
}

.submenu .submenu li a {
    font-size: 13px;
    color: #555;
    padding: 5px 10px 5px 18px;
    display: block;
    border-radius: 5px;
}

.submenu .submenu li a:hover {
    background-color: #f1f1f1;
}

/* ======================================= */
/* CONTENT */
/* ======================================= */
.content {
    flex: 1;
    padding: 25px;
}

.vak {
    background-color: white;
    padding: 20px;
    margin-bottom: 15px;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

/* ======================================= */
/* AFBEELDINGEN */
/* ======================================= */
.content img {
    max-width: 60%;
    height: auto;
    display: block;
}

/* ======================================= */
/* KNOP + ANTWOORD */
/* ======================================= */
.toon-antwoord {
    margin-top: 10px;
    padding: 8px 12px;
    background-color: #2a9d8f;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.antwoord {
    display: none;
    margin-top: 10px;
}

/* ======================================= */
/* LIGHTBOX */
/* ======================================= */
.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox.show {
    display: flex;
    opacity: 1;
}

.lightbox-img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 8px;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.lightbox.show .lightbox-img {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 40px;
    font-size: 40px;
    color: white;
    cursor: pointer;
}

/* ======================================= */
/* RESPONSIVE MOBIEL */
/* ======================================= */
@media (max-width: 992px) {

    .container {
        flex-direction: column;
    }

    .content {
        padding: 15px;
    }

    .content img {
        width: 100%;
        height: auto;
        max-width: 100%;
    }

    /* Sidebar initieel buiten scherm */
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        width: 260px;
        height: 100%;
        transform: translateX(-100%);
        z-index: 999;
        transition: transform 0.3s ease;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    /* Overlay */
    .overlay {
        display: none;
        position: fixed;
        top:0;
        left:0;
        width:100%;
        height:100%;
        background: rgba(0,0,0,0.4);
        z-index: 900;
    }

    .overlay.show {
        display: block;
    }

    /* Hamburger menu styling */
    .hamburger {
        font-size: 24px;
        cursor: pointer;
        display: inline-block;
        margin-right: 10px;
    }
}

.highlight {
    background-color: #ffd54f;
    color: #000;
    padding: 0 2px;
    border-radius: 3px;
}

/* ================================================= */
/* Rekenblokken */
/* ================================================= */

.rekenblok {
    border-left: 6px solid #2563eb;
    background: #eff6ff;
    padding: 18px 20px;
    margin: 18px 0;
    border-radius: 8px;
}

.rekenblok h4 {
    margin-top: 0;
    color: #1e3a8a;
}

.rekenblok .formule {
    display: inline-block;
    background: #ffffff;
    border: 1px solid #bfdbfe;
    border-radius: 6px;
    padding: 10px 14px;
    margin: 8px 0;
    font-family: "Consolas", "Courier New", monospace;
    font-size: 1.05rem;
}

.rekenstappen {
    margin: 12px 0 0;
    padding-left: 22px;
}

.rekenstappen li {
    margin-bottom: 8px;
}

.reken-opmerking {
    background: #fff7ed;
    border-left: 4px solid #f97316;
    padding: 10px 12px;
    margin-top: 14px;
    border-radius: 6px;
}

.temperatuurlijn {
    border-left-color: #dc2626;
    background: #fef2f2;
}

.temperatuurlijn h4 {
    color: #991b1b;
}

.temperatuurlijn .formule {
    border-color: #fecaca;
}

/* ================================================= */
/* DOWNLOADS */
/* ================================================= */

.downloads-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 15px;
}

.downloads-grid a {
    display: block;
    padding: 16px;
    background-color: #f4f4f4;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    color: #264653;
    text-decoration: none;
    transition: all 0.2s ease;
}

.downloads-grid a:hover {
    background-color: #e0f3f1;
    border-color: #2a9d8f;
    transform: translateY(-2px);
}

.downloads-grid i {
    font-size: 22px;
    color: #2a9d8f;
    margin-bottom: 10px;
}

.downloads-grid strong {
    display: block;
    font-size: 15px;
    margin-bottom: 5px;
}

.downloads-grid span {
    display: block;
    font-size: 13px;
    color: #666;
    line-height: 1.4;
}


/* Tablet */
@media (max-width: 992px) {
    .downloads-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}


/* Mobiel */
@media (max-width: 600px) {
    .downloads-grid {
        grid-template-columns: 1fr;
    }
}

/* ================================================= */
/* SKETCHUP GEREEDSCHAP-ICONEN */
/* ================================================= */

.tool-icon {
    width: 28px;
    height: 28px;
    object-fit: contain;
    vertical-align: middle;
    margin-right: 8px;
}

.tool-name {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.tools-table td:first-child {
    width: 180px;
}

.tools-table tr:hover {
    background-color: #f7faf9;
}


/* ================================================= */
/* HERBRUIKBARE MINI-QUIZ                            */
/* ================================================= */

.quiz-vraag {
    margin: 24px 0;
    padding: 18px 20px;
    background: #fafafa;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
}

.quiz-input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    pointer-events: none;
}

.quiz-optie {
    display: block;
    margin: 8px 0;
    padding: 11px 14px;
    border: 2px solid #d8d8d8;
    border-radius: 7px;
    background: #fff;
    color: #333;
    cursor: pointer;
    transition: all 0.15s ease;
}

.quiz-optie:hover {
    background: #f1f5f6;
    border-color: #2a9d8f;
}

/* Alleen het aangeklikte antwoord krijgt kleur */
.quiz-input.quiz-goed:checked + .quiz-optie {
    background: #dcfce7;
    border-color: #16a34a;
    color: #166534;
}

.quiz-input.quiz-fout:checked + .quiz-optie {
    background: #fee2e2;
    border-color: #dc2626;
    color: #991b1b;
}

/* Feedback staat direct na de gekozen optie */
.quiz-feedback {
    display: none;
    margin: -2px 0 10px;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 0.95em;
    line-height: 1.45;
}

.quiz-input.quiz-goed:checked + .quiz-optie + .quiz-feedback-goed {
    display: block;
    background: #f0fdf4;
    border-left: 4px solid #16a34a;
    color: #166534;
}

.quiz-input.quiz-fout:checked + .quiz-optie + .quiz-feedback-fout {
    display: block;
    background: #fef2f2;
    border-left: 4px solid #dc2626;
    color: #991b1b;
}
