<style>
/* 기본 그리드 레이아웃 */
.rb_gallery_grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
    margin: 0 auto;
    padding: 20px 0;
}

/* 프리미엄 게시물 */
.bbs_prd_list {
    grid-column: span 2;
}

.bbs_prd_list_wrap {
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;  /* 이미지가 radius 밖으로 넘치지 않도록 */
}

.bbs_prd_list_thumb {
    position: relative;
    padding-bottom: 75%;
    overflow: hidden;
}

.bbs_prd_list_thumb img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

.bbs_prd_list_con {
    padding: 15px;
}

.bbs_prd_list_con_li1 {
    margin-bottom: 10px;
}

.bbs_prd_list_con_li1 a {
    font-size: 16px;
    color: #333;
    font-weight: 500;
}

.bbs_prd_list_con_li2 {
    font-size: 14px;
    color: #666;
    margin-bottom: 5px;
}

.bbs_prd_list_con_li3 {
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    font-size: 14px;
    color: #888;
    line-height: 1.4;
}

/* 웹진 스타일 게시물 */
.webzine_item {
    display: flex;
    gap: 20px;
    padding: 5px;
    border: 1px solid #ddd;
    margin-top: 0px;
    grid-column: span 3;
    background: #fff;
}

.webzine_thumb {
    flex: 0 0 25%;
    position: relative;
}

.webzine_thumb img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.webzine_content {
    flex: 0 0 75%;
padding-top:10px;
}

.webzine_title {
    margin-bottom: 10px;
}

.webzine_title a {
    font-size: 16px;
    color: #333;
    font-weight: 500;
}

.webzine_info {
    font-size: 14px;
    color: #666;
    margin-bottom: 5px;
}

.webzine_desc {
    font-size: 14px;
    color: #888;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* 호버 효과 */
.bbs_prd_list:hover,
.webzine_item:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

/* 모바일 스타일 */
@media all and (max-width:1024px) {
    .rb_gallery_grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 5px;
        padding:0;
    }


    .bbs_prd_list {
        grid-column: span 1;
        border: none !important;
        padding: 0 !important;
    }

    .webzine_item {
        grid-column: 1 / -1;
        padding: 0px;
    }

    .bbs_prd_list_con_li2.cut2 {
        font-size: 15px !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
        width: 100% !important;
        display: block !important;
    }

    .bbs_prd_list_con_li3 {
        display: block !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        width: 100% !important;
        max-width: 66ch !important;
    }
}

@media all and (max-width:768px) {
    .rb_gallery_grid {
        gap: 10px;
    }

    .bbs_prd_list_con_li2.cut2 {
        font-size: 13.5px !important;
    }
}

/* 새로운 라벨 스타일 */
.rc_label_new {
display: inline-block;
padding: 3px   !important;
background: #fff !important;
border: 1px solid #ddd;
font-size: 12px !important;  /* 기존보다 1px 작게 */
line-height: 1.2;
border-top-left-radius: 8px !important;
border-bottom-left-radius: 8px !important;
border-top-right-radius: 8px !important;
border-bottom-right-radius: 8px !important;
color: #666;
}

/* 모바일에서의 스타일 */
@media all and (max-width:1024px) {
    .rc_label_new {
    font-size: 12px;
    padding: 2px 6px;
    }
}


/* 플로팅 버튼 기본 스타일 */
.floating_map_btn {
display: none;  /* 기본적으로 숨김 */
}

/* 모바일에서만 버튼 표시 */
@media screen and (max-width: 1024px) {
.floating_map_btn {
display: block;
position: fixed;
bottom: 50px;
left: 50%;
transform: translateX(-50%);
z-index: 100;
}

.floating_map_btn a {
display: flex;
align-items: center;
justify-content: center;
background: #2b96ed;
color: #fff;
padding: 12px 24px;
border-radius: 15px;
box-shadow: 0 4px 10px rgba(0,0,0,0.15);
font-size: 15px;
font-weight: 500;
text-decoration: none;
transition: all 0.3s ease;
}

.floating_map_btn i {
margin-right: 8px;
font-size: 16px;
}

.floating_map_btn a:hover,
.floating_map_btn a:active {
background: #2280d0;
color: #fff;
}
}

/* 작은 모바일 화면 대응 */
@media screen and (max-width: 768px) {
.floating_map_btn a {
padding: 10px 20px;
font-size: 14px;
}
}
/* 조건검색 스타일 */
                    .wrap_selec {
                        width: 100% !important;
                    }
                    .filter_wrapper {
                        display: flex;
                        justify-content: space-between;
                        align-items: center;
                        width: 100%;
                        gap: 10px;
                    }
                    .select_group {
                        display: none;
                    }
                    .filter_select {
                        flex: 1;
                        padding: 8px;
                        font-size: 14px;
                    }
                    .control_container {
                        display: flex;
                        align-items: center;
                        gap: 10px;
                        white-space: nowrap;
                        width: 100%;
                        justify-content: center;
                    }
                    .condition_search_btn {
                        background: #0d6efd;
                        border: none;
                        border-radius: 4px;
                        padding: 8px 15px;
                        cursor: pointer;
                        display: flex;
                        align-items: center;
                        justify-content: center;
                        color: #fff;
                        font-weight: 500;
                        width: 100%;
                        max-width: 200px;
                        margin: 0 auto;
                    }
                    .condition_search_btn img {
                        filter: brightness(0) invert(1);
                        margin-right: 5px;
                    }
                    .condition_search_btn .tooltips {
                        color: #fff;
                    }
                    @media screen and (max-width: 768px) {
                        .condition_search_btn {
                            padding: 8px 12px;
                            max-width: 150px;
                        }
                        .condition_search_btn .tooltips {
                            display: none;
                        }
                    }
/* 조건검색 스타일 끝 */

/* 지도 스타일 */
.map_area {
    position: relative;
    width: 100%;
    height: 60vh;
    overflow: hidden;
    opacity: 1;
    transition: all 0.3s ease-in-out;
}

.map_area.show {
    display: block;
}

.map_area:not(.show) {
    display: none;
}

#map {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

/* 지도 토글 버튼 스타일 */
.map_toggle_btn {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
}

.map_toggle_btn a {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    background: #2b96ed;
    color: #fff;
    border-radius: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    font-size: 15px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.map_toggle_btn a:hover {
    background: #2280d0;
}

.map_toggle_btn i {
    margin-right: 8px;
}

/* PC 버전 스타일 조정 */
@media screen and (min-width: 1025px) {
    .map_toggle_btn {
        bottom: 50px;
    }

    .map_toggle_btn a {
        padding: 15px 30px;
        font-size: 16px;
    }
}

/* 모바일 버전 스타일 조정 */
@media screen and (max-width: 1024px) {
    .map_toggle_btn {
        bottom: 80px;
    }

    .map_toggle_btn a {
        padding: 12px 24px;
        font-size: 14px;
    }
}

#ins {
    display: block;
    width: 100%;
    margin: 20px 0;
    clear: both;
    float: none;
}

/* float 해제를 위한 clearfix */
#ins:before,
#ins:after {
    content: "";
    display: table;
    clear: both;
}

.banner_wrapper {
    width: 100%;
    margin: 0 auto;
    padding: 0;
    position: relative;
    display: block;
    float: none;
    overflow: hidden;
}

#ins {
    width: 100%;
    box-sizing: border-box;
}

/* 기존 스타일에 추가 */
.webzine_item .webzine_content {
    flex: 1;
    min-width: 0; /* 이 속성이 중요합니다 */
}

.webzine_item .webzine_title {
    margin-bottom: 10px;
}

.webzine_item .webzine_title a {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    color: #333;
    font-weight: 500;
}

@media screen and (max-width: 768px) {
    .webzine_item {
        padding: 15px;
    }

    .webzine_content {
        width: 100%;
    }

    .webzine_title {
        width: 100%;
    }

    .webzine_title a {
        font-size: 15px;
        line-height: 1.4;
    }
}

/* 게시물 목록 기본 스타일 */
.rb_gallery_grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* 일반 게시물 스타일 */
.teacher_item {
    position: relative;
    display: flex;
    padding: 20px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    width: 100%;
    box-sizing: border-box;
}

.teacher_item:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* 프리미엄 게시물 스타일 */
.teacher_item[data-premium="true"] {
    border: 2px solid #2196f3;
}

/* 썸네일 영역 */
.teacher_thumb {
    flex: 0 0 100px;
    height: 100px;
    margin-right: 20px;
    position: relative;
    margin-bottom: 5px;
}

.teacher_thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

/* 사진 아래 선생님 정보 스타일 */
.teacher_basic_info {
    position: relative;
    background: white;
    padding: 10px;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 5px;
}

.teacher_name_wrap {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.teacher_name {
    font-weight: 700;
    font-size: 1.1em;
    color: #333;
}

.teacher_suffix {
    color: #888;
    font-size: 0.85em;
}

.teacher_meta {
    color: #666;
    font-size: 0.95em;
    position: relative;
    padding-left: 0;
    display: flex;
    align-items: center;
    gap: 4px;
}

.teacher_meta::before {
    display: none;
}

.gender {
    display: inline-flex;
    align-items: center;
    margin-left: 4px;
}

.gender i {
    font-size: 1em;
}

.gender i.fa-mars {
    color: #2196F3;
}

.gender i.fa-venus {
    color: #E91E63;
}

/* 인증 버튼 영역 */
.verify_buttons {
    position: absolute;
    top: 0;
    right: 0;
    display: flex;
    gap: 8px;
    z-index: 2;
}

.verify_badge, .education_badge, .location_badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.75em;
    background-color: #f5f5f5;
    color: #666;
}

.verify_badge i, .education_badge i, .location_badge i {
    font-size: 0.9em;
}

.verify_badge i.fa-check-circle, .education_badge i.fa-graduation-cap {
    color: #4CAF50;
}

.verify_badge i.fa-times-circle, .education_badge i.fa-times-circle {
    color: #f44336;
}

.location_badge i.fa-map-marker-alt {
    color: #2196F3;
}

.info_row {
    margin-bottom: 8px;
}

/* No. 스타일 */
.teacher_no {
    font-size: 0.9em;
    color: #888;
}

/* 제목 스타일 */
.post_title {
    font-size: 1.2em;
    font-weight: bold;
    color: #333;
    margin: 0;
}

/* 학력 정보 스타일 */
.education_info {
    color: #555;
    font-size: 0.95em;
}

.education {
    display: inline-block;
    background-color: #f0f7ff;
    color: #1976d2;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.9em;
}

/* 과목 태그 스타일 */
.subject_tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.subject_tag {
    background: #f5f5f5;
    color: #666;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.9em;
}

/* 구분선 */
.info_divider {
    width: 100%;
    height: 1px;
    background-color: #eee;
    margin: 15px 0;
}

/* 하단 정보 */
.teacher_footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.teacher_stats {
    display: flex;
    gap: 20px;
}

.stat_item {
    color: #666;
    font-size: 0.9em;
}

.action_buttons {
    display: flex;
    align-items: center;
    gap: 10px;
}

.status_button {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    font-size: 0.9em;
    font-weight: 500;
}

.status_button.recruiting {
    background-color: #e3f2fd;
    color: #1976d2;
}

.status_button.closed {
    background-color: #ffebee;
    color: #c62828;
}

.view_profile {
    background: #2196f3;
    color: white;
    padding: 6px 16px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.9em;
    transition: background 0.2s ease;
}

.view_profile:hover {
    background: #1976d2;
}

/* 모바일 대응 */
@media (max-width: 1024px) {
    .rb_gallery_grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        padding: 15px;
    }
}

@media (max-width: 768px) {
    .rb_gallery_grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        padding: 10px;
    }

    .teacher_item {
        padding: 15px;
    }

    .teacher_thumb {
        flex: 0 0 90px;
        height: 90px;
        margin-right: 15px;
    }

    .post_title {
        font-size: 1.1em;
    }

    .teacher_basic {
        gap: 12px;
    }

    .subject_tags {
        gap: 4px;
    }

    .subject_tag {
        font-size: 0.85em;
        padding: 3px 8px;
    }

    .teacher_stats {
        gap: 15px;
    }

    .action_buttons {
        gap: 8px;
    }

    .status_button,
    .view_profile {
        padding: 5px 12px;
        font-size: 0.85em;
    }
    
    .teacher_name {
        font-size: 1.1em;
    }
    
    .teacher_suffix {
        font-size: 0.85em;
    }
    
    .teacher_meta {
        font-size: 0.9em;
    }
    
    .verify_badge, .education_badge {
        font-size: 0.8em;
        padding: 3px 8px;
    }
}

@media (max-width: 640px) {
    .rb_gallery_grid {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 10px;
    }

    .teacher_item {
        padding: 15px;
    }

    .teacher_thumb {
        flex: 0 0 80px;
        height: 80px;
        margin-right: 12px;
    }

    .post_title {
        font-size: 1em;
    }

    .teacher_basic_info {
        padding: 8px;
    }

    .teacher_name {
        font-size: 1em;
    }

    .teacher_suffix {
        font-size: 0.8em;
    }

    .teacher_meta {
        font-size: 0.85em;
    }

    .verify_buttons {
        gap: 6px;
    }

    .verify_badge, .education_badge, .location_badge {
        font-size: 0.75em;
        padding: 2px 6px;
    }

    .subject_tags {
        gap: 3px;
    }

    .subject_tag {
        font-size: 0.8em;
        padding: 2px 6px;
    }

    .teacher_stats {
        gap: 12px;
    }

    .stat_item {
        font-size: 0.8em;
    }

    .action_buttons {
        gap: 6px;
    }

    .status_button,
    .view_profile {
        padding: 4px 10px;
        font-size: 0.8em;
    }
}

/* 모달 기본 스타일 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9000;
}

/* 검색 모달 스타일 */
.search-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    z-index: 9000;
}

/* 교습과목/교습대상 모달 스타일 */
.modal#subject-modal,
.modal#target-modal {
    z-index: 9999 !important;
}

@media (max-width: 768px) {
    .modal#subject-modal,
    .modal#target-modal {
        z-index: 10001;
    }
}

.search-modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 20px;
    border-radius: 8px;
    width: 80%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
}

.search-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.search-modal-header h2 {
    margin: 0;
    color: #333;
    font-size: 20px;
}

.close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: #000;
}

/* 섹션 스타일 */
.search-section {
    display: flex;
    margin-bottom: 20px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
}

.search-section-title {
    flex: 0 0 150px;
    padding: 15px;
    background: #f8f9fa;
    border-right: 1px solid #eee;
    display: flex;
    align-items: center;
    font-weight: 500;
    color: #333;
}

.search-section-content {
    flex: 1;
    padding: 15px;
}

/* 아이콘 버튼 스타일 */
.icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
    color: #666;
    cursor: pointer;
    transition: all 0.2s ease;
    margin: 5px;
    min-width: 120px;
}

.icon-button i {
    margin-right: 8px;
    font-size: 16px;
}

.icon-button:hover {
    border-color: #2196F3;
    color: #2196F3;
}

.icon-button.active {
    background: #2196F3;
    border-color: #2196F3;
    color: #fff;
}

/* 레인지 슬라이더 */
.range-slider {
    position: relative;
    padding: 20px 10px;
}

.range-slider input[type="range"] {
    width: 100%;
    margin: 10px 0;
    -webkit-appearance: none;
    height: 4px;
    background: #ddd;
    border-radius: 2px;
    outline: none;
}

.range-slider input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: #2196F3;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
}

.range-slider input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

.range-slider .range-values {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    color: #666;
    font-size: 14px;
}

.range-slider .range-tooltip {
    position: absolute;
    background: #2196F3;
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    transform: translateY(-20px);
    transition: all 0.2s ease;
}

/* 과목 선택 스타일 */
.subject-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.subject-tag {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    background: #f5f5f5;
    border-radius: 4px;
    font-size: 14px;
    color: #666;
    cursor: pointer;
    transition: all 0.2s ease;
}

.subject-tag:hover {
    background: #e3f2fd;
    color: #2196F3;
}

.subject-tag.active {
    background: #2196F3;
    color: #fff;
}

/* 검색 버튼 */
.search-button {
    width: 100%;
    padding: 15px;
    background: #2196F3;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 20px;
}

.search-button:hover {
    background: #1976D2;
}

/* 모바일 대응 */
@media screen and (max-width: 768px) {
    .search-modal-content {
        width: 95%;
        margin: 10% auto;
    }

    .search-section {
        flex-direction: column;
    }

    .search-section-title {
        flex: none;
        border-right: none;
        border-bottom: 1px solid #eee;
    }

    .icon-button {
        width: calc(50% - 10px);
        margin: 5px;
    }
}

/* 모달 기본 스타일 */
.search_modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 9999;
}

.search_modal_content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    background: #fff;
    border-radius: 12px;
    overflow-y: auto;
}

.search_modal_header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.search_modal_header h2 {
    margin: 0;
    font-size: 20px;
    color: #333;
}

.close_btn {
    background: none;
    border: none;
    font-size: 24px;
    color: #666;
    cursor: pointer;
}

.search_modal_body {
    padding: 20px;
}

/* 검색 행 스타일 */
.search_row {
    margin-bottom: 20px;
    padding: 15px;
    border: 1px solid #eee;
    border-radius: 8px;
}

.search_title {
    font-weight: 500;
    color: #333;
    margin-bottom: 10px;
}

.search_content {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* 아이콘 버튼 스타일 */
.icon_btn {
    display: inline-flex;
    align-items: center;
    padding: 10px 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
    color: #666;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 120px;
}

.icon_btn i {
    margin-right: 8px;
    font-size: 16px;
}

.icon_btn:hover {
    border-color: #2196F3;
    color: #2196F3;
}

.icon_btn.active {
    background: #2196F3;
    border-color: #2196F3;
    color: #fff;
}

/* 레인지 슬라이더 스타일 */
.range_slider_wrap {
    width: 100%;
    padding: 20px 10px;
}

.range_slider {
    position: relative;
    height: 4px;
    background: #ddd;
    border-radius: 2px;
    margin: 20px 0;
}

.range_slider input[type="range"] {
    position: absolute;
    width: 100%;
    height: 4px;
    background: none;
    pointer-events: none;
    -webkit-appearance: none;
}

.range_slider input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: #2196F3;
    border-radius: 50%;
    cursor: pointer;
    pointer-events: auto;
    transition: all 0.2s ease;
}

.range_values {
    display: flex;
    justify-content: space-between;
    color: #666;
    font-size: 14px;
}

/* 지역 선택 스타일 */
.region_selects {
    display: flex;
    gap: 10px;
}

.region_selects select {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
}

/* 과목 선택 스타일 */
.selected_subjects {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.subject_tag {
    padding: 6px 12px;
    background: #e3f2fd;
    color: #2196F3;
    border-radius: 4px;
    font-size: 14px;
}

/* 교습비용 스타일 */
.cost_input_wrap {
    width: 100%;
}

.cost_input_wrap select {
    width: 100px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 10px;
}

/* 검색 버튼 */
.search_btn {
    width: 100%;
    padding: 15px;
    background: #2196F3;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.search_btn:hover {
    background: #1976D2;
}

/* 모바일 대응 */
@media screen and (max-width: 768px) {
    .search_modal_content {
        width: 95%;
    }

    .icon_btn {
        width: calc(50% - 5px);
    }

    .region_selects {
        flex-direction: column;
    }
}

/* 지도 마커 클릭 시 이미지 스타일 */
#teacherImageContainer {
    display: none;
    position: fixed;
    top: 50%;
    left: 20%;
    transform: translateY(-50%);
    z-index: 1000;
    background: white;
    padding: 10px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0,0,0,0.2);
}

.teacher-image {
    max-width: 300px;
    max-height: 400px;
    object-fit: contain;
}

@media (max-width: 768px) {
    #teacherImageContainer {
        left: 50%;
        transform: translate(-50%, -50%);
    }
    
    .teacher-image {
        max-width: 200px;
        max-height: 300px;
    }
}

    /* 교습대상 모달 스타일 */
    .target-list {
        padding: 15px;
        background: #f8f9fa;
        border-radius: 10px;
        max-height: 500px;
        overflow-y: auto;
    }

    .target-group {
        background: #fff;
        margin-bottom: 15px;
        padding: 15px;
        border-radius: 8px;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    }

    .target-group:last-child {
        margin-bottom: 0;
    }

    .target-group label {
        display: flex;
        align-items: center;
        gap: 10px;
        cursor: pointer;
        padding: 8px;
        border-radius: 6px;
        transition: background-color 0.2s;
    }

    .target-group label:hover {
        background-color: #f0f4f8;
    }

    .target-checkbox {
        width: 18px;
        height: 18px;
        accent-color: #4A90E2;
        cursor: pointer;
    }

    .parent-checkbox + span {
        font-weight: 600;
        color: #2c3e50;
    }

    .sub-targets {
        margin-left: 25px;
        padding: 10px 0;
        border-left: 2px solid #eef2f7;
        margin-top: 5px;
    }

    .sub-targets label {
        font-size: 14px;
        color: #526b84;
    }

    /* 모달 기본 스타일 */
    .modal {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 9000;
    }

    .modal-content {
        position: relative;
        background-color: #fff;
        width: 90%;
        max-width: 800px;
        margin: 20px auto;
        padding: 25px;
        border-radius: 12px;
        box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
        animation: modalSlideDown 0.3s ease-out;
    }

    /* 모달 헤더 */
    .modal h2 {
        margin: 0 0 20px 0;
        font-size: 24px;
        font-weight: 600;
        color: #333;
    }

    .close {
        position: absolute;
        right: 20px;
        top: 20px;
        font-size: 24px;
        color: #666;
        cursor: pointer;
        transition: color 0.2s;
    }

    .close:hover {
        color: #333;
    }

    /* 탭 메뉴 스타일 */
    .tab-menu {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        margin-bottom: 20px;
        border-bottom: 1px solid #eee;
        padding-bottom: 10px;
    }

    .tab-btn {
        padding: 8px 16px;
        border: none;
        border-radius: 20px;
        background: #f5f5f5;
        color: #666;
        cursor: pointer;
        transition: all 0.2s;
        font-size: 14px;
    }

    .tab-btn.active {
        background: #4A90E2;
        color: white;
    }

    /* 선택된 항목 영역 */
    .selected-items {
        background: #f8f9fa;
        padding: 15px;
        border-radius: 8px;
        margin-bottom: 20px;
    }

    .selected-items p {
        color: #666;
        margin: 0 0 10px 0;
        font-size: 14px;
    }

    #selected-subjects {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }

    #selected-subjects span {
        background: #4A90E2;
        color: white;
        padding: 4px 12px;
        border-radius: 16px;
        font-size: 13px;
        display: flex;
        align-items: center;
        gap: 6px;
    }

    /* 과목 리스트 */
    .subject-list {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 12px;
        max-height: 400px;
        overflow-y: auto;
        padding: 10px;
    }

    .subject-list label {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 8px 12px;
        background: #fff;
        border: 1px solid #eee;
        border-radius: 6px;
        cursor: pointer;
        transition: all 0.2s;
        font-size: 14px;
    }

    .subject-list label:hover {
        background: #f8f9fa;
        border-color: #4A90E2;
    }

    .subject-list input[type="checkbox"] {
        width: 16px;
        height: 16px;
        accent-color: #4A90E2;
    }

    /* 푸터 영역 */
    .modal-footer {
        margin-top: 20px;
        padding-top: 20px;
        border-top: 1px solid #eee;
        text-align: right;
    }

    #apply-subjects {
        background: #4A90E2;
        color: white;
        border: none;
        padding: 10px 24px;
        border-radius: 6px;
        cursor: pointer;
        font-size: 15px;
        transition: background 0.2s;
    }

    #apply-subjects:hover {
        background: #357ABD;
    }

    /* 애니메이션 */
    @keyframes modalSlideDown {
        from {
            transform: translateY(-20px);
            opacity: 0;
        }
        to {
            transform: translateY(0);
            opacity: 1;
        }
    }

    /* 반응형 스타일 */
    @media (max-width: 768px) {
        .modal {
            background-color: rgba(0, 0, 0, 0.5);
            z-index: 10000;
        }

        .modal-content {
            width: 95%;
            height: 60vh;
            margin: 20vh auto;
            padding: 20px;
            max-height: 60vh;
            overflow-y: auto;
            position: relative;
            padding-bottom: 80px; /* Add padding for fixed button */
        }
        
        /* 검색 모달 특별 스타일 */
        #search-modal {
            z-index: 10000;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.5);
        }
        
        #search-modal .modal-content {
            position: relative;
            z-index: 10000;
        }
        
        /* 과목 선택 모달 특별 스타일 */
        #subject-modal {
            z-index: 10001;
        }

        /* 과목 리스트 모바일 스타일 - 2개씩 표시 */
        #subject-modal .subject-list {
            grid-template-columns: repeat(2, 1fr);
        }

        /* 모바일에서 적용하기 버튼 고정 */
        #subject-modal .modal-footer {
            position: fixed;
            bottom: 0;
            left: 0;
            width: 100%;
            background: white;
            padding: 15px;
            border-top: 1px solid #eee;
            z-index: 10002;
            margin-top: 0;
            text-align: center;
            display: block !important;
            box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
        }

        #subject-modal #apply-subjects {
            width: 100%;
            max-width: 300px;
            margin: 0 auto;
            display: block !important;
            padding: 12px 24px;
            font-size: 16px;
            font-weight: 500;
        }

        /* 지도 토글 버튼 가리기 */
        .map_toggle_btn {
            z-index: 9999;
        }

        /* bottom-nav 가리기 */
        .bottom-nav {
            z-index: 9999;
        }
    }

    .tab-content {
        display: none;
    }
    .tab-content.active {
        display: block;
    }

.customoverlay {
    padding: 10px;
    background: white;
    border-radius: 5px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    gap: 10px;
}

.customoverlay .profile_image {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
}

.customoverlay .profile_image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.customoverlay .info {
    flex: 1;
}

.customoverlay .name {
    font-weight: bold;
    margin-bottom: 3px;
}

.customoverlay .subject,
.customoverlay .location {
    font-size: 12px;
    color: #666;
}

.region_buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.region_btn {
    padding: 8px 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
}

.region_btn:hover {
    background: #f0f0f0;
}

.region_btn.selected {
    background: #4a90e2;
    color: white;
    border-color: #4a90e2;
}

/* 지도 마커 클릭 시 이미지 스타일 */
#teacherImageContainer {
    display: none;
    position: fixed;
    top: 50%;
    left: 20%;
    transform: translateY(-50%);
    z-index: 1000;
    background: white;
    padding: 10px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0,0,0,0.2);
}

.teacher-image {
    max-width: 300px;
    max-height: 400px;
    object-fit: contain;
}

@media (max-width: 768px) {
    #teacherImageContainer {
        left: 50%;
        transform: translate(-50%, -50%);
    }
    
    .teacher-image {
        max-width: 200px;
        max-height: 300px;
    }
}

/* 모바일 검색 모달 스타일 수정 */
@media (max-width: 768px) {
    .search_modal {
        max-height: calc(100vh - 200px); /* 하단 고정 div를 고려한 높이 조정 */
        overflow-y: auto;
        padding-bottom: 20px;
    }
    
    .search_modal .modal-content {
        height: auto;
        max-height: none;
    }
    
    .search_modal .modal-body {
        padding-bottom: 60px; /* 검색 버튼이 보이도록 여백 추가 */
    }
}

/* 모바일에서 과목 선택 모달 스타일 */
@media (max-width: 768px) {
    #subject-modal .modal-content {
        padding-bottom: 80px; /* 버튼을 위한 여백 추가 */
        position: relative;
        height: 100%;
        display: flex;
        flex-direction: column;
    }
    
    #subject-modal .modal-footer {
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        background: white;
        padding: 15px;
        border-top: 1px solid #eee;
        z-index: 10002;
        margin-top: 0;
        text-align: center;
        display: block !important;
        box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    }
    
    #subject-modal #apply-subjects {
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
        display: block !important;
        padding: 12px 24px;
        font-size: 16px;
        font-weight: 500;
    }
    
    #subject-modal .subject-list {
        grid-template-columns: repeat(2, 1fr);
        flex: 1;
        overflow-y: auto;
    }
}
</style>
