/* レイアウト - 左メニューとコンテナ */

/* 全体コンテナ */
.container-with-sidebar {
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
    gap: 2rem;
}

/* 左サイドバーメニュー */
.sidebar-menu {
    width: 280px;
    flex-shrink: 0;
    position: fixed;
    top: 140px; /* ヘッダー + サブナビの高さ分下げる */
    left: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    background-color: #fff;
    border: none;
    border-right: 1px solid #000;
    z-index: 1000;
    will-change: transform;
}

.sidebar-header {
    padding: 1.5rem 1rem 1rem;
    border-bottom: 2px solid #000;
    flex-shrink: 0;
}

.sidebar-title {
    font-size: 1.1rem;
    font-weight: bold;
    color: #000;
    text-decoration: none;
    display: block;
    border-bottom: none;
}

.sidebar-title:hover {
    text-decoration: underline;
}

/* スクロール可能なナビゲーション領域 */
.sidebar-nav-wrapper {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

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

.sidebar-nav > li {
    margin-bottom: 0.3rem;
    text-indent: 0;
}

/* トップページリンク */
.sidebar-nav .nav-top > a {
    display: block;
    padding: 0.5rem 0.75rem;
    color: #333;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.9rem;
    border-left: 3px solid transparent;
    border-bottom: none;
}

.sidebar-nav .nav-top.current > a {
    background-color: #f0f0f0;
    border-left-color: #000;
}

.sidebar-nav .nav-top > a:hover {
    text-decoration: underline;
}

/* カテゴリリンク */
.sidebar-nav .nav-category {
    margin-top: 0.5rem;
}

.sidebar-nav .nav-category > .category-link {
    display: block;
    padding: 0.5rem 0.75rem;
    color: #333;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.85rem;
    border-left: 3px solid transparent;
    border-bottom: none;
    transition: all 0.15s ease;
}

.sidebar-nav .nav-category > .category-link:hover {
    text-decoration: underline;
}

/* 現在のカテゴリ */
.sidebar-nav .nav-category.current-category > .category-link {
    background-color: #f0f0f0;
    border-left-color: #000;
}

/* カテゴリ内の論文リスト */
.sidebar-nav .paper-list {
    list-style: none;
    padding: 0;
    margin: 0.3rem 0 0.5rem 0.5rem;
    border-left: 1px solid #ddd;
}

.sidebar-nav .paper-list > li {
    margin-bottom: 0.2rem;
    text-indent: 0;
}

.sidebar-nav .paper-list > li > a {
    display: block;
    padding: 0.35rem 0.75rem;
    color: #444;
    text-decoration: none;
    font-size: 0.8rem;
    border-left: 2px solid transparent;
    border-bottom: none;
    margin-left: -1px;
    transition: all 0.15s ease;
}

.sidebar-nav .paper-list > li > a:hover {
    background-color: #f5f5f5;
    border-left-color: #999;
}

.sidebar-nav .paper-list > li > a.active {
    background-color: #e8e8e8;
    border-left-color: #000;
}

/* 外部リンク */
.sidebar-nav .nav-external {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #ddd;
}

.sidebar-nav .nav-external > a {
    display: block;
    padding: 0.5rem 0.75rem;
    color: #666;
    text-decoration: none;
    font-size: 0.85rem;
    border-bottom: none;
}

.sidebar-nav .nav-external > a:hover {
    color: #333;
    text-decoration: underline;
}

/* メインコンテンツエリア */
.main-content {
    margin-left: 300px;
    padding: 2rem 3rem;
    flex: 1;
    min-width: 0;
}

/* パンくずリスト */
.breadcrumbs {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 1.5rem;
}

.breadcrumbs a {
    color: #666;
    border-bottom: 1px solid #ccc;
}

.breadcrumbs a:hover {
    color: #000;
}
