﻿
.horiAndVertMainMenuCssVariables {
    /* Font Size */
    --node-font-size: 16px;
    --node-font-size-smaller: 14px;
    --description-font-size: var(--r-smaller-font, 0.8em);
    --parent-node-font-size-level1: 1.1em;
    --container-node-font-size-level1: 1.5em;
    /* Font Weight */
    --node-font-weight: 800;
    --node-font-weight-light: 600;
    --container-node-font-weight-level1: bold;
    --parent-node-font-weight-level1: bold;
    /* Font Color */
    --desktop-node-font-color-level0: var(--color08);
    --node-font-color-level1: var(--color08);
    --disable-link-font-color: #cccccc;
    --mobile-node-font-color: #000000;
    --description-font-color: #808090;
    --desktop-current-node-font-color-level0: #FFFFFF;
    --desktop-node-font-color-hover-level0: #000000;
    --mobile-current-node-font-color-level0: #FFFFFF;
    --current-node-icon-color-level1: red;
    /* Line Height */
    --node-line-height: 1.3;
    --node-line-height-level1: 1.5;
    --container-node-line-height-level1: 1.5;
    /* Background */
    --mobile-hamburger-bg: rgba(255,255,255,0.8);
    --block-bg-level0: rgba(255,255,255,0.97);
    --mobile-arrow-bg: rgba(0, 0, 0, 0.08);
    --desktop-block-bg-level0: transparent;
    --desktop-block-bg-color-level1: rgba(255,255,255,0.97);
    --desktop-node-bg-hover-level0: linear-gradient(to bottom, var(--color04), #FFFFFF);
    --mobile-current-node-bg-level0: var(--color08);
    --desktop-current-node-bg-level0: var(--color08);
    /* Padding */
    --mobile-node-padding: calc(var(--node-font-size) * 0.8125) calc(var(--node-font-size) * 1.25);
    --desktop-block-padding-level1: 0 0 1em 0;
    --desktop-node-padding-level0: calc(var(--node-font-size) * 0.7) calc(var(--node-font-size) * 1.3) calc(var(--node-font-size) * 1) calc(var(--node-font-size) * 1.3);
    --mobile-column-padding: 0 1em 0 1.5em;
    --desktop-column-padding: 1em 2em 2em 2em;
    --node-padding-level1: 0.2em 0 0.2em 0.5em;
    /* Margin */
    --image-margin: 0 0;
    --description-margin-left: 2em;
    --level3orlower-node-container-margin: 0.5em;
    --parent-node-margin-top-level1: 1em;
    /* Width */
    --mobile-block-width: 100%;
    --desktop-block-width-level1: 1200px;
    --mobile-image-max-width: 50%;
    --desktop-image-max-width: 50%;
    /* Border */
    --block-border-level0: 0 none;
    --mobile-node-border-top-level1: 1px solid rgba(0, 0, 0, 0.05);
    --desktop-node-border-left-level0: 1px solid #EEEEEE;
    --image-border: none 0px;
    /* Height */
    --mobile-block-max-height: 80vh;
    /* Others */
    --link-text-decoration: none;
    --block-shadow-level0: none;
    --menu-radius: 5px;
    --mobile-hamburger-button-size: 29px;
    --mobile-hamburger-line-color: var(--color08);
    --mobile-hamburger-shadow: black 1px 1px;
    --node-list-style-type-level1: disc;
    --node-list-style-type-hover-level1: circle;
    --mobile-plus-sign: '\f078';
    --mobile-minus-sign: '\f077';
    --current-node-icon-level0: "\f185";
    --current-node-icon-level1: "\f185";
    --image-border-radius: 10px;
    --desktop-arrow-color-level0: var(--color08);
}

/* 整個主導覽列外圍 */
.mp主導覽列10 .fspsMainNav {
    position: fixed;
    top: 5rem;
    right: 0;
    z-index: 4;
    max-height: var(--mobile-block-max-height);
    overflow-y: scroll;
    width : 100%;
}

.mp主導覽列10:after {
    clear: both;
    content: "\00a0";
    display: block;
    height: 0;
    font: 0px/0 serif;
    overflow: hidden;
}

#main-menu {
    clear: both;
    /* Custom Setting */
    box-shadow: var(--block-shadow-level0);
    border: var(--block-border-level0);
    background-color: var(--block-bg-level0);
}

/* Desktop Mode */
@media (min-width: 768px) {
    #main-menu {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: flex-start;
        align-items: stretch;
        background-color: var(--desktop-block-bg-level0);
    }

    .mp主導覽列10 .fspsMainNav {
        width: 100%; /* put the menu to the center */
        margin: 0 auto;
        /*margin: 0 auto 0 -3px; align to the left and shew */
        position: static !important;
        max-height: initial;
        overflow-y: unset;
    }
}

/* Mobile menu toggle button */
.mp主導覽列10 .main-menu-btn {
    float: right;
    clear: both;
    margin: 5px 10px;
    position: relative;
    display: inline-block;
    width: var(--mobile-hamburger-button-size);
    height: var(--mobile-hamburger-button-size);
    text-indent: var(--mobile-hamburger-button-size);
    white-space: nowrap;
    overflow: hidden;
    cursor: pointer;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
    /* lines & gray bg */
    box-shadow: var(--mobile-hamburger-shadow);
    background-color: var(--mobile-hamburger-bg);
}

/* hamburger icon */
.mp主導覽列10 .main-menu-btn-icon,
.mp主導覽列10 .main-menu-btn-icon:before,
.mp主導覽列10 .main-menu-btn-icon:after {
    position: absolute;
    top: 50%;
    left: calc(var(--mobile-hamburger-button-size) * 0.067);
    height: calc(var(--mobile-hamburger-button-size) * 0.069);
    width: calc(var(--mobile-hamburger-button-size) * 0.828);
    background: var(--mobile-hamburger-line-color);
    transition: all 0.25s;
}

    .mp主導覽列10 .main-menu-btn-icon:before {
        content: '';
        top: calc(-0.3 * var(--mobile-hamburger-button-size));
        left: 0;
    }

    .mp主導覽列10 .main-menu-btn-icon:after {
        content: '';
        top: calc(var(--mobile-hamburger-button-size) * 0.3);
        left: 0;
    }

/* x icon */
#main-menu-state:checked ~ .main-menu-btn .main-menu-btn-icon {
    height: 0;
    background: transparent;
}

    #main-menu-state:checked ~ .main-menu-btn .main-menu-btn-icon:before {
        top: 0;
        transform: rotate(-45deg);
    }

    #main-menu-state:checked ~ .main-menu-btn .main-menu-btn-icon:after {
        top: 0;
        transform: rotate(45deg);
    }

/* hide menu state checkbox (keep it visible to screen readers) */
#main-menu-state {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    border: 0;
    padding: 0;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
}

    /* hide the menu in mobile view */
    #main-menu-state:not(:checked) ~ #main-menu {
        display: none;
        width: var(--mobile-block-width);
    }

    #main-menu-state:checked ~ #main-menu {
        display: block;
        width: var(--mobile-block-width);
        overflow: hidden; /*New*/
    }

/* Desktop Mode */
@media (min-width: 768px) {
    #main-menu > li {
        display: block;
    }

    /* hide the button in desktop view */
    .mp主導覽列10 .main-menu-btn {
        position: absolute;
        top: -99999px;
    }

    /* always show the menu in desktop view */
    #main-menu-state:not(:checked) ~ #main-menu, #main-menu-state:checked ~ #main-menu {
        display: flex;
        justify-content: flex-end;
        width: 100%;
    }
}

.mp主導覽列10 .sm-mega {
    border-radius: var(--menu-radius);
}

    .mp主導覽列10 .sm-mega a, .mp主導覽列10 .sm-mega a:hover, .mp主導覽列10 .sm-mega a:focus, .mp主導覽列10 .sm-mega a:active {
        padding: var(--mobile-node-padding);
        color: var(--mobile-node-font-color);
        font-size: var(--node-font-size);
        font-weight: var(--node-font-weight);
        line-height: var(--node-line-height);
        text-decoration: var(--link-text-decoration);
    }

        .mp主導覽列10 .sm-mega a.currentTopNode {
            background: var(--mobile-current-node-bg-level0);
            color: var(--mobile-current-node-font-color-level0);
        }

            .mp主導覽列10 .sm-mega a.currentTopNode::after {
                content: var(--current-node-icon-level0);
                font-family: "Font Awesome 6 Free";
                font-weight: 900;
                display: inline;
                margin-left: 5px;
                color: inherit;
            }

        .mp主導覽列10 .sm-mega a.disabled {
            color: var(--disable-link-font-color);
        }

        .mp主導覽列10 .sm-mega a .sub-arrow {
            position: absolute;
            top: 50%;
            margin-top: calc(var(--node-font-size) * -1.0625);
            left: auto;
            right: calc(var(--node-font-size) * 0.25);
            width: calc(var(--node-font-size) * 2.125);
            height: calc(var(--node-font-size) * 2.125);
            overflow: hidden;
            font: bold calc(var(--node-font-size) * 0.875)/calc(var(--node-font-size) * 2.125) monospace !important;
            text-align: center;
            text-shadow: none;
            background: var(--mobile-arrow-bg);
        }

            .mp主導覽列10 .sm-mega a .sub-arrow::before {
                content: var(--mobile-plus-sign);
                font-family: "Font Awesome 6 Free";
                font-weight: 900;
            }

        .mp主導覽列10 .sm-mega a.highlighted .sub-arrow::before {
            content: var(--mobile-minus-sign);
            font-family: "Font Awesome 6 Free";
            font-weight: 900;
        }

    .mp主導覽列10 .sm-mega li {
        border-top: var(--mobile-node-border-top-level1);
    }

    .mp主導覽列10 .sm-mega .bigRect > li:first-child {
        border-top: 0;
    }

@media (min-width: 768px) {
    /* Switch to desktop layout
              -----------------------------------------------
                 These transform the menu tree from
                 collapsible to desktop (navbar + dropdowns)
              -----------------------------------------------*/
    /* start... (it's not recommended editing these rules) */

    .mp主導覽列10 .sm-mega ul {
        position: absolute;
        width: 12em;
    }

        .mp主導覽列10 .sm-mega ul li {
            float: none;
        }

    .mp主導覽列10 .sm-mega a {
        white-space: nowrap;
    }

    .mp主導覽列10 .sm-mega ul a {
        white-space: normal;
    }

    /* ...end */

    .mp主導覽列10 .sm-mega a {
        padding: var(--desktop-node-padding-level0);
        color: var(--desktop-node-font-color-level0);
    }

    .mp主導覽列10 .sm-mega > .level1 > a:hover,
    .mp主導覽列10 .sm-mega > .level1 > a:focus,
    .mp主導覽列10 .sm-mega > .level1 > a:active,
    .mp主導覽列10 .sm-mega > .level1 > a.highlighted {
        background: var(--desktop-node-bg-hover-level0);
        color: var(--desktop-node-font-color-hover-level0);
        border-radius: 10px 10px 0 0;
    }

    .mp主導覽列10 .sm-mega a.currentTopNode {
        background: var(--desktop-current-node-bg-level0);
        color: var(--desktop-current-node-font-color-level0);
        border-radius: 10px 10px 0 0;
    }

    .mp主導覽列10 .sm-mega a.disabled {
        background: #fff;
        color: var(--disable-link-font-color);
    }

    .mp主導覽列10 .sm-mega a.has-submenu {
    }

    .mp主導覽列10 .sm-mega a .sub-arrow {
        top: auto;
        margin-top: 0;
        bottom: 2px;
        left: 50%;
        margin-left: -5px;
        right: auto;
        width: 0;
        height: 0;
        border-width: 5px;
        border-style: solid dashed dashed dashed;
        border-color: var(--desktop-arrow-color-level0) transparent transparent transparent; /* 顏色(11) */
        background: transparent;
        border-radius: 0;
    }

    .mp主導覽列10 .sm-mega a.highlighted .sub-arrow::before {
        content: '\f078';
        font-family: "Font Awesome 6 Free";
        font-weight: 900;
    }

    /* level 1 (static) node */
    .mp主導覽列10 .sm-mega > li {
        border-top: 0;
        border-left: var(--desktop-node-border-left-level0);
    }

        /* level 1 (static) first node, Home node */
        .mp主導覽列10 .sm-mega > li:first-child {
            border-left: 0;
        }

    /* level 1 (static) node 傾斜 
            .sm-mega > li > a {
                transform: skewX(-10deg);
                background-color: #c482b3; 
            }
            */

    .mp主導覽列10 .sm-mega ul {
        background-color: var(--desktop-block-bg-color-level1);
        border: none 0;
        border-radius: var(--menu-radius);
        /*box-shadow: var(--desktop-block-shadow-level1);*/
    }

        .mp主導覽列10 .sm-mega ul a {
            border: 0 !important;
            line-height: var(--line-height);
        }

            .mp主導覽列10 .sm-mega ul a.has-submenu {
                padding-right: calc(var(--node-font-size) * 1.25);
            }

        .mp主導覽列10 .sm-mega ul > li {
            border-left: 0;
        }

            .mp主導覽列10 .sm-mega ul > li:first-child {
                border-top: 0;
            }

    .mp主導覽列10 .sm-mega .scroll-up,
    .mp主導覽列10 .sm-mega .scroll-down {
        position: absolute;
        display: none;
        visibility: hidden;
        overflow: hidden;
        background: #fff;
        height: 20px;
    }

    .mp主導覽列10 .sm-mega .scroll-up-arrow,
    .mp主導覽列10 .sm-mega .scroll-down-arrow {
        position: absolute;
        top: -2px;
        left: 50%;
        margin-left: -8px;
        width: 0;
        height: 0;
        overflow: hidden;
        border-width: 8px;
        border-style: dashed dashed solid dashed;
        border-color: transparent transparent #555555 transparent;
    }

    .mp主導覽列10 .sm-mega .scroll-down-arrow {
        top: 6px;
        border-style: solid dashed dashed dashed;
        border-color: #555555 transparent transparent transparent;
    }
}

/* ============= Start Mega Menu ====================================================== */

#main-menu,
#main-menu > .has-mega-menu {
    position: static !important; /* Default Value is static */
}

    /* Level 1 */
    #main-menu > .has-mega-menu .scroll-up,
    #main-menu > .has-mega-menu .scroll-down {
        margin-left: 0 !important;
    }

    /* Level 2, ul.mega-menu */
    #main-menu .mega-menu {
        margin-left: -1px !important;
        margin-right: -1px !important;
        right: 0 !important;
        width: auto !important;
        max-width: none !important;
        color: var(--node-font-color-level1);
    }

        /* clear any floats inside the mega menus */
        #main-menu .mega-menu > li {
            overflow: auto;
        }

        #main-menu .mega-menu .bigRect {
            position: static;
            display: block;
            margin: 0.4em 0;
            border: 0;
            padding: var(--mobile-column-padding);
            width: auto;
            background: transparent;
            box-shadow: none;
        }

            #main-menu .mega-menu .bigRect li {
                padding-right: 1em;
                transition-property: all;
                transition-delay: 0.1s;
                transition-duration: 0.5s;
            }

                #main-menu .mega-menu .bigRect li:hover {
                    background-color: rgba(245,245,245,1);
                }

                #main-menu .mega-menu .bigRect li.level2 {
                    padding-left: 0;
                }

                    #main-menu .mega-menu .bigRect li.level2:hover {
                        padding-left: 1.5em;
                    }

                #main-menu .mega-menu .bigRect li.level3 {
                    padding-left: 1em;
                }

                    #main-menu .mega-menu .bigRect li.level3:hover {
                        padding-left: 2em;
                    }

                    #main-menu .mega-menu .bigRect li.level3 a {
                        font-weight: var(--node-font-weight-light);
                        font-size: var(--node-font-size-smaller);
                    }

                #main-menu .mega-menu .bigRect li.level4 {
                    padding-left: 2em;
                }

                    #main-menu .mega-menu .bigRect li.level4:hover {
                        padding-left: 3em;
                    }

                    #main-menu .mega-menu .bigRect li.level4 a {
                        font-weight: var(--node-font-weight-light);
                        font-size: var(--node-font-size-smaller);
                    }

                #main-menu .mega-menu .bigRect li.level5 {
                    padding-left: 3em;
                }

                    #main-menu .mega-menu .bigRect li.level5:hover {
                        padding-left: 4em;
                    }

                    #main-menu .mega-menu .bigRect li.level5 a {
                        font-weight: var(--node-font-weight-light);
                        font-size: var(--node-font-size-smaller);
                    }

                #main-menu .mega-menu .bigRect li a {
                    line-height: 2em;
                }

        #main-menu .mega-menu a {
            display: inline;
            border: 0;
            padding: 0;
            color: inherit;
            text-decoration: var(--link-text-decoration);
        }

            /* Current node in mega menu */
            #main-menu .mega-menu a.currentNode::after {
                content: var(--current-node-icon-level1);
                font-family: "Font Awesome 6 Free";
                font-weight: 900;
                display: inline;
                margin-left: 5px;
                color: var(--current-node-icon-color-level1);
            }

        #main-menu .mega-menu .hasChildren {
            margin-top: var(--parent-node-margin-top-level1);
        }

            #main-menu .mega-menu .hasChildren > a {
                font-weight: var(--parent-node-font-weight-level1);
                font-size: var(--parent-node-font-size-level1);
            }

        #main-menu .mega-menu .noLink {
            font-weight: var(--container-node-font-weight-level1);
            font-size: var(--container-node-font-size-level1);
            line-height: var(--container-node-line-height-level1);
        }

        #main-menu .mega-menu .hasChildren ul { /* level 3 or lower node container */
            margin: var(--level3orlower-node-container-margin);
        }

        #main-menu .mega-menu .description {
            font-size: var(--description-font-size);
            padding: 0.5em 0;
            margin-left: var(--description-margin-left);
            display: block;
            color: var(--description-font-color);
        }

@media (max-width: 480px) {
    .notShowInMobileMode { /* Hide node in mobile mode */
        display: none !important;
    }
}

#main-menu .mega-menu .mega-menu-sample-image {
    margin: var(--image-margin);
    max-width: var(--mobile-image-max-width);
    height: auto;
    border-radius: var(--image-border-radius);
    border: var(--image-border);
    display: block;
}

/* Desktop Mode */
@media (min-width: 768px) {
    #main-menu .mega-menu {
        background-color: transparent;
    }

        #main-menu .mega-menu > li { /* Container of div.semiCircle*/
            padding: var(--desktop-block-padding-level1);
            width: var(--desktop-block-width-level1);
            max-width: 100%;
            margin: 0 0 0 auto;
        }

        #main-menu .mega-menu .semiCircle {
            padding: var(--desktop-column-padding);
            width: 100%;
            border-radius: 5% 5% 0 5%;
            min-height: 20vh;
            background: linear-gradient(135deg, rgba(255,255,255,1) 0%,rgba(240,240,240,1) 70%,rgba(225,225,225,1) 71%,rgba(246,246,246,1) 95%, var(--color01) 95%, var(--color01) 100%);
            box-shadow: rgb(0 0 0 / 10%) 0px 4px 12px;
        }

        #main-menu .mega-menu .bigRect {
            display: flex;
            flex-direction: column;
            flex-wrap: wrap;
            max-height: 30vh;
            padding: 0;
            align-items: flex-start;
        }

            #main-menu .mega-menu .bigRect li {
                width: 30%;
            }

        #main-menu .mega-menu .mega-menu-sample-image {
            max-width: var(--desktop-image-max-width);
            margin: 10px 0;
        }
}

/* 彈出 menu 的動畫 */
@media (min-width:768px) {
    #main-menu {
        -webkit-font-smoothing: subpixel-antialiased;
    }

        /* show animation */
        #main-menu ul.show-animation {
            animation: show-animation 0.7s;
        }

    @keyframes show-animation {
        0% {
            opacity: 0;
        }

        100% {
            opacity: 1;
        }
    }

    /* hide animation */
    #main-menu ul.hide-animation {
        animation: hide-animation 0.7s;
    }

    @keyframes hide-animation {
        0% {
            opacity: 1;
        }

        100% {
            opacity: 0;
        }
    }
}

/*Color Variable Start*/
.mainMenuColors
{
--color01 : rgb(48,146,192); /*C*/
--color02 : rgb(49,152,199); /*C*/
--color03 : rgb(46,140,184); /*C*/
--color04 : rgb(161,209,232); /*C*/
--color05 : rgb(45,137,180); /*C*/
--color06 : rgb(41,124,162); /*C*/
--color07 : rgb(0,104,146); /*C*/
--color08 : rgb(0,97,135); /*C*/
--color09 : rgb(0,111,156); /*C*/
--color10 : rgb(68,178,229); /*C*/
--color11 : rgb(108,182,216); /*C*/
--color12 : rgb(61,158,204); /*C*/
--color13 : rgb(174,213,232); /*C*/
--color14 : rgb(46,180,242); /*C*/
--color15 : rgb(54,188,249); /*C*/
}
/*Color Variable End*/




