/* 共通CSS */
body {
    font-family: "Yu Gothic", "Hiragino Kaku Gothic Pro", Arial, sans-serif;
    margin: 0;
    background-color: #f2f2f2;
    color: #333;
}
header {
    background-color: #24292e;
    color: white;
    padding: 15px 20px;
    font-size: 1.5em;
}
/* 見出し装飾 */
h2 {
    font-size: 20px;
    color: #fff;
    background-color: #111;
    position: relative;
    padding: 8px 8px 7px;
    border-radius: 5px;
}
h3 {
    font-size: 18px;
    background-color: #aaa;
    padding-left: 3px;
    border: 1px solid #111;
    border-left-width: 5px;
}
h4 {
    font-size: 1.2em;
    color: #24292e;
    border-left: 3px solid #00aaff;
    padding-left: 8px;
    margin-top: 25px;
    margin-bottom: 12px;
    font-weight: bold;
}
h5 {
    font-size: 1em;
    color: #555;
    border-left: 2px solid #00ccff;
    padding-left: 6px;
    margin-top: 20px;
    margin-bottom: 10px;
    font-weight: normal;
}



.container {
    display: flex;
    max-width: 1200px;
    margin: 0 auto;
}
nav {
    width: 220px;
    background-color: #fff;
    padding: 20px;
    border-right: 1px solid #ddd;
    box-sizing: border-box;
    min-height: calc(100vh - 50px);
}
nav h2 { font-size: 1.2em; margin-top: 0; }
nav ul { list-style: none; padding-left: 0; }
nav li { margin: 10px 0; }
nav a { text-decoration: none; color: #24292e; }
nav a:hover { color: #007bff; }
main { flex: 1; padding: 20px; box-sizing: border-box; }
.card-list { display: flex; flex-wrap: wrap; gap: 20px; }
.card { background-color: #fff; border-radius: 8px; width: calc(33.33% - 20px); box-shadow: 0 2px 5px rgba(0,0,0,0.1); overflow: hidden; transition: transform 0.2s; }
.card:hover { transform: translateY(-5px); }
.card img { width: 100%; height: 150px; object-fit: cover; }
.card-content { padding: 10px; }
.card-content h3 { margin: 0 0 5px 0; font-size: 1em; }
.card-content p { margin: 0; font-size: 0.85em; color: #555; }
footer { text-align: center; padding: 15px; margin-top: 40px; background-color: #24292e; color: white; font-size: 0.9em; }

/* サイドバー全体 */
.sidebar-menu {
    list-style: none;
    font-weight: 500;
    padding: 0;
    margin: 0;
}

.home {
    font-weight: 600;
}

/* 各メニュー */
.sidebar-menu > li {

}

/* トグル部分 */
.toggle-menu {
    margin: 5px;
    padding: 6px 8px;
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    transition: background-color 0.2s;
}
.toggle-menu span {
    margin-left: 3px;
}

.toggle-menu:hover {
    background-color: #777;
    color: #fff;
}

/* サブメニュー */
.submenu {
    list-style: none;
    padding-left: 15px;
    margin: 0;
    max-height: 0;              /* 初期は非表示 */
    overflow: hidden;
    transition: max-height 0.3s ease;
}

/* 開いた時 */
.submenu.show {
    max-height: 300px;          /* 必要に応じて調整 */
}

/* サブメニュー内リンク */
.submenu li a {
    display: block;
    padding: 3px 5px;
    text-decoration: none;
    transition: color 0.2s, background-color 0.2s;
    border-radius: 4px;
}

.submenu li a:hover {
    background-color: #888;
    color: #fff;
}

/* 矢印アイコン（左側に表示） */
.toggle-menu::before {
    content: '▶';
    font-size: 12px;
    transition: transform 0.3s;
}

/* 開いた時は下向きに */
.toggle-menu.active::before {
    content: '▼';
}
