.header {
    font-family: var(--font-family-primary);
    font-size: var(--font-size-base);
    line-height: var(--line-height-base);
    background-color: #FFFFFF;
    border-bottom: 1px solid rgba(226, 232, 240, 0.5);
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
    position: relative;
}

.header-logo-area {
    font-family: var(--font-family-primary);
    font-size: var(--font-size-base);
    line-height: var(--line-height-base);
    flex: 0 0 auto;
    min-width: 50px;
}

.header-nav {
    font-family: var(--font-family-primary);
    font-size: var(--font-size-base);
    line-height: var(--line-height-base);
    display: flex;
    gap: 0.5rem;
}

/* Navigation-Links: Professionell und dezent gestylt */
.nav-link {
    font-family: var(--font-family-primary);
    font-size: 0.9375rem;
    line-height: var(--line-height-base);
    text-decoration: none;
    color: #475569;
    padding: 0.75rem 1.25rem;
    font-weight: 400;
    letter-spacing: 0.01em;
    border-radius: 0.5rem;
    transition: color 0.2s ease;
    display: inline-block;
    background: transparent;
}

.nav-link:hover {
    color: #2563EB;
    text-decoration: none;
    background: transparent;
}

.nav-link-active {
    color: #2563EB;
    font-weight: 500;
    background: transparent;
    border-bottom: 2px solid #2563EB;
    border-radius: 0;
    padding-bottom: calc(0.75rem - 2px);
}

.header-actions {
    font-family: var(--font-family-primary);
    font-size: var(--font-size-base);
    line-height: var(--line-height-base);
    display: flex;
    gap: 10px;
}

.mobile-nav-toggle {
    font-family: var(--font-family-primary);
    font-size: var(--font-size-base);
    line-height: var(--line-height-base);
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 0.75rem;
    background: none;
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.mobile-nav-toggle:hover {
    border-color: rgba(37, 99, 235, 0.3);
    background: rgba(37, 99, 235, 0.05);
}

.mobile-nav-toggle-line {
    display: block;
    width: 24px;
    height: 2px;
    background-color: #475569;
    border-radius: 1px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.language-switcher {
    font-family: var(--font-family-primary);
    font-size: var(--font-size-base);
    line-height: var(--line-height-base);
    position: relative;
    z-index: 10000;
}

.language-switcher-button {
    font-family: var(--font-family-primary);
    font-size: var(--font-size-base);
    line-height: var(--line-height-base);
    padding: 0.625rem 1rem;
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 0.75rem;
    background: #FFFFFF;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.language-switcher-button:hover {
    background: rgba(37, 99, 235, 0.05);
    border: 1px solid rgba(37, 99, 235, 0.3);
}

.flag-icon {
    width: 20px;
    height: 15px;
    border: none;
}

.language-dropdown {
    font-family: var(--font-family-primary);
    font-size: var(--font-size-base);
    line-height: var(--line-height-base);
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(226, 232, 240, 0.6);
    border-radius: 1rem;
    min-width: 150px;
    margin-top: 0.5rem;
    padding: 0.5rem;
    box-shadow: 0 10px 40px rgba(15, 23, 42, 0.08), 0 4px 12px rgba(15, 23, 42, 0.04);
    z-index: 10001;
}

.language-dropdown.open {
    display: block;
}

.language-option {
    font-family: var(--font-family-primary);
    font-size: var(--font-size-base);
    line-height: var(--line-height-base);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    border-radius: 0.75rem;
    cursor: pointer;
    text-decoration: none;
    color: var(--color-text);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.language-option:hover {
    background: rgba(37, 99, 235, 0.05);
    text-decoration: none;
}

.language-option .flag-icon {
    flex-shrink: 0;
}

.header-user-avatar {
    font-family: var(--font-family-primary);
    font-size: var(--font-size-base);
    line-height: var(--line-height-base);
    display: flex;
    align-items: center;
}

.header-user-avatar-link {
    font-family: var(--font-family-primary);
    font-size: var(--font-size-base);
    line-height: var(--line-height-base);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    text-decoration: none;
    border: 2px solid var(--color-border);
}

.header-user-avatar-link:hover {
    border-color: var(--color-primary);
}

.header-user-avatar-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.header-user-avatar-placeholder {
    font-family: var(--font-family-primary);
    font-size: var(--font-size-base);
    line-height: var(--line-height-base);
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--color-primary);
    color: var(--color-text-inverse);
    font-weight: bold;
    text-transform: uppercase;
}

/* Responsive Design - Regel 022: 4 Breakpoints */
/* Mobile (max-width: 576px) */
@media (max-width: 576px) {
    .header {
        max-width: 100%;
        padding: 1.5rem 1.25rem;
    }
    
    .mobile-nav-toggle {
        display: flex;
    }
    
    .header-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(12px);
        border-top: 1px solid rgba(226, 232, 240, 0.5);
        padding: 1.5rem;
        gap: 0.75rem;
        box-shadow: 0 10px 40px rgba(15, 23, 42, 0.08), 0 4px 12px rgba(15, 23, 42, 0.04);
        z-index: 1000;
    }
    
    .header-nav.open {
        display: flex;
    }
    
    .nav-link {
        padding: 1rem 1.5rem;
    }
    
    .header-user-avatar {
        display: none;
    }
    
    .language-switcher {
        z-index: 10000;
    }
    
    .language-dropdown {
        right: 0;
        left: auto;
        z-index: 10001;
    }
}

/* Tablet/iPad (600px–768px) */
@media (min-width: 600px) and (max-width: 768px) {
    .header {
        max-width: 100%;
        padding: 1.5rem 1.5rem;
    }
    
    .mobile-nav-toggle {
        display: flex;
    }
    
    .header-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(12px);
        border-top: 1px solid rgba(226, 232, 240, 0.5);
        padding: 1.5rem;
        gap: 0.75rem;
        box-shadow: 0 10px 40px rgba(15, 23, 42, 0.08), 0 4px 12px rgba(15, 23, 42, 0.04);
        z-index: 1000;
    }
    
    .header-nav.open {
        display: flex;
    }
    
    .nav-link {
        padding: 1rem 1.5rem;
    }
    
    .header-user-avatar {
        display: none;
    }
    
    .language-switcher {
        z-index: 10000;
    }
    
    .language-dropdown {
        right: 0;
        left: auto;
        z-index: 10001;
    }
}

/* Kleiner Desktop/13-Zoll (1024px–1366px) */
@media (min-width: 1024px) and (max-width: 1366px) {
    .header {
        max-width: 1400px;
    }
    
    .mobile-nav-toggle {
        display: none;
    }
    
    .header-nav {
        display: flex;
    }
}

/* Großer Desktop/Widescreen (min-width: 1440px) */
@media (min-width: 1440px) {
    .header {
        max-width: 1400px;
    }
    
    .mobile-nav-toggle {
        display: none;
    }
    
    .header-nav {
        display: flex;
    }
}

/* Reduced-Motion Support für Accessibility */
@media (prefers-reduced-motion: reduce) {
    .nav-link {
        transition: none;
    }
}
