/* ==================== 漢堡選單（手機版） ==================== */

/* 漢堡選單按鈕 - 桌面版隱藏 */
.burger-menu-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    cursor: pointer;
    z-index: 1001;
    transition: all 0.3s ease;
    position: relative;
}

.burger-menu-btn:hover {
    border-color: rgba(255, 255, 255, 0.2); 
    transform: scale(1.05);
}

.burger-menu-btn i {
    font-size: 24px;
    color: #ffffff !important   ;
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
}

.burger-menu-btn:hover i {
    color: var(--primary-color);
}

/* 展開動畫 - icon 旋轉變成 X */
.burger-menu-btn.active {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(60, 164, 199, 0.1);
}

.burger-menu-btn.active i::before {
    content: "\f00d"; /* Font Awesome X icon */
}

.burger-menu-btn.active i {
    transform: rotate(90deg);
    color: var(--primary-color);
}

/* ==================== 手機版響應式 ==================== */
@media (max-width: 768px) {
    /* 顯示漢堡按鈕 */
    .burger-menu-btn {
        display: flex !important;
    }

    /* 隱藏橫向選單 */
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        gap: 0;
        padding: 100px 30px 30px;
        margin: 0;
        transition: right 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
        box-shadow: -5px 0 20px rgba(0, 0, 0, 0.5);
        z-index: 999;
        border-left: 2px solid rgba(60, 164, 199, 0.3);
    }

    /* 展開選單 */
    .nav-menu.active {
        right: 0 !important;
    }

    /* 選單項目樣式 */
    .nav-menu li {
        width: 100%;
        margin: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-menu li:last-child {
        border-bottom: none;
    }

    .nav-link {
        display: block;
        width: 100%;
        padding: 20px 15px;
        font-size: 1.1rem;
        color: #ffffff;
        transition: all 0.3s ease;
    }

    .nav-link::after {
        display: none;
    }

    .nav-link:hover,
    .nav-link:active {
        background: rgba(60, 164, 199, 0.1);
        color: var(--primary-color);
        padding-left: 25px;
    }

    /* 遮罩層 */
    .nav-menu::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(0, 0, 0, 0.7);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        z-index: -1;
    }

    .nav-menu.active::before {
        opacity: 1;
        visibility: visible;
    }

    /* Logo 調整 */
    .logo img {
        height: 70px;
    }
}

@media (max-width: 480px) {
    /* 更小的漢堡按鈕 */
    .burger-menu-btn {
        width: 45px;
        height: 45px;
    }
    
    .burger-menu-btn i {
        font-size: 20px;
    }

    /* 縮小選單寬度 */
    .nav-menu {
        width: 250px;
        padding: 90px 20px 20px;
    }

    .nav-link {
        font-size: 1rem;
        padding: 18px 12px;
    }

    .logo img {
        height: 60px;
    }
}

/* ==================== 選單項目進場動畫 ==================== */
.nav-menu.active li {
    animation: slideInRight 0.4s ease forwards;
    opacity: 0;
}

.nav-menu.active li:nth-child(1) { animation-delay: 0.1s; }
.nav-menu.active li:nth-child(2) { animation-delay: 0.15s; }
.nav-menu.active li:nth-child(3) { animation-delay: 0.2s; }
.nav-menu.active li:nth-child(4) { animation-delay: 0.25s; }
.nav-menu.active li:nth-child(5) { animation-delay: 0.3s; }

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}