/* ========================================
   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;
    transition: background 0.3s ease, border-color 0.3s ease;
}

/* Темная тема - мобильный хедер */
[data-theme="dark"] .mobile-header,
html[data-theme="dark"] .mobile-header,
body[data-theme="dark"] .mobile-header {
    background: #111111 !important;
    background-color: #111111 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.mobile-header-content {
    width: 100%;
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    gap: 12px;
}

.mobile-logo {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

/* Размер шрифта установлен на 20px - синхронизация с прелоадером */
.mobile-logo a {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 2px;
    transition: opacity 0.2s ease;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: #111;
    line-height: 1.2;
    letter-spacing: -0.01em;
}

/* Темная тема - цвет логотипа в мобильном хедере */
[data-theme="dark"] .mobile-logo a,
html[data-theme="dark"] .mobile-logo a,
body[data-theme="dark"] .mobile-logo a {
    color: #FFFFFF !important;
}

/* Иконка Trngl слева от мобильного логотипа */
.mobile-logo-icon {
    display: block;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    transition: filter 0.3s ease;
}

/* Темная тема - SVG логотип треугольник (перекрашиваем в белый) */
[data-theme="dark"] .mobile-logo-icon {
    filter: brightness(0) saturate(100%) invert(1) !important;
}

/* Газетный стиль ховера - строгое изменение без подчеркивания */
.mobile-logo a:hover {
    opacity: 0.8;
}

/* Скрываем старый логотип-изображение, но показываем иконку */
.mobile-logo img:not(.mobile-logo-icon) {
    display: none !important;
}

.mobile-nav-section {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    justify-content: center;
    position: relative;
}

.mobile-nav-section .breadcrumbs {
    position: relative;
    left: auto;
    transform: none;
    flex: 0 0 auto;
}

.mobile-nav-section .mobile-menu-toggle-btn {
    margin-left: auto;
    flex: 0 0 auto;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 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;
}

/* Газетный стиль для breadcrumbs на мобильных и планшетах */
@media (max-width: 1024px) {
    .breadcrumb-link {
        font-family: var(--font-editorial, 'Libre Baskerville', 'Playfair Display', Georgia, serif) !important;
        font-size: 13px !important;
        font-weight: 400 !important;
        color: #666 !important;
        text-decoration: none !important;
        letter-spacing: 0 !important;
        text-transform: none !important;
    }
    
    .breadcrumb-link:hover {
        color: #000000 !important;
        text-decoration: none !important;
    }
    
    .breadcrumb-separator {
        font-family: var(--font-editorial, 'Libre Baskerville', 'Playfair Display', Georgia, serif) !important;
        font-size: 13px !important;
        color: #999 !important;
        margin: 0 6px !important;
    }
    
    .breadcrumb-current {
        font-family: var(--font-editorial, 'Libre Baskerville', 'Playfair Display', Georgia, serif) !important;
        font-size: 13px !important;
        font-weight: 400 !important;
        color: #000000 !important;
        letter-spacing: 0 !important;
    }
    
    .breadcrumb-list {
        gap: 0 !important;
    }
}

/* 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;
    stroke: #1A1A1A;
}

/* Темная тема - иконка меню в мобильном хедере */
[data-theme="dark"] .mobile-menu-toggle-btn svg,
html[data-theme="dark"] .mobile-menu-toggle-btn svg,
body[data-theme="dark"] .mobile-menu-toggle-btn svg {
    color: #FFFFFF !important;
    stroke: #FFFFFF !important;
}

/* Темная тема - hover для кнопки меню */
[data-theme="dark"] .mobile-menu-toggle-btn:hover,
html[data-theme="dark"] .mobile-menu-toggle-btn:hover,
body[data-theme="dark"] .mobile-menu-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.1) !important;
}

/* Left Sidebar Navigation */
.left-sidebar-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    background: transparent;
    border-right: 1px solid var(--color-sidebar-border, #e5e7eb);
    z-index: 1000;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    transform: translateX(0);
    transition: border-color 0.3s ease, 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: 999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.mobile-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* 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;
}

/* Размер шрифта уменьшен на 8px: 28px -> 20px */
.logo a {
    text-decoration: none;
    display: inline-block;
    transition: opacity 0.2s ease;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
    font-size: 20px !important;
    font-weight: 700 !important;
    color: #111 !important;
    line-height: 1.2 !important;
    letter-spacing: -0.01em !important;
}

/* Газетный стиль ховера - строгое изменение без подчеркивания */
.logo a:hover {
    opacity: 0.8;
}

.logo img {
    height: 24px;
    width: auto;
    filter: brightness(0) saturate(100%);
    opacity: 0.9;
}

.sidebar-content {
    flex: 1;
    padding: 20px 0;
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

/* Переопределение padding-top для левого меню - синхронизация с прелоадером */
/* Прелоадер top: 68px → Сайдбар padding-top: 68px */
.left-sidebar-nav .sidebar-content {
    padding-top: 68px !important;
}

.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;
    transition: none;
}

/* Активный пункт навигации - выделяется серым фоном */
.nav-item.active {
    color: #000000 !important;
    font-weight: 500 !important;
    background: #F5F5F5 !important;
    border-left: 3px solid #000000 !important;
    transition: background 0.15s ease;
}

/* Для левой навигации убираем border-left, padding как у .nav-item (6px 8px), чтобы активный не сдвигался вправо */
.left-sidebar-nav .nav-item.active {
    color: #000000 !important;
    font-weight: 500 !important;
    background: #F5F5F5 !important;
    border-left: none !important;
    padding-left: 6px !important;
    transition: background 0.15s ease;
}

/* Исправление цвета nav-badge - чёрный цвет типографики */
.nav-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 8px;
    padding: 4px 8px;
    font-family: 'Inter', sans-serif;
    font-size: 10px;
    font-weight: 600;
    line-height: 1;
    color: #FFFFFF;
    background: #000000;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    vertical-align: middle;
    min-height: 18px;
    box-sizing: border-box;
}

/* Темная тема - nav-badge (инвертируем цвета: светлый фон, темный текст) */
[data-theme="dark"] .nav-badge,
[data-theme="dark"] .left-sidebar-nav .nav-badge,
[data-theme="dark"] .article-sidebar-nav .nav-badge {
    color: #000000 !important;
    background: #FFFFFF !important;
}

/* 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: 688px;
    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: transparent;
    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: var(--color-text, #1A1A1A);
    text-decoration: none;
    line-height: 1.4;
    border-radius: 9999px;
    transition: color 0.3s ease, background-color 0.2s ease;
    margin-left: 20px;
    margin-right: 20px;
}

/* Газетный стиль ховера - строгое изменение без подчеркивания */
.nav-link:hover {
    color: var(--color-text, #000000);
    background: var(--color-bg-secondary, #F5F5F5);
    transition: background-color 0.2s ease;
}

.nav-link.active {
    color: var(--color-text, #000000);
    font-weight: 500;
    background: var(--color-bg-secondary, #F5F5F5);
    padding-left: 10px;
    transition: background-color 0.15s ease, color 0.3s ease;
}

/* 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 {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        height: 100dvh;
        background: #FFFFFF;
        z-index: 999999 !important;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), background 0.3s ease;
        overflow-y: auto;
        overflow-x: hidden;
        border-right: none;
        display: flex;
        flex-direction: column;
        box-shadow: none;
    }
    
    /* Темная тема - фон открытого мобильного меню */
    [data-theme="dark"] .left-sidebar-nav.mobile-open,
    html[data-theme="dark"] .left-sidebar-nav.mobile-open,
    body[data-theme="dark"] .left-sidebar-nav.mobile-open {
        background: #111111 !important;
        background-color: #111111 !important;
    }
    
    .left-sidebar-nav.mobile-open {
        transform: translateX(0) !important;
        z-index: 999999 !important;
    }
    
    .left-sidebar-nav.mobile-open {
        transform: translateX(0);
    }
    
    .mobile-overlay {
        display: none;
    }
    
    .mobile-close-btn {
        display: none !important;
    }
    
    .left-sidebar-nav.mobile-open .mobile-close-btn {
        display: flex !important;
        position: fixed;
        top: 24px;
        right: 24px;
        z-index: 1000000 !important;
        background: transparent;
        border: none;
        width: 40px;
        height: 40px;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        border-radius: 8px;
        transition: background-color 0.2s ease;
        padding: 0;
    }
    
    /* Газетный стиль ховера - строгое изменение без подчеркивания */
    .left-sidebar-nav.mobile-open .mobile-close-btn:hover {
        background: rgba(0, 0, 0, 0.05);
    }
    
    .left-sidebar-nav.mobile-open .mobile-close-btn svg {
        width: 24px;
        height: 24px;
        stroke: #1A1A1A;
        stroke-width: 1.5;
    }
    
    /* Темная тема - кнопка закрытия в мобильном меню */
    [data-theme="dark"] .left-sidebar-nav.mobile-open .mobile-close-btn svg,
    html[data-theme="dark"] .left-sidebar-nav.mobile-open .mobile-close-btn svg,
    body[data-theme="dark"] .left-sidebar-nav.mobile-open .mobile-close-btn svg {
        stroke: #FFFFFF !important;
    }
    
    [data-theme="dark"] .left-sidebar-nav.mobile-open .mobile-close-btn:hover,
    html[data-theme="dark"] .left-sidebar-nav.mobile-open .mobile-close-btn:hover,
    body[data-theme="dark"] .left-sidebar-nav.mobile-open .mobile-close-btn:hover {
        background: rgba(255, 255, 255, 0.1) !important;
    }
    
    .sidebar-close-btn {
        display: none;
    }
    
    .breadcrumbs {
        display: block;
    }
    
    /* Стили для мобильного меню в стиле Navorina */
    .left-sidebar-nav.mobile-open .sidebar-content {
        padding: 0 !important;
        max-width: 100% !important;
        width: 100% !important;
        flex: 1;
        display: flex !important;
        flex-direction: column !important;
    }
    
    .left-sidebar-nav.mobile-open .sidebar-logo {
        margin: 0 !important;
        padding: 24px 24px 32px 24px !important;
        margin-bottom: 0 !important;
        margin-left: 0 !important;
        border-bottom: none !important;
        font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
        font-size: 20px !important;
        font-weight: 700 !important;
        color: #111 !important;
        line-height: 1.2 !important;
        letter-spacing: -0.01em !important;
        display: flex !important;
        align-items: center !important;
        gap: 0px !important;
    }
    
    .left-sidebar-nav.mobile-open .sidebar-logo a {
        display: flex !important;
        align-items: center !important;
        gap: 0px !important;
        color: #111 !important;
        text-decoration: none !important;
        font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
        font-size: 20px !important;
        font-weight: 700 !important;
        line-height: 1.2 !important;
        letter-spacing: -0.01em !important;
    }
    
    /* Стили для текста внутри логотипа - синхронизация с дефолтным */
    .left-sidebar-nav.mobile-open .sidebar-logo,
    .left-sidebar-nav.mobile-open .sidebar-logo * {
        font-size: 20px !important;
        font-weight: 700 !important;
        font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
        line-height: 1.2 !important;
        letter-spacing: -0.01em !important;
    }
    
    /* Иконка логотипа в мобильном меню - синхронизация с дефолтным */
    .left-sidebar-nav.mobile-open .sidebar-logo-icon {
        display: block !important;
        width: 20px !important;
        height: 20px !important;
        flex-shrink: 0 !important;
        transition: filter 0.3s ease !important;
    }
    
    /* Темная тема - SVG логотип треугольник (перекрашиваем в белый) */
    [data-theme="dark"] .left-sidebar-nav.mobile-open .sidebar-logo-icon,
    html[data-theme="dark"] .left-sidebar-nav.mobile-open .sidebar-logo-icon,
    body[data-theme="dark"] .left-sidebar-nav.mobile-open .sidebar-logo-icon {
        filter: brightness(0) saturate(100%) invert(1) !important;
    }
    
    /* Скрываем старые изображения, но показываем иконку */
    .left-sidebar-nav.mobile-open .sidebar-logo img:not(.sidebar-logo-icon) {
        display: none !important;
    }
    
    /* Темная тема - логотип в мобильном меню */
    [data-theme="dark"] .left-sidebar-nav.mobile-open .sidebar-logo,
    [data-theme="dark"] .left-sidebar-nav.mobile-open .sidebar-logo a,
    html[data-theme="dark"] .left-sidebar-nav.mobile-open .sidebar-logo,
    html[data-theme="dark"] .left-sidebar-nav.mobile-open .sidebar-logo a,
    body[data-theme="dark"] .left-sidebar-nav.mobile-open .sidebar-logo,
    body[data-theme="dark"] .left-sidebar-nav.mobile-open .sidebar-logo a {
        color: #FFFFFF !important;
    }
    
    .left-sidebar-nav.mobile-open .nav-section {
        margin: 0 !important;
        padding: 0 !important;
        flex: 1;
        display: flex !important;
        flex-direction: column !important;
    }
    
    .left-sidebar-nav.mobile-open .nav-section-list {
        list-style: none !important;
        padding: 0 !important;
        margin: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 0 !important;
        width: 100% !important;
        flex: 1;
    }
    
    .left-sidebar-nav.mobile-open .nav-section-list li {
        margin: 0 !important;
        padding: 0 !important;
        border-bottom: 1px solid #F0F0F0 !important;
        list-style: none !important;
        border-radius: 0 !important;
    }
    
    /* Темная тема - разделители в мобильном меню */
    [data-theme="dark"] .left-sidebar-nav.mobile-open .nav-section-list li,
    html[data-theme="dark"] .left-sidebar-nav.mobile-open .nav-section-list li,
    body[data-theme="dark"] .left-sidebar-nav.mobile-open .nav-section-list li {
        border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
        border-radius: 0 !important;
    }
    
    /* Убираем закругление у всех элементов навигации в мобильном меню */
    .left-sidebar-nav.mobile-open .nav-item,
    [data-theme="dark"] .left-sidebar-nav.mobile-open .nav-item,
    html[data-theme="dark"] .left-sidebar-nav.mobile-open .nav-item,
    body[data-theme="dark"] .left-sidebar-nav.mobile-open .nav-item {
        border-radius: 0 !important;
        padding-left: 24px !important;
        margin-left: 0 !important;
    }
    
    /* Переопределяем padding-left для активного элемента - убираем лишний отступ */
    .left-sidebar-nav.mobile-open .nav-item.active,
    html[data-theme="dark"] .left-sidebar-nav.mobile-open .nav-item.active,
    body[data-theme="dark"] .left-sidebar-nav.mobile-open .nav-item.active {
        padding-left: 24px !important;
        padding-right: 24px !important;
        margin-left: 0 !important;
    }
    
    .left-sidebar-nav.mobile-open .nav-section-list li:last-child {
        border-bottom: none !important;
    }
    
    .left-sidebar-nav.mobile-open .nav-item {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        padding: 20px 24px !important;
        font-family: 'Inter', sans-serif !important;
        font-size: 16px !important;
        font-weight: 400 !important;
        color: #1A1A1A !important;
        text-decoration: none !important;
        line-height: 1.5 !important;
        transition: color 0.15s ease, background 0.15s ease !important;
        border-left: none !important;
        background: transparent !important;
        position: relative !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    /* Темная тема - элементы навигации в мобильном меню */
    [data-theme="dark"] .left-sidebar-nav.mobile-open .nav-item,
    html[data-theme="dark"] .left-sidebar-nav.mobile-open .nav-item,
    body[data-theme="dark"] .left-sidebar-nav.mobile-open .nav-item {
        color: #FFFFFF !important;
    }
    
    [data-theme="dark"] .left-sidebar-nav.mobile-open .nav-item:hover,
    html[data-theme="dark"] .left-sidebar-nav.mobile-open .nav-item:hover,
    body[data-theme="dark"] .left-sidebar-nav.mobile-open .nav-item:hover {
        background: rgba(255, 255, 255, 0.05) !important;
        color: #FFFFFF !important;
    }
    
    [data-theme="dark"] .left-sidebar-nav.mobile-open .nav-item.active,
    html[data-theme="dark"] .left-sidebar-nav.mobile-open .nav-item.active,
    body[data-theme="dark"] .left-sidebar-nav.mobile-open .nav-item.active {
        background: rgba(255, 255, 255, 0.08) !important;
        background-color: rgba(255, 255, 255, 0.08) !important;
        color: #FFFFFF !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding: 20px 24px !important;
        padding-left: 24px !important;
        margin-left: 0 !important;
    }
    
    .left-sidebar-nav.mobile-open .nav-item::after {
        content: '' !important;
        width: 16px !important;
        height: 16px !important;
        background-image: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6 12L10 8L6 4' stroke='%23C4C4C4' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
        background-repeat: no-repeat !important;
        background-position: center !important;
        background-size: contain !important;
        margin-left: auto !important;
        transition: transform 0.2s ease, filter 0.2s ease !important;
        flex-shrink: 0 !important;
    }
    
    /* Темная тема - стрелка по умолчанию должна быть белой */
    [data-theme="dark"] .left-sidebar-nav.mobile-open .nav-item::after,
    html[data-theme="dark"] .left-sidebar-nav.mobile-open .nav-item::after,
    body[data-theme="dark"] .left-sidebar-nav.mobile-open .nav-item::after {
        background-image: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6 12L10 8L6 4' stroke='%23FFFFFF' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
    }
    
    .left-sidebar-nav.mobile-open .nav-item:hover {
        color: #000000 !important;
        background: #F5F5F5 !important;
    }
    
    .left-sidebar-nav.mobile-open .nav-item:hover::after {
        transform: translateX(4px) !important;
        background-image: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6 12L10 8L6 4' stroke='%231A1A1A' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
    }
    
    .left-sidebar-nav.mobile-open .nav-item.active {
        color: #000000 !important;
        font-weight: 500 !important;
        background: #F5F5F5 !important;
        border-left: none !important;
        border-radius: 0 !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding: 20px 24px !important;
        padding-left: 24px !important;
        margin-left: 0 !important;
    }
    
    .left-sidebar-nav.mobile-open .nav-item.active::after {
        background-image: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6 12L10 8L6 4' stroke='%231A1A1A' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
    }
    
    /* Темная тема - стрелка активного элемента должна быть белой */
    [data-theme="dark"] .left-sidebar-nav.mobile-open .nav-item.active::after,
    html[data-theme="dark"] .left-sidebar-nav.mobile-open .nav-item.active::after,
    body[data-theme="dark"] .left-sidebar-nav.mobile-open .nav-item.active::after {
        background-image: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6 12L10 8L6 4' stroke='%23FFFFFF' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
    }

    .left-sidebar-nav.mobile-open .nav-badge {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        margin-left: 8px;
        padding: 4px 8px;
        font-family: 'Inter', sans-serif;
        font-size: 10px;
        font-weight: 600;
        line-height: 1;
        color: #FFFFFF;
        background: #000000;
    }
    
    /* Темная тема - nav-badge в мобильном меню */
    [data-theme="dark"] .left-sidebar-nav.mobile-open .nav-badge {
        color: #000000 !important;
        background: #FFFFFF !important;
        border-radius: 12px;
    }
    
    /* Темная тема - активные элементы навигации в мобильном меню */
    [data-theme="dark"] .left-sidebar-nav.mobile-open .nav-item:hover,
    [data-theme="dark"] .left-sidebar-nav.mobile-open .nav-item.active {
        background: rgba(255, 255, 255, 0.08) !important;
        border-radius: 0 !important;
    }
    
    /* Исправление закругления - убираем асимметричное закругление */
    [data-theme="dark"] .left-sidebar-nav.mobile-open .nav-item.active,
    html[data-theme="dark"] .left-sidebar-nav.mobile-open .nav-item.active,
    body[data-theme="dark"] .left-sidebar-nav.mobile-open .nav-item.active {
        border-radius: 0 !important;
    }
    
    /* Темная тема - стрелка при hover */
    [data-theme="dark"] .left-sidebar-nav.mobile-open .nav-item:hover::after,
    html[data-theme="dark"] .left-sidebar-nav.mobile-open .nav-item:hover::after,
    body[data-theme="dark"] .left-sidebar-nav.mobile-open .nav-item:hover::after {
        background-image: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6 12L10 8L6 4' stroke='%23FFFFFF' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
    }
}

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

/* iPad (768px - 1023px): 1024 = десктоп, лого и сайдбар как на 1025+ */
@media (min-width: 768px) and (max-width: 1023px) {
    .left-sidebar-nav {
        width: 200px !important;
    }
    
    /* Уменьшаем отступы внутри сайдбара */
    .left-sidebar-nav .sidebar-content {
        padding-left: 20px !important;
        padding-right: 0 !important;
    }
    
    .left-sidebar-nav .sidebar-logo {
        margin-left: 0 !important;
        padding-left: 0 !important;
    }
    
    .left-sidebar-nav .nav-section-list {
        margin-left: 0 !important;
        padding-right: 0 !important;
    }
    
    .left-sidebar-nav .nav-section-title {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    
    .left-sidebar-nav .nav-item {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    
    .main-content {
        padding-left: 200px !important;
        padding-right: 40px !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        max-width: 100% !important;
    }
    
    .medium-article {
        max-width: 100% !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
}

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

/* Mobile responsiveness */
@media (max-width: 768px) {
    .mobile-header {
        display: block;
    }
    
    .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;
    }
}

