/* Mobile-First: Basis-Styles gelten für mobile Geräte */
.header {
    font-family: var(--font-family-primary);
    font-size: var(--font-size-base);
    line-height: var(--line-height-base);
    background-color: var(--color-background);
    border-bottom: 1px solid var(--color-border);
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 100%;
    margin: 0 auto;
    width: 100%;
    position: relative;
    z-index: 1000;
}

.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: none;
    position: absolute;
    top: 100%;
    left: auto;
    right: 0;
    flex-direction: column;
    background: var(--color-background);
    border: 1px solid var(--color-border);
    border-radius: 4px;
    padding: 10px;
    min-width: 200px;
    max-width: 300px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    z-index: 1001;
    gap: 0;
}

.nav-link {
    font-family: var(--font-family-primary);
    font-size: var(--font-size-base);
    line-height: var(--line-height-base);
    text-decoration: none;
    color: var(--color-text);
    padding: 12px;
}

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

.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: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px;
    background: none;
    border: 1px solid var(--color-border);
    cursor: pointer;
}

.mobile-nav-toggle-line {
    display: block;
    width: 22px;
    height: 2px;
    background-color: var(--color-text);
}

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

.language-toggle {
    font-family: var(--font-family-primary);
    font-size: var(--font-size-base);
    line-height: var(--line-height-base);
    padding: 8px;
    border: 1px solid var(--color-border);
    background: var(--color-background);
    cursor: pointer;
}

.language-flag {
    width: 20px;
    height: 15px;
}

.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;
    left: auto;
    background: var(--color-background);
    border: 1px solid var(--color-border);
    min-width: 150px;
    margin-top: 5px;
    z-index: 1002;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.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: 10px;
    padding: 10px 15px;
    cursor: pointer;
    text-decoration: none;
    color: var(--color-text);
}

.language-option:hover {
    background: var(--color-nav-hover-bg);
    text-decoration: none;
}

.language-option .language-flag {
    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: none;
    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;
}

.header-nav.open {
    display: flex;
}

/* Mobile-First: Responsive Design - Regel 022: 4 Breakpoints */
/* Basis-Styles gelten für mobile (max-width: 576px) - keine Media Query erforderlich */

/* Tablet/iPad (min-width: 600px) */
@media (min-width: 600px) {
    .header {
        padding: 20px;
    }
}

/* Kleiner Desktop/13-Zoll (min-width: 1024px) */
@media (min-width: 1024px) {
    .header {
        max-width: 1200px;
        padding: 20px;
    }
    
    .mobile-nav-toggle {
        display: none;
    }
    
    .header-nav {
        display: flex;
        position: static;
        flex-direction: row;
        background: transparent;
        border: none;
        border-radius: 0;
        padding: 0;
        min-width: auto;
        max-width: none;
        box-shadow: none;
        gap: 15px;
    }
    
    .nav-link {
        padding: 8px 12px;
    }
    
    .header-user-avatar {
        display: flex;
    }
    
    .language-dropdown {
        left: auto;
        right: 0;
    }
}

/* Großer Desktop/Widescreen (min-width: 1440px) */
@media (min-width: 1440px) {
    .header {
        max-width: 1200px;
    }
}
