/* Enhanced Navigation Styles for Archive Pages */
/* Matches existing HTML structure with premium styling */

/* Main Navigation Container */
.nav-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    padding: 0;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.nav-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 60px;
}

/* Navigation Menu */
.nav-menu {
    display: flex;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
    flex: 1;
    justify-content: flex-start;
}

.nav-menu li {
    margin: 0;
    padding: 0;
}

/* Enhanced Navigation Links */
.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    font-size: 14px;
    position: relative;
    overflow: hidden;
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(71, 85, 105, 0.5);
}

/* Hover effect with subtle background */
.nav-link:hover {
    background: rgba(51, 65, 85, 0.8);
    color: rgba(255, 255, 255, 0.95);
    transform: translateY(-2px);
    border-color: rgba(96, 165, 250, 0.4);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Active state - premium gradient style */
.nav-link.active {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border-color: rgba(59, 130, 246, 0.5);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    transform: translateY(-1px);
}

.nav-link.active:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
    transform: translateY(-2px);
}

/* Icon pulse animation for active link */
.nav-link.active {
    animation: subtle-pulse 2s ease-in-out infinite;
}

@keyframes subtle-pulse {
    0%, 100% { box-shadow: 0 4px 16px rgba(59, 130, 246, 0.4); }
    50% { box-shadow: 0 4px 20px rgba(59, 130, 246, 0.6); }
}

/* User Section */
.nav-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Premium Logout Button Styling */
.btn-logout {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border: 1px solid rgba(220, 38, 38, 0.4);
    color: white;
    padding: 10px 24px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
    position: relative;
    overflow: hidden;
}

/* Logout button hover effect */
.btn-logout:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
    border-color: rgba(220, 38, 38, 0.6);
}

.btn-logout:active {
    transform: translateY(0) scale(0.98);
}

/* Logout button shine effect */
.btn-logout::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-logout:hover::before {
    left: 100%;
}

/* Adjust main container for fixed navigation */
body {
    padding-top: 60px;
}

.main-container {
    padding-top: 20px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .nav-menu {
        gap: 4px;
    }
    
    .nav-link {
        padding: 10px 12px;
        font-size: 13px;
    }
    
    .btn-logout {
        padding: 10px 16px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .nav-link {
        padding: 8px 10px;
        font-size: 16px; /* Just show emoji on mobile */
    }
    
    /* Hide text on very small screens, keep emoji */
    .nav-link {
        white-space: nowrap;
    }
}

/* Dark Mode Support */
body.theme-dark .nav-header {
    background: linear-gradient(135deg, #0a0f1a 0%, #1e293b 100%);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

body.theme-dark .nav-link {
    background: rgba(15, 23, 42, 0.7);
    border-color: rgba(51, 65, 85, 0.6);
}

body.theme-dark .nav-link:hover {
    background: rgba(51, 65, 85, 0.9);
    border-color: rgba(96, 165, 250, 0.5);
}

/* Focus states for accessibility */
.nav-link:focus,
.btn-logout:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.3);
}

/* Disabled state */
.nav-link.disabled,
.btn-logout:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* Loading state for logout button */
.btn-logout.loading {
    opacity: 0.7;
    pointer-events: none;
}

.btn-logout.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ==================== NAV ACTIONS ==================== */
/* Container for right-aligned items (logout) */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
}

/* ==================== NAV HELP BUTTON ==================== */
/* Dark background help button matching nav bar style */
.nav-help-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-help-btn .help-icon {
    font-size: 16px;
    line-height: 1;
    color: #ef4444;
}

.nav-help-btn .help-text {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    font-weight: 500;
    line-height: 1;
}

.nav-help-btn:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.nav-help-btn:active {
    transform: translateY(0) scale(0.98);
}

/* Focus state for accessibility */
.nav-help-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.3);
}

/* Hide floating help widgets */
.tutorial-help-button,
#aiHelpWidget,
.ai-help-widget,
.ai-help-floating-btn,
.help-float-btn {
    display: none !important;
}

/* Mobile responsive for help button */
@media (max-width: 768px) {
    .nav-help-btn {
        padding: 6px 12px;
    }
    
    .nav-help-btn .help-icon {
        font-size: 14px;
    }
    
    .nav-help-btn .help-text {
        font-size: 12px;
    }
    
    .nav-actions {
        gap: 8px;
    }
}
