/* Global Header Styles für ASC Investment Portal */

/* CSS Variables für Investment Portal */
:root {
    --radius: 0.375rem;
    --transition: all 0.3s ease;
    --bg-light: #f8f9fa;
    --border: #dee2e6;
    --text-primary: #212529;
    --text-secondary: #6c757d;
    --hover-bg: #f0f0f0;
    --asc-primary: #0374a8;
}

/* Header mit ASC Corporate Design - Investment Portal Variante */
.main-header {
    background: linear-gradient(135deg, #0374a8, #025a87);
    width: 100%;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: none;
    padding: 0.5rem 0;
}

.main-header .main-container {
    width: 1400px;
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
}

.main-header .main-container > div {
    /* Kein extra Background oder Border */
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.brand {
    font-size: 1.125rem;
    font-weight: 400;
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 3rem;
    letter-spacing: -0.01em;
    max-width: 800px;
}

.brand-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.2;
}

.brand-text .company-name {
    font-size: 1.5rem;
    font-weight: 300;
    letter-spacing: -0.02em;
}

.brand-text .company-tagline {
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--text-secondary);
    margin-top: 0.125rem;
}

.asc-logo-small {
    width: 400px !important;
    height: 60px !important;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    flex-shrink: 0;
}

/* Logo Styling für img Element */
.asc-logo-small img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: brightness(0) invert(1); /* Logo immer weiß */
}

/* Button Styles */
.btn-header {
    background: transparent;
    border: 1px solid white;
    color: white;
    padding: 0.375rem 1rem;
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: 400;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    height: 32px;
    line-height: 1;
    font-size: 0.875rem;
}

.btn-header:hover {
    background: transparent;
    border-color: white;
    color: white;
    text-decoration: none;
}

/* Desktop Navigation */
.desktop-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.desktop-nav > span {
    display: inline-flex;
    align-items: center;
    font-weight: 400;
    color: white;
    font-size: 0.875rem;
}

/* Language Switcher in Header */
.btn-header.lang-btn {
    min-width: 40px;
    padding: 0.375rem 0.75rem;
    font-weight: 600;
}

/* Session Timer */
.session-timer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    padding: 0.375rem 1rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
    color: white;
    font-weight: 400;
    border: 1px solid white;
    height: 32px;
    line-height: 1;
    transition: var(--transition);
}

.session-timer i {
    color: white;
}

.session-timer.warning {
    background: transparent;
    border-color: white;
    color: white;
}

.session-timer.warning i {
    color: white;
}

.session-timer.critical {
    background: transparent;
    border-color: white;
    color: white;
    animation: pulse 2s infinite;
}

.session-timer.critical i {
    color: white;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

/* Timer Display mit fester Breite */
#timerDisplay {
    display: inline-block;
    min-width: 45px;
    text-align: center;
}

/* Hamburger Menu Styles */
.hamburger-menu {
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 30px;
    z-index: 1001;
}

.hamburger-line {
    width: 100%;
    height: 2px;
    background-color: white;
    transition: all 0.2s ease;
    transform-origin: center;
    border-radius: 0;
}

.hamburger-menu.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger-menu.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Mobile Navigation Overlay */
.mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-nav-overlay.active {
    display: block;
    opacity: 1;
}

.mobile-nav-content {
    position: fixed;
    top: 0;
    right: 0;
    width: 280px;
    height: 100%;
    background: var(--bg-light);
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 1001;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.mobile-nav-overlay.active .mobile-nav-content {
    transform: translateX(0);
}

.mobile-nav-header {
    padding: 1rem 1.5rem;
    background: var(--bg-light);
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 10;
}

.mobile-nav-title {
    font-size: 1.125rem;
    font-weight: 400;
    color: var(--text-primary);
}

.mobile-nav-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--text-primary);
    padding: 0.5rem;
}

.mobile-nav-body {
    padding: 1rem 0;
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.mobile-nav-user {
    padding: 0 1.5rem 1rem;
    border-bottom: 1px solid var(--border);
}

.mobile-nav-user-info {
    display: flex;
    align-items: center;
    font-weight: 500;
    color: var(--text-primary);
}

.mobile-nav-actions {
    flex: 1;
    padding: 1rem 0;
}

.mobile-nav-section {
    margin-bottom: 1.5rem;
}

.mobile-nav-section:last-child {
    margin-bottom: 0;
}

.mobile-nav-section-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--asc-primary);
    padding: 0.5rem 1.5rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.mobile-nav-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    color: var(--text-primary);
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.mobile-nav-item:hover {
    background-color: var(--hover-bg);
    color: var(--text-primary);
}

.mobile-nav-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border);
    margin-top: auto;
    position: sticky;
    bottom: 0;
    background: var(--bg-light);
}

.session-timer-mobile {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.session-timer-mobile.warning {
    color: #ffae00;
}

.session-timer-mobile.critical {
    color: #cc4b37;
    animation: pulse 1s infinite;
}

/* Mobile Navigation */
.mobile-nav {
    display: none;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .desktop-nav {
        display: none !important;
    }

    .mobile-nav, .hamburger-menu {
        display: flex !important;
    }

    .session-timer {
        display: none !important;
    }

    .main-header {
        padding: 0.4rem 0;
    }
    
    .main-header .main-container {
        padding: 0 1rem;
    }
    
    /* Flex container anpassen für mobile */
    .main-header .d-flex {
        padding: 0;
    }
    
    /* Logo/Brand Link mit extra Abstand rechts für bessere Zentrierung */
    .main-header .brand {
        margin-right: auto;
        padding-right: 48px; /* Kompensiert für Hamburger-Button */
    }

    .asc-logo-small {
        width: 250px !important;
        height: 50px !important;
    }
}

@media (max-width: 480px) {
    .asc-logo-small {
        width: 200px !important;
        height: 40px !important;
    }

    .mobile-nav-content {
        width: 100%;
    }
}