:root {
    --bg: #0f172a;
    --surface: #ffffff;
    --text: #0f172a;
    --muted: #64748b;
    --accent: #38bdf8;
    --primary: #0066cc;
    --primary-dark: #004c99;
    --border: #e1e4e8;
    --hover: #f6f8fa;
    --radius: 14px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
    background: #f1f5f9;
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

header {
    background: radial-gradient(circle at top, #0f172a 0%, #020617 70%);
    color: #fff;
    padding: 3rem 1.5rem 4rem;
    text-align: center;
}

header h1 {
    font-size: clamp(2.4rem, 4vw, 3rem);
    margin-bottom: 0.5rem;
    margin-top: 32px;
}

span.like-h1 {
    font-size: clamp(2.4rem, 4vw, 3rem);
    margin-bottom: 0.5rem;
    margin-top: 48px;
    display: block;
}

header p {
    max-width: 650px;
    margin: 0.5rem auto 0;
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.1rem;
}

.container {
    max-width: 1050px;
    margin: -2.5rem auto 3rem;
    padding: 0 1.5rem;
    display: grid;
    gap: 1.5rem;
    grid-template-columns: 320px 1fr;
}

/* Sidebar Styling */
.sidebar {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: 0 10px 40px rgba(15, 23, 42, 0.08);
    height: fit-content;
    /*position: sticky;*/
    top: 1.5rem;
}

.sidebar-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f1f5f9;
}

.sidebar-header h2 {
    font-size: 1.3rem;
    color: var(--text);
    margin: 0;
}

.sidebar-header p {
    font-size: 0.85rem;
    color: var(--muted);
    margin-top: 0.25rem;
}

.lesson-item {
    margin-bottom: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 10px;
    border: 1.5px solid #e2e8f0;
    transition: all 0.2s ease;
    cursor: pointer;
}

.lesson-item:hover {
    border-color: var(--accent);
    box-shadow: 0 4px 12px rgba(56, 189, 248, 0.15);
    transform: translateY(-2px);
}

.lesson-item.active {
    border-color: var(--accent);
    background: rgba(56, 189, 248, 0.05);
    cursor: default;
}

.lesson-item.active:hover {
    transform: none;
}

.lesson-item.collapsed {
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    background: #f8fafc;
}

.lesson-item.collapsed:hover {
    background: #f1f5f9;
    transform: none;
    box-shadow: none;
}

.lesson-item.collapsed .lesson-description,
.lesson-item.collapsed .lesson-links {
    display: none;
}

.lesson-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.lesson-info {
    flex: 1;
}

.lesson-number {
    display: inline-block;
    background: var(--accent);
    color: white;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.5rem;
}

.lesson-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0;
}

.lesson-description {
    font-size: 0.8rem;
    color: var(--muted);
    margin: 0.5rem 0 0.75rem 0;
    line-height: 1.4;
}

.lesson-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.lesson-links-row {
    display: flex;
    gap: 0.5rem;
}

.lesson-link {
    padding: 0.6rem 0.75rem;
    background: white;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text);
    font-size: 0.8rem;
    text-align: center;
    transition: all 0.2s ease;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

.lesson-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    text-decoration: none;
}

.lesson-link.uitleg {
    width: 100%;
    border-color: var(--accent);
    color: var(--accent);
    flex-direction: column;
    padding: 0.75rem;
    font-weight: 600;
    background: rgba(56, 189, 248, 0.05);
}

.lesson-link.uitleg .icon {
    font-size: 1.4em;
    margin-bottom: 0.15rem;
}

.lesson-link.uitleg:hover {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.lesson-link.opdrachten,
.lesson-link.antwoorden {
    flex: 1;
}

.lesson-link.opdrachten {
    border-color: #10b981;
    color: #10b981;
    background: rgba(16, 185, 129, 0.05);
}

.lesson-link.opdrachten:hover {
    background: #10b981;
    color: white;
    border-color: #10b981;
}

.lesson-link.antwoorden {
    border-color: #64748b;
    color: #64748b;
    background: rgba(100, 116, 139, 0.05);
}

.lesson-link.antwoorden:hover {
    background: #64748b;
    color: white;
    border-color: #64748b;
}

.toggle-icon {
    font-size: 1em;
    color: var(--muted);
    transition: transform 0.3s ease;
    margin-left: 0.5rem;
}

.lesson-item.collapsed .toggle-icon {
    transform: rotate(-90deg);
}

/* Main Content Styling */
.main-content {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 1.5rem 1.5rem 1.75rem;
    box-shadow: 0 10px 40px rgba(15, 23, 42, 0.08);
    overflow-x: auto; /* ← Voeg deze regel toe */

}

.content {
    overflow-x: auto; /* Horizontaal scrollen als content te breed is */
    max-width: 100%; /* Voorkom dat content breder wordt dan container */
}

.content pre,
.content table {
    overflow-x: auto; /* Specifiek voor code blokken en tabellen */
    max-width: 100%;
}

.content-header {
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #f1f5f9;
}

.breadcrumb {
    font-size: 0.85rem;
    color: var(--muted);
    margin-bottom: 0.75rem;
}

.breadcrumb a {
    color: var(--primary);
    text-decoration: none;
}

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

.content-header h1 {
    font-size: 2rem;
    color: var(--text);
    margin: 0;
}

/* Content Typography */
.content h2 {
    color: var(--text);
    font-size: 1.6rem;
    margin-top: 2rem;
    margin-bottom: 0.5rem;
}

.content h3 {
    color: var(--text);
    font-size: 1.3rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.content h4, .content h5, .content h6 {
    color: var(--text);
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
}

.content p {
    margin-bottom: 1rem;
    line-height: 1.7;
}

.content ul, .content ol {
    margin: 1rem 0 1rem 1.5rem;
}

.content li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.content code {
    background: rgba(15, 23, 42, 0.05);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.9em;
    color: #e83e8c;
}

.content pre {
    background: #0f172a;
    color: #e2e8f0;
    padding: 1rem 1.1rem;
    border-radius: 12px;
    overflow-x: auto;
    font-size: 0.9rem;
    line-height: 1.4;
    margin: 1.25rem 0;
}

.content pre code {
    background: transparent;
    color: inherit;
    padding: 0;
}

.content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.25rem 0;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
}

.content thead {
    background: #f8fafc;
}

.content th {
    padding: 0.75rem;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid #e2e8f0;
}

.content td {
    padding: 0.75rem;
    border-bottom: 1px solid #f1f5f9;
}

.content tr:last-child td {
    border-bottom: none;
}

.content tbody tr:hover {
    background: #f8fafc;
}

.content hr {
    border: none;
    border-top: 2px solid #f1f5f9;
    margin: 2rem 0;
}

.content strong {
    font-weight: 600;
    color: var(--text);
}

.content em {
    font-style: italic;
}

.content blockquote {
    border-left: 4px solid var(--accent);
    padding-left: 1rem;
    margin: 1.25rem 0;
    color: var(--muted);
}

.content a {
    color: #0284c7;
    text-decoration: none;
}

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

/* Info boxes */
.info-box {
    background: rgba(56, 189, 248, 0.08);
    border-left: 4px solid var(--accent);
    padding: 1rem 1.25rem;
    margin: 1.25rem 0;
    border-radius: 0 10px 10px 0;
}

.warning-box {
    background: rgba(251, 191, 36, 0.08);
    border-left: 4px solid #fbbf24;
    padding: 1rem 1.25rem;
    margin: 1.25rem 0;
    border-radius: 0 10px 10px 0;
}

.success-box {
    background: rgba(16, 185, 129, 0.08);
    border-left: 4px solid #10b981;
    padding: 1rem 1.25rem;
    margin: 1.25rem 0;
    border-radius: 0 10px 10px 0;
}

.badge {
    display: inline-block;
    background: rgba(56, 189, 248, 0.12);
    color: var(--text);
    padding: 0.15rem 0.6rem;
    border-radius: 999px;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: .75rem;
}

/* Footer */
footer {
    text-align: center;
    color: #94a3b8;
    font-size: 0.85rem;
    margin: 2rem 0;
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
}

footer a {
    color: var(--accent);
}


/* Mobile Responsive */
@media (max-width: 800px) {
    .container {
        grid-template-columns: 1fr;
        margin-top: -2.5rem;
        padding: 0 1.25rem;
    }

    .sidebar {
        position: relative;
        top: 0;
    }

    .lesson-links-row {
        flex-direction: column;
    }

    .lesson-link.opdrachten,
    .lesson-link.antwoorden {
        width: 100%;
    }
}

@media (max-width: 640px) {
    .top-links .items a {
        margin-right: 16px;
    }

    header {
        padding: 2rem 1rem 3rem;
    }

    header h1 {
        font-size: 2rem;
    }

    header p {
        font-size: 0.95rem;
    }

    .container {
        padding: 0 1rem;
        gap: 1rem;
        margin-top: -2rem;
    }

    .sidebar, .main-content {
        padding: 1.25rem;
    }

    .content h2 {
        font-size: 1.4rem;
        margin-top: 1.5rem;
    }

    .content pre {
        padding: 0.85rem;
        font-size: 0.85rem;
        margin: 0.75rem 0;
    }
}


a.reg {
    color: var(--primary);
    text-decoration: none;
}


/* Cursus Menu Dropdown Container */
.cursus-menu-dropdown {
    position: relative;
    width: 100%;
    max-width: 350px;
}

/* Menu Toggle Button */
.menu-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.875rem 1rem;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.95rem;
    font-weight: 600;
    color: #0f172a;
}

.menu-toggle:hover {
    border-color: #38bdf8;
    box-shadow: 0 4px 12px rgba(56, 189, 248, 0.15);
}

.menu-toggle.active {
    border-color: #38bdf8;
    background: rgba(56, 189, 248, 0.05);
}

.menu-icon {
    font-size: 1.3em;
}

.menu-text {
    flex: 1;
    text-align: left;
    margin-left: 0.75rem;
}

.menu-arrow {
    transition: transform 0.3s;
    color: #64748b;
    font-size: 0.9em;
}

.menu-toggle.active .menu-arrow {
    transform: rotate(180deg);
}

/* Dropdown Menu */
.menu-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(15, 23, 42, 0.15);
    max-height: 500px;
    overflow-y: auto;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s;
}

.menu-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Menu Header */
.menu-header {
    padding: 1rem 1.25rem;
    border-bottom: 2px solid #f1f5f9;
    background: #f8fafc;
    border-radius: 8px 8px 0 0;
    position: sticky;
    top: 0;
    z-index: 10;
}

.menu-header h3 {
    margin: 0 0 0.15rem 0;
    font-size: 1.1rem;
    color: #0f172a;
}

.menu-header p {
    margin: 0;
    font-size: 0.8rem;
    color: #64748b;
}

/* Lessons List */
.lessons-list {
    padding: 0.5rem;
}

/* Lesson Block - Compact */
.lesson-block {
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    background: #f8fafc;
    border-radius: 8px;
    transition: all 0.2s;
}

.lesson-block:last-child {
    margin-bottom: 0;
}

.lesson-block:hover {
    background: #f1f5f9;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

/* Lesson Title - Compact */
.lesson-title-compact {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: #0f172a;
}

.lesson-title-compact .lesson-number {
    display: inline-block;
    background: #38bdf8;
    color: white;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    flex-shrink: 0;
}

/* Lesson Links - Compact */
.lesson-links-compact {
    display: flex;
    gap: 0.4rem;
}

.link-compact {
    flex: 1;
    padding: 0.5rem 0.6rem;
    background: white;
    border: 1.5px solid #e2e8f0;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 600;
    text-align: center;
    transition: all 0.2s;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
}

.link-compact:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.link-compact.uitleg {
    color: #38bdf8;
    border-color: #38bdf8;
}

.link-compact.uitleg:hover {
    background: #38bdf8;
    color: white;
}

.link-compact.opdrachten {
    color: #10b981;
    border-color: #10b981;
}

.link-compact.opdrachten:hover {
    background: #10b981;
    color: white;
}

.link-compact.antwoorden {
    color: #64748b;
    border-color: #cbd5e1;
}

.link-compact.antwoorden:hover {
    background: #64748b;
    color: white;
}

/* Scrollbar Styling */
.menu-dropdown::-webkit-scrollbar {
    width: 6px;
}

.menu-dropdown::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 0 8px 8px 0;
}

.menu-dropdown::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.menu-dropdown::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.not-on-desktop {
    display: none;
}
.les-links a{
    text-decoration: none;
    color: #000;
    border: 1px solid #cecece;
    border-color: var(--accent);
    color: var(--accent);
    flex-direction: column;
    padding: 0.75rem;
    font-weight: 600;
    background: rgba(56, 189, 248, 0.05);
}

.les-links a.op{
    text-decoration: none;
    color: #000;
    border: 1px solid #cecece;
    border-color: var(--accent);
    color: var(--accent);
    flex-direction: column;
    padding: 0.75rem;
    font-weight: 600;
    border-color: #10b981;
    color: #10b981;
    background: rgba(16, 185, 129, 0.05);
}

.les-links a.antw{
    text-decoration: none;
    color: #000;
    border: 1px solid #e2e8f0;
    border-color: var(--accent);
    color: var(--accent);
    flex-direction: column;
    padding: 0.75rem;
    font-weight: 600;
    border-color: #64748b;
    color: #64748b;
    background: rgba(100, 116, 139, 0.05);
}
/* Mobile Responsive */
@media (max-width: 680px) {

    .not-on-desktop {
        display: block;
    }

    .cursus-menu-dropdown {
        max-width: 100%;
    }

    .menu-dropdown {
        max-height: 400px;
    }

    .lesson-links-compact {
        flex-direction: column;
    }

    .link-compact {
        width: 100%;
    }

    .not-mobile {
        display: none;
    }
}
