/* =============================================
    * ▼▼▼ 헤더 스타일 (정리된 최종 버전) ▼▼▼
    * ============================================= */
:root {
    --header-height: 70px;
}
body.mobile-menu-open {
    overflow: hidden; /* 모바일 메뉴 열렸을 때 배경 스크롤 방지 */
}
#header {
    width: 100%;
    height: var(--header-height);
    background-color: #fff;
    border-bottom: 1px solid #e9ecef;
    position: sticky;
    top: 0;
    z-index: 999;
}
.header-container {
    max-width: 1200px;
    height: 100%;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo img {
    height: 30px;
}

/* --- 1. 데스크탑 메뉴 스타일 (PC 기본) --- */
.header-menu__list {
    display: flex;
    align-items: center;
    gap: 25px;
    list-style: none;
    padding: 0;
    margin: 0;
}
.header-menu__item a {
    text-decoration: none;
    color: #34495e;
    font-weight: 600;
    font-size: 16px;
    padding: 10px 5px;
    position: relative;
}
.header-menu__item a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background-color: #009393;
    transition: width 0.3s ease;
}
.header-menu__item a:hover::after, 
.header-menu__item a.active::after {
    width: 100%;
}
.header-menu__item a.active {
    color: #009393;
}

/* --- 2. 햄버거 버튼 & 모바일 메뉴 패널 (PC에서는 숨김) --- */
.hamburger { display: none; }
.mobile-menu__all {
    display: block; /* display는 항상 block으로 두고 transform으로 제어 */
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 100%;
    height: calc(100vh - var(--header-height));
    background-color: #fff;
    transform: translateX(-100%); /* 화면 왼쪽 밖에 숨김 */
    transition: transform 0.4s ease;
    padding: 0;
    overflow-y: auto; /* 메뉴가 길어지면 스크롤 */
}
.mobile-menu__all.is-open {
    transform: translateX(0); /* JS가 is-open 클래스를 추가하면 화면 안으로 슬라이드 */
}

/* --- 3. 반응형: 모바일 화면 (992px 이하) --- */
@media (max-width: 992px) {
    .header-menu__list {
        display: none; /* 데스크탑 메뉴 숨김 */
    }
    .hamburger {
        display: block; /* 햄버거 버튼 보임 */
        width: 30px;
        height: 24px;
        background: transparent;
        border: none;
        cursor: pointer;
        padding: 0;
        position: relative;
    }
    .hamburger span {
        display: block;
        width: 100%;
        height: 3px;
        background-color: #2c3e50;
        border-radius: 3px;
        position: absolute;
        left: 0;
        transition: all 0.3s ease;
    }
    .hamburger span:nth-child(1) { top: 0; }
    .hamburger span:nth-child(2) { top: 10px; }
    .hamburger span:nth-child(3) { bottom: 0; }

    .hamburger.is-active span:nth-child(1) { top: 10px; transform: rotate(45deg); }
    .hamburger.is-active span:nth-child(2) { opacity: 0; }
    .hamburger.is-active span:nth-child(3) { top: 10px; transform: rotate(-45deg); }
}

/* --- 4. 드롭다운 및 모바일 추가 스타일 --- */
.user-menu-container { position: relative; }
.user-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 15px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    min-width: 200px;
    list-style: none;
    padding: 10px 0;
    z-index: 100;
}
.user-dropdown-menu a {
    display: block;
    padding: 12px 20px;
    font-size: 15px;
    color: #34495e;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color 0.2s ease;
}
.user-dropdown-menu a:hover {
    background-color: #f8f9fa;
    color: #009393;
}
.mobile-menu__list { list-style: none; padding: 0; margin: 0; }
.mobile-menu__item a { display: block; padding: 18px 20px; font-size: 18px; font-weight: 600; color: #2c3e50; text-decoration: none; border-bottom: 1px solid #f1f3f5; }
.mobile-menu__item a.active { color: #009393; }
.mobile-menu__user-info { padding: 25px 20px; background-color: #f8f9fa; border-bottom: 1px solid #e9ecef; }
.mobile-menu__user-info .nickname { font-size: 20px; font-weight: 700; color: #009393; }
.mobile-menu__user-info .welcome { font-size: 16px; color: #34495e; }
.mobile-menu__divider { height: 10px; background-color: #f1f3f5; }