/* ===============================================
   SHARED NAVIGATION SYSTEM - UNIFIED FOR ALL AUTHENTICATED PAGES
   =============================================== */

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(40px);
    border-bottom: 1px solid transparent;
    padding: var(--space-md) 0;
    z-index: 1000;
    transition: all var(--transition-smooth);
}

.nav.scrolled {
    border-bottom-color: var(--gray-200);
}

.dark .nav {
    background: rgba(0, 0, 0, 0.95);
    border-bottom-color: transparent;
}

.dark .nav.scrolled {
    border-bottom-color: var(--gray-800);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 0 var(--container-padding);
}

/* Logo */
.nav-logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    text-decoration: none;
    color: inherit;
    transition: all var(--transition-smooth);
}

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

.nav-logo-icon {
    width: 32px;
    height: 32px;
    background: var(--pure-black);
    color: var(--pure-white);
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    font-size: 18px;
    transition: all var(--transition-smooth);
}

.dark .nav-logo-icon {
    background: var(--pure-white);
    color: var(--pure-black);
}

.nav-brand {
    font-size: 20px;
    font-weight: 300;
    letter-spacing: 0.05em;
    color: var(--pure-black);
}

.dark .nav-brand {
    color: var(--pure-white);
}

/* Desktop Navigation */
.nav-desktop {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}

.nav-links {
    display: flex;
    gap: var(--space-xl);
    align-items: center;
}

.nav-link {
    color: var(--gray-600);
    text-decoration: none;
    font-size: var(--font-small);
    font-weight: 400;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    transition: all var(--transition-smooth);
    position: relative;
    background: none;
    border: none;
    cursor: pointer;
}

.dark .nav-link {
    color: var(--gray-400);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--pure-black);
    transition: width var(--transition-smooth);
}

.dark .nav-link::after {
    background: var(--pure-white);
}

.nav-link:hover,
.nav-link.active {
    color: var(--pure-black);
    transform: translateY(-1px);
}

.dark .nav-link:hover,
.dark .nav-link.active {
    color: var(--pure-white);
}

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

/* Desktop Theme Toggle */
.nav-theme-toggle {
    background: transparent;
    border: 1px solid var(--gray-300);
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-smooth);
}

.dark .nav-theme-toggle {
    border-color: var(--gray-700);
}

.nav-theme-toggle:hover {
    border-color: var(--pure-black);
    transform: scale(1.05) rotate(180deg);
}

.dark .nav-theme-toggle:hover {
    border-color: var(--pure-white);
}

/* MAXIMUM SPECIFICITY CSS OVERRIDE FOR THEME TOGGLE ICONS */
.nav-theme-toggle svg,
.nav-theme-toggle i[data-lucide],
.nav-theme-toggle i,
.nav-theme-toggle [data-lucide],
.nav-theme-toggle .theme-icon-light,
.nav-theme-toggle .theme-icon-dark,
html .nav-theme-toggle svg,
html .nav-theme-toggle i[data-lucide],
html .nav-theme-toggle i,
html body .nav-theme-toggle svg,
html body .nav-theme-toggle i[data-lucide],
html body .nav-theme-toggle i {
    width: 20px !important;
    height: 20px !important;
    color: var(--pure-black) !important;
    fill: var(--pure-black) !important;
    stroke: var(--pure-black) !important;
    transition: all var(--transition-smooth) !important;
}

.dark .nav-theme-toggle svg,
.dark .nav-theme-toggle i[data-lucide],
.dark .nav-theme-toggle i,
.dark .nav-theme-toggle [data-lucide],
.dark .nav-theme-toggle .theme-icon-light,
.dark .nav-theme-toggle .theme-icon-dark,
html.dark .nav-theme-toggle svg,
html.dark .nav-theme-toggle i[data-lucide],
html.dark .nav-theme-toggle i,
html.dark body .nav-theme-toggle svg,
html.dark body .nav-theme-toggle i[data-lucide],
html.dark body .nav-theme-toggle i {
    color: var(--pure-white) !important;
    fill: var(--pure-white) !important;
    stroke: var(--pure-white) !important;
}

.theme-icon-light {
    display: block;
}

.theme-icon-dark {
    display: none;
}

.dark .theme-icon-light {
    display: none;
}

.dark .theme-icon-dark {
    display: block;
}

/* Mobile Navigation */
.nav-mobile-toggle {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: var(--space-sm);
    z-index: 1001;
}

.hamburger {
    width: 24px;
    height: 18px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.hamburger span {
    display: block;
    height: 2px;
    width: 100%;
    background: var(--pure-black);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.dark .hamburger span {
    background: var(--pure-white);
}

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

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

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

/* Mobile Menu Overlay */
.nav-mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 100vh;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(40px);
    z-index: 999;
    transform: translateY(-100%);
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.dark .nav-mobile-menu {
    background: rgba(0, 0, 0, 0.98);
}

.nav-mobile-menu.active {
    transform: translateY(0);
    visibility: visible;
}

.nav-mobile-content {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    height: 100%;
    padding-top: calc(80px + var(--space-xl));
    padding-bottom: var(--space-2xl);
    padding-left: var(--space-xl);
    padding-right: var(--space-xl);
    gap: var(--space-2xl);
}

.nav-mobile-links {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
    text-align: center;
    width: 100%;
}

.nav-mobile-link {
    color: var(--pure-black);
    text-decoration: none;
    font-size: var(--font-section-subtitle);
    font-weight: 400;
    letter-spacing: -0.01em;
    padding: var(--space-md) var(--space-lg);
    border-radius: 12px;
    transition: all var(--transition-smooth);
    width: 100%;
    max-width: 280px;
    background: rgba(0, 0, 0, 0.02);
}

.dark .nav-mobile-link {
    color: var(--pure-white);
    background: rgba(255, 255, 255, 0.02);
}

.nav-mobile-link:hover,
.nav-mobile-link.active {
    transform: translateY(-2px);
    background: rgba(0, 0, 0, 0.06);
}

.dark .nav-mobile-link:hover,
.dark .nav-mobile-link.active {
    background: rgba(255, 255, 255, 0.06);
}

.nav-mobile-theme {
    border-top: 1px solid var(--gray-200);
    padding-top: var(--space-xl);
}

.dark .nav-mobile-theme {
    border-top-color: var(--gray-800);
}

.nav-mobile-theme-toggle {
    background: transparent;
    border: 1px solid var(--gray-300);
    padding: var(--space-md) var(--space-lg);
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    cursor: pointer;
    transition: all var(--transition-smooth);
}

.dark .nav-mobile-theme-toggle {
    border-color: var(--gray-700);
}

.nav-mobile-theme-toggle:hover {
    border-color: var(--pure-black);
    transform: scale(1.05);
}

.dark .nav-mobile-theme-toggle:hover {
    border-color: var(--pure-white);
}

/* MAXIMUM SPECIFICITY CSS OVERRIDE FOR MOBILE THEME TOGGLE ICONS */
.nav-mobile-theme-toggle svg,
.nav-mobile-theme-toggle i[data-lucide],
.nav-mobile-theme-toggle i,
.nav-mobile-theme-toggle [data-lucide],
html .nav-mobile-theme-toggle svg,
html .nav-mobile-theme-toggle i[data-lucide],
html .nav-mobile-theme-toggle i,
html body .nav-mobile-theme-toggle svg,
html body .nav-mobile-theme-toggle i[data-lucide],
html body .nav-mobile-theme-toggle i {
    width: 20px !important;
    height: 20px !important;
    color: var(--pure-black) !important;
    fill: var(--pure-black) !important;
    stroke: var(--pure-black) !important;
}

.dark .nav-mobile-theme-toggle svg,
.dark .nav-mobile-theme-toggle i[data-lucide],
.dark .nav-mobile-theme-toggle i,
.dark .nav-mobile-theme-toggle [data-lucide],
html.dark .nav-mobile-theme-toggle svg,
html.dark .nav-mobile-theme-toggle i[data-lucide],
html.dark .nav-mobile-theme-toggle i,
html.dark body .nav-mobile-theme-toggle svg,
html.dark body .nav-mobile-theme-toggle i[data-lucide],
html.dark body .nav-mobile-theme-toggle i {
    color: var(--pure-white) !important;
    fill: var(--pure-white) !important;
    stroke: var(--pure-white) !important;
}

.theme-label {
    font-size: var(--font-small);
    color: var(--gray-600);
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.dark .theme-label {
    color: var(--gray-400);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .nav-desktop {
        display: none;
    }
    
    .nav-mobile-toggle {
        display: block;
    }
    
    .nav-content {
        padding: 0 var(--space-md);
    }
}
