html {
    scroll-behavior: smooth;
}


section[id] {
    scroll-margin-top: 12rem;
}

.header {
    position: fixed;
    top: 1.3rem;
    right: 0;
    left: 0;
    z-index: 99;
    width: 119.6rem;
    height: 6.7rem;
    background-color: #fff;
    border-radius: 5rem;
    margin: 0 auto;
    font-family: 'Noto Sans JP', sans-serif;
}

.header.off {
    display: none;
}

.header__inner {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.2rem 3.9rem;
}

.header__logo {
    width: 14.1rem;
    height: 4.3rem;
}

.header__container {
    display: flex;
    align-items: center;
    gap: 3.5rem;
}
.gnav__list {
    display: flex;
    align-items: center;
    gap: 3rem;
}

.gnav__item {
    position: relative;
    font-size: 1.6rem;
    font-weight: 500;
    line-height: calc(100 / 100);
    letter-spacing: calc(0 / 100 * 20 / 10 * 1rem);
}

.gnav__parent {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.gnav__item > a,
.gnav__parent > a {
    color: #181F20;
    position: relative;
    display: inline-block;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid transparent;
    transform: 0.3s;
}

.gnav__item > a:hover::after,
.gnav__parent > a:hover::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 2px;
    background-color: #EE7B49;
}

.gnav__item.current > a::after,
.gnav__item.current .gnav__parent > a::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 2px;
    background-color: #EE7B49;
}

.gnav__item > a:focus-visible,
.gnav__parent > a:focus-visible,
.gnav__submenu-toggle:focus-visible {
    outline: 0.2rem solid #EE7B49;
    outline-offset: 0.3rem;
    border-radius: 0.2rem;
}

.gnav__submenu-toggle {
    position: relative;
    width: 1.8rem;
    height: 1.8rem;
    padding: 0;
    cursor: pointer;
}

.gnav__submenu-toggle::before {
    content: "";
    position: absolute;
    top: 0.4rem;
    left: 0.5rem;
    width: 0.6rem;
    height: 0.6rem;
    border-right: 0.2rem solid #181F20;
    border-bottom: 0.2rem solid #181F20;
    transform: rotate(45deg);
    transition: transform 0.2s ease, top 0.2s ease;
}

.gnav__item--has-submenu.is-open .gnav__submenu-toggle::before {
    top: 0.7rem;
    transform: rotate(225deg);
}

.gnav__submenu {
    position: absolute;
    top: calc(100% + 1rem);
    left: 50%;
    z-index: 1;
    min-width: 20rem;
    padding: 1rem;
    background-color: #fff;
    border-radius: 1rem;
    box-shadow: 0 0.8rem 2rem rgba(24, 31, 32, 0.15);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translate(-50%, -0.6rem);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.gnav__submenu::before {
    content: "";
    position: absolute;
    right: 0;
    bottom: 100%;
    left: 0;
    height: 1rem;
}

.gnav__item--has-submenu.is-open .gnav__submenu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate(-50%, 0);
}

@media (hover: hover) and (pointer: fine) {
    .gnav__item--has-submenu:hover .gnav__submenu {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translate(-50%, 0);
    }
}

.gnav__submenu a {
    display: block;
    padding: 1rem 1.2rem;
    color: #181F20;
    white-space: nowrap;
    border-radius: 0.6rem;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.gnav__submenu-child a {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.gnav__submenu-child a::before {
    content: "";
    flex-shrink: 0;
    width: 1rem;
    height: 0.1rem;
    background-color: #EE7B49;
}

.gnav__submenu a:hover,
.gnav__submenu a:focus-visible {
    color: #EE7B49;
    background-color: #fff1d8;
}

.gnav__submenu a:focus-visible {
    outline: 0.2rem solid #EE7B49;
    outline-offset: -0.2rem;
}

.header__list {
    display: flex;
    gap: 0.4rem;
}
.header__english {
    width: 2.4rem;
    height: 2.4rem;
}

.header__korean {
    width: 2.9rem;
    height: 2.4rem;
}

.header__contact a {
    display: flex;
    align-items: center;
    width: 15.4rem;
    height: 4rem;
    font-size: 1.5rem;
    font-weight: 500;
    line-height: calc(100 / 100);
    letter-spacing: calc(0 / 100 * 20 / 10 * 1rem);
    color: #fff;
    background-color: #EE7B49;
    border-radius: 1rem;
    padding-left: 5rem;
    background-image: url('../img/header_footer/header_contact_icon1.svg');
    background-repeat: no-repeat;
    background-position:  1.7rem center;
    background-size: 2.7rem 2.7rem;
    transition: 0.3s;
}

.header__contact a:hover,
.header__contact a:focus-visible {
    color: #EE7B49;
    background-color: #fff;
    background-image: url('../img/header_footer/header_contact_icon2.svg');
}

.header__contact a:focus-visible {
    outline: 0.2rem solid #EE7B49;
    outline-offset: 0.3rem;
}

.page-nav,
.page-nav__btns {
    display: none;
}

@media screen and (max-width: 699.98px) {

    section[id] {
        scroll-margin-top: 9rem;
    }
    .header {
        width: 33.5rem;
        height: 5.6rem;
        isolation: isolate;
    }

    .header::before {
        content: "";
        position: absolute;
        inset: 0;
        z-index: 92;
        background-color: #fff;
        border-radius: 5rem;
        pointer-events: none;
    }

    .header__inner {
        flex-direction: column;
        padding: 1.1rem 1.4rem;
        align-items: start;
        position: relative;
    }

    .header__logo {
        width: 11rem;
        height: 3.4rem;
    }

    .sbtn {
        position: absolute;
        top: 2.5rem;
        right: 2rem;

        width: 2.4rem;
        height: 2.4rem;
        transform: translateY(-50%);
        cursor: pointer;
    }

    .sbtn span {
        position: absolute;
        left: 0;
        width: 100%;
        height: 1px;
        background-color: #181f20;
        transition:
            top 0.3s ease,
            transform 0.3s ease,
            opacity 0.3s ease;
    }

    .sbtn span:nth-child(1) {
        top: 0.4rem;
    }

    .sbtn span:nth-child(2) {
        top: 1.15rem;
    }

    .sbtn span:nth-child(3) {
        top: 1.9rem;
    }

    .sbtn.active span:nth-child(1) {
        top: 1.15rem;
        transform: rotate(45deg);
    }

    .sbtn.active span:nth-child(2) {
        opacity: 0;
    }

    .sbtn.active span:nth-child(3) {
        top: 1.15rem;
        transform: rotate(-45deg);
    }

    .header__logo,
    .sbtn {
        position: absolute;
        z-index: 93;
    }
    
    .header__container {
        flex-direction: column;
        align-items: start;
        gap: 0;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        height: 100vh;
        z-index: 90;
        padding: 10.8rem 2rem 2rem;
        background-color: #fff1d8;
        background-image:
            url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='5' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.3'/%3E%3C/svg%3E"),
            radial-gradient(
                circle at 90% 10%,
                rgba(255, 224, 90, 0.3) 0%,
                transparent 35%
            ),
            linear-gradient(
                90deg,
                #c8f1f3 0%,
                #E6EDE8 20%,
                #f8dfbb 40%,
                #F8DFBB 60%,
                #F9CCA2 100%
            );
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        overflow-y: auto;
        transition:
            opacity 0.3s ease,
            visibility 0.3s ease;
    }
    .header__container.active {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    body.menu-open {
        overflow: hidden;
    }

    .snav__item a {
        display: flex;
        padding: 1.8rem 0;
        align-items: center;
        width: 33.5rem;
        height: 5.5rem;
        color: #181F20;
        border-bottom: 1px solid #000000;
        font-size: 1.6rem;
        font-weight: 500;
        line-height: calc(100 / 100);
        letter-spacing: calc(0 / 100 * 20 / 10 * 1rem);
    }

    .snav__item summary {
        position: relative;
        display: flex;
        align-items: center;
        width: 33.5rem;
        height: 5.5rem;
        padding: 1.8rem 3.2rem 1.8rem 0;
        color: #181F20;
        border-bottom: 1px solid #000;
        font-size: 1.6rem;
        font-weight: 500;
        cursor: pointer;
        list-style: none;
    }

    .snav__item summary::-webkit-details-marker {
        display: none;
    }

    .snav__item summary::after {
        content: "+";
        position: absolute;
        right: 1rem;
        font-size: 2.2rem;
        font-weight: 300;
    }

    .snav__item details[open] summary::after {
        content: "−";
    }

    .snav__item a:focus-visible,
    .snav__item summary:focus-visible {
        outline: 0.2rem solid #EE7B49;
        outline-offset: -0.2rem;
    }

    .snav__submenu {
        padding: 0.6rem 0 0.6rem 1.6rem;
        border-bottom: 1px solid #000;
    }

    .snav__submenu li a {
        width: 31.9rem;
        height: auto;
        min-height: 4.4rem;
        padding: 1.2rem 0;
        border-bottom-color: rgba(0, 0, 0, 0.25);
        font-size: 1.4rem;
    }

    .snav__submenu-child a {
        gap: 0.8rem;
    }

    .snav__submenu-child a::before {
        content: "";
        flex-shrink: 0;
        width: 1rem;
        height: 0.2rem;
        background-color: #EE7B49;
    }

    .snav__submenu li:last-child a {
        border-bottom: 0;
    }

    .header__language {
        align-content: center;
        width: 33.5rem;
        height: 5.5rem;
        color: #181F20;
        border-bottom: 1px solid #000000;
        margin-bottom: 3rem;
        gap: 1.4rem;
    }

    .header__english,
    .header__korean {
        width: 4rem;
        height: 4rem;
    }

    .header__contact a {
        width: 33.5rem;
        height: 5.6rem;
        font-size: 1.4rem;
        padding-left: 15.8rem;
        background-position: 12rem center;
    }
    
    /* ページ内リンク */
    .page-nav {
        display: block;
        position: fixed;
        top: 50%;
        bottom: 50%;
        right: 0;
        width: 37.5rem;
        overflow: hidden;
        z-index: 98;
        background-color: #fff;
        visibility: hidden;
        transition: top 0.3s ease, bottom 0.3s ease, visibility 0s linear 0.3s;
    }

    .page-nav.active {
        top: 0;
        bottom: 0;
        visibility: visible;
        transition: top 0.3s ease, bottom 0.3s ease, visibility 0s linear 0s;
    }

    .page-nav__list {
        bottom: 7rem;
        left: 0;
        right: 0;
        max-height: calc(100vh - 15rem - 15rem);
        overflow: auto;
        width: 28rem;
        margin: 15rem auto 10rem;
        border-top: 1px solid #EE7B49;
    }

    .page-nav__item a {
        display: flex;
        align-items: center;
        box-sizing: border-box;
        font-size: 2rem;
        font-family: 'Noto Sans JP',sans-serif; 
        font-weight: 700;
        line-height: calc(113 / 100);
        letter-spacing: calc(2 / 100 * 20 / 20 * 1rem);
        width: 28rem;
        height: 5.8rem;
        padding: 0.8rem 0;
        background-image: url('../img/header_footer/page-nav_item_icon1.svg');
        background-size: 2.6rem 2.6rem;
        background-repeat: no-repeat;
        background-position: center right 0.8rem;
        color: #1E2328;
        border-bottom: 1px solid #EE7B49;
        margin-bottom: 2.4rem;
    }

    .page-nav__top {
        position: fixed;
        right: 10rem;
        bottom: 4rem;
        font-size: 1.8rem;
        font-family: 'Noto Sans JP',sans-serif; 
        font-weight: 700;
        line-height: calc(112 / 100);
        color: #1E2328;
    }

    .page-nav__top span {
        color: #EE7B49;
        margin-right: 1rem;
    }

    .page-nav__btns{
        display: block;
        position: fixed;
        right: 2rem;
        top: 8rem;
        z-index: 99;
    }

    .page-nav__btn {
        display: block;
        width: 6rem;
        height: 6rem;
        border-radius: 50%;
        background-repeat: no-repeat;
        background-position: top 1.4rem center;
        font-size: 1.2rem;
        font-family: 'Noto Sans JP',sans-serif; 
        font-weight: 500;
        line-height: calc(112 / 100);
        padding: 2.5rem 0 0;
        color: #fff;;
        background-color: #EE7B49;
    }
    .page-nav__btn--open {
        background-image: url('../img/header_footer/page-nav_btn_icon1.svg');
        background-size: 3.5rem auto;
    }

    .page-nav__btn--close {
        display: none;
        background-image: url('../img/header_footer/page-nav_btn_icon2.svg');
        background-size: 2.2rem 2.2rem;
    }

    /* 開いた状態：openボタンを隠し、closeボタンを表示 */
    .page-nav__btns.active .page-nav__btn--open {
        display: none;
    }

    .page-nav__btns.active .page-nav__btn--close {
        display: block;
    }
}
