/*Navbar style*/

/* 初始狀態 */
nav {
    width: 100%;
    background-color: rgba(255, 255, 255, 0);
    transition: background-color 0.3s;
    top: 0; left: 0;
    display: flex; justify-content: center;
    position: fixed;
    z-index: 50;
}

.nav.scrolled {
    background-color: #f0f0f0;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

@media screen and (max-width:768px){
    .navbar{
        width: 90%;
    }
}

.navbar a {
    font-size: 18px;
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
    padding: 14px;
}



.navbar.scrolled a {
    color: #333333;
}

.menu {
    display: flex;
}

.hamburger {
    display: none;
    font-size: 30px;
    color: #ffffff;
    cursor: pointer;
    padding: 10px;
}

.hamburger.scrolled {
    color: #333333;
}


/* 遮罩效果 */
.overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 99;
    opacity: 0;
    transition: opacity 5s ease;
    cursor: pointer;
}

.overlay.show {
    display: block;
    opacity: 1;
    visibility: visible;
}

/* Drawer 样式 */
.navigation-drawer {
    height: 95%;
    width: 50%; /* 固定寬度 */

    top: 2.5%;
    right: -50%;
    position: fixed;


    background-color: #ffffff;
    border-radius: 10px;

    transition: transform 0.3s ease;  /* 平滑滑動效果 */
    z-index: 100;
}

.navigation-drawer.show {
    transform: translateX(-105%); /* 滑出螢幕內 */
}

@media only screen and (max-width: 768px) {
    .navigation-drawer {
        height: 50%; /* 調整抽屜高度 */
        width: 95%; /* 調整抽屜寬度 */
        left: 2.5%;       
        bottom: -50%; /* 初始位置在螢幕下方 */
        border-radius: 5px;

        top: auto;
        right: auto;
    }

    .navigation-drawer.show {
        transform: translateY(-102.5%); /* 從下方滑入 */
    }
}

/* 關閉按鈕 */
.close-btn {
    font-size: 30px;
    position: absolute;
    top: 20px;
    right: 25px;
    cursor: pointer;
}

@media only screen and (max-width: 768px) {
    .close-btn{
        width: 50px;
        height: 50px;
        
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 25px;
        background-color: #ffffff;
        border:1px #838383 solid;
        top: 10%;
        left: 10%;
        right: auto;
    }
}

.navigation-drawer-box {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.navigation-drawer-list {
    width: 80%;
    margin-block: 10px;
}

.navigation-drawer-list a {
    font-size: 20px; font-weight: 700;
    text-align: left; text-decoration: none;
    color: #333333;
}

.navigation-drawer-list a:hover {
    background-color: rgb(255, 255, 255);
}
@media only screen and (max-width: 1000px) {
    .menu{
        display: none;
    }
    .hamburger{
        display: block;
    }
}

