/**
 * Glassmorphism Fixed Header - FIXED VERSION
 * Modern glass effect with purple accents
 * ALL CLICKABILITY ISSUES RESOLVED
 */

/* Fixed Header Base - Admin Dashboard Style */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1200 !important; /* FIXED: Hardcoded z-index */
    pointer-events: auto !important; /* FIXED: Ensure clicks work */

    /* Solid Glassmorphism Effect (like Admin) */
    background: rgba(255, 255, 255, 0.8) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
    border-bottom: 1px solid rgba(102, 126, 234, 0.15) !important;
    box-shadow: 0 2px 16px rgba(102, 126, 234, 0.1) !important;

    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Enhanced effect when scrolled */
.header.scrolled {
    background: rgba(255, 255, 255, 0.95) !important;
    box-shadow: 0 4px 24px rgba(102, 126, 234, 0.15) !important;
}

/* Navigation Container */
.nav-container {
    position: relative;
    z-index: 1300; /* FIXED: Higher than header */
    padding: 0.5rem 2rem;
    transition: padding 0.3s ease;
    max-width: 100%;
    width: 100%;
    margin: 0;
    pointer-events: auto !important; /* FIXED: Ensure clicks work */
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header.scrolled .nav-container {
    padding: 0.5rem 2rem;
}

/* Logo Styling - Hidden */
.logo {
    display: none !important;
}

.header.scrolled .logo {
    font-size: 1.6rem;
}

.logo:hover {
    color: #764ba2;
    text-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
    transform: scale(1.05);
}

/* Logo Image */
.logo-image {
    height: 45px;
    width: auto;
    display: block;
    transition: all 0.3s ease;
    filter: drop-shadow(0 2px 4px rgba(102, 126, 234, 0.2));
}

.header.scrolled .logo-image {
    height: 40px;
}

.logo:hover .logo-image {
    filter: drop-shadow(0 4px 8px rgba(102, 126, 234, 0.3));
    transform: scale(1.05);
}

/* Desktop Navigation */
.desktop-nav {
    pointer-events: auto !important; /* FIXED */
}

/* Navigation Links */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
    list-style: none;
    margin: 0;
    padding: 0;
    pointer-events: auto !important; /* FIXED */
    width: 100%;
    justify-content: flex-start;
}

.nav-menu li {
    pointer-events: auto !important; /* FIXED */
}

/* Navigation Separator */
.nav-separator {
    color: #cbd5e0;
    font-size: 1.875rem;
    user-select: none;
    pointer-events: none;
    margin: 0 0.5rem;
}

/* Push separators and CTA buttons to the right */
.nav-separator:first-of-type {
    margin-left: auto;
}

/* Language Switcher Styling */
.language-dropdown .language-switcher {
    font-size: 1.125rem;
    color: #667eea;
}

.language-dropdown .dropdown-menu {
    min-width: 180px;
}

/* Mobile Navigation Separator */
.mobile-nav-separator {
    color: #cbd5e0;
    font-size: 0.875rem;
    text-align: center;
    padding: 0.75rem 0;
    user-select: none;
    pointer-events: none;
    border-bottom: none !important;
}

.nav-menu a {
    color: #374151;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    transition: all 0.2s ease;
    pointer-events: auto !important; /* FIXED */
    cursor: pointer !important; /* FIXED */
}

.nav-menu a:hover {
    color: var(--color-primary, #667eea);
}

/* Purple underline effect on hover */
.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s ease;
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
    width: 100%;
}

/* Dropdown Menu */
.dropdown {
    position: relative;
    pointer-events: auto !important; /* FIXED */
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 0.75rem);
    left: 0;
    display: none; /* FIXED: Hidden by default */
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-radius: 12px;
    box-shadow: 0 12px 48px rgba(102, 126, 234, 0.2),
                0 0 0 1px rgba(102, 126, 234, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.8);
    min-width: 300px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-15px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    list-style: none;
    padding: 0.75rem;
    margin: 0;
    z-index: 100;
    pointer-events: auto !important; /* FIXED */
}

.dropdown:hover .dropdown-menu,
.dropdown:focus-within .dropdown-menu {
    display: block; /* FIXED: Show on hover */
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    margin: 0;
    pointer-events: auto !important; /* FIXED */
}

.dropdown-menu a {
    display: block;
    padding: 0.875rem 1.25rem;
    color: #374151;
    font-size: 1rem;
    border-radius: 10px;
    transition: all 0.25s ease;
    font-weight: 500;
    pointer-events: auto !important; /* FIXED */
    cursor: pointer !important; /* FIXED */
}

.dropdown-menu a::after {
    display: none;
}

.dropdown-menu a:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.12) 0%, rgba(118, 75, 162, 0.08) 100%);
    color: #667eea;
    transform: translateX(6px);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.1);
}

/* CTA Buttons */
.nav-cta {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white !important;
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.875rem;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
    border: 2px solid transparent;
    pointer-events: auto !important; /* FIXED */
    cursor: pointer !important; /* FIXED */
}

.nav-cta::after {
    display: none;
}

.nav-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    color: white !important;
}

/* Secondary CTA Button - Kundenportal (White with Purple Border + Crown) */
.nav-cta-secondary {
    background: white !important;
    color: #667eea !important;
    border: 2px solid #667eea !important;
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.15);
    pointer-events: auto !important; /* FIXED */
    cursor: pointer !important; /* FIXED */
}

.nav-cta-secondary::before {
    content: '👑 ';
    margin-right: 0.25rem;
}

.nav-cta-secondary::after {
    display: none;
}

.nav-cta-secondary:hover {
    background: #667eea !important;
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* Mobile CTA Secondary */
.mobile-nav-cta-secondary {
    background: white !important;
    color: #667eea !important;
    border: 2px solid #667eea !important;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
    margin-top: 0.5rem;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.15);
    pointer-events: auto !important; /* FIXED */
    cursor: pointer !important; /* FIXED */
}

.mobile-nav-cta-secondary::before {
    content: '👑 ';
    margin-right: 0.25rem;
}

.mobile-nav-cta-secondary:hover {
    background: #667eea !important;
    color: white !important;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1400; /* FIXED: Higher than nav-container */
    pointer-events: auto !important; /* FIXED */
}

.mobile-menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background: #667eea;
    border-radius: 3px;
    transition: all 0.3s ease;
    pointer-events: none; /* Prevent spans from blocking clicks */
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Ensure body has padding-top to account for fixed header */
body:not(.dashboard-page) {
    padding-top: 65px !important;
    transition: padding-top 0.3s ease;
}

/* Reduce spacing on desktop for hero section */
@media (min-width: 769px) {
    body:not(.dashboard-page) {
        padding-top: 60px !important;
    }

    /* Hero section closer to header */
    .hero-b2b,
    .hero-section {
        padding-top: 1rem !important;
        margin-top: 0 !important;
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .nav-menu {
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    body {
        padding-top: 70px;
    }

    .header::before {
        opacity: 1;
        background: rgba(255, 255, 255, 0.95);
    }

    .nav-container {
        padding: 1rem 1.5rem;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .header.scrolled .nav-container {
        padding: 0.875rem 1.5rem;
    }

    .logo {
        font-size: 1.4rem;
    }

    .desktop-nav {
        display: none;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    /* Mobile Menu Dropdown */
    .mobile-menu {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        border-bottom: 1px solid rgba(102, 126, 234, 0.1);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
        pointer-events: auto !important; /* FIXED */
        z-index: 1100;
    }

    .mobile-menu.active {
        max-height: calc(100vh - 70px);
        overflow-y: auto;
    }

    .mobile-menu-list {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        padding: 1.5rem;
        gap: 0;
        list-style: none;
        margin: 0;
    }

    .mobile-menu-list li {
        width: 100%;
        border-bottom: 1px solid rgba(102, 126, 234, 0.1);
        pointer-events: auto !important; /* FIXED */
    }

    .mobile-menu-list li:last-child {
        border-bottom: none;
    }

    /* CTA Buttons nebeneinander */
    .mobile-menu-list li:nth-last-child(1),
    .mobile-menu-list li:nth-last-child(2) {
        display: inline-block !important;
        width: calc(50% - 0.5rem) !important;
        border-bottom: none !important;
        vertical-align: top;
    }

    .mobile-menu-list li:nth-last-child(2) {
        margin-right: 1rem;
    }

    .mobile-menu-list a {
        display: block;
        padding: 1rem 0;
        width: 100%;
        color: #374151;
        text-decoration: none;
        pointer-events: auto !important; /* FIXED */
        cursor: pointer !important; /* FIXED */
    }

    .mobile-nav-cta {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white !important;
        padding: 0.75rem 1.5rem;
        border-radius: 8px;
        font-weight: 600;
        display: inline-block;
        margin-top: 0.5rem;
        box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
        pointer-events: auto !important; /* FIXED */
        cursor: pointer !important; /* FIXED */
    }

    .mobile-dropdown-menu {
        position: static;
        display: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        background: rgba(102, 126, 234, 0.05);
        margin-top: 0.5rem;
        border-radius: 8px;
        list-style: none;
        padding: 0.5rem;
    }

    .mobile-dropdown.active .mobile-dropdown-menu {
        display: block;
    }

/* Animation for smooth appearance */
@keyframes headerSlideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.header {
    animation: headerSlideDown 0.5s ease-out;
}

/* Better focus states for accessibility */
.nav-menu a:focus,
.nav-cta:focus,
.mobile-menu-toggle:focus {
    outline: 2px solid #667eea;
    outline-offset: 4px;
    border-radius: 4px;
}

/* Hero Logo Styling */
.hero-logo {
    margin-bottom: 2.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-logo-img {
    max-width: 500px;
    width: 100%;
    height: auto;
    filter: drop-shadow(0 15px 40px rgba(102, 126, 234, 0.4));
    transition: all 0.3s ease;
}

.hero-logo-img:hover {
    filter: drop-shadow(0 20px 50px rgba(102, 126, 234, 0.5));
    transform: scale(1.05);
}

@media (max-width: 1024px) {
    .hero-logo {
        margin-bottom: 2rem;
    }

    .hero-logo-img {
        max-width: 400px;
    }
}

@media (max-width: 768px) {
    .hero-logo {
        margin-bottom: 1.5rem;
    }

    .hero-logo-img {
        max-width: 300px;
        filter: drop-shadow(0 10px 30px rgba(102, 126, 234, 0.3));
    }
}

    /* CTA Buttons nebeneinander - HÖHERE SPEZIFITÄT */
    @media (max-width: 768px) {
        .mobile-menu .mobile-menu-list li:nth-last-child(1),
        .mobile-menu .mobile-menu-list li:nth-last-child(2) {
            display: inline-block !important;
            width: calc(50% - 0.5rem) !important;
            border-bottom: none !important;
            vertical-align: top !important;
            float: none !important;
        }

        .mobile-menu .mobile-menu-list li:nth-last-child(2) {
            margin-right: 1rem !important;
        }
    }

/* Mobile CTA Buttons nebeneinander - DIREKTE KLASSE */
@media (max-width: 768px) {
    .mobile-menu-list .mobile-cta-button {
        display: inline-block !important;
        width: 48% !important;
        border-bottom: none !important;
        vertical-align: top !important;
        margin-right: 0 !important;
    }
    
    .mobile-menu-list .mobile-cta-button:first-of-type {
        margin-right: 4% !important;
    }
}

/* Mobile CTA Buttons - MAXIMALE SPEZIFITÄT */
@media (max-width: 768px) {
    .mobile-menu .mobile-menu-list li.mobile-cta-button {
        display: inline-block !important;
        width: 48% !important;
        max-width: 48% !important;
        border-bottom: none !important;
        vertical-align: top !important;
        margin-right: 0 !important;
        float: none !important;
        box-sizing: border-box !important;
    }
    
    .mobile-menu .mobile-menu-list li.mobile-cta-button:first-of-type {
        margin-right: 4% !important;
    }
    
    .mobile-menu .mobile-menu-list li.mobile-cta-button a {
        width: 100% !important;
        display: block !important;
        box-sizing: border-box !important;
    }
}

/* Fix 2: Mobile Menu Icon ausblenden auf Desktop - Added 2025-11-16 */
@media (min-width: 1024px) {
    .mobile-menu-toggle {
        display: none !important;
        visibility: hidden !important;
    }
}
