/* 사용자 메뉴 버튼 스타일 */
.userMenuBtn {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    font-size: 14px;
    margin: 0 5px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.userMenuBtn:hover {
    background-color: #0056b3;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.userInfoText {
    color: #495057;
    font-size: 14px;
    margin: 0 10px;
    font-weight: 500;
    display: inline-block;
}

.userInfoText:before {
    content: "👤";
    margin-right: 5px;
}

.mypageBtn {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    font-size: 14px;
    margin: 0 4px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(108, 117, 125, 0.15);
    min-width: 80px;
    vertical-align: middle;
    line-height: 1;
}

.mypageBtn:hover {
    background: linear-gradient(135deg, #5a6268 0%, #545b62 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(108, 117, 125, 0.25);
    text-decoration: none;
}

.mypageBtn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(108, 117, 125, 0.2);
}

.logoutBtn {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    font-size: 14px;
    margin: 0 4px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(108, 117, 125, 0.15);
    min-width: 80px;
    vertical-align: middle;
    line-height: 1;
}

.logoutBtn:hover {
    background: linear-gradient(135deg, #5a6268 0%, #545b62 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(108, 117, 125, 0.25);
}

.logoutBtn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(108, 117, 125, 0.2);
}

/* PC용 로그인/회원가입 버튼 스타일 */
.userMenu.pc .loginBtn,
.userMenu.pc .registerBtn {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%) !important;
    color: white !important;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    font-size: 14px;
    margin: 0 5px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(108, 117, 125, 0.15);
}

.userMenu.pc .loginBtn:hover,
.userMenu.pc .registerBtn:hover {
    background: linear-gradient(135deg, #5a6268 0%, #545b62 100%) !important;
    color: white !important;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(108, 117, 125, 0.25);
}

/* 모바일 메뉴 스타일 */
.moMenu .userMenuBtn,
.moMenu .userInfoText,
.moMenu .mypageBtn,
.moMenu .logoutBtn,
.moMenu .loginBtn,
.moMenu .registerBtn {
    width: 100%;
    text-align: center;
    margin: 8px 0;
    border-radius: 8px;
    box-sizing: border-box;
}

/* 모바일 로그인/회원가입 버튼 스타일 */
.moMenu .loginBtn,
.moMenu .registerBtn {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%) !important;
    color: white !important;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    display: block;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin: 8px 0;
    box-shadow: 0 2px 8px rgba(108, 117, 125, 0.15);
    vertical-align: middle;
    line-height: 1;
}

.moMenu .loginBtn:hover,
.moMenu .registerBtn:hover {
    background: linear-gradient(135deg, #5a6268 0%, #545b62 100%) !important;
    color: white !important;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.25);
}

.moMenu .mypageBtn {
    padding: 12px 20px;
    font-size: 15px;
    font-weight: 500;
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
    box-shadow: 0 2px 8px rgba(108, 117, 125, 0.15);
    vertical-align: middle;
    line-height: 1;
}

.moMenu .mypageBtn:hover {
    background: linear-gradient(135deg, #5a6268 0%, #545b62 100%);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.25);
}

.moMenu .logoutBtn {
    padding: 12px 20px;
    font-size: 15px;
    font-weight: 500;
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
    box-shadow: 0 2px 8px rgba(108, 117, 125, 0.15);
    vertical-align: middle;
    line-height: 1;
}

.moMenu .logoutBtn:hover {
    background: linear-gradient(135deg, #5a6268 0%, #545b62 100%);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.25);
}

.moMenu .userInfoText {
    color: #0B396C;
    font-size: 16px;
    font-weight: 600;
    padding: 12px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    margin: 8px 0;
    text-align: center;
}

.dropdown {
    position: relative;
}

/* 헤더 기본 스타일 */
header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 10;
    width: 100%;
    border-bottom: 1px solid #e9ecef;
}

/* 헤더 내부 요소들 기본 설정 */
header * {
    box-sizing: border-box;
}

/* 헤더 배경 그라데이션 */
header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    z-index: -1;
}

/* 헤더 컨테이너 */
#header {
    position: relative;
    height: 80px;
    z-index: 10;
}

#header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

#header h1.logo {
    font-size: 24px;
    font-weight: 700;
    color: #0B396C;
}

#header h1.logo a {
    color: #0B396C;
    text-decoration: none;
}

.mainMenu, .moMenu {
    z-index: 20;
}

/* 드롭다운 메뉴 기본 스타일 */
#header .mainMenu.pc .dropdown .dropdown-content {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(30px);
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    visibility: hidden;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
    min-width: 160px;
    padding: 4px 0;
}

/* 햄버거 버튼 기본 스타일 */
#header .hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 4px;
    z-index: 20;
}

.visual, .content {
    position: relative;
    z-index: 1;
}

.allWrap {
    position: relative;
}

#header .mainMenu.pc .dropdown .dropdown-content::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid white;
}

#header .mainMenu.pc .dropdown .dropdown-content a {
    display: block;
    padding: 8px 12px;
    color: #0B396C;
    text-decoration: none;
    font-size: 16rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border-radius: 3px;
    margin: 1px 4px;
    position: relative;
}

.dropdown-content a::before {
    display: none;
}

.dropdown-content a:first-child {
    margin-top: 4px;
}

.dropdown-content a:last-child {
    margin-bottom: 4px;
}

.dropdown-content a:hover {
    background: #e6f3ff;
    color: #0B396C;
    font-weight: bold;
    padding-left: 16px;
    border-left: 3px solid #0B396C;
    transform: scale(1.02);
    box-shadow: 0 2px 8px rgba(11, 57, 108, 0.15);
}

.dropdown-content a:hover::before {
    display: none;
}

.dropdown-content a:active {
    background: #e9ecef;
    transform: translateX(4px);
}

/* PC 드롭다운 hover 효과 */
#header .mainMenu.pc .dropdown:hover .dropdown-content {
    visibility: visible;
    opacity: 1;
    transform: translateX(-50%) translateY(40px);
}

.dropdown > a {
    position: relative;
    padding-right: 20px;
    transition: all 0.3s ease;
}

.dropdown:hover > a {
    color: #0B396C;
    font-weight: 600;
}

.dropdown > a::after {
    content: "▼";
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 10px;
    transition: transform 0.3s ease;
}

.dropdown:hover > a::after {
    transform: translateY(-50%) rotate(180deg);
}

/* 모바일 드롭다운 스타일 - 완전히 새로운 접근 */
.moMenu .dropdown-content {
    position: static !important;
    transform: none !important;
    box-shadow: none !important;
    border: none !important;
    background: #ffffff !important;
    width: 100% !important;
    left: 0 !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    z-index: 30;
    border-radius: 8px !important;
    margin: 5px 0 !important;
    padding: 0 !important;
    
    /* 기본 상태: 숨김 */
    max-height: 0px !important;
    height: 0px !important;
    overflow: hidden !important;
    opacity: 0 !important;
    display: none !important;
    visibility: hidden !important;
    
    /* 트랜지션 */
    transition: all 0.3s ease !important;
}

.moMenu .dropdown-content::before {
    display: none !important;
}

/* 활성화 상태 - 가장 강력한 우선순위 */
.moMenu .dropdown.active .dropdown-content {
    max-height: 500px !important;
    height: auto !important;
    opacity: 1 !important;
    padding: 8px 0 !important;
    margin: 8px 0 !important;
    
    /* 강제로 보이게 하기 */
    display: block !important;
    visibility: visible !important;
    
    /* PC 버전과 동일한 스타일 적용 */
    background: #ffffff !important;
    border: 1px solid rgba(11, 57, 108, 0.1) !important;
    box-shadow: 0 4px 12px rgba(11, 57, 108, 0.15) !important;
}

.moMenu .dropdown-content a {
    color: #0B396C !important;
    padding: 12px 20px !important;
    font-size: 22rem !important;
    margin: 2px 8px !important;
    border-radius: 6px !important;
    font-weight: 500 !important;
    background-color: transparent !important;
    display: block !important;
    width: calc(100% - 16px) !important;
    text-decoration: none !important;
    border: 1px solid rgba(11, 57, 108, 0.1) !important;
}

.moMenu .dropdown-content a:hover {
    background-color: #e6f3ff;
    color: #0B396C !important;
    transform: none;
    font-weight: 600;
}

.moMenu .dropdown > a::after {
    content: "▼";
    font-size: 10px;
    margin-left: 6px;
    transition: transform 0.3s ease;
    display: inline-block;
}

.moMenu .dropdown.active > a::after {
    transform: rotate(180deg);
}

/* 회원 전용 표시 스타일 */
.member-only {
    font-size: 12px;
    opacity: 0.7;
    margin-left: 4px;
}

.resource-link {
    position: relative;
}

/* 회원 모달 스타일 */
.member-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    z-index: 1000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.member-modal[style*="display: block"] {
    display: flex !important;
}

.member-modal-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    position: relative;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.member-modal-header {
    padding: 20px 45px 15px 20px; /* 우측 패딩을 늘려서 X 버튼과 겹치지 않도록 */
    border-bottom: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    justify-content: flex-start; /* 좌측 정렬로 변경 */
    position: relative;
}

.member-modal-header h3 {
    margin: 0;
    color: #0B396C;
    font-size: 18px;
    font-weight: 600;
}

.member-modal-header .icon {
    font-size: 18px;
    margin-right: 10px;
    color: #0B396C;
}

.member-modal-body {
    padding: 25px 20px 20px;
}

.member-modal-body p {
    margin: 0 0 15px 0;
    line-height: 1.5;
    color: #666;
    font-size: 14px; /* 폰트 크기 명시적으로 설정 */
}

.member-modal-body p:last-child {
    margin-bottom: 0;
}

.member-modal-body .highlight {
    font-weight: 600;
    color: #0B396C;
    font-size: 15px; /* 강조 텍스트는 약간 크게 */
}

.member-modal-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 25px;
    padding-top: 5px;
}

.member-modal-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    min-width: 90px;
}

.member-modal-btn.primary {
    background: #0B396C;
    color: white;
    box-shadow: 0 2px 4px rgba(11, 57, 108, 0.2);
}

.member-modal-btn.primary:hover {
    background: #093052;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(11, 57, 108, 0.3);
}

.member-modal-btn.secondary {
    background: #f8f9fa;
    color: #6c757d;
    border: 1px solid #dee2e6;
}

.member-modal-btn.secondary:hover {
    background: #e9ecef;
    color: #495057;
    transform: translateY(-1px);
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 20px;
    cursor: pointer;
    color: #999;
    background: none;
    border: none;
    padding: 5px;
    line-height: 1;
    border-radius: 3px;
    transition: all 0.2s ease;
}

.close-modal:hover {
    color: #333;
    background-color: #f8f9fa;
}

/* 반응형 스타일 */
@media (max-width: 768px) {
    .member-modal-content {
        margin: 20% auto;
        width: 95%;
    }
    
    .member-modal-buttons {
        flex-direction: column;
    }
    
    .member-modal-btn {
        width: 100%;
    }
}

/* PC 화면에서 모바일 메뉴 완전히 숨기기 */
@media screen and (min-width: 1281px) {
    .moMenu {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        z-index: -1 !important;
    }
    
    .dim {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        z-index: -1 !important;
    }
    
    #header .hamburger {
        display: none !important;
        visibility: hidden !important;
    }
}

/* 1280px 이하에서 모바일 메뉴 활성화 */
@media screen and (max-width: 1280px) {
    /* 햄버거 버튼 표시 */
    #header .hamburger {
        display: flex !important;
        width: 30px;
        height: 30px;
        position: relative;
        cursor: pointer;
        z-index: 9999;
    }
    
    #header .hamburger span {
        width: 100%;
        height: 2px;
        background-color: #0B396C;
        display: block;
        margin: 3px 0;
        transition: 0.3s;
        transform-origin: center;
    }
    
    #header .hamburger.on span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    #header .hamburger.on span:nth-child(2) {
        opacity: 0;
    }
    
    #header .hamburger.on span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
    
    /* PC 메뉴 숨기기 */
    .mainMenu {
        display: none !important;
    }
    
    .userMenu.pc {
        display: none !important;
    }
    
    /* 모바일 메뉴 표시 */
    .moMenu {
        display: block !important;
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: white;
        box-shadow: -5px 0 15px rgba(0,0,0,0.1);
        transition: right 0.3s ease;
        z-index: 9998;
        overflow-y: auto;
        padding-top: 80px;
    }
    
    .moMenu.on {
        right: 0 !important;
    }
    
    /* 모바일 메뉴 내부 스타일 */
    .moMenu ul {
        list-style: none;
        padding: 20px;
        margin: 0;
    }
    
    .moMenu ul li {
        margin-bottom: 15px;
    }
    
    .moMenu ul li a {
        display: block;
        padding: 15px 20px;
        color: #0B396C;
        text-decoration: none;
        font-size: 22rem;
        font-weight: 500;
        border-radius: 8px;
        transition: all 0.3s ease;
    }
    
    .moMenu ul li a:hover {
        background: #f8f9fa;
        color: #0B396C;
        font-weight: 600;
    }
    
    /* 모바일 메뉴 사용자 정보 */
    .moMenu .userInfoText {
        background: #e6f3ff;
        color: #0B396C;
        font-weight: 600;
        text-align: center;
        padding: 15px;
        border-radius: 8px;
        margin-bottom: 20px;
    }
    
    /* 모바일 메뉴 버튼들 */
    .moMenu .loginBtn,
    .moMenu .registerBtn,
    .moMenu .mypageBtn,
    .moMenu .logoutBtn {
        display: block;
        width: 100%;
        text-align: center;
        padding: 15px;
        margin: 10px 0;
        border-radius: 8px;
        font-weight: 500;
        transition: all 0.3s ease;
    }
    
    /* 오버레이 비활성화 */
    .dim {
        display: none !important;
    }
    
    .dim.on {
        display: none !important;
    }
}

/* 768px 이하에서 추가 조정 */
@media screen and (max-width: 768px) {
    #header {
        height: 60px;
    }
    
    #header h1.logo {
        font-size: 18px;
    }
    
    .moMenu {
        width: 250px;
        padding-top: 60px;
    }
    
    .moMenu ul {
        padding: 15px;
    }
    
    .moMenu ul li a {
        font-size: 22rem;
        padding: 12px 15px;
    }
}

