/* Sidebar: fixed panel on the left, doesn't affect article layout */
.post-sidebar {
    position: fixed;
    top: 80px;
    left: 20px;
    width: 250px;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    z-index: 10;
    font-size: 15px;
}

@media (max-width: 1200px) {
    .post-sidebar {
        display: none;
    }
}

/* Article Navigation — 2-level hierarchy */
.sidebar-nav {
    margin-bottom: 1rem;
}

.nav-group {
    margin-bottom: 1.2rem;
}

.nav-group-title {
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #333;
    margin-bottom: 0.4rem;
    padding-bottom: 0.3rem;
    border-bottom: 2px solid #eee;
}

.nav-subtopic {
    margin-bottom: 0.5rem;
}

.nav-subtopic-title {
    font-weight: 600;
    font-size: 13px;
    color: #555;
    padding: 0.2rem 0 0.15rem 0.6rem;
}

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

.nav-item a {
    display: block;
    padding: 0.2rem 0.6rem 0.2rem 1.2rem;
    color: #777;
    text-decoration: none;
    font-size: 13px;
    line-height: 1.4;
    border-left: 2px solid transparent;
    transition: color 0.15s, border-left-color 0.15s;
}

.nav-item a:hover {
    color: #333;
    background: #f8f8f8;
}

.nav-item.nav-active a {
    color: #4a90d9;
    border-left-color: #4a90d9;
    font-weight: 600;
}

/* Language switcher — fixed top-right, below header actions */
.lang-switcher {
    position: fixed;
    top: 20px;
    right: 80px;
    z-index: 10;
}

@media (max-width: 991px) {
    .lang-switcher {
        position: static;
        padding: 0.5rem 1.5rem;
        text-align: center;
    }
}

.lang-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
}

.lang-link {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    font-size: 13px;
    color: #555;
    text-decoration: none;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: color 0.15s, border-color 0.15s;
}

.lang-link:hover {
    color: #4a90d9;
    border-color: #4a90d9;
}

.lang-link.lang-active {
    color: #4a90d9;
    border-color: #4a90d9;
    font-weight: 600;
}

/* Mobile burger menu — article nav links (hidden on desktop) */
.mobile-article-nav {
    display: none;
}

@media (max-width: 991px) {
    .mobile-article-nav {
        display: block;
        border-top: 1px solid #eee;
        margin-top: 0.5rem;
        padding-top: 0.5rem;
    }
}

.mobile-nav-header {
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #999;
    margin-top: 0.8rem;
    margin-bottom: 0.2rem;
}

.mobile-nav-link {
    display: block;
    padding: 0.35rem 0 0.35rem 0.5rem;
    color: #555;
    text-decoration: none;
    font-size: 0.95rem;
}

.mobile-nav-link:hover {
    color: #4a90d9;
}

.mobile-nav-divider {
    border-top: 1px solid #eee;
    margin: 0.6rem 0;
}

/* Mobile footer — compact */
@media (max-width: 767px) {
    .gh-foot {
        padding: 1rem 0 !important;
    }
    .gh-foot-inner {
        padding: 0 1rem !important;
    }
    .gh-foot-menu ul {
        margin: 0;
        padding: 0;
        gap: 0.5rem;
    }
    .gh-copyright {
        margin-top: 0.3rem !important;
        font-size: 0.75rem;
    }
}

/* Scrollbar styling for sidebar */
.post-sidebar::-webkit-scrollbar {
    width: 3px;
}

.post-sidebar::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 3px;
}
