* {
    margin: 0px;
    padding: 0;
    box-sizing: border-box;
}

.menu {
    justify-content: center;
    align-items: center;
    width: 95%;
    margin: 0 auto;
    display: flex;
}

ol {
    display: flex;
    justify-content: center;
    width: 100%;
    margin: 0 auto;
    padding: 0.5em 0;
    list-style: none;
    align-items: center;
    align-content: center;
    flex-wrap: wrap;
}

.menu-item {
    background: #444;
    padding: 0.5em 0.5em;
    position: relative;
    border-bottom: 5px solid #999;
    margin: 0 0.1em;
    transition: border-bottom 0.23s ease-in-out, background 0.23s linear;
    cursor: pointer;
    min-width: 8em;
    text-align: center;
}

.menu-item[aria-haspopup=true] {
    border-bottom-color: #fc9b1b;
}

.menu-item:hover,
.menu-item:focus-within {
    border-bottom-color: #91d36b;
    background: #333;
}

.menu-item:hover .sub-menu,
.menu-item:hover .sub-menu:hover,
.menu-item:focus-within .sub-menu,
.menu-item:focus-within .sub-menu:hover {
    visibility: visible;
    opacity: 1;
    display: flex;
}

.sub-menu {
    flex-direction: column;
    align-items: flex-start;
    position: absolute;
    left: 0;
    margin-top: 1em;
    visibility: hidden;
    display: none;
    opacity: 0;
}

.sub-menu .menu-item {
    margin: 0.1em 0;
    padding: 1em;
    width: 10em;
    text-align: center;
    z-index: 2;
}

.menu-item a {
    text-decoration: none;
	color: #ffffff;
}

a:focus {
    outline: none;
}

@media (max-width: 690px) {
    .menu {
        width: 95%;
        font-size: 14px;
    }

    .menu-item {
        margin: 0.1em;
    }

    .menu-item:nth-child(1) {
        order: 0;
    }

    .menu-item:nth-child(2) {
        order: 1;
    }

    .menu-item:nth-child(3) {
        order: 3;
    }

    .menu-item:nth-child(4) {
        order: 4;
    }

    .menu-item:nth-child(5) {
        order: 2;
    }
}

@media (max-width: 480px) {
    .menu {
        font-size: 12px;
    }
}