/* ============================================
   GLOFIN ACCOUNTX - ANIMATIONS ENHANCED
   Eye-Catching Professional Animations
   ============================================ */

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

/* Fade In Up - Enhanced with bounce */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fade In - Simple fade */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Scale In - For modals and popovers */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Slide In Right */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Slide In Left */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Pulse - For attention-grabbing elements */
@keyframes pulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

/* Shimmer - For loading states */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }

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

/* Float - Subtle floating animation */
@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-15px);
    }
}

/* Gradient Shift - For backgrounds */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Bounce In - Eye-catching entrance */
@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }

    50% {
        opacity: 1;
        transform: scale(1.05);
    }

    70% {
        transform: scale(0.9);
    }

    100% {
        transform: scale(1);
    }
}

/* Rotate In - Spinning entrance */
@keyframes rotateIn {
    from {
        opacity: 0;
        transform: rotate(-200deg) scale(0.5);
    }

    to {
        opacity: 1;
        transform: rotate(0) scale(1);
    }
}

/* Glow Pulse - For important elements */
@keyframes glowPulse {

    0%,
    100% {
        box-shadow: 0 0 5px rgba(59, 130, 246, 0.5);
    }

    50% {
        box-shadow: 0 0 20px rgba(59, 130, 246, 0.8), 0 0 30px rgba(59, 130, 246, 0.6);
    }
}

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

/* Scroll-triggered animations */
.animate-on-scroll {
    opacity: 0;
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-on-scroll.animated {
    animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

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

.fade-in-up {
    animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.slide-in-right {
    animation: slideInRight 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.slide-in-left {
    animation: slideInLeft 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.scale-in {
    animation: scaleIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.bounce-in {
    animation: bounceIn 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.rotate-in {
    animation: rotateIn 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Staggered animations for lists */
.stagger-animation>* {
    opacity: 0;
    animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.stagger-animation>*:nth-child(1) {
    animation-delay: 0.1s;
}

.stagger-animation>*:nth-child(2) {
    animation-delay: 0.2s;
}

.stagger-animation>*:nth-child(3) {
    animation-delay: 0.3s;
}

.stagger-animation>*:nth-child(4) {
    animation-delay: 0.4s;
}

.stagger-animation>*:nth-child(5) {
    animation-delay: 0.5s;
}

.stagger-animation>*:nth-child(6) {
    animation-delay: 0.6s;
}

.stagger-animation>*:nth-child(7) {
    animation-delay: 0.7s;
}

.stagger-animation>*:nth-child(8) {
    animation-delay: 0.8s;
}

/* ============================================
   HOVER EFFECTS - ENHANCED
   ============================================ */

/* Lift on hover - Enhanced */
.hover-lift {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

/* Scale on hover - Enhanced */
.hover-scale {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Glow on hover - Enhanced */
.hover-glow {
    transition: box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-glow:hover {
    box-shadow: 0 0 25px rgba(59, 130, 246, 0.5), 0 0 50px rgba(59, 130, 246, 0.3);
}

/* Shine effect on hover - Enhanced */
.hover-shine {
    position: relative;
    overflow: hidden;
}

.hover-shine::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.4),
            transparent);
    transition: left 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-shine:hover::before {
    left: 100%;
}

/* Tilt effect on hover */
.hover-tilt {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-tilt:hover {
    transform: perspective(1000px) rotateX(5deg) rotateY(5deg);
}

/* ============================================
   LOADING STATES
   ============================================ */

.skeleton {
    background: linear-gradient(90deg,
            var(--color-neutral-200) 0%,
            var(--color-neutral-100) 50%,
            var(--color-neutral-200) 100%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-md);
}

.spinner {
    width: 44px;
    height: 44px;
    border: 4px solid var(--color-neutral-200);
    border-top-color: var(--color-primary-600);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Dots loader */
.dots-loader {
    display: flex;
    gap: 0.5rem;
}

.dots-loader span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--color-primary-600);
    animation: dotsBounce 1.4s infinite ease-in-out both;
}

.dots-loader span:nth-child(1) {
    animation-delay: -0.32s;
}

.dots-loader span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes dotsBounce {

    0%,
    80%,
    100% {
        transform: scale(0);
        opacity: 0.5;
    }

    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* ============================================
   BACKGROUND ANIMATIONS
   ============================================ */

.animated-gradient {
    background: linear-gradient(-45deg,
            var(--color-primary-500),
            var(--color-secondary-500),
            var(--color-primary-600),
            var(--color-secondary-600));
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

/* Floating elements */
.float {
    animation: float 4s ease-in-out infinite;
}

.float-delayed {
    animation: float 4s ease-in-out infinite;
    animation-delay: 2s;
}

/* Continuous glow */
.glow-continuous {
    animation: glowPulse 2s ease-in-out infinite;
}

/* ============================================
   INTERACTIVE ELEMENTS
   ============================================ */

/* Button press effect */
.btn-press {
    transition: transform 0.1s ease;
}

.btn-press:active {
    transform: scale(0.96);
}

/* Ripple effect */
.ripple {
    position: relative;
    overflow: hidden;
}

.ripple::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.ripple:active::after {
    width: 400px;
    height: 400px;
}

/* ============================================
   PAGE TRANSITIONS
   ============================================ */

.page-transition-enter {
    opacity: 0;
    transform: translateY(30px);
}

.page-transition-enter-active {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.page-transition-exit {
    opacity: 1;
}

.page-transition-exit-active {
    opacity: 0;
    transition: opacity 0.3s ease-in;
}

/* ============================================
   MICRO-INTERACTIONS
   ============================================ */

/* Icon bounce on hover */
.icon-bounce:hover {
    animation: iconBounce 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes iconBounce {

    0%,
    100% {
        transform: translateY(0);
    }

    25% {
        transform: translateY(-8px);
    }

    50% {
        transform: translateY(-4px);
    }

    75% {
        transform: translateY(-6px);
    }
}

/* Arrow slide on hover */
.arrow-slide {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: gap 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.arrow-slide:hover {
    gap: 0.875rem;
}

/* Underline expand */
.underline-expand {
    position: relative;
}

.underline-expand::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: currentColor;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.underline-expand:hover::after {
    width: 100%;
    left: 0;
}

/* Shake animation for errors */
@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    10%,
    30%,
    50%,
    70%,
    90% {
        transform: translateX(-5px);
    }

    20%,
    40%,
    60%,
    80% {
        transform: translateX(5px);
    }
}

.shake {
    animation: shake 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97);
}

/* ============================================
   SCROLL PROGRESS INDICATOR
   ============================================ */

.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(90deg,
            var(--color-primary-600),
            var(--color-secondary-500),
            var(--color-accent-500));
    transform-origin: left;
    z-index: var(--z-fixed);
    transition: transform 0.1s ease-out;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
}

/* ============================================
   PARALLAX EFFECTS
   ============================================ */

.parallax {
    transition: transform 0.1s ease-out;
}

/* ============================================
   NUMBER COUNTER ANIMATION
   ============================================ */

@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

[data-counter] {
    animation: countUp 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   SPECIAL EFFECTS
   ============================================ */

/* Gradient text animation */
@keyframes gradientText {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.gradient-text-animated {
    background: linear-gradient(90deg,
            var(--color-primary-600),
            var(--color-secondary-500),
            var(--color-accent-500),
            var(--color-primary-600));
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientText 3s ease infinite;
}

/* Breathing animation */
@keyframes breathe {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.03);
    }
}

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

/* ============================================
   TESTIMONIAL CAROUSEL CONTROLS
   ============================================ */

/* Carousel container */
.testimonial-carousel {
    position: relative;
    padding: 2rem 0;
}

/* Carousel slides */
.testimonial-slide {
    display: none;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.testimonial-slide.active {
    display: block;
    opacity: 1;
    animation: fadeIn 0.5s ease-in-out;
}

/* Add spacing to testimonial cards */
.testimonial-slide .card {
    padding: 3rem 2.5rem;
    margin: 1rem 0;
}

/* Carousel navigation buttons */
.carousel-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--color-primary-600), var(--color-primary-700));
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
}

.carousel-control:hover {
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
    background: linear-gradient(135deg, var(--color-primary-700), var(--color-primary-800));
}

.carousel-control:active {
    transform: translateY(-50%) scale(0.95);
}

.carousel-prev {
    left: -24px;
}

.carousel-next {
    right: -24px;
}

/* Carousel indicators */
.carousel-indicators {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 2rem;
}

.carousel-indicator {
    width: 12px;
    height: 12px;
    border-radius: var(--radius-full);
    background-color: var(--color-neutral-300);
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0;
}

.carousel-indicator:hover {
    background-color: var(--color-primary-400);
    transform: scale(1.2);
}

.carousel-indicator.active {
    background: linear-gradient(135deg, var(--color-primary-600), var(--color-primary-700));
    width: 32px;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.4);
}

/* Responsive carousel controls */
@media (max-width: 768px) {
    .carousel-prev {
        left: 0;
    }

    .carousel-next {
        right: 0;
    }

    .carousel-control {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }

    .testimonial-slide .card {
        padding: 2rem 1.5rem;
    }
}

/* ============================================
   ACCESSIBILITY - RESPECT MOTION PREFERENCES
   ============================================ */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .float,
    .float-delayed,
    .animated-gradient,
    .glow-continuous,
    .gradient-text-animated,
    .breathe {
        animation: none !important;
    }

    .hover-lift:hover,
    .hover-scale:hover,
    .hover-tilt:hover {
        transform: none !important;
    }

    .scroll-progress {
        transition: none !important;
    }
}