/* 서남 시설 모달 전용 스타일 */

/* 모달 크기 설정 - PC에서 1108px */
#seonamFacilityModal .modal-content {
    width: 1108px;
    height: 600px;
    display: flex;
    flex-direction: column;
}

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

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

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

/* 탭 버튼 */
#seonamFacilityModal .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;
}

/* 활성화된 탭 */
#seonamFacilityModal .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);
}

#seonamFacilityModal .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;
}

/* 비활성화된 탭 */
#seonamFacilityModal .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);
}

#seonamFacilityModal .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;
}

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

/* 탭 콘텐츠 영역 */
#seonamFacilityModal .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 */
#seonamFacilityModal .intro-tab-content-container::-webkit-scrollbar {
    display: none;
}

/* 탭 콘텐츠 */
#seonamFacilityModal .intro-tab-content {
    display: none;
    position: relative;
    overflow: visible;
}

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

/* 콘텐츠 래퍼 */
#seonamFacilityModal .intro-content-wrapper {
    width: 100%;
    min-height: 400px; /* 최소 높이 설정 */
}

/* 이미지 스타일 */
#seonamFacilityModal .intro-tab-content img {
    display: block;
    width: 100%;
    height: auto;
}

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

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

/* 닫기 버튼 위치 조정 - 콘텐츠 안쪽으로 */
#seonamFacilityModal .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;
}

/* 닫기 버튼 이미지 */
#seonamFacilityModal .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;
}

#seonamFacilityModal .modal-close:hover {
    opacity: 0.8;
    transform: none;
    background-color: transparent;
}

/* PC 버전 레이아웃 - 서남 모달 전용 */
.seonam-content-layout {
    display: flex;
    gap: 40px;
    width: 100%;
    height: 440px;
}

/* 좌측 영역 (영역1) */
.seonam-content-layout .content-left {
    width: 660px;
    height: 440px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

/* 이미지 슬라이더 컨테이너 */
.seonam-content-layout .image-slider {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

/* 슬라이더 이미지 컨테이너 */
.seonam-content-layout .slider-image-container {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: background-image 0.5s ease-in-out;
}

/* 슬라이더 화살표 버튼 */
.seonam-content-layout .slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 60px;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 24px;
    transition: all 0.3s ease;
    opacity: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 좌측 화살표 */
.seonam-content-layout .slider-arrow-prev {
    left: 0;
    border-radius: 0 4px 4px 0;
}

/* 우측 화살표 */
.seonam-content-layout .slider-arrow-next {
    right: 0;
    border-radius: 4px 0 0 4px;
}

/* 슬라이더 호버 시 화살표 표시 */
.seonam-content-layout .image-slider:hover .slider-arrow {
    opacity: 1;
}

/* 화살표 호버 효과 */
.seonam-content-layout .slider-arrow:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

/* 화살표 클릭 효과 */
.seonam-content-layout .slider-arrow:active {
    transform: translateY(-50%) scale(0.95);
}

/* 우측 영역 (영역2) */
.seonam-content-layout .content-right {
    width: 328px;
    height: 440px;
    flex-shrink: 0;
    overflow-y: auto;
    overflow-x: hidden;
    /* 스크롤바 스타일링 */
    scrollbar-width: thin;
    scrollbar-color: #c0c0c0 #f0f0f0;
}

/* 우측 영역 스크롤바 - Chrome, Safari, Opera */
.seonam-content-layout .content-right::-webkit-scrollbar {
    width: 8px;
}

.seonam-content-layout .content-right::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 4px;
}

.seonam-content-layout .content-right::-webkit-scrollbar-thumb {
    background: #c0c0c0;
    border-radius: 4px;
}

.seonam-content-layout .content-right::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* 우측 영역 내부 이미지 */
.seonam-content-layout .content-right img {
    width: 100%;
    height: auto;
    display: block;
}

/* 모바일 반응형 */
@media screen and (max-width: 768px) {
    /* 모바일 레이아웃으로 변경 - 세로 배치 */
    .seonam-content-layout {
        display: flex !important;
        flex-direction: column !important;
        gap: 20px !important;
        width: 100% !important;
        height: auto !important;
    }
    
    /* 모바일에서 좌측 영역 (이미지 슬라이더) */
    .seonam-content-layout .content-left {
        width: 100% !important;
        height: 300px !important; /* 모바일 높이 조정 */
        border-radius: 8px !important;
    }
    
    /* 모바일에서 우측 영역 (시설 정보) */
    .seonam-content-layout .content-right {
        width: 100% !important;
        height: auto !important;
        max-height: none !important;
        overflow-y: visible !important;
    }
    
    /* 모바일에서 슬라이더 화살표 크기 조정 */
    .seonam-content-layout .slider-arrow {
        width: 35px !important;
        height: 50px !important;
        font-size: 20px !important;
    }
    
    /* 모바일에서는 항상 화살표 표시 */
    .seonam-content-layout .slider-arrow {
        opacity: 0.7 !important;
    }
    
    /* 모달 컨테이너 */
    #seonamFacilityModal .modal-container {
        max-width: 100%;
        max-height: 100%;
        width: 100%;
        height: 100%;
        padding: 0;
    }
    
    /* modal-content 패딩 제거 및 배경 이미지 제거 */
    #seonamFacilityModal .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의 모바일 스타일 오버라이드 */
    #seonamFacilityModal.base-modal {
        padding: 0;
    }
    
    /* 모달 body 스타일 오버라이드 */
    #seonamFacilityModal .modal-body {
        padding: 0;
        overflow: visible;
        max-height: none;
    }
    
    /* 모달 내부 콘텐츠 */
    #seonamFacilityModal .intro-modal-content {
        width: 100%;
        height: 100%;
        display: flex;
        flex-direction: column;
        overflow: hidden; /* 전체 컨테이너는 스크롤 방지 */
    }
    
    /* 탭 헤더 */
    #seonamFacilityModal .intro-modal-header {
        width: 100%;
        height: 108px;
        background-color: #00a0df;
        position: relative;
        flex-shrink: 0; /* 크기 고정 */
        z-index: 10;
    }
    
    /* 탭 컨테이너 */
    #seonamFacilityModal .intro-tabs-container {
        padding-left: 0;
        padding-right: 0;
        height: 108px;
        gap: 0;
        overflow-x: hidden;
        flex-wrap: nowrap;
        align-items: flex-end;
    }
    
    /* 탭 버튼 - 화면 크기에 따라 유연하게 대응 */
    #seonamFacilityModal .intro-tab-button {
        /* 최소 너비 설정하고 가능한 경우 늘어나도록 */
        min-width: 60px; /* 탄천과 동일하게 60px로 축소 */
        width: auto;
        flex: 1 1 auto; /* 유연하게 늘어나고 줄어듦 */
        max-width: 120px; /* 최대 너비 제한 */
        padding: 0 5px;
        height: 40px;
        font-size: 12px;
        white-space: nowrap;
        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;
    }
    
    #seonamFacilityModal .intro-tab-button:active {
        opacity: 0.8;
    }
    
    #seonamFacilityModal .intro-tab-button.active {
        height: 45px;
    }
    
    /* 탭 콘텐츠 컨테이너 - 모바일에서 스크롤 가능하도록 */
    #seonamFacilityModal .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;
    }
    
    #seonamFacilityModal .intro-tab-content-container::-webkit-scrollbar {
        display: none !important;
        width: 0 !important;
        height: 0 !important;
    }
    
    /* 탭 콘텐츠 내부 */
    #seonamFacilityModal .intro-tab-content {
        display: none;
        position: relative;
        overflow: visible !important;
        width: 100% !important;
    }
    
    #seonamFacilityModal .intro-tab-content.active {
        display: block !important;
    }
    
    /* PC/모바일 이미지 표시 설정 - 모바일에서도 PC 이미지 사용 */
    #seonamFacilityModal .intro-tab-content .pc-image {
        display: block !important;
    }
    
    #seonamFacilityModal .intro-tab-content .mobile-image {
        display: none !important;
    }
    
    /* 닫기 버튼 */
    #seonamFacilityModal .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; /* 텍스트 숨기기 */
    }
    
    /* 모바일에서도 이미지 사용 */
    #seonamFacilityModal .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 텍스트 제거 */
    #seonamFacilityModal .modal-close::before {
        display: none !important;
    }
    
    #seonamFacilityModal .modal-close:hover {
        opacity: 0.8;
        background-color: transparent;
    }
    
    #seonamFacilityModal .modal-close:active {
        opacity: 0.7;
    }
}

/* 초소형 화면 대응 (280px 이하) */
@media screen and (max-width: 280px) {
    /* 탭 버튼 더 작게 */
    #seonamFacilityModal .intro-tab-button {
        min-width: 50px !important; /* 서남은 4개라 좀 더 넓게 */
        font-size: 10px !important;
        padding: 0 4px !important;
        height: 36px !important;
    }
    
    #seonamFacilityModal .intro-tab-button.active {
        height: 40px !important;
    }
    
    /* 탭 컨테이너 패딩 조정 */
    #seonamFacilityModal .intro-tabs-container {
        padding-left: 10px !important;
        padding-right: 10px !important;
        gap: 3px !important;
    }
    
    /* 콘텐츠 패딩 축소 */
    #seonamFacilityModal .intro-tab-content-container {
        padding: 15px !important;
    }
}

/* 모바일에서 강제로 100vw 적용 - 추가 우선순위 */
@media screen and (max-width: 768px) {
    /* 최상위 모달 오버레이 */
    #seonamFacilityModal.modal-overlay {
        width: 100vw !important;
        height: 100vh !important;
        max-width: 100vw !important;
        max-height: 100vh !important;
        left: 0 !important;
        right: 0 !important;
        top: 0 !important;
        bottom: 0 !important;
        padding: 0 !important; /* mobile.css의 padding 오버라이드 */
    }
    
    /* modal-container 강제 재정의 */
    #seonamFacilityModal.modal-overlay .modal-container {
        width: 100% !important;
        height: 100% !important;
        max-width: 100% !important;
        max-height: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    /* modal-content 강제 재정의 - mobile.css 오버라이드 */
    #seonamFacilityModal.modal-overlay .modal-container .modal-content {
        width: 100vw !important;
        height: 100vh !important;
        max-width: 100vw !important;
        max-height: 100vh !important;
        margin: 0 !important;
        padding: 0 !important;
        border-radius: 0 !important;
        aspect-ratio: unset !important; /* mobile.css의 aspect-ratio 제거 */
        background-image: none !important; /* mobile.css의 배경 이미지 제거 */
        background: #ffffff !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important; /* center에서 stretch로 변경 */
        justify-content: flex-start !important;
        box-sizing: border-box !important;
    }
    
    /* 슬라이드 관련 요소들 숨기기 (서남 모달에는 불필요) */
    #seonamFacilityModal .slide-image-container,
    #seonamFacilityModal .slide-btn,
    #seonamFacilityModal .slide-indicators {
        display: none !important;
    }
    
    /* 탭 콘텐츠 컨테이너 패딩 강제 적용 - 최우선 */
    #seonamFacilityModal.modal-overlay .modal-container .modal-content .intro-modal-content .intro-tab-content-container {
        padding: 20px !important;
        box-sizing: border-box !important;
    }
    
    /* base-modal의 반응형 스타일 오버라이드 */
    #seonamFacilityModal.base-modal .modal-container {
        max-width: 100% !important;
        width: 100% !important;
    }
}
