

.sticky-menu {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    width: 100%;
    height: 100%;
    opacity: 0; /* 初めは透明 */
    visibility: hidden; /* 要素を隠す */
    transition: opacity 0.3s, visibility 0s linear 0.3s; /* visibility の遷移遅延 */
}
    .sticky-menu.visible {
        opacity: 1;
        visibility: visible;
        transition: opacity 0.3s; /* visibility の遷移遅延を解除 */
    }

#menu {
    display: flex;
    flex-direction: column;
    background: rgba(60,60,60,0.8);
    height: 100%;
}

    #menu li {
        height: 4rem;
        display: flex;
        justify-content: start;
        align-items: center;
        padding: 0.3rem;
        background: white;
        border-bottom: 1px solid;
    }

        #menu li:not(:last-child) {
        }
        #menu li a {
            line-height: 2rem;
            width: 100%;
        }
.active_memu_item {
 
}

.sp-menu .active_memu_item {
    background: rgba(1, 2, 2,0.3) !important;
    color:black;
    border-color:white;
}

#menu-button {
    position: fixed;
    top: 0;
    right: 0;
    width: 3rem;
    height: 3rem;
    border-radius: 1.5rem;
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    background: black;
    box-shadow: 0 1px 8px rgba(255, 255, 255, 0.2), 0 2px 8px rgba(255, 255, 255, 0.2);
}


/*toggle*/
.menu-toggle {
    display: inline-block;
    width: 24px;
    height: 24px;
    position: relative;
    cursor: pointer;
}

    .menu-toggle:before,
    .menu-toggle:after {
        content: "";
        position: absolute;
        width: 70%;
        height: 3px;
        background-color: white;
        left: 6px;
        transition: all 0.3s;
    }

    .menu-toggle:before {
        top: 12px;
    }

    .menu-toggle:after {
        bottom: 12px;
    }

    .menu-toggle.open:before {
        top: 50%;
        transform: translateY(-50%) rotate(45deg);
    }

    .menu-toggle.open:after {
        bottom: 50%;
        transform: translateY(50%) rotate(-45deg);
    }

/* 新たに追加する中央の線 */
.center-line {
    content: "";
    position: absolute;
    width: 70%;
    height: 3px;
    background-color: white;
    top: 50%;
    left: 6px;
    transform: translateY(-50%);
    transition: all 0.3s;
}

/* メニューが開かれている時のスタイル */
.menu-toggle.open .center-line {
    width: 0; /* 中央の線を消去 */
}

.sp-menu {
    text-align: center;
    margin-top: 1px;
}
.sp-menu a{
    background: black;
}
footer .sp-menu {
    border-top: 1px solid white;
    margin-top: 3.5rem;
}
.sp-menu > div {
    display: flex;
}
        .sp-menu > div > a {
            color: white;
            flex: 1;
            border-bottom: 1px solid;
            line-height: 2rem;
        }
            .sp-menu > div > a.borderleft {
                border-left: 1px solid;
            }
li:nth-child(odd):not(:last-child) {
    /* 奇数番目かつ最後の要素以外に適用するスタイル */
}

@media (min-width: 768px) {
    #menu {
        display: flex;
        flex-direction: row;
    }

    .active_memu_item {
        background: rgba(1, 2, 2,0.1) !important;
    }
    .sticky-menu {
        display: block !important;
        position: -webkit-sticky; /* Safariのためのプレフィックス */
        position: sticky;
        top: 0;
        z-index: 1000;
        height: auto;
        opacity: initial;
        visibility: initial;
        transition: initial;
    }
    #menu-button{
        display:none;
    }
    #menu {
        height: auto;
        box-shadow: 0 1px 8px rgba(255, 255, 255, 0.2), 0 2px 8px rgba(255, 255, 255, 0.2);
    }
        #menu li {
            flex: 1;
            text-align: center;
            background: #010202;
        }
            #menu li:not(:last-child) {
                border-right: 1px solid rgba(255,255,255,0.5);
            }
        #menu li a{
            display:block;
            width:100%;
            height:100%;
            line-height:3rem;
            color:white;
        }
}