﻿@charset "utf-8";
       * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Microsoft JhengHei', Arial, sans-serif;
            line-height: 1.6;
        }

        /* 導航列樣式 */
        .navbar {
            background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
            padding: 0;
            position: sticky;
            top: 0;
            z-index: 1000;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        }

        .nav-container {
            max-width: 1200px;
            margin: 0 auto;
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 0 20px;
        }

        .logo {
            color: white;
            font-size: 1.5rem;
            font-weight: bold;
            padding: 1rem 0;
            text-decoration: none;
        }

        .logo span {
            color: #ffd700;
        }

        .nav-menu {
            display: flex;
            list-style: none;
            gap: 0;
        }

        .nav-menu li a {
            color: white;
            text-decoration: none;
            padding: 1.5rem 1.2rem;
            display: block;
            transition: all 0.3s ease;
            position: relative;
        }

        .nav-menu li a:hover {
            background: rgba(255, 255, 255, 0.1);
        }

        .nav-menu li a::after {
            content: '';
            position: absolute;
            bottom: 0;
            left: 50%;
            width: 0;
            height: 3px;
            background: #ffd700;
            transition: all 0.3s ease;
            transform: translateX(-50%);
        }

        .nav-menu li a:hover::after {
            width: 80%;
        }

 /* 漢堡選單按鈕 */
        .hamburger {
            display: none;
            flex-direction: column;
            cursor: pointer;
            padding: 0.5rem;
        }

        .hamburger span {
            width: 25px;
            height: 3px;
            background: white;
            margin: 3px 0;
            transition: all 0.3s ease;
            border-radius: 3px;
        }

        .hamburger.active span:nth-child(1) {
            transform: rotate(45deg) translate(8px, 8px);
        }

        .hamburger.active span:nth-child(2) {
            opacity: 0;
        }

        .hamburger.active span:nth-child(3) {
            transform: rotate(-45deg) translate(7px, -7px);
        }

@media screen and (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 100%; /* 貼齊導航列底部 */
        margin-top: -10px; /* 如果有邊框或陰影重疊 */
        flex-direction: column;
        background: #1e3c72;
        width: 100%;
        text-align: center;
        transition: left 0.3s ease;
        box-shadow: 0 10px 27px rgba(0,0,0,0.3);
        max-height: calc(100vh - 60px);
        overflow-y: auto;
        margin-top: -10px;
        padding: 0;
        border-top: none; /* 移除可能的上邊框 */
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu li {
        width: 100%;
    }

    .nav-menu li a {
        padding: 1.2rem;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        display: block;
    }

    .nav-menu li:first-child a {
        border-top: none; /* 確保第一個項目沒有上邊框 */
    }

    .logo {
        font-size: 1.2rem;
    }
}