/* ========================================
   TFAM GLOBAL - ANIMATIONS CSS
   All animation keyframes and effects
   ======================================== */

/* ==================== KEYFRAME ANIMATIONS ==================== */

/* Marquee Scroll */
@keyframes scroll {
    0% { 
        transform: translateX(0); 
    }
    100% { 
        transform: translateX(-100%); 
    }
}

/* Float Animation (Hero Scroll Indicator) */
@keyframes float {
    0%, 100% { 
        transform: translateX(-50%) translateY(0); 
    }
    50% { 
        transform: translateX(-50%) translateY(-10px); 
    }
}

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

/* Fade In Up */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

/* Slide In From Right */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

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

/* Map Pin Pulse Effect */
@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.7;
    }
    50% {
        transform: scale(1.8);
        opacity: 0.3;
    }
    100% {
        transform: scale(2.5);
        opacity: 0;
    }
}

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

/* Shake Animation */
@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(5px);
    }
}

/* Glow Effect */
@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(220, 20, 60, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(220, 20, 60, 0.8);
    }
}

/* Heartbeat */
@keyframes heartbeat {
    0%, 100% {
        transform: scale(1);
    }
    10%, 30% {
        transform: scale(1.1);
    }
    20%, 40% {
        transform: scale(1);
    }
}

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

/* Slide Down */
@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Slide Up */
@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ==================== ANIMATION CLASSES ==================== */

/* Fade In Animations */
.fade-in {
    animation: fadeIn 0.6s ease forwards;
}

.fade-in-up {
    animation: fadeInUp 0.8s ease forwards;
}

/* Scale Animations */
.scale-in {
    animation: scaleIn 0.5s ease forwards;
}

/* Slide Animations */
.slide-in-right {
    animation: slideInRight 0.6s ease forwards;
}

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

.slide-down {
    animation: slideDown 0.4s ease forwards;
}

.slide-up {
    animation: slideUp 0.4s ease forwards;
}

/* Rotate Animation */
.rotate {
    animation: rotate360 0.6s ease;
}

/* Shake Animation */
.shake {
    animation: shake 0.5s ease;
}

/* Glow Animation */
.glow {
    animation: glow 2s ease-in-out infinite;
}

/* Heartbeat Animation */
.heartbeat {
    animation: heartbeat 1.5s ease-in-out infinite;
}

/* Spin Animation */
.spin {
    animation: spin 1s linear infinite;
}

/* ==================== SCROLL ANIMATIONS ==================== */

/* Animate on Scroll */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* Delay Classes for Staggered Animations */
.delay-1 {
    animation-delay: 0.1s;
    transition-delay: 0.1s;
}

.delay-2 {
    animation-delay: 0.2s;
    transition-delay: 0.2s;
}

.delay-3 {
    animation-delay: 0.3s;
    transition-delay: 0.3s;
}

.delay-4 {
    animation-delay: 0.4s;
    transition-delay: 0.4s;
}

.delay-5 {
    animation-delay: 0.5s;
    transition-delay: 0.5s;
}

/* ==================== HOVER EFFECTS ==================== */

/* Lift on Hover */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

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

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

/* Glow on Hover */
.hover-glow:hover {
    box-shadow: 0 0 20px rgba(220, 20, 60, 0.5);
    transition: box-shadow 0.3s ease;
}

/* Rotate on Hover */
.hover-rotate {
    transition: transform 0.3s ease;
}

.hover-rotate:hover {
    transform: rotate(5deg);
}

/* Bounce on Hover */
.hover-bounce:hover {
    animation: bounce 0.6s ease;
}

/* ==================== LOADING ANIMATIONS ==================== */

/* Spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(220, 20, 60, 0.2);
    border-top-color: #DC143C;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Dots Loading */
.dots-loading::after {
    content: '';
    animation: dots 1.5s steps(4, end) infinite;
}

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

/* Pulse Loading */
.pulse-loading {
    animation: pulse 2s ease-in-out infinite;
}

/* ==================== TRANSITION CLASSES ==================== */

/* Fast Transitions */
.transition-fast {
    transition: all 0.2s ease;
}

/* Normal Transitions */
.transition-normal {
    transition: all 0.3s ease;
}

/* Slow Transitions */
.transition-slow {
    transition: all 0.5s ease;
}

/* Smooth Transform */
.transition-transform {
    transition: transform 0.3s ease;
}

/* Smooth Opacity */
.transition-opacity {
    transition: opacity 0.3s ease;
}

/* Smooth Color */
.transition-color {
    transition: color 0.3s ease, background-color 0.3s ease;
}

/* ==================== ENTRANCE ANIMATIONS ==================== */

/* Page Load Animation */
.page-enter {
    animation: fadeInUp 0.8s ease forwards;
}

/* Modal Enter */
.modal-enter {
    animation: scaleIn 0.3s ease forwards;
}

/* Card Enter */
.card-enter {
    animation: fadeInUp 0.6s ease forwards;
}

/* Button Enter */
.button-enter {
    animation: fadeIn 0.4s ease forwards;
}

/* ==================== EXIT ANIMATIONS ==================== */

/* Fade Out */
@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

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

/* Exit Classes */
.fade-out {
    animation: fadeOut 0.3s ease forwards;
}

.scale-out {
    animation: scaleOut 0.3s ease forwards;
}

/* ==================== ATTENTION SEEKERS ==================== */

/* Wiggle */
@keyframes wiggle {
    0%, 100% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(-5deg);
    }
    75% {
        transform: rotate(5deg);
    }
}

.wiggle {
    animation: wiggle 0.5s ease;
}

/* Tada */
@keyframes tada {
    0%, 100% {
        transform: scale(1) rotate(0deg);
    }
    10%, 20% {
        transform: scale(0.9) rotate(-3deg);
    }
    30%, 50%, 70%, 90% {
        transform: scale(1.1) rotate(3deg);
    }
    40%, 60%, 80% {
        transform: scale(1.1) rotate(-3deg);
    }
}

.tada {
    animation: tada 1s ease;
}

/* Flash */
@keyframes flash {
    0%, 50%, 100% {
        opacity: 1;
    }
    25%, 75% {
        opacity: 0;
    }
}

.flash {
    animation: flash 1s ease;
}

/* ==================== RESPONSIVE ANIMATIONS ==================== */

/* 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;
    }
}

/* Disable animations on mobile for performance */
@media (max-width: 640px) {
    .animate-on-scroll {
        opacity: 1 !important;
        transform: none !important;
    }
    
    /* Keep essential animations */
    .marquee-content {
        animation: scroll 30s linear infinite;
    }
    
    .pin-pulse {
        animation: pulse 2s infinite;
    }
}