/* 전체 헤더 스타일 */
#hd {
    width: 100%;
    background: transparent;
    border-bottom: none;
    position: fixed;
    top: 15px; /* 상단과 간격 두기 */
    left: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

/* 2차 메뉴 영역 스타일 */
#gnb_2depth_wrap {
    position: absolute;
    top: 100%;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 999;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    pointer-events: none; /* 초기에는 클릭 불가능하게 */
}

/* 불필요한 가상요소 제거 - JavaScript로 처리함 */

/* 아래의 가상요소도 불필요 - JavaScript로 처리함 */

/* 스크롤 시 기본 상태 */
#hd.scrolled #gnb_2depth_wrap {
    left: 0;
    width: 100vw; /* 화면 너비 깜물이 되도록 설정 */
    margin-left: calc(-50vw + 50%);
    transform: translateY(0);
    top: 100%; /* 바로 아래에 붙이기 */
}

#hd:not(.scrolled) #gnb_2depth_wrap {
    position: absolute;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    width: 1430px; /* 정확한 너비 지정 */
    max-width: 1430px;
    left: 50%;
    margin-left: -715px; /* width의 반 */
    border-radius: 15px;
    top: 55px !important; /* 고정 값으로 설정 - 1차 메뉴의 높이 40px + 15px 간격 */
    transform: none !important; /* transform 속성 오버라이드 */
    padding-top: 20px !important; /* 내부 패딩 추가 */
	margin-top:15px;
}

#hd.scrolled #gnb_2depth_wrap {
    background: #fff;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    border-radius: 0; /* 모서리 직선으로 */
}



/* 2차 메뉴 펼쳐진 상태 - 공통 스타일 */
#gnb:hover #gnb_2depth_wrap {
    max-height: 500px; /* 더 크게 조정 */
    opacity: 1;
    pointer-events: auto; /* 펼쳐졌을 때는 클릭 가능하게 */
    padding-bottom: 30px; /* 하단 패딩은 공통 */
}

/* 초기 transform 속성을 각 상태별로 추가했으므로 호버 시 transform 속성 별도 처리 필요 없음 */

.gnb_2depth_container {
    max-width: 1430px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
    display: flex;
    justify-content: center;
}

/* 새로운 메뉴 레이아웃 스타일 */
.gnb_menu_image_area {
    width: 35%;
    padding-right: 40px;
    position: relative;
}

.menu_image {
    display: none;
    position: relative;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.menu_image.active {
    display: block;
    opacity: 1;
}

.menu_image img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    border-radius: 10px;
}

.image_caption {
    position: absolute;
    bottom: 20px;
    left: 20px;
    color: white;
    text-shadow: 0 1px 3px rgba(0,0,0,0.6);
    z-index: 2;
}

.image_caption h3 {
    font-size: 24px;
    margin-bottom: 10px;
    line-height: 1.3;
}

.image_caption p {
    font-size: 16px;
    opacity: 0.9;
}

.menu_image:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,0.7) 100%);
    border-radius: 10px;
    z-index: 1;
}

.gnb_menu_content_area {
    width: 65%;
    padding-top: 0; /* 콘텐츠 영역 상단 패딩 제거 - 이미 2차 메뉴 자체에 패딩 추가했음 */
}

.gnb_menu_columns {
    display: flex;
    justify-content: space-between;
    width: 100%;
    padding: 20px 0;
}

.gnb_menu_column {
    flex: 1;
    padding: 0 15px;
    border-right: 1px solid rgba(0,0,0,0.07);
    transition: background-color 0.3s ease;
}

.gnb_menu_column:hover {
    background-color: rgba(66, 103, 178, 0.05);
}

.gnb_menu_column:last-child {
    border-right: none;
}

.gnb_menu_title {
    font-size: 18px;
    color: #333;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #4267b2;
    position: relative;
    cursor: pointer; /* 마우스 포인터 추가 */
}

.gnb_menu_title:hover {
    color: #4267b2;
}

.gnb_menu_list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.gnb_menu_list li {
    margin-bottom: 10px;
}

.gnb_menu_list li a {
    display: inline-block;
    color: #555;
    font-size: 15px;
    text-decoration: none;
    transition: all 0.2s ease;
    position: relative;
    padding-left: 12px;
}

.gnb_menu_list li a:before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background-color: #4267b2;
}

.gnb_menu_list li a:hover {
    color: #4267b2;
    transform: translateX(5px);
}

.hidden {
    display: none !important;
}

/* 스크롤 시 헤더 스타일 */
#hd.scrolled {
    top: 0;
    background: #fff;
    border-bottom: 1px solid #e5e5e5;
    box-shadow: 0 1px 5px rgba(0,0,0,0.05);
    width: 100%;
}

/* 헤더 내부 컨테이너 */
#hd_wrapper {
    position: relative;
    margin: 0 auto;
    padding: 15px 20px;
    width: 100%;
    max-width: 1430px;
    height: 70px;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}
#hd_wrapper.sub{
    box-shadow: none;
}
/* 스크롤 시 헤더 내부 컨테이너 스타일 */
#hd.scrolled #hd_wrapper {
    max-width: 100%;
    border-radius: 0;
    background: #fff;
    box-shadow: none;
}
#hd_wrapper .inner {
    display: flex;
    align-items: center;
    width: calc(100% - 40px);
    margin: 0 auto;
    height: 100%;
}

/* 로고 스타일 */
#logo {
    margin-right: 40px;
    display: flex;
    align-items: center;
}
#logo img {
    height: 38px; /* 로고 크기 조절 */
}

#logo1 {
    margin-right: 20px; /* 모바일에서 간격 줄임 */
    display: flex;
    align-items: center;
    flex-shrink: 0; /* 크기 고정 */
}
#logo1 img {
    height: 25px; /* 로고 크기 조절 */
    width: auto;
    max-width: 80px; /* 최대 가로 넓이 제한 */
}

/* 메뉴 스타일 */
#gnb {
    display: flex;
    align-items: center;
    flex: 1;
    background: transparent; /* 디자인 통일을 위해 투명하게 설정 */
    position: relative;
    height: 40px; /* 고정 높이 설정 */
}
.gnb_wrap {
    width: 100%;
    display: flex;
    justify-content: flex-end;
    margin-right: 30px !important;
}
#gnb_1dul {
    display: flex;
    margin: 0;
    padding: 0;
    list-style: none;
    justify-content: flex-end;
}
.gnb_1dli {
    position: relative;
    margin-right: 30px;
    display: flex;
    align-items: center;
    height: 40px; /* 메뉴 항목 높이 고정 */
}
.gnb_1da {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 15px;
    color: #333;
    height: 40px;
    text-decoration: none;
    font-size: 17px; /* 폰트 사이즈 증가 */
    font-weight: 600; /* 두께게 */
    letter-spacing: -0.02em; /* 자간 조정 */
    cursor: pointer; /* 마우스 포인터 추가 */
}
.gnb_1da:hover {
    color: #4267b2;
}

/* 우측 항목 스타일 */
.hd_right {
    display: flex;
    align-items: center;
    margin-left: 30px !important;
}
.mail_btn {
    display: inline-block;
    padding: 8px 15px;
    margin-right: 10px;
    background: #000;
    color: #fff;
    border-radius: 20px;
    text-decoration: none;
    font-size: 110%;
}
.youtube_btn {
    display: inline-block;
    padding: 8px 15px;
    margin-right: 10px;
    background: #ff0033;
    color: #fff;
    border-radius: 20px;
    text-decoration: none;
    font-size: 110%;
}
/* 언어 선택 스타일은 custom.css에서 관리 */

/* 스킵 내비게이션 */
#skip_to_container {
    display: none;
}
#hd_h1 {
    position: absolute;
    font-size: 0;
    line-height: 0;
    overflow: hidden;
}

/* 최상단 회원 메뉴 */
#tnb {
    border-bottom: 1px solid #f0f0f0;
    background: #f8f8f8;
}
#tnb .inner {
    width: 1430px;
    margin: 0 auto;
}
#tnb_mb {
    display: flex;
    justify-content: flex-end;
    margin: 0;
    padding: 0;
    list-style: none;
}
#tnb_mb li {
    border-right: 1px solid #e9e9e9;
}
#tnb_mb li:first-child {
    border-left: 1px solid #e9e9e9;
}
#tnb_mb li a {
    display: block;
    padding: 0 15px;
    height: 35px;
    line-height: 35px;
    color: #666;
    font-size: 12px;
}

/* 햄버거 버튼 스타일 */
#hamburger {
    display: none;
    width: 30px;
    height: 24px;
    position: relative;
    cursor: pointer;
    z-index: 1001;
}

#hamburger span {
    display: block;
    position: absolute;
    height: 3px;
    width: 100%;
    background: #333;
    border-radius: 2px;
    opacity: 1;
    left: 0;
    transform: rotate(0deg);
    transition: .25s ease-in-out;
}

#hamburger span:nth-child(1) {
    top: 0px;
}

#hamburger span:nth-child(2) {
    top: 10px;
}

#hamburger span:nth-child(3) {
    top: 20px;
}

/* 햄버거 활성화 상태 */
#hamburger.active span:nth-child(1) {
    top: 10px;
    transform: rotate(135deg);
}

#hamburger.active span:nth-child(2) {
    opacity: 0;
    left: -60px;
}

#hamburger.active span:nth-child(3) {
    top: 10px;
    transform: rotate(-135deg);
}

/* 모바일 메뉴 래퍼 */
#mobile_menu_wrap {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
}

/* 배경 오버레이 */
.mobile_menu_bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* 모바일 메뉴 본체 */
.mobile_menu {
    position: absolute;
    top: 0;
    right: -100%;
    width: 85%;
    max-width: 320px;
    height: 100%;
    background: #fff;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

/* 메뉴 열림 상태 */
#mobile_menu_wrap.active {
    display: block;
}

#mobile_menu_wrap.active .mobile_menu_bg {
    opacity: 1;
}

#mobile_menu_wrap.active .mobile_menu {
    right: 0;
}

/* 모바일 메뉴 헤더 */
.mobile_menu_header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.mobile_logo img {
    height: 30px;
}

.mobile_menu_close {
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 24px;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 모바일 네비게이션 */
.mobile_gnb {
    flex: 1;
    padding: 20px 0;
}

.mobile_gnb_1dul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile_gnb_1dli {
    border-bottom: 1px solid #f0f0f0;
}

.mobile_gnb_1dli.has_sub {
    position: relative;
}

.mobile_gnb_1da {
    display: block;
    padding: 15px 20px;
    color: #333;
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.mobile_gnb_1da:hover {
    background-color: #f8f8f8;
}

/* 서브메뉴 토글 버튼 */
.sub_toggle {
    position: absolute;
    right: 0;
    top: 0;
    width: 50px;
    height: 50px;
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    transition: transform 0.3s ease;
}

.sub_toggle.active {
    transform: rotate(180deg);
}

/* 2차 메뉴 */
.mobile_gnb_2dul {
    display: none;
    list-style: none;
    margin: 0;
    padding: 0;
    background: #f8f8f8;
}

.mobile_gnb_2dul li {
    border-top: 1px solid #eee;
}

.mobile_gnb_2dul li a {
    display: block;
    padding: 12px 20px 12px 40px;
    color: #666;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.mobile_gnb_2dul li a:hover {
    background-color: #f0f0f0;
    color: #4267b2;
    padding-left: 45px;
}

/* 모바일 메뉴 하단 */
.mobile_menu_bottom {
    padding: 20px;
    border-top: 1px solid #eee;
    background: #fafafa;
}

.mobile_mail_btn {
    display: inline-block;
    padding: 10px 20px;
    background: #000;
    color: #fff;
    border-radius: 25px;
    text-decoration: none;
    font-size: 14px;
    margin-bottom: 15px;
}

.mobile_lang_dropdown {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: #fff;
    font-size: 14px;
    cursor: pointer;
}



/* 모바일 화면에서 스크롤 금지 */
body.mobile_menu_open {
    overflow: hidden;
}


/* 반응형 처리를 위한 미디어 쿼리 */
@media (max-width: 1480px) {
    #hd_wrapper,
    .gnb_2depth_container,
    #tnb .inner {
        max-width: 1200px;
    }
    #hd:not(.scrolled) #gnb_2depth_wrap {
        width: 1200px;
        margin-left: -600px;
        top: 55px !important;
        padding-top: 20px !important;
    }
    /* 1차 2차 사이 영역 처리는 JavaScript로 해결함 */
}

@media (max-width: 1280px) {
    #hd_wrapper,
    .gnb_2depth_container,
    #tnb .inner {
        max-width: 1000px;
    }
    #hd:not(.scrolled) #gnb_2depth_wrap {
        width: 1000px;
        margin-left: -500px;
        top: 55px !important;
        padding-top: 20px !important;
    }
    /* 1차 2차 사이 영역 처리는 JavaScript로 해결함 */

    #hd_wrapper .inner #gnb .gnb_wrap{
        width: 100%;
        margin-right: 0 !important;
        justify-content: center;
    }
    .gnb_1dli{
        margin-right: 0;
    }
}

/* 반응형 처리 */
@media (max-width: 1024px) {
    #hamburger {
        display: block;
    }
    
    #gnb {
        display: none;
    }
    
    .hd_right {
        display: none;
    }
    

    
    #hd_wrapper .inner {
        justify-content: space-between;
    }
    
    #logo {
        margin-right: 0;
    }
    #hd_wrapper, .gnb_2depth_container, #tnb .inner{
        width: 95%;
    }
}

@media screen and (max-width:768px) {

    #hd_wrapper.sub{
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    }
    #logo img {
        height: 25px;
    }
	#logo1 {
        margin-right: 10px; /* 모바일에서 더 좁게 */
    }
    #logo1 img {
        height: 18px; /* 높이 더 작게 */
        max-width: 60px; /* 가로 최대 넓이 더 제한 */
        margin-left: 5px;
    }
    #hd_wrapper {
        padding: 10px 20px;
        height: 60px;
    }
    .company-tab-menu{
        display: none;
    }
    /* 모바일에서 Mail 텍스트 숨기기 */
    .mail_btn {
        width: 36px;
        height: 36px;
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        overflow: hidden;
        text-indent: -9999px;
        position: relative;
    }
    .mail_btn i {
        font-size: 14px;
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        text-indent: 0;
    }
}

@media screen and (max-width: 500px) {
    #hd_wrapper .inner{
        width: 100%;
    }
    .hd_right{
        margin-left: 0 !important;
    }
    .mail_btn{
        margin-right: 0;
    }
    /* 모바일에서 Mail 텍스트 숨기기 */
    .mail_btn {
        font-size: 0;
        width: 32px;
        height: 32px;
        text-indent: -9999px;
    }
    .mail_btn i {
        font-size: 16px;
        text-indent: 0;
    }
    .lang_select{
        margin-left: 0;
    }
}
@media screen and (max-width: 425px) {
    .current_lang{
        font-size: 10px;
        padding: 4px 10px;
    }
    .mail_btn{
        font-size: 10px;
    }   
}
@media screen and (max-width: 375px) {
    #logo img {
        height: 20px;
    }
    #logo1 {
        margin-right: 5px; /* 작은 화면에서 최소 간격 */
    }
    #logo1 img {
        height: 16px; /* 더 작게 */
        max-width: 50px; /* 최대 50px로 제한 */
    }
}