@charset "utf-8";

.hamburger {
    margin: 0 auto;
    width: 100%;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.hamburger .btn-gNav {
    position: fixed;
    right: 20px;
    width: 30px;
    height: 24px;
    z-index: 999;
    box-sizing: border-box;
    cursor: pointer;
    transition: all 400ms;
    margin: 20px 0;
    display: none;
}

.hamburger .btn-gNav span {
    position: absolute;
    width: 100%;
    height: 3px;
    background: #3A342E;
    border-radius: 10px;
    transition: all 400ms;
}

.hamburger .btn-gNav span:nth-child(1) { top: 0; }
.hamburger .btn-gNav span:nth-child(2) { top: 10px; }
.hamburger .btn-gNav span:nth-child(3) { top: 20px; }

.hamburger .btn-gNav.open span:nth-child(1) {
    top: 10px;
    transform: rotate(-45deg);
}
.hamburger .btn-gNav.open span:nth-child(2) {
    opacity: 0;
}
.hamburger .btn-gNav.open span:nth-child(3) {
    top: 10px;
    transform: rotate(45deg);
}

.gNav .gNav-menu {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin: 0;
    padding: 0;
    list-style: none;
}

.gNav .gNav-menu li {
    height: 72px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 0.9em;
}

.gNav .gNav-menu li a {
    color: #3A342E;
    font-weight: 500;
    font-size: 14px;
    letter-spacing: 0.14em;
    transition: color 0.2s;
}
.gNav .gNav-menu li a:hover {
    color: #D08A6A;
}

.gNav .gNav-menu > .has-sub {
    position: relative;
    overflow: visible;
}
.gNav-sub {
    position: absolute;
    top: calc(100% - 8px);
    left: 50%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.55em;
    margin: 0;
    padding: 14px 20px 12px;
    list-style: none;
    background: rgba(237, 228, 228, 0.96);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    box-shadow: 0 10px 28px rgba(58, 52, 46, 0.1);
    white-space: nowrap;
    text-align: left;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateX(-50%) translateY(8px);
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;
    z-index: 20;
}
.gNav-sub::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: -14px;
    height: 14px;
}
.has-sub:hover .gNav-sub,
.has-sub:focus-within .gNav-sub {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}
.has-sub:hover > a,
.has-sub:focus-within > a {
    color: #D08A6A;
}
.gNav-sub li {
    height: auto !important;
    padding: 0 !important;
}
.gNav-sub a {
    font-size: 12px !important;
    font-weight: 500;
    letter-spacing: 0.12em !important;
    color: #3A342E;
    padding: 4px 2px;
}
.gNav-sub a:hover {
    color: #D08A6A;
}

@media screen and (max-width: 1180px) {
    .hamburger .btn-gNav {
        display: block;
        top: calc(20px + env(safe-area-inset-top));
        right: max(16px, env(safe-area-inset-right));
        margin: 0;
    }

    .gNav {
        position: fixed;
        top: 0;
        right: 0;
        width: 100%;
        height: 100vh;
        height: 100dvh;
        padding-top: env(safe-area-inset-top);
        padding-bottom: env(safe-area-inset-bottom);
        box-sizing: border-box;
        background: rgba(237, 228, 228, 0.98);
        transform: translateX(100%);
        transition: transform 0.35s ease;
        z-index: 998;
        display: flex;
        align-items: center;
        justify-content: center;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    .gNav.open {
        transform: translateX(0);
    }
    .gNav .gNav-menu {
        flex-direction: column;
        gap: 8px;
    }
    .gNav .gNav-menu li {
        height: auto;
        padding: 14px 0;
    }
    .gNav .gNav-menu li a {
        font-size: 18px;
        letter-spacing: 0.2em;
    }

    .gNav .has-sub {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    .gNav-sub {
        position: static;
        left: auto;
        top: auto;
        transform: none;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        flex-direction: column;
        gap: 10px;
        padding: 4px 0 0;
        background: none;
        box-shadow: none;
        backdrop-filter: none;
        border-radius: 0;
        white-space: normal;
    }
    .gNav-sub::before {
        display: none;
    }
    .gNav-sub a {
        font-size: 15px !important;
        letter-spacing: 0.14em !important;
        color: #6B635A;
    }
}
