/* ============================================
   DESKTOP HEADER NAVIGATION - Tabbed Navigation
   ============================================ */

@media (min-width: 969px) {
    .site-header--desktop {
        position: sticky;
        top: 0;
        z-index: 1000;
        background: var(--bg-color);
        border-bottom: 1px solid var(--border-color);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
        width: 100%;
        overflow: visible;
        box-sizing: border-box;
    }
    
    .desktop-header-content {
        display: flex;
        align-items: center;
        gap: 1rem;
        padding: 0.875rem 1rem;
        max-width: 100%;
        margin: 0;
        width: 100%;
        box-sizing: border-box;
        flex-wrap: nowrap;
        overflow: visible;
        position: relative;
        z-index: 1000;
    }
    
    @media (min-width: 1200px) {
        .desktop-header-content {
            gap: 1rem;
            padding: 0.875rem 1.25rem;
        }
    }
    
    @media (min-width: 1400px) {
        .desktop-header-content {
            gap: 1.5rem;
            padding: 0.875rem 1.5rem;
        }
    }
    
    /* Logo */
    .desktop-header-logo {
        flex-shrink: 0;
        min-width: 120px;
        max-width: 180px;
    }
    
    .desktop-header-logo .site-logo-img {
        height: 45px;
        width: auto;
        display: block;
    }
    
    .desktop-header-logo .site-logo-img--dark {
        display: none;
    }
    
    body[data-theme="dark"] .desktop-header-logo .site-logo-img--light {
        display: none;
    }
    
    body[data-theme="dark"] .desktop-header-logo .site-logo-img--dark {
        display: block;
    }
    
    /* Navigation Tabs */
    .desktop-header-nav {
        flex: 1 1 auto;
        display: flex;
        align-items: center;
        min-width: 200px;
        overflow: visible;
        position: relative;
        margin: 0 0.25rem;
        z-index: 1001;
    }
    
    @media (min-width: 1200px) {
        .desktop-header-nav {
            margin: 0 0.5rem;
        }
    }
    
    .desktop-nav-tabs {
        display: flex;
        align-items: center;
        gap: 0.125rem;
        list-style: none;
        margin: 0;
        padding: 0;
        flex-wrap: nowrap;
        width: 100%;
    }
    
    @media (min-width: 1200px) {
        .desktop-nav-tabs {
            gap: 0.25rem;
        }
    }
    
    .desktop-nav-tab {
        position: relative;
        margin: 0;
        z-index: 1;
    }
    
    .desktop-nav-tab--has-dropdown {
        z-index: 1002;
    }
    
    .desktop-nav-tab--has-dropdown:hover {
        z-index: 1003;
    }
    
    .desktop-nav-tab-link {
        display: flex;
        align-items: center;
        gap: 0.375rem;
        padding: 0.625rem 0.75rem;
        color: var(--text-color);
        text-decoration: none;
        font-weight: 500;
        font-size: 0.8125rem;
        border-radius: 6px;
        transition: all 0.2s ease;
        position: relative;
        white-space: nowrap;
    }
    
    .desktop-nav-tab-link i {
        flex-shrink: 0;
        font-size: 0.875rem;
        display: inline-block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    @media (min-width: 1200px) {
        .desktop-nav-tab-link {
            padding: 0.625rem 0.875rem;
            font-size: 0.875rem;
        }
        
        .desktop-nav-tab-link i {
            font-size: 0.9375rem;
        }
    }
    
    @media (min-width: 1400px) {
        .desktop-nav-tab-link {
            padding: 0.625rem 1rem;
            font-size: 0.9375rem;
        }
        
        .desktop-nav-tab-link i {
            font-size: 1rem;
        }
    }
    
    .desktop-nav-tab-link:hover {
        background: var(--hover-bg);
        color: var(--accent-color-1);
    }
    
    .desktop-nav-tab.active .desktop-nav-tab-link {
        color: var(--accent-color-1);
        background: var(--hover-bg);
    }
    
    .desktop-nav-tab.active .desktop-nav-tab-link::after {
        content: '';
        position: absolute;
        bottom: -1px;
        left: 0;
        right: 0;
        height: 2px;
        background: linear-gradient(135deg, var(--accent-color-1), var(--accent-color-2));
        border-radius: 2px 2px 0 0;
    }
    
    .desktop-nav-tab-link i.fas {
        font-size: 0.875rem;
    }
    
    .desktop-nav-tab-arrow {
        font-size: 0.75rem !important;
        margin-left: 0.25rem;
        transition: transform 0.2s ease;
    }
    
    .desktop-nav-tab--has-dropdown:hover .desktop-nav-tab-arrow,
    .desktop-nav-tab--has-dropdown.active .desktop-nav-tab-arrow {
        transform: rotate(180deg);
    }
    
    /* Dropdown Menu */
    .desktop-nav-dropdown {
        position: absolute;
        top: 100%;
        left: 0;
        min-width: 280px;
        max-width: 320px;
        background: var(--bg-color);
        border: 1px solid var(--border-color);
        border-radius: 8px;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
        margin-top: 0.5rem;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
        z-index: 1001;
        padding: 0.5rem 0;
    }
    
    .desktop-nav-tab--has-dropdown:hover .desktop-nav-dropdown,
    .desktop-nav-tab--has-dropdown.active .desktop-nav-dropdown {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
    
    .desktop-nav-dropdown-header {
        padding: 0.5rem 0.75rem;
        border-bottom: 1px solid var(--border-color);
        margin-bottom: 0.25rem;
    }
    
    .desktop-nav-dropdown-all {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        padding: 0.5rem 0.75rem;
        color: var(--text-color);
        text-decoration: none;
        font-weight: 600;
        border-radius: 4px;
        transition: background 0.2s ease, color 0.2s ease;
    }
    
    .desktop-nav-dropdown-all:hover {
        background: var(--hover-bg);
        color: var(--accent-color-1);
    }
    
    .desktop-nav-dropdown-list {
        list-style: none;
        margin: 0;
        padding: 0;
        max-height: 400px;
        overflow-y: auto;
    }
    
    .desktop-nav-dropdown-item {
        margin: 0;
    }
    
    .desktop-nav-dropdown-link {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        padding: 0.625rem 0.75rem;
        color: var(--text-color);
        text-decoration: none;
        transition: background 0.2s ease, color 0.2s ease;
        position: relative;
    }
    
    .desktop-nav-dropdown-link:hover {
        background: var(--hover-bg);
        color: var(--accent-color-1);
    }
    
    .desktop-nav-dropdown-link i.fas {
        font-size: 0.875rem;
        color: var(--text-color);
        opacity: 0.7;
        width: 16px;
        text-align: center;
    }
    
    .desktop-nav-dropdown-link:hover i.fas {
        opacity: 1;
        color: var(--accent-color-1);
    }
    
    .desktop-nav-dropdown-name {
        flex: 1;
        font-size: 0.9375rem;
    }
    
    .desktop-nav-dropdown-count {
        background: var(--hover-bg);
        color: var(--text-color);
        font-size: 0.8125rem;
        font-weight: 600;
        padding: 0.125rem 0.5rem;
        border-radius: 12px;
        min-width: 24px;
        text-align: center;
    }
    
    .desktop-nav-dropdown-link:hover .desktop-nav-dropdown-count {
        background: var(--accent-color-1);
        color: white;
    }
    
    /* Search Bar */
    .desktop-header-search {
        flex-shrink: 0;
        position: relative;
        width: 180px;
        min-width: 180px;
    }
    
    @media (min-width: 1200px) {
        .desktop-header-search {
            width: 220px;
            min-width: 220px;
        }
    }
    
    @media (min-width: 1400px) {
        .desktop-header-search {
            width: 260px;
            min-width: 260px;
        }
    }
    
    .desktop-search-form {
        display: flex;
        align-items: center;
        position: relative;
        width: 100%;
    }
    
    .desktop-search-input {
        width: 100%;
        padding: 0.625rem 2.75rem 0.625rem 1rem;
        border: 1px solid var(--border-color);
        border-radius: 6px;
        background: var(--bg-color);
        color: var(--text-color);
        font-size: 0.9375rem;
        transition: border-color 0.2s ease, box-shadow 0.2s ease;
    }
    
    .desktop-search-input:focus {
        outline: none;
        border-color: var(--accent-color-1);
        box-shadow: 0 0 0 3px rgba(var(--accent-color-1-rgb), 0.1);
    }
    
    .desktop-search-input::placeholder {
        color: var(--text-color);
        opacity: 0.6;
    }
    
    .desktop-search-submit {
        position: absolute;
        right: 0.5rem;
        top: 50%;
        transform: translateY(-50%);
        background: none;
        border: none;
        color: var(--text-color);
        opacity: 0.7;
        cursor: pointer;
        padding: 0.5rem;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: opacity 0.2s ease, color 0.2s ease;
    }
    
    .desktop-search-submit:hover {
        opacity: 1;
        color: var(--accent-color-1);
    }
    
    .desktop-search-submit i {
        font-size: 0.9375rem;
    }
    
    /* Header Actions */
    .desktop-header-actions {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        flex-shrink: 0;
    }
    
    /* Button Styles for Desktop Header */
    .desktop-header-actions .btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 0.375rem;
        padding: 0.625rem 0.75rem;
        font-size: 0.8125rem;
        font-weight: 500;
        border-radius: 6px;
        text-decoration: none;
        transition: all 0.2s ease;
        border: none;
        cursor: pointer;
        white-space: nowrap;
        min-height: 38px;
    }
    
    .desktop-header-actions .btn-sm {
        padding: 0.5rem 0.75rem;
        font-size: 0.8125rem;
        min-height: 36px;
    }
    
    .desktop-header-actions .btn i {
        flex-shrink: 0;
        font-size: 0.875rem;
        display: inline-block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .desktop-header-actions .btn-icon i,
    .desktop-header-actions .btn-icon svg:not(.theme-icon-svg) {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    /* Theme Toggle Icons - Specific Styling */
    .desktop-header-actions .theme-toggle {
        position: relative;
    }
    
    .desktop-header-actions .theme-toggle .theme-icon-svg {
        width: 20px !important;
        height: 20px !important;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        stroke-width: 2;
    }
    
    .desktop-header-actions .theme-toggle .theme-icon-moon {
        display: block !important;
    }
    
    .desktop-header-actions .theme-toggle .theme-icon-sun {
        display: none !important;
    }
    
    body[data-theme="dark"] .desktop-header-actions .theme-toggle .theme-icon-moon {
        display: none !important;
    }
    
    body[data-theme="dark"] .desktop-header-actions .theme-toggle .theme-icon-sun {
        display: block !important;
    }
    
    .desktop-header-actions .btn span {
        white-space: nowrap;
    }
    
    /* Hide button text on smaller screens, keep icons */
    @media (max-width: 1100px) {
        .desktop-header-actions .btn-sm:not(.btn-icon) span {
            display: none;
        }
        
        .desktop-header-actions .btn-sm:not(.btn-icon) {
            padding: 0.5rem;
            min-width: 38px;
            width: 38px;
            justify-content: center;
        }
        
        .desktop-header-actions .btn-sm:not(.btn-icon) i {
            margin: 0;
        }
    }
    
    @media (min-width: 1101px) and (max-width: 1300px) {
        .desktop-header-actions .btn-sm {
            padding: 0.5rem 0.625rem;
            font-size: 0.75rem;
        }
        
        .desktop-header-actions .btn-sm span {
            display: inline;
        }
    }
    
    @media (min-width: 1301px) {
        .desktop-header-actions .btn {
            padding: 0.625rem 1rem;
            font-size: 0.875rem;
        }
        
        .desktop-header-actions .btn-sm {
            padding: 0.5rem 0.875rem;
            font-size: 0.875rem;
        }
        
        .desktop-header-actions .btn i {
            font-size: 0.9375rem;
        }
    }
    
    .desktop-header-actions .btn-primary {
        background: var(--accent-color-1);
        color: white;
    }
    
    .desktop-header-actions .btn-primary:hover {
        background: var(--accent-color-2);
        color: white;
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }
    
    .desktop-header-actions .btn-secondary {
        background: transparent;
        color: var(--text-color);
        border: 1px solid var(--border-color);
    }
    
    .desktop-header-actions .btn-secondary:hover {
        background: var(--hover-bg);
        border-color: var(--accent-color-1);
        color: var(--accent-color-1);
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    }
    
    .desktop-header-actions .btn-profile {
        background: transparent;
        color: var(--text-color);
        border: 1px solid var(--border-color);
    }
    
    .desktop-header-actions .btn-profile:hover {
        background: var(--hover-bg);
        border-color: var(--accent-color-1);
        color: var(--accent-color-1);
    }
    
    .desktop-header-actions .btn-profile .profile-avatar-icon {
        width: 20px;
        height: 20px;
        border-radius: 50%;
        object-fit: cover;
    }
    
    .desktop-header-actions .btn-icon {
        background: transparent;
        color: var(--text-color);
        border: 1px solid var(--border-color);
        padding: 0.625rem;
        width: 40px;
        height: 40px;
    }
    
    .desktop-header-actions .btn-icon:hover {
        background: var(--hover-bg);
        border-color: var(--accent-color-1);
        color: var(--accent-color-1);
    }
    
    .desktop-header-actions .btn i {
        font-size: 0.875rem;
    }
    
    /* Scrollbar styling for dropdown */
    .desktop-nav-dropdown-list::-webkit-scrollbar {
        width: 6px;
    }
    
    .desktop-nav-dropdown-list::-webkit-scrollbar-track {
        background: transparent;
    }
    
    .desktop-nav-dropdown-list::-webkit-scrollbar-thumb {
        background: var(--border-color);
        border-radius: 3px;
    }
    
    .desktop-nav-dropdown-list::-webkit-scrollbar-thumb:hover {
        background: var(--text-color);
        opacity: 0.5;
    }
}

/* Navigation tabs - ensure all items are visible */
.desktop-nav-tab {
    flex-shrink: 0;
}

/* Dropdown menu positioning fix */
.desktop-nav-dropdown {
    max-height: calc(100vh - 100px);
    overflow-y: auto;
}

/* Theme toggle icons are styled in the media query above */

/* Hide on mobile */
@media (max-width: 968px) {
    .desktop-header-nav,
    .desktop-header-search {
        display: none !important;
    }
}

