/* ============================================
   SMOOTH ANIMATIONS - PST BPS Bangkalan
   ============================================ */

/* Fade In Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Scale Animations */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Slide Animations */
@keyframes slideInUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

/* Utility Classes */
.animate-fade-in {
    animation: fadeIn 0.6s ease-out;
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

.animate-fade-in-down {
    animation: fadeInDown 0.6s ease-out;
}

.animate-fade-in-left {
    animation: fadeInLeft 0.6s ease-out;
}

.animate-fade-in-right {
    animation: fadeInRight 0.6s ease-out;
}

.animate-scale-in {
    animation: scaleIn 0.5s ease-out;
}

/* Stagger Delays */
.animate-delay-100 {
    animation-delay: 0.1s;
    animation-fill-mode: backwards;
}

.animate-delay-200 {
    animation-delay: 0.2s;
    animation-fill-mode: backwards;
}

.animate-delay-300 {
    animation-delay: 0.3s;
    animation-fill-mode: backwards;
}

.animate-delay-400 {
    animation-delay: 0.4s;
    animation-fill-mode: backwards;
}

.animate-delay-500 {
    animation-delay: 0.5s;
    animation-fill-mode: backwards;
}

.animate-delay-600 {
    animation-delay: 0.6s;
    animation-fill-mode: backwards;
}

/* Smooth Transitions */
.transition-smooth {
    transition: all 0.3s ease-in-out;
}

.transition-transform {
    transition: transform 0.3s ease-in-out;
}

.transition-shadow {
    transition: box-shadow 0.3s ease-in-out;
}

/* Hover Effects */
.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.hover-scale:hover {
    transform: scale(1.05);
}

.hover-glow:hover {
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
}

/* Card Hover Effects */
.card-hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

/* Button Animations */
.btn-animate {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-animate::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-animate:hover::before {
    width: 300px;
    height: 300px;
}

/* Scroll Reveal - akan diaktifkan dengan JavaScript */
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Loading Skeleton */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.skeleton {
    animation: shimmer 2s infinite;
    background: linear-gradient(to right, #f0f0f0 4%, #e0e0e0 25%, #f0f0f0 36%);
    background-size: 1000px 100%;
}

/* Pulse Animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.animate-pulse-slow {
    animation: pulse 3s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Bounce Animation */
@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.animate-bounce-slow {
    animation: bounce 2s infinite;
}

/* Gradient Animation */
@keyframes gradient {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.animate-gradient {
    background-size: 200% 200%;
    animation: gradient 3s ease infinite;
}

/* Wave Animation untuk Hero Sections */
@keyframes wave {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.wave-animate {
    animation: wave 20s linear infinite;
}

/* Image Zoom on Hover */
.image-zoom {
    overflow: hidden;
}

.image-zoom img {
    transition: transform 0.5s ease;
}

.image-zoom:hover img {
    transform: scale(1.1);
}

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
}

/* Badge Pulse */
@keyframes badge-pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
}

.badge-animate {
    animation: badge-pulse 2s ease-in-out infinite;
}

/* Rotate Animation */
@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.animate-rotate {
    animation: rotate 2s linear infinite;
}

/* Flip Animation */
@keyframes flip {
    0% {
        transform: perspective(400px) rotateY(0);
    }
    100% {
        transform: perspective(400px) rotateY(360deg);
    }
}

.animate-flip {
    animation: flip 2s ease-in-out infinite;
}

/* Slide In Animation */
.slide-in-left {
    animation: fadeInLeft 0.6s ease-out;
}

.slide-in-right {
    animation: fadeInRight 0.6s ease-out;
}

/* Stagger Grid Items */
.grid-item-animate:nth-child(1) { animation-delay: 0.1s; }
.grid-item-animate:nth-child(2) { animation-delay: 0.2s; }
.grid-item-animate:nth-child(3) { animation-delay: 0.3s; }
.grid-item-animate:nth-child(4) { animation-delay: 0.4s; }
.grid-item-animate:nth-child(5) { animation-delay: 0.5s; }
.grid-item-animate:nth-child(6) { animation-delay: 0.6s; }
.grid-item-animate:nth-child(7) { animation-delay: 0.7s; }
.grid-item-animate:nth-child(8) { animation-delay: 0.8s; }
.grid-item-animate:nth-child(9) { animation-delay: 0.9s; }

/* Focus Within Animation */
.focus-glow:focus-within {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
    transition: box-shadow 0.2s ease;
}
