/* Visual Slider CSS */

/* 배경 이미지 스케일 애니메이션 키프레임 */
@keyframes scaleBackground {
    0% {
        transform: scale(1.2);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}
.visual-slider {
    position: relative;
    width: 100%;
    height: 75vh;
    min-height: 500px;
    overflow: hidden;
    z-index: 1;
}

.visual-slider .swiper {
    width: 100%;
    height: 100%;
}

.visual-slider .swiper-slide {
    background: #fff;
    background-size: 400% 400%;
    animation: gradientShift 8s ease infinite;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 배경 이미지 스타일 */
.visual-slider .slide-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
    animation: scaleBackground 3s ease-out;
}

/* 배경 이미지가 있을 때 표시 */
.visual-slider .swiper-slide[data-bg] .slide-bg {
    opacity: 1;
}

/* 배경 오버레이 (텍스트 가독성을 위한 어두운 레이어) */
.visual-slider .slide-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg, 
        rgba(0, 0, 0, 0.2) 0%, 
        rgba(0, 0, 0, 0.3) 50%, 
        rgba(0, 0, 0, 0.4) 100%
    );
    z-index: 2;
    transition: opacity 0.3s ease;
}

/* 각 슬라이드별 다른 오버레이 색상 
.visual-slider .swiper-slide:nth-child(2) .slide-overlay {
    background: linear-gradient(
        135deg, 
        rgba(240, 147, 251, 0.6) 0%, 
        rgba(245, 87, 108, 0.6) 50%, 
        rgba(79, 172, 254, 0.6) 100%
    );
}

.visual-slider .swiper-slide:nth-child(3) .slide-overlay {
    background: linear-gradient(
        135deg, 
        rgba(79, 172, 254, 0.6) 0%, 
        rgba(0, 242, 254, 0.6) 50%, 
        rgba(102, 126, 234, 0.6) 100%
    );
}

.visual-slider .swiper-slide:nth-child(2) {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 50%, #4facfe 100%);
    background-size: 400% 400%;
    animation: gradientShift 10s ease infinite;
}

.visual-slider .swiper-slide:nth-child(3) {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 50%, #667eea 100%);
    background-size: 400% 400%;
    animation: gradientShift 12s ease infinite;
}*/

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.slide-content {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
}

/* 새로운 3열 레이아웃 */
.slide-layout {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    gap: 40px;
    align-items: center;
    width: 100%;
    max-width: 1300px;
    padding: 0 20px;
}

.slide-left {
    display: flex;
    justify-content: flex-end;
    align-items: flex-start;
}

.slide-center {
    display: flex;
    justify-content: center;
    align-items: center;
}

.slide-right {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.slide-text {
    text-align: center;
    color: white;
    max-width: 600px;
}

.slide-text h1 {
    font-size: 3.5rem;
    color:#fff;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.slide-text .slide-subtitle {
    font-size: 1.4rem;
    font-weight: 300;
    margin-bottom: 2.5rem;
    line-height: 1.6;
    opacity: 0.9;
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease 0.2s;
}

/* 환경부 로고 스타일 */
.eco_logo {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease 0.1s;
}

.eco_logo img {
    width: 180px;
    height: auto;
    filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.3));
}

.slide-actions {
    display: flex;
    gap: 10px 20px;
    justify-content: center;
    flex-wrap: wrap;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease 0.4s;
    margin-top: 20px;
}

/* 활성 슬라이드의 애니메이션 */
.swiper-slide-active .eco_logo {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.2s;
}

.swiper-slide-active .slide-text h1 {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.3s;
}

.swiper-slide-active .slide-text .slide-subtitle {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.5s;
}

.swiper-slide-active .slide-actions {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.7s;
}

/* slideUp 애니메이션을 transition 기반으로 변경 */

/* 슬라이더 버튼 스타일 */
.slide-actions .btn {
    display: inline-block !important;
    padding: 10px 30px !important;
    border: none !important;
    border-radius: 50px !important;
    text-decoration: none !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    letter-spacing: 0.5px !important;
    min-width: 140px !important;
    text-align: center !important;
}

.slide-actions .btn-primary {
    background: rgba(60, 60, 60, 0.7) !important;
    color: white !important;
    border: 2px solid rgba(80, 80, 80, 0.6) !important;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    font-weight: 500 !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.slide-actions .btn-primary:hover {
    background: white !important;
    color: #333 !important;
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.slide-actions .btn-outline {
    background: transparent !important;
    color: white !important;
    border: 2px solid rgba(255, 255, 255, 0.6) !important;
}

.slide-actions .btn-outline:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    color: white !important;
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Swiper 네비게이션 */
.visual-slider .swiper-button-next,
.visual-slider .swiper-button-prev {
    color: white;
    background: rgba(255, 255, 255, 0.1);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    transform: scale(0.8);
}

.visual-slider .swiper-button-next:after,
.visual-slider .swiper-button-prev:after {
    font-size: 20px;
    font-weight: bold;
}

/* 슬라이더 호버 시 네비게이션 버튼 표시 */
.visual-slider:hover .swiper-button-next,
.visual-slider:hover .swiper-button-prev {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

.visual-slider .swiper-button-next:hover,
.visual-slider .swiper-button-prev:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

/* Swiper 페이지네이션 */
.visual-slider .swiper-pagination {
    bottom: 30px;
}

.visual-slider .swiper-pagination-bullet {
    background: rgba(255, 255, 255, 0.5);
    opacity: 1;
    width: 12px;
    height: 12px;
    margin: 0 8px;
    transition: all 0.3s ease;
}

.visual-slider .swiper-pagination-bullet-active {
    background: white;
    transform: scale(1.3);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
}

/* 반응형 */
@media (max-width: 768px) {
    .visual-slider {
        height: 60vh;
        min-height: 450px;
    }

    /* 모바일에서는 세로 레이아웃으로 변경 */
    .slide-layout {
        grid-template-columns: 1fr;
        gap: 20px;
        text-align: center;
        padding: 0 15px;
    }

    .slide-left,
    .slide-center,
    .slide-right {
        justify-content: center;
    }

    .slide-text h1 {
        font-size: 2.5rem;
        margin-bottom: 1rem;
    }

    .slide-text .slide-subtitle {
        font-size: 1.1rem;
        margin-bottom: 2rem;
    }

    .eco_logo img {
        width: 80px;
    }

    .slide-actions {
        justify-content: center;
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }

    .slide-actions .btn {
        padding: 12px 25px !important;
        font-size: 14px !important;
        min-width: 120px !important;
    }

    .visual-slider .swiper-button-next,
    .visual-slider .swiper-button-prev {
        width: 40px;
        height: 40px;
    }

    .visual-slider .swiper-button-next:after,
    .visual-slider .swiper-button-prev:after {
        font-size: 16px;
    }

    .visual-slider .swiper-pagination {
        bottom: 20px;
    }

    .visual-slider .swiper-pagination-bullet {
        width: 10px;
        height: 10px;
        margin: 0 6px;
    }
}

@media (max-width: 480px) {
    .visual-slider {
        height: 50vh;
        min-height: 400px;
    }

    .slide-layout {
        gap: 15px;
        padding: 0 10px;
    }

    .slide-text h1 {
        font-size: 2rem;
    }

    .slide-text .slide-subtitle {
        font-size: 1rem;
    }

    .eco_logo img {
        width: 70px;
    }

    .slide-actions .btn {
        padding: 10px 20px !important;
        font-size: 13px !important;
        min-width: 100px !important;
    }
}