/* === Base styles (mobile first) === */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    min-height: 2rem;
    margin: 0;
    z-index: 10;
    background-color: #007cb9;
}

.logo {
    margin-right: 1rem;
    margin-top:0.2rem;
}

.logo img {
    width: 2rem;
    height: 2rem;
    border-radius: 5px;
}

.topnav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem;
    width: 100%;
    position: relative;
}

.menu-items {
    list-style: none;
    display: none;
    margin: 0;
    padding: 0;
    flex-direction: column;
    align-items: center;
    width: auto;
    flex-grow: 1;
    background-color: #007cb9;
}

.menu-items li {
    list-style: none;
    margin: 0.5rem 0;
    text-align: center;
}

.topnav a {
    font-size: 1rem;
    text-decoration: none;
    color: #f1f8fd;
    display: inline-block;
}

.topnav a:hover,
.topnav a:active {
    color: #f6c667;
}

.icon {
    font-size: 2rem;
    cursor: pointer;
    padding: 0.5rem;
    margin-left: auto;
    margin-right: 1rem;
    
}


/* Mobile: show menu when toggled */
.topnav.responsive .menu-items {
    display: flex;
}

/* === Desktop styles === */
@media screen and (min-width: 601px) {
    header {
        min-height: 2rem;
    }

    .menu-items {
        display: flex;
        flex-direction: row;
        justify-content: center;
        align-items: center;
        background: none;
        width: 100%;
    }

    .menu-items li {
        margin: 0 1rem;
        text-align: left;
    }

    .icon {
        display: none;
        visibility: hidden;
    }

    .menu-items li:has(.admin-btn),
    .menu-items li:has(.logout-btn) {
        margin-left: 0.3rem;
        margin-right: 0rem;
    }

    .menu-items li:has(.admin-btn) {
        margin-left: 5rem;
    }
}