/* ========================================
   ARTICLE SIDEBAR NAVIGATION STYLES
   ======================================== */

/* Mobile Header */
.mobile-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1001;
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    padding: 0;
    display: none;
}

.mobile-header-content {
    width: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.mobile-logo {
    width: 100%;
    padding: 16px;
    border-bottom: 1px solid #e5e7eb;
}

.mobile-logo a {
    text-decoration: none;
    display: inline-block;
    transition: opacity 0.2s ease;
}

.mobile-logo a:hover {
    opacity: 0.8;
}

.mobile-logo img {
    height: 24px;
    width: auto;
    filter: brightness(0);
}

.mobile-nav-section {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 16px;
}

/* Breadcrumbs */
.breadcrumbs {
    display: none;
}

.breadcrumb-list {
    display: flex;
    align-items: center;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 8px;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
}

.breadcrumb-link {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: #8e8c8c;
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb-link:hover {
    color: #000000;
}

.breadcrumb-separator {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: #d1d5db;
    margin: 0 4px;
}

.breadcrumb-current {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #8e8c8c;
}

/* Mobile Menu Toggle Button */
.mobile-menu-toggle-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: background-color 0.2s ease;
}

.mobile-menu-toggle-btn:hover {
    background: #f1f5f9;
}

.mobile-menu-toggle-btn svg {
    color: #1A1A1A;
}

/* Left Sidebar Navigation */
.left-sidebar-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    background: #ffffff;
    border-right: 1px solid #e5e7eb;
    z-index: 1000;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    transform: translateX(0);
    transition: transform 0.3s ease;
}

.sidebar-header {
    padding: 16px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-close-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    display: none;
    transition: background-color 0.2s ease;
}

.sidebar-close-btn:hover {
    background: #f1f5f9;
}

.sidebar-close-btn svg {
    color: #1A1A1A;
}

/* Mobile Overlay */
.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

/* Mobile Close Button (top right) */
.mobile-close-btn {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 1002;
    background: none;
    border: none;
    width: 24px;
    height: 24px;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mobile-close-btn:hover {
    opacity: 0.7;
}

.mobile-close-btn svg {
    color: #1A1A1A;
    width: 24px;
    height: 24px;
}

.logo a {
    text-decoration: none;
    display: inline-block;
    transition: opacity 0.2s ease;
}

.logo a:hover {
    opacity: 0.8;
}

.logo img {
    height: 24px;
    width: auto;
    filter: brightness(0);
}

.sidebar-content {
    flex: 1;
    padding: 20px 0;
}

.sidebar-footer {
    padding: 20px 0 0 0;
    border-top: 1px solid #e5e7eb;
}

.nav-section {
    margin-bottom: 32px;
}

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

.nav-section-title {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: #AFB7BE;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    padding: 0 20px 0 23px;
}

.nav-section-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-section-list li {
    margin-bottom: 2px;
}

.nav-item {
    display: block;
    padding: 10px 20px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: #1A1A1A;
    text-decoration: none;
    line-height: 1.5;
    transition: all 0.15s ease;
    border-left: 3px solid transparent;
}

.nav-item:hover {
    color: #000000;
    background: #F5F5F5;
}

.nav-item.active {
    color: #000000;
    font-weight: 500;
    background: rgba(0, 0, 0, 0.05);
    border-left-color: #000000;
}

/* Scrollbar styling - Hidden but functional */
.left-sidebar-nav::-webkit-scrollbar {
    width: 0px;
    background: transparent;
}

.left-sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
}

.left-sidebar-nav::-webkit-scrollbar-thumb {
    background: transparent;
}

.left-sidebar-nav::-webkit-scrollbar-thumb:hover {
    background: transparent;
}

/* Firefox scrollbar hiding */
.left-sidebar-nav {
    scrollbar-width: none;
}

/* Main content offset for sidebar */
.main-content {
    margin-left: auto;
    margin-right: auto;
    min-height: 100vh;
    padding-top: 0;
    padding-left: 280px;
    padding-right: 280px;
    max-width: calc(1200px + 280px + 280px);
    padding-bottom: 104px;
    color: #000;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-x: hidden;
}

.medium-article {
    padding-top: 0;
    max-width: 720px;
    margin: 0 auto;
    padding-left: 0;
    padding-right: 0;
}

/* Article header padding */
.article-header {
    padding-top: 64px;
}

/* ========================================
   ARTICLE SIDEBAR NAVIGATION (RIGHT)
   ======================================== */

/* Sidebar Navigation - Documentation Style */
.article-sidebar-nav {
    position: fixed;
    top: 0;
    right: 0;
    width: 280px;
    height: 100vh;
    background: #ffffff;
    z-index: 1000;
    overflow-y: auto;
    scrollbar-width: none;
    display: flex;
    flex-direction: column;
}

.article-sidebar-nav::-webkit-scrollbar {
    width: 0px;
    background: transparent;
}

.article-sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
}

.article-sidebar-nav::-webkit-scrollbar-thumb {
    background: transparent;
}

.article-sidebar-nav::-webkit-scrollbar-thumb:hover {
    background: transparent;
}

/* Right sidebar content wrapper (similar to sidebar-content) */
.article-sidebar-nav .nav-list {
    flex: 1;
    padding: 80px 0 20px 0;
    list-style: none;
    margin: 0;
}

.article-sidebar-nav .nav-list li {
    margin-bottom: 2px;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    padding: 6px 8px;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 400;
    color: #1A1A1A;
    text-decoration: none;
    line-height: 1.4;
    border-radius: 9999px;
    transition: all 0.15s ease;
    margin-left: 20px;
    margin-right: 20px;
}

.nav-link:hover {
    color: #000000;
    background: #F5F5F5;
}

.nav-link.active {
    color: #000000;
    font-weight: 500;
    background: rgba(0, 0, 0, 0.05);
    padding-left: 10px;
}

/* Section spacing for better navigation experience */
.article-section[id] {
    padding-top: 0;
}

.article-section[id]:first-of-type {
    padding-top: 0;
}

/* ========================================
   RESPONSIVE STYLES
   ======================================== */

/* Mobile Responsive */
@media (max-width: 767px) {
    .mobile-header {
        display: block;
    }
    
    .left-sidebar-nav {
        transform: translateX(-100%);
    }
    
    .left-sidebar-nav.mobile-open {
        transform: translateX(0);
    }
    
    .mobile-overlay {
        display: block;
    }
    
    .mobile-close-btn {
        display: flex;
    }
    
    .sidebar-close-btn {
        display: none;
    }
    
    .breadcrumbs {
        display: block;
    }
}

/* Desktop Navigation (768px+) */
@media (min-width: 768px) {
    .main-content {
        padding-left: 280px;
        padding-right: 280px;
        margin-left: auto;
        margin-right: auto;
    }
}

/* Mobile Navigation (до 767px) */
@media (max-width: 767px) {
    .main-content {
        padding-top: 80px; /* Height of mobile header */
        padding-left: 16px;
        padding-right: 16px;
        margin-left: 0;
    }
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .mobile-header {
        display: flex;
    }
    
    .breadcrumbs {
        display: block;
    }
    
    .left-sidebar-nav {
        transform: translateX(-100%);
        top: 0;
        height: 100vh;
        z-index: 1001;
        transition: transform 0.3s ease;
    }
    
    .left-sidebar-nav.mobile-open {
        transform: translateX(0);
    }
    
    .mobile-overlay {
        display: block;
    }
    
    .mobile-close-btn {
        display: flex;
    }
    
    .main-content {
        margin-left: auto;
        margin-right: auto;
        padding-left: 0;
        padding-right: 0;
        padding-top: 80px;
        max-width: none;
    }
    
    .medium-article {
        max-width: 100%;
        padding-left: 16px;
        padding-right: 16px;
    }
    
    .article-sidebar-nav {
        display: none;
    }
    
    .article-section[id] {
        padding-top: 0;
    }
    
    .article-header {
        margin-top: 64px;
    }
}

/* Hide right sidebar on smaller screens */
@media (max-width: 1200px) {
    .article-sidebar-nav {
        display: none;
    }
    
    .main-content {
        padding-right: 0;
        max-width: calc(1200px + 280px);
    }
    
    .medium-article {
        max-width: 100%;
        padding-left: 20px;
        padding-right: 20px;
    }
}

