/* ===== ANIMAÇÕES AVANÇADAS ===== */

/* Efeito Glitch */
.glitch {
    position: relative;
    animation: glitch-skew 3s infinite linear alternate-reverse;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch::before {
    left: 2px;
    text-shadow: -2px 0 #ff00c1;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim 5s infinite linear alternate-reverse;
}

.glitch::after {
    left: -2px;
    text-shadow: -2px 0 #00fff9, 2px 2px #ff00c1;
    animation: glitch-anim2 1s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    0% { clip: rect(31px, 9999px, 94px, 0); }
    20% { clip: rect(85px, 9999px, 40px, 0); }
    40% { clip: rect(65px, 9999px, 73px, 0); }
    60% { clip: rect(20px, 9999px, 10px, 0); }
    80% { clip: rect(50px, 9999px, 60px, 0); }
    100% { clip: rect(70px, 9999px, 30px, 0); }
}

@keyframes glitch-anim2 {
    0% { clip: rect(65px, 9999px, 119px, 0); }
    20% { clip: rect(40px, 9999px, 66px, 0); }
    40% { clip: rect(79px, 9999px, 17px, 0); }
    60% { clip: rect(96px, 9999px, 68px, 0); }
    80% { clip: rect(20px, 9999px, 53px, 0); }
    100% { clip: rect(76px, 9999px, 95px, 0); }
}

@keyframes glitch-skew {
    0% { transform: skew(0deg); }
    10% { transform: skew(2deg); }
    20% { transform: skew(-2deg); }
    30% { transform: skew(1deg); }
    40% { transform: skew(-1deg); }
    50% { transform: skew(0deg); }
    100% { transform: skew(0deg); }
}

/* Efeito Pulse */
.pulse {
    animation: pulse-btn 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse-btn {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* Fade In */
.fade-in {
    opacity: 0;
    animation: fadeIn 1s ease-in forwards;
}

.fade-in-delay {
    opacity: 0;
    animation: fadeIn 1s ease-in 0.3s forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

/* Floating Elements */
.floating {
    animation: floating 3s ease-in-out infinite;
}

.floating[data-float-speed="1.5"] {
    animation-duration: 4.5s;
}

.floating[data-float-speed="2"] {
    animation-duration: 6s;
}

.floating[data-float-speed="2.5"] {
    animation-duration: 7.5s;
}

@keyframes floating {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

/* Hover Lift */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(12, 125, 113, 0.2);
}

/* Glow Effect */
.glow {
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from {
        text-shadow: 0 0 10px #fff, 0 0 20px #fff, 0 0 30px var(--color-primary),
                     0 0 40px var(--color-primary), 0 0 50px var(--color-primary);
    }
    to {
        text-shadow: 0 0 20px #fff, 0 0 30px var(--color-primary),
                     0 0 40px var(--color-primary), 0 0 50px var(--color-primary),
                     0 0 60px var(--color-primary);
    }
}

/* Slide In From Left */
.slide-in-left {
    opacity: 0;
    transform: translateX(-100px);
    animation: slideInLeft 0.8s ease-out forwards;
}

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

/* Slide In From Right */
.slide-in-right {
    opacity: 0;
    transform: translateX(100px);
    animation: slideInRight 0.8s ease-out forwards;
}

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

/* Scale In */
.scale-in {
    opacity: 0;
    transform: scale(0.5);
    animation: scaleIn 0.6s ease-out forwards;
}

@keyframes scaleIn {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Rotate In */
.rotate-in {
    opacity: 0;
    transform: rotate(-180deg) scale(0);
    animation: rotateIn 0.8s ease-out forwards;
}

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

/* Shimmer Effect */
.shimmer {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.2) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    background-size: 200% 100%;
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Particle Trail Effect */
@keyframes particle-trail {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(var(--tx), var(--ty)) scale(0);
        opacity: 0;
    }
}

/* Breathing Effect */
.breathing {
    animation: breathing 4s ease-in-out infinite;
}

@keyframes breathing {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Neon Border */
.neon-border {
    position: relative;
}

.neon-border::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--color-primary), var(--color-accent), var(--color-primary));
    border-radius: inherit;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s;
    animation: neon-rotate 4s linear infinite;
}

.neon-border:hover::before {
    opacity: 1;
}

@keyframes neon-rotate {
    0% {
        filter: hue-rotate(0deg);
    }
    100% {
        filter: hue-rotate(360deg);
    }
}

/* Text Reveal */
.text-reveal {
    overflow: hidden;
}

.text-reveal span {
    display: inline-block;
    opacity: 0;
    transform: translateY(100%);
    animation: textReveal 0.8s ease-out forwards;
}

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

/* Parallax Layers */
.parallax-layer {
    transition: transform 0.1s ease-out;
}

/* Magnetic Effect */
.magnetic {
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* 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.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

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