/* 🚀 2025年最先進HEADER樣式 - 現代化設計 */

/* 防止導航開啟時背景滾動 */
body.nav-open {
    overflow: hidden;
}

/* 主HEADER容器 - 玻璃擬態效果 */
.modern-header-2025 {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(0);
}

/* 滾動時的效果 */
.modern-header-2025.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(25px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.modern-header-2025.hidden {
    transform: translateY(-100%);
}

/* 載入動畫 */
.modern-header-2025.loaded {
    animation: headerSlideIn 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes headerSlideIn {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* 主導航容器 */
.nav-container-2025 {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}

/* LOGO區域 - 現代化設計 */
.logo-section-2025 {
    display: flex;
    align-items: center;
}

.logo-link-2025 {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    padding: 0.5rem;
    border-radius: 16px;
}

.logo-link-2025:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
}

.logo-icon-2025 {
    font-size: 2.5rem;
    margin-right: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 18px;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
}

.logo-link-2025:hover .logo-icon-2025 {
    transform: rotate(5deg) scale(1.05);
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.4);
}

.logo-text-2025 {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.logo-main-2025 {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-sub-2025 {
    font-size: 0.85rem;
    color: rgba(0, 0, 0, 0.6);
    font-weight: 500;
}

/* 主選單區域 */
.nav-menu-2025 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* 導航項目 */
.nav-item-2025 {
    position: relative;
}

.nav-link-2025 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    text-decoration: none;
    color: rgba(0, 0, 0, 0.8);
    font-weight: 500;
    font-size: 0.95rem;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.nav-link-2025::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.nav-link-2025:hover::before,
.nav-item-2025.active .nav-link-2025::before {
    opacity: 1;
}

.nav-link-2025:hover {
    color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.2);
}

.nav-item-2025.active .nav-link-2025 {
    color: #667eea;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15), rgba(118, 75, 162, 0.15));
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
}

.nav-icon-2025 {
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    position: relative;
    z-index: 1;
}

/* 下拉箭頭 */
.dropdown-arrow-2025 {
    font-size: 0.8rem;
    margin-left: 0.25rem;
    transition: transform 0.3s ease;
    position: relative;
    z-index: 1;
}

.dropdown-2025:hover .dropdown-arrow-2025 {
    transform: rotate(180deg);
}

/* 下拉選單 - 超現代化設計 */
.dropdown-menu-2025 {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    min-width: 280px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 1rem;
    margin-top: 0.5rem;
}

.dropdown-2025:hover .dropdown-menu-2025 {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* 下拉選單項目 */
.dropdown-item-2025 {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    text-decoration: none;
    color: rgba(0, 0, 0, 0.8);
    border-radius: 12px;
    transition: all 0.3s ease;
    margin-bottom: 0.5rem;
}

.dropdown-item-2025:last-child {
    margin-bottom: 0;
}

.dropdown-item-2025:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.15);
}

.dropdown-icon-2025 {
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.dropdown-title-2025 {
    font-weight: 600;
    font-size: 1rem;
    color: rgba(0, 0, 0, 0.9);
    display: block;
}

.dropdown-desc-2025 {
    font-size: 0.85rem;
    color: rgba(0, 0, 0, 0.6);
    display: block;
    margin-top: 0.25rem;
}

/* 返回首頁特殊樣式 */
.back-home-2025 .nav-link-2025 {
    background: linear-gradient(135deg, rgba(255, 152, 0, 0.1), rgba(255, 193, 7, 0.1));
    border: 1px solid rgba(255, 152, 0, 0.2);
}

.back-home-2025 .nav-link-2025:hover {
    background: linear-gradient(135deg, rgba(255, 152, 0, 0.2), rgba(255, 193, 7, 0.2));
    color: #ff9800;
}

/* 行動版切換按鈕 */
.mobile-toggle-2025 {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 0.75rem;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.mobile-toggle-2025:hover {
    background: rgba(102, 126, 234, 0.1);
}

.hamburger-line-2025 {
    width: 25px;
    height: 3px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 3px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-toggle-2025.active .hamburger-line-2025:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.mobile-toggle-2025.active .hamburger-line-2025:nth-child(2) {
    opacity: 0;
}

.mobile-toggle-2025.active .hamburger-line-2025:nth-child(3) {
    transform: rotate(-45deg) translate(8px, -8px);
}

/* 行動版選單 */
.mobile-nav-2025 {
    position: fixed;
    top: 80px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transform: translateY(-100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    z-index: 999;
}

.mobile-nav-2025.active {
    transform: translateY(0);
}

.mobile-nav-content-2025 {
    padding: 2rem;
    max-width: 400px;
    margin: 0 auto;
}

.mobile-nav-item-2025 {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    text-decoration: none;
    color: rgba(0, 0, 0, 0.8);
    font-weight: 500;
    border-radius: 12px;
    margin-bottom: 0.75rem;
    transition: all 0.3s ease;
}

.mobile-nav-item-2025:hover,
.mobile-nav-item-2025.active {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    color: #667eea;
    transform: translateX(10px);
}

/* 行動版下拉選單 */
.mobile-dropdown-2025 {
    margin-bottom: 0.75rem;
}

.mobile-dropdown-trigger-2025 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: rgba(102, 126, 234, 0.05);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mobile-dropdown-trigger-2025:hover {
    background: rgba(102, 126, 234, 0.1);
}

.mobile-arrow-2025 {
    transition: transform 0.3s ease;
    font-size: 0.8rem;
}

.mobile-dropdown-content-2025 {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    margin-top: 0.5rem;
}

.mobile-dropdown-item-2025 {
    display: block;
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: rgba(0, 0, 0, 0.7);
    border-radius: 8px;
    margin-bottom: 0.25rem;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.mobile-dropdown-item-2025:hover {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    transform: translateX(5px);
}

/* 響應式設計 */
@media (max-width: 1024px) {
    .nav-container-2025 {
        padding: 0 1.5rem;
    }
    
    .logo-main-2025 {
        font-size: 1.3rem;
    }
    
    .dropdown-menu-2025 {
        min-width: 250px;
    }
}

@media (max-width: 768px) {
    .nav-menu-2025 {
        display: none;
    }
    
    .mobile-toggle-2025 {
        display: flex;
    }
    
    .nav-container-2025 {
        height: 70px;
        padding: 0 1rem;
    }
    
    .logo-icon-2025 {
        width: 50px;
        height: 50px;
        font-size: 2rem;
    }
    
    .logo-main-2025 {
        font-size: 1.2rem;
    }
    
    .logo-sub-2025 {
        font-size: 0.8rem;
    }
    
    .mobile-nav-2025 {
        top: 70px;
    }
}

@media (max-width: 480px) {
    .nav-container-2025 {
        height: 65px;
        padding: 0 0.75rem;
    }
    
    .logo-icon-2025 {
        width: 45px;
        height: 45px;
        font-size: 1.8rem;
        margin-right: 0.75rem;
    }
    
    .logo-main-2025 {
        font-size: 1.1rem;
    }
    
    .mobile-nav-content-2025 {
        padding: 1.5rem;
    }
}

/* 深色模式支援 */
@media (prefers-color-scheme: dark) {
    .modern-header-2025 {
        background: rgba(20, 20, 20, 0.85);
        border-bottom-color: rgba(255, 255, 255, 0.1);
    }
    
    .modern-header-2025.scrolled {
        background: rgba(20, 20, 20, 0.95);
    }
    
    .nav-link-2025 {
        color: rgba(255, 255, 255, 0.9);
    }
    
    .logo-sub-2025 {
        color: rgba(255, 255, 255, 0.6);
    }
    
    .dropdown-menu-2025 {
        background: rgba(30, 30, 30, 0.95);
        border-color: rgba(255, 255, 255, 0.1);
    }
    
    .dropdown-item-2025 {
        color: rgba(255, 255, 255, 0.9);
    }
    
    .dropdown-title-2025 {
        color: rgba(255, 255, 255, 0.95);
    }
    
    .dropdown-desc-2025 {
        color: rgba(255, 255, 255, 0.6);
    }
    
    .mobile-nav-2025 {
        background: rgba(20, 20, 20, 0.95);
    }
    
    .mobile-nav-item-2025 {
        color: rgba(255, 255, 255, 0.9);
    }
    
    .mobile-dropdown-trigger-2025 {
        background: rgba(102, 126, 234, 0.1);
    }
    
    .mobile-dropdown-item-2025 {
        color: rgba(255, 255, 255, 0.8);
    }
}

/* 無障礙支援 */
@media (prefers-reduced-motion: reduce) {
    .modern-header-2025,
    .nav-link-2025,
    .dropdown-menu-2025,
    .mobile-nav-2025,
    .hamburger-line-2025 {
        transition: none;
    }
    
    .modern-header-2025.loaded {
        animation: none;
    }
}

/* 高對比度支援 */
@media (prefers-contrast: high) {
    .modern-header-2025 {
        background: rgba(255, 255, 255, 0.98);
        border-bottom: 2px solid #000;
    }
    
    .nav-link-2025 {
        border: 1px solid transparent;
    }
    
    .nav-link-2025:hover,
    .nav-item-2025.active .nav-link-2025 {
        border-color: #667eea;
    }
}
