/* Animation Keyframes */

/* Fade Animations */
@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 fadeInDown {
    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);
    }
}

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

@keyframes scaleUp {
    from {
        transform: scale(1);
    }
    to {
        transform: scale(1.05);
    }
}

/* Glow Animations */
@keyframes glow {
    0%, 100% {
        text-shadow: 0 0 20px rgba(204, 153, 51, 0.5);
    }
    50% {
        text-shadow: 0 0 30px rgba(204, 153, 51, 0.8);
    }
}

@keyframes borderGlow {
    0%, 100% {
        border-color: var(--gold-dark);
        box-shadow: 0 0 20px rgba(204, 153, 51, 0.2);
    }
    50% {
        border-color: var(--gold-light);
        box-shadow: 0 0 40px rgba(204, 153, 51, 0.4);
    }
}

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

@keyframes heartbeat {
    0%, 70%, 100% {
        transform: scale(1);
    }
    20%, 50% {
        transform: scale(1.1);
    }
}

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

/* Slide Animations */
@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

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

/* Bounce Animation */
@keyframes bounce {
    0%, 20%, 53%, 80%, 100% {
        transform: translate3d(0, 0, 0);
    }
    40%, 43% {
        transform: translate3d(0, -10px, 0);
    }
    70% {
        transform: translate3d(0, -5px, 0);
    }
    90% {
        transform: translate3d(0, -2px, 0);
    }
}

/* Typing Animation */
@keyframes typing {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

@keyframes blink {
    0%, 50% {
        opacity: 1;
    }
    51%, 100% {
        opacity: 0;
    }
}

/* Number Counter Animation */
@keyframes countUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

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

/* Animation Classes */

/* Basic Animations */
.animate-fadeIn {
    animation: fadeIn 0.8s ease-out;
}

.animate-fadeInUp {
    animation: fadeInUp 0.8s ease-out;
}

.animate-fadeInDown {
    animation: fadeInDown 0.8s ease-out;
}

.animate-fadeInLeft {
    animation: fadeInLeft 0.8s ease-out;
}

.animate-fadeInRight {
    animation: fadeInRight 0.8s ease-out;
}

.animate-scaleIn {
    animation: scaleIn 0.6s ease-out;
}

.animate-slideInLeft {
    animation: slideInLeft 0.8s ease-out;
}

.animate-slideInRight {
    animation: slideInRight 0.8s ease-out;
}

.animate-bounce {
    animation: bounce 1s ease-in-out;
}

/* Continuous Animations */
.animate-float {
    animation: float 3s ease-in-out infinite;
}

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

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

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

.animate-heartbeat {
    animation: heartbeat 1.5s ease-in-out infinite;
}

/* Delayed Animations */
.animate-delay-100 {
    animation-delay: 0.1s;
}

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

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

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

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

/* Hover Animations */
.hover-scale {
    transition: transform 0.3s ease;
}

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

.hover-glow {
    transition: all 0.3s ease;
}

.hover-glow:hover {
    text-shadow: 0 0 20px rgba(204, 153, 51, 0.8);
    color: var(--gold-light);
}

.hover-lift {
    transition: all 0.3s ease;
}

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

.hover-float {
    transition: transform 0.3s ease;
}

.hover-float:hover {
    transform: translateY(-3px);
}

/* Text Animations */
.text-gradient-animate {
    background: linear-gradient(45deg, var(--gold), var(--gold-light), var(--gold), var(--gold-light));
    background-size: 400% 400%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientShift 3s ease infinite;
}

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

/* Loading Animations */
.loading-dots::after {
    content: '';
    animation: dots 1.5s infinite;
}

@keyframes dots {
    0%, 20% {
        content: '';
    }
    40% {
        content: '.';
    }
    60% {
        content: '..';
    }
    80%, 100% {
        content: '...';
    }
}

/* Scroll Reveal Animations */
.scroll-reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease;
}

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

.scroll-reveal-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.8s ease;
}

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

.scroll-reveal-right {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.8s ease;
}

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

.scroll-reveal-scale {
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.8s ease;
}

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

/* Stagger Animation */
.stagger-children > * {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.stagger-children.animate > *:nth-child(1) { transition-delay: 0.1s; }
.stagger-children.animate > *:nth-child(2) { transition-delay: 0.2s; }
.stagger-children.animate > *:nth-child(3) { transition-delay: 0.3s; }
.stagger-children.animate > *:nth-child(4) { transition-delay: 0.4s; }
.stagger-children.animate > *:nth-child(5) { transition-delay: 0.5s; }
.stagger-children.animate > *:nth-child(6) { transition-delay: 0.6s; }

.stagger-children.animate > * {
    opacity: 1;
    transform: translateY(0);
}

/* Button Hover Effects */
.btn-shimmer {
    position: relative;
    overflow: hidden;
}

.btn-shimmer::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-shimmer:hover::before {
    left: 100%;
}

/* Performance Optimizations */
.animate-fadeIn,
.animate-fadeInUp,
.animate-fadeInDown,
.animate-fadeInLeft,
.animate-fadeInRight,
.animate-scaleIn,
.animate-slideInLeft,
.animate-slideInRight {
    animation-fill-mode: both;
}

/* 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;
    }
    
    .animate-float,
    .animate-pulse,
    .animate-glow,
    .animate-borderGlow,
    .animate-heartbeat {
        animation: none;
    }
}