/*
Theme Name: My Test Theme 01
Author: Your Name
Description: 日本工学院再現プロジェクト
Version: 1.0
*/

/* 余計な隙間を消すための最小限のスタイル */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


/* =============================================
   3. 左右の固定メニュー (重なり・開閉対応)
   ============================================= */
/* --- 左サイドメニュー：垂直中央揃え --- */
.sticky-nav-left {
    position: fixed !important;
    top: 50% !important;           /* ★上から50%の位置へ */
    left: 0;
    width: 240px;
    z-index: 1100;
    
    /* 垂直中央補正（-50%）と、閉じている時の左隠し（-186px）を同時に指定 */
    transform: translateY(-50%) translateX(-186px) !important; 
    
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    cursor: pointer;
}

/* 開いた時：垂直中央を維持したままスライド */
.sticky-nav-left.is-open {
    transform: translateY(-50%) translateX(0) !important;
}

.index-panel {
    background: #fffff;
    border: 1px solid #ddd;
    border-radius: 0 15px 15px 0;
    box-shadow: 10px 0 30px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: background-color 0.4s ease;
}

/* open時のクールな青背景 */
.sticky-nav-left.is-open .index-panel {
    background: #0044cc !important;
}

/* ヘッダー部分（目次タブ） */
.index-header {
    background: #ffeb3b; 
    padding: 0 12px;
    height: 55px;
    display: flex;
    justify-content: flex-end; /* 閉じている時は「目次」を右端に */
    align-items: center;
}

.is-open .index-header {
    background: #0033aa;
    justify-content: space-between;
}

.header-title {
    font-size: 14px;
    font-weight: bold;
    color: #333;
    width: 50px; /* 文字が切れないよう幅を確保 */
    text-align: center;
}

.is-open .header-title {
    color: #fff;
    width: auto;
}

/* 閉じるボタンのデザイン */
.close-style {
    display: none; /* 初期は完全に非表示 */
    background: rgba(255,255,255,0.2);
    color: #fff;
    border: 1px solid #fff;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
}

.is-open .close-style {
    display: block; /* 開いた時だけ出現 */
}

/* 四角い番号アイコン（閉じている時：黄色） */
.nav-num {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 35px;
    height: 35px;
    background: #ffeb3b; /* ★ここを黄色に変更しました★ */
    color: #333;         /* 黄色背景に合わせて文字色は暗めに */
    font-weight: 900;
    font-size: 14px;
    border-radius: 6px;
    flex-shrink: 0;
    transition: background 0.3s, color 0.3s;
}

/* open時のアイコン色：白背景にピンク文字でクールに */
.is-open .nav-num {
    background: #fff;
    color: #e91e63;
}

/* リストアイテムの配置調整 */
.index-panel li {
    padding: 10px 15px;
    display: flex;
    justify-content: flex-end; /* 閉じている時は右（露出面）へ寄せる */
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.is-open .index-panel li {
    justify-content: flex-start;
    gap: 15px;
    color: #fff;
}

/* 閉じている時は文字を消す */
.nav-text { display: none; }
.is-open .nav-text { display: block; font-weight: bold; }

/* --- 右サイドメニュー：画面右端に完全固定 --- */
.sticky-nav-right {
    position: fixed !important; /* ★sticky から fixed に変更 */
    top: 50%;
    right: 0;                   /* ★画面の右端にぴったりつける */
    transform: translateY(-50%); /* 垂直中央に配置 */
    width: auto;
    z-index: 9999;

    /* 不要なマージンをリセット */
    margin-left: 0 !important;
}

.side-btn {
    display: block;
    writing-mode: vertical-rl;
    padding: 25px 15px;
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    font-size: 14px;
    border-radius: 10px 0 0 10px;
    margin-bottom: 2px;
    text-align: center;
}
.side-btn.pink { background: #ff3399; }
.side-btn.cyan { background: #00cccc; }