/* =========================================
   PREMIUM ANIMATIONS - Desentupidora Exata
   ========================================= */

/* =========================================
   KEYFRAME ANIMATIONS
   ========================================= */

/* Floating Animation */
@keyframes float {
    0%, 100% { 
        transform: translateY(0) rotate(0deg); 
    }
    25% { 
        transform: translateY(-10px) rotate(1deg); 
    }
    50% { 
        transform: translateY(-5px) rotate(0deg); 
    }
    75% { 
        transform: translateY(-15px) rotate(-1deg); 
    }
}

/* Pulse Animation for WhatsApp Button */
@keyframes pulse {
    0% { 
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.6); 
    }
    50% { 
        box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); 
    }
    100% { 
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); 
    }
}

/* Glow Pulse Animation */
@keyframes glowPulse {
    0%, 100% { 
        box-shadow: 0 0 20px rgba(230, 57, 70, 0.3), 0 0 40px rgba(230, 57, 70, 0.1);
    }
    50% { 
        box-shadow: 0 0 30px rgba(230, 57, 70, 0.5), 0 0 60px rgba(230, 57, 70, 0.2);
    }
}

/* Shimmer Effect */
@keyframes shimmer {
    0% {
        background-position: -200% center;
    }
    100% {
        background-position: 200% center;
    }
}

/* Bounce In Animation */
@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
    }
}

/* Slide Up Fade */
@keyframes slideUpFade {
    0% {
        opacity: 0;
        transform: translateY(40px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Slide In From Left */
@keyframes slideInLeft {
    0% {
        opacity: 0;
        transform: translateX(-50px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Slide In From Right */
@keyframes slideInRight {
    0% {
        opacity: 0;
        transform: translateX(50px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Scale Fade In */
@keyframes scaleFadeIn {
    0% {
        opacity: 0;
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Rotate Pulse */
@keyframes rotatePulse {
    0%, 100% {
        transform: rotate(0deg) scale(1);
    }
    25% {
        transform: rotate(5deg) scale(1.02);
    }
    75% {
        transform: rotate(-5deg) scale(1.02);
    }
}

/* Gradient Flow */
@keyframes gradientFlow {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Text Reveal */
@keyframes textReveal {
    0% {
        clip-path: inset(0 100% 0 0);
    }
    100% {
        clip-path: inset(0 0 0 0);
    }
}

/* Ring Expand */
@keyframes ringExpand {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

/* =========================================
   WHATSAPP FLOATING BUTTON
   ========================================= */
.whatsapp-float-btn {
    position: fixed;
    bottom: 25px;
    right: 25px;
    z-index: 1000;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: white;
    width: 65px;
    height: 65px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 
        0 4px 20px rgba(37, 211, 102, 0.4),
        0 0 0 0 rgba(37, 211, 102, 0.4);
    animation: pulse 2s infinite;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    text-decoration: none;
}

.whatsapp-float-btn::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: inherit;
    z-index: -1;
    animation: ringExpand 2s ease-out infinite;
    opacity: 0;
}

.whatsapp-float-btn:hover {
    transform: scale(1.1) translateY(-5px);
    box-shadow: 
        0 8px 30px rgba(37, 211, 102, 0.5),
        0 0 60px rgba(37, 211, 102, 0.3);
}

.whatsapp-float-btn:active {
    transform: scale(1.05);
}

.whatsapp-icon {
    font-size: 32px;
    line-height: 1;
    transition: transform 0.3s ease;
}

.whatsapp-float-btn:hover .whatsapp-icon {
    transform: rotate(-10deg) scale(1.1);
}

/* Tooltip on Hover */
.whatsapp-float-btn::after {
    content: 'Fale Conosco!';
    position: absolute;
    right: 75px;
    background: #0F1419;
    color: white;
    padding: 0.6rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    font-family: var(--font-body);
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transform: translateX(10px);
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.whatsapp-float-btn:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

/* =========================================
   FADE IN UP - Scroll Reveal Animation
   ========================================= */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: 
        opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered Children Animation */
.fade-in-up.visible:nth-child(1) { transition-delay: 0.1s; }
.fade-in-up.visible:nth-child(2) { transition-delay: 0.2s; }
.fade-in-up.visible:nth-child(3) { transition-delay: 0.3s; }
.fade-in-up.visible:nth-child(4) { transition-delay: 0.4s; }
.fade-in-up.visible:nth-child(5) { transition-delay: 0.5s; }
.fade-in-up.visible:nth-child(6) { transition-delay: 0.6s; }
.fade-in-up.visible:nth-child(7) { transition-delay: 0.7s; }
.fade-in-up.visible:nth-child(8) { transition-delay: 0.8s; }
.fade-in-up.visible:nth-child(9) { transition-delay: 0.9s; }

/* =========================================
   HERO CONTENT ANIMATIONS
   ========================================= */
.hero-content {
    animation: slideUpFade 1s ease-out 0.3s both;
}

.hero h1 {
    animation: slideUpFade 1s ease-out 0.5s both;
}

.hero p {
    animation: slideUpFade 1s ease-out 0.7s both;
}

.hero .cta-group {
    animation: slideUpFade 1s ease-out 0.9s both;
}

.hero .cta-group .btn:nth-child(1) { animation: bounceIn 0.6s ease-out 1.1s both; }
.hero .cta-group .btn:nth-child(2) { animation: bounceIn 0.6s ease-out 1.3s both; }
.hero .cta-group .btn:nth-child(3) { animation: bounceIn 0.6s ease-out 1.5s both; }

/* =========================================
   BUTTON HOVER EFFECTS
   ========================================= */
.btn {
    position: relative;
    overflow: hidden;
}

.btn::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 ease, height 0.6s ease;
}

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

/* Shimmer Effect on Primary Button */
.btn-primary {
    background-size: 200% auto;
    animation: gradientFlow 3s ease infinite;
}

/* =========================================
   SERVICE BLOCK ANIMATIONS
   ========================================= */
.service-block {
    transition: 
        transform 0.5s cubic-bezier(0.4, 0, 0.2, 1),
        box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-block::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(255, 255, 255, 0.1) 50%, transparent 100%);
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.service-block:hover::after {
    opacity: 1;
}

/* =========================================
   HEADER SCROLL ANIMATION
   ========================================= */
header {
    transition: 
        background-color 0.4s ease,
        box-shadow 0.4s ease,
        padding 0.4s ease;
}

header.scrolled .logo a {
    transform: scale(0.95);
}

/* =========================================
   LINK HOVER ANIMATIONS
   ========================================= */
.footer-links a {
    position: relative;
    transition: all 0.3s ease;
}

.footer-links a::before {
    content: '→';
    position: absolute;
    left: -20px;
    opacity: 0;
    transition: all 0.3s ease;
    color: var(--accent-gold);
}

.footer-links a:hover::before {
    left: -15px;
    opacity: 1;
}

/* =========================================
   LOADING ANIMATIONS
   ========================================= */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

/* =========================================
   RIPPLE EFFECT FOR BUTTONS
   ========================================= */
.ripple {
    position: relative;
    overflow: hidden;
}

.ripple-effect {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transform: scale(0);
    animation: rippleAnim 0.6s linear;
    pointer-events: none;
}

@keyframes rippleAnim {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* =========================================
   COUNTER ANIMATION
   ========================================= */
.counter-animate {
    display: inline-block;
    animation: bounceIn 0.6s ease-out both;
}

/* =========================================
   SCROLL INDICATOR
   ========================================= */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.8rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    animation: float 2s ease-in-out infinite;
}

.scroll-indicator::after {
    content: '';
    width: 2px;
    height: 30px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.8), transparent);
    animation: scrollLine 2s ease-in-out infinite;
}

@keyframes scrollLine {
    0%, 100% {
        transform: scaleY(0);
        transform-origin: top;
    }
    50% {
        transform: scaleY(1);
        transform-origin: top;
    }
    51% {
        transform-origin: bottom;
    }
}

/* =========================================
   PARALLAX EFFECTS
   ========================================= */
.parallax-bg {
    transform: translateZ(0);
    will-change: transform;
}

/* =========================================
   IMAGE LOADING ANIMATION
   ========================================= */
.img-loading {
    background: linear-gradient(90deg, #f3f3f3 0%, #ecebeb 50%, #f3f3f3 100%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

.img-loaded {
    animation: scaleFadeIn 0.5s ease-out both;
}

/* =========================================
   NOTIFICATION BADGE ANIMATION
   ========================================= */
.notification-badge {
    animation: bounceIn 0.5s ease-out;
}

.notification-badge.new {
    animation: pulse 1.5s infinite;
}

/* =========================================
   MODAL ANIMATIONS
   ========================================= */
.modal-enter {
    animation: scaleFadeIn 0.3s ease-out;
}

.modal-exit {
    animation: scaleFadeIn 0.3s ease-out reverse;
}

.modal-backdrop {
    animation: fadeIn 0.3s ease-out;
}

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

/* =========================================
   TYPING EFFECT
   ========================================= */
.typing-effect {
    overflow: hidden;
    border-right: 2px solid var(--accent-gold);
    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(--accent-gold); }
}

/* =========================================
   ACCESSIBILITY - Reduced Motion
   ========================================= */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .fade-in-up {
        opacity: 1;
        transform: none;
    }
    
    .hero-content,
    .hero h1,
    .hero p,
    .hero .cta-group,
    .hero .cta-group .btn {
        animation: none;
        opacity: 1;
        transform: none;
    }
    
    .whatsapp-float-btn {
        animation: none;
    }
    
    .whatsapp-float-btn::before {
        animation: none;
    }
}
