/* ============================================
   内容页样式
   ============================================ */

.content-section {
    background: var(--bg);
}

.content-container {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 30px;
    align-items: start;
}

/* --- Article Content --- */
.article-content {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    padding: 32px;
}

.article-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
    line-height: 1.4;
}

.article-meta {
    display: flex;
    gap: 20px;
    font-size: 0.85rem;
    color: var(--text-light);
    padding-bottom: 20px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border);
}

.article-body {
    font-size: 0.95rem;
    line-height: 1.8;
    color: var(--text-primary);
}

.article-body h2 {
    font-size: 1.15rem;
    font-weight: 600;
    margin-top: 28px;
    margin-bottom: 12px;
    color: var(--primary-dark);
    padding-left: 12px;
    border-left: 3px solid var(--primary);
}

.article-body p {
    margin-bottom: 14px;
}

.article-body strong {
    color: var(--text-primary);
}
.article-body p img {
    margin: 0 auto;
}
/* --- Article Navigation (Prev/Next) --- */
.article-nav {
    display: flex;
    gap: 16px;
    margin-top: 28px;
}

.nav-prev, .nav-next {
    flex: 1;
    display: flex;
    align-items: center;
    padding: 16px 20px;
    background: var(--bg-white);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    transition: var(--transition);
    overflow: hidden;
    position: relative;
}

.nav-prev::before, .nav-next::before {
    content: '';
    position: absolute;
    top: 0;
    width: 3px;
    height: 100%;
    background: var(--primary);
    transition: var(--transition);
}

.nav-prev::before {
    left: 0;
}

.nav-next::before {
    right: 0;
}

.nav-prev:hover, .nav-next:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-lighter);
}

.nav-prev:hover::before, .nav-next:hover::before {
    height: 100%;
}

.nav-arrow {
    font-size: 1.25rem;
    color: var(--primary);
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.nav-prev:hover .nav-arrow {
    transform: translateX(-4px);
}

.nav-next:hover .nav-arrow {
    transform: translateX(4px);
}

.nav-label {
    font-size: 0.75rem;
    color: var(--text-light);
    margin: 0 8px;
    white-space: nowrap;
}

.nav-title {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
}

.nav-prev {
    justify-content: flex-start;
}

.nav-next {
    justify-content: flex-end;
}


/* --- Sidebar --- */
.sidebar {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    padding: 24px;
    position: sticky;
    top: calc(var(--header-height) + 16px);
}

.sidebar-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--primary);
    color: var(--text-primary);
}

.sidebar-nav li {
    margin-bottom: 2px;
}

.sidebar-nav a {
    display: block;
    padding: 10px 14px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    transition: var(--transition);
    position: relative;
}

.sidebar-nav a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0;
    background: var(--primary);
    border-radius: 2px;
    transition: height 0.3s ease;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    background: var(--primary-lighter);
    color: var(--primary);
}

.sidebar-nav a:hover::before,
.sidebar-nav a.active::before {
    height: 60%;
}

/* ============================================
   Responsive - Tablet (≤960px)
   ============================================ */
@media (max-width: 960px) {
    .content-container {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
        margin-bottom: 20px;
    }

    .sidebar-nav {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }

    .sidebar-nav li {
        margin-bottom: 0;
    }

    .sidebar-nav a {
        padding: 6px 12px;
        font-size: 0.85rem;
        background: var(--bg);
        border-radius: 20px;
    }

    .sidebar-nav a::before {
        display: none;
    }

    .sidebar-nav a:hover,
    .sidebar-nav a.active {
        background: var(--primary-lighter);
    }

    .sidebar-title {
        margin-bottom: 12px;
        padding-bottom: 8px;
    }

    .article-content {
        padding: 24px;
    }
}

/* ============================================
   Responsive - Mobile (≤640px)
   ============================================ */
@media (max-width: 640px) {
    .article-content {
        padding: 18px;
    }

    .article-title {
        font-size: 1.25rem;
    }

    .article-meta {
        flex-wrap: wrap;
        gap: 10px;
    }

    .article-body h2 {
        font-size: 1.05rem;
    }

    .article-nav {
        flex-direction: column;
        gap: 12px;
    }

    .nav-prev, .nav-next {
        padding: 14px 16px;
    }

    .nav-title {
        font-size: 0.85rem;
    }
}