@charset "utf-8";

body {
    margin: 0 50px;
    font-family: 'Noto Sans KR', sans-serif;
    background-color: #f4f4f4;
    color: #333;
    display: flex;
    overflow-x: hidden;
}

/* 헤더 스타일 */
nav {
    width: 260px;
    background-color: #38598b;
    color: #fff;
    padding: 40px 0;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
}

nav h1 {
    font-size: 24px;
    text-align: start;
    font-weight: bold;
    margin: 0 0 20px 40px;
}

nav a {
    color: #fff;
    text-decoration: none;
    font-size: 18px;
    padding: 20px 0 20px 40px;
    transition: background-color 0.2s ease;
}

nav a:hover {
    background-color: #113f67;
}

/* 메인 콘텐츠는 네비게이션 오른쪽에 위치 */
main {
    margin-left: 220px;
    padding: 40px 30px;
    width: calc(100%-220px);
}

/* 반응형 헤더 스타일 */
@media screen and (max-width: 480px) {
    header h1 {
        font-size: 20px;
    }

    nav a {
        display: inline-block;
        margin: 5px 6px;
        font-size: 12px;
    }

    main {
        padding: 20px 15px;
    }
}

/* 메인 컨텐츠 공통 영역 */
main {
    padding: 30px 20px;
}

/* 모바일 헤더 */
.mobile-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 56px;
    background-color: #4a90e2;
    color: white;
    align-items: center;
    padding: 0 16px;
    z-index: 1000;
}

.mobile-header .menu-toggle {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
}

.mobile-header .title {
    margin-left: 12px;
    font-size: 18px;
}

/* 좌측 네비 */
.side-nav {
    width: 220px;
    background-color: #4a90e2;
    color: white;
    padding: 30px 20px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    transition: transform 0.3s ease;
}

/* 기본 상태 (모바일)에서 숨김 */
@media screen and (max-width: 768px) {
    .mobile-header {
        display: flex;
    }

    .side-nav {
        transform: translateX(-100%);
        z-index: 999;
    }

    .side-nav.open {
        transform: translateX(0);
    }

    main {
        margin-left: 0;
        padding-top: 60px;
        /* 모바일 헤더 높이만큼 아래로 */
    }
}

/* 데스크탑 유지 */
@media screen and (min-width: 769px) {
    .mobile-header {
        display: none;
    }

    main {
        margin-left: 220px;
        padding: 40px 30px;
        width: calc(100% - 220px);
    }
}