/* 모바일 로고 스타일 - 기본 스타일만 (JavaScript로 동적 변경) */
.mobile-logo {
    padding: 20px 25px;
    background: transparent;  /* 기본값, JS로 변경됨 */
    text-align: left;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1005;
    transition: all 0.3s ease;
    display: none;
}

/* 스크롤 시 모바일 로고 배경 */
.mobile-logo.scrolled {
    background: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.mobile-logo a {
    display: inline-block;
}

.mobile-logo img {
    height: 30px;
    width: auto;
}

/* 기존 모바일 메뉴 스타일 수정 */
.mobile-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    height: 100vh;
    background: white;
    overflow-y: auto;
    transition: all 0.3s ease;
    z-index: 1000;
    display: none;
    box-shadow: -2px 0 10px rgba(0,0,0,0.1);
}

.mobile-nav.active {
    right: 0;
}

.mobile-menu {
    padding: 70px 0 0 0; /* 로고 영역만큼 패딩 추가 */
    margin: 0;
    list-style: none;
}

.mobile-menu li {
    border-bottom: 1px solid rgba(0,0,0,0.08);
}

.mobile-menu > li > a {
    padding: 18px 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #333;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.mobile-menu > li > a:after {
    content: '\f107';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 14px;
    color: #999;
    transition: transform 0.3s ease;
}

.mobile-menu > li.active > a:after {
    transform: rotate(180deg);
}

/* 서브메뉴 스타일 개선 */
.mobile-submenu {
    display: none;
    background: #f8f8f8;
    padding: 0;
    list-style: none;
}

.mobile-submenu li {
    border-top: 1px solid rgba(0,0,0,0.05);
    border-bottom: none;
}

.mobile-submenu li a {
    padding: 15px 35px;
    display: block;
    color: #666;
    font-size: 14px;
    text-decoration: none;
    background: rgba(0,0,0,0.02);
    transition: background-color 0.2s ease;
}

/* 호버/액티브 효과 */
.mobile-menu > li > a:hover,
.mobile-menu > li.active > a {
    background-color: rgba(0,0,0,0.02);
}

/* 현재 페이지 active 상태 - 모바일 메뉴 */
.mobile-menu > li.active > a {
    border-left: 4px solid #ffcd3c;
}

.mobile-submenu li a:hover {
    background-color: rgba(0,0,0,0.04);
    color: #333;
}

/* 수정필요. pC 에서 보임. */
/* 햄버거 버튼 기본 스타일 (JS로 동적 변경) */
.mobile-menu-btn span {
    display: block;
    position: absolute;
    width: 25px;
    height: 3px;
    background: #ffffff;
    transition: all 0.3s ease;
    border-radius: 1px;
    left: 50%;
    transform: translateX(-50%);
}

.mobile-menu-btn span:nth-child(1) {
    top: 12px;
}

.mobile-menu-btn span:nth-child(2) {
    top: 18px;
}

.mobile-menu-btn span:nth-child(3) {
    top: 24px;
}

@media (max-width: 768px) {
    .mobile-logo {
        display: block;
    }
    .mobile-menu-btn span {
        display: block !important;
    } 

    .main-nav {
        display: none;
    }
    
    .mobile-nav {
        display: block;
    }

    .nav-container {
        display: block !important; /* flex 해제 */
    }

    .mobile-menu-btn {
        display: block;
    }

    .lang-switch {
        position: fixed;
        top: 15px;
        right: 65px;
        z-index: 1010;
    }
    
    .lang-btn {
        color: white;
        border-radius: 50%;
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
        cursor: pointer;
        transition: all 0.3s ease;
    }
    
    /* 스크롤 시 언어 버튼 */
    .mobile-logo.scrolled ~ .lang-switch .lang-btn {
        color: #333;
    }


    a {
        color: inherit;
        text-decoration: none;
        -webkit-tap-highlight-color: transparent; /* iOS Safari 터치 하이라이트 제거 */
        -webkit-touch-callout: none;              /* iOS 길게 눌렀을 때 메뉴 제거 */
        -webkit-user-select: none;                /* 텍스트 선택 방지 */
        user-select: none;
    }

}

/* 모바일 메뉴 버튼 개선 */
.mobile-menu-btn {
    position: fixed;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    z-index: 9999;
    cursor: pointer;
    border-radius: 5px;
    transition: all 0.3s ease;
}

/* 햄버거 아이콘 컨테이너 */
.hamburger-icon {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* 햄버거 아이콘 span들 */
.hamburger-icon span {
    display: block;
    width: 25px;
    height: 3px;
    background: #ffffff;
    margin: 3px 0;
    transition: all 0.3s ease;
    border-radius: 1px;
}

/* X 아이콘 컨테이너 */
.close-icon {
    text-align: center;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 5px;

    background-color: white;
}

.close-icon i {
    font-size: 30px;
    color: #333 !important;
    font-weight: bold;
}

/* 스크롤 시 햄버거 버튼 색상 변경 */
.mobile-logo.scrolled ~ .mobile-menu-btn span {
    background-color: #333;
} 