/* ============================================
   KineTrace Consolidated Navigation Styles
   Header with primary nav + hamburger overflow
   ============================================ */

/* Consolidated Navigation Container */
.consolidated-nav {
    background: white;
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    z-index: 100;
}

/* Navigation Header - Now includes primary navigation */
.nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    gap: 2rem;
}

/* Primary Navigation in Header */
.primary-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    justify-content: center;
}

/* Logo Styles */
.nav-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--text-primary);
    font-size: var(--font-xl);
    font-weight: 600;
    gap: 1rem;
}

.nav-logo:hover {
    text-decoration: none;
    color: var(--primary-dark);
}

.nav-logo svg {
    width: 70px;
    height: 70px;
}

/* User Info Display */
.user-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #6b7280;
    font-size: 0.875rem;
}

/* Overflow Navigation Container (Hamburger Menu) */
.overflow-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    padding: 1rem;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 99;
}

/* Show overflow nav when hamburger is checked */
.nav-toggle:checked ~ .overflow-nav {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

/* Navigation section headers */
.nav-section-header {
    font-size: 0.75rem;
    font-weight: 600;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
    padding: 0 0.5rem;
}

/* Navigation Groups */
.nav-group {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
    margin-bottom: 1rem;
}

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

/* In overflow nav, groups are vertical */
.overflow-nav .nav-group {
    flex-direction: column;
    gap: 0.25rem;
}

/* Navigation Items */
.nav-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    text-decoration: none;
    color: #6b7280;
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.nav-item:hover {
    background: #f3f4f6;
    color: #374151;
    text-decoration: none;
}

.nav-item i {
    font-size: 1rem;
}

/* Highlighted Navigation Item (Get Started) */
.nav-highlight {
    background: #3b82f6;
    color: white;
}

.nav-highlight:hover {
    background: #2563eb;
    color: white;
}

/* Logout Navigation Item */
.nav-logout {
    background: #ef4444;
    color: white;
}

.nav-logout:hover {
    background: #dc2626;
    color: white;
}

/* CSS-only hamburger menu system */
.nav-toggle {
    display: none; /* Hide the checkbox */
}

.nav-header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.hamburger-btn {
    display: flex; /* Always visible for overflow items */
    flex-direction: column;
    cursor: pointer;
    padding: 0.5rem;
    gap: 0.25rem;
    background: none;
    border: none;
    z-index: 101;
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
}

/* Mobile-only primary navigation (hidden on desktop) */
.mobile-primary {
    display: none;
}

/* Desktop Responsive Design */
@media (min-width: 769px) {
    .primary-nav {
        display: flex; /* Show primary nav in header on desktop */
    }
    
    .mobile-primary {
        display: none; /* Hide mobile primary nav on desktop */
    }
}

/* Mobile Responsive Design */
@media (max-width: 768px) {
    .nav-header {
        padding: 0.75rem;
        gap: 1rem;
    }
    
    .nav-logo svg {
        width: 50px;
        height: 50px;
    }
    
    /* Adjust logo text on mobile */
    .nav-logo {
        gap: 0.5rem;
    }
    
    .nav-logo span[style*="font-size: var(--font-4xl)"] {
        font-size: 1.25rem !important;
    }
    
    .nav-logo span[style*="font-size: var(--font-xs)"] {
        font-size: 0.625rem !important;
    }
    
    .primary-nav {
        display: none; /* Hide primary nav from header on mobile */
    }
    
    .mobile-primary {
        display: flex; /* Show primary nav in hamburger on mobile */
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .overflow-nav {
        padding: 0.75rem;
    }
    
    .nav-item {
        padding: 0.75rem 1rem;
        width: 100%;
        justify-content: flex-start;
        min-height: 44px; /* Ensure proper touch target */
    }
    
    /* Hide tagline on very small screens */
    @media (max-width: 400px) {
        .nav-logo span[style*="font-size: var(--font-xs)"] {
            display: none !important;
        }
    }
}

.hamburger-line {
    width: 24px;
    height: 3px;
    background-color: #374151;
    transition: all 0.3s ease;
    border-radius: 2px;
}

/* Hamburger animation when checked */
.nav-toggle:checked + .nav-header .nav-header-right .hamburger-btn .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.nav-toggle:checked + .nav-header .nav-header-right .hamburger-btn .hamburger-line:nth-child(2) {
    opacity: 0;
}

.nav-toggle:checked + .nav-header .nav-header-right .hamburger-btn .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Hamburger line styles */
.hamburger-line {
    width: 24px;
    height: 3px;
    background-color: #374151;
    transition: all 0.3s ease;
    border-radius: 2px;
}