/* ============================================
   ENERGIA SOLAR FOTOVOLTAICA RIO PRETO
   Arquivo: animations.css
   Descrição: Animações e micro-interações
   ============================================ */

/* ===== KEYFRAMES ===== */

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@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 slideInUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

@keyframes slideInDown {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.3);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(5px);
    }
}

@keyframes heartbeat {
    0%, 100% {
        transform: scale(1);
    }
    10%, 30% {
        transform: scale(0.9);
    }
    20%, 40%, 60%, 80% {
        transform: scale(1.1);
    }
    50%, 70% {
        transform: scale(1.05);
    }
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(253, 184, 19, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(253, 184, 19, 0.8), 0 0 30px rgba(253, 184, 19, 0.6);
    }
}

@keyframes slideRight {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(0);
    }
}

@keyframes slideLeft {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

/* ===== ANIMAÇÕES APLICADAS ===== */

/* Header Icons Animations */
.animate-float {
    animation: float 3s ease-in-out infinite;
}

.animate-pulse {
    animation: pulse 2s ease-in-out infinite;
}

.animate-rotate {
    animation: rotate 4s linear infinite;
}

.animate-bounce {
    animation: bounce 2s ease-in-out infinite;
}

.animate-heartbeat {
    animation: heartbeat 1.5s ease-in-out infinite;
}

/* Hover Effects */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.hover-grow {
    transition: transform 0.3s ease;
}

.hover-grow:hover {
    transform: scale(1.05);
}

.hover-glow {
    transition: box-shadow 0.3s ease;
}

.hover-glow:hover {
    box-shadow: 0 0 20px rgba(253, 184, 19, 0.6);
}

/* Button Animations */
.btn-cta-primary,
.btn-cta-secondary,
.btn-cta-outline {
    position: relative;
    overflow: hidden;
}

.btn-cta-primary::before,
.btn-cta-secondary::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-cta-primary:hover::before,
.btn-cta-secondary:hover::before {
    width: 300px;
    height: 300px;
}

/* WhatsApp Button Animation */
.whatsapp-button {
    animation: pulse 2s ease-in-out infinite;
}

.whatsapp-button:hover {
    animation: none;
}

/* Card Reveal Animation */
.feature-card,
.step-card,
.differential-card,
.ev-card,
.highlight-item {
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}

.feature-card:nth-child(1) { animation-delay: 0.1s; }
.feature-card:nth-child(2) { animation-delay: 0.2s; }
.feature-card:nth-child(3) { animation-delay: 0.3s; }
.feature-card:nth-child(4) { animation-delay: 0.4s; }
.feature-card:nth-child(5) { animation-delay: 0.5s; }
.feature-card:nth-child(6) { animation-delay: 0.6s; }

.step-card:nth-child(1) { animation-delay: 0.1s; }
.step-card:nth-child(2) { animation-delay: 0.2s; }
.step-card:nth-child(3) { animation-delay: 0.3s; }
.step-card:nth-child(4) { animation-delay: 0.4s; }
.step-card:nth-child(5) { animation-delay: 0.5s; }

.differential-card:nth-child(1) { animation-delay: 0.1s; }
.differential-card:nth-child(2) { animation-delay: 0.2s; }
.differential-card:nth-child(3) { animation-delay: 0.3s; }
.differential-card:nth-child(4) { animation-delay: 0.4s; }
.differential-card:nth-child(5) { animation-delay: 0.5s; }
.differential-card:nth-child(6) { animation-delay: 0.6s; }

/* Section Reveal on Scroll */
.section-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.section-reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Emoji Animations */
.benefit-icon,
.feature-icon,
.diff-icon,
.ev-icon,
.cta-icon {
    display: inline-block;
    transition: transform 0.3s ease;
}

.benefits-list li:hover .benefit-icon,
.feature-card:hover .feature-icon,
.differential-card:hover .diff-icon,
.ev-card:hover .ev-icon {
    transform: scale(1.2) rotate(10deg);
}

.btn-cta-primary:hover .cta-icon,
.btn-cta-secondary:hover .cta-icon {
    animation: shake 0.5s ease;
}

/* Loading Animation */
.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(253, 184, 19, 0.3);
    border-top-color: #FDB813;
    border-radius: 50%;
    animation: rotate 1s linear infinite;
}

/* Progress Bar Animation */
.progress-bar {
    animation: slideRight 0.3s ease;
}

/* Smooth Scroll Behavior */
html {
    scroll-behavior: smooth;
}

/* Image Lazy Load Animation */
.lazy-image {
    opacity: 0;
    transition: opacity 0.5s ease;
}

.lazy-image.loaded {
    opacity: 1;
}

/* Text Gradient Animation */
.text-gradient {
    background: linear-gradient(90deg, #FDB813, #FFD54F, #FDB813);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
    0%, 100% {
        background-position: 0% center;
    }
    50% {
        background-position: 100% center;
    }
}

/* Underline Animation */
.underline-animation {
    position: relative;
    display: inline-block;
}

.underline-animation::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.underline-animation:hover::after {
    width: 100%;
}

/* Stagger Animation for Lists */
.stagger-animation > * {
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}

.stagger-animation > *:nth-child(1) { animation-delay: 0.1s; }
.stagger-animation > *:nth-child(2) { animation-delay: 0.2s; }
.stagger-animation > *:nth-child(3) { animation-delay: 0.3s; }
.stagger-animation > *:nth-child(4) { animation-delay: 0.4s; }
.stagger-animation > *:nth-child(5) { animation-delay: 0.5s; }
.stagger-animation > *:nth-child(6) { animation-delay: 0.6s; }

/* Reduce Motion for Accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Background Animation */
@keyframes backgroundShift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.animated-gradient {
    background-size: 200% 200%;
    animation: backgroundShift 5s ease infinite;
}

/* 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: 200px;
    height: 200px;
}

/* Blink Animation */
@keyframes blink {
    0%, 49%, 100% {
        opacity: 1;
    }
    50%, 99% {
        opacity: 0;
    }
}

.blink {
    animation: blink 1s linear infinite;
}

