/* ナビゲーションリンクの表示崩れを防ぐ */
.sidebar a {
    display: flex;
    align-items: center;
    position: relative;
    /* インジケータの配置を正しくする */
    padding: 10px 20px;
    /* インジケータの余白確保 */
    text-decoration: none;
    color: #333;
    font-size: 16px;
    border-bottom: 1px solid #ddd;
    transition: all 0.3s;

}

/* インジケータの基本スタイル */
.sidebar a::before {
    content: "●";
    color: transparent;
    position: absolute;
    left: -18px;
    font-size: 16px;
    display: block;
    opacity: 0;
    /* 初期状態では非表示 */
    transform: translateX(-5px);
    /* 少し左にずらす */
    transition: opacity 0.6s ease-in-out, transform 0.6s ease-in-out;
    /* 時間を長くしてゆっくり */
    z-index: 10;

}

/* アクティブなナビゲーション項目（現在のセクション） */
.sidebar a.active::before {

    color: #ecc998;
    opacity: 1;
    /* フェードイン */
    transform: translateX(0);
    /* 左からスライドイン */
}




/* サイドバー（PC用） */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 16%;
    height: 100vh;
    padding: 2vh;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    /* これを追加！ */

    background: linear-gradient(to right, #ffffff, #ffffff);
    background-repeat: repeat;
    background-position: center;
    line-height: 1.2;
    justify-content: space-between;
    z-index: 100;
    /* 背景画像より前に表示 */
}

@media (min-width: 1025px) {
    .sidebar a {
        display: block;
        text-decoration: none;
        color: #4d4d4d;
        padding: 0.8vh 1vh;
        border-bottom: 1px solid #d1d1d1;
        transition: all 0.3s;
    }
}

@media (min-width: 1440px) {

    .sidebar a {
        display: block;
        text-decoration: none;
        color: #4d4d4d;
        padding: 0.8vh 1vh;
        border-bottom: 1px solid #ddd;
        transition: all 0.3s;
    }
}




.sidebar p {
    font-size: calc(0.8vw);
    /* 32px at 1280px width */

}





@media (min-width: 1025px) {
    .en {
        font-size: 12px;
        color: #b89f8b;
    }

    .ja {
        font-size: 14px;
        color: #4d4d4d;
    }
}

@media (min-width: 1440px) {
    .en {
        font-size: 14px;
        color: #b89f8b;
    }

    .ja {
        font-size: 20px;
        color: #4d4d4d;

    }
}






/* ハンバーガーメニュー（スマホ・タブレット用） */
.hamburger {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    z-index: 1001;
    display: none;
    /* PCでは非表示 */
    align-items: center;
    justify-content: center;
    flex-direction: column;
    background-color: white;

}

.hamburger span {
    display: block;
    width: 30px;
    height: 3px;
    background-color: #333;
    margin: 5px auto;
    transition: all 0.3s;
}

/* モバイルメニュー（スライド式） */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    /* 初期状態で非表示 */
    width: 60%;
    height: 100vh;
    background-color: white;
    box-shadow: -5px 0 10px rgba(0, 0, 0, 0.2);
    transition: right 0.3s ease-in-out;
    padding: 20px;
    z-index: 999;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.mobile-menu a {
    display: block;
    text-decoration: none;
    color: #333;
    font-size: 20px;
    padding: 15px 0;
    border-bottom: 1px solid #ddd;
    transition: all 0.3s;
}

.mobile-menu a:hover {
    background-color: #ddd;
}

/* 閉じるボタン */
.close-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background-color: #fff;
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    font-size: 30px;
    text-align: center;
    line-height: 50px;
    z-index: 1002;
    display: none;
    /* PCでは非表示 */
}

/* オーバーレイ（背景クリックで閉じる） */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    display: none;
}

/* 初期状態では透明（display: none ではなく、opacity: 0） */
.hamburger,
.close-btn {
    opacity: 0;
    pointer-events: none;
    /* クリック不可 */
    transition: opacity 0.3s ease-in-out;
}

/* 表示する時のスタイル */
.hamburger.show,
.close-btn.show {
    opacity: 1;
    pointer-events: auto;
    /* クリック可能に */
}


/* 1024px以下でハンバーガーメニューを表示 */
@media (max-width: 1024px) {
    .sidebar {
        display: none;
    }



    .hamburger {
        display: flex;
    }

    .close-btn {
        display: block;
    }
}