﻿
.menu-arrow-dwn:after {
    content: '↓';
}

/*彈出選單====================================*/
#menu-mask {
    display: none;
    background-color: rgba(0,0,0,.3);
    width: 100%;
    height: 100%;
    position: fixed;
    z-index: 200;
    top: 10px;
    left: 0;
}

#sm-cont {
    min-width: 60%;
    white-space: nowrap;
    height: 100vh;
    margin: 0;
    padding: 0;
    padding-bottom: 80px;
    position: fixed;
    top: 10px;
    left: 0;
    z-index: 201;
    background-color: #fff; /* rgba(69,150,188,.9);*/
    border: solid 1px rgba(0,0,0,.1);
    display: none;
    overflow: auto;
    
}

    #sm-cont .tcollapse > ul {
        display: none;
        /*background-color: rgba(0,0,0,.1);*/
    }

    #sm-cont .tcollapse > a {
        border-bottom: solid 1px rgba(0,0,0,.1);
    }

        /*讓展開下拉選單符號，一律靠右*/
        #sm-cont .tcollapse > a > i:last-child {
            float: right;
        }

    #sm-cont ul {
        list-style: none;
        padding: 0;
        margin: 0;
        position: relative;
        width: 100%;
    }

    #sm-cont .submenu > ul {
        /*border: solid 1px var(--base-color);
        background-color:rgba(0,0,0,.1);*/
        border-top: none;
    }

    #sm-cont li:last-child > ul {
        padding-bottom: 120px;
    }

    #sm-cont ul li {
        list-style-type: none;
        margin: 0;
        padding: 0 10px;
        border-bottom: solid 1px var(--base-color);
        white-space: nowrap;
    }

        #sm-cont ul li:first-child {
            border-top: solid 1px var(--base-color);
        }

        #sm-cont ul li:last-child {
            border-bottom: none;
        }

    #sm-cont li > ul {
        position: relative;
        /*background-color: rgba(255,255,255,.9);*/
    }
    /*無障礙*/
    #sm-cont li > a, #sm-cont li > div {
        cursor: pointer;
        color: #666;
        text-decoration: none;
        display: block;
        padding: 8px;
    }
        /*#sm-cont ul > li > a {
        padding: 8px 0px;
    }*/
        /*------------*/



        #sm-cont li > a:active {
            background-color: rgba(0,0,0,.2);
        }

    #sm-cont .close {
        position: absolute;
        right: 5px;
        top: 5px;
    }

    #sm-cont #sm-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        position: relative;
        padding: 6px 5px 6px 20px;
        position: relative;
        /*border-bottom: solid 1px #dbd9d9;*/
        box-shadow: 0px 0px 8px #AAA;
    }

        #sm-cont #sm-header a {
            color: rgba(0,0,0,.6);
            text-decoration: none;
        }

#toggle_menu {
    display: none;
    margin: 6px 15px;
    font-size: 1.2em;
    cursor: pointer;
    color: rgba(255,255,255,.8);
    /*transform-origin: 50% 50%;
    transform-style:preserve-3d;*/
}

@keyframes menu-bar-rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}
/*下拉選單展開時的style*/
#sm-cont .tcollapse > a.expand-header, #sm-cont .tcollapse > div.expand-header {
    color: #f77607;
    font-weight: bold;
    /*background-color:#777;*/
    border-radius: 6px 6px 0 0;
}

/*上方選單====================================*/
#big-cont {
    display: flex;
    /*justify-content: space-between;*/
    align-items: center;
    flex-wrap: nowrap;
    background-color: var(--base-color);
    /* #bf4d0b; */
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    padding: 0;
    margin: 0;
    z-index: 100;
    color: white;
    border-bottom: solid 1px white;
    font-size:1.1em;
    /* box-shadow: 0 1px 8px rgb(0 0 0 / 50%);*/
}

    #big-cont ul, #big-cont li {
        margin: 0;
        padding: 0;
        list-style: none;
        white-space: nowrap;
    }

    #big-cont li {
        position: relative;
        white-space: nowrap;
        list-style-type: none;
        cursor: pointer;
    }


    #big-cont a:link, #big-cont a:visited {
        color: rgba(0,0,0,.8);
        text-decoration: none;
        padding: 10px;
        display: block;
    }

    #big-cont a.active {
        background-color: var(--base-color);
        color: white !important;
        font-weight: bold;
    }



    #big-cont a:not(.active):hover,
    #big-cont a:not(.active):focus {
        /*background-color: rgba(0,0,0,.03);*/
        background-color: var(--base-color);
        color: white !important;
    }

    /*第1層的link  無障礙*/
    #big-cont .firstmenu > a:active,
    #big-cont .firstmenu > a:visited,
    #big-cont .firstmenu > a:link,
    #big-cont .firstmenu > div {
        color: white !important;
        padding: 10px 7px;
        border-top: solid 1px #fab209 !important;
    }
    /*第1層的li:hover*/
    #big-cont .firstmenu:hover > a,
    #big-cont .firstmenu:hover > div,
    #big-cont .firstmenu:focus-within > a,
    #big-cont .firstmenu:focus-within > div {
        border-top: 3px solid #1eb6f8 !important;
        background-color: rgba(255,255,255,.8);
        color: black !important;
    }

    /*所有子選單的li:hover*/
    #big-cont .submenu:hover > div,
    #big-cont .submenu:focus-within > div {
        background-color: var(--base-color);
        color: white;
    }
    /*--------------------*/


    #big-cont .firstmenu > a.active, #big-cont .firstmenu > div.active {
        border: none;
        border-top: solid 2px red;
        background-color: rgba(255,255,255,1);
        color: black !important;
        font-weight: bold;
    }

    #big-cont .main-menu > li {
        display: inline-block;
        float: left; /*橫向li，沒加float，中間會有空隙*/
    }

    #big-cont #main-header > a {
        padding: 5px;
    }

    #big-cont li {
        position: relative;
    }
        /*所有下層選單ul*/
        #big-cont li > ul {
            position: absolute;
            opacity: 0;
            background-color: #fff;
            border: solid 1px var(--base-color);
            min-width: 180px;
        }


    #big-cont .firstmenu > ul {
        top: -1000px;
    }

    /*第1層子選單*/
    /*按tab鍵，li如果要有focus事件，必須使用li:focus-within，只要底下的<a>有focus */
    #big-cont .firstmenu:hover > ul,
    #big-cont .firstmenu:focus-within > ul {
        opacity: 1;
        top: 100%;
        animation-name: fade-in;
        animation-duration: 0.7s;
    }
    /*第2層子選單*/
    #big-cont .submenu > ul {
        left: -1000px !important;
    }

    #big-cont .submenu:hover > ul,
    #big-cont .submenu:focus-within > ul {
        opacity: 1;
        top: 0;
        left: 100% !important;
        /*pointer-events: auto;*/
        animation-name: fade-in;
        animation-duration: 0.7s;
    }



    /*彈出子選單的padding*/
    #big-cont .main-menu li > ul li > a, #big-cont .submenu > div {
        color: black;
        padding: 8px;
    }


    #big-cont .main-menu ul li:not(last-children) {
        border-bottom: solid 1px var(--base-color);
    }
    /*第3層以下選單ul，向右出現*/
    #big-cont .main-menu li > ul li > ul {
        left: 100%;
        top: 0;
    }



    #big-cont .main-menu ul > li {
        min-width: 140px;
        /*animation-name: slide-down;
        animation-duration: 0.2s;*/
    }


        /*子子選單出現時，向右位移*/
        #big-cont .main-menu ul > li li {
            min-width: 140px;
            animation-name: slide-right;
            animation-duration: 0.3s;
        }


    #big-cont .right-dropdown {
        border-right: none;
        white-space: nowrap;
        float: right;
    }


        #big-cont .right-dropdown > .right-dropdown-item {
            /*display: none;*/
            /*position:absolute;
            opacity:0;
            top:-1000px !important;*/
            right: 10px;
            border: solid 1px #CCC;
            background-color: white;
        }

        #big-cont .right-dropdown > a, .right-dropdown-item div {
            cursor: pointer;
            padding: 10px;
            color: black !important;
        }

.right-dropdown-item div {
    cursor: default;
}

#big-cont .right-dropdown:hover > ul,
#big-cont .right-dropdown:focus-within > ul {
    opacity: 1;
    top: 100%;
}

#big-cont #s-anchor {
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 8px 10px 0 10px;
    border-color: #f50540 transparent transparent transparent;
    position: absolute;
    top: 1px;
    left: -60px;
    z-index: 105;
}


.logofont {
    font-family: Cooper;
    font-size: 1.3em;
    font-weight: bold;
    -webkit-text-stroke: 1px #000;
}

@-webkit-keyframes fade-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Standard syntax */
@keyframes fade-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}
/*============================================*/
