/* ============================

HEADER

============================ */

.header {
    z-index: var(--zindex-nav);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--height-header);
}

.header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1em;
    width: calc(100% - var(--padding-container));
    height: var(--height-header);
    /* width: min(1480px, 100%); */
    margin-inline: auto;
    box-sizing: border-box;
    padding: 10px 24px 10px 24px;
    box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.11);
    border-radius: 12px;
    margin-top: 24px;
    background-color: #fff;
}

.header__logo {
    width: clamp(180px, 22vw, 240px);
    z-index: 999;
}


/* ········ NAVIGATION ········ */

.header-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    height: var(--height-header);
}

.header-nav ul {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(8px, 1.5vw, 36px);
    list-style: none;
}

.header-nav__link,
.-accordion {
    font-size: clamp(8px, 1.4vw, 15px);
    font-weight: var(--fontWeight-medium);
    line-height: var(--lineHeight-185);
    letter-spacing: 0.03em;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    color: inherit;
}

a.header-nav__link:hover,
.-accordion:hover {
    color: var(--color-main);
}

.-accordion::after {
    display: none;
}

/* 採用情報ボタン */
.header-nav .btn{
    width: clamp(80px, 50vw, 120px);
    padding: 0.8em 1.5em;
}

/* ········ サブメニュー ········ */

.accordion {
    list-style: none;
    overflow: hidden;
}

.accordion ul {
    list-style: none;
}

.accordion .header-nav__link {
    font-size: clamp(8px, 1.4vw, 15px);
    display: block;
    transition: all 0.2s ease;
    flex-direction: row;
}

/* ········ PCの設定 ········ */
@media (width >=920px) {
    .header-nav li {
        position: relative;
    }

    .header-nav li:has(.js-sp-accordion-trigger):hover .accordion {
        opacity: 1;
        transform: translateY(0);
        visibility: visible;
    }

    .accordion {
        position: absolute;
        top: calc(100% + 8px);
        left: -1.5em;
        background-color: #fff;
        width: max-content;
        z-index: 10;
        padding: 1.5em 3em 1.5em 1.5em;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-20px);
        transition: all 0.3s ease;
        box-shadow: 0px 5px 5px rgba(0, 0, 0, 0.11);
        border-radius: 12px;
    }

    .accordion ul {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5em;
    }

    .accordion .header-nav__link {
        border-left: none;
        margin-left: 0;
    }

    .accordion .header-nav__link:hover {
        background-color: rgba(255, 255, 255, 0.1);
    }

    .hamburger {
        display: none;
    }
}

/* ········ SP,TBの設定 ········ */
@media (width < 919px) {

    .header__logo {
        width: clamp(100px, 50vw, 250px);
    }

    /* ドロワーデフォルトCLOSE */
    .header-nav {
        position: fixed;
        top: 0;
        left: 0;
        z-index: 9;
        width: 100%;
        height: 100%;
        padding-top: 90px;
        padding-bottom: 90px;
        background-color: #fff;
        transform: translateY(0);
        /* 初期位置を0に */
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.6s ease, visibility 0.6s;
        /* transformを削除 */
        z-index: -1;
        overflow-y: scroll;
        pointer-events: none;
    }

    /* ドロワー OPEN */
    .header-nav.-active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
        display: grid;
        place-items: center;
        pointer-events: all;
    }

    .header-nav ul {
        flex-direction: column;
        align-items: flex-start;
        gap: clamp(8px, 2vw, 24px);
        margin-inline: auto;
        width: fit-content;
        transform: translateY(10px);
        opacity: 0;
        transition: transform 0.3s ease-out, opacity 0.1s ease-out;

        li:has(.btn) {
            width: 100%;
            margin-top: 1em;
        }

        li .btn {
            width: 100%;
            font-size: clamp(13px, 4.5vw, 20px);
            padding: 1em;
        }
    }

    .header-nav__link {
        width: 100%;
        font-size: clamp(13px, 4.5vw, 20px);
        font-weight: var(--fontWeight-medium);
        flex-direction: row;
        justify-content: center;
        gap: 1em;
    }

    .-accordion {
        font-size: clamp(13px, 4.5vw, 20px);
        margin-bottom: 0.5em;
    }

    .header-nav.-active ul {
        transform: translateY(0);
        opacity: 1;
        transition: transform 0.4s ease-out 0.2s, opacity 0.4s ease-out 0.2s;
    }

    .accordion {
        max-height: none;
        opacity: 1;
        transform: translateY(0);
        visibility: visible;
        overflow: visible;
        transition: all 0.3s ease;

        >ul {
            gap: clamp(8px, 1.5vw, 18px);
            margin-bottom: 1em;
        }
    }

    .accordion .header-nav__link {
        font-weight: var(--fontWeight-regular);
        font-size: clamp(12px, 4vw, 18px);
        gap: 0.5em;
        margin-left: 0.5em;
        transform: translateX(0);
        opacity: 1;
        display: flex;
        align-items: center;
    }

    .accordion .header-nav__link::before {
        content: "";
        display: inline-block;
        width: 1em;
        height: 1px;
        background-color: var(--color-base);
    }

    .accordion .header-nav__link:hover {
        transform: translateX(5px);
        background-color: rgba(255, 255, 255, 0.1);
        border-left-color: var(--color-white);
    }

    .hamburger {
        display: block;
        position: fixed;
        top: calc((65px - 46px) / 2 + 24px);
        right: var(--padding-container);
        width: 48px;
        height: 48px;
        margin-left: auto;
        border: none;
        z-index: 999;
        cursor: pointer;
        background-color: var(--color-main);
        border-radius: 999px;
    }

    .hamburger__line {
        display: block;
        position: absolute;
        top: 50%;
        left: 50%;
        width: 40%;
        height: 2px;
        background-color: #fff;
        transform: translateX(-50%);
        transition: 0.4s;
    }

    .hamburger__line::before,
    .hamburger__line::after {
        content: "";
        display: block;
        position: absolute;
        width: 100%;
        height: 100%;
        background-color: #fff;
        transition: inherit;
    }

    .hamburger__line::before {
        top: -8px;
    }

    .hamburger__line::after {
        top: 8px;
    }

    /* ハンバーガーメニューが開いた時のheaderバー */
    .header__inner:has(.header-nav.-active){
        box-shadow: none;
        top:12px;
    }

    .hamburger.-active .hamburger__line {
        background-color: transparent;
    }

    .hamburger.-active .hamburger__line::before {
        top: 0;
        transform: rotate(45deg);
    }

    .hamburger.-active .hamburger__line::after {
        top: 0;
        transform: rotate(-45deg);
    }

    body:has(.hamburger.-active) {
        position: fixed;
        width: 100%;
        height: 100%;
        overflow: hidden;
        left: 0;
        top: 0;
    }
}

@media (width < 480px) {
        .hamburger {
        top: calc((65px - 54px) / 2 + 24px);
        width: 42px;
        height: 42px;
    }
}