nav {
    background-color: #0056b3;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
    position: relative;
    margin-top: 40px;
    /* space under top bar */
}


/* Remove absolute positioning, center with flex */

nav ul {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
    /* Remove absolute position */
    /* position: absolute; */
    /* left: 50%; */
    /* transform: translateX(-50%); */
}


/* Space out menu items */

nav ul li {
    margin: 0 15px;
}

nav ul li a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    padding: 6px 8px;
    display: inline-block;
    transition: background-color 0.3s ease;
    border-radius: 4px;
}

nav ul li a:hover,
nav ul li a:focus {
    background-color: rgba(255, 255, 255, 0.2);
    outline: none;
}


/* Hamburger icon - hidden on desktop */

nav .hamburger {
    display: none;
    cursor: pointer;
    position: fixed;
    /* so it can be moved anywhere */
    top: 20px;
    /* default start position */
    right: 20px;
    z-index: 3000;
    touch-action: none;
    /* important for touch dragging */
}

nav .hamburger svg {
    fill: none;
    stroke: gray;
    stroke-width: 2;
    width: 28px;
    height: 28px;
}


/* Sidebar base */

.sidebar {
    height: 100%;
    width: 0;
    /* fully closed */
    position: fixed;
    top: 0;
    right: 0;
    background-color: #003f80;
    /* visible color only when open */
    overflow-x: hidden;
    transition: width 0.3s ease;
    padding-top: 80px;
    padding-left: 0;
    /* no padding when closed */
    z-index: 2000;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    box-sizing: border-box;
}


/* When sidebar is open */

.sidebar.open {
    width: 250px;
    /* visible width */
    padding-left: 20px;
    /* add padding only when open */
}


/* Sidebar links */

.sidebar a {
    padding: 15px 20px;
    text-decoration: none;
    font-size: 20px;
    color: white;
    display: flex;
    align-items: center;
    gap: 15px;
    width: 90%;
    border-radius: 8px;
    margin-bottom: 15px;
    transition: background-color 0.3s ease;
}

.sidebar a:hover {
    background-color: #004f99;
}


/* Close button */

.sidebar .closebtn {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 32px;
    color: white;
    cursor: pointer;
}


/* SVG icons inside links */

.sidebar a svg {
    width: 24px;
    height: 24px;
    fill: white;
}


/* Push logo to the bottom */

.sidebar-logo {
    margin-top: auto;
    /* push logo down */
    width: 100%;
    text-align: center;
    padding: 15px 0;
}

.sidebar-logo img {
    max-width: 150px;
    height: auto;
}


/* Responsive mobile */

@media screen and (max-width: 768px) {
    nav ul {
        display: none;
    }
    nav .hamburger {
        display: block;
    }
}