/* ==========================================================================
   Sidebar Navigation
   ========================================================================== */

.sidebar-nav {
    width: 270px;
    height: 100vh;
    background-color: var(--white);
    border-right: 1px solid var(--medium-gray);
    box-shadow: var(--shadow);
    padding: 20px 0 20px 20px; /* extra witruimte links */
    padding-left: 10px !important; /* witte marge links geforceerd */
    overflow-y: auto;
    position: fixed;
    z-index: 1001; /* Higher than content */
}

.sidebar-header {
    padding: 0 20px 20px;
    border-bottom: 1px solid var(--medium-gray);
    display: flex; /* Maak er een flex container van */
    align-items: center; /* Lijn items verticaal uit */
    justify-content: center; /* Centreer de items horizontaal */
    gap: 10px; /* Ruimte tussen logo en titel */
}

.sidebar-logo {
    width: 50px; /* Aangepaste breedte voor het SVG-logo (was 80px) */
    height: auto; /* Automatische hoogte voor correcte schaling */
    flex-shrink: 0; /* Voorkom dat het logo krimpt */
}

.sidebar-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--primary-purple);
}

.sidebar-hamburger {
    display: none; /* Only for mobile, handled by floating-hamburger */
}

.sidebar-chapters {
    list-style: none;
    padding: 0;
    margin: 20px 0 0 0;
}

.sidebar-chapter {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    cursor: pointer;
    border-left: 5px solid transparent;
    transition: all 0.3s ease;
}

.sidebar-chapter:hover {
    background-color: var(--accent-purple);
}

.sidebar-chapter.active,
.sidebar-chapter.active:hover {
    background-color: var(--accent-purple);
    border-left-color: var(--primary-purple);
    border-top-left-radius: 8px; /* Afronding die matcht met de titel-header */
    border-bottom-left-radius: 8px; /* Afronding die matcht met de titel-header */
}

.chapter-circle {
    min-width: 36px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid var(--medium-gray);
    margin-right: 15px;
    flex-shrink: 0;
    position: relative;
    background-color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
}

.chapter-circle.completed {
    background-color: var(--primary-purple);
    border-color: var(--primary-purple);
    color: var(--white);
}

.chapter-circle.half {
    background-color: var(--white);
    border-color: var(--primary-purple);
}

.chapter-circle::after {
    content: none !important;
}

.chapter-circle.half:not(.completed):not(.selected):not(.active)::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 50%;
    height: 100%;
    background-color: var(--primary-yellow);
    z-index: 1;
    border-radius: 50%;
}

.chapter-title {
    font-weight: 500;
    color: var(--dark-gray);
}

.sidebar-progress {
    padding: 18px 24px 24px 24px;
    border-top: 1px solid var(--medium-gray);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

/* Mobile Sidebar & Hamburger */
@media (max-width: 900px) {
    .sidebar-nav {
        transform: translateX(-100%);
        position: fixed;
        top: 0;
        left: 0;
        transition: transform 0.3s ease;
    }

    .sidebar-nav.open {
        transform: translateX(0);
    }
    
    .floating-hamburger {
        display: flex;
        position: fixed;
        bottom: 20px;
        left: 20px;
        width: 60px;
        height: 60px;
        background: var(--primary-purple);
        border-radius: 50%;
        justify-content: center;
        align-items: center;
        box-shadow: 0 2px 10px rgba(0,0,0,0.2);
        z-index: 1001;
        cursor: pointer;
    }

    body.sidebar-open .sidebar-overlay {
        display: block;
    }
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.floating-hamburger .progress-ring {
    transform: rotate(-90deg);
}

.floating-hamburger .progress-ring circle {
    transition: stroke-dashoffset 0.35s;
    transform: rotate(-90deg);
    transform-origin: 50% 50%;
}

.floating-hamburger .hamburger-lines {
    position: absolute;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 24px;
    height: 20px;
}

.floating-hamburger .hamburger-lines span {
    display: block;
    width: 100%;
    height: 3px;
    background: var(--white);
    border-radius: 3px;
    transition: all 0.3s ease-in-out;
}

body.sidebar-open .floating-hamburger .hamburger-lines span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
body.sidebar-open .floating-hamburger .hamburger-lines span:nth-child(2) {
    opacity: 0;
}
body.sidebar-open .floating-hamburger .hamburger-lines span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Sidebar progress visual (ronde meter onderin) */
.progress-visual {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: conic-gradient(var(--primary-purple) 0% 0%, var(--medium-gray) 0% 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.progress-text {
    font-size: 1.1rem;
    color: var(--primary-purple);
    font-weight: 600;
} 