#header {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    background-color: rgba(0, 0, 0, .67);
    min-height: 130px;
    padding-top: 4px;
    z-index: 1000;
    color: #fff;
}

#header:hover {
    transition: all .4s;
    background-color: rgba(0, 0, 0, .87);
}

#header.sub:hover {
    background-color: #fff;
    border-bottom: none;
}


.header-top {
    width: 100%;
    border-bottom: 1px solid #d3d3d3;
    padding-bottom: 15px;
}

.header-logo img {
    filter: brightness(0) invert(1);
}

.header-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100vw;
    max-width: 1440px;
    padding: 15px 0 0;
    margin: auto;
}

.header-sitemap {
    position: absolute;
    top: 50%;
    left: 20px;
    transform: translateY(-50%);
    font-size: 1.2rem;
    text-decoration: none;
}

.header-language-selector {
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    font-size: 1rem;
}

.header-language-selector a {
    color: #d7d7d7;
    text-decoration: none;
}

.header-language-selector a.sel {
    font-weight: bold;
    color: #fff;
}

.header-bot {
    width: 100%;
}

.nav-subs {
    transition: all .4s;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
}


#header:hover .nav-subs {
    max-height: 1000px;
    opacity: 1;
    visibility: visible;
}

.nav-main,
.nav-subs {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: top;
    list-style: none;
}

.nav-main-item,
.nav-subs-item {
    width: 130px;
    margin: 0 4px;
}

.nav-subs-item {
    padding: 10px 0;
}

.nav-main-item a {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    font-size: 1.1rem;
    color: #fff;
    text-decoration: none;
    padding-top: 10px;
    padding-bottom: 25px;
    position: relative;
}

.nav-main-item a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    transform-origin: center;
    width: 90%;
    height: 4px;
    background-color: #00aaff;
    transition: transform 0.3s ease;
    border-radius: 2px;
}

.nav-main-item a:hover::after {
    transform: translateX(-50%) scaleX(1);
}

.eng .nav-main-item a:hover::after {
    transform-origin: left;
    transform: translateX(-50%) scaleX(1);
}

.nav-subs-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.nav-subs-list-item {
    margin: 10px 0;
    text-align: center;
}

.nav-subs-list-item a {
    color: #d7d7d7;
    text-decoration: none;
    line-height: 1.6;
}

.nav-subs-list-item a:hover {
    transition: all .4s;
    color: #ffffff;
    text-decoration: underline;
    text-underline-offset: 6px;
}


#header.sub {
    background-color: transparent;
    color: #000;
}

#header.sub .header-bot {
    border-bottom: 1px solid #d3d3d3;
}

.header-language-selector, .header-sitemap {
    color: #ffffff;
}

#header.sub:hover .header-language-selector, #header.sub:hover .header-sitemap {
    color: #212121;
}

#header.sub:hover .header-language-selector a {
    color: #212121;
}

#header.sub:hover .header-language-selector a.sel {
    font-weight: bold;
    color: #000000;
}

#header.sub .header-language-selector a {
    color: #e8e8e8;
}

#header.sub .header-language-selector a.sel {
    font-weight: bold;
}


#header.sub:hover .header-logo img {
    filter: brightness(1);
}

#header.sub:hover .nav-main-item a {
    color: #000;
}

#header.sub:hover .nav-subs-list-item a {
    color: #171717;
}

#header.sub:hover .nav-subs-list-item a:hover {
    color: #080808;
}


#header.sub .header-top {
    box-shadow: 0 2px 4px rgba(0, 0, 0, .05);
}

#header.sub .header-bot {
    box-shadow: 0 4px 8px rgba(0, 0, 0, .15);
}

.eng .nav-main-item a {
    text-align: left;
    justify-content: left;
}

.eng .nav-main-item, .eng .nav-subs-item {
    width: 150px;
}

.eng .nav-main-item a::after {
    width: 100%;
}

.eng .nav-subs-item {
    padding: 0;
}

.eng .nav-subs-list-item {
    width: 100%;
    text-align: left;
    height: 45px;
}

#topBtn {
    position: fixed;
    bottom: 60px;
    right: 80px;
    z-index: 100;
    font-size: 20px;
    background-color: #4183d4;
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.6);
    transition: all 0.4s;
    opacity: 0;
    visibility: hidden;
    font-weight: bold;
}

#topBtn:hover {
    background-color: #1c54a3;
}

/* 모바일 메뉴 버튼 스타일 */
#mobile-menu-btn {
    display: none;
    position: fixed;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, .87);
    padding: 8px 12px;
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    z-index: 1100;
    transition: background-color 0.3s ease, color 0.3s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

#mobile-menu-btn:hover {
    background-color: #333;
    color: #fff;
}

/* 모바일 사이드 메뉴 기본 스타일 */
#mobile-side-menu {
    position: fixed;
    top: 0;
    right: -280px;
    width: 280px;
    height: 100vh;
    background-color: #fff;
    box-shadow: -2px 0 6px rgba(0, 0, 0, 0.2);
    transition: right 0.3s ease;
    z-index: 1200;
    overflow-y: auto;
    padding: 20px;
    font-size: 16px;
}

/* 사이드 메뉴 열림 상태 */
#mobile-side-menu.open {
    right: 0;
}

/* 모바일 메뉴 헤더 */
.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.mobile-menu-header .mobile-logo img {
    height: 40px;
}

#mobile-menu-close-btn {
    font-size: 30px;
    background: none;
    border: none;
    cursor: pointer;
    line-height: 1;
    color: #333;
}

/* 모바일 네비게이션 */
.mobile-nav-main {
    list-style: none;
    padding: 0;
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.mobile-nav-main>li {
    border-bottom: 1px solid #eee;
}

/* 아코디언 버튼 스타일 */
.accordion-btn {
    width: 100%;
    background: none;
    border: none;
    outline: none;
    padding: 16px 0;
    font-size: 17px;
    color: #222;
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

/* 화살표 아이콘 */
.accordion-btn .arrow {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-right: 2px solid #666;
    border-bottom: 2px solid #666;
    transform: rotate(45deg);
    transition: transform 0.3s ease;
    margin-left: 10px;
}

/* 열렸을 때 화살표 방향 아래로 */
.accordion-btn[aria-expanded="true"] .arrow {
    transform: rotate(135deg);
}

/* 서브메뉴 스타일 */
.submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
}

.submenu li {
    border-bottom: 1px solid #eee;
}

.submenu li a {
    display: block;
    padding: 14px 20px;
    /* 들여쓰기 효과 */
    color: #555;
    font-size: 15px;
    text-decoration: none;
    transition: color 0.3s ease;
}

.submenu li a:hover {
    color: #007bff;
}

/* 언어 전환 버튼 */
.mobile-language-switcher {
    display: flex;
    gap: 10px;
    margin-bottom: 24px;
}

.mobile-language-switcher .lang-btn {
    padding: 8px 14px;
    border: 1px solid #ccc;
    background: #fff;
    cursor: pointer;
    border-radius: 4px;
    font-weight: 600;
}

.mobile-language-switcher .lang-btn.sel {
    background-color: #333;
    color: #fff;
    border-color: #333;
}

/* 반응형: 767px 이하 */
@media (max-width: 1023px) {
    #header {
        min-height: 0;
    }

    .header-top,
    .header-bot {
        display: none;
    }

    #mobile-menu-btn {
        display: block;
    }

    #topBtn {
        right: 20px;
    }
}