/* ===========================================
   모바일 메뉴 - 모든 페이지에서 작동
   =========================================== */

@media (max-width: 968px) {
    /* 모바일 메뉴 활성화 시 */
    .nav-menu.active {
        display: flex !important;
        position: fixed !important;
        top: 80px !important;
        left: 0 !important;
        right: 0 !important;
        flex-direction: column !important;
        background: white !important;
        padding: 2rem !important;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important;
        z-index: 1000 !important;
        
        /* 높이 및 스크롤 설정 */
        height: auto !important;
        max-height: calc(100vh - 80px) !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        
        /* 애니메이션 */
        animation: slideDown 0.3s ease !important;
    }
    
    /* 스크롤바 스타일 */
    .nav-menu.active::-webkit-scrollbar {
        width: 6px;
    }
    
    .nav-menu.active::-webkit-scrollbar-track {
        background: #f0f0f0;
    }
    
    .nav-menu.active::-webkit-scrollbar-thumb {
        background: #1B3559;
        border-radius: 3px;
    }
    
    /* 메뉴 아이템 */
    .nav-menu.active li {
        margin: 0 !important;
        padding: 1rem 0 !important;
        border-bottom: 1px solid #eee !important;
    }
    
    .nav-menu.active li:last-child {
        border-bottom: none !important;
        padding-bottom: 3rem !important;
    }
    
    /* 메뉴 링크 */
    .nav-menu.active .nav-link {
        display: block !important;
        width: 100% !important;
        padding: 0 !important;
        color: #333 !important;
        font-size: 1.1rem !important;
        text-shadow: none !important;
    }
    
    /* 상담문의 버튼 */
    .nav-menu.active .nav-cta {
        background: #1B3559 !important;
        color: white !important;
        padding: 1rem 1.5rem !important;
        border-radius: 0 !important;
        font-size: 1.1rem !important;
        font-weight: 600 !important;
        text-align: center !important;
        display: block !important;
        margin: 1rem 0 0.5rem 0 !important;
    }
    
    .nav-menu.active .nav-cta:hover {
        background: #099F97 !important;
        color: white !important;
    }
}

/* ── 모바일 서브메뉴 인라인 표시 ── */
@media (max-width: 968px) {
    /* 서브메뉴 기본: 숨김 */
    .nav-menu.active .sub-menu {
        display: none !important;
        position: static !important;
        box-shadow: none !important;
        border-radius: 0 !important;
        padding: 0 !important;
        min-width: 0 !important;
        background: transparent !important;
    }

    /* 부모 클릭 시 열림 */
    .nav-menu.active .menu-item-has-children.open > .sub-menu {
        display: block !important;
    }

    /* 서브메뉴 li */
    .nav-menu.active .sub-menu li {
        padding: 0.5rem 0 0.5rem 1.2rem !important;
        border-bottom: 1px solid #f5f5f5 !important;
        margin: 0 !important;
    }

    .nav-menu.active .sub-menu li:last-child {
        border-bottom: none !important;
        padding-bottom: 0.5rem !important;
    }

    /* 서브메뉴 링크 */
    .nav-menu.active .sub-menu a {
        color: #666 !important;
        font-size: 0.95rem !important;
        padding: 0 !important;
        display: block !important;
        background: transparent !important;
    }

    .nav-menu.active .sub-menu a:hover {
        color: #099F97 !important;
        background: transparent !important;
    }

    /* 서브메뉴 있는 상위 li */
    .nav-menu.active .menu-item-has-children {
        padding-bottom: 0.5rem !important;
    }

    /* 부모 메뉴 클릭 화살표 표시 */
    .nav-menu.active .menu-item-has-children > .nav-link::after {
        content: ' ▾';
        font-size: 0.8rem;
        color: #999;
    }
    .nav-menu.active .menu-item-has-children.open > .nav-link::after {
        content: ' ▴';
    }
}
