/* CSS Variables for easy theming */
:root {
    --primary-color: #7b8fa1;
    --nav-bg: #333;
    --nav-hover: #575757;
    --footer-bg: #35424a;
    --text-color: #333;
    --text-light: white;
}

/* Base Styles */
body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    color: var(--text-color);
    display: flex;
    min-height: 100vh;
    position: relative;
}

header {
    background: var(--primary-color);
    color: var(--text-light);
    padding: 1rem 0;
    text-align: center;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
}

nav {
    background: var(--nav-bg);
    width: 200px;
    padding: 1rem 0;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 101;
    overflow-y: auto;
}

nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

nav a,
nav a:link,
nav a:visited,
nav a:hover,
nav a:active {
    color: var(--text-light) !important;
    text-decoration: none;
    display: block;
    padding: 0.75rem 1rem;
    transition: background 0.3s;
}

nav ul ul {
    display: block;
    padding-left: 1rem;
    background: #444; /* Slightly lighter than nav-bg for hierarchy */
}

nav ul ul li a {
    padding: 0.5rem 1rem;
    font-size: 0.9em;
    margin-left: 0.5rem;
}

nav a:hover {
    background: var(--nav-hover);
}

.content-wrapper {
    flex: 1;
    margin-left: 200px;
    width: calc(100% - 200px);
}

main {
    padding: 1rem;
    margin-top: 0;
}

footer {
    background: var(--footer-bg);
    color: var(--text-light);
    text-align: center;
    padding: 1rem 0;
    width: calc(100% - 200px);
    margin-left: 200px;
}

section {
    padding-top: 125px;
    margin-bottom: -115px;
}

h2 {
    margin-bottom: 10px;
}

p {
    margin-bottom: 10px;
}

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

/* Mobile Navigation */
.hamburger {
    display: none;
    position: fixed;
    top: 10px;
    left: 8px;
    z-index: 102;
    font-size: 24px;
    cursor: pointer;
    background: var(--primary-color);
    color: var(--text-light);
    padding: 5px 10px;
    border-radius: 4px;
}

/* Responsive Layout */
@media (max-width: 768px) {
    body {
        flex-direction: column;
    }

    .content-wrapper {
        margin-left: 0;
        width: 100%;
    }

    nav {
        width: 85%;
        height: 100vh;
        position: fixed;
        left: -100%;
        transition: left 0.3s;
        z-index: 101;
        padding-top: 50px;
    }

    nav.active {
        left: 0;
    }

    header, main, footer {
        width: 100%;
        margin-left: 0;
    }

    main {
        margin-top: 70px;
        padding: 1rem;
        box-sizing: border-box;
        width: 100%;
        max-width: 100%;
        overflow: hidden;
    }

    div[style*="float: right"] {
        float: none;
        width: 100%;
        margin: 0 0 1rem 0;
    }

    p, ul, ol {
        margin-right: 0;
        padding-right: 0;
        width: 100%;
        box-sizing: border-box;
    }

    .hamburger {
        display: block;
    }
}
