@charset "UTF-8";
/* CSS Document */

.nav-a {
    cursor: pointer;
}

/* Mega Menu共用外觀(跟斷點無關)：第一層底下若有任一第二層本身帶第三層，整組自動改用多欄版面 */
.mega-col-title {
    display: block;
    font-weight: bold;
}
.mega-col-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

@media screen and (min-width:1025px) { /*桌面*/

    /*=========================選單=========================*/
    .nav {
	background-color: hsla(0,0%,0%,1.00);
	color: hsla(0, 0%, 100%, 1.00);
	height: 50px;
	display: block;
	position: fixed;
	top: 80px;
	width: 100%;
	z-index: 2;
    }
    #toggle {
        width: 50px;
        height: 40px;
        position: fixed;
        top: 22px;
        right: 10px;
        border: 0px solid hsla(0, 0%, 95%, 1.00);
        z-index: 1000;
        padding-left: 5px;
        padding-right: 5px;
        border-radius: 3px;
        margin: 0;
        display: none;
        cursor: pointer;
        background-color: hsla(0, 0%, 0%, 0.50);
    }
    .line {
        height: 1px;
        margin-top: 9px;
        margin-bottom: 9px;
        background-color: hsla(0, 0%, 100%, 1.00);
        border-radius: 10px;
        -webkit-box-shadow: 0px 0px;
        box-shadow: 0px 0px;
        display: block;
    }
    #cloesBt {
        width: 50px;
        height: 40px;
        position: fixed;
        top: 22px;
        right: 7px;
        border: 0px solid hsla(0, 0%, 95%, 1.00);
        z-index: 1001;
        padding-left: 5px;
        padding-right: 5px;
        border-radius: 3px;
        margin: 0;
        display: none;
        cursor: pointer;
        background-color: hsla(0, 0%, 0%, 0.50);
    }
    .cles_line {
        height: 35px;
        width: 1px;
        background-color: hsla(0, 0%, 100%, 1.00);
        position: absolute;
        left: 18px;
        top: 2px;
        border-radius: 10px;
        display: block;
    }
    /* 主選單樣式 */
    .menu {
        list-style: none;
        padding: 0;
        margin: 0;
        z-index: 100;
		border: 0px solid hsla(359, 67%, 44%, 1.00);
		width:100%;
		display: flex;
		 justify-content: center;
      align-items: center;
    }
    .menu li {
        display: inline-block;
        position: relative;
        border: 0px solid hsla(359, 67%, 44%, 1.00);
    }
    .menu li a {
        display: block;
        padding-top: 13px;
        padding-right: 20px;
        padding-left: 20px;
        padding-bottom: 13px;
        color: #B5B5B5;
        text-decoration: none;
        transition: color 0.8s; /* 添加文本颜色过渡效果 */
    }
    
    .menu li a img{
    margin-right: 5px;
    width:23px;
    height:auto;
    }
    
    .menu li a svg{
     margin-right: 5px;
    width:23px;
    height:auto;
    }
    
    .menu li a:hover {
        color: #fff; /* 鼠标悬停时改变文字颜色 */
    }
    /* 隱藏子選單 */
    .menu .submenu {
        /*display: none;*/
        visibility: hidden;
        position: absolute;
        top: 100%;
        left: 0;
        width: 250px;
        background-color: hsla(0, 0%, 0%, 0.85);
        opacity: 0; /* 初始设为透明 */
        padding: 0;
        transition: opacity 0.8s; /* 添加透明度过渡效果 */
    }
    .menu .submenu li {
        width: 100%;
        text-align: center;
        border: 0px solid hsla(359, 67%, 44%, 1.00);
        position: relative;
    }
    /* 當滑鼠移至父選單時，顯示子選單 */
    .menu li.submenu-open > .submenu,
    #Hnav li.submenu-open > .submenu {
        visibility: visible;
        opacity: 1; /* 鼠标悬停时透明度变为1 */
    }
    /* 讓三層子選單向右偏移 */
    .submenu .submenu {
        left: 100%;
        top: 0;
    }
    .menu li .icon-arrow_down {
        position: absolute;
        top: 13px;
		font-size:18pt;
    }
	
	.menu li .icon-arrow_right{
		position: absolute;
        top: 14px;
		font-size:18pt;
	}

	/* Mega Menu：每欄=一個第二層，欄位標題+底下列出第三層，橫向多欄併排；
	   欄位數量多時(例如10個第二層)超過容器寬度會自動換到下一行，不會硬擠成一排 */
	.menu .submenu.mega-menu,
	#Hnav .submenu.mega-menu {
		/* 相對瀏覽器視窗置中(position:fixed)，不論由哪個選單項目觸發都會固定顯示在頁面正中央；
		   top對齊.nav的位置(top:80px + height:50px)。純CSS，之後要調整寬度/位置都可以直接改這裡 */
		position: fixed;
		top: 50px; /*對齊header(.nav)下邊緣，top:80px+height:50px*/
		width: 1200px;
		max-width: 90vw;
		max-height: calc(100vh - 160px); /*欄位內容太多(例如30個第二層)不會無限往下延伸撐爆畫面，超過就內部捲動*/
		overflow-y: auto;
		left: 50%;
		transform: translateX(-50%);
		display: grid;
		grid-template-columns: repeat(5, 1fr); /*固定一排5欄；改用grid而不是flex，欄位數不足5個時會靠左對齊，不會被硬置中*/
		gap: 30px;
		padding: 20px 30px;
		background-color: hsla(0, 0%, 0%, 0.95); /*固定在畫面上的大面板，加深不透明度避免看起來像疊在頁面內容上的半透明浮層*/
		box-shadow: 0 10px 30px hsla(0,0%,0%,0.3);
	}
	.menu .submenu.mega-menu .mega-col,
	#Hnav .submenu.mega-menu .mega-col {
		width: auto;
		min-width: 0;
		text-align: left;
	}
	.menu .submenu.mega-menu .mega-col-title,
	#Hnav .submenu.mega-menu .mega-col-title {
		color: #fff;
		border-bottom: 1px solid hsla(0,0%,100%,0.3);
		padding-bottom: 8px;
		margin-bottom: 8px;
	}
	.menu .submenu.mega-menu .mega-col-list li,
	#Hnav .submenu.mega-menu .mega-col-list li {
		width: 100%;
		text-align: left;
	}

	#Hnav{
		display: none;
	}
    /*=========================選單=========================*/
}
@media screen and (max-width:1024px) { /*行動裝置*/
    /*=========================選單=========================*/
    .nav {
	position: fixed;
	z-index: 1000;
	width: 100%;
	}
    #toggle {
        width: 50px;
        height: 40px;
        position: fixed;
        top: 50px;
        right: 10px;
        border: 0px solid hsla(0, 0%, 95%, 1.00);
        padding-left: 5px;
        padding-right: 5px;
        border-radius: 3px;
        margin: 0;
        display: block;
        cursor: pointer;
        background-color: hsla(0, 0%, 0%, 0.50);
    }
    .line {
        height: 1px;
        margin-top: 9px;
        margin-bottom: 9px;
        background-color: hsla(0, 0%, 100%, 1.00);
        border-radius: 10px;
        -webkit-box-shadow: 0px 0px;
        box-shadow: 0px 0px;
        display: block;
    }
    #cloesBt {
        width: 50px;
        height: 40px;
        position: fixed;
        top: 22px;
        right: 10px;
        border: 0px solid hsla(0, 0%, 95%, 1.00);
        z-index: 1001;
        padding-left: 5px;
        padding-right: 5px;
        border-radius: 3px;
        margin: 0;
        display: none;
        cursor: pointer;
        background-color: hsla(0, 0%, 0%, 0.50);
    }
    .cles_line {
        height: 35px;
        width: 1px;
        background-color: hsla(0, 0%, 100%, 1.00);
        position: absolute;
        left: 24px;
        top: 2px;
        border-radius: 10px;
        display: block;
    }
    /* 主選單樣式 */
    .menu {
        list-style: none;
        padding-top: 50px;
        padding-right: 0;
        padding-left: 0;
        margin: 0;
        z-index: 100;
        background-color: hsla(0, 0%, 0%, 0.70);
        position: fixed;
        top: 0px;
        height: 100vh;
        width: 100%;
        -webkit-backdrop-filter: blur(10px);
        backdrop-filter: blur(10px);
        display: none;
        overflow-y: auto;
    }
    .menu li {
        display: block;
        position: relative;
        text-align: center;
        border: 0px solid hsla(0, 0%, 100%, 1.00);
    }
    .menu li a {
        display: block;
        padding: 15px;
        color: #B5B5B5;
        text-decoration: none;
        transition: color 0.3s; /* 添加文本颜色过渡效果 */
        font-size: 18px;
    }
    .menu li a:hover {
        color: hsla(0, 0%, 100%, 1.00); /* 鼠标悬停时改变文字颜色 */
    }
    
    .menu li a img{
    margin-right: 5px;
    width:23px;
    height:auto;
    }
    
    .menu li a svg{
     margin-right: 5px;
    width:23px;
    height:auto;
    }
    
    /* 隱藏子選單 */
    .menu .submenu {
        visibility: hidden;
        position: absolute;
        width: 100%;
        /*background-color: hsla(0,0%,22%,0.70);*/
        opacity: 0;
        padding: 0;
        transition: opacity 0.5s; /* 添加透明度过渡效果 */
        border-top: 1px solid hsla(0, 0%, 56%, 1.00);
        border-bottom: 1px solid hsla(0, 0%, 56%, 1.00);
    }
    .menu .submenu li {
        width: 100%;
        display: block;
        text-align: center;
    }
    .menu .submenu .submenu {
        border: 0px;
        background-color: hsla(0, 0%, 0%, 0.30);
    }
    .menu .submenu li a {
        font-size: 15px;
    }
    /* 當滑鼠移至父選單時，顯示子選單 */
    .menu li.submenu-open > .submenu,
    #Hnav li.submenu-open > .submenu {
        opacity: 1; /* 鼠标悬停时透明度变为1 */
        visibility: visible;
        position: relative;
    }
	
	 .menu li .icon-arrow_down {
        position: absolute;
        top: 17px;
		font-size:18pt;
    }
	
	.menu li .icon-arrow_right{
		position: absolute;
        top: 14px;
		font-size:18pt;
		transform: rotate(90deg);
	}

	/* Mega Menu：手機版空間不夠併排多欄，維持跟一般子選單一樣直向堆疊，只加標題底線做群組區隔 */
	.menu .submenu.mega-menu .mega-col-title,
	#Hnav .submenu.mega-menu .mega-col-title {
		border-top: 1px solid hsla(0, 0%, 56%, 1.00);
		padding-top: 10px;
		margin-top: 10px;
	}

	#Hnav{
		display: block;
	}
    /*=========================選單=========================*/
}