/* ===== Animation Styles for WooRi Info System ===== */

/* Keyframe Animations */
@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(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Animation Classes */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in {
    opacity: 0;
    transition: opacity 0.6s ease;
}

.slide-in-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.6s ease;
}

.slide-in-right {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.6s ease;
}

.scale-in {
    opacity: 0;
    transform: scale(0.9);
    transition: all 0.6s ease;
}

/* Animate In State */
.animate-in {
    opacity: 1 !important;
    transform: translateY(0) translateX(0) scale(1) !important;
}

/* Hero Section Animations */
.hero-title {
    animation: fadeInUp 1s ease;
    animation-fill-mode: both;
}

.hero-subtitle {
    animation: fadeInUp 1s ease 0.2s;
    animation-fill-mode: both;
}

.hero-description {
    animation: fadeInUp 1s ease 0.4s;
    animation-fill-mode: both;
}

/* Card Hover Effects */
.feature-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.solution-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.solution-card:hover {
    transform: scale(1.05);
    box-shadow: 0 20px 40px rgba(102, 126, 234, 0.4);
}

/* Button Animations */
.btn-primary {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-primary:hover::before {
    width: 400px;
    height: 400px;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(30, 64, 175, 0.3);
}

/* Tab Animation */
.tab-button {
    transition: all 0.3s ease;
}

.tab-button:hover {
    background: var(--gray-50);
    transform: translateY(-2px);
}

.tab-pane {
    animation: fadeIn 0.5s ease;
}

/* Loading Animation */
.loader {
    width: 50px;
    height: 50px;
    border: 4px solid var(--gray-200);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    animation: pulse 2s infinite;
    cursor: pointer;
}

/* Parallax Effect */
.parallax {
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Stagger Animation */
.stagger-animation > * {
    opacity: 0;
    transform: translateY(20px);
}

.stagger-animation.animate-in > * {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.6s ease;
}

.stagger-animation.animate-in > *:nth-child(1) { transition-delay: 0.1s; }
.stagger-animation.animate-in > *:nth-child(2) { transition-delay: 0.2s; }
.stagger-animation.animate-in > *:nth-child(3) { transition-delay: 0.3s; }
.stagger-animation.animate-in > *:nth-child(4) { transition-delay: 0.4s; }
.stagger-animation.animate-in > *:nth-child(5) { transition-delay: 0.5s; }

/* Text Animation */
.text-animation {
    display: inline-block;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
}

/* Floating Animation */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

.floating {
    animation: float 3s ease-in-out infinite;
}

/* Glow Effect */
@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 5px var(--primary-light);
    }
    50% {
        box-shadow: 0 0 20px var(--primary-light), 0 0 30px var(--primary-light);
    }
}

.glow-effect:hover {
    animation: glow 1.5s ease-in-out infinite;
}

/* Mobile Touch Feedback */
@media (hover: none) {
    .feature-card:active,
    .solution-card:active,
    .btn-primary:active {
        transform: scale(0.98);
    }
}

/* Reduced Motion Support */
@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;
    }
}