.header {
    position: fixed;
    top: 0;
    left: 0px;
    width: 100%;
    max-width: 1600px;
    margin-inline: auto;
    z-index: 1000;
    transition: all 0.3s ease;

    @media screen and (min-width: 1600px) and (max-width: 1920px) {
        left: calc(160px * (100vw - 1600px) / (1920px - 1600px));
    }

    @media screen and (min-width: 1920px) {
        left: 160px;
    }

    @media screen and (max-width: 768px) {
        background-color: var(--white-color);
    }
}

.header__wrapper {
    padding-top: 47px;
    padding-inline: 19px 63px;
    display: flex;
    justify-content: space-between;

    @media screen and (max-width: 1024px) {
        padding-inline: 20px;
    }

    @media screen and (max-width: 768px) {
        padding-left: 10vw;
    }

    @media screen and (max-width: 570px) {
        padding-block: 10px 15px;
    }
}

.header__logo-link {
    display: inline-block;
    text-decoration: none;
}

.header__logo-img {
    width: 227px;
    height: 56px;
    aspect-ratio: 227 / 56;

    @media screen and (max-width: 768px) {
        width: auto;
        height: 10vw;
    }
}

/* 769px以下のレスポンシブスタイル */
@media screen and (max-width: 768px) {
    .header__nav {
        display: none;
    }
}

.header__nav-list {
    display: flex;
    gap: 20px;
    align-items: center;
    font-size: 15px;
    color: #2B0E3C;
    font-family: var(--sub-font-family);
    font-weight: 700;
    line-height: 1.2;

    @media screen and (max-width: 1024px) {
        gap: 15px;
    }
}

.header__nav-link {
    display: inline-block;
    text-decoration: none;
    color: inherit;
    transition: opacity 0.3s ease, transform 0.2s ease, color 0.3s ease;
    padding: 5px 0;

    &:hover {
        opacity: 0.8;
        transform: translateY(-2px);
        color: var(--main-color);
    }
}

/* ハンバーガーメニューボタン */
.header__menu-toggle {
    background: linear-gradient(84deg, var(--gradient-start-color), var(--gradient-end-color));
    border: none;
    cursor: pointer;
    padding: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    color: var(--white-color);
    font-family: var(--sub-font-family);
    font-weight: 700;
    font-size: 12px;
    width: 86px;
    height: 86px;
    border-radius: 50%;
    z-index: 1001;
    position: relative;
    transition: opacity 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;

    @media screen and (max-width: 570px) {
        width: 50px;
        height: 50px;
    }
}

.header__menu-toggle:hover {
    opacity: 0.9;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(99, 22, 110, 0.3);
}

.header__menu-toggle:active {
    transform: scale(0.98);
}

/* モバイルコントロール（ハンバーガーメニューとインスタグラムロゴ） */
.header__mobile-controls {
    display: none;

    @media screen and (max-width: 768px) {
        display: flex;
        align-items: center;
        gap: 15px;
    }
}

.header__instagram-link {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: opacity 0.3s ease, transform 0.2s ease;
}


.header__instagram-link:hover {
    opacity: 0.8;
    transform: scale(1.1);
}

.header__instagram-img {
    width: 30px;
    height: 30px;
    display: block;
    z-index: 9999;

    @media screen and (max-width: 768px) {
        width: 50px;
        height: 50px;
    }

    @media screen and (max-width: 570px) {
        width: 40px;
        height: 40px;
    }
}

.header__menu-toggle-icon {
    width: 30px;
    height: 24px;
    position: relative;
    display: block;
    background-color: transparent;

    @media screen and (max-width: 570px) {
        width: 24px;
        height: 16px;
    }
}

.header__menu-toggle-icon::before,
.header__menu-toggle-icon::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 4px;
    background-color: var(--white-color);
    transition: all 0.3s ease;

    @media screen and (max-width: 570px) {
        height: 3px;
    }
}

.header__menu-toggle-icon::before {
    top: 0;
    right: 2px;

    @media screen and (max-width: 570px) {
        top: 2px;
    }
}

.header__menu-toggle-icon::after {
    bottom: 5px;
    left: 4px;

    @media screen and (max-width: 570px) {
        bottom: 2px;
    }
}

/* メニューが開いている時のアニメーション */
.header__menu-toggle[aria-expanded="true"] .header__menu-toggle-icon {
    background-color: transparent;
}

.header__menu-toggle[aria-expanded="true"] .header__menu-toggle-icon::before {
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%) rotate(45deg);
}

.header__menu-toggle[aria-expanded="true"] .header__menu-toggle-icon::after {
    top: 50%;
    left: 0;
    bottom: auto;
    transform: translateY(-50%) rotate(-45deg);
}

.header__menu-toggle-text {
    font-size: 12px;
    font-weight: 700;
}

/* モバイルメニュー */
.header__nav-mobile {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: var(--white-color);
    z-index: 999;
    padding-top: 120px;
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.header__nav-mobile.is-open {
    transform: translateX(0);
}

.header__nav-mobile-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.header__nav-mobile-item {
    border-bottom: 1px solid rgba(99, 22, 110, 0.1);
}

.header__nav-mobile-link {
    display: block;
    padding: 20px 30px;
    color: var(--main-color);
    font-family: var(--sub-font-family);
    font-weight: 700;
    font-size: 16px;
    text-decoration: none;
    transition: background-color 0.3s ease, transform 0.2s ease, opacity 0.3s ease;

    &:hover,
    &:focus {
        background-color: rgba(99, 22, 110, 0.1);
        transform: translateX(5px);
        opacity: 0.9;
    }
}

.header__nav-mobile-link-text {
    display: block;
}

.header__nav-mobile-link-en {
    display: inline-block;
    font-size: 11px;
    font-weight: 400;
    margin-left: 8px;
    opacity: 0.7;
}

.header__nav-img {
    display: block;
    width: 30px;
    height: 30px;
    aspect-ratio: 30 / 30;
}
