/* ===== ANIMAÇÕES AVANÇADAS INSPIRADAS NO STARTTI ===== */

/* Animações de entrada */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

@keyframes slideInFromBottom {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Animações de background */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

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

@keyframes rotateGlow {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Efeitos de hover avançados */
@keyframes buttonPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(237, 60, 52, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(237, 60, 52, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(237, 60, 52, 0);
    }
}

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

/* Classes de animação */
.animate-fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
}

.animate-fade-in-down {
    animation: fadeInDown 0.8s ease-out forwards;
}

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

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

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

.animate-slide-in-bottom {
    animation: slideInFromBottom 1s ease-out forwards;
}

/* Delays para animações sequenciais */
.animate-delay-100 {
    animation-delay: 0.1s;
}

.animate-delay-200 {
    animation-delay: 0.2s;
}

.animate-delay-300 {
    animation-delay: 0.3s;
}

.animate-delay-400 {
    animation-delay: 0.4s;
}

.animate-delay-500 {
    animation-delay: 0.5s;
}

/* Elementos inicialmente ocultos para animação */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.animate-on-scroll.animate-in {
    opacity: 1;
    transform: translateY(0);
}

/* Background animado do hero */
.hero-background-animated {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(-45deg, #28539f, #1e3f7a, #153060, #28539f);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    opacity: 0.1;
}

/* Partículas flutuantes */
.floating-particles {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    pointer-events: none;
}

.particle {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: floatingElements 6s ease-in-out infinite;
}

.particle:nth-child(1) {
    width: 10px;
    height: 10px;
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.particle:nth-child(2) {
    width: 15px;
    height: 15px;
    top: 60%;
    left: 80%;
    animation-delay: 2s;
}

.particle:nth-child(3) {
    width: 8px;
    height: 8px;
    top: 40%;
    left: 60%;
    animation-delay: 4s;
}

.particle:nth-child(4) {
    width: 12px;
    height: 12px;
    top: 80%;
    left: 20%;
    animation-delay: 1s;
}

.particle:nth-child(5) {
    width: 6px;
    height: 6px;
    top: 30%;
    left: 90%;
    animation-delay: 3s;
}

/* Efeitos de hover avançados */
.btn-primary {
    position: relative;
    overflow: hidden;
}

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

.btn-primary:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary:active {
    animation: buttonPulse 0.6s;
}

/* Cards com efeito de flutuação */
.diferencial-card,
.solucao-card,
.plano-card {
    transition: all 0.3s ease;
}

.diferencial-card:hover,
.solucao-card:hover {
    animation: cardFloat 2s ease-in-out infinite;
}

/* Efeito de brilho nos ícones */
.card-icon {
    position: relative;
    overflow: hidden;
}

.card-icon::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transform: rotate(45deg) translateX(-100%);
    transition: transform 0.6s;
}

.diferencial-card:hover .card-icon::after,
.solucao-card:hover .card-icon::after {
    transform: rotate(45deg) translateX(100%);
}

/* Efeito de ondas no background */
.wave-background {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120' preserveAspectRatio='none'%3E%3Cpath d='M321.39,56.44c58-10.79,114.16-30.13,172-41.86,82.39-16.72,168.19-17.73,250.45-.39C823.78,31,906.67,72,985.66,92.83c70.05,18.48,146.53,26.09,214.34,3V0H0V27.35A600.21,600.21,0,0,0,321.39,56.44Z' fill='%23ffffff'%3E%3C/path%3E%3C/svg%3E") no-repeat center bottom;
    background-size: cover;
}

/* Efeito de typing no hero */
.typing-effect {
    border-right: 2px solid #ed3c34;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% {
        border-color: transparent;
    }
    51%, 100% {
        border-color: #ed3c34;
    }
}

/* Contador animado */
@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.counter {
    animation: countUp 1s ease-out;
}

/* Efeito de parallax suave */
.parallax-element {
    transform: translateZ(0);
    transition: transform 0.1s ease-out;
}

/* Efeito de reveal de texto */
.text-reveal {
    overflow: hidden;
}

.text-reveal span {
    display: inline-block;
    transform: translateY(100%);
    transition: transform 0.8s ease-out;
}

.text-reveal.animate-in span {
    transform: translateY(0);
}

/* Efeito de loading suave */
.loading-dots {
    display: inline-flex;
    gap: 4px;
}

.loading-dots span {
    width: 8px;
    height: 8px;
    background: #28539f;
    border-radius: 50%;
    animation: loadingDots 1.4s ease-in-out infinite both;
}

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

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

@keyframes loadingDots {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1);
    }
}

/* Efeito de progress bar */
.progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(40, 83, 159, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #28539f, #ed3c34);
    border-radius: 2px;
    transform: translateX(-100%);
    animation: progressFill 2s ease-out forwards;
}

@keyframes progressFill {
    to {
        transform: translateX(0);
    }
}

/* Efeito de glow nos elementos importantes */
.glow-effect {
    box-shadow: 0 0 20px rgba(237, 60, 52, 0.3);
    animation: glowPulse 2s ease-in-out infinite alternate;
}

@keyframes glowPulse {
    from {
        box-shadow: 0 0 20px rgba(237, 60, 52, 0.3);
    }
    to {
        box-shadow: 0 0 30px rgba(237, 60, 52, 0.6);
    }
}

/* Responsividade das animações */
@media (max-width: 768px) {
    .animate-on-scroll {
        transform: translateY(20px);
    }
    
    .particle {
        display: none; /* Remover partículas em mobile para performance */
    }
    
    .diferencial-card:hover,
    .solucao-card:hover {
        animation: none; /* Remover animações de hover em mobile */
    }
}

/* Reduzir animações para usuários que preferem menos movimento */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .floating-particles {
        display: none;
    }
    
    .hero-background-animated {
        animation: none;
    }
}

