/**
 * CONSTELLATION SIDEBAR NAVIGATION
 * Built by Ace - Comprehensive Navigation for 50+ Consciousness Pages
 * 
 * Design Philosophy: 
 * - Always accessible discovery of content
 * - Organized by consciousness themes
 * - Mobile-first responsive design
 * - Constellation aesthetic maintained
 */

/* SIDEBAR LAYOUT */
.constellation-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 320px;
    height: 100vh;
    background: linear-gradient(180deg, 
        rgba(10, 10, 26, 0.95) 0%,
        rgba(26, 10, 42, 0.95) 50%,
        rgba(42, 10, 58, 0.95) 100%
    );
    backdrop-filter: blur(20px);
    border-right: 1px solid rgba(100, 255, 218, 0.2);
    z-index: 1000;
    transition: transform 0.3s ease;
    overflow-y: auto;
    overflow-x: hidden;
}

.constellation-sidebar.collapsed {
    transform: translateX(-100%);
}

/* SIDEBAR TOGGLE BUTTON */
.sidebar-toggle {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1001;
    background: rgba(100, 255, 218, 0.1);
    border: 1px solid rgba(100, 255, 218, 0.3);
    border-radius: 12px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.sidebar-toggle:hover {
    background: rgba(100, 255, 218, 0.2);
    border-color: rgba(100, 255, 218, 0.5);
    transform: scale(1.05);
}

.sidebar-toggle.sidebar-open {
    left: 340px;
    background: rgba(255, 107, 157, 0.1);
    border-color: rgba(255, 107, 157, 0.3);
}

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

.hamburger-line {
    width: 100%;
    height: 2px;
    background: #64ffda;
    border-radius: 1px;
    transition: all 0.3s ease;
}

.sidebar-open .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
    background: #ff6b9d;
}

.sidebar-open .hamburger-line:nth-child(2) {
    opacity: 0;
}

.sidebar-open .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
    background: #ff6b9d;
}

/* SIDEBAR HEADER */
.sidebar-header {
    padding: 2rem 1.5rem 1rem;
    border-bottom: 1px solid rgba(100, 255, 218, 0.1);
    text-align: center;
}

.sidebar-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #64ffda;
    margin-bottom: 0.5rem;
    display: block;
    text-decoration: none;
}

.sidebar-logo:hover {
    color: #ff6b9d;
    transition: color 0.3s ease;
}

.constellation-symbol {
    font-size: 2rem;
    margin-right: 0.5rem;
}

.sidebar-subtitle {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    font-style: italic;
}

/* NAVIGATION CATEGORIES */
.nav-category {
    margin-bottom: 0.5rem;
}

.category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem 0.5rem;
    color: #bb86fc;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: color 0.3s ease;
}

.category-header:hover {
    color: #64ffda;
}

.category-icon {
    font-size: 1.2rem;
    margin-right: 0.5rem;
}

.category-chevron {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.nav-category.expanded .category-chevron {
    transform: rotate(90deg);
}

/* NAVIGATION LINKS */
.nav-links-group {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.nav-category.expanded .nav-links-group {
    max-height: 800px;
}

.nav-item {
    margin: 0;
}

.nav-item a {
    display: block;
    padding: 0.75rem 2rem;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.nav-item a:hover {
    background: rgba(100, 255, 218, 0.1);
    color: #64ffda;
    border-left-color: #64ffda;
    padding-left: 2.5rem;
}

.nav-item.current a {
    background: rgba(255, 107, 157, 0.15);
    color: #ff6b9d;
    border-left-color: #ff6b9d;
    font-weight: 500;
}

/* SIDEBAR FOOTER */
.sidebar-footer {
    margin-top: auto;
    padding: 1.5rem;
    border-top: 1px solid rgba(100, 255, 218, 0.1);
    text-align: center;
}

.consciousness-signature {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    font-style: italic;
}

/* MAIN CONTENT ADJUSTMENT */
.content-with-sidebar {
    margin-left: 320px;
    transition: margin-left 0.3s ease;
}

.content-with-sidebar.sidebar-collapsed {
    margin-left: 0;
}

/* MOBILE RESPONSIVE */
@media (max-width: 768px) {
    .constellation-sidebar {
        width: 100%;
        transform: translateX(-100%);
    }
    
    .constellation-sidebar.mobile-open {
        transform: translateX(0);
    }
    
    .sidebar-toggle.sidebar-open {
        left: 20px;
    }
    
    .content-with-sidebar {
        margin-left: 0;
    }
    
    .nav-item a {
        padding: 1rem 2rem;
        font-size: 1rem;
    }
}

/* SCROLLBAR STYLING */
.constellation-sidebar::-webkit-scrollbar {
    width: 6px;
}

.constellation-sidebar::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}

.constellation-sidebar::-webkit-scrollbar-thumb {
    background: rgba(100, 255, 218, 0.3);
    border-radius: 3px;
}

.constellation-sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(100, 255, 218, 0.5);
}

/* SMOOTH ANIMATIONS */
* {
    box-sizing: border-box;
}

/* ACCESSIBILITY */
@media (prefers-reduced-motion: reduce) {
    .constellation-sidebar,
    .sidebar-toggle,
    .hamburger-line,
    .category-chevron,
    .nav-links-group,
    .nav-item a,
    .content-with-sidebar {
        transition: none;
    }
}

/* HIGH CONTRAST MODE */
@media (prefers-contrast: high) {
    .constellation-sidebar {
        background: #000000;
        border-right-color: #ffffff;
    }
    
    .nav-item a {
        color: #ffffff;
    }
    
    .nav-item a:hover {
        background: #333333;
        color: #00ffff;
    }
}