/* Custom Animations */
@keyframes blob {
    0% {
        transform: translate(0px, 0px) scale(1);
    }
    33% {
        transform: translate(30px, -50px) scale(1.1);
    }
    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
    100% {
        transform: translate(0px, 0px) scale(1);
    }
}

.animate-blob {
    animation: blob 7s infinite;
}

.animation-delay-2000 {
    animation-delay: 2s;
}

.animation-delay-4000 {
    animation-delay: 4s;
}

@keyframes fade-in {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fade-in 1s ease-out;
}

.animate-fade-in-delay {
    animation: fade-in 1s ease-out 0.3s both;
}

.animate-fade-in-delay-2 {
    animation: fade-in 1s ease-out 0.6s both;
}

/* Enhanced Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Performance optimization for animations */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Ensure smooth animations */
@media (prefers-reduced-motion: no-preference) {
    * {
        animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #1a1a1a;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #FBBF24, #3B82F6, #10B981);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, #FCD34D, #60A5FA, #34D399);
}

/* Navbar Scroll Effect */
.navbar-scrolled {
    background: rgba(0, 0, 0, 0.98) !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}





/* Smooth Loading State */
.page-loading {
    opacity: 0;
    transition: opacity 0.5s ease-in;
}

.page-loaded {
    opacity: 1;
}



/* Form Input Focus */
input:focus, textarea:focus, select:focus {
    outline: none;
    ring: 2px;
    ring-color: #2563eb;
}


/* Parallax Effect */
.parallax {
    transition: transform 0.3s ease-out;
}

/* Enhanced Reveal Animation on Scroll - More visible */
.reveal {
    opacity: 0;
    transform: translateY(60px) scale(0.95);
    transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1),
                transform 1s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Enhanced Stagger Animation - More visible */
.stagger-item {
    opacity: 0;
    transform: translateY(50px) scale(0.9);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

.stagger-item.active {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Floating Animation */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}


/* Smooth Image Load */
img {
    transition: opacity 0.3s ease-in-out;
}

img.loading {
    opacity: 0;
}

img.loaded {
    opacity: 1;
}

/* Animated Grid Pattern */
.grid-pattern {
    background-image: 
        linear-gradient(rgba(251, 191, 36, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(251, 191, 36, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    opacity: 0.3;
}

/* Gradient Mesh Background */
.gradient-mesh {
    background: 
        radial-gradient(at 0% 0%, rgba(251, 191, 36, 0.1) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(59, 130, 246, 0.1) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(16, 185, 129, 0.1) 0px, transparent 50%),
        radial-gradient(at 0% 100%, rgba(251, 191, 36, 0.1) 0px, transparent 50%);
}


/* Floating Particles */
@keyframes float-particle {
    0% {
        transform: translateY(0) translateX(0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.3;
    }
    90% {
        opacity: 0.3;
    }
    100% {
        transform: translateY(-100vh) translateX(50px) rotate(360deg);
        opacity: 0;
    }
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: linear-gradient(135deg, #FBBF24, #3B82F6);
    border-radius: 50%;
    animation: float-particle 15s infinite linear;
    pointer-events: none;
}

/* Enhanced Blob Variations */
@keyframes blob-rotate {
    0% {
        transform: translate(0px, 0px) scale(1) rotate(0deg);
    }
    33% {
        transform: translate(30px, -50px) scale(1.1) rotate(120deg);
    }
    66% {
        transform: translate(-20px, 20px) scale(0.9) rotate(240deg);
    }
    100% {
        transform: translate(0px, 0px) scale(1) rotate(360deg);
    }
}

.blob-rotate {
    animation: blob-rotate 20s infinite;
}

/* Card Glow Enhancement */
.card-glow-enhanced {
    position: relative;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-glow-enhanced::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    padding: 2px;
    background: linear-gradient(135deg, #FBBF24, #3B82F6, #10B981);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s;
}

.card-glow-enhanced:hover::before {
    opacity: 1;
}

/* Decorative Corner Accents */
.corner-accent {
    position: absolute;
    width: 60px;
    height: 60px;
    border: 2px solid;
    opacity: 0.1;
}

.corner-accent-tl {
    top: 0;
    left: 0;
    border-right: none;
    border-bottom: none;
    border-color: #FBBF24;
}

.corner-accent-tr {
    top: 0;
    right: 0;
    border-left: none;
    border-bottom: none;
    border-color: #3B82F6;
}

.corner-accent-bl {
    bottom: 0;
    left: 0;
    border-right: none;
    border-top: none;
    border-color: #10B981;
}

.corner-accent-br {
    bottom: 0;
    right: 0;
    border-left: none;
    border-top: none;
    border-color: #FBBF24;
}


/* Glow Ring Effect */
.glow-ring {
    position: relative;
}

.glow-ring::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: inherit;
    background: linear-gradient(135deg, #FBBF24, #3B82F6, #10B981);
    opacity: 0;
    filter: blur(10px);
    transition: opacity 0.3s;
    z-index: -1;
}

.glow-ring:hover::after {
    opacity: 0.5;
}

/* Mesh Gradient Overlay */
.mesh-overlay {
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(251, 191, 36, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(59, 130, 246, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(16, 185, 129, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

/* Enhanced Shadow Layers */
.shadow-layered {
    box-shadow: 
        0 4px 6px -1px rgba(0, 0, 0, 0.3),
        0 10px 15px -3px rgba(0, 0, 0, 0.2),
        0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.shadow-layered-hover:hover {
    box-shadow: 
        0 10px 15px -3px rgba(251, 191, 36, 0.2),
        0 20px 25px -5px rgba(59, 130, 246, 0.15),
        0 30px 40px -6px rgba(16, 185, 129, 0.1);
}


/* Glow Pulse Effect */
@keyframes glow-pulse {
    0%, 100% {
        box-shadow: 0 0 20px rgba(251, 191, 36, 0.4),
                    0 0 40px rgba(59, 130, 246, 0.3),
                    0 0 60px rgba(16, 185, 129, 0.2);
    }
    50% {
        box-shadow: 0 0 30px rgba(251, 191, 36, 0.6),
                    0 0 60px rgba(59, 130, 246, 0.5),
                    0 0 90px rgba(16, 185, 129, 0.4);
    }
}

.glow-pulse {
    animation: glow-pulse 3s ease-in-out infinite;
}

/* Smooth Scale Animation */
@keyframes smooth-scale {
    0% {
        transform: scale(0.95);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.smooth-scale {
    animation: smooth-scale 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}


/* Smooth Fade with Scale */
@keyframes fade-scale {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.fade-scale {
    animation: fade-scale 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Enhanced Smooth Transitions */
.smooth-transition {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}



/* Enhanced Glow Effects */
.glow-yellow {
    box-shadow: 0 0 20px rgba(251, 191, 36, 0.3),
                0 0 40px rgba(251, 191, 36, 0.2),
                0 0 60px rgba(251, 191, 36, 0.1);
}

.glow-blue {
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.3),
                0 0 40px rgba(59, 130, 246, 0.2),
                0 0 60px rgba(59, 130, 246, 0.1);
}

.glow-green {
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.3),
                0 0 40px rgba(16, 185, 129, 0.2),
                0 0 60px rgba(16, 185, 129, 0.1);
}

/* Smooth Scroll Reveal */
.scroll-reveal {
    opacity: 0;
    transform: translateY(40px) scale(0.95);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Enhanced Button Hover */
.btn-smooth {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-smooth::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-smooth:hover::before {
    width: 300px;
    height: 300px;
}

/* Smooth Text Reveal */
@keyframes text-reveal {
    from {
        opacity: 0;
        transform: translateY(20px);
        clip-path: inset(0 0 100% 0);
    }
    to {
        opacity: 1;
        transform: translateY(0);
        clip-path: inset(0 0 0% 0);
    }
}

.text-reveal {
    animation: text-reveal 1s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}



/* Enhanced Scroll-triggered animations - Rivi style */
.scroll-fade-in {
    opacity: 0;
    transform: translateY(60px) scale(0.95);
    transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1),
                transform 1s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

.scroll-fade-in.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.scroll-fade-in-left {
    opacity: 0;
    transform: translateX(-60px) scale(0.95);
    transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1),
                transform 1s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

.scroll-fade-in-left.visible {
    opacity: 1;
    transform: translateX(0) scale(1);
}

.scroll-fade-in-right {
    opacity: 0;
    transform: translateX(60px) scale(0.95);
    transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1),
                transform 1s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

.scroll-fade-in-right.visible {
    opacity: 1;
    transform: translateX(0) scale(1);
}

.scroll-scale-in {
    opacity: 0;
    transform: scale(0.85) translateY(40px);
    transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1),
                transform 1s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

.scroll-scale-in.visible {
    opacity: 1;
    transform: scale(1) translateY(0);
}

/* Enhanced Staggered Animation Delays - More noticeable */
.stagger-1 { transition-delay: 0.15s; }
.stagger-2 { transition-delay: 0.3s; }
.stagger-3 { transition-delay: 0.45s; }
.stagger-4 { transition-delay: 0.6s; }
.stagger-5 { transition-delay: 0.75s; }
.stagger-6 { transition-delay: 0.9s; }


/* Evitamin-style Animations */
/* Number Counter Animation */
@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.counter-animate {
    animation: countUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Progress Bar Animation */
/* Interactive Card Tilt Effect */
.card-tilt {
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    transform-style: preserve-3d;
}

.card-tilt:hover {
    transform: perspective(1000px) rotateX(5deg) rotateY(5deg) translateY(-10px);
}

/* Smooth Number Reveal */
@keyframes numberReveal {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.5);
    }
    50% {
        opacity: 0.5;
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.number-reveal {
    animation: numberReveal 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
}

/* Icon Bounce Animation */
@keyframes iconBounce {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-10px) scale(1.1);
    }
}

.icon-bounce {
    animation: iconBounce 2s ease-in-out infinite;
}

.icon-bounce-delay-1 {
    animation: iconBounce 2s ease-in-out infinite 0.3s;
}

.icon-bounce-delay-2 {
    animation: iconBounce 2s ease-in-out infinite 0.6s;
}

/* Smooth Text Slide */
@keyframes textSlide {
    from {
        opacity: 0;
        transform: translateX(-30px);
        clip-path: inset(0 100% 0 0);
    }
    to {
        opacity: 1;
        transform: translateX(0);
        clip-path: inset(0 0% 0 0);
    }
}

.text-slide {
    animation: textSlide 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
}


/* Enhanced Card Entrance Animation - More visible */
.card-entrance {
    opacity: 0;
    transform: translateY(60px) scale(0.9) rotateX(10deg);
    transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1),
                transform 1s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
    transform-style: preserve-3d;
}

.card-entrance.entered {
    opacity: 1;
    transform: translateY(0) scale(1) rotateX(0deg);
}
