/* 기본 스타일 및 초기화 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-align: center; /* 모든 텍스트 가운데 정렬 */
}

html, body {
    width: 100%;
    height: 100%;
}

body {
    font-family: 'Noto Sans KR', sans-serif;
    background-color: #f0f0f0; /* 브라우저 여백 색상 */
}

/* 메인 페이지 컨테이너 */
#main-page-container {
    position: relative;
    width: 100%;
    height: 1800px;
    /*width: 100vw;
    height: 200vh; *//* 뷰포트 높이만큼 */
    background-image: url('../images/main_background.png'); /* PC 배경 이미지 (PC에서 1920px 이상은 늘리고, 이하는 잘림) */
    background-size: cover; /* 화면에 꽉 채우고 비율 유지 */
    background-position: center center; /* 중앙 정렬 */
    background-repeat: no-repeat;
    z-index: 1;
    overflow: hidden; /* 내부 요소가 넘칠 경우 숨김 */
}

/* 모든 동적 요소의 기준이 될 1200px 중앙 영역 (JS에서 위치 제어) */
.content-wrapper {
    position: absolute; /* 배경 위에 겹치도록 */
    width: 1200px; /* 고정 너비 */
    max-width: 100%; /* 브라우저 1200px 미만일 때 축소 */
    height: 2000px; /* main_background.png의 세로 길이 (조정 필요) */
    left: 50%;
    transform: translateX(-50%); /* 가로 중앙 정렬 */
    /* top, left, width, height는 JS에서 계산 */
}

/* 닫기 버튼 영역 */
#close-button-area {
    position: absolute; /* background-image 기준으로 JS에서 계산하여 배치 */
    width: 30px; /* 기본 너비 */
    height: 30px; /* 기본 높이 */
    /* background-color: rgba(255, 0, 0, 0.2); /* 디버깅용: 투명 영역 확인 */
    cursor: pointer;
    z-index: 100; /* 다른 요소보다 위에 */
}

/* 카피 영역 */
#copy-area {
    position: absolute; /* background-image 기준으로 JS에서 계산하여 배치 */
    overflow: hidden; /* 이미지 잘림 방지 */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
	width:100%;
	top:20px;
}

.copy-image {
	margin-top:30px;
    width: 40%; /* 부모 영역에 맞춰 */
    height: auto;
    object-fit: contain; /* 이미지 잘리지 않게 */
}

.copy-image-mobile {
    display: none; /* 모바일 버전은 기본 숨김 */
}


/* 캐러셀 섹션 */
.carousel-section {
    position: absolute; /* background-image 기준으로 JS에서 계산하여 배치 */
    width: 100%; /* 고정 너비 */
    /*height: 950px;  고정 높이 */
	height:600px;
    background-color: transparent; /* 캐러셀 배경 투명 */
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    z-index: 40;
	/*margin-top: 30vh;*/
	top:35vh;
	align-items:center;
}

.carousel-container {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.carousel-wrapper {
    display: flex;
    height: 100%;
    transition: transform 0.5s ease-in-out;
    width: max-content; /* 내부 콘텐츠에 맞춰 너비 확장 */
}

.carousel-item {
    flex-shrink: 0;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    /*padding: 20px; /* 아이템 내부 패딩 */
}

.carousel-item img {
    max-width: 100%; /* 아이템 너비에 맞춰 */
    max-height: 100%; /* 아이템 높이에 맞춰 */
    object-fit: contain; /* 잘리지 않고 비율 유지 */
    /*box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);*/
    transition: transform 0.3s ease-out;
    transform: scale(0.7); /* 양 옆 이미지는 70% 축소 */
    background-color: transparent; /* 이미지 배경 투명화 */
}

.carousel-item.center-item img {
    transform: scale(1.0); /* 가운데 이미지는 원 사이즈 */
}

/* 캐러셀 네비게이션 버튼 */
.carousel-nav {
    position: absolute;
    bottom: 20px; /* 캐러셀 영역 하단에서 20px 위 */
    left: 50%;
    transform: translateX(-50%); /* 가로 중앙 정렬 */
    display: flex;
    gap: 10px; /* 버튼 간 간격 */
    z-index: 10; /* 캐러셀 이미지 위에 오도록 */
}

.carousel-nav button {
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.2em;
    transition: background-color 0.3s ease;
}

.carousel-nav button:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

/* 페이드인/아웃 영역 */
#fade-in-out-area {
	position: absolute;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
	background-color: transparent;
	box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
	border-radius: 10px;
	z-index: 50;
	width: 800px;
	height: 606px;
	top: 1000px;
	transform: translateX(-50%);
	left: 50%;
	margin-left: 0px;
}

.fade-bg-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

.fade-in-image {
    position: absolute;
	top: 0%;
}

.fade-in-image.active {
    opacity: 1;
    transform: scale(1) rotate(0deg); /* 활성화 시 최종 상태 */
}



/*
ul#carousel {
    position: relative;
    width: 1000px;
    height: 400px;
    list-style: none;
    padding: 0px;
    margin: 0px 0px 0px 50%;
    left: -534px;
    top: 0px;
}
*/

/* 반응형 디자인 */
@media (max-width: 1200px) {
    #main-page-container {
        background-image: url('../images/main_background(s).png'); /* 모바일 배경 이미지 교체 */
    }
    .carousel-section {
        width: 90vw; /* 뷰포트 너비의 90% */
        height: auto; /* 높이 유동적 */
        max-width: 700px; /* 캐러셀 최대 너비 */
        max-height: 400px; /* 캐러셀 최대 높이 */
    }
    .carousel-item img {
        width: 90%; /* 이미지 크기 조정 */
    }
    .carousel-item.center-item img {
        transform: scale(1.05); /* 확대율 조정 */
    }
    .carousel-nav button {
        padding: 8px 12px;
        font-size: 1em;
    }
}

@media (max-width: 1000px) { /* 브라우저 사이즈 700px 이하일 때 */
    #copy-area .copy-image-pc {
        display: none;
    }
    #copy-area .copy-image-mobile {
        display: block; /* 모바일 카피 이미지 표시 */
    }
    .carousel-section {
        height: auto; /* 높이 다시 유동적으로 */
        max-width: 500px;
        max-height: 300px;
    }
    .carousel-item img {
        width: 80%;
    }
    .main-copy {
        font-size: 2em;
    }
    .sub-copy {
        font-size: 1em;
    }

.carousel-section {
    position: absolute;
    width: 100%;
    height: 950px;
    background-color: transparent;
    border-radius: 10px;
    overflow: hidden;
    display: flex
;
    flex-direction: column;
    z-index: 40;
    margin-top: 20vh;
}

/*
ul#carousel {
    position: relative;
    width: 1000px;
    height: 400px;
    list-style: none;
    padding: 0px;
    margin: 0px 0px 0px 50%;
    left: -534px;
    top: 0px;
}

*/



}