/* ============================================
   People Page Scroll Animations
   ============================================ */

/* 기본 애니메이션 클래스 */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.animate-on-scroll.animate {
    opacity: 1;
    transform: translateY(0);
}

/* 섹션별 애니메이션 효과 */

/* People Main Section - 메인 타이틀만 애니메이션 */
.people_main_title {
    opacity: 0;
    transform: translateY(30px);
    transition: all 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.3s;
}

.people_main_title.animate {
    opacity: 1;
    transform: translateY(0);
}

/* People Title Section - 타이틀 페이드인 */
.people_title {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.2s;
}

.people_title.animate {
    opacity: 1;
    transform: translateY(0);
}

/* People Section 1 - 대표 소개 섹션 */
.people_intro_section {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.2s;
}

.people_intro_section.animate {
    opacity: 1;
    transform: translateY(0);
}

.people_intro_image {
    opacity: 0;
    transform: translateX(-30px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.4s;
}

.people_intro_image.animate {
    opacity: 1;
    transform: translateX(0);
}

.people_intro_name {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.6s;
}

.people_intro_name.animate {
    opacity: 1;
    transform: translateY(0);
}

.people_intro_text {
    opacity: 0;
    transform: translateX(30px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.8s;
}

.people_intro_text.animate {
    opacity: 1;
    transform: translateX(0);
}

.people_text_part1 {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.8s;
}

.people_text_part1.animate {
    opacity: 1;
    transform: translateY(0);
}

.people_highlight_text {
    opacity: 0;
    transform: scale(0.95) translateY(20px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.8s;
}

.people_highlight_text.animate {
    opacity: 1;
    transform: scale(1) translateY(0);
}

.people_text_part2 {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.8s;
}

.people_text_part2.animate {
    opacity: 1;
    transform: translateY(0);
}

/* People Media Grid - 미디어 출연 그리드 */
.people_media_grid {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.2s;
}

.people_media_grid.animate {
    opacity: 1;
    transform: translateY(0);
}

.people_media_item {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.people_media_item.animate {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.people_media_item:nth-child(1) { transition-delay: 0.4s; }
.people_media_item:nth-child(2) { transition-delay: 0.5s; }
.people_media_item:nth-child(3) { transition-delay: 0.6s; }
.people_media_item:nth-child(4) { transition-delay: 0.7s; }

.people_media_image {
    opacity: 0;
    transform: scale(0.9);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.people_media_image.animate {
    opacity: 1;
    transform: scale(1);
}


.people_media_caption {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.people_media_caption.animate {
    opacity: 1;
    transform: translateY(0);
}

/* 특별한 애니메이션 효과들 */

/* 페이드인 애니메이션 */
.fade-in {
    opacity: 0;
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.fade-in.animate {
    opacity: 1;
}

/* 위에서 슬라이드 */
.slide-from-top {
    opacity: 0;
    transform: translateY(-50px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.slide-from-top.animate {
    opacity: 1;
    transform: translateY(0);
}

/* 아래에서 슬라이드 */
.slide-from-bottom {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.slide-from-bottom.animate {
    opacity: 1;
    transform: translateY(0);
}

/* 좌측에서 슬라이드 */
.slide-from-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.slide-from-left.animate {
    opacity: 1;
    transform: translateX(0);
}

/* 우측에서 슬라이드 */
.slide-from-right {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.slide-from-right.animate {
    opacity: 1;
    transform: translateX(0);
}

/* 스케일 애니메이션 */
.scale-in {
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.scale-in.animate {
    opacity: 1;
    transform: scale(1);
}

/* 회전 애니메이션 */
.rotate-in {
    opacity: 0;
    transform: rotate(-5deg) scale(0.9);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.rotate-in.animate {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

/* 모바일 최적화 */
@media (max-width: 767px) {
    .animate-on-scroll {
        transform: translateY(30px);
    }
    
    .slide-from-left,
    .slide-from-right {
        transform: translateY(30px);
    }
    
    .slide-from-left.animate,
    .slide-from-right.animate {
        transform: translateY(0);
    }
    
    /* 모바일에서 애니메이션 지연 시간 단축 */
    .people_intro_section {
        transition-delay: 0.1s;
    }
    
    .people_intro_image {
        transition-delay: 0.2s;
    }
    
    .people_intro_name {
        transition-delay: 0.3s;
    }
    
    .people_intro_text {
        transition-delay: 0.4s;
    }
    
    .people_text_part1 {
        transition-delay: 0.5s;
    }
    
    .people_highlight_text {
        transition-delay: 0.6s;
    }
    
    .people_text_part2 {
        transition-delay: 0.7s;
    }
    
    .people_media_grid {
        transition-delay: 0.1s;
    }
    
    .people_media_item:nth-child(1) { transition-delay: 0.2s; }
    .people_media_item:nth-child(2) { transition-delay: 0.3s; }
    .people_media_item:nth-child(3) { transition-delay: 0.4s; }
    .people_media_item:nth-child(4) { transition-delay: 0.5s; }
}

/* 성능 최적화 */
.people_main_title,
.people_title,
.people_intro_section,
.people_intro_image,
.people_intro_name,
.people_intro_text,
.people_text_part1,
.people_highlight_text,
.people_text_part2,
.people_media_grid,
.people_media_item,
.people_media_image,
.people_media_caption {
    will-change: transform, opacity;
}

/* 애니메이션 완료 후 will-change 제거 */
.people_main_title.animate,
.people_title.animate,
.people_intro_section.animate,
.people_intro_image.animate,
.people_intro_name.animate,
.people_intro_text.animate,
.people_text_part1.animate,
.people_highlight_text.animate,
.people_text_part2.animate,
.people_media_grid.animate,
.people_media_item.animate,
.people_media_image.animate,
.people_media_caption.animate {
    will-change: auto;
}

/* 작은 모바일 최적화 (479px 이하) */
@media (max-width: 479px) {
    /* 작은 모바일에서 좌우 슬라이드 애니메이션을 수직으로 변경 */
    .people_intro_image {
        transform: translateY(30px);
    }

    .people_intro_image.animate {
        transform: translateY(0);
    }

    .people_intro_text {
        transform: translateY(30px);
    }

    .people_intro_text.animate {
        transform: translateY(0);
    }

    /* 작은 모바일에서 애니메이션 거리 줄임 */
    .animate-on-scroll {
        transform: translateY(20px);
    }

    .people_main_title {
        transform: scale(0.9) translateY(20px);
    }

    .people_main_title.animate {
        transform: scale(1) translateY(0);
    }

    /* 작은 모바일에서 애니메이션 지연 시간 더욱 단축 */
    .people_main_title {
        transition-delay: 0.05s;
    }

    .people_title {
        transition-delay: 0.1s;
    }

    .people_intro_section {
        transition-delay: 0.1s;
    }

    .people_intro_image {
        transition-delay: 0.2s;
    }

    .people_intro_text {
        transition-delay: 0.4s;
    }

    .people_text_part1 {
        transition-delay: 0.5s;
    }

    .people_highlight_text {
        transition-delay: 0.5s;
    }

    .people_text_part2 {
        transition-delay: 0.5s;
    }

    .people_media_grid {
        transition-delay: 0.1s;
    }

    .people_media_item:nth-child(1) { transition-delay: 0.2s; }
    .people_media_item:nth-child(2) { transition-delay: 0.3s; }
    .people_media_item:nth-child(3) { transition-delay: 0.4s; }
    .people_media_item:nth-child(4) { transition-delay: 0.5s; }
}
