/**
 * Bootstrap 5 導航樣式 - nav-icons.css
 * 確保圖示不使用斜體樣式並適配Bootstrap 5響應式結構
 * 
 * @author Tun-Wei
 * @version 2.0
 */

/* 簡約導航樣式 */

/* 導航圖標樣式 - 強制不使用斜體 */
.nav-icon {
    font-style: normal !important;
    display: inline-block;
    margin-right: 6px;
    font-size: 1em;
}

/* 確保所有導航鏈接中的圖標都不是斜體 */
.navbar-nav .nav-link span,
.navbar-nav .nav-link i,
.admin-link span,
.admin-link i {
    font-style: normal !important;
}

/* 主導航容器 - 簡約設計 */
.main-nav {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    padding: 0.75rem 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* 品牌樣式 - 簡約 */
.nav-brand h2 {
    color: #343a40;
    margin: 0;
    font-size: 1.25rem;
    font-weight: 500;
}

/* 導航鏈接樣式 - 簡約 */
.navbar-nav {
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
    list-style: none;
}

.navbar-nav .nav-link {
    color: #6c757d !important;
    padding: 0.5rem 0.75rem;
    text-decoration: none;
    display: flex;
    align-items: center;
    margin: 0 0.25rem;
    border-radius: 4px;
    transition: color 0.2s ease;
}

.navbar-nav .nav-link:hover {
    color: #495057 !important;
    background-color: #e9ecef;
}

.navbar-nav .nav-link.active {
    color: #007bff !important;
    background-color: #e7f3ff;
}

/* 管理員鏈接 - 簡約樣式 */
.admin-link {
    color: #dc3545 !important;
    border: 1px solid #dc3545;
    border-radius: 4px;
    padding: 0.375rem 0.75rem !important;
    margin: 0 0.5rem;
}

.admin-link:hover {
    background-color: #dc3545 !important;
    color: white !important;
}

.admin-icon {
    margin-right: 6px;
    font-size: 1em;
    vertical-align: middle;
    display: inline-block;
}

/* 語言切換器 - 簡約 */
.language-switcher .form-select {
    background-color: white;
    border: 1px solid #ced4da;
    border-radius: 4px;
    padding: 0.375rem 1.75rem 0.375rem 0.75rem;
    font-size: 0.875rem;
    min-width: 100px;
    color: #495057;
}

.language-switcher .form-select:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Bootstrap 收縮按鈕 - 簡約 */
.navbar-toggler {
    border: 1px solid #ced4da;
    border-radius: 4px;
    padding: 0.375rem;
    background: none;
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2833, 37, 41, 0.75%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    width: 1.25em;
    height: 1.25em;
}

/* Bootstrap 5 標準響應式導航列樣式 */

/* 品牌標誌樣式 */
.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--primary-color) !important;
    text-decoration: none;
}

.brand-icon {
    font-size: 1.5rem;
}

.brand-text {
    font-size: 1.25rem;
    font-weight: 600;
}

/* 導航項目樣式 */
.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    color: var(--gray-600) !important;
    text-decoration: none;
    border-radius: 0.375rem;
    transition: all 0.2s ease-in-out;
    font-weight: 500;
}

.nav-link:hover {
    background-color: var(--gray-100);
    color: var(--primary-color) !important;
}

.nav-link.active {
    background-color: var(--primary-color);
    color: white !important;
}

.nav-link.active:hover {
    background-color: var(--primary-hover);
}

.nav-icon {
    font-size: 1.1rem;
}

.admin-link {
    background-color: var(--accent-color) !important;
    color: white !important;
    border-radius: 0.375rem;
}

.admin-link:hover {
    background-color: var(--accent-hover) !important;
    color: white !important;
}

/* 語言切換器樣式 */
.language-switcher .form-select {
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    padding: 0.375rem 2rem 0.375rem 0.75rem;
    font-size: 0.875rem;
    background-color: white;
    color: var(--gray-700);
    min-width: 100px;
}

.language-switcher .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(79, 70, 229, 0.25);
}

/* 大型設備 (≥992px) - 桌面版水平佈局 */
@media (min-width: 992px) {
    .navbar-nav {
        gap: 0.5rem;
    }
    
    .nav-text {
        display: inline;
    }
    
    .language-switcher {
        margin-left: 1rem;
    }
}

/* 中型設備 (768px - 991.98px) - 平板版 */
@media (min-width: 768px) and (max-width: 991.98px) {
    .brand-text {
        font-size: 1.1rem;
    }
    
    .nav-link {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }
}

/* 中小型設備 (<991.98px) - 收合為漢堡菜單 */
@media (max-width: 991.98px) {
    .navbar-collapse {
        background-color: rgba(248, 249, 250, 0.95);
        backdrop-filter: blur(10px);
        border-top: 1px solid var(--border-color);
        margin-top: 0.75rem;
        padding: 1rem 0;
        border-radius: 0 0 0.5rem 0.5rem;
    }
    
    .navbar-nav {
        width: auto;
        align-items: flex-start !important;
    }
    
    .nav-link {
        width: auto;
        justify-content: flex-start;
        padding: 0.75rem 1rem;
        margin: 0.125rem 0;
        display: inline-flex;
    }
    
    .admin-link {
        margin: 0.5rem 0 !important;
        justify-content: flex-start;
        text-align: left;
        width: auto;
        display: inline-flex;
    }
    
    .language-switcher {
        margin-top: 1rem;
        width: auto;
    }
    
    .language-switcher .form-select {
        width: auto;
        min-width: 120px;
    }
    
    .d-flex {
        flex-direction: column;
        align-items: flex-start !important;
    }
}

/* 小型設備 (<575.98px) - 手機版進一步優化 */
@media (max-width: 575.98px) {
    .main-nav {
        padding: 0.5rem 1rem;
    }
    
    .brand-text {
        font-size: 1rem;
    }
    
    .brand-icon {
        font-size: 1.25rem;
    }
    
    .nav-link {
        padding: 0.875rem 0.75rem;
        font-size: 0.9rem;
    }
    
    .nav-icon {
        font-size: 1rem;
        margin-right: 0.5rem;
    }
    
    .nav-text {
        font-size: 0.9rem;
    }
    
    .admin-link {
        padding: 0.75rem !important;
        font-size: 0.9rem;
    }
    
    .language-switcher .form-select {
        font-size: 0.85rem;
        padding: 0.5rem 1.5rem 0.5rem 0.75rem;
    }
}

/* 超小型設備 (<480px) - 極小手機優化 */
@media (max-width: 479.98px) {
    .brand-text {
        font-size: 0.9rem;
    }
    
    .nav-link {
        padding: 1rem 0.5rem;
        font-size: 0.85rem;
    }
    
    .navbar-collapse {
        padding: 0.75rem 0;
    }
}