@charset "utf-8";

header{
    width: min(1920px,100%);
    height: clamp(48px,7.94dvw,80px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--white);
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 90;

    .header-logo{
        display: block;
        width: clamp(125px,35.88dvw,300px);
        aspect-ratio: 324/50;
        margin: 0 1.45dvw;
    }

    .nav-sp,.sp-menu{
        display: none;
    }
    .nav-pc{
        width: fit-content;
        height: 100%;

        ul{
            height: 100%;
            display: flex;
            justify-content: center;
            align-items: center;
            gap: clamp(16px, calc((100dvw - 960px) * 0.04443), 42.652px);
            list-style: none;
            margin: 0;
            padding-left: 0;

            li{
                a{
                display: block;
                height: 100%;
                color: var(--navy);
                font-weight: 600;
                white-space: nowrap;
                }
            }
            .btn-orange{
                width: 11.458dvw;
                min-width: 119.38px;
                height: 100%;
                background: var(--orange);
                a{
                    display: block;
                    height: 100%;
                    line-height: 80px;
                    color: var(--white);
                    white-space: nowrap;
                    text-align: center;
                }
            }
        }
    }

    .btn-menu-icon{
        display: none;
    }
}

/* ▼ 言語切り替え */
.language-switcher{
    position: relative;
}
.language-switcher .btn-language{
    max-width: 160px;
    max-height: 50px;
    font-size: clamp(14px, 2.43dvw, 1.375rem); /* 14px ~ 22px */
    font-weight: 600;
    padding: 1em 0.75em;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid var(--orange);
    color: var(--orange);
    line-height: 1;
}
.language-switcher.is-open .btn-language{
    border-bottom-color: transparent;
}
.language-switcher .btn-language .arrow{
    display: block;
    width: 6px;
    height: auto;
    transform: rotate(90deg);
    transition: transform 0.3s ease;
}
.language-switcher.is-open .btn-language .arrow{
    transform: rotate(270deg);
}
.language-switcher .language-dropdown{
    opacity: 0;
    visibility: hidden;
    position: absolute;
    top: 40px;
    left: 0;
    width: 100%;
    min-width: 104px;
    padding: 0.6rem 0.8rem;
    border: 1px solid var(--orange);
    border-top: none;
    background: rgba(255, 255, 255, 0.92);
    z-index: 100;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}
.language-switcher.is-open .language-dropdown{
    opacity: 1;
    visibility: visible;
}
.language-switcher .language-dropdown .language-option{
    display: block;
    height: auto;
    padding: 0.25rem 0;
    color: var(--navy);
    line-height: 1.4;
    font-weight: bold;
    white-space: nowrap;
}
.language-switcher .language-dropdown .language-option:hover,
.language-switcher .language-dropdown .language-option.is-current{
    color: var(--orange);
}
/* 追加：ハンバーガー制御用チェックボックスは常に非表示 */
.menu-toggle-common{
    display: none;
}

@media (max-width: 1260px){
    header{
        .header-logo{
            margin: 0 0 0 3dvw;
        }
        .nav-pc{
            display: none;
        }
        .sp-menu{
            width: auto;
            height: clamp(48px, 7.94dvw, 100px);
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 2dvw;
            margin-right: 2dvw;
            position: relative;
            z-index: 110;
        }

        .nav-sp{
            display: block;
            width: 100%;
            height: calc(100dvh - clamp(48px, 7.94dvw, 100px));
            background: var(--navy);
            opacity: 0;
            visibility: hidden;
            position: fixed;
            padding-top:  clamp(48px, 7.94dvw, 100px);
            top: clamp(48px, 7.94dvw, 100px);
            left: 0;
            z-index: 100;
            transition: opacity 0.3s ease, visibility 0.3s ease;

            .nav-sp-inner{
                width: min(400px,90%);
                margin: 0 auto;
                .nav-sp-logo{
                    display: block;
                    width: clamp(274px,76.46dvw,352px);
                    aspect-ratio: 324/50;
                    margin-bottom: 3rem;
                }
                ul{
                    list-style: none;
                    display: flex;
                    justify-content: space-between;
                    align-items: center;
                    margin-bottom: 2rem;
                    li{
                        border-left: 2px solid var(--orange);
                        padding-left: 10px;
                        a{
                            display: block;
                            color: var(--white);
                            font-size: 16px;
                            font-weight: 600;
                            line-height: 1.4;
                            text-decoration: none;
                        }
                    }
                }
                .btn-orange{
                    width: fit-content;
                    margin: 22px 0;
                    padding-left: 0;
                    border-left: none;
                    background: var(--orange);
                    text-align: center;
                    padding: 0.2em 2.5em;
                    a{
                        font-size: 16px;
                        color: var(--white);
                        text-align: center;
                        line-height: 36px;
                        font-weight: 600;
                    }
                }
                .nav-sp-company{
                    width: 100%;
                    margin-top: 36px;

                    .company-block{
                        width: 100%;
                        margin-bottom: 28px;

                        h3{
                            position: relative;
                            padding-left: 1rem;
                            margin-bottom: 8px;
                            color: var(--white);
                            font-size: 20px;
                            font-weight: 500;
                            line-height: 1.8;
                            letter-spacing: 0.01em;
                            border-bottom: 1px solid rgba(255, 255, 255, 0.55);
                            &::before{
                                content: "";
                                position: absolute;
                                top: 0.35em;
                                left: 0;
                                width: 2px;
                                height: 1.1em;
                                background: var(--orange);
                            }
                        }
                        .company-links{
                            padding-left: 1rem;
                            a{
                                width: fit-content;
                                display: flex;
                                align-items: center;
                                gap: 6px;
                                color: var(--white);
                                font-size: 14px;
                                font-weight: 500;
                                line-height: 1.5;
                                text-decoration: none;
                                img{
                                    display: block;
                                    width: 10px;
                                    height: auto;
                                }
                            }
                        }
                    }
                    .company-block:last-child{
                        margin-bottom: 0;
                    }
                }
            }
        }
        .btn-menu-icon{
            width: 32px;
            height: 18px;
            margin: 0 0.5dvw;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            cursor: pointer;
        }
        .btn-menu-icon span{
            display: block;
            width: 100%;
            height: 1px;
            background: var(--orange);
            transition: transform 0.3s ease, opacity 0.3s ease;
            transform-origin: center;
        }
    }

    header:has(.menu-toggle-common:checked) .nav-sp{
        opacity: 1;
        visibility: visible;
    }
    .language-switcher .btn-language{
        padding: 0.5em 0.75em;
    }
    .language-switcher .language-dropdown{
        top: 100%;
        padding: 0.15rem 0.8rem 0.25rem;
    }
    .language-switcher .language-dropdown .language-option{
        padding: 0.1rem 0;
        line-height: 2.4;
    }
    .menu-toggle-common{
        display: none;
    }
    .menu-toggle-common:checked + .btn-menu-icon span:nth-child(1){
        transform: translateY(8.5px) rotate(45deg);
    }
    .menu-toggle-common:checked + .btn-menu-icon span:nth-child(2){
        opacity: 0;
    }
    .menu-toggle-common:checked + .btn-menu-icon span:nth-child(3){
        transform: translateY(-8.5px) rotate(-45deg);
    }
}