/* Professional Navigation Styles */

:root {
    --nav-height: 80px;
    --nav-bg: linear-gradient(135deg, #fafbfc 0%, #ffffff 100%);
    --nav-border: #e2e8f0;
    --nav-text: #475569;
    --nav-text-hover: #1e293b;
    --nav-active: #f53939;
    --nav-active-bg: rgba(245, 57, 57, 0.08);
    --nav-shadow: 0 4px 12px 0 rgba(0, 0, 0, 0.05), 0 2px 4px 0 rgba(0, 0, 0, 0.03);
    --nav-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Main Navigation Container */
.professional-navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background: var(--nav-bg);
    border-bottom: 1px solid var(--nav-border);
    box-shadow: var(--nav-shadow);
    z-index: 1000;
    transition: var(--nav-transition);
}

.professional-navbar.scrolled {
    --nav-bg: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    box-shadow: 0 8px 25px 0 rgba(0, 0, 0, 0.08), 0 4px 8px 0 rgba(0, 0, 0, 0.04);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.nav-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 32px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Brand/Logo Section */
.nav-brand {
    flex-shrink: 0;
}

.brand-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: var(--nav-transition);
}

.brand-logo {
    height: 48px;
    width: auto;
    transition: var(--nav-transition);
}

.brand-link:hover .brand-logo {
    transform: scale(1.05);
}

/* Main Navigation */
.nav-main {
    flex: 1;
    margin: 0 32px;
}

.professional-nav-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 24px;
    border-radius: 14px;
    text-decoration: none;
    color: var(--nav-text);
    font-weight: 500;
    font-size: 16px;
    transition: var(--nav-transition);
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(245, 57, 57, 0.05), transparent);
    transition: left 0.6s ease;
}

.nav-link:hover::before {
    left: 100%;
}

.nav-link:hover {
    color: var(--nav-text-hover);
    background: linear-gradient(135deg, rgba(245, 57, 57, 0.05), rgba(251, 145, 47, 0.05));
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245, 57, 57, 0.15);
}

.nav-item.active .nav-link {
    color: var(--nav-active);
    background: var(--nav-active-bg);
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(245, 57, 57, 0.2);
}

.nav-item.active .nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 3px;
    background: linear-gradient(90deg, var(--nav-active), #fb912f);
    border-radius: 2px;
}

.nav-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    transition: var(--nav-transition);
}

.nav-link:hover .nav-icon {
    transform: translateY(-1px);
}

.nav-text {
    font-size: 16px;
    font-weight: 500;
}

/* Right Actions */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 12px;
    background: transparent;
    color: var(--nav-text);
    cursor: pointer;
    transition: var(--nav-transition);
    position: relative;
    overflow: hidden;
}

.action-btn:hover {
    background: linear-gradient(135deg, rgba(245, 57, 57, 0.08), rgba(251, 145, 47, 0.08));
    color: var(--nav-active);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245, 57, 57, 0.15);
}

.search-btn {
    display: none; /* Will be shown when search functionality is implemented */
}

/* Mobile Toggle */
.mobile-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 12px;
    background: transparent;
    cursor: pointer;
    transition: var(--nav-transition);
    position: relative;
    overflow: hidden;
}

.mobile-toggle:hover {
    background: linear-gradient(135deg, rgba(245, 57, 57, 0.08), rgba(251, 145, 47, 0.08));
    transform: translateY(-1px);
}

.toggle-line {
    width: 22px;
    height: 2.5px;
    background: var(--nav-text);
    margin: 2.5px 0;
    transition: var(--nav-transition);
    border-radius: 2px;
}

.mobile-toggle:hover .toggle-line {
    background: var(--nav-active);
}

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

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

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

/* Mobile Navigation */
.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: var(--nav-transition);
    z-index: 999;
}

.mobile-overlay.active {
    opacity: 1;
    visibility: visible;
}

.nav-mobile {
    position: fixed;
    top: 0;
    right: -320px;
    width: 320px;
    height: 100vh;
    background: var(--nav-bg);
    box-shadow: -4px 0 6px -1px rgba(0, 0, 0, 0.1);
    transition: var(--nav-transition);
    z-index: 1001;
    overflow-y: auto;
}

.nav-mobile.active {
    right: 0;
}

.mobile-nav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--nav-border);
}

.mobile-logo {
    height: 32px;
    width: auto;
}

.mobile-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--nav-text);
    cursor: pointer;
    transition: var(--nav-transition);
}

.mobile-close:hover {
    background: #f3f4f6;
}

.mobile-nav-content {
    padding: 20px;
}

.mobile-nav-content .professional-nav-menu {
    flex-direction: column;
    gap: 4px;
}

.mobile-nav-content .nav-link {
    width: 100%;
    padding: 12px 16px;
    justify-content: flex-start;
}

/* Body Padding for Fixed Navigation */
body {
    padding-top: var(--nav-height);
}

/* Hide old sidebar navigation when professional navigation is present */
.professional-navbar ~ .page-container .sidebar,
.professional-navbar ~ * .sidebar {
    display: none !important;
}

/* Hide old mobile menu toggles when professional navigation is present */
.professional-navbar ~ .page-container .mobile-menu-toggle:not(.mobile-toggle),
.professional-navbar ~ * .mobile-menu-toggle:not(.mobile-toggle) {
    display: none !important;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .nav-container {
        padding: 0 20px;
    }
    
    .nav-main {
        margin: 0 24px;
    }
}

@media (max-width: 992px) {
    .nav-main {
        margin: 0 20px;
    }
    
    .professional-nav-menu {
        gap: 12px;
    }
    
    .nav-link {
        padding: 12px 18px;
        font-size: 15px;
    }
    
    .nav-text {
        font-size: 15px;
    }
    
    .nav-icon {
        width: 18px;
        height: 18px;
    }
}

@media (max-width: 768px) {
    .nav-container {
        padding: 0 16px;
    }
    
    .nav-main {
        display: none;
    }
    
    .mobile-toggle {
        display: flex;
    }
    
    .search-btn {
        display: flex;
    }
}

@media (max-width: 480px) {
    .nav-container {
        padding: 0 12px;
    }
    
    .brand-logo {
        height: 40px;
    }
    
    .nav-mobile {
        width: 280px;
        right: -280px;
    }
}


/* Animation Enhancements */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

.nav-mobile.active {
    animation: slideInRight 0.3s ease-out;
}

/* Focus States for Accessibility */
.nav-link:focus,
.action-btn:focus,
.mobile-toggle:focus,
.mobile-close:focus {
    outline: 2px solid var(--nav-active);
    outline-offset: 2px;
}

/* Smooth Scrolling When Navigation is Fixed */
html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--nav-height) + 20px);
}
