/*  navi-hamburger.css
   refactor: tm-nav -> top-nav
*/
@font-face {
    font-family: handwrittenFont;
    src: url(EXT:tmpl_h5uarcana/Resources/Public/Fonts/handwritten_1001fonts-com_AlexBrush-Regular.ttf);
}

#menu-logo {
    display: inline;
}

#menu-logo img {
    font-family: handwrittenFont;
    width: 30%;
}

.header-new {
    display: none;
}

@media (min-width: 991px) {
    #menu-logo {
        display: none;
    }
    .header-new {
        display: block;
        background-color: #f5f5f5;
    }

    nav {
        margin: 0;
        padding: 0;
    }

    .top-nav {
        margin-left: 0;
        padding-left: 5rem;
    }

    .top-nav ul {
        display: contents;
    }

    .top-nav ul li {
        list-style: none;
        display: inline-block;
        vertical-align: middle;
        text-align: center;
        max-width: 12rem;
        padding-right: 5px;
        padding-left: 5px;
    }

    .top-nav-link {
        color: #6f706e;
        text-decoration: none;
        padding-bottom: 1px;
    }

    .top-nav-link.active,
    .top-nav-link:hover {
        border-bottom: 2px solid #6f706e;
    }
}

/* thanks to  https://alvarotrigo.com/blog/hamburger-menu-css/ */

.top-nav {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    background-color: #f5f5f5;
    /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */
    color: #FFF;
    height: 4rem;
    padding: 1em;
}

.menu {
    display: flex;
    flex-direction: row;
    list-style-type: none;
    margin: 0;
    padding: 0;
}

.menu > li {
    margin: 0 1rem;
    overflow: hidden;
}

.menu-button-container {
    display: none;
    height: 100%;
    width: 30px;
    cursor: pointer;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

#menu-toggle {
    display: none;
}

.menu-button,
.menu-button::before,
.menu-button::after {
    display: block;
    background-color: black;
    position: absolute;
    height: 4px;
    width: 30px;
    transition: transform 400ms cubic-bezier(0.23, 1, 0.32, 1);
    border-radius: 2px;
}

.menu-button::before {
    content: '';
    margin-top: -8px;
}

.menu-button::after {
    content: '';
    margin-top: 8px;
}

#menu-toggle:checked + .menu-button-container .menu-button::before {
    margin-top: 0px;
    transform: rotate(405deg);
}

#menu-toggle:checked + .menu-button-container .menu-button {
    background: rgba(255, 255, 255, 0);
}

#menu-toggle:checked + .menu-button-container .menu-button::after {
    margin-top: 0px;
    transform: rotate(-405deg);
}

@media (max-width: 991px) {
    .menu-button-container {
        display: flex;
    }

    .menu {
        position: absolute;
        top: 0;
        margin-top: 4rem;
        left: 0;
        flex-direction: column;
        width: 100%;
        justify-content: center;
        align-items: center;
    }

    #menu-toggle ~ .menu li {
        height: 0;
        margin: 0;
        padding: 0;
        border: 0;
        transition: height 400ms cubic-bezier(0.23, 1, 0.32, 1);
    }

    #menu-toggle:checked ~ .menu li {
        border: 1px solid #5d5d5d;
        height: 2.5em;
        padding: 0.5em;
        transition: height 400ms cubic-bezier(0.23, 1, 0.32, 1);
    }

    .menu > li a active {
        text-decoration: underline;
    }

    .menu > li a,
    .menu > li {
        color: white;
        background-color: #8e8e8e;
        text-decoration: none;
    }

    .menu > li {
        display: flex;
        justify-content: center;
        margin: 0;
        padding: 0.5em 0;
        width: 100%;
    }

    .menu > li:not(:last-child) {
        border-bottom: 1px solid #444;
    }
}
