header {
    /* ヘッダー固定 sticky,top,let,rightは0にする */
    position: sticky;
    top: 0;
    background-color: whitesmoke;
    color: black;
    padding: 30px;
    width: 100%;
    /* z-indexは最上位にしないと隠れてしまうので注意 */
    z-index: 3;
}

#header_opacity {
    opacity: 0.8;
}

.main-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

footer {
    padding: 30px 15px;
    background-color: #9ba5a0;
    color: #000;
    text-align: center;
    font-size: 0.8rem;
}

@media (max-width: 767px) {
    footer {
        padding: 15px 12px;
    }
}

/*Hamburger*/
.hamburger {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    width: 60px;
    height: 60px;
    padding: 10px;
    background: gray;
    cursor: pointer;
}

.hamburger__line {
    position: relative;
    top: 12px;
    width: 30px;
    height: 2px;
    background: #fff;
}

.hamburger__line::before,
.hamburger__line::after {
    position: absolute;
    content: "";
    display: block;
    width: 30px;
    height: 2px;
    background: #fff;
    transition: 0.3s;
}

.hamburger__line::before {
    top: -8px;
}

.hamburger__line::after {
    bottom: -8px;
}

.hamburger__txt {
    display: block;
    color: #fff;
    font-size: 10px;
    text-transform: uppercase;
}

/* OPEN hamburger line（クローズボタンへ変更） */
.hamburger[aria-expanded="true"] .hamburger__line {
    background: transparent;
    /* ３本線の真ん中は透明にする（消す） */
}

.hamburger[aria-expanded="true"] .hamburger__line::before {
    top: 0;
    transform: rotate(45deg);
}

.hamburger[aria-expanded="true"] .hamburger__line::after {
    bottom: 0;
    transform: rotate(-45deg);
}

/* for TB or SP */
@media(max-width: 992px) {
    .gnav {
        display: none;
        position: fixed;
        top: 120px;
        left: 0;
        width: 100%;
        height: calc(100vh - 120px);
        padding: 50px 20px;
        background: whitesmoke;
        text-align: center;
        overflow-y: auto;
        z-index: 3;
    }

    .menu__list {
        border-top: 1px dashed #aaa;
    }

    .menu__item {
        border-bottom: 1px dashed #aaa;
    }

    .menu__link {
        display: block;
        padding: 20px;
        color: #000;
        font-weight: bold;
    }
}

/* for PC */
@media(min-width: 993px) {
    .hamburger {
        display: none;
        /* PC表示はhamburgerを非表示にする */
    }

    .gnav {
        display: block !important;
    }

    /* メニューリストをflexで表示 for PC */
    .menu-list {
        display: flex;
        list-style: none;
        flex-wrap: wrap;
        max-width: 1000px;
        margin-right: 100px;
        gap: 12px 0;
    }

    /* flex items */
    .menu-list li {
        margin-left: 30px;
        font-size: 1.15rem;
    }

    /*  flex items link */
    .menu-list a {
        position: relative;
        display: block;
        text-decoration: none;
        font-weight: bolder;
        color: black;
    }

    /* hover時の下線引きの準備 */
    .menu-list a::before {
        content: "";
        display: block;
        position: absolute;
        left: 0;
        bottom: -5px;
        width: 100%;
        height: 4px;
        background: cadetblue;
        transition: transform 0.3s;
        transform: scale(0, 1);
    }

    /* hover時に下線を引く */
    .menu-list a:hover::before {
        transform: scale(1, 1)
    }
}
