/**
 * 헤더 최상위 레이아웃 및 블러 배경 설정
 */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/**
 * 헤더 내부 컨테이너 정렬
 */
.site-header-inner {
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

/**
 * 로고 및 브랜드 텍스트 영역
 */
.brand {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 11.25rem;
}

.brand-logo {
    font-size: 1.75rem;
    font-weight: 900;
    letter-spacing: -0.03em;
    color: var(--color-text);
}

.brand-sub {
    margin-top: 0.125rem;
    font-size: 0.75rem;
    color: var(--color-sub-text);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

/**
 * 글로벌 네비게이션 바 (GNB) 레이아웃
 */
.gnb {
    display: flex;
    align-items: center;
    flex: 1;
    justify-content: center;
}

.gnb-list {
    display: flex;
    align-items: center;
    gap: 2.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

/**
 * GNB 메인 메뉴 아이템 및 하단 라인 호버 애니메이션
 */
.gnb-item {
    position: relative;
}

.gnb-item > a {
    position: relative;
    display: inline-flex;
    align-items: center;
    height: var(--header-height);
    font-size: 0.9375rem;
    font-weight: 600;
    color: #2d2d2d;
    transition: color 0.3s ease;
}

.gnb-item > a::after {
    content: '';
    position: absolute;
    bottom: 1.25rem;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 100%;
    height: 2px;
    background-color: var(--color-point);
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    transform-origin: center;
}

.gnb-item:hover > a {
    color: var(--color-point);
}

.gnb-item:hover > a::after {
    transform: translateX(-50%) scaleX(1);
}

/**
 * GNB 서브 메뉴 드롭다운 스타일 및 트랜지션
 */
.sub-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    min-width: 12.5rem;
    margin: 0;
    padding: 0.75rem 0;
    list-style: none;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-radius: 1rem;
    box-shadow: 0 1.25rem 2.5rem rgba(0, 0, 0, 0.06);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.gnb-item:hover .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.sub-menu li a {
    display: block;
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #555;
    transition: all 0.2s ease;
}

.sub-menu li a:hover {
    background: rgba(31, 58, 95, 0.04);
    color: var(--color-point);
    padding-left: 1.5rem;
}

/**
 * 우측 유저 액션 및 버튼 영역
 */
.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.btn-header {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1.125rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-text);
    background: transparent;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 99rem;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-header:hover {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.25);
}
/**
 * 알림 아이콘 버튼
 */
.btn-noti {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border: none;
    background: transparent;
    border-radius: 50%;
    color: var(--color-text);
    cursor: pointer;
    transition: background 0.2s ease;
    padding: 0;
}

.btn-noti:hover {
    background: rgba(0, 0, 0, 0.05);
}

.btn-noti svg {
    width: 1.25rem;
    height: 1.25rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/**
 * 알림 상태 표시 배지
 */
.noti-badge {
    position: absolute;
    top: 0.375rem;
    right: 0.4375rem;
    width: 0.375rem;
    height: 0.375rem;
    background-color: #ff4757;
    border-radius: 50%;
    border: 2px solid #ffffff;
}

/**
 * 로그인 사용자 이름
 */
.login-user {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--color-text);
    margin-right: 0.25rem;
}

.logout-form {
    margin: 0;
}

/**
 * 모바일 햄버거 메뉴 버튼
 */
.mobile-menu-btn {
    display: none;
    width: 2.875rem;
    height: 2.875rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: #ffffff;
    border-radius: 0.875rem;
    font-size: 1.125rem;
    cursor: pointer;
    transition: background 0.2s ease;
}

.mobile-menu-btn:hover {
    background: #f7f8fa;
}

/**
 * 반응형 모바일 헤더 레이아웃
 */
@media (max-width: 53.75rem) {
    .site-header-inner {
        height: auto;
        padding: 1rem 0;
        flex-wrap: wrap;
    }

    .mobile-menu-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        order: 2;
    }

    .header-actions {
        margin-left: auto;
        order: 3;
        flex-wrap: wrap;
        justify-content: flex-end;
    }

    .gnb {
        display: none;
        width: 100%;
        order: 4;
        justify-content: flex-start;
        padding-top: 0.5rem;
        animation: slideDown 0.3s ease forwards;
    }

    .gnb.is-open {
        display: block;
    }

    .gnb-list {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        width: 100%;
    }

    .gnb-item > a {
        height: auto;
        padding: 1rem 0;
        border-bottom: 1px solid rgba(0, 0, 0, 0.04);
        width: 100%;
    }

    .gnb-item > a::after {
        display: none;
    }

    .sub-menu {
        position: static;
        transform: none;
        min-width: auto;
        margin-top: 0;
        padding: 0.5rem 0 1rem 1rem;
        border: none;
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        background: transparent;
    }

    .sub-menu li a {
        padding: 0.5rem 0;
    }

    .sub-menu li a:hover {
        padding-left: 0.75rem;
        background: transparent;
    }

    @keyframes slideDown {
        from { opacity: 0; transform: translateY(-10px); }
        to { opacity: 1; transform: translateY(0); }
    }
}
