/* 레이아웃 CSS */
@media all and (max-width:1024px) { 
    .gnb_wrap .inner {padding-left: 0px !important; padding-right: 0px !important;}
}

/* PC GNB 전체 메뉴 스타일 (v11 - 최종 안정화 버전) */
/* JS와 함께 작동하며, 마우스 이동 시 메뉴가 닫히는 현상을 해결합니다. */

/* --- 전체 메뉴 배경 --- */
.gnb_bg {
    display: none;
    position: absolute;
    left: 0;
    top: 80px; /* 헤더 높이에 맞게 조정 */
    width: 100%;
    background-color: #fff;
    border-top: 1px solid #e8e8e8;
    box-shadow: 0 5px 5px rgba(0,0,0,0.05);
    height: 260px; /* 2차 메뉴 높이에 맞게 조정 */
    z-index: 998;
}

/* 1차 메뉴 레이아웃 */
#header .gnb_wrap #cbp-hrmenu.pc > ul {
    display: flex;
    justify-content: space-around;
    position: relative;
    z-index: 999;
    /* [최종 해결책] 마우스 이동 경로의 틈을 메우는 투명한 '다리' 역할 */
    padding-bottom: 20px;
    /* '다리'가 다른 레이아웃을 밀어내지 않도록 음수 마진으로 보정 */
    margin-bottom: -20px;
}

#header .gnb_wrap #cbp-hrmenu.pc > ul > li {
    flex: 1;
    text-align: center;
    position: relative; /* 2차 메뉴의 position 기준점 */
}

#cbp-hrmenu.pc > ul > li > a {
    white-space: nowrap;
}

/* 2차 메뉴 기본 상태 (숨김) */
#cbp-hrmenu.pc .cbp-hrsub {
    display: none;
}

/* --- GNB 활성화 상태 (.menu-active 클래스 사용) --- */
/* JS가 #header에 .menu-active를 추가했을 때의 스타일 */
#header.menu-active .gnb_bg {
    display: block;
}

#header.menu-active #cbp-hrmenu.pc .cbp-hrsub {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    
    position: absolute;
    top: 60px; /* 1차 메뉴와의 간격 */
    left: 50%;
    transform: translateX(-50%);
    
    background: none;
    border: none;
    box-shadow: none;
    width: auto;
    padding: 20px 0;
}

/* 2차 메뉴 내부 컨테이너 스타일 */
#header.menu-active #cbp-hrmenu.pc .cbp-hrsub-inner,
#header.menu-active #cbp-hrmenu.pc .cbp-hrsub-inner > div {
    position: static;
    width: auto;
    border: none;
    padding: 0;
}

/* 2차 메뉴 리스트 텍스트 정렬 */
#cbp-hrmenu.pc .cbp-hrsub-inner ul {
    text-align: center;
    padding: 0;
    margin: 0;
    list-style: none;
}

/* 2차 메뉴 링크 스타일 */
#cbp-hrmenu.pc .cbp-hrsub-inner a {
    display: inline-block;
    padding: 8px 15px;
    font-size: 16px;
    color: #000 !important;
    white-space: nowrap;
    transition: all 0.2s;
}

#cbp-hrmenu.pc .cbp-hrsub-inner a:hover {
    color: #000;
    font-weight: 600;
}


