#contbody_scroll {
    position: relative;
    z-index: 12;
    overflow: hidden;
    min-height: 100%;    
    padding-top: 60px;  /* 헤더(65px) + nav(50px) + 여유공간(5px) */
}

/* 모바일에서 컨텐츠 영역 패딩 추가 */
#contbody_scroll_nav {
    position: relative;
    z-index: 12;
    overflow: hidden;
    min-height: 100%;    
    padding-top: 83px; /*padding-top: 70px;   헤더 높이(50px) + 메뉴(33px) + 여유 공간(0px) */
}

#contwrap {
    position: relative;
    left: 0;
    z-index: 13;
    margin-bottom: 70px;  /* 모바일 footer 높이만큼만 여백 설정 */
}

/* 공통 스타일 */
header{
    width: 100%;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 50px;
    background: #fff;
}

/* 모바일 헤더는 fixed 유지 */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

/* 기본적으로 모든 헤더 숨기기 */
.pc-header, .mobile-header {
    display: none;
}


.left-section {
    position: absolute;
    left: 10px;
    z-index: 2;
}

.home_btn {
    padding: 8px;
    display: flex;
    align-items: center;
}

.home_btn img {
    height: 25px;
    width: 25px;
}

.title {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-size: 20px;
    font-weight: 500;
    margin: 0;
    z-index: 1;
}

.right-section, .right-section-P  {
    position: absolute;
    right: 10px;
    display: flex;
    align-items: center;
    z-index: 2;
}

.right-section-P  {
    color: #1C2864;
    font-family: 'NotoSansKR-Medium';

}

.right-section a, .right-section-P a {
    color: #999;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px;
}

/* SVG 아이콘 스타일 */
.right-section .menu-icon, .right-section-P .menu-icon {
    width: 30px;
    height: 30px;
    margin-bottom: 4px;
    fill: currentColor;
}

.right-section a span, .right-section-P a span {
    font-size: 11px;
    line-height: 1.2;
}

.right-section a:hover,
.right-section a:active,
.right-section-P a:hover,
.right-section-P a:active {
    color: #20285D;
}

.menuM_btn {
    padding: 8px;
    display: flex;
    align-items: center;
}

.menuM_btn, .menuM_btn img {
    height: 25px;
    width: 25px;
}

nav{
    width: 100%;
    height: 33px;
    background-color: #F7F7F7;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    position: fixed;  /* 고정 위치 */
    top: 50px;  /* 헤더 높이만큼 아래에 위치 */
    left: 0;
    z-index: 999;  /* 헤더보다 낮은 z-index */
}

.nav_bar{
    width: max-content;  /* 컨텐츠 길이만큼 너비 설정 */
    min-width: 100%;  /* 최소 너비는 기존과 동일하게 */
    margin: 0 auto;
    display: flex;
	flex-wrap: nowrap;  /* 줄바꿈 방지 */
    align-items: center;
    justify-content: flex-start;  /* 왼쪽부터 정렬 */
    position: relative;
    border-bottom: 1px solid #ddd;
    padding-bottom: 2px;
}

.nav_bar p{
    width: 30%;
    line-height: 35px;
    color: #20285D;
    font-family:'NotoSansKR-Regular' ;
    font-size: 16px;
    text-align: center;
	background-color: #C0D9EE;
}

.nav_bar a{
    width: auto;  /* 고정 너비 제거 */
    min-width: 80px;  /* 최소 너비 설정 */
    padding: 0 15px;  /* 좌우 여백 추가 */
    line-height: 30px;
    color: #797979;
    font-family:'NotoSansKR-Regular' ;
    font-size: 14px;
    text-align: center;
    text-decoration: none;
    position: relative;
    white-space: nowrap;  /* 텍스트 줄바꿈 방지 */
}

/* nav_bar 메뉴 활성화 스타일 */
.nav_bar a.active {
    color: #1C2864;
    font-family: 'NotoSansKR-Medium';
}

/* 활성화된 메뉴 하단 바 */
.nav_bar a.active::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #1C2864;
}

/* hover 효과 */
.nav_bar a:hover {
    color: #1C2864;
}


/*  페이징 효과 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 30px 0;
    font-family: 'NotoSansKR-Regular';
    gap: 5px;
}

.pagination ul {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 5px;
}

.pagination li {
    margin: 0;
}

.pagination a, .pagination strong {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: 4px;
    font-size: 14px;
    text-decoration: none;
    color: #666;
    background-color: #f5f5f5;
    transition: all 0.2s ease;
}

.pagination a:hover {
    background-color: #e0e0e0;
    color: #1C2864;
}

/* 활성 페이지 스타일 수정 - 더 연한 색상으로 변경 */
.pagination strong {
    background-color: #C0D9EE;  /* 기존 #1C2864에서 더 연한 파란색으로 변경 */
    color: #1C2864;  /* 텍스트 색상을 진한 파란색으로 변경하여 가독성 유지 */
    font-weight: 500;
}

.pagination .first, .pagination .last {
    background-color: #f5f5f5;
    border: 1px solid #ddd;
}

.pagination .first img, .pagination .last img {
    width: 30px;
    height: 30px;
}

/* 모바일 대응 */
@media screen and (max-width: 800px) {
    .pagination a, .pagination strong {
        min-width: 20px;
        height: 32px;
        font-size: 13px;
        padding: 0 8px;
    }
}

/* 미디어쿼리 */
@media screen and (min-width: 801px) {
    
    header {
        position: relative;
    }

    .pc-header {
        display: flex !important;
        align-items: center;
        height: 100%;
    }

    #contbody_scroll, #contbody_scroll_nav {
        padding-top: 0;
    }

    #contwrap {
        margin-bottom: 150px; 
    }    

    nav {
        position: relative;
        top: 0;
    }
}

@media screen and (max-width: 800px) {

    #contbody_scroll {
        min-height: calc(100vh - 60px); 
    }

    #contbody_scroll_nav {
        min-height: calc(100vh - 85px); 
    }
    
    .mobile-header {
        display: flex !important;
        align-items: center;
        height: 100%;
    }
       
    .right-section a span {
        font-size: 10px;
    }
   
}

/* 메뉴 활성화 스타일 */
.right-section a.active {
    color: #20285D;  /* 활성화된 메뉴 색상 */
}

.right-section a.active .menu-icon {
    fill: #20285D;  /* 활성화된 아이콘 색상 */
}

.right-section a.active span {
    color: #20285D;  /* 활성화된 텍스트 색상 */
}

/* PC 메뉴 활성화 스타일 */
.menuP_btn.active {
    color: #1C2864;
    font-family: 'NotoSansKR-Bold';    
}

/* 스크롤바 숨기기 (선택사항) */
nav::-webkit-scrollbar {
    display: none;
}

nav {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

