/* ========================================
   Animations & Effects
   ======================================== */

/* Fade Up Animation */
.animate-fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-fade-up.animated {
    opacity: 1;
    transform: translateY(0);
}

/* Fade Left Animation */
.animate-fade-left {
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-fade-left.animated {
    opacity: 1;
    transform: translateX(0);
}

/* Fade Right Animation */
.animate-fade-right {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-fade-right.animated {
    opacity: 1;
    transform: translateX(0);
}

/* Scale Animation */
.animate-scale {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-scale.animated {
    opacity: 1;
    transform: scale(1);
}

/* Animation Delays */
.delay-1 {
    transition-delay: 0.1s;
}

.delay-2 {
    transition-delay: 0.2s;
}

.delay-3 {
    transition-delay: 0.3s;
}

.delay-4 {
    transition-delay: 0.4s;
}

.delay-5 {
    transition-delay: 0.5s;
}

/* Float Animation */
@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-15px);
    }
}

/* Pulse Animation */
@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
}

/* Glow Pulse */
@keyframes glow-pulse {

    0%,
    100% {
        box-shadow: 0 0 20px rgba(30, 155, 215, 0.3);
    }

    50% {
        box-shadow: 0 0 40px rgba(30, 155, 215, 0.6);
    }
}

/* Rotate Animation */
@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Slide In Animation */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Text Gradient Animation */
@keyframes gradient-shift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.gradient-text-animated {
    background: linear-gradient(90deg, #1E9BD7, #4BB8E8, #1680B8, #1E9BD7);
    background-size: 300% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradient-shift 4s linear infinite;
}

/* Card 3D Hover Effect */
.card-3d {
    perspective: 1000px;
}

.card-3d-inner {
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.card-3d:hover .card-3d-inner {
    transform: rotateY(10deg) rotateX(5deg);
}

/* Ripple Effect */
.ripple {
    position: relative;
    overflow: hidden;
}

.ripple::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    background-image: radial-gradient(circle, rgba(255, 255, 255, 0.25) 10%, transparent 10.01%);
    background-repeat: no-repeat;
    background-position: 50%;
    transform: scale(10, 10);
    opacity: 0;
    transition: transform 0.5s, opacity 0.5s;
}

.ripple:active::after {
    transform: scale(0, 0);
    opacity: 0.3;
    transition: 0s;
}

/* Shimmer Effect */
.shimmer {
    position: relative;
    overflow: hidden;
}

.shimmer::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.4),
            transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}

/* Bounce Animation */
@keyframes bounce {

    0%,
    20%,
    53%,
    80%,
    100% {
        animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
        transform: translate3d(0, 0, 0);
    }

    40%,
    43% {
        animation-timing-function: cubic-bezier(0.755, 0.05, 0.855, 0.06);
        transform: translate3d(0, -20px, 0);
    }

    70% {
        animation-timing-function: cubic-bezier(0.755, 0.05, 0.855, 0.06);
        transform: translate3d(0, -10px, 0);
    }

    90% {
        transform: translate3d(0, -4px, 0);
    }
}

.bounce {
    animation: bounce 1s infinite;
}

/* Typing Effect */
.typing-effect {
    overflow: hidden;
    border-right: 3px solid var(--primary);
    white-space: nowrap;
    animation: typing 3.5s steps(40, end), blink-caret 0.75s step-end infinite;
}

@keyframes typing {
    from {
        width: 0;
    }

    to {
        width: 100%;
    }
}

@keyframes blink-caret {

    from,
    to {
        border-color: transparent;
    }

    50% {
        border-color: var(--primary);
    }
}

/* Parallax Effect Helper */
.parallax {
    will-change: transform;
}

/* Magnetic Button Effect */
.magnetic-btn {
    position: relative;
    transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

/* Image Reveal Animation */
.image-reveal {
    position: relative;
    overflow: hidden;
}

.image-reveal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary);
    transform: scaleX(1);
    transform-origin: right;
    transition: transform 0.8s cubic-bezier(0.77, 0, 0.175, 1);
    z-index: 1;
}

.image-reveal.revealed::before {
    transform: scaleX(0);
}

/* Counter Animation */
.counter-animated {
    display: inline-block;
    transition: transform 0.1s;
}

/* Stagger Children Animation */
.stagger-children>* {
    opacity: 0;
    transform: translateY(20px);
}

.stagger-children.animated>*:nth-child(1) {
    animation: slideIn 0.5s ease forwards 0.1s;
}

.stagger-children.animated>*:nth-child(2) {
    animation: slideIn 0.5s ease forwards 0.2s;
}

.stagger-children.animated>*:nth-child(3) {
    animation: slideIn 0.5s ease forwards 0.3s;
}

.stagger-children.animated>*:nth-child(4) {
    animation: slideIn 0.5s ease forwards 0.4s;
}

.stagger-children.animated>*:nth-child(5) {
    animation: slideIn 0.5s ease forwards 0.5s;
}

/* Hover Lift Effect */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Border Animation */
.border-animate {
    position: relative;
}

.border-animate::before,
.border-animate::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
}

.border-animate::before {
    top: 0;
    left: 0;
}

.border-animate::after {
    bottom: 0;
    right: 0;
}

.border-animate:hover::before,
.border-animate:hover::after {
    width: 100%;
}

/* Morph Shape Animation */
@keyframes morph {
    0% {
        border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    }

    50% {
        border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%;
    }

    100% {
        border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    }
}

.morph-shape {
    animation: morph 8s ease-in-out infinite;
}

/* Loading Dots Animation */
.loading-dots {
    display: flex;
    gap: 5px;
}

.loading-dots span {
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    animation: dots 1.4s infinite ease-in-out both;
}

.loading-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

.loading-dots span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes dots {

    0%,
    80%,
    100% {
        transform: scale(0);
    }

    40% {
        transform: scale(1);
    }
}

/* Noise texture overlay */
.noise-overlay {
    position: relative;
}

.noise-overlay::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.03;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* ========================================
   Advanced Card Tilt Effect
   ======================================== */
.tilt-card {
    transform-style: preserve-3d;
    transition: transform 0.3s ease;
}

.tilt-card:hover {
    transform: perspective(1000px) rotateX(5deg) rotateY(-5deg) scale(1.02);
}

.tilt-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
    border-radius: inherit;
}

.tilt-card:hover::before {
    opacity: 1;
}

/* ========================================
   Icon Bounce on Hover
   ======================================== */
.icon-bounce {
    transition: transform 0.3s ease;
}

.icon-bounce:hover i,
.icon-bounce:hover .icon {
    animation: iconBounce 0.6s ease;
}

@keyframes iconBounce {

    0%,
    100% {
        transform: translateY(0);
    }

    25% {
        transform: translateY(-8px);
    }

    50% {
        transform: translateY(-4px) scale(1.1);
    }

    75% {
        transform: translateY(-2px);
    }
}

/* ========================================
   Gradient Border Animation
   ======================================== */
.gradient-border {
    position: relative;
    background: var(--white);
    border-radius: var(--radius-lg);
}

.gradient-border::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(45deg, var(--primary), var(--primary-light), var(--primary-dark), var(--primary));
    background-size: 300% 300%;
    border-radius: inherit;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
    animation: gradientMove 3s linear infinite;
}

.gradient-border:hover::before {
    opacity: 1;
}

@keyframes gradientMove {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* ========================================
   Text Reveal Animation
   ======================================== */
.text-reveal {
    overflow: hidden;
}

.text-reveal span {
    display: inline-block;
    transform: translateY(100%);
    transition: transform 0.6s cubic-bezier(0.77, 0, 0.175, 1);
}

.text-reveal.animated span {
    transform: translateY(0);
}

/* ========================================
   Glowing Button Effect
   ======================================== */
.btn-glow-animate {
    position: relative;
    z-index: 1;
}

.btn-glow-animate::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    background: inherit;
    filter: blur(20px);
    opacity: 0;
    z-index: -1;
    transition: opacity 0.3s ease;
    border-radius: inherit;
}

.btn-glow-animate:hover::after {
    opacity: 0.6;
}

/* ========================================
   Smooth Underline Animation
   ======================================== */
.underline-animate {
    position: relative;
    display: inline-block;
}

.underline-animate::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-gradient);
    transition: width 0.3s ease;
}

.underline-animate:hover::after {
    width: 100%;
}

/* ========================================
   Card Shine Effect
   ======================================== */
.shine-effect {
    position: relative;
    overflow: hidden;
}

.shine-effect::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg,
            transparent 30%,
            rgba(255, 255, 255, 0.1) 50%,
            transparent 70%);
    transform: translateX(-100%) rotate(25deg);
    transition: transform 0.6s ease;
}

.shine-effect:hover::after {
    transform: translateX(100%) rotate(25deg);
}

/* ========================================
   Floating Badge Animation
   ======================================== */
.floating-badge {
    animation: floatBadge 3s ease-in-out infinite;
}

@keyframes floatBadge {

    0%,
    100% {
        transform: translateY(0) rotate(-2deg);
    }

    50% {
        transform: translateY(-10px) rotate(2deg);
    }
}

/* ========================================
   Pulse Ring Animation
   ======================================== */
.pulse-ring {
    position: relative;
}

.pulse-ring::before,
.pulse-ring::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border: 2px solid var(--primary);
    border-radius: 50%;
    opacity: 0;
    animation: pulseRing 2s ease-out infinite;
}

.pulse-ring::after {
    animation-delay: 1s;
}

@keyframes pulseRing {
    0% {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 1;
    }

    100% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0;
    }
}

/* ========================================
   Slide In Stagger
   ======================================== */
.slide-stagger>* {
    opacity: 0;
    transform: translateX(-20px);
}

.slide-stagger.animated>*:nth-child(1) {
    animation: slideRight 0.5s ease forwards 0.1s;
}

.slide-stagger.animated>*:nth-child(2) {
    animation: slideRight 0.5s ease forwards 0.2s;
}

.slide-stagger.animated>*:nth-child(3) {
    animation: slideRight 0.5s ease forwards 0.3s;
}

.slide-stagger.animated>*:nth-child(4) {
    animation: slideRight 0.5s ease forwards 0.4s;
}

.slide-stagger.animated>*:nth-child(5) {
    animation: slideRight 0.5s ease forwards 0.5s;
}

@keyframes slideRight {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ========================================
   Hover Scale Effect
   ======================================== */
.hover-scale {
    transition: transform 0.3s ease;
}

.hover-scale:hover {
    transform: scale(1.05);
}

/* ========================================
   Wobble Animation
   ======================================== */
@keyframes wobble {

    0%,
    100% {
        transform: translateX(0);
    }

    15% {
        transform: translateX(-10px) rotate(-5deg);
    }

    30% {
        transform: translateX(8px) rotate(3deg);
    }

    45% {
        transform: translateX(-6px) rotate(-3deg);
    }

    60% {
        transform: translateX(4px) rotate(2deg);
    }

    75% {
        transform: translateX(-2px) rotate(-1deg);
    }
}

.wobble:hover {
    animation: wobble 0.8s ease;
}

/* ========================================
   Fade Zoom Effect
   ======================================== */
.fade-zoom {
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.fade-zoom.animated {
    opacity: 1;
    transform: scale(1);
}