@import url(font-awesome/css/font-awesome.min.css);

/* CSS Document */

* {
    margin: 0px;
    padding: 0px;
    text-decoration: none;
}

input,
a:active,
a:focus,
button,
button:active,
button:focus {
    outline: none;
    border: 0;
}

img {
    border: 0;
    max-width: 100%;
    height: auto;
}

body {
    font-family: Arial, "微軟正黑體", Helvetica, sans-serif;
    font-size: 16px;
    color: #333;
}

a ,input{
    color: #666;
    -webkit-appearance:none;
}

a:hover {
    text-decoration: none;
}

header {
    position: absolute;
    background: rgba(0, 73, 57, 0.8);
    z-index: 10;
    width: 600px;
    top: 45px;
}

.logo a {
    margin: 0 10px;
}

.menubtn {
    display: none;
}

nav ul.nav {
    margin-bottom: 0;
    margin-right: 20px;
}

nav li {
    -webkit-writing-mode: vertical-rl;
    writing-mode: vertical-rl;
    padding: 0 8px;
    -ms-writing-mode: tb-lr;
    -moz-writing-mode: vertical-rl;
    -ms-writing-mode: vertical-rl;
    writing-mode: vertical-rl;
}

nav li:first-child {
    display: none;
}

nav a {
    color: #fff;
    position: relative;
    display:block;
}

nav a:hover,
nav a:active,
nav a.active {
    color: #ffdb4b;
}

nav a.active:before,
nav a:hover:before {
    content: " ";
    width: 20px;
    height: 1px;
    background: #ffdb4b;
    position: absolute;
    top: -15px;
    transform: rotate(-45deg);
    left: 0;
}

header.top-bar{
    position: fixed;

}

@media only screen and (min-width: 999px) {
    header{     
        padding: 25px 0;
    }
    header > *{ 
        display:inline-block; 
        vertical-align: middle;
    }

    .logo{ 
        width:40%;
    }
    
    nav {
        width: calc(100% - 40% - 10% - 5px);
        padding-left:10%;
    }


    nav ul.nav {
        display:inline-block;
        width:100%;
    }

    nav li {
        -webkit-writing-mode: vertical-rl;
        writing-mode: vertical-rl;
        padding: 0 8px;
        display:inline-block;
        vertical-align:top;
    }

}

@media only screen and (max-width: 999px) {
    header {
        width: 100%;
        top: 0;
        display:flex;
        align-items:center;
        justify-content:space-around;
        height: 125px;
    }
    nav{ 
        height: 100% !important;
        display:flex;
        align-items:center;
     }

}

@media only screen and (max-width: 768px) {
    .nav {
        display: none;
        width: 100vw;
        height: 100vh;
        position: absolute;
        left: 0;
        top: 125px;
        background: #004939;
        padding: 30px;
    }
    nav li {
        -webkit-writing-mode: initial;
        writing-mode: initial;
        padding: 10px 0;
        border-bottom: solid 0.5px #dadada;
        margin-bottom: 10px;
    }
    nav li:first-child {
        display: block;
    }
    nav li a {
        display: block;
    }
    .menubtn {
        display: block;
        position: relative;
        cursor: pointer;
        right: 25px;
        top: -7px;
    }

    .menubox::after {
        content: " ";
        width: 30px;
        height: 2px;
        background: #ffdb4b;
        position: absolute;
        transition: all 0.5s;
        top:9px;
    }

    .menubox span{
        width: 30px;
        height: 20px;
        position: absolute;
    }

    .menubox span::before,
    .menubox span::after {
        width: 30px;
        height: 2px;
        background: #ffdb4b;
        position: absolute;
        transition: all 0.5s;
    }
    .menubox span::before,
    .menubox span::after {
        content: " ";
    }
    .menubox span::before {
        top: 0px;
    }
    .menubox span::after {
        bottom: 0px;
    }
    .menubtn.active .menubox::after {
        opacity: 0;
    }
    .menubtn.active .menubox span::before {
        transform: rotate(45deg);
        top: 18px;
    }
    .menubtn.active .menubox span::after {
        bottom: 0;
        transform: rotate(-45deg);
    }
    nav a.active:before, nav a:hover:before {
        top: 10px;
        right: 0;
        left: auto;
    }
}

@media only screen and (max-width:480px) {}
