header { 
    width: 100%; 
    position: sticky; 
    top: 0;
    left: 0;
    z-index: 9999; 
}



/*-------------------------パソコン向け(961px以上のとき)----------------------------*/

@media(min-width: 961px){
    .main_nav {
        width: 280px;
        height: 450px;
        background-color: #018BD4;
        position: relative;
        z-index: 1;
        margin-bottom: 50px;
    }
}

@media(min-width: 961px){
    .green_box {
        width: 280px;
        height: 70px;
        background-color: #009E41;
    }
}

@media(min-width: 961px){
    .icon {
        position: absolute;
        margin-top: 35px;
        margin-left: 30px;   
    }
}

@media(min-width: 961px){
    .KT {
        display: none;
    }
}

/*-------------------------スマホ向け(960px以下のとき)----------------------------*/
@media(max-width: 960px) {
    #header {
        position: sticky; 
        top: 0;
        left: 0;
        z-index: 9999;  
    }
}

@media(max-width: 960px) {
    .KT {
        color: #fff;
        margin-left: 12px;
        display: flex;
        align-items: center;
        font-size: clamp(12px, 1.5vw, 18px);
    }
}

@media(max-width: 960px) {
    .top {
        display: flex;
        flex-direction: column;
        width: 100%;
    }
}


@media(max-width: 960px) {
    .green_box {
        display: none;
    }
}

@media(max-width: 960px){
    .main_nav {
        display: flex;
        width: 100%;
        height: 40px;
        background-color: #009E41;
        position: relative;
        z-index: 2;
        margin: 0;
    }
}


@media(max-width: 960px){
    .icon {
        display: none;
    }
}

#menu_switch:checked ~ .menu_list {
    transform: translateX(0%);
    transition: 0.4s;
}

.menu_switch {
    display: none;
}


.hamburger {
    display: none;
}

@media screen and (max-width: 960px) {
    .hamburger {
    align-items: center;
    appearance: none;
    background-color: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 5px; 
    justify-content: center;
    width: 32px;
    padding-left: 5px;
    }
}

.hamburger span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: #eeeeee;
    border-radius: 3px;
    transition: all 0.3s ease;
}

@media screen and (max-width: 960px) {
    /* ハンバーガーの✕アニメーション */
    .menu_switch:checked + .hamburger span:nth-child(1) {
        transform: translateY(8.5px) rotate(45deg);
    }
    .menu_switch:checked + .hamburger span:nth-child(2) {
        opacity: 0;
    }
    .menu_switch:checked + .hamburger span:nth-child(3) {
        transform: translateY(-8.5px) rotate(-45deg);
    }
}






.menu_list {
    margin-top: 70px;
    display: flex;
    flex-direction: column;
    padding-left: 40px;
}


@media (max-width: 960px) {
    .menu_list {
        background-color: #018BD4;
        opacity: 0.8;
        align-items: flex-start;
        display: flex;
        flex-direction: column;
        left: 0;
        padding: 2rem;
        position: absolute;
        transform: translateX(-200%);
        transition: 0.3s;
        width: 100px;
        z-index: 3;
        margin-top: 40px; 
    }
}

/* メニュー開閉（チェックボックス連動） */
#menu_switch:checked ~ .menu_list {
    transform: translateX(0%);
    transition: 0.4s;
}


.menu {
    position: relative;
    display: inline-block;
    text-decoration: none;
    color: white;
    line-height: 1.5;
    margin-top: 30px;
}

/* 下線用の擬似要素 */
.menu::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    height: 1px;
    width: 0;
    background-color: white;
    transition: width 0.3s ease;
}


.menu:hover::after {
    width: 100%;
}


