/* Mobile-First: Basis-Styles gelten für mobile Geräte */
/* Regel 010 aus 011-ui-widget-navigation.mdc: Mobile-Header-Padding */
.header {
    font-family: var(--font-family-primary);
    font-size: 14px;
    line-height: 1.8;
    background: #ffffff;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-bottom: 1px solid #e0e0e0;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
    position: relative;
    overflow-x: hidden;
    box-sizing: border-box;
}

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

.header-nav {
    font-family: var(--font-family-primary);
    font-size: 14px;
    line-height: 1.8;
    display: none;
    position: absolute;
    top: 100%;
    left: auto;
    right: 0;
    flex-direction: column;
    background: #ffffff;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: 1px solid #e0e0e0;
    border-radius: 0;
    padding: 12px;
    min-width: 200px;
    max-width: calc(100vw - 40px);
    width: auto;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 9999;
    gap: 0;
    box-sizing: border-box;
}

.nav-link {
    font-family: var(--font-family-primary);
    font-size: 14px;
    line-height: 1.8;
    text-decoration: none;
    color: #333333;
    padding: 8px 16px;
    border-radius: 0;
    transition: var(--transition-fast);
    font-weight: 400;
    letter-spacing: 0.6px;
}

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

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

.mobile-nav-toggle {
    font-family: var(--font-family-primary);
    font-size: 14px;
    line-height: 1.8;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px;
    background: #ffffff;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: 1px solid #e0e0e0;
    border-radius: 0;
    cursor: pointer;
    transition: var(--transition-fast);
}

.mobile-nav-toggle:hover {
    background: #f5f5f5;
}

.mobile-nav-toggle-line {
    display: block;
    width: 22px;
    height: 2px;
    background-color: #333333;
}

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

.language-switcher-button {
    font-family: var(--font-family-primary);
    font-size: 14px;
    line-height: 1.8;
    padding: 8px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 0;
    background: #ffffff;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #333333;
    transition: var(--transition-fast);
    font-weight: 400;
    position: relative;
    z-index: 10000;
}

.language-switcher-button:hover {
    background: #f5f5f5;
    border-color: #d0d0d0;
    color: #4854E7;
}

.language-switcher.active .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-arrow {
    font-size: 10px;
    transition: transform 0.2s;
}

.flag-icon {
    width: 24px;
    height: 18px;
    display: block;
    object-fit: contain;
    vertical-align: middle;
    border: none !important;
}

.language-switcher-button .flag-icon {
    flex-shrink: 0;
    border: none !important;
}

.language-dropdown {
    font-family: var(--font-family-primary);
    font-size: 14px;
    line-height: 1.8;
    display: none;
    position: absolute;
    top: 100%;
    left: auto;
    right: 0;
    margin-top: 4px;
    background: #ffffff;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: 1px solid #e0e0e0;
    border-radius: 0;
    min-width: 150px;
    max-width: calc(100vw - 40px);
    width: auto;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 10001;
    overflow: hidden;
    box-sizing: border-box;
}

.language-switcher.active .language-dropdown {
    display: block;
}

.language-option {
    font-family: var(--font-family-primary);
    font-size: 14px;
    line-height: 1.8;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    cursor: pointer;
    text-decoration: none;
    color: #333333;
    background: transparent;
    border-bottom: 1px solid #e0e0e0;
    transition: var(--transition-fast);
    font-weight: 400;
    letter-spacing: 0.6px;
}

.language-option:last-child {
    border-bottom: none;
}

.language-option:hover {
    background: #f5f5f5;
    text-decoration: none;
    color: #4854E7;
}

.language-option.active {
    background: #f5f5f5;
    font-weight: bold;
}

.language-option.active .flag-icon {
    /* Kein Rahmen für Flaggen */
}

.language-option .flag-icon {
    flex-shrink: 0;
    border: none !important;
    width: 24px;
    height: 18px;
    display: block;
    object-fit: contain;
}

.header-user-avatar {
    font-family: var(--font-family-primary);
    font-size: 14px;
    line-height: 1.8;
    display: none;
    align-items: center;
}

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

.header-user-avatar-link:hover {
    border-color: #4854E7;
}

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

.header-user-avatar-placeholder {
    font-family: var(--font-family-primary);
    font-size: 14px;
    line-height: 1.8;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #4854E7;
    color: #ffffff;
    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) - Apple.com-Niveau: Mehr Weißraum */
@media (min-width: 600px) {
    .header {
        padding: 12px 40px;
    }
}

/* Kleiner Desktop/13-Zoll (min-width: 1024px) - Apple.com-Niveau: Großzügige Max-Width */
@media (min-width: 1024px) {
    .header {
        max-width: 980px;
        padding: 12px 60px;
    }
    
    .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;
        font-size: 12px;
        line-height: 1.2;
        letter-spacing: 0.6px;
    }
    
    .header-user-avatar {
        display: flex;
    }
    
    .language-dropdown {
        position: absolute;
        top: 100%;
        left: auto;
        right: 0;
    }
}

/* Großer Desktop/Widescreen (min-width: 1440px) - Apple.com-Niveau: Noch mehr Weißraum */
@media (min-width: 1440px) {
    .header {
        max-width: 1200px;
        padding: 12px 80px;
    }
}
