/*
	By Herman Malik, adapted from Spectral by HTML5 UP
	html5up.net | @ajlkn
	Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
*/


/* Basic */

@-ms-viewport {
    width: device-width;
}

html {
    box-sizing: border-box;
}

*, *:before, *:after {
    box-sizing: inherit;
}

/* Page Wrapper + Body */

body {
    padding-top: 3em;

    -moz-transition: color 0.3s ease;
    -webkit-transition: color 0.3s ease;
    -ms-transition: color 0.3s ease;
    transition: color 0.3s ease;
    -moz-transition: background 0.3s ease;
    -webkit-transition: background 0.3s ease;
    -ms-transition: background 0.3s ease;
    transition: background 0.3s ease;
    -moz-transition: background-color 0.3s ease;
    -webkit-transition: background-color 0.3s ease;
    -ms-transition: background-color 0.3s ease;
    transition: background-color 0.3s ease;
}

body #container {
    -moz-transition: opacity 0.5s ease;
    -webkit-transition: opacity 0.5s ease;
    -ms-transition: opacity 0.5s ease;
    transition: opacity 0.5s ease;
}

body.is-menu-visible #container {
    opacity: 0.35;
}

body.is-menu-visible #menu {
    -moz-transform: translateX(0);
    -webkit-transform: translateX(0);
    -ms-transform: translateX(0);
    transform: translateX(0);
    opacity: 1;
}

/* Menu */
#menu {
    -moz-transform: translateX(20em);
    -webkit-transform: translateX(20em);
    -ms-transform: translateX(20em);
    transform: translateX(20em);
    -moz-transition: -moz-transform 0.5s ease;
    -webkit-transition: -webkit-transform 0.5s ease;
    -ms-transition: -ms-transform 0.5s ease;
    transition: transform 0.5s ease;

    -webkit-overflow-scrolling: touch;
    background: var(--theme-color);
    height: 100%;
    max-width: 80%;
    overflow-y: auto;
    padding: 3em 2em;
    position: fixed;
    right: 0;
    top: 0;
    width: 20em;
    z-index: 10002;
    overflow: hidden;
}

    #menu > ul {
        list-style: none;
        padding: 0;
    }

        /* menu item style */
        #menu > ul > li {
            border-top: solid 1px var(--menu-item-color);
            padding: 0.5em 0 0.5em 0;
            position: relative; /* multiple submenu stacking */
            background: var(--theme-color); /* for submenus */
        }

            /* menu and submenu link style */
            #menu > ul > li a {
                border: 0;
                color: var(--menu-item-color);
                display: block;
                font-size: 0.8em;
                letter-spacing: 0.2em;
                outline: 0;
                text-decoration: none;
                text-transform: uppercase;
                line-height: 3em;
            }
            @media screen and (max-width: 736px) {
                #menu ul > li a {
                    line-height: 4em;
                }
            }
            #menu > ul li.has-submenu > a {
                display: flex;
                align-items: center; /* Vertically center submenu toggle */
                justify-content: space-between;
            }

                /* submenu toggle, the right-pointing arrow */
                #menu > ul li.has-submenu > a > i {
                    float: right;
                    margin-right: 0.5em;
                    font-size: 1.5em;
                    transition: transform 0.3s ease;
                    color: var(--menu-item-color);
                }

                /* rotate arrow on click */
                #menu > ul li.has-submenu.active > a > i {
                    transform: rotate(90deg); /* down-pointing arrow */
                }

            /* submenu container */
            #menu > ul li ul.submenu {
                max-height: 0px;
                list-style: none;
                padding-left: 1em;
                transition: all 0.3s ease; /* overall menu transition */
            }

                /* activate submenu container */
                #menu > ul li.has-submenu.active > ul.submenu {
                    max-height: 500px;
                    transition: all 0.3s ease; /* overall menu transition */
                }

                /* submenu item styling */
                #menu > ul li ul.submenu li {
                    border-top: none; /* top border */
                    padding: 0.5em 0 0 0;
                }

                    /* submenu link extra style */
                    #menu > ul li ul.submenu li > a {
                        font-size: 0.75em;
                        line-height: 2.5em;
                        padding-left: 1em;
                    }

            #menu > ul li:first-child {
                border-top: 0 !important;
                margin-top: 0 !important;
                padding-top: 0 !important;
            }

            /* dark mode toggle */
            #menu > ul > li > span {
                display: inline-block;
                width: 100%;
                line-height: 3em;
                text-align: center;
            }
                
                #menu > ul > li > span > i {
                    color: var(--menu-item-color);
                    cursor: pointer;
                    padding: 1em 2em;
                }

    #menu .close {
        background-image: url("images/close.svg"); /* if it stops working use https://html5up.net/uploads/demos/spectral/assets/css/images/close.svg */
        background-position: 4.85em 1em;
        background-repeat: no-repeat;
        border: 0;
        cursor: pointer;
        display: block;
        height: 3em;
        position: absolute;
        right: 0;
        top: 0;
        vertical-align: middle;
        width: 7em;
    }

    @media (max-width: 736px) {

        #menu {
            padding: 3em 1.5em;
        }

    }

/* Header */

#header {
    background: var(--theme-color);
    height: 3em;
    left: 0;
    line-height: 3em;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 10000;
}

    #header h1 {
        left: 1.25em;
        position: absolute;
        margin: 0;
        padding: 0;
        letter-spacing: 4px;
        font-size: medium;
    }

    #header h1 > a {
        color: var(--menu-item-color);
    }
    

    #header nav {
        height: inherit;
        line-height: inherit;
        position: absolute;
        right: 0;
        top: 0;
    }

        #header nav > ul {
            list-style: none;
            margin: 0;
            padding: 0;
            white-space: nowrap;
        }

            #header nav > ul > li {
                display: inline-block;
                padding: 0;
            }

                #header nav > ul > li > a {
                    border: 0;
                    color: var(--menu-item-color);
                    display: block;
                    font-size: 0.8em;
                    letter-spacing: 0.225em;
                    padding: 0 1.5em;
                    text-transform: uppercase;
                }

                    #header nav > ul > li > a.menuToggle {
                        outline: 0;
                        position: relative;
                    }

                        #header nav > ul > li > a.menuToggle:after {
                            background-image: url("images/bars.svg"); /* if it stops working use https://html5up.net/uploads/demos/spectral/assets/css/images/bars.svg */
                            background-position: right center;
                            background-repeat: no-repeat;
                            content: '';
                            display: inline-block;
                            height: 1.75em;
                            vertical-align: top;
                            width: 2em;
                        }

                        @media screen and (max-width: 736px) {

                            #header nav > ul > li > a.menuToggle {
                                padding: 0 1.5em;
                            }

                                #header nav > ul > li > a.menuToggle span {
                                    display: none;
                                }

                        }

                    @media screen and (max-width: 736px) {

                        #header nav > ul > li > a {
                            padding: 0 0 0 1.5em;
                        }

                    }

                #header nav > ul > li:first-child {
                    margin-left: 0;
                }

