/* ==================================================
    ESG - ESG 경영 (최종 통합 스타일)
================================================== */

/* 1. 기본 레이아웃 */
.esg_cont1 {
    margin-top: -8rem;
    /* padding: 7.5rem; */
    border-radius: 5rem 5rem 0 0;
    background: var(--color-white);
    position: relative;
}

.esg_imgbox {
    position: relative;
    width: 100%;
    display: inline-block;
}

.esg_imgbox img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    border: 0;
}

/* 2. SVG 클릭 영역 및 호버 효과 (깜빡임 방지) */
.esg_imgbox svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none; /* SVG 배경은 클릭 통과 */
}

.esg_imgbox svg a {
    pointer-events: auto; /* a 태그 영역만 클릭 활성화 */
    outline: none;
}

.esg_imgbox svg a path {
    fill: rgba(255, 255, 255, 0) !important; 
    transition: fill 0.3s ease-in-out;
    cursor: pointer;
}

.esg_imgbox svg a:hover path {
    fill: rgba(255, 255, 255, 0.9) !important; 
}

.esg_imgbox svg a rect { 
    cursor: pointer; 
    pointer-events: auto; 
    fill: rgba(255, 255, 255, 0) !important; 
    stroke-width: 1; 
    transition: fill 0.3s ease-in-out;
    }

.esg_imgbox svg a:hover rect {
    fill: rgba(0, 94, 255, 0.1) !important; 
}    


/* 3. 모달 본체 스타일 */
.image_modal {
    padding: 0;
    border: none;
    background: transparent; 
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    margin: auto; 
    overflow: visible; /* 닫기 버튼 표시를 위해 필수 */
    max-width: 50vw;
    max-height: 85vh;
    outline: none;
    position: relative; /* 버튼 배치의 기준점 */
    pointer-events: auto !important;
}

.modal_content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    width: fit-content;
    margin: 0 auto;
    background: #fff;
    border-radius: 15px;
    max-height: 85vh; 
    overflow-y: auto; 
    overflow-x: hidden;
    position: relative;
}

/* 커스텀 스크롤바 디자인 */
.modal_content::-webkit-scrollbar {
    width: 6px;
}
.modal_content::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

.image_modal img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
}

/* 5. 모달 배경(Backdrop) 설정 */
.image_modal::backdrop {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
}

/* 6. 고정형 닫기 버튼 (X 스타일) */
.close-btn {
    position: absolute; 
    top: -45px; /* 이미지 상단 바깥쪽 위치 */
    right: 0px; 
    width: 36px;
    height: 36px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.3);
    cursor: pointer;
    z-index: 9999;
    font-size: 0;
    transition: all 0.2s;
}

.close-btn::before,
.close-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px; 
    height: 2px;
    background-color: #fff;
    border-radius: 1px;
}

.close-btn::before { transform: translate(-50%, -50%) rotate(45deg); }
.close-btn::after { transform: translate(-50%, -50%) rotate(-45deg); }

.close-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: rotate(90deg);
}

/* 7. 모달 오픈 시 홈페이지 배경 스크롤 방지 */
html.no-scroll {
    overflow: hidden;
}

body.no-scroll {
    overflow: hidden !important;
    position: fixed; /* 현재 위치에 고정 */
    width: 100%;
    height: 100%;
}