/* 親メニュー - Parent nav */

nav>ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    justify-content: space-around;
}

nav>ul li {
    position: relative;
}

.menu-item-has-children {}

nav a {
    color: #222;
    text-decoration: none;
}

nav ul a:hover {
    color: #222;
}

li.menu-item-has-children>a:hover {
    background-color: #EBF5F4;
}


/* 子メニュー - .sub-menu */

nav .sub-menu {
    position: absolute;
    width: 500px;
    background-color: #fff;
    opacity: 0;
    visibility: hidden;
    transition: .5s;
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    border: solid 3px #9DCCC8;
    z-index: 10;
}

nav .sub-menu li {
    width: 50%;
}

nav .sub-menu a {
    width: 100%;
    box-sizing: border-box;
    text-align: left;
}

nav .sub-menu a:hover {
    color: #222;
}

li.menu-item-has-children:nth-child(4)>ul:nth-child(2),
li.menu-item-has-children:nth-child(5)>ul:nth-child(2),
li.menu-item-has-children:nth-child(6)>ul:nth-child(2) {
    right: 0;
}


/* ホバー＆フォーカスで子メニュー表示 */

nav .menu-item-has-children:hover ul,
nav .menu-item-has-children ul.focused {
    opacity: 1;
    visibility: visible;
}

nav li.menu-item-has-children li a:hover,
nav li.menu-item-has-children li a:focus {
    background-color: #EBF5F4;
}



/* このクラスを、jQueryで付与・削除する */

nav.gNavFrame.active {
    transform: translateY(0%);
}

@media screen and (max-width: 670px) {
    nav>ul {
        flex-direction: column;
    }

    nav .sub-menu {
        position: relative;
        width: 100%;
        background: #FFF;
        top: 0;
        opacity: 1;
        visibility: visible;
        transition: none;
        box-sizing: border-box;
        border-left: none;
        border-right: none;
        border-top: none;
    }
}