/*
 * Parallax Enhancement Styles
 * File ini menambahkan style untuk efek parallax tanpa mengubah CSS yang sudah ada
 */

/* Smooth scrolling untuk seluruh halaman */
html {
    scroll-behavior: smooth;
}

/* Perbaikan performa untuk elemen parallax - hero-slider dan ketiga section dikecualikan */
.parallax-element,
.welcome-section,
.news-section,
.prodi-section {
    will-change: transform;
    backface-visibility: hidden;
    perspective: 1000px;
}

/* Section statis - tidak memerlukan optimasi transform */
.staff-section,
.partnership-section,
.testimonial-slider-section {
    will-change: auto;
}

/* Hero slider - diizinkan untuk transform slider functionality */
/* .hero-slider transform: none removed - slider needs to move */

/* Staff, partnership, dan testimonial sections juga tetap statis */
.staff-section,
.partnership-section,
.testimonial-slider-section {
    transform: none !important;
}

/* Loading animation untuk hero section - DISABLED to prevent background movement */
/* .hero-section {
    opacity: 0;
    animation: fadeInHero 1.5s ease-out forwards;
} */

/* @keyframes fadeInHero {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
} */

/* Entrance animations untuk cards */
.dean-card,
.news-card,
.prodi-card,
.announcement-card,
.staff-card,
.partner-item,
.testimonial-card {
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Hover effects untuk cards dengan parallax */
.news-card:hover,
.prodi-card:hover,
.staff-card:hover,
.partner-item:hover {
    transform: translateY(-5px) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

/* Enhanced parallax effects untuk section tertentu */
.staff-section {
    background: linear-gradient(135deg, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.6) 100%);
    position: relative;
    overflow: hidden;
}

.staff-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, rgba(255,255,255,0.1) 0%, transparent 70%);
    pointer-events: none;
    animation: parallaxPulse 8s ease-in-out infinite;
}

.partnership-section {
    position: relative;
    overflow: hidden;
}

.partnership-section::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0,123,255,0.05) 0%, transparent 70%);
    animation: parallaxFloat 10s ease-in-out infinite;
    pointer-events: none;
}

.testimonial-slider-section {
    position: relative;
    background: linear-gradient(45deg, rgba(248,249,250,0.8) 0%, rgba(233,236,239,0.9) 100%);
}

.testimonial-slider-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(0,123,255,0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(40,167,69,0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(255,193,7,0.1) 0%, transparent 50%);
    animation: parallaxBounce 6s ease-in-out infinite;
    pointer-events: none;
}

/* Parallax background untuk hero section - DISABLED to remove parallax effect */
/* .hero-slider {
    transform-style: preserve-3d;
} */

/* Floating animations */
@keyframes parallaxFloat {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    33% {
        transform: translateY(-10px) rotate(1deg);
    }
    66% {
        transform: translateY(5px) rotate(-1deg);
    }
}

@keyframes parallaxPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.9;
    }
}

@keyframes parallaxBounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

/* Classes untuk animasi */
.parallax-floating {
    animation: parallaxFloat 6s ease-in-out infinite;
}

.parallax-pulse {
    animation: parallaxPulse 4s ease-in-out infinite;
}

.parallax-bounce {
    animation: parallaxBounce 3s ease-in-out infinite;
}

/* Smooth transitions removed - mouse parallax disabled */

/* Loading state untuk elements */
.parallax-loading {
    opacity: 0;
    transform: translateY(30px);
}

.parallax-loaded {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Media queries untuk responsivitas */
@media (max-width: 768px) {
    /* Disable parallax pada mobile untuk performa */
    .parallax-element,
    .hero-slider,
    .welcome-section,
    .news-section,
    .prodi-section,
    .staff-section,
    .partnership-section,
    .testimonial-slider-section {
        transform: none !important;
    }

    /* Simplified animations untuk mobile */
    .parallax-floating,
    .parallax-pulse,
    .parallax-bounce {
        animation: none;
    }

    /* Hide pseudo elements pada mobile */
    .staff-section::before,
    .partnership-section::after,
    .testimonial-slider-section::before {
        display: none;
    }
}

/* Reduce motion untuk accessibility */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .parallax-element,
    .hero-slider,
    .welcome-section,
    .news-section,
    .prodi-section,
    .staff-section,
    .partnership-section,
    .testimonial-slider-section {
        transform: none !important;
    }
}

/* Performance optimizations */
.hero-section,
.welcome-section,
.news-section,
.prodi-section,
.staff-section,
.partnership-section,
.testimonial-slider-section {
    contain: layout style paint;
}

/* Entrance animation delay classes */
.animate-delay-1 { animation-delay: 0.1s; }
.animate-delay-2 { animation-delay: 0.2s; }
.animate-delay-3 { animation-delay: 0.3s; }
.animate-delay-4 { animation-delay: 0.4s; }
.animate-delay-5 { animation-delay: 0.5s; }
