/* Header.css - 頭部導航樣式 */

/* 基本導航樣式 */
.navbar-custom {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1030;
}

.navbar-custom .navbar-brand {
    color: var(--text-light);
    font-size: 1.5rem;
    font-weight: bold;
    transition: transform 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.navbar-custom .navbar-brand:hover {
    transform: scale(1.05);
    color: var(--text-light);
}

.navbar-logo {
    height: 40px;
    width: auto;
    transition: transform 0.3s ease;
}

/* 導航鏈接樣式 */
.navbar-custom .nav-link {
    color: var(--text-light) !important;
    font-weight: 500;
    padding: 0.5rem 1rem;
    margin: 0 0.2rem;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.navbar-custom .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

/* 下拉選單樣式 */
.navbar-custom .dropdown-menu {
    background-color: white;
    border: none;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    padding: 0.5rem;
    min-width: 12rem;
}

.navbar-custom .dropdown-item {
    color: var(--text-dark);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.navbar-custom .dropdown-item:hover, 
.navbar-custom .dropdown-item:focus {
    background-color: rgba(52, 152, 219, 0.1);
    color: var(--accent-color);
    transform: translateX(5px);
}

/* 導航折疊按鈕樣式 */
.navbar-toggler {
    border: none;
    padding: 0.5rem;
    transition: transform 0.3s ease;
}

.navbar-toggler:focus {
    outline: none;
    box-shadow: none;
}

.navbar-toggler:hover {
    transform: scale(1.1);
}

/* 子選單動畫效果 */
.dropdown-menu.animate__animated {
    animation-duration: 0.3s;
}

/* 針對移動裝置的優化 */
@media (max-width: 991.98px) {
    .navbar-collapse {
        background-color: var(--primary-color);
        border-radius: 0 0 15px 15px;
        padding: 1rem;
        margin-top: 0.5rem;
    }
    
    .navbar-custom .nav-link {
        padding: 0.75rem 1rem;
        margin: 0.2rem 0;
    }
    
    .navbar-custom .dropdown-menu {
        background-color: rgba(255, 255, 255, 0.05);
        border: none;
        box-shadow: none;
        padding: 0;
    }
    
    .navbar-custom .dropdown-item {
        color: var(--text-light);
        padding: 0.75rem 1.5rem;
    }
    
    .navbar-custom .dropdown-item:hover, 
    .navbar-custom .dropdown-item:focus {
        background-color: rgba(255, 255, 255, 0.1);
        color: white;
    }
    
    .navbar-logo {
        height: 32px;
    }
}

/* 確保主內容區域不被導航欄覆蓋 */
body {
    padding-top: 70px; /* 頂部導航欄的高度 */
}