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

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

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

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

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

/* Fade In Left Animation */
@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Fade In Right Animation */
@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

/* Slide In Down Animation */
@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Rotate In Animation */
@keyframes rotateIn {
    from {
        opacity: 0;
        transform: rotate(-200deg);
    }
    to {
        opacity: 1;
        transform: rotate(0deg);
    }
}

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

/* Shimmer Animation */
@keyframes shimmer {
    0% {
        background-position: -200px 0;
    }
    100% {
        background-position: calc(200px + 100%) 0;
    }
}

/* Glow Animation */
@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(37, 99, 235, 0.3);
    }
    50% {
        box-shadow: 0 0 30px rgba(37, 99, 235, 0.6);
    }
}

/* Wave Animation */
@keyframes wave {
    0%, 100% {
        transform: translateX(0) translateY(0) rotate(0deg);
    }
    25% {
        transform: translateX(5px) translateY(-5px) rotate(1deg);
    }
    50% {
        transform: translateX(-5px) translateY(5px) rotate(-1deg);
    }
    75% {
        transform: translateX(-5px) translateY(-5px) rotate(1deg);
    }
}

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

/* Animate on scroll classes */
.animate-on-scroll {
    opacity: 0;
    transition: all 0.8s ease-out;
}

.animate-on-scroll.animated {
    opacity: 1;
}

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

.fade-in-left {
    animation: fadeInLeft 0.8s ease-out forwards;
}

.fade-in-right {
    animation: fadeInRight 0.8s ease-out forwards;
}

.scale-in {
    animation: scaleIn 0.6s ease-out forwards;
}

.slide-in-down {
    animation: slideInDown 0.8s ease-out forwards;
}

.rotate-in {
    animation: rotateIn 0.8s ease-out forwards;
}

/* Stagger animations */
.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }
.stagger-5 { animation-delay: 0.5s; }
.stagger-6 { animation-delay: 0.6s; }

/* ===== ENHANCED BUTTON ANIMATIONS ===== */
.btn {
    position: relative;
    overflow: hidden;
}

.btn::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;
}

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

.btn--primary {
    background-size: 200% 200%;
    animation: gradientShift 3s ease infinite;
}

.btn--primary:hover {
    animation-play-state: paused;
}

/* ===== ENHANCED CARD ANIMATIONS ===== */
.service__card {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.service__card:hover {
    animation: pulse 0.6s ease-in-out;
}

.service__icon {
    transition: all 0.3s ease;
}

.service__card:hover .service__icon {
    transform: scale(1.1) rotate(5deg);
}

/* ===== HERO SECTION ANIMATIONS ===== */
.hero__title-main {
    animation: slideInDown 0.8s ease-out;
}

.hero__title-sub {
    animation: slideInDown 0.8s ease-out 0.2s both;
}

.hero__title-accent {
    animation: slideInDown 0.8s ease-out 0.4s both;
}

.hero__description {
    animation: fadeInUp 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.6s both, gradientShift 4s ease-in-out 2s infinite, pulseGlow 2s ease-in-out 3s infinite alternate !important;
}

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

.hero__stats {
    animation: fadeInUp 0.8s ease-out 1s both;
}

.hero__floating-card {
    transition: all 0.3s ease;
}

.hero__floating-card:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* ===== FORM ANIMATIONS ===== */
.form__input {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.form__input:focus {
    transform: translateY(-2px);
}

.form__group {
    position: relative;
}

.form__group::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.form__input:focus ~ .form__group::after,
.form__group:focus-within::after {
    width: 100%;
}

/* ===== LOADING ANIMATIONS ===== */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shimmer 1.5s infinite;
}

/* ===== SCROLL ANIMATIONS ===== */
@media (prefers-reduced-motion: no-preference) {
    .scroll-animate {
        opacity: 0;
        transform: translateY(30px);
        transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .scroll-animate.in-view {
        opacity: 1;
        transform: translateY(0);
    }
    
    .scroll-animate-left {
        opacity: 0;
        transform: translateX(-30px);
        transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .scroll-animate-left.in-view {
        opacity: 1;
        transform: translateX(0);
    }
    
    .scroll-animate-right {
        opacity: 0;
        transform: translateX(30px);
        transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .scroll-animate-right.in-view {
        opacity: 1;
        transform: translateX(0);
    }
    
    .scroll-animate-scale {
        opacity: 0;
        transform: scale(0.8);
        transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .scroll-animate-scale.in-view {
        opacity: 1;
        transform: scale(1);
    }
}

/* ===== HOVER EFFECTS ===== */
.hover-lift {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

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

.hover-glow:hover {
    box-shadow: 0 0 30px rgba(37, 99, 235, 0.3);
}

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

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

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

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

/* ===== PERFORMANCE OPTIMIZATIONS ===== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Will-change for better performance */
.hero__floating-card,
.service__card,
.btn,
.nav__link {
    will-change: transform;
}

/* GPU acceleration */
.hero__backdrop,
.service__card,
.contact__card {
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* ===== PREMIUM HERO DESCRIPTION ANIMATIONS - BOOSTED ===== */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
        filter: brightness(1) saturate(1);
    }
    25% {
        background-position: 50% 25%;
        filter: brightness(1.1) saturate(1.2);
    }
    50% {
        background-position: 100% 50%;
        filter: brightness(1.2) saturate(1.4);
    }
    75% {
        background-position: 50% 75%;
        filter: brightness(1.1) saturate(1.2);
    }
    100% {
        background-position: 0% 50%;
        filter: brightness(1) saturate(1);
    }
}

@keyframes pulseGlow {
    0% {
        text-shadow: 0 0 8px rgba(129, 212, 250, 0.3), 0 0 16px rgba(129, 212, 250, 0.1);
        transform: scale(1);
    }
    100% {
        text-shadow: 0 0 12px rgba(129, 212, 250, 0.5), 0 0 24px rgba(129, 212, 250, 0.2);
        transform: scale(1.005);
    }
}

@keyframes borderGlow {
    0%, 100% {
        opacity: 0;
        transform: scale(0.95);
    }
    50% {
        opacity: 0.4;
        transform: scale(1.05);
    }
}