/* Professional Animations for Wedding Website */

/* Fade-in animation for sections */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

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

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

/* Elegant shimmer effect for titles */
@keyframes shimmer {
    0% {
        background-position: -200% center;
    }
    100% {
        background-position: 200% center;
    }
}

/* Smooth pulse for important elements */
@keyframes gentlePulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.02);
        opacity: 0.95;
    }
}

/* Apply animations to elements */
.fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
}

.fade-in {
    animation: fadeIn 1s ease-out forwards;
}

.slide-in-left {
    animation: slideInLeft 0.8s ease-out forwards;
}

.slide-in-right {
    animation: slideInRight 0.8s ease-out forwards;
}

.scale-in {
    animation: scaleIn 0.6s ease-out forwards;
}

/* Intersection Observer will add these classes */
.animate-on-scroll {
    opacity: 0;
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* Smooth hover effects - works on desktop and mobile (touch) */
.card-hover {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    -webkit-tap-highlight-color: transparent;
}

.card-hover:hover,
.card-hover:active {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

/* Mobile touch feedback */
@media (hover: none) and (pointer: coarse) {
    .card-hover:active {
        transform: translateY(-3px);
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    }
}

/* Elegant button hover effects - works on desktop and mobile */
.button-elegant {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
}

.button-elegant::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;
}

.button-elegant:hover::before,
.button-elegant:active::before {
    width: 300px;
    height: 300px;
}

/* Mobile touch feedback */
@media (hover: none) and (pointer: coarse) {
    .button-elegant:active {
        transform: scale(0.98);
    }
}

/* Smooth countdown number transitions - works on desktop and mobile */
.countdown-number {
    transition: transform 0.3s ease;
}

.countdown-item:hover .countdown-number,
.countdown-item:active .countdown-number {
    transform: scale(1.1);
}

/* Mobile touch feedback for countdown */
@media (hover: none) and (pointer: coarse) {
    .countdown-item:active .countdown-number {
        transform: scale(1.05);
    }
}

/* Elegant form input focus effects */
.form-input-focus {
    transition: all 0.3s ease;
}

.form-input-focus:focus {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(212, 184, 150, 0.3);
}

/* Stagger animation for multiple elements */
.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }

/* Performance optimizations for all devices */
.animate-on-scroll,
.card-hover,
.button-elegant {
    will-change: transform, opacity;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-perspective: 1000px;
    perspective: 1000px;
}

/* Mobile-specific optimizations */
@media (max-width: 768px) {
    .animate-on-scroll {
        transform: translateY(20px); /* Smaller movement on mobile */
    }
    
    .fade-in-up {
        animation-duration: 0.6s; /* Faster on mobile */
    }
    
    .card-hover:hover,
    .card-hover:active {
        transform: translateY(-3px); /* Smaller lift on mobile */
    }
}

/* Tablet optimizations */
@media (min-width: 769px) and (max-width: 1024px) {
    .fade-in-up {
        animation-duration: 0.7s;
    }
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

