/*
Theme Name: Club Commedia
Version: 3.3
*/

/* 1. RESET & BASIS */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; min-height: 100%; background-color: #ffffff; }

body {
    display: flex;
    font-family: "Lucida Sans Unicode", verdana, sans-serif;
    color: black;
    /* Rechter Swirl (bgr.gif) vastgezet op de body */
    background-image: url('images/bgr.gif');
    background-repeat: no-repeat;
    background-position: 300px top; 
    background-attachment: fixed;
}

/* 2. SIDEBAR (Vastgezet op desktop) */
#sidebar {
    width: 300px;
    background-color: #94218c;
    background-image: url('images/bgl.gif');
    background-repeat: no-repeat;
    background-position: left top; 
    background-size: auto; 
    background-attachment: fixed;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    color: white;
    border-right: 1px solid #000;
    padding-top: 20px;
    z-index: 100;
}

.logo-desktop { display: block; margin: 0 auto; height: auto; }
.logo-mobile { display: none; }

/* 3. NAVIGATIE & SUBMENU LOGICA */
#sidebar nav { border: 1px dashed white; margin: 0 25px; padding: 10px 0; }
.menu-header {
    background-color: #FF9933;
    border-top: 1px dashed white;
    border-bottom: 1px dashed white;
    color: white;
    text-align: center;
    font-weight: bold;
    padding: 5px;
    margin: 20px 25px 0 25px; 
    font-size: 8pt;
    letter-spacing: 2px;
}

#sidebar ul { list-style: none; padding: 0; margin: 0; text-align: center; }
#sidebar ul li a { color: white !important; text-decoration: none; font-weight: bold; font-size: 8pt; display: block; padding: 4px 0; }
#sidebar ul li.current-menu-item > a,
#sidebar ul li.current_page_item > a { text-decoration: underline !important; }

/* SUB-MENU LOGICA: Alleen tonen indien actief */
#sidebar ul li ul.sub-menu { 
    display: none; 
    list-style: none; 
    padding: 0; 
}

/* Toon submenu bij actieve pagina of actieve ouder (ancestor) */
#sidebar ul li.current-menu-item ul.sub-menu,
#sidebar ul li.current-menu-ancestor ul.sub-menu,
#sidebar ul li.current_page_item ul.sub-menu,
#sidebar ul li.current_page_ancestor ul.sub-menu { 
    display: block; 
}

#sidebar ul li ul.sub-menu li a { 
    font-style: italic !important;
    font-weight: bold !important; 
    font-size: 7.5pt;
    padding: 2px 0;
}

/* 4. CONTENT AREA */
#main-content {
    flex-grow: 1;
    margin-left: 300px;
    padding: 40px;
    min-height: 100vh;
    background: transparent; 
}

.content-box {
    border: 2px solid #000;
    width: 95%;
    max-width: 1000px;
    background-color: rgba(255, 255, 255, 0.7);
    margin-bottom: 30px;
    margin-left: 10px;
    overflow: hidden;
}

.kop-titel { display: block; font-weight: bold; border-bottom: 1px dashed #000; padding: 5px 10px; font-size: 10pt; }
.entry-content { padding: 15px; font-size: 9pt; line-height: 1.5; }

/* 5. MOBIEL */
@media screen and (max-width: 768px) {
    body { flex-direction: column; background-image: none; }
    #sidebar { 
        position: relative; width: 100% !important; height: auto !important;
        padding-top: 5px !important; background-position: center top;
        background-size: cover; background-attachment: scroll;
        border-right: none; border-bottom: 2px solid #000; padding-bottom: 5px;
    }
    
    #sidebar ul li ul.sub-menu { display: none; }
    #sidebar ul li.current-menu-ancestor ul.sub-menu,
    #sidebar ul li.current_page_ancestor ul.sub-menu { display: block; }

    .logo-desktop, .hide-mobile { display: none !important; }
    .logo-mobile { display: block !important; margin: 5px auto; max-width: 180px; height: auto; }
    #main-content { width: 100% !important; margin-left: 0; padding: 15px 10px; background-color: #ffffff; }
    .content-box { width: 100% !important; margin-left: 0; background-color: #ffffff; }
}

/* OVERIG */
.disclaimer-btn { border: 1px solid #000; margin: 40px 25px; padding: 5px; background: rgba(0,0,0,0.3); text-align: center; }
.disclaimer-btn a { font-size: 7pt; color: white; text-decoration: none; font-weight: bold; }
.page-numbers { display: inline-block; background-color: #999999; color: white !important; padding: 5px 10px; margin: 0 2px; text-decoration: none; font-size: 9pt; }
.page-numbers.current { background-color: #666666; }
