@charset "UTF-8";

/* Header Footer styles */

/**header**/
header {
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 500;
}
.header-top {
    background-color: #fff;
    display: flex;
    align-items: center;
    height: fit-content;
    border-bottom: 1px solid #f3f3f3;
    position: relative;
    z-index: 10;
    h1 {
        padding: 0.5rem 2rem;
        margin-right: auto;
        height: fit-content;
        width: 23vw;
        max-width: 300px;
        @media (max-width: 1024px) {
            min-width: 150px;
            width: auto;
            height: var(--header-height);
            padding: 0.5rem 1rem;
            img {
                height: 100%;
            }
        }
    }
}

main {
    margin-top: var(--header-height);
}

.header-menu {
    display: flex;
    flex: 1;
    justify-content: end;
    align-items: center;
    input[type="checkbox"] {
        display: none;
    }
    ul.menu {
        display: flex;
        align-items: center;
        align-items: center;
        margin-bottom: 0;
        li.main {
            font-weight: bold;
            font-size: 0.95rem;
            border-bottom: 3px solid #fff;
            padding: 2.5rem 0.5rem;
            @media (min-width: 1200px) {
                font-size: 1.15rem;
                padding: 2.5rem 0.75rem;
            }
            span,
            label {
                padding-left: unset;
                &:before {
                    content: unset;
                }
            }
            &:hover {
                color: var(--main-color);
            }
            &.active {
                color: var(--main-color);
                .header-under {
                    color: #000;
                    position: absolute;
                    top: 100%;
                    left: 0;
                    width: 100%;
                    display: flex;
                    animation: fadeIn 0.5s;
                    @media (max-width: 1024px) {
                        display: none;
                    }
                }
            }
        }
    }

    @media (max-width: 1024px) {
        display: none;
    }
}
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.sp-nav {
    display: contents;
    @media (max-width: 1024px) {
        &:has(.header-menu.open) {
            display: block;
            position: fixed;
            overflow-y: scroll;
            width: 100%;
            height: calc(100% - var(--header-height));
            top: var(--header-height);
            left: 0;
            -webkit-overflow-scrolling: touch;
            background-color: #858585;
        }
    }
}

.submenu {
    display: none;
}

@media (max-width: 1024px) {
    .header-menu.open {
        display: flex;
        flex-direction: column;
        width: 100%;

        ul.menu {
            display: flex;
            flex-direction: column;
            top: 100%;
            left: 0;
            width: 100%;
            background-color: #fff;
            border-top: 1px solid #f4f4f4;
            gap: 0;
            & > .submenu-inner + li {
                border-bottom: 1px solid #f4f4f4;
            }

            > li span,
            li label {
                font-size: 1.5rem;
                padding-left: 1.5em;
                &:before {
                    content: "";
                }
            }
            > li.main:not(.sub) {
                padding: 0 1.5em;
                a {
                    display: block;
                    padding-top: 1.5rem;
                    padding-bottom: 1.5rem;
                }
            }
            > li.main.sub {
                display: flex;
                flex-direction: column;
                padding: 0;
                label {
                    font-size: 0.95rem;
                    padding-left: 1.5em;
                    padding-top: 1.5rem;
                    padding-bottom: 1.5rem;
                }
            }
            li.main {
                width: 100%;
                text-align: left;
                border-bottom: 1px solid #f4f4f4;

                &.sub {
                    position: relative;
                    &:before,
                    &:after {
                        content: "";
                        position: absolute;
                        right: 2rem;
                        top: calc(1em + 1.5rem);
                        width: 1.5em;
                        height: 1px;
                        transform: translateY(-50%);
                        background-color: #000;
                    }

                    &::before {
                        transition: transform 0.5s linear;
                        transform: translateY(-50%) rotate(90deg);
                    }
                }
                &.sub:has(input[type="checkbox"]:checked) {
                    &::before {
                        transform: translateY(-50%) rotate(0deg);
                    }
                }

                &:has(input[type="checkbox"]:checked) {
                    .submenu-inner {
                        grid-template-rows: 1fr;
                        & + li {
                            border-top: 1px solid #f4f4f4;
                        }
                        .submenu {
                            li {
                                position: relative;
                                &:last-child {
                                    border-bottom: none;
                                }

                                &:after {
                                    content: "";
                                    position: absolute;
                                    top: 50%;
                                    right: 2rem;
                                    width: 0.75em;
                                    height: 0.75em;
                                    transform: translateY(-50%) translateX(-50%)
                                        rotate(45deg);
                                    border-top: 1px solid #333;
                                    border-right: 1px solid #333;
                                    background: transparent;
                                }
                            }
                        }
                    }
                }
            }

            .submenu-inner {
                display: grid;
                transition: grid-template-rows 0.5s;
                grid-template-rows: 0fr;
                width: 100%;
                color: #000;
            }

            .submenu {
                padding-left: 4em;
                overflow: hidden;
                display: block;

                li {
                    position: relative;
                    font-size: 1.2rem;
                    padding-left: 1.5em;
                    &:last-child {
                        border-bottom: none;
                    }
                    &:has(i) {
                        &::after {
                            content: unset !important;
                        }
                        a {
                            padding: 1.5rem 2rem 2rem 1.5rem !important;
                            display: flex !important;
                            i {
                                margin-left: auto !important;
                                color: #333;
                            }
                        }
                    }
                    a {
                        display: block;
                        width: 100%;
                        padding: 1.5rem 4rem 2rem 1.5rem;
                    }
                }
            }
            li + li {
                border-top: 1px solid #f4f4f4;
            }
            li:has(input[type="checkbox"]:checked) {
                label {
                    border-bottom: 1px solid #f4f4f4;
                }
            }
        }
    }
    body:has(header.open) {
        height: 100vh;
        overflow: hidden;
    }
}

.header-actions{
    display: flex;
    align-items: center;
    padding-right: 2rem;
    @media (max-width: 1024px) {
        width: 100%;
        padding: 2rem 2em;
        justify-content: start;
        background-color: #fff;
    }

    .search-form {
        box-sizing: border-box;
        position: relative;
        display: flex;
        justify-content: space-between;
        padding: 3px 20px;
        border-radius: 20px;
        height: 2.3em;
        width: 13vw;
        overflow: hidden;
        background-color: #f4f4f4;

        @media (max-width: 1024px) {
            width: 100%;
        }

        .search-input {
            width: 100%;
            border: none;
            height: 2em;
            padding: 0;
            outline: none;
            &::placeholder {
                color: #999999;
            }
        }

        .search-btn {
            cursor: pointer;
            font-size: 1.3em;
            border: none;
            background: none;
            color: var(--main-color);
            display: flex;
            align-items: center;
            justify-content: center;
            outline: none;
        }
    }
}

.lang {
    border-left: 2px solid #d4d4d4;
    border-right: 2px solid #d4d4d4;
    margin-left: 1.5rem;
    margin-right: 1.5rem;
    position: relative;
    display: flex;
    font-weight: bold;
    align-items: center;
    color: var(--main-color);
    li {
        padding: var(--header-btn-padding);
        width: 100%;
        cursor: pointer;
        display: flex;
        align-items: center;
    }
}
.lang:hover {
    li {
        display: flex !important;
        background-color: var(--main-color-light);
        color: #fff;
        justify-content: center;
        align-items: center;
        height: 100%;
    }
    li.active {
        background-color: var(--main-color);
    }
    li:nth-child(2) {
        position: absolute;
        top: 100%;
        left: 50%;
        transform: translateX(-50%);
    }
}

.header-under {
    display: none;
    background-color: #fff;
    justify-content: center;
    padding: 2rem;
    .title-area {
        width: 30%;
        .round-btn {
            display: inline-block;
            margin-top: 1rem;
            margin-left: 2em;
        }
    }
    .title {
        width: 100%;
        padding-left: 2em;
        font-size: 1.75rem;
        font-weight: 500;
    }
    ul {
        width: 60%;
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(13em, 1fr));
        flex-wrap: wrap;
        gap: 2em;
        row-gap: 1rem;
        li {
            align-items: center;
            word-break: auto-phrase;
            display: flex;
            font-weight: bold;
            &:hover {
                color: var(--main-color);
            }
            i {
                margin-right: 0.5em;
            }
            a {
                display: block;
                width: 100%;
                padding: 0.5rem 0;
            }
        }
    }
}

.header-info {
    display: none;
    @media (max-width: 1024px) {
        width: 100%;
        background-color: #fff;
        display: block;
        padding: 0 3.5rem;

        ul {
            li {
                padding: 0.5rem 0;
            }
        }

        .copyright {
            margin: unset;
            text-align: left;
        }
    }
}

.hambarger {
    display: none;
    @media (max-width: 1024px) {
        display: block;
        padding: 1rem 2rem;
        cursor: pointer;
    }
}

/*Footer*/
footer {
    border-top: 2px solid #fff;
    background-color: var(--footer-bg);
}
.footer-menu {
    display: flex;
    justify-content: center;
    padding: 5rem 0.5rem;
    ul.menu {
        display: grid;
        grid-template-areas:
            "menu1 menu2 menu3 menu4"
            "menu1 menu2 menu3 menu5";
        grid-template-columns: repeat(4, 1fr);
        gap: 1rem;
        & > li > a {
            padding-left: 1.5em;
            font-size: 1.25rem;
        }
        li {
            &:nth-child(1) {
                grid-area: menu1;
            }
            &:nth-child(2) {
                grid-area: menu2;
            }
            &:nth-child(3) {
                grid-area: menu3;
            }
            &:nth-child(4) {
                grid-area: menu4;
            }
            &:nth-child(5) {
                grid-area: menu5;
            }

            font-weight: bold;
            font-size: 1.25rem;

            &.active {
                color: var(--main-color);
            }
            /*footerサブメニュー*/
            ul {
                margin-top: 1rem;
                padding-left: 1.5em;
                display: flex;
                flex-direction: column;
                gap: 0.5rem;

                li {
                    font-size: 0.85rem;
                    font-weight: normal;
                    a {
                        line-height: 1.25;
                        color: #767676;
                    }

                    &:before {
                        content: "－";
                        color: #767676;
                        margin-right: 0.5rem;
                    }
                }
            }
        }
        &.en {
            grid-template-areas:
                "menu1 menu2 menu3"
                "menu1 menu2 menu3";
            grid-template-columns: repeat(3, 1fr);
            gap: 4rem;
        }
    }
    @media (max-width: 1024px) {
        display: none;
    }
}

.footer-under {
    display: flex;
    justify-content: space-between;
    background-color: #fff;
    align-items: center;
    font-size: 0.75rem;
    ul {
        display: flex;
        align-items: center;
        gap: 1.25rem;
        @media (max-width: 1024px) {
            display: none;
        }
    }
}

.copyright {
    color: #a5a5a5;
    margin-right: 2rem;
    margin-left: 2rem;
    @media (max-width: 1024px) {
        text-align: center;
        width: 100%;
        padding: 1rem 0;
    }
}

.contact {
    background-color: #000;
    color: #fff;
    padding: 1.5rem 4rem;
    i {
        margin-right: 0.5em;
    }
}

body:has(header .menu li.active) {
    overflow: hidden;
    .dark-screen {
        background-color: rgba(0, 0, 0, 0.5);
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 3;
    }
}
