/* Hybrid floating global navigation */

.gnb-hybrid {
    --nav-navy: #1a2a3a;
    --nav-orange: var(--primary-orange, #E67E22);
    --nav-white: rgba(255, 255, 255, 0.4);
    --nav-transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1);
    position: fixed;
    top: 25px;
    left: 50%;
    z-index: 10000;
    width: min(94%, 1300px);
    height: 75px;
    display: flex;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 999px;
    background: var(--nav-white);
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.1);
    transform: translateX(-50%);
    transition: var(--nav-transition);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.gnb-hybrid.scrolled {
    top: 0;
    width: 100%;
    max-width: 100%;
    height: 84px;
    border-radius: 0;
    border-right: 0;
    border-left: 0;
    border-bottom: 1px solid #f1f1f1;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 4px 20px rgba(26, 42, 58, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.nav-inner-container {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 26px;
    padding: 0 34px;
}

.nav-logo {
    display: flex;
    flex: 0 0 150px;
    align-items: center;
    min-width: 150px;
    text-decoration: none;
}

.nav-logo img {
    display: block;
    width: auto;
    height: 34px;
    object-fit: contain;
}

.nav-menu {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(18px, 2.2vw, 30px);
    margin: 0;
    padding: 0;
    list-style: none;
}

.nav-menu > li {
    position: relative;
}

.nav-menu > li > a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 24px 0;
    color: var(--nav-navy);
    font-size: 0.94rem;
    font-weight: 780;
    text-decoration: none;
    transition: color 0.3s ease;
}

.nav-menu > li > a:hover {
    color: var(--nav-orange);
}

.nav-menu > li > a i {
    color: #b7bbc0;
    font-size: 0.68rem;
    transition: transform 0.3s ease, color 0.3s ease;
}

.has-sub:hover > a i {
    color: var(--nav-orange);
    transform: rotate(180deg);
}

.sub-menu {
    position: absolute;
    top: calc(100% + 12px);
    left: 50%;
    min-width: 210px;
    margin: 0;
    padding: 18px;
    border: 1px solid #f2f2f2;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 20px 50px rgba(26, 42, 58, 0.12);
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, 10px);
    transition: opacity 0.28s ease, transform 0.28s ease, visibility 0.28s ease;
}

.has-sub:hover .sub-menu,
.has-sub:focus-within .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
}

.sub-menu li + li {
    margin-top: 6px;
}

.sub-menu a {
    position: relative;
    display: block;
    padding: 10px 12px 10px 18px;
    border-radius: 12px;
    color: #555f6d;
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.sub-menu a::before {
    position: absolute;
    top: 50%;
    left: 6px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--nav-orange);
    content: "";
    opacity: 0;
    transform: translateY(-50%);
    transition: opacity 0.25s ease;
}

.sub-menu a:hover {
    background: #faf8f5;
    color: var(--nav-orange);
    transform: translateX(4px);
}

.sub-menu a:hover::before {
    opacity: 1;
}

.branch-sub-menu a::after {
    display: inline-block;
    width: 28px;
    height: 3px;
    margin-left: 10px;
    border-radius: 999px;
    vertical-align: middle;
    content: "";
}

.branch-suwon::after {
    background: var(--nav-orange);
}

.branch-glanz::after {
    background: #1a2a3a;
}

.branch-starfield::after {
    background: #E31E24;
}

.nav-util {
    display: flex;
    flex: 0 0 228px;
    align-items: center;
    justify-content: flex-end;
    gap: 22px;
    min-width: 228px;
}

.util-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-right: 20px;
    border-right: 1px solid #ddd;
}

.util-link {
    color: var(--nav-navy);
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.08em;
    text-decoration: none;
    white-space: nowrap;
}

.btn-search {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: rgba(26, 42, 58, 0.05);
    color: var(--nav-navy);
    cursor: pointer;
    transition: var(--nav-transition);
}

.btn-search:hover {
    background: var(--nav-orange);
    color: #fff;
}

.social-icons {
    display: flex;
    align-items: center;
    gap: 12px;
}

.social-icons a {
    color: var(--nav-navy);
    font-size: 1rem;
    opacity: 0.62;
    transition: opacity 0.25s ease, transform 0.25s ease, color 0.25s ease;
}

.social-icons a:hover {
    color: var(--nav-orange);
    opacity: 1;
    transform: translateY(-3px);
}

.menu-toggle {
    display: none;
    position: relative;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: var(--nav-navy);
    cursor: pointer;
}

.menu-toggle span {
    position: absolute;
    left: 9px;
    width: 16px;
    height: 2px;
    border-radius: 999px;
    background: #fff;
    transition: transform 0.3s ease, top 0.3s ease;
}

.menu-toggle span:first-child {
    top: 12px;
}

.menu-toggle span:last-child {
    top: 20px;
}

.menu-toggle.active span:first-child {
    top: 16px;
    transform: rotate(45deg);
}

.menu-toggle.active span:last-child {
    top: 16px;
    transform: rotate(-45deg);
}

@media (max-width: 1200px) {
    .gnb-hybrid {
        top: 16px;
        height: 66px;
    }

    .gnb-hybrid.scrolled {
        height: 72px;
    }

    .nav-inner-container {
        padding: 0 22px;
    }

    .nav-menu,
    .social-icons {
        display: none;
    }

    .nav-util {
        flex-basis: auto;
        min-width: 0;
    }

    .util-actions {
        border-right: 0;
        padding-right: 0;
    }

    .menu-toggle {
        display: inline-flex;
    }
}

@media (max-width: 560px) {
    .gnb-hybrid {
        width: calc(100% - 24px);
    }

    .nav-logo {
        flex-basis: auto;
        min-width: 0;
    }

    .nav-logo img {
        height: 30px;
    }

    .util-link,
    .btn-search {
        display: none;
    }
}
