@charset "utf-8";

/* ------------------------------------------------------- */
/* header menu ------------------------------------------- */
/* ------------------------------------------------------- */

/* ------------------------------------------------------- */
/* footer menu ------------------------------------------- */
/* ------------------------------------------------------- */

.footerMenu {
    display: flex;
    justify-content: flex-end;
    order: 2;
    @media (width <= 999px) {
        margin-bottom: 15px;
        font-size: 1.4rem;
        text-align: center;
        display: block;
    }
    ul {
        @media (width <= 999px) {
            margin-bottom: 25px;
        }
        li {
            border-right: 1px solid #ddd;
            margin-right: 10px;
            padding-right: 10px;
            display: inline-block;
            @media (width <= 999px) {
                border-right: 0;
                margin-right: 0;
                padding-right: 0;
                display: block;
            }
            &:last-child {
                border-right: 0;
                margin-right: 0;
            }
            a {
                text-decoration: none;
                color: #000;
                &:hover {
                    text-decoration: underline;
                }
            }
        }
    }
    .sns {
        a:is(.sns_x, .sns_youtube) {
            img {
                width: auto;
                height: 20px;
            }
        }
    }
}

/* ------------------------------------------------------- */
/* global menu ------------------------------------------- */
/* ------------------------------------------------------- */

#globalmenu {
    margin-bottom: 20px;
    line-height: 1;
    @media (width <= 999px) {
        display: none;
    }
    ul {
        max-width: var(--size-content-max-width);
        min-width: var(--size-content-min-width);
        margin: 0 auto;
        display: flex;
        justify-content: center;
        li {
            border-left: 1px solid #ccc;
            position: relative;
            &:last-child {
                border-right: 1px solid #ccc;
            }
            a {
                padding: 4px 15px 5px 15px;
                font-weight: bold;
                text-decoration: none;
                display: flex;
                align-items: center;
                justify-content: center;
                color: #000;
                position: relative;
                &::after {
                    background: #000;
                    content: "";
                    width: 0;
                    height: 1px;
                    bottom: -5px;
                    left: 10px;
                    position: absolute;
                    display: block;
                    transition: all 0.4s;
                }
                &:hover {
                    &::after {
                        width: calc((100% - 10px * 2));
                    }
                }
            }
        }
    }
}

/* focus, hover 時の動作 */
nav#global-menu {
    > ul li {
        ul.focused {
            /*display: block;*/
            visibility: visible;
        }
        &:hover {
            > ul {
                /*display: block;*/
                visibility: visible;
            }
        }
    }
}

/* PC 表示時の SP メニュー */
#toggle-button, #toggle-menu {
	display: none;
    @media (width <= 999px) {
        display: block;
    }
}
#toggle-menu {
    animation-duration: 3s;
    animation-delay: 2s;
    animation-iteration-count: infinite;
}

/* SP Menu */
@media (width <= 999px) {
    
    #toggle-button, #toggle-menu {
        display: block;
    }
    #overlay, #toggle-menu {
        transition: all 400ms cubic-bezier(1.000, 0.000, 0.000, 1.000);
        transition-timing-function: cubic-bezier(1.000, 0.000, 0.000, 1.000);
    }
    #overlay {
        background: #000;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        opacity: 0;
        position: fixed;
        z-index: -1;
    }
    
    /* Menu Button 1 */
    .toggle-button1 {
        background: var(--color-main);
        border: 0;
        top: 0;
        right: 0;
        width: 60px;
        height: 60px;
        margin: 0;
        padding: 0;
        font-size: 1.2rem;
        text-align: center;
        color: #fff;
        position: fixed;
        z-index: 997;
        cursor: pointer;
        display: block;
    }
    
    /* Menu Button 2 */
    .toggle-button2 {
        --button-label-height: 15px;
        --line-position: calc((var(--size-header-height) - 2px + var(--button-label-height)) / 2);
        
        background: var(--color-main);
        border: 0;
        top: 0;
        right: 0;
        width: var(--size-header-height);
        height: var(--size-header-height);
        padding: 10px;
        display: block;
        position: fixed;
        z-index: 997;
        cursor: pointer;
        span.toggle-label {
            width: 100%;
            height: var(--button-label-height);
            top: 6px;
            left: 0;
            font-size: 1.2rem;
            color: #fff;
            position: absolute;
            z-index: 998;
        }
        span.toggle-bar, span.toggle-bar::before, span.toggle-bar::after {
            background-color: #fff;
            width: calc(var(--size-header-height) - 20px);
            height: 2px;
            position: absolute;
            display: block;
        }
        span.toggle-bar::before, span.toggle-bar::after {
            left: 0;
            content: "";
            transition: all 0.1s;
        }
        span.toggle-bar {
            top: var(--line-position);
        }
        span.toggle-bar::before {
            top: calc((var(--line-position) - var(--button-label-height)) / 2 * -1);
        }
        span.toggle-bar::after {
            top: calc((var(--line-position) - var(--button-label-height)) / 2);
        }
    }
    
    /* Menu */
    #toggle-menu {
        background: #fff;
        top: 0;
        right: calc(var(--side-toggle-width) * -1);
        width: var(--side-toggle-width);
        height: 100%;
        margin-top: var(--size-header-height);
        color: #fff;
        position: fixed;
        z-index: 995;
        overflow-y: scroll;
        h4 {
            padding: 0 15px;
        }
        ul {
            border-top: 1px solid #ccc;
            padding: 0;
            > li {
                border-bottom: 1px solid #ccc;
                a {
                    padding: 10px;
                    text-decoration: none;
                    color: #000;
                    display: block;
                    &:hover {
                        background: var(--color-main);
                        color: #fff;
                    }
                }
            }
            > li:has(> ul) {
                li {
                    border-bottom: 0;
                }
                > a {
                    padding-right: 30px;
                    position: relative;
                    &::after {
                        top: 7px;
                        right: 0;
                        padding: 0 5px 0 0;
                        font-family: var(--fa);
                        content: "\f0fe";
                        font-size: 2.0rem;
                        font-weight: 400;
                        position: absolute;
                    }
                    &.active::after {
                        content: "\f146";
                    }
                }
                > button {
                    background: #333;
                    border: 0;
                    width: 100%;
                    padding: 10px;
                    color: #fff;
                    text-align: left;
                    position: relative;
                    display: block;
                    &.active::after {
                        content: "\f146";
                    }
                    &::after {
                        right: 0;
                        padding: 0 15px 0 0;
                        font-family: var(--fa);
                        content: "\f0fe";
                        font-size: 2.0rem;
                        font-weight: 400;
                        position: absolute;
                    }
                }
            }
            li ul {
                margin: 0 0 0 20px;
                display: none;
            }
        }
    }
    button#toggle-close {
        margin: 0 auto;
        display: block;
    }
    
    /* メニュー展開時のスタイル */
    body.toggle-opened {
        overflow-y: hidden;
        
        #overlay {
            left: calc(var(--side-toggle-width) * -1);
            z-index: 997;
            opacity: 0.3;
        }
        
        #toggle-menu {
            right: 0;
        }
        
        .toggle-button1 {
            span.toggle-bar {
                display: none;
            }
        }
        
        .toggle-button2 {
            background: #999;
            span.toggle-bar {
                height: 0;
            }
            span.toggle-bar::before, span::after {
                top: 0;
            }
            span.toggle-bar::before {
                transform:rotate(45deg);
            }
            span.toggle-bar::after {
                transform:rotate(-45deg);
            }
        }
    }
}