/* Keyframe Animations */

@keyframes heartbeat {
    0% {
        transform: scale(1);
    }
    14% {
        transform: scale(1.1);
    }
    28% {
        transform: scale(1);
    }
    42% {
        transform: scale(1.1);
    }
    70% {
        transform: scale(1);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0) translateX(-50%);
    }
    40% {
        transform: translateY(-10px) translateX(-50%);
    }
    60% {
        transform: translateY(-5px) translateX(-50%);
    }
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

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

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

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

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

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

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

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

@keyframes typewriter {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

@keyframes blink {
    50% {
        border-color: transparent;
    }
}

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

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(233, 30, 99, 0.7);
    }
    70% {
        box-shadow: 0 0 0 20px rgba(233, 30, 99, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(233, 30, 99, 0);
    }
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

/* Animation Classes */

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

.fade-in-delay {
    opacity: 0;
    animation: fadeIn 1s ease-out 0.3s forwards;
}

.fade-in-delay-2 {
    opacity: 0;
    animation: fadeIn 1s ease-out 0.6s forwards;
}

.fade-in-up {
    opacity: 0;
    animation: fadeInUp 1s ease-out forwards;
}

.fade-in-left {
    opacity: 0;
    animation: fadeInLeft 1s ease-out forwards;
}

.fade-in-right {
    opacity: 0;
    animation: fadeInRight 1s ease-out forwards;
}

.slide-in-top {
    opacity: 0;
    animation: slideInFromTop 0.8s ease-out forwards;
}

.slide-in-bottom {
    opacity: 0;
    animation: slideInFromBottom 0.8s ease-out forwards;
}

.scale-in {
    opacity: 0;
    animation: scaleIn 0.8s ease-out forwards;
}

.float-animation {
    animation: float 3s ease-in-out infinite;
}

.pulse-animation {
    animation: pulse 2s infinite;
}

/* Scroll Animations */

.scroll-animate {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease-out;
}

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

/* Staggered Animations for Gallery */

.gallery-item {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease-out;
}

.gallery-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.gallery-item:nth-child(1) { transition-delay: 0.1s; }
.gallery-item:nth-child(2) { transition-delay: 0.2s; }
.gallery-item:nth-child(3) { transition-delay: 0.3s; }
.gallery-item:nth-child(4) { transition-delay: 0.4s; }
.gallery-item:nth-child(5) { transition-delay: 0.5s; }
.gallery-item:nth-child(6) { transition-delay: 0.6s; }
.gallery-item:nth-child(7) { transition-delay: 0.7s; }
.gallery-item:nth-child(8) { transition-delay: 0.8s; }
.gallery-item:nth-child(9) { transition-delay: 0.9s; }

/* Detail Cards Animation */

.detail-card {
    opacity: 0;
    transform: translateY(50px) scale(0.9);
    transition: all 0.8s ease-out;
}

.detail-card.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.detail-card:nth-child(1) { transition-delay: 0.2s; }
.detail-card:nth-child(2) { transition-delay: 0.4s; }
.detail-card:nth-child(3) { transition-delay: 0.6s; }

/* Countdown Animation */

.countdown-item {
    opacity: 0;
    transform: scale(0.5) rotate(-180deg);
    transition: all 0.8s ease-out;
}

.countdown-item.visible {
    opacity: 1;
    transform: scale(1) rotate(0);
}

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

/* Hover Effects with Animations */

.nav-link:hover {
    animation: pulse 1s;
}

.filter-btn:hover {
    animation: pulse 0.5s;
}

.social-link:hover {
    animation: pulse 0.5s;
}

.detail-card:hover {
    animation: float 2s ease-in-out infinite;
}

/* Loading Animation */

.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(233, 30, 99, 0.3);
    border-radius: 50%;
    border-top-color: #e91e63;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Text Animation for Welcome Message */

.typewriter {
    overflow: hidden;
    border-right: 2px solid #e91e63;
    white-space: nowrap;
    animation: typewriter 3s steps(40, end), blink 0.75s step-end infinite;
}

/* Particle Background Animation */

.particle {
    position: absolute;
    background: rgba(233, 30, 99, 0.1);
    border-radius: 50%;
    pointer-events: none;
}

.particle-1 {
    width: 10px;
    height: 10px;
    animation: float 4s ease-in-out infinite;
    top: 20%;
    left: 10%;
}

.particle-2 {
    width: 15px;
    height: 15px;
    animation: float 5s ease-in-out infinite 1s;
    top: 60%;
    left: 80%;
}

.particle-3 {
    width: 8px;
    height: 8px;
    animation: float 3s ease-in-out infinite 2s;
    top: 40%;
    left: 50%;
}

.particle-4 {
    width: 12px;
    height: 12px;
    animation: float 6s ease-in-out infinite 0.5s;
    top: 80%;
    left: 20%;
}

.particle-5 {
    width: 6px;
    height: 6px;
    animation: float 4s ease-in-out infinite 1.5s;
    top: 10%;
    left: 60%;
}

/* Shimmer Effect for Loading States */

.shimmer {
background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
background-size: 1000px 100%;
animation: shimmer 2s infinite;
}

/* Wedding Day Animation */
.wedding-day {
animation: weddingPulse 2s ease-in-out infinite;
}

@keyframes weddingPulse {
0%, 100% {
transform: scale(1);
background: linear-gradient(135deg, #ff6b9d, #c66cfd);
}
50% {
transform: scale(1.05);
background: linear-gradient(135deg, #c66cfd, #ff6b9d);
}
}

.wedding-day .countdown-item {
animation: celebrate 1s ease-in-out infinite alternate;
}

@keyframes celebrate {
0% {
transform: translateY(0) rotate(0deg);
}
100% {
transform: translateY(-5px) rotate(2deg);
}
}

/* Responsive Design Adjustments */

@media (max-width: 768px) {
.fade-in,
.fade-in-delay,
.fade-in-delay-2,
.fade-in-up,
.fade-in-left,
.fade-in-right {
animation-duration: 0.8s;
}

.detail-card:hover {
animation: none;
}

.particle {
display: none;
}
    .fade-in-left,
    .fade-in-right {
        animation-duration: 0.8s;
    }
    
    .detail-card:hover {
        animation: none;
    }
    
    .particle {
        display: none;
    }
}

/* Reduced 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;
    }
    
    .heartbeat,
    .bounce,
    .rotate,
    .float,
    .pulse {
        animation: none !important;
    }
}
