/* ハンバーガーメニューアイコン */
.menu-icon {
    display: block;
    cursor: pointer;
    font-size: 30px;
}

/* メニュー全体のスタイル */
.menu {
    display: none;
    flex-direction: column;
    background-color: #333;
    position: fixed; /* メニューを画面全体に固定 */
    top: 50px; /* メニュー開始位置をアイコン下に調整 */
    left: 0;
    max-width: 20%; /* メニューの幅を画面全体に設定 */
    z-index: 999; /* メニューをアイコンより下に、その他より上に表示 */
    overflow-y: auto; /* スクロール可能にする */
    max-height: 400px; /* 必要に応じて高さ調整 */
}

.menu a {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    padding: 10px;
    background: #333;
    color: white;
    flex: 1; /* Equal width for each link */
}

.menu a:hover {
    background: #555;
}

.menu-section {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap; /* Enable wrapping */
}

.menu a img {
    width: 75px;
    height: 75px;
    margin-bottom: 5px; /* Space between icon and text */
}

.show-menu {
    display: flex;
    flex-direction: column;
}

@media (max-width: 600px) {
    .menu-icon {
        display: block;
        cursor: pointer;
        font-size: 30px;
    }
    
    .menu {
        display: none;
        flex-direction: column;
        background-color: #333;
        overflow-y: auto; /* Enable vertical scroll */
        max-height: 400px; /* Adjust the height as needed */
    }
    
    .menu a {
        text-decoration: none;
        padding: 10px;
        background: #333;
        color: white;
    }
    
    .menu a:hover {
        background: #555;
    }
    
    .menu-icon {
        display: block;
        cursor: pointer;
        font-size: 30px;
    }
    
    .menu {
        display: none;
        flex-direction: column;
        max-width: 60%; /* Ensure menu takes full width */
    }
    
    .menu-section {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap; /* Enable wrapping */
    }
    
    .menu a {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-decoration: none;
        background: #333;
        color: white;
        flex: 1; /* Equal width for each link */
    }
    
    .menu a:hover {
        background: #555;
    }
    
    .menu a img {
        width: 45px;
        height: 45px;
        margin-bottom: 5px; /* Space between icon and text */
    }
    
    .show-menu {
        display: flex;
        flex-direction: column;
    }

}
