/* ■■■ サイト全体のレイアウト ■■■ */
.site-wrapper {
    position: relative;
    overflow-x: hidden; /* 横スクロールを防止 */
}
/* メインコンテンツエリア */
.main-content {
    width: 100%;
    /* [重要] サイドバーに影響されないように、padding-leftを削除 */
    transition: filter 0.35s ease; /* 背景を暗くするアニメーション */
}

/* ■■■ サイドバー ■■■ */
.sidebar {
    width: 280px; /* 少し幅を広げて見やすく */
    background-color: #ffffff;
    padding: 20px;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000; /* 最前面に表示 */
    /* [重要] 最初は画面の左外に隠しておく */
    transform: translateX(-100%);
    transition: transform 0.35s ease;
    box-shadow: 0 0 30px rgba(0,0,0,0.2);
}
.sidebar-header { text-align: center; font-size: 1.5em; font-weight: bold; color: var(--primary-color); padding-bottom: 20px; margin-bottom: 20px; border-bottom: 1px solid var(--border-color); }
.sidebar-nav ul { list-style: none; padding: 0; margin: 0; }
.sidebar-nav li a { display: flex; align-items: center; padding: 12px 15px; text-decoration: none; color: #333; border-radius: 8px; font-weight: bold; margin-bottom: 5px; }
.sidebar-nav li a:hover { background-color: #f1f3f5; }
.sidebar-nav li a.active { background-color: var(--primary-color); color: white; }
.sidebar-nav li a i { margin-right: 12px; font-size: 1.2em; }

/* ■■■ ハンバーガーメニュー ■■■ */
.hamburger-menu {
    display: flex; /* 常に表示 */
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 1010; /* サイドバーより手前に表示 */
    background-color: var(--card-bg-color);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    justify-content: center;
    align-items: center;
    box-shadow: var(--shadow);
    transition: transform 0.35s ease;
}
.hamburger-menu i { font-size: 1.8em; }

/* ■■■ 背景を暗くするオーバーレイ ■■■ */
.content-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 999; /* サイドバーのすぐ後ろ */
    opacity: 0; visibility: hidden;
    transition: opacity 0.35s, visibility 0.35s;
}

/* ■■■ サイドバーが開いた時のスタイル (PC・スマホ共通) ■■■ */
body.sidebar-open .sidebar {
    transform: translateX(0); /* 画面内に表示 */
}
body.sidebar-open .content-overlay {
    opacity: 1; visibility: visible;
}