@charset "utf-8";

/* LWD Basic 메뉴 스킨 스타일 (nobeltimes.com 참고) */

.lwd-header-wrap {
    width: 100%;
    background: #fff;
    border-bottom: 1px solid #ddd;
}

.lwd-header-wrap .container {
    max-width: 1600px;
    margin: 0 auto;
    position: relative;
    padding: 0 15px;
}

/* 1. 상단 헤더 (로고, 검색, 유틸) */
.header-top {
    border-bottom: 1px solid #eee;
    background: #fff;
}

.header-top .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.header-top .logo {
    flex-shrink: 0;
    margin: 0;
}

.header-top .logo img {
    max-height: 40px;
    width: auto;
    vertical-align: middle;
}

.header-search {
    flex-grow: 1;
    max-width: 400px;
    margin: 0 30px; /* 간격 조정 */
    position: relative;
}

.header-search input[type="text"] {
    width: 100%;
    height: 40px;
    border: 2px solid #0056b3; /* 포인트 컬러 적용 */
    padding: 0 45px 0 15px;
    font-size: 14px;
    border-radius: 20px;
    background: #fff;
    box-sizing: border-box;
}

.header-search button {
    position: absolute;
    top: 0;
    right: 5px;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    color: #0056b3;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
}

.header-top .top-util {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-shrink: 0;
    margin-left: auto;
}

.header-top .top-util li {
    margin-left: 20px;
    font-size: 13px;
    color: #555;
    white-space: nowrap;
}

.header-top .top-util li a {
    color: #555;
    text-decoration: none;
    transition: color 0.2s;
}

.header-top .top-util li a:hover {
    color: #0056b3;
}

/* 2. 메인 헤더 (로고, 배너) */
.header-main {
    padding: 20px 0;
}

.header-main .container {
    display: flex;
    justify-content: center; /* 💡 [수정] 중앙 정렬 */
    align-items: center;
}

.header-main .logo {
    flex: 0 0 auto;
    margin: 0 100px; /* 💡 [수정] 로고 좌우 여백 확대 */
    text-align: center;
    z-index: 10;
}

.header-main .logo img {
    height: 120px;
    width: auto;
    max-width: none; /* 이미지 너비 제한 해제 */
}

/* 배너 영역 */
.header-main .banner-left,
.header-main .banner-right {
    /* 💡 [수정] 고정 크기 420x120px */
    flex: 0 0 300px;
    width: 300px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin: 0; /* 기존 여백 제거 */
}

.header-main .banner-left {
   justify-content: flex-start;  /* 로고 쪽으로 붙임 */
   /* margin-right: 80px; */
}

.header-main .banner-right {
     justify-content: flex-start;  /* 로고 쪽으로 붙임 */
     /* margin-left: 80px; */
}

.header-main .banner-left a,
.header-main .banner-right a {
    display: block;
    width: 100%;
    height: 100%;
}

.header-main .banner-left img,
.header-main .banner-right img {
    width: 100%;
    height: 100%;
    object-fit: fill; /* 💡 [수정] 420x120에 꽉 차게 (비율 무시) */
    /* object-fit: cover; 비율 유지하며 꽉 채우려면 이걸 사용 */
}


/* 3. GNB 네비게이션 */
.gnb-wrap {
    background: #0056b3;
    border-top: 1px solid #eee;
}

.gnb {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    justify-content: center;
}

.gnb-item {
    position: relative;
}

/* GNB 링크 스타일 (2줄 표시) */
.gnb-link {
    display: flex;
    flex-direction: column; /* 세로 정렬 */
    justify-content: center;
    align-items: center;
    padding: 10px 25px;
    height: 60px;
    color: #fff;
    text-decoration: none;
    transition: background-color 0.2s;
    text-align: center;
    border: none !important;
    outline: none !important;
}

.gnb-txt-ko {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.2;
}

.gnb-txt-en {
    font-size: 11px;
    font-weight: 400;
    opacity: 0.8;
    margin-top: 2px;
    text-transform: uppercase;
}

.gnb-item:hover .gnb-link {
    background-color: #004494;
    text-decoration: none !important;
    border: none !important;
    outline: none !important;
}

.gnb-item:hover .gnb-link::before,
.gnb-item:hover .gnb-link::after,
.gnb-link::before,
.gnb-link::after {
    display: none !important;
    content: none !important;
    width: 0 !important;
    height: 0 !important;
    opacity: 0 !important;
    transition: none !important;
}

/* 서브 메뉴 스타일 */
.gnb-sub {
    display: none;
    position: absolute;
    top: 60px;
    left: 50%;
    transform: translateX(-50%);
    min-width: 300px;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(5px);
    border: none;
    box-shadow: 0 5px 10px rgba(0,0,0,0.1);
    z-index: 999;
    list-style: none;
    padding: 15px 0;
    text-align: left;
}

.gnb-item:hover .gnb-sub {
    display: block;
}

.gnb-sub li {
    display: block;
    width: 100%;
    box-sizing: border-box;
}

.gnb-sub li a {
    display: block;
    padding: 10px 20px;
    color: #333;
    text-decoration: none;
    transition: background-color 0.2s, color 0.2s;
    border: none !important;
    outline: none !important;
}

.sub-txt-ko {
    display: block;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
}

.sub-txt-en {
    display: block;
    font-size: 11px;
    color: #888;
    margin-top: 2px;
    text-transform: uppercase;
}

.gnb-sub li a:hover {
    background-color: #f0f2f5;
    color: #0056b3;
    text-decoration: none !important;
    border: none !important;
    outline: none !important;
}
.gnb-sub li a:hover .sub-txt-en {
    color: #0056b3;
}

/* 모바일 햄버거 버튼 */
.mobile-menu-btn {
    display: block; /* Default to block for mobile */
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100; /* Ensure it's on top */
}

/* 반응형 이미지 클래스 */
.responsive-image {
    max-width: 100%;
    height: auto;
}

/* 반응형 */
.pc-only { display: block; }
.mobile-only { display: none; }

/* 💡 [수정] 모바일 브레이크포인트를 1024px로 조정하여 로고와 일치시킴 */
@media (max-width: 1024px) {
    .pc-only { display: none !important; }
    .mobile-only { display: block !important; }

    .header-top .container {
        flex-wrap: wrap;
        justify-content: center;
    }

    .header-top .logo {
        width: 100%;
        text-align: center;
        margin-bottom: 15px;
    }

    .header-search {
        width: 100%;
        max-width: 100%;
        margin: 0 0 15px 0;
        order: 2;
    }

    .header-top .top-util {
        width: 100%;
        justify-content: center;
        margin-bottom: 15px;
        order: 1;
        margin-left: 0;
    }

    .gnb-wrap {
        display: none;
    }

    /* mobile-menu-btn은 .header-main .container 내부에 있으므로,
       .header-main .container의 position: relative에 따라 위치합니다.
       기본값은 .mobile-menu-btn에 설정되어 있습니다.
       TYPE 1과 TYPE 2에서 필요에 따라 재정의합니다.
    */

    .header-main {
        padding: 5px 0; /* 💡 [수정] 모바일 헤더 여백 대폭 축소 */
    }

    .header-main .container {
        position: relative;
        min-height: 50px; /* 최소 높이 확보 */
        flex-wrap: wrap;
        /* 💡 [수정] TYPE 2를 위해 align-items를 flex-start로 변경 */
        align-items: flex-start;
        padding-top: 10px; /* 💡 [추가] 컨테이너 상단 패딩 */
        padding-bottom: 10px; /* 💡 [추가] 컨테이너 하단 패딩 */
    }

    /* 💡 [수정] 모바일 헤더 레이아웃 설정에 따른 스타일 */

    /* 공통: 로고 스타일 */
    .header-main .logo {
        margin: 0;
        text-align: left;
        flex: 1;
        order: 1;
    }
    .header-main .logo img {
        height: 40px;
        width: auto;
    }

    /* TYPE 1: 로고만 표시 (배너 숨김) */
    .mobile-header-type-1 .banner-left,
    .mobile-header-type-1 .banner-right {
        display: none !important;
    }
    .mobile-header-type-1 .logo {
        flex: 1; /* Type 1에서는 로고가 공간을 차지하도록 유지 */
        text-align: center; /* 로고 중앙 정렬 */
    }
    .mobile-header-type-1 .mobile-menu-btn {
        top: 50%;
        transform: translateY(-50%);
        z-index: 1001; /* 햄버거 메뉴 z-index 유지 */
    }


    /* TYPE 2: 로고 + 배너 세로 나열 (로고 -> 좌측배너 -> 우측배너) */
    .mobile-header-type-2 .logo {
        width: 100%; /* 💡 [수정] 로고가 전체 너비를 차지하도록 */
        text-align: center; /* 💡 [수정] 로고 중앙 정렬 */
        flex: none; /* 💡 [수정] flex 속성 제거하여 크기 고정 */
        order: 1;
        margin-bottom: 10px; /* 💡 [추가] 로고 아래 여백 */
    }

    .mobile-header-type-2 .banner-left,
    .mobile-header-type-2 .banner-right {
        display: flex !important;
        flex: 0 0 100%; /* 한 줄 전체 차지 */
        max-width: 100%;
        width: 100%; /* 💡 [수정] 모바일에서는 너비 100% */
        height: auto; /* 💡 [수정] 모바일에서는 높이 자동 */
        justify-content: center;
        margin: 5px 0; /* 💡 [수정] 세로 여백 조정 */
        text-align: center;
    }

    .mobile-header-type-2 .banner-left { order: 2; }
    .mobile-header-type-2 .banner-right { order: 3; }

    .mobile-header-type-2 .mobile-menu-btn {
        z-index: 1001; /* 💡 [수정] 햄버거 메뉴가 항상 위에 오도록 */
        position: absolute;
        right: 15px;
        top: 15px; /* 💡 [수정] 헤더 상단에 고정 */
        transform: none; /* 💡 [수정] 세로 중앙 정렬 해제 */
    }
}

/* 모바일 메뉴 패널 스타일 */
#mobile-nav-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: auto !important; /* 💡 [수정] 너비 자동 (강제 적용) */
    min-width: 250px; /* 최소 너비 */
    max-width: 85%; /* 최대 너비 */
    height: 100%;
    background: rgba(255, 255, 255, 0.85); /* 💡 [수정] 배경 투명도 적용 */
    z-index: 1003;
    transform: translateX(100%);
    transition: transform 0.4s ease;
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

#mobile-nav-panel.is-active {
    transform: translateX(0);
}

#mobile-nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.01); /* 💡 [수정] 배경 투명도 0.01 */
    z-index: 1002;
}

#mobile-nav-overlay.is-active {
    display: block;
}

.mobile-nav-header {
    padding: 15px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.btn-mobile-login, .btn-mobile-join {
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: 700;
    text-decoration: none;
    font-size: 14px;
}

.btn-mobile-login {
    border: 1px solid #ddd;
    color: #333;
    margin-right: 5px;
}

.btn-mobile-join {
    background: #0056b3;
    color: #fff;
}

.mobile-menu-close-btn {
    font-size: 1.8rem;
    background: none;
    border: none;
    cursor: pointer;
    color: #333;
}

.mobile-gnb {
    padding: 0;
    flex-grow: 1;
    overflow-y: auto;
}

.mobile-gnb ul {
    list-style: none;
    padding: 0;
    margin: 0;
    /* 💡 [수정] 내용에 따라 너비가 늘어나도록 설정 */
    white-space: nowrap; /* 다시 복원 */
}

.mobile-gnb ul li {
    position: relative;
    border-bottom: 1px solid #f5f5f5;
}

.mobile-gnb ul li a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px; /* 💡 [수정] 메뉴 항목 여백 축소 */
    font-size: 1.1rem;
    font-weight: 700;
    color: #333;
    text-decoration: none;
}

.mobile-gnb .sub-menu {
    display: none;
    background: #f9f9f9;
    border-top: 1px solid #eee;
}

.mobile-gnb .sub-menu li {
    border-bottom: none;
}

.mobile-gnb .sub-menu li a {
    font-size: 1rem;
    font-weight: 400;
    padding: 8px 25px; /* 💡 [수정] 서브메뉴 여백 축소 */
    color: #666;
}

.sub-menu-indicator {
    transition: transform 0.3s;
    font-size: 14px;
    color: #999;
}

.mobile-gnb li.submenu-open .sub-menu-indicator {
    transform: rotate(180deg);
}

.mobile-gnb li.submenu-open > .sub-menu {
    display: block;
}
