/* 사이드 메뉴 스타일 */
.side_menu {
    width: 240px;
    flex-shrink: 0;
}

.side_menu_group {
    margin-bottom: 20px;
    border: 1px solid #e1e1e1;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.side_menu_title {
    background: linear-gradient(135deg, #2b3544, #3d4758);
    color: #fff;
    padding: 15px;
    margin: 0;
    font-size: 16px;
    font-weight: 500;
    display: flex;
    align-items: center;
}

.side_menu_title i {
    margin-right: 8px;
}

.side_menu_list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.side_menu_list li {
    border-bottom: 1px solid #f0f0f0;
}

.side_menu_list li:last-child {
    border-bottom: none;
}

.side_menu_list li a {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    color: #666;
    transition: all 0.3s ease;
    font-size: 14px;
    position: relative;
}

.side_menu_list li a i {
    margin-right: 8px;
    width: 16px;
    text-align: center;
    color: #888;
}

.side_menu_list li a:hover {
    color: #ff6b01;
    background: #fff8f3;
}

.side_menu_list li a:hover i {
    color: #ff6b01;
}

.side_menu_list li.active a {
    background: #ff6b01;
    color: #fff;
    font-weight: 500;
}

.side_menu_list li.active a i {
    color: #fff;
}
/* 사이드 메뉴 스타일 - 2차 메뉴 관련 추가 */
.side_menu_list li.has-submenu > a {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.side_menu_list li.has-submenu > a span {
    flex: 1;
}

.submenu-arrow {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.side_menu_list li.active.has-submenu > a .submenu-arrow,
.side_menu_list li.has-submenu:hover > a .submenu-arrow {
    transform: rotate(180deg);
}

.side_submenu_list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: #f9f9f9;
}
.side_submenu_list li:nth-child(1) a { border-top:1px solid #f0f0f0; }
.side_submenu_list.open,
.side_menu_list li.active .side_submenu_list {
    max-height: 200px; /* 서브메뉴의 최대 높이를 설정 */
}

.side_submenu_list li a {
    padding: 8px 15px 8px 20px;
    font-size: 12px;
    color: #777;
    border-bottom: 1px solid #f0f0f0;
}

.side_submenu_list li a i {
    font-size: 10px;
    margin-right: 5px;
}
/* 새로운 상담 배너 스타일 */
.side_consult_modern {
    margin-top: 20px;
    border-radius: 6px;
    background: linear-gradient(145deg, #fff, #f8f8f8);
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid #e5e5e5;
}

.side_consult_modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.12);
}

.consult_content {
    padding: 15px;
    display: flex;
    align-items: center;
}

.consult_icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff6b01, #ff8534);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    flex-shrink: 0;
}

.consult_icon i {
    font-size: 16px;
    color: #fff;
}

.consult_info {
    flex: 1;
}

.consult_info h3 {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 5px 0;
    color: #333;
}

.consult_info .consult_desc {
    font-size: 10px;
    color: #777;
}

.contact_info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.phone_wrap, .hours_wrap {
    display: flex;
    align-items: center;
}

.phone_wrap i, .hours_wrap i {
    color: #ff6b01;
    font-size: 11px;
    margin-right: 5px;
    width: 12px;
    text-align: center;
}

.consult_phone {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.consult_hours {
    font-size: 11px;
    color: #777;
}

.consult_btn_modern {
    display: block;
    background: #ff6b01;
    color: #fff;
    text-align: center;
    padding: 10px;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.consult_btn_modern i {
    margin-right: 5px;
}

.consult_btn_modern:hover {
    background: #e55c00;
}
.side_submenu_list li.active a {
    background: rgba(255, 107, 1, 0.1);
    color: #ff6b01;
    font-weight: 500;
}

.side_submenu_list li a:hover {
    background: rgba(255, 107, 1, 0.05);
    color: #ff6b01;
}
/* CSS로 만든 상담 배너 스타일 */
.side_consult {
    margin-top: 20px;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

.side_consult:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

.consult_header {
    background: linear-gradient(135deg, #ff6b01, #ff8534);
    color: #fff;
    padding: 12px; /* 여백 축소 */
    display: flex;
    align-items: center;
}

.consult_header i {
    font-size: 18px; /* 아이콘 크기 축소 */
    margin-right: 8px;
}

.consult_header h3 {
    margin: 0;
    font-size: 14px; /* 글자 크기 축소 */
    font-weight: 500;
}

.consult_body {
    background: #fff;
    padding: 12px; /* 여백 축소 */
    border: 1px solid #e1e1e1;
    border-top: 0;
}

.consult_desc {
    font-size: 12px; /* 글자 크기 축소 */
    color: #666;
}

.consult_phone {
    font-size: 16px; /* 글자 크기 축소 */
    font-weight: 600;
    color: #ff6b01;
    margin: 0 0 3px 0; /* 여백 축소 */
}

.consult_hours {
    display: flex;
    align-items: center;
    font-size: 11px; /* 글자 크기 축소 */
    color: #888;
}

.consult_hours i {
    margin-right: 4px;
}

.consult_btn {
    display: block;
    background: #f8f8f8;
    color: #333;
    text-align: center;
    padding: 7px; /* 여백 축소 */
    border-radius: 4px;
    font-size: 12px; /* 글자 크기 축소 */
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid #e1e1e1;
}

.consult_btn:hover {
    background: #ff6b01;
    color: #fff;
    border-color: #ff6b01;
}

/* 금리 정보 모듈 스타일 */
.side_rates {
    margin-top: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    border: 1px solid #e1e1e1;
}

.rates_header {
    background: #f8f8f8;
    padding: 12px 15px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #e1e1e1;
}

.rates_header i {
    color: #ff6b01;
    margin-right: 8px;
    font-size: 14px;
}

.rates_header h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    flex: 1;
}

/* 스크롤 가능한 컨테이너 */
.rates_container {
    max-height: 500px;
    scrollbar-width: thin;
    scrollbar-color: #ccc #f5f5f5;
}

.rates_container::-webkit-scrollbar {
    width: 6px;
}

.rates_container::-webkit-scrollbar-track {
    background: #f5f5f5;
}

.rates_container::-webkit-scrollbar-thumb {
    background-color: #ccc;
    border-radius: 3px;
}

.rates_list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.rates_list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 15px;
	position: relative;
	z-index:99;
    border-bottom: 1px solid #f0f0f0;
}

.rates_list li:last-child {
    border-bottom: none;
}

.rate_name {
    flex: 1;
    font-size: 12px;
    color: #666;
}

.rate_value {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin: 0 8px;
}

.rate_change {
    font-size: 11px;
	z-index:99;
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: 500;
    position: relative;
    cursor: help;
}

.rate_change small {
    font-size: 9px;
    color: inherit;
    opacity: 0.8;
}

/* 기존 스타일은 그대로 유지하면서 before 부분만 수정 */
.rate_change:before {
    content: attr(data-desc) "\A기준일: " attr(data-date);
    white-space: pre-wrap;
    position: absolute;
    bottom: 100%;
    right: 0;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 10px;
    border-radius: 4px;
    width: 180px;
    font-size: 11px;
    font-weight: 400;
    line-height: 1.4;
    z-index: 10;
    visibility: hidden;
    opacity: 0;
    transition: all 0.3s ease;
    transform: translateY(10px);
    pointer-events: none;
    text-align: left;
}
.rate_change:hover:before {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}

.rate_change.up {
    color: #34c759;
    background: rgba(52, 199, 89, 0.1);
}

.rate_change.down {
    color: #ff3b30;
    background: rgba(255, 59, 48, 0.1);
}

.rate_change.none {
    color: #8e8e93;
    background: rgba(142, 142, 147, 0.1);
}


/* 이전 스타일 계속 */
.rates_footer {
    padding: 8px 15px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    background: #f8f8f8;
}

.rates_update {
    color: #999;
}

.rates_more {
    color: #ff6b01;
    font-weight: 500;
    cursor: pointer;
}

.rates_more i {
    margin-left: 4px;
}

/* 금리 변동 애니메이션 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

.rate_change {
    animation: fadeIn 0.5s ease forwards;
    animation-delay: calc(var(--index) * 0.1s);
    opacity: 0;
}

/* 모달 관련 스타일만 수정 */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: #fff;
    margin: 4% auto;
    padding: 20px;
    border: 0;
    border-radius: 8px;
    width: 70%;
    max-width: 650px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    animation: modalFadeIn 0.3s ease;
}

.close {
    color: #999;
    float: right;
    font-size: 24px;
    font-weight: bold;
    line-height: 1;
    transition: all 0.2s ease;
}

.close:hover,
.close:focus {
    color: #ff6b01;
    text-decoration: none;
    cursor: pointer;
}

.modal h2 {
    margin: 0 0 15px 0;
    color: #333;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    font-size: 18px;
    font-weight: 600;
}

.modal-body {
    margin-top: 0;
}

.reference-note {
    background: #f8f9fc;
    border-radius: 6px;
    padding: 12px 15px;
    margin-bottom: 15px;
}

.reference-note p {
    font-size: 13px;
    line-height: 1.5;
    color: #555;
    margin: 0;
}

.rates-table {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0 15px;
    font-size: 13px;
}

.rates-table th, .rates-table td {
    padding: 8px 10px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.rates-table th {
    background: #f5f7fa;
    font-weight: 600;
    color: #333;
    position: sticky;
    top: 0;
}

.rates-table tr:hover {
    background-color: #fafbfd;
}

.rates-table tr:last-child td {
    border-bottom: none;
}

.rates-table td.up {
    color: #34c759;
    font-weight: 500;
}

.rates-table td.down {
    color: #ff3b30;
    font-weight: 500;
}

.rates-table td.none {
    color: #8e8e93;
    font-weight: 500;
}

.disclaimer {
    background: #f9f9f9;
    padding: 12px 15px;
    border-radius: 6px;
    border-left: 3px solid #ff6b01;
    margin-top: 15px;
}

.disclaimer h3 {
    margin: 0 0 8px 0;
    color: #333;
    font-size: 14px;
    font-weight: 600;
}

.disclaimer ul {
    margin: 0;
    padding: 0 0 0 18px;
}

.disclaimer li {
    font-size: 13px;
    color: #555;
    line-height: 1.5;
    margin-bottom: 5px;
}

.disclaimer li:last-child {
    margin-bottom: 0;
}

@keyframes modalFadeIn {
    from {opacity: 0; transform: translateY(-15px);}
    to {opacity: 1; transform: translateY(0);}
}

@media screen and (max-width: 768px) {
    .modal-content {
        width: 85%;
        margin: 8% auto;
        padding: 15px;
    }
    
    .modal h2 {
        font-size: 16px;
        padding-bottom: 8px;
    }
    
    .reference-note {
        padding: 10px 12px;
    }
    
    .reference-note p,
    .disclaimer li {
        font-size: 12px;
    }
    
    .rates-table {
        font-size: 12px;
    }
    
    .rates-table th, 
    .rates-table td {
        padding: 6px 8px;
    }
}

@media screen and (max-width: 480px) {
    .modal-content {
        width: 92%;
        padding: 12px;
    }
    
    .rates-table {
        display: block;
        overflow-x: auto;
    }
}