/* Global Styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Open Sans';
}

body {
    background-color: #f9f9f9;
    color: #333;
    font-size: 19px;
}

a {
    color: #3498db;
    text-decoration: none;
}

a:hover {
    color: #1f74ad;
}

/* Header */
header {
    background-color: #3498db;
    position: fixed;
    top: 0;
    height: 6rem;
    width: 100%;
    color: #fff;
    padding: 1rem 1rem;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

header h1 {
    font-size: 40px;
}

/* Navigation */

nav {
}

nav ul {
    list-style: none;
    display: flex;
    gap: 1rem;
}

nav ul li {
    position: relative;
}

nav ul li a {
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background 0.3s;
}

nav ul li a:hover {
    color: #f9f9f9;
}

nav a:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

/* Main Content */

/* This container spans the area between the header, footer and sidebar. */
.container {
    position: absolute;
    left: 250px;
    top: 6rem;
    right: 0;
    bottom: 1rem; /* Add bottom constraint */
    gap 10px;
    padding-top: 1rem;
    padding-bottom: 1rem;
    /* The room for text is 300px + 300px, make sure these are balanced. */
    padding-left: max(calc(50% - 350px - 250px), 1rem); /* Subtract the length of the sidenav here.*/
    padding-right: max(calc(50% - 350px), 1rem);
    overflow-y: auto;
    overflow-x: auto;
}

.overview {
    position: static;
    background-color: #fff;
    width: 100%;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

.overview li {
    padding: 6px 8px 6px 0px;
    text-decoration: none;
    color: #fff;
    display:block;
}

.overview ul {
    padding-left: 0;
    list-style: none;
}

.sidebox {
    position: sticky;
    background-color: #fff;
    width: 100%;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

.post {
    position: static;
    background-color: #fff;
    width: 100%;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

.post-meta {
    font-size: 14px;
    color: #777;
    margin-bottom: 1rem;
}

.post-content {
    line-height: 1.3;
    color: #555;
}

.post h2 {
    font-size: 30px;
    margin-bottom: 0.5rem;
    color: #333;
}

.post p {
    margin: 0 0 17px 0; /* top right bottom left */
}

.post ul {
    margin-left: 13px;
    padding-left: 0;
}

.post li {
    margin-left: 13px;
    margin-bottom: 5px;
}

.sidenav {
    width: 250px;
    position: fixed;
    padding: 1rem 0;
    z-index: 1;
    top: 6rem;
    bottom: 3rem;
    left: 0;
    background-color: #93c4fb;
    overflow-x: hidden;
    overflow-y: auto;
    padding-top: 20px;
}

.sidenav li {
    padding: 6px 8px 6px 16px;
    text-decoration: none;
    color: #fff;
    display:block;
}

.sidenav ul {
    padding-left: 0;
    list-style: none;
}

.sidenav a:hover {
    color: #fff;
}

.sidenav a:hover {
    color: #3498db;
}

.sidenav-head {
    font-weight: bold;
    color: #fff;
}

.sidenav-content {
    padding-left: 0px;
    color: #fff;
}

/* Footer */
footer {
    background-color: #333;
    color: #fff;
    position: fixed;
    text-align: center;
    line-height: 3rem;
    padding: 0;
    height: 3rem;
    font-size: 0.9rem;
    position: fixed;
    bottom: 0;
    width: 100%;
}

/* Responsive Design */

/* Tablet styles */
@media (max-width: 1024px) and (min-width: 769px) {
    .post h2 {
        font-size: 22px;
    }

    .sidenav {
        transform: translateX(-100%);
    }

    .container {
        left: 0px;
        padding-left: max(calc(50% - 350px), 1rem); /* Subtract the length of the sidenav here.*/
        padding-right: max(calc(50% - 350px), 1rem);
    }
}

@media (max-width: 768px) {
    body {
        font-size: 16px;
    }

    header h1 {
        font-size: 30px;
        padding-bottom: 10px
    }

    .post h2 {
        font-size: 22px;
    }

    .sidenav {
        transform: translateX(-100%);
    }

    .container {
        left: 0px;
        padding-left: max(calc(50% - 350px), 1rem); /* Subtract the length of the sidenav here.*/
        padding-right: max(calc(50% - 350px), 1rem);
    }
}


