/* 공단소개 모달 전용 스타일 */

/* 모달 크기 설정 */
#introModal .modal-content {
    width: 960px;
    height: 600px;
    display: flex;
    flex-direction: column;
}

/* 모달 내부 콘텐츠 */
.intro-modal-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* 탭 헤더 영역 */
.intro-modal-header {
    width: 100%;
    height: 80px;
    background-color: #00a0df;
    flex-shrink: 0;
}

/* 탭 컨테이너 */
.intro-tabs-container {
    display: flex;
    align-items: flex-end;
    height: 80px;
    padding-left: 40px;
    gap: 0;
}

/* 탭 버튼 */
.intro-tab-button {
    width: 220px;
    height: 40px;
    border: none;
    border-radius: 15px 15px 0 0;
    font-family: 'NanumSquareNeo', sans-serif !important;
    font-weight: 700 !important;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
    position: relative;
    white-space: nowrap;
}

/* 활성화된 탭 */
.intro-tab-button.active {
    background-color: #ffffff;
    color: #00a0df;
    height: 48px;
    z-index: 10;
    clip-path: inset(-10px -10px 0px -10px);
    box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.15),
                -3px 0 6px rgba(0, 0, 0, 0.08),
                3px 0 6px rgba(0, 0, 0, 0.08);
}

.intro-tab-button.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 15px 15px 0 0;
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-bottom: none;
    pointer-events: none;
}

/* 비활성화된 탭 */
.intro-tab-button:not(.active) {
    background-color: #33b3e5;
    color: #ffffff;
    clip-path: inset(-10px -10px 0px -10px);
    box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.15),
                -3px 0 6px rgba(0, 0, 0, 0.08),
                3px 0 6px rgba(0, 0, 0, 0.08);
}

.intro-tab-button:not(.active)::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 15px 15px 0 0;
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-bottom: none;
    pointer-events: none;
}

.intro-tab-button:not(.active):hover {
    background-color: #2ba3d5;
}

/* 탭 콘텐츠 영역 */
.intro-tab-content-container {
    flex: 1;
    background-color: #ffffff;
    padding: 40px;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    /* 스크롤바 숨기기 - 사이드바와 동일 */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

/* 스크롤바 숨기기 - Chrome, Safari, Opera */
.intro-tab-content-container::-webkit-scrollbar {
    display: none;
}

/* 탭 콘텐츠 */
.intro-tab-content {
    display: none;
    position: relative;
    overflow: visible; /* 이미지가 제대로 표시되도록 */
}

.intro-tab-content.active {
    display: block;
}

/* 이미지 스타일 */
.intro-tab-content img {
    display: block;
    width: 100%; /* max-width에서 width로 변경 */
    height: auto;
}

/* PC 이미지만 기본적으로 표시 */
.intro-tab-content .pc-image {
    display: block;
}

.intro-tab-content .mobile-image {
    display: none;
}

/* 닫기 버튼 위치 조정 - 콘텐츠 안쪽으로 */
#introModal .modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0; /* 기존 X 텍스트 숨기기 */
    transition: opacity 0.3s ease;
}

/* 닫기 버튼 이미지 */
#introModal .modal-close::after {
    content: '';
    display: block;
    width: 40px;
    height: 40px;
    background-image: url('../../../assets/images/btn_close.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

#introModal .modal-close:hover {
    opacity: 0.8;
    transform: none; /* 기존 rotate 효과 제거 */
    background-color: transparent;
}

/* 모바일 반응형 */
@media screen and (max-width: 768px) {
    /* 모달 컨테이너 */
    #introModal .modal-container {
        max-width: 100%;
        max-height: 100%;
        width: 100%;
        height: 100%;
        padding: 0;
    }
    
    /* modal-content 패딩 제거 및 배경 이미지 제거 */
    #introModal .modal-content {
        width: 100vw;
        height: 100vh;
        border-radius: 0;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        padding: 0 !important; /* 패딩 강제 제거 */
        background-image: none !important; /* 배경 이미지 제거 */
        background: #ffffff; /* 흰색 배경만 */
    }
    
    /* base-modal의 모바일 스타일 오버라이드 */
    #introModal.base-modal {
        padding: 0;
    }
    
    /* 모달 body 스타일 오버라이드 */
    #introModal .modal-body {
        padding: 0;
        overflow: visible;
        max-height: none;
    }
    
    /* 모달 내부 콘텐츠 */
    .intro-modal-content {
        width: 100%;
        height: 100%;
        display: flex;
        flex-direction: column;
        overflow: hidden; /* 전체 컨테이너는 스크롤 방지 */
    }
    
    /* 탭 헤더 */
    .intro-modal-header {
        width: 100%;
        height: 108px;
        background-color: #00a0df;
        position: relative;
        flex-shrink: 0; /* 크기 고정 */
        z-index: 10;
    }
    
    /* 탭 컨테이너 */
    .intro-tabs-container {
        padding-left: 0;
        padding-right: 0;
        height: 108px;
        gap: 0;
        overflow-x: hidden;
        flex-wrap: nowrap;
        align-items: flex-end;
    }
    
    /* 탭 버튼 */
    .intro-tab-button {
        width: calc(100% / 3);
        min-width: auto;
        max-width: none;
        padding: 0 10px;
        height: 40px;
        font-size: 14px;
        white-space: normal;
        word-break: keep-all;
        line-height: 1.2;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        border-radius: 15px 15px 0 0;
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }
    
    .intro-tab-button:active {
        opacity: 0.8;
    }
    
    .intro-tab-button.active {
        height: 45px;
    }
    
    /* 탭 콘텐츠 컨테이너 - 모바일에서 스크롤 가능하도록 */
    #introModal .intro-tab-content-container {
        flex: 1 1 auto !important;
        min-height: 0 !important; /* flexbox에서 스크롤을 위해 필수 */
        height: auto !important;
        max-height: calc(100vh - 108px) !important; /* 헤더 높이 제외 */
        padding: 20px !important;
        overflow-y: scroll !important; /* scroll로 강제 */
        overflow-x: hidden !important;
        -webkit-overflow-scrolling: touch !important; /* iOS 부드러운 스크롤 */
        position: relative !important;
        background-color: #ffffff !important;
        /* 스크롤바 숨기기 */
        scrollbar-width: none !important;
        -ms-overflow-style: none !important;
    }
    
    #introModal .intro-tab-content-container::-webkit-scrollbar {
        display: none !important;
        width: 0 !important;
        height: 0 !important;
    }
    
    /* 탭 콘텐츠 내부 */
    #introModal .intro-tab-content {
        display: none;
        position: relative;
        overflow: visible !important;
        width: 100% !important;
    }
    
    #introModal .intro-tab-content.active {
        display: block !important;
    }
    
    /* 이미지 전환 */
    #introModal .intro-tab-content .pc-image {
        display: none !important;
    }
    
    #introModal .intro-tab-content .mobile-image {
        display: block !important;
        width: 100% !important;
        height: auto !important;
        max-width: 100% !important;
    }
    
    /* 닫기 버튼 */
    #introModal .modal-close {
        display: flex;
        position: absolute;
        top: 8px;
        right: 8px;
        width: 40px;
        height: 40px;
        background: transparent;
        border: none;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        z-index: 100;
        padding: 0;
        font-size: 0; /* 텍스트 숨기기 */
    }
    
    /* 모바일에서도 이미지 사용 */
    #introModal .modal-close::after {
        content: '';
        display: block !important;
        width: 40px;
        height: 40px;
        background-image: url('../../../assets/images/btn_close.png') !important;
        background-size: contain;
        background-repeat: no-repeat;
        background-position: center;
    }
    
    /* 기존 X 텍스트 제거 */
    #introModal .modal-close::before {
        display: none !important;
    }
    
    #introModal .modal-close:hover {
        opacity: 0.8;
        background-color: transparent;
    }
    
    #introModal .modal-close:active {
        opacity: 0.7;
    }
}
