html, body {
    height: 100%;
    width: 100%;
    padding: 0;
    margin: 0;
    font-family: Verdana, sans-serif;
    font-size: 12px;
}

body {
    background: url("https://merudi-praktijk.nl/cl/template/nims/images/right_column_background_gradient.gif") repeat-y top right;
}

body a {
    color: #fefefe;
    font-weight: bold;
}

div#container {
    min-height: 100%;
    background: url("https://merudi-praktijk.nl/cl/template/nims/images/left_column_background_gradient.gif") repeat-y top left;
}

div#main {
    overflow: auto;
    padding-bottom: 116px;
}

div#header {
    background-color: #d8ced7;
    border-bottom: 1px solid #000;
    position: relative;
}

div#row1 {
    width: 100%; 
    height: 25px;
    background-color: #716490; /* Purple color */
    border-bottom: 1px solid #8e848f;
}

div#row2wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 980px;
    margin: 0 auto;
    padding: 0;
    position: relative;
    flex-wrap: nowrap; /* Prevent wrapping */
}

div#row2c1 {
    flex: 0 0 auto;
    min-width: 290px;
    text-align: left;
    z-index: 2; /* Ensure the logo is on top */
    position: relative;
}

div#row2c2 {
    flex: 1 1 auto;
    text-align: left;
    z-index: 1; /* Photo behind the logo */
    position: relative;
    max-width: 100%; /* Ensure it doesn't overflow */
    padding-left: 10px;
    box-sizing: border-box;
}

div#row2c3 {
    flex: 0 0 50px;
    min-width: 50px;
    text-align: center;
}

div#row3 {
    width: 100%;
    height: 4px;
    background-color: #716490;
    border-bottom: 1px solid #9c959c;
    border-top: 1px solid #9c959c;
    position: relative;
    z-index: 3; /* Ensure row3 stays above other elements */
    margin: 0; /* Ensure no margin */
}

/* General layout settings for the left menu */
div#left-menu-float {
    float: left;
    margin-left: 0px;
    width: 200px; /* Define a width for the left menu */
}

div#row4wrapper {
    width: 100%;
    background: url("https://merudi-praktijk.nl/cl/template/nims/images/left_menu_background.gif") no-repeat;
    padding: 0;
    margin: 0;
}

div#row4c1 {
    padding-top: 24px;
    padding-right: 8px;
    text-align: right;
    background-color: transparent;
}

/* Styling for the links within the left menu */
div#row4c1 a {
    display: block;
    height: 14px;
    padding-left: 0px;
    padding-right: 0px;
    padding-top: 8px;
    color: #886490;
    text-decoration: none;
    font-weight: 600;
    font-size: 12px;
    margin-bottom: 10px; /* Add space between menu items */
}

/* Optional: Additional padding/spacing for the left menu content cleaner */
div#row4_cleaner {
    height: 3px;
}

div#menu_bar {
    background: url("https://merudi-praktijk.nl/cl/template/nims/images/menu_bar_background.gif") repeat-x top left;
    padding: 8px 10px;
    text-align: center;
    font-size: 12px;
    color: #886490;
    font-weight: 600;
    position: relative;
    z-index: 4; /* Ensure the menu bar is on top */
    margin: 0; /* Ensure no margin */
    height: 24px;
}

div#menu_bar a {
    color: #886490;
    text-decoration: none;
    padding: 8px 6px;
}

div#content {
    background: #9683a1;
    color: #fefefe;
    padding: 10px;
    max-width: 640px;
    letter-spacing: 1px;
    line-height: 20px;
    margin-top: 27px;
}

div#footer {
    background: url("https://merudi-praktijk.nl/cl/template/nims/images/footer_background.gif") repeat-x top left;
    height: 116px;
    display: flex;
    justify-content: space-between;
    padding-top: 00px;
    padding-right: 0px;
    padding-bottom: 10px;
    padding-left: 62px;
}

div#footer_text {
    font-size: 11px;
    color: #866391;
    margin-top: 20px;
}

div#footer_text a {
    color: #866391;
    text-decoration: none;
}

div#footer_logo img {
    max-width: 100%;
    height: auto;
}

/* Responsive design adjustments */
@media (max-width: 768px) {
    div#row2wrapper {
        flex-wrap: nowrap; /* Prevent stacking */
    }

    div#row2c1 {
        min-width: 150px; /* Reduce the minimum width to allow better fit */
    }

    div#row2c2 {
        max-width: calc(100% - 160px); /* Allow space for the logo */
    }

    div#row3 {
        position: relative;
        margin-top: 0; /* Remove extra margin to avoid shifting */
    }

    div#menu_bar {
        font-size: 10px;
        margin-top: 0; /* Ensure it is directly below row3 */
    }

    div#content {
        max-width: 100%;
        padding: 15px;
    }

    div#footer {
        flex-direction: column;
        text-align: center;
        padding: 10px;
    }

    div#footer_logo {
        margin-top: 10px;
    }
}

/* Adjust float for wider screens */
@media (min-width: 680px) {
    div#left-menu-float {
        margin-right: 0px;
	 margin-left: calc(50% - 530px);
    }

    div#content {
        margin-left: auto;
        margin-right: auto;
        text-align: left; /* Ensure content stays centered */
    }
}

/* Adjustments for very wide screens */
@media (min-width: 980px) {
    div#left-menu-float {
        right: 0;
        top: 0;
    }
}
