/* Thema kleurvariabelen per host */
body.sinnerg {
    /* Donkergroene achtergrond en header kleur (zie footer/header) */
    --kleur-primair-donker: #157618;
    /* Groene accentkleur (knoppen/links) */
    --kleur-accent: #209b3b;
    /* Lichtere accentkleur voor hover/schaduw */
    --kleur-accent-hover: #2d9d3d;
    /* Witte tekst/lichte achtergrond voor content */
    --kleur-licht: #ffffff;
    /* Donkere tekst */
    --kleur-donker: #333333;
}

/* De andere thema's zijn niet aangepast, omdat de focus op sinnerg ligt */
body.dominion {
    --kleur-licht: #C00000;
    --kleur-donker: #d6d2d2;
}

body.totallyhosted-nl {
    --kleur-licht: #72c02c;
    --kleur-donker: #5c9c24;
}

body.tools4isp {
    --kleur-licht: #F28F29;
    --kleur-donker: #ff8000;
}

body.totallyhosted-en {
    --kleur-licht: #72c02c;
    --kleur-donker: #5c9c24;
}

body.standaard_thema {
    --kleur-licht: #3bd45c;
    --kleur-donker: #2d9d3d;
}

/* Basisstijl */
* {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: auto;
    min-height: 100vh;
    overflow-y: auto;
    display: block;
    background-color: var(--kleur-licht);
    color: var(--kleur-donker);
}

/* OPLOSSING 1: Flexbox container om de kolommen naast elkaar te plaatsen */
.container {
    display: flex; /* Zorgt ervoor dat de kinderen (.sidebar, .content, .products) naast elkaar staan */
    width: 100%;
    min-height: 100vh;
    position: relative;
    flex-wrap: nowrap; /* Zorgt dat ze naast elkaar blijven op desktop */
    padding-top: 60px; /* Ruimte voor de vaste header */
    padding-bottom: 20px; /* Ruimte onderaan */
}

/* --- Header / Topnavigatie (Simulatie) --- */
body.sinnerg::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background-color: var(--kleur-primair-donker);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 900;
}

/* --- Sidebar (Linkerkolom: Categorieën) --- */
.sidebar {
    width: 25%; /* Minder star dan vw, past beter in flex */
    min-width: 280px;
    max-width: 350px;
    background-color: var(--kleur-licht);
    position: sticky;
    top: 60px;
    left: 0;
    bottom: unset;
    z-index: 900;
    box-shadow: none;
    overflow-y: auto;
    height: calc(100vh - 60px);
    padding: 20px 0;
    border-right: 1px solid #eeeeee;
}

.sidebar.show {
    left: 0;
}

.sidebar h2 {
    margin-bottom: 20px;
    padding-left: 20px;
    color: var(--kleur-primair-donker);
    font-size: 1.5rem;
}

.sidebar hr {
    border: none;
    height: 1px;
    background-color: #e0e0e0;
    margin: 0 20px 20px 20px;
}

.logo {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1100;
    background-color: var(--kleur-primair-donker);
    width: 25%; /* Zelfde breedte als sidebar */
    min-width: 280px;
    max-width: 350px;
    height: 60px;
    text-align: center;
    padding: 10px 0;
}

.logo img {
    max-width: 150px;
    height: 40px;
    object-fit: contain;
}

/* Categorieën en vragen */
.category-title {
    cursor: pointer;
    font-size: 1rem;
    color: var(--kleur-donker);
    border-bottom: none;
    padding: 10px 20px;
    transition: background-color 0.3s;
    margin-bottom: 0;
    font-weight: 500;
}

.category-title:hover {
    color: var(--kleur-accent);
    background-color: #f0f0f0;
}

.questions-list {
    list-style-type: none;
    padding-left: 0;
    display: none;
    margin-top: 0;
    background-color: #fafafa;
}

.questions-list li {
    margin: 0;
}

.questions-list li a {
    text-decoration: none;
    color: var(--kleur-donker);
    display: block;
    padding: 8px 20px 8px 30px;
    transition: background-color 0.3s, color 0.3s;
    font-size: 0.9rem;
}

.questions-list li a.selected {
    font-weight: bold;
    color: var(--kleur-accent);
    background-color: #e8f5e9;
    border-left: 5px solid var(--kleur-accent);
    padding-left: 25px;
}

.questions-list li a:hover {
    background-color: #e8f5e9;
    color: var(--kleur-accent);
}

/* --- Content (Middenkolom: Antwoord) --- */
.content {
    padding: 30px;
    background-color: var(--kleur-licht);
    color: var(--kleur-donker);
    border: none;
    border-radius: 0;
    margin: 0;
    margin-left: 0;
    flex-grow: 1; /* Neemt de beschikbare ruimte in beslag */
    width: 50%; /* Startbreedte, flex-grow neemt de rest over */
    min-width: 300px;
    line-height: 1.6;
    overflow-y: visible; /* Terug naar normale scroll */
    max-height: unset;
}

.content h1 {
    margin-bottom: 20px;
    font-size: 2rem;
    color: var(--kleur-primair-donker);
    border-bottom: 2px solid var(--kleur-accent);
    padding-bottom: 10px;
}

.content p {
    font-size: 1rem;
    white-space: pre-line;
}

/* --- Producten (Rechterkolom) --- */
.products {
    width: 25%; /* Minder star dan vw, past beter in flex */
    min-width: 200px;
    max-width: 300px;
    background-color: #f0f4f0;
    border: none;
    border-radius: 5px;
    padding: 20px;
    margin: 20px;
    height: fit-content;
    position: sticky;
    top: 80px;
    right: 0;
    overflow-y: auto;
    max-height: calc(100vh - 100px);
}

.products h2 {
    color: var(--kleur-primair-donker);
    margin-bottom: 15px;
}

.products ul {
    list-style: none;
    padding: 0;
}

.product-item {
    border-bottom: 1px solid #d0d0d0;
    padding-bottom: 15px;
    margin-bottom: 15px;
}

.product-item h3 {
    font-size: 1.1rem;
    margin-top: 10px;
    color: var(--kleur-primair-donker);
}

.product-item p {
    font-size: 0.9rem;
    color: #666;
}

/* --- Menu-knop mobiel --- */
.menu-toggle {
    display: none;
    background: var(--kleur-accent);
    color: white;
    padding: 10px;
    text-align: center;
    cursor: pointer;
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 1100;
    border-radius: 5px;
    width: 40px;
    height: 40px;
    font-size: 18px;
    line-height: 20px;
}

/* Zoekbalk */
#searchBar {
    width: calc(100% - 40px);
    padding: 10px;
    margin: 10px 20px;
    border: 1px solid #ccc;
    border-radius: 5px;
}


/* OPLOSSING 2: Fixed Right Buttons (Contact/Bel/Offerte) - Naar het midden van de pagina */
.fixed-right-buttons-container {
    position: fixed;
    top: 50%; /* Plaats de container bovenaan het midden */
    transform: translateY(-50%); /* Verschuif de container omhoog met de helft van zijn eigen hoogte */
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 9999;
    width: 50px;
}

.bel-knop,
.contact-knop,
.offerte-knop {
    background-color: var(--kleur-accent);
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 20px;
    font-weight: normal;
    text-align: center;
    line-height: 50px;
    cursor: pointer;
    z-index: 99999;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s ease, transform 0.1s ease-in-out;
    text-decoration: none;
    height: 50px;
    width: 50px;
    border-radius: 50%;
}

.bel-knop:hover,
.contact-knop:hover,
.offerte-knop:hover {
    background-color: var(--kleur-accent-hover);
    transform: scale(1.05);
}

/* Code block stijl */
code {
  background-color: #eee;
  border-radius: 3px;
  font-family: courier, monospace;
  padding: 0 3px;
}

footer {
    background-color: #193623;
    color: white;
    width: 100%;
    padding: 20px 0;
    height: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;

    position: relative;
}


/* --- Responsief (Aanpassen voor mobiel) --- */
@media (max-width: 1024px) {
    /* Herstel de flex-richting naar kolom voor mobiel */
    .container {
        flex-direction: column;
        padding-top: 50px;
    }
    body.sinnerg::before {
        height: 50px;
    }
    .logo {
        height: 50px;
        width: 100%;
        min-width: unset;
        max-width: unset;
        text-align: left;
        padding-left: 20px;
    }

    /* Sidebar wordt weer een uitschuifbaar menu op mobiel */
    .sidebar {
        min-width: unset;
        width: 100%;
        max-width: 100%;
        position: fixed;
        height: 100vh;
        left: -100%;
        top: 0;
        padding-top: 50px;
        border-right: none;
    }

    .content {
        width: 100%;
        min-width: unset;
        margin: 0;
        padding: 20px;
        order: 1; /* Zorgt dat de content na de sidebar komt in de DOM */
    }

    .products {
        width: 100%;
        min-width: unset;
        max-width: unset;
        margin: 20px; 
        position: static; /* Is niet sticky op mobiel */
        max-height: unset;
        order: 2; /* Zorgt dat producten onder de content staan */
    }
    .menu-toggle {
        display: block;
    }
    
    /* Vaste knoppen op mobiel (weer onderin of elders) */
    .fixed-right-buttons-container {
        top: unset;
        bottom: 20px;
        transform: translateY(0);
        right: 10px;
    }
}