/* style.css (Opgeschoonde Versie 7.1) */

/* === Algemeen === */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.6;
    margin: 0;
    background-color: #f9f9f9;
    color: #333;
}

.container {
    display: flex;
    min-height: 100vh;
}

/* === Main Content === */
main {
    flex: 1;
    padding: 30px 40px;
}

main h1 {
    font-size: 1.8em;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 10px;
    margin-top: 0;
}

/* === Sidebar === */
aside {
    width: 320px;
    background-color: #fff;
    border-right: 1px solid #e0e0e0;
    padding: 20px;
    overflow-y: auto;
    height: 100vh;
    position: sticky;
    top: 0;
    box-sizing: border-box;
}

aside h3 {
    margin-top: 0;
    color: #111;
}

aside .search-form input[type="text"] {
    width: 100%;
    padding: 8px;
    box-sizing: border-box;
    border: 1px solid #ccc;
    border-radius: 4px;
}

aside .book-list {
    list-style: none;
    padding: 0;
    margin: 20px 0 0 0;
}

aside .book-list>li>a {
    text-decoration: none;
    color: #005a9c;
    font-weight: bold;
    font-size: 1.1em;
    display: block;
    margin-bottom: 5px;
}

aside .article-list {
    list-style: none;
    padding-left: 0;
    margin-top: 5px;
}

aside .article-list li {
    list-style: none;
    padding-left: 0;
    margin-bottom: 2px;
}

aside .article-list a {
    display: block;
    padding: 2px 0;
    text-decoration: none;
    font-weight: normal;
}

aside .article-list a:hover {
    color: #005a9c;
}

aside .article-list a:not(.structuur-link) {
    color: #444;
    font-size: 0.9em;
    padding-left: 30px;
}

/* Artikel link */
aside .article-list a:not(.structuur-link).active {
    color: #005a9c;
    font-weight: bold;
}

a.structuur-link {
    font-weight: bold;
    color: #333;
}

/* Structuur link (algemeen) */
a.structuur-h {
    font-size: 0.9em;
    margin-top: 15px;
    margin-bottom: 5px;
    padding-left: 5px;
}

/* Hoofdstuk */
a.structuur-t {
    font-size: 0.85em;
    color: #555;
    margin-left: 10px;
    margin-top: 10px;
}

/* Titel */
a.structuur-a {
    font-size: 0.8em;
    font-style: italic;
    color: #777;
    margin-left: 20px;
    margin-top: 8px;
}

/* Afdeling */

/* === Wettekst Opmaak (Content) === */
.artikel-groep {
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 20px;
    margin-bottom: 30px;
}

.artikel-groep h2 {
    font-size: 1.3em;
    color: #111;
}

.wet-artikel p {
    margin-left: 0;
    margin-bottom: 0.8em;
    margin-top: 0.5em;
}

/* Geen standaard indent meer */
.wet-artikel h4 {
    margin-left: 0;
    margin-bottom: 5px;
    margin-top: 1.5em;
    font-size: 1.05em;
    color: #222;
}

/* Lid X */
.wet-artikel em,
.wet-artikel nadruk {
    font-style: italic;
    font-weight: 600;
    color: #111;
}

.wet-artikel sup {
    vertical-align: super;
    font-size: smaller;
}

.wet-artikel sub {
    vertical-align: sub;
    font-size: smaller;
}

/* Lijsten (Ordered & Unordered) */
.wet-artikel ol,
.wet-artikel ul {
    margin-left: 1.5em;
    padding-left: 1.5em;
    margin-bottom: 0.8em;
}

/* Inspringen voor lijsten */
.wet-artikel li {
    margin-bottom: 0.5em;
}

.wet-artikel li p:first-child {
    display: block;
    margin-left: 0;
    margin-top: 0;
    margin-bottom: 0;
}

/* Reset <p> binnen <li> */
/* Specifieke lijst types (HTML 'type' attribuut wordt nu gebruikt door parser) */
.wet-artikel ol[type="a"] {
    list-style-type: lower-alpha;
}

.wet-artikel ol[type="A"] {
    list-style-type: upper-alpha;
}

.wet-artikel ol[type="i"] {
    list-style-type: lower-roman;
}

.wet-artikel ol[type="I"] {
    list-style-type: upper-roman;
}

.wet-artikel ol[type="1"] {
    list-style-type: decimal;
}

/* Default */
.wet-artikel ul {
    list-style-type: disc;
}

/* Default voor <ul> */

/* Cross Links */
.wet-artikel a.cross-link {
    color: #005a9c;
    text-decoration: none;
    border-bottom: 1px dotted #005a9c;
}

.wet-artikel a.cross-link:hover {
    border-bottom-style: solid;
}

/* === Zoekresultaten Pagina === */
.search-result {
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
    margin-bottom: 15px;
}

.search-result h2 a {
    color: #005a9c;
    text-decoration: none;
}

.search-result p {
    margin: 5px 0 0;
}

/* === Responsive === */
@media (max-width: 800px) {
    .container {
        flex-direction: column;
    }

    aside {
        width: 100%;
        height: auto;
        position: static;
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
    }

    main {
        padding: 20px;
    }
}
/* === Responsive === */
@media (max-width: 800px) {
    .container {
        flex-direction: column;
        /* Plaats sidebar boven content */
    }

    aside {
        width: 100%;
        /* Volledige breedte */
        height: auto;
        /* Automatische hoogte */
        max-height: 50vh;
        /* Beperk hoogte tot helft scherm, maak scrollbaar */
        position: static;
        /* Niet meer sticky */
        border-right: none;
        border-bottom: 2px solid #e0e0e0;
        /* Duidelijkere scheiding */
        overflow-y: auto;
        /* Zorg voor scrollen indien nodig */
        box-sizing: border-box;
        /* Zorg dat padding binnen de 100% breedte valt */
    }

    main {
        padding: 20px;
        /* Minder padding op mobiel */
    }

    /* Optioneel: Maak lettertypes iets kleiner op mobiel */
    body {
        font-size: 95%;
    }

    main h1 {
        font-size: 1.6em;
    }

    aside .book-list>li>a {
        font-size: 1.0em;
    }

    a.structuur-h {
        font-size: 0.85em;
    }

    a.structuur-t {
        font-size: 0.8em;
    }

    a.structuur-a {
        font-size: 0.75em;
    }

    aside .article-list a:not(.structuur-link) {
        font-size: 0.85em;
    }
}