/* 모바일 메뉴 공통 스타일 */

/* 모바일 메뉴 기본 스타일 */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -300px;
    width: 300px;
    height: 100vh;
    background: white;
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease;
    z-index: 100001;
    overflow-y: auto;
}

.mobile-menu.active {
    right: 0;
}

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

.mobile-menu-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
    color: #333;
}

/* 모바일 메뉴 네비게이션 */
.mobile-menu-nav {
    padding: 20px 0;
}

.mobile-menu-nav > ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-menu-nav > ul > li {
    position: relative;
    border-bottom: 1px solid #f0f0f0;
}

.mobile-menu-nav > ul > li > a {
    display: block;
    padding: 15px 20px;
    color: #333;
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    position: relative;
}

/* 드롭다운 화살표 아이콘 */
.mobile-menu-nav > ul > li > a::after {
    content: '';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%) rotate(0deg);
    width: 10px;
    height: 10px;
    border-right: 2px solid #999;
    border-bottom: 2px solid #999;
    transform-origin: center;
    transition: transform 0.3s ease;
}

.mobile-menu-nav > ul > li.active > a::after {
    transform: translateY(-50%) rotate(45deg);
}

/* 드롭다운 메뉴 */
.mobile-menu-nav .dropdown {
    display: none;
    background: #f8f8f8;
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-menu-nav > ul > li.active .dropdown {
    display: block;
}

.mobile-menu-nav .dropdown li {
    border-bottom: 1px solid #e8e8e8;
}

.mobile-menu-nav .dropdown li:last-child {
    border-bottom: none;
}

.mobile-menu-nav .dropdown a {
    display: block;
    padding: 12px 20px 12px 40px;
    color: #666;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.mobile-menu-nav .dropdown a:hover {
    background: #fff;
    color: #e94b35;
    padding-left: 45px;
}

/* 모바일 메뉴 채널 링크 */
.mobile-menu-channels {
    padding: 20px;
    border-top: 1px solid #f0f0f0;
}

.mobile-menu-channels h4 {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
}

.channel-links {
    display: flex;
    gap: 10px;
}

.channel-links a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f0f0;
    border-radius: 50%;
    color: #666;
    font-size: 18px;
    transition: all 0.3s ease;
}

.channel-links a:hover {
    background: #e94b35;
    color: white;
}

/* 모바일 메뉴 다운로드 버튼 */
.mobile-menu-download {
    padding: 20px;
    border-top: 1px solid #f0f0f0;
}

.mobile-menu-download a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 20px;
    background: #e94b35;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    justify-content: center;
    transition: all 0.3s ease;
}

.mobile-menu-download a:hover {
    background: #d13925;
}

/* 모바일 메뉴 오버레이 */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    z-index: 99999;
}

.mobile-menu-overlay.active {
    display: block;
}

/* 반응형 모바일 메뉴 버튼 */
@media (max-width: 768px) {
    /* display 관련은 header.php에서 처리하므로 제거 */

    /* 헤더 우측 영역 모바일 스타일 */
    #header .header-right {
        transform: none !important;
        gap: 10px !important;
    }

    /* 모바일에서 다운로드 버튼 스타일 (display:none이지만 혹시 모를 스타일) */
    #header .header-download {
        transform: none !important;
        margin-right: 0 !important;
    }

    /* 모바일 메뉴 버튼 위치 조정 */
    #header .mobile-menu-btn {
        margin: 0 !important;
        padding: 0 !important;
        position: relative !important;
        right: 0 !important;
        transform: none !important;
    }
}
