/* ========================================
   PREMIUM ANIMATIONS - Diavola Event & Deco
   Modern, smooth, elegant animations
   ======================================== */

/* Fade Up Animation - Hero & General */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Fade Left Animation */
@keyframes fadeLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Fade Right Animation */
@keyframes fadeRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Slow Opacity Animation */
@keyframes slowOpacity {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Scale In Animation */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Base state for animated elements */
.animate-on-scroll {
    opacity: 0;
    transition: none;
}

.animate-on-scroll.animated {
    animation-duration: 0.8s;
    animation-fill-mode: both;
    animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Animation classes */
.fade-up {
    animation-name: fadeUp;
}

.fade-left {
    animation-name: fadeLeft;
}

.fade-right {
    animation-name: fadeRight;
}

.slow-opacity {
    animation-name: slowOpacity;
    animation-duration: 1.2s;
}

.scale-in {
    animation-name: scaleIn;
}

/* Stagger delays for sequential animations */
.delay-100 {
    animation-delay: 0.1s;
}

.delay-200 {
    animation-delay: 0.2s;
}

.delay-300 {
    animation-delay: 0.3s;
}

.delay-400 {
    animation-delay: 0.4s;
}

.delay-500 {
    animation-delay: 0.5s;
}

.delay-600 {
    animation-delay: 0.6s;
}

/* Hero Content Animation */
.hero-content {
    animation: fadeUp 1s cubic-bezier(0.4, 0, 0.2, 1) 0.3s both;
}

.hero-content h1 {
    animation: fadeUp 1.2s cubic-bezier(0.4, 0, 0.2, 1) 0.5s both;
}

.hero-content .hero-subtitle {
    animation: slowOpacity 1.2s cubic-bezier(0.4, 0, 0.2, 1) 0.7s both;
}

.hero-buttons {
    animation: fadeUp 1s cubic-bezier(0.4, 0, 0.2, 1) 0.9s both;
}

/* Smooth transitions for interactive elements */
.smooth-hover {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.card-hover:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-xl);
}

/* Premium Button Hover Effects */
.btn-hover {
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

/* Premium Image Zoom on Hover */
.image-zoom {
    overflow: hidden;
    border-radius: var(--radius-lg);
}

.image-zoom img {
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Parallax Container */
.parallax-container {
    overflow: hidden;
    position: relative;
}

.parallax-element {
    transition: transform 0.1s linear;
    will-change: transform;
}

/* Portfolio Item Sequential Animation */
.portfolio-item {
    animation: fadeUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) both;
}

/* Service Card Sequential Animation */
.service-card {
    animation: fadeUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) both;
}

/* Navbar Scroll Animation */
.navbar {
    transition: background-color 0.4s ease,
                box-shadow 0.4s ease,
                padding 0.4s ease;
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: var(--shadow-sm);
}

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

/* Loading state */
.loading {
    opacity: 0;
    pointer-events: none;
}

.loaded {
    opacity: 1;
    pointer-events: auto;
    transition: opacity 0.8s ease;
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .animate-on-scroll.animated {
        animation-duration: 0.6s;
    }
    
    /* Disable parallax on mobile for performance */
    .parallax-element {
        transform: none !important;
    }
    
    /* Simplify hover effects on touch devices */
    .card-hover:hover {
        transform: translateY(-4px) scale(1.01);
    }
    
    .image-zoom:hover img {
        transform: scale(1.02);
    }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .parallax-element {
        transform: none !important;
    }
    
    .hero-content,
    .hero-content h1,
    .hero-content .hero-subtitle,
    .hero-buttons {
        animation: none !important;
        opacity: 1 !important;
    }
}

/* Performance optimization */
.will-animate {
    will-change: transform, opacity;
}

.animation-complete {
    will-change: auto;
}

/* Filter Button Animation */
.filter-btn {
    position: relative;
    overflow: hidden;
}

.filter-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(212, 175, 55, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.4s, height 0.4s;
}

.filter-btn:hover::before,
.filter-btn.active::before {
    width: 200px;
    height: 200px;
}

/* Contact Form Input Focus Animation */
.contact-form input:focus,
.contact-form textarea:focus {
    animation: inputFocus 0.3s ease;
}

@keyframes inputFocus {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.01);
    }
    100% {
        transform: scale(1);
    }
}
