/* ============================================================
   GNB(Global Navigation Bar) 전용 스타일
   gnb.css
   ============================================================ */

/* ── PC GNB (≥1024px) ── */
.gnb-header {
    position: fixed;
    top: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 64rem;
    z-index: 500;
}

.gnb-capsule {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 1.25rem;
    border-radius: 9999px;
    background: rgba(2, 6, 23, 0.30);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(6, 182, 212, 0.10);
    box-shadow: 0 4px 24px rgba(0,0,0,0.2);
}

.gnb-logo {
    font-size: 1.1rem;
    font-weight: 800;
    color: #ffffff;
    text-decoration: none;
    letter-spacing: -0.01em;
    white-space: nowrap;
    flex-shrink: 0;
}
.gnb-logo span { color: rgba(6,182,212,0.9); }

.gnb-menu {
    display: flex;
    align-items: center;
    gap: 2.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.gnb-menu-item { position: relative; }

.gnb-link {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.9375rem;
    font-weight: 400;
    color: rgba(226, 232, 240, 0.75);
    text-decoration: none;
    padding: 0.35rem 0;
    white-space: nowrap;
    letter-spacing: 0.02em;
    transition: color 0.2s;
    border-bottom: 2px solid transparent;
}
.gnb-link:hover,
.gnb-link.nav-active {
    color: #ffffff;
    border-bottom-color: rgba(6, 182, 212, 0.8);
}
.gnb-link svg { flex-shrink: 0; opacity: 0.55; transition: opacity 0.2s; }
.gnb-link:hover svg { opacity: 1; }

.gnb-dropdown {
    position: absolute;
    top: calc(100% + 1rem);
    left: 50%;
    transform: translateX(-50%);
    min-width: 160px;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.875rem 1rem;
    border-radius: 1rem;
    background: rgba(15, 23, 42, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(6, 182, 212, 0.18);
    box-shadow: 0 16px 48px rgba(0,0,0,0.45);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.18s ease, visibility 0.18s ease, transform 0.18s ease;
    transform: translateX(-50%) translateY(-4px);
}
.gnb-menu-item:hover .gnb-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.gnb-dropdown a {
    display: block;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: rgba(203, 213, 225, 0.85);
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s;
}
.gnb-dropdown a:hover,
.gnb-dropdown a.nav-active {
    background: rgba(6, 182, 212, 0.12);
    color: #ffffff;
}

.gnb-cta {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 1.25rem;
    border-radius: 9999px;
    background: rgb(8, 145, 178);
    color: #ffffff !important;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    border: none;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background 0.2s, transform 0.15s;
    cursor: pointer !important;
}

.gnb-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 3rem;
    height: 3rem;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 50%;
    cursor: pointer !important;
    flex-shrink: 0;
}
.gnb-hamburger span {
    display: block;
    width: 20px;
    height: 2px;
    background: rgba(226,232,240,0.85);
    border-radius: 2px;
    transition: all 0.25s ease;
}

/* ── 모바일 풀스크린 메뉴 ── */
.mob-menu {
    position: fixed;
    inset: 0;
    z-index: 600;
    display: flex;
    flex-direction: column;
    background: rgba(15, 23, 42, 0.40);
    backdrop-filter: blur(32px);
    -webkit-backdrop-filter: blur(32px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}
.mob-menu.open { opacity: 1; visibility: visible; }
.mob-menu.open .mob-menu__list { animation: slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1) both; }

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-16px); }
    to   { opacity: 1; transform: translateY(0); }
}

.mob-menu__close {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 50%;
    color: rgba(255,255,255,0.8);
    cursor: pointer !important;
    z-index: 700;
}

.mob-menu__list {
    flex: 1;
    overflow-y: auto;
    padding: 5.5rem 1.5rem 8rem;
    display: flex;
    flex-direction: column;
    gap: 0;
    text-align: left;
}

.mob-depth1 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 1.25rem;
    font-weight: 500;
    color: rgba(241, 245, 249, 0.92);
    text-decoration: none;
    padding: 0.65rem 0;
    border: none;
    background: transparent;
    width: 100%;
}
.mob-depth1:hover, .mob-depth1.nav-active { color: rgb(103, 232, 249); }
.mob-depth1 svg { transition: transform 0.25s; }
.mob-depth1[aria-expanded="true"] svg { transform: rotate(180deg); }

.mob-menu__divider { border: none; border-top: 1px solid rgba(255,255,255,0.05); margin: 0.1rem 0; }

.mob-accordion { max-height: 0; overflow: hidden; transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
.mob-accordion.open { max-height: 320px; }
.mob-accordion__inner { display: flex; flex-direction: column; gap: 0; padding-left: 1rem; padding-bottom: 0.5rem; }

.mob-depth2 {
    display: block;
    font-size: 1.1rem;
    font-weight: 500;
    color: rgba(148, 163, 184, 0.9);
    text-decoration: none;
    padding: 0.55rem 0.5rem;
    border-radius: 0.4rem;
}
.mob-depth2:hover, .mob-depth2.nav-active { color: rgb(103, 232, 249); background: rgba(6,182,212,0.07); }

.mob-menu__cta-wrap { position: fixed; bottom: 1.5rem; left: 1.5rem; right: 1.5rem; }
.mob-menu__cta {
    display: block;
    width: 100%;
    padding: 1rem;
    border-radius: 1rem;
    background: rgba(8, 145, 178, 0.90);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #ffffff;
    font-size: 1.125rem;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    box-shadow: 0 4px 20px rgba(8, 145, 178, 0.30);
}

@media (max-width: 1023px) {
    .gnb-menu { display: none; }
    .gnb-cta { display: none; }
    .gnb-hamburger { display: flex; }
}

@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
#loadingOverlay {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background-color: #020617; z-index: 9999;
    display: flex; justify-content: center; align-items: center;
    transition: opacity 0.5s ease;
}
.spinner {
    width: 48px; height: 48px;
    border: 4px solid rgba(255,255,255,0.1);
    border-top-color: rgb(6,182,212);
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
}
