@charset "UTF-8";

/* ========================================
   기본 설정
======================================== */

html,
body {
    overflow-x: clip;
}

/* ========================================
   메인 슬라이더
======================================== */

.main-slide {
    position: relative;
    width: 100vw;
    max-width: 100vw;
    height: 500px;
    margin-left: calc((100% - 100vw) / 2);
    overflow: hidden;
}

/* 전체 배경 이미지 */
.main-slide-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background-image: url('/assets/html/img/main/main_bgcolor.png');
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
    z-index: 0;
}

/* Bootstrap Carousel */
.main-slide .carousel {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
}

.main-slide .carousel-inner {
    width: 100%;
    height: 100%;
}

.main-slide .carousel-item {
    position: relative;
    width: 100%;
    height: 500px;
    overflow: hidden;
}

/* ========================================
   공통 배경 영역
======================================== */

.visual-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* ========================================
   첫 번째 슬라이드 : 동영상
======================================== */

.visual-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #000;
}

.visual-video video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
}

/* rdi_1, rdi_2 동영상 확대 */
.visual-video.rdi_1 video,
.visual-video.rdi_2 video {
    transform: scale(1.2);
    transform-origin: center center;
}

/* ========================================
   두 번째, 세 번째 슬라이드 : 이미지
   최대 너비 1320px 중앙 정렬
======================================== */

.visual-image {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 1320px;
    max-width: 100%;
    height: 100%;
}

.visual-image picture {
    display: block;
    width: 100%;
    height: 100%;
}

.visual-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center center;
}

/* ========================================
   이미지 및 동영상 오버레이
======================================== */

.visual-overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.15);
    z-index: 1;
    pointer-events: none;
}

/* ========================================
   슬라이드 텍스트 영역
======================================== */

.visual-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
}

/* 파란색 반투명 텍스트 박스 */
.visual-txt {
    width: 100%;
    max-width: 900px;
    padding: 22px 35px 25px;
    color: #fff;
    text-align: center;
    word-break: keep-all;
    background: rgba(0, 59, 139, 0.88);
    border-radius: 18px;
    opacity: 0;
    transform: translateY(30px);
}
.visual-txt.slide3 {max-width: 1200px}
/* 첫 번째 문장 */
.visual-txt-1 {
    margin: 0 0 8px;
    font-size: clamp(24px, 3.2vw, 46px);
    font-weight: 700;
    line-height: 1.4;
    color: #fff;
}
.visual-txt.slide3 .visual-txt-1 {font-size: clamp(24px, 2.9vw, 56px);}

.visual-txt-1 strong {
    font-weight: 700;
}

/* 두 번째 문장 */
.visual-txt-2 {
    margin: 0;
    font-size: clamp(20px, 2.7vw, 38px);
    font-weight: 400;
    line-height: 1.4;
    color: #ffd400;
}

.visual-txt-2 strong {
    font-weight: 700;
}

/* 영문 강조 */
.visual-txt h3,
.visual-txt span {
    font-weight: 700;
    color:#ffd400
}

/* 활성 슬라이드 텍스트 등장 */
.main-slide .carousel-item.active .visual-txt {
    animation: visual-text-in 5s ease-out 1s infinite;
}

@keyframes visual-text-in {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    20% {
        opacity: 1;
        transform: translateY(0);
    }
    80% {
        opacity: 1;
        transform: translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateY(0);
    }
}

/* ========================================
   좌우 이동 버튼
======================================== */

.main-slide .carousel-control-prev,
.main-slide .carousel-control-next {
    z-index: 5;
    width: 6%;
    opacity: 0.7;
}

.main-slide .carousel-control-prev:hover,
.main-slide .carousel-control-next:hover {
    opacity: 1;
}

.main-slide .carousel-control-prev-icon,
.main-slide .carousel-control-next-icon {
    width: 40px;
    height: 40px;
}

/* ========================================
   슬라이드 인디케이터
======================================== */

.main-slide .carousel-indicators {
    z-index: 5;
    margin-bottom: 25px;
}

.main-slide .carousel-indicators [data-bs-target] {
    width: 30px;
    height: 4px;
    margin: 0 5px;
    border: 0;
    opacity: 0.5;
}

.main-slide .carousel-indicators .active {
    opacity: 1;
}

/* ========================================
   슬라이드 2, 3 이미지 포커스 애니메이션
======================================== */

.main-slide .carousel-item.active .visual-image img {
    animation: visual-focus-in 2s ease-out both;
}

@keyframes visual-focus-in {
    from {
        opacity: .85;
        transform: scale(1);
    }
    to {
        opacity: 1;
        transform: scale(.9);
    }
}

/* ========================================
   태블릿
======================================== */

@media (max-width: 991.98px) {

    .main-slide,
    .main-slide .carousel-item {
        height: 450px;
    }

    .visual-txt-1 {
        font-size: 26px;
    }

    .visual-txt-2 {
        font-size: 36px;
    }
}

/* ========================================
   모바일
======================================== */

@media (max-width: 767.98px) {

    .main-slide,
    .main-slide .carousel-item {
        height: 400px;
    }

    .visual-content {
        padding: 15px;
    }

    .visual-txt {
        padding: 18px 15px;
        border-radius: 12px;
    }

    .visual-txt-1 {
        margin-bottom: 8px;
        font-size: 23px;
        line-height: 1.5;
    }

    .visual-txt-2 {
        font-size: 19px;
        line-height: 1.4;
    }

    .main-slide .carousel-control-prev,
    .main-slide .carousel-control-next {
        width: 10%;
    }

    .main-slide .carousel-control-prev-icon,
    .main-slide .carousel-control-next-icon {
        width: 28px;
        height: 28px;
    }

    .main-slide .carousel-indicators {
        margin-bottom: 15px;
    }

    .visual-image {
        width: 100%;
    }
}

/* ========================================
   작은 모바일
======================================== */

@media (max-width: 480px) {

    .main-slide,
    .main-slide .carousel-item {
        height: 350px;
    }

    .visual-txt-1 {
        font-size: 18px;
    }

    .visual-txt-2 {
        font-size: 16px;
    }

    .visual-image {
        width: 100%;
    }
}

/* ========================================
   애니메이션 최소화 설정
======================================== */

@media (prefers-reduced-motion: reduce) {

    .main-slide .carousel-item.active .visual-image img,
    .main-slide .carousel-item.active .visual-txt {
        animation: none;
        opacity: 1;
        transform: none;
    }
}
