/* ------------------------------------------------
HEADER
------------------------------------------------ */
.header {
    z-index: 100;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--height-header);
    /* グラデーション */
    background: var(--color-main);
}

.header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1em;
    padding: 0 clamp(24px, 4.4vw, 64px) 0 0;
    height: var(--height-header);
    max-width: 100%;
    box-sizing: border-box;
    color: #fff;
    position: relative;
}

/* ロゴ */
.header__logo {
    height: calc(100%);
    box-sizing: border-box;
    margin-left: 0;


    a {
        display: flex;
        align-items: center;
        gap: 1.3em;
        height: 100%;
    }

    /* ロゴ */
    img {
        /* border: 3px solid var(--color-base); */
        aspect-ratio: 1;
        height: 100%;
        width: auto;
        object-fit: contain;
        object-position: left;
    }
}

/* タイトル（岩本不動産） */
.header__title {
    --font-min: 18;
    --font-max: 30;
    font-size: var(--font-size);
    font-weight: var(--wght-bold);
    letter-spacing: 0.1em;
    color: #fff;
}

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

.header-nav__list {
    display: flex;
    align-items: center;
    justify-content: center;
    column-gap: clamp(8px, 3.47vw, 50px);
    list-style: none;
}

/* メニュー */
.header-nav__link {
    --font-min: 8;
    --font-max: 16;
    font-size: var(--font-size);
    font-weight: var(--wght-bold);
    font-family: var(--fontFamily-base);
    line-height: var(--lineHeight-185);
    letter-spacing: var(--tracking-120);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}


/* Contact */
.header-nav__item .header-nav__link-mail {
    --font-min: 10;
    --font-max: 16;
    font-size: var(--font-size);
    line-height: 1.3;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    color: var(--color-main);
    background-color: #FFFDFD;
    border-radius: 999px;
    padding: 0.75em 2em;
}

.header-nav__item .header-nav__link-mail::before {
    content: '';
    display: inline-block;
    background: url(../../img/common/icon_mail.svg) no-repeat center center / contain;
    aspect-ratio: 23/19;
    width: 1.4em;
    height: auto;
    margin-right: 0.5em;
}

/* HOVER */
@media (hover: hover) and (pointer: fine) {

    /* メールボタン */
    .header-nav__item .header-nav__link-mail:hover {
        background-color: #000000;
        color: #fff;
        transition: all 0.3s ease;
    }

    .header-nav__item .header-nav__link-mail:hover::before {
        background: url(../../img/common/icon_mail2.svg) no-repeat center center / contain;
        transition: all 0.3s ease;
    }
}

.hamburger {
    display: none;
}

@media (width < 1200px) {
    .header__inner {
        padding: 0 24px 0 0;
    }

    .header-nav__list {
        column-gap: clamp(8px, 2vw, 24px);
    }
}

/* 開閉ヘッダーへ切り替わるタイミング */
@media (width < 800px) {

    .header__inner {

        padding: 0 20px 0 0;
    }

    .header__title {
        font-size: 28px;
    }

    .header-nav__list {
        flex-direction: column;
    }

    .header-nav__item:last-of-type {
        height: unset;
    }

    /* ドロワー */
    /* #js-focus-trapは、ハンバーガーメニューを開いた際、フォーカスを外すため、追加 */
    #js-focus-trap {
        position: absolute;
        width: 0;
        height: 0;
        opacity: 0;
        pointer-events: none;
    }

    .header-nav {
        position: fixed;
        top: 0;
        right: -100%;
        z-index: 9;
        width: 100%;
        height: 100vh;
        height: 100svh;
        visibility: hidden;
        background-color: #fff;
        transition: 0.4s;
    }

    .header-nav__inner {
        width: 100%;
        padding: 60px var(--padding-container) 33px;
        height: 100%;
        /* 親の100%の高さ */
        overflow-y: auto;
        /* innerでスクロール */
        display: grid;
        place-items: center;
    }

    .header-nav.-active {
        right: 0;
        visibility: visible;
    }

    /* .header-nav__inner {
        width: 100%;
        padding: 0 var(--padding-container);
    } */

    .header-nav__list {
        width: fit-content;
        margin-inline: auto;
        gap: 2vh;
    }

    .header-nav__item {
        text-align: center;
    }

    .header-nav__item {
        color: #fff;
        width: 100%;
    }

    .header-nav__link {
        width: 100%;
        font-size: clamp(16px, 6.4vw, 30px);
        font-weight: var(--wght-regular);
        color: var(--color-base);
        display: flex;
        flex-direction: row;
        justify-content: center;
        align-items: center;
        gap: 1em;
        transition: color 0.4s;
    }

    /* 物件検索ボタン */
    .header-nav__search {
        color: var(--color-main);
        border: 2px solid var(--color-main);
        padding: 0.5em 2.5em;
        border-radius: 999px;
        font-size: clamp(14px, 4.8vw, 24px);
        display: inline-block;
        margin-bottom: 1vh;
    }

    /* SPではメールは他に並ぶデザインに戻す */
    .header-nav__item .header-nav__link-mail {
        background-color: transparent;
        border-radius: unset;
        padding: unset;
        color: var(--color-base);
        font-size: clamp(16px, 6.4vw, 30px);
    }

    /* メールアイコンは削除 */
    .header-nav__item .header-nav__link-mail::before {
        display: none;
    }

    .header-nav__contact {
        font-size: clamp(14px, 4.8vw, 24px);
        font-weight: var(--wght-bold);
        background: var(--gradient);
        border: 2px solid #fff;
        /* 影 */
        box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.25);
        padding: 0.835em 1em;
        height: clamp(40px, 18.13vw, 80px);
        display: grid;
        place-items: center;
        margin: 2vh 0;
    }

    /* 電話番号はオレンジの線で囲むデザインのボタン */
    .header-nav__btn {
        --font-min: 14;
        --font-max: ;
        font-size: clamp(18px, 9.6vw, 40px);
        font-family: 'roboto', sans-serif;
        font-weight: var(--wght-bold);
        line-height: 1;
        color: var(--color-main);
        border: 2px solid #FE8704;
        border-radius: 999px;
        /* 影 */
        box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.25);
        padding: 0.3em 0.65em;
        height: clamp(40px, 18.13vw, 80px);
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* ボタンに電話のアイコンを追加 */
    .header-nav__btn::before {
        content: '';
        display: inline-block;
        background: url(../../img/common/icon_phone-orange.svg) no-repeat center center / contain;
        aspect-ratio: 19/19;
        width: 0.7em;
        height: auto;
        margin-right: 0.25em;
    }

    /* ----------------------------------------
    ハンバーガーメニュー
    ---------------------------------------- */
    .hamburger {
        display: inline-block;
        height: 46px;
        margin-left: auto;
        position: fixed;
        z-index: 10;
        width: 46px;
        border: none;
        right: 9px;
        top: calc((65px - 46px)/2);
    }

    /* メインビジュアルスクロール終了後のスタイル：borderとbox-shadow */
    /* .hamburger {
        border: 2px solid var(--color-main);
        box-shadow: 0 2px 3px 0px rgba(0, 0, 0, 0.25);
    } */

    .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);
    }

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

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

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

    .hamburger__line:after {
        top: 5px;
    }

    .hamburger__text::before {
        content: 'MENU';
        position: absolute;
        bottom: 8px;
        left: 50%;
        transform: translateX(-50%);
        font-size: 8px;
        color: #fff;
        font-weight: var(--wght-bold);
        transition: all 0.4s;
    }

    /* activeがついたら線をcolor-mainに変更 */
    body.-active .hamburger .hamburger__line::before,
    body.-active .hamburger .hamburger__line::after {
        background-color: var(--color-main);
        z-index: 100;
    }
}