nav {
    height: 15vh;
    background-color: blue;
    border-top: solid 1vh yellow;
    border-bottom: solid 1vh yellow;
    color: white;
}

nav ul {
    list-style: none;
    display: flex;
    align-items: center;
    height: 100%;
    margin: 0;
    padding: 0;
    width: 100%;
}


.mobile-menu {
    max-height: 0;
    overflow: hidden;
    padding: 0;
    transition: max-height 0.8s ease;
}

.mobile-menu.show {
    max-height: 500px; /* Large enough to fit all menu items */
}

.mobile-menu ul {
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
    background-color: #007FFF
}

.mobile-menu li {
    display: block;      /* allow width/height to apply consistently */
    font-size: clamp(2rem, 3vw, 3rem);
    border: solid 1px black;
}

.mobile-menu a {
    display: block;      /* makes the link itself fill the li */
    padding: 1rem;       /* clickable area */
    text-align: center;
    width: 100%;
    text-decoration: none;
    color: white;
}

.mobile-menu .active {
    background-color: #e0e0e0;
    color: #0078d7;
}

nav li {
    height: 100%;
    display: flex;
    align-items: center;
}

nav li:first-child {
    flex: 0 0 auto; /* Only as wide as the h1 needs */
    font-size: clamp(1rem, 2vw, 2rem);;
    padding: 0 1em;
}

nav li:not(:first-child):not(.menu-icon) {
    flex: 1 1 0; /* Share remaining space */
    font-size: clamp(1.1rem, 2vw, 2.2rem);
}

nav a {
    text-decoration: none;
    color: white;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

nav li:has(a):hover {
    background: #e0e0e0;
    color: #0078d7;
}

nav .menu-icon {
    display: none;
    cursor: pointer;
}

nav .menu-icon:hover {
    background-color: #e0e0e0;
}

@media (max-width: 700px) {
    nav {
        display: flex;
        align-items: center;
    }

    nav li:not(:first-child):not(.menu-icon) {
        display: none;
    }

    nav .menu-icon {
        display: flex;
        align-items: center;
        font-size: 2em;
        margin-left: auto;
        padding: 0 10vw;
    }
}

@media (min-width: 700px) {
    .mobile-menu {
        display: none; /* Hide mobile menu on larger screens */
    }
}