/* ============================================
   ANIMATIONS - Sofisticadas e Elegantes
   ============================================ */

/* ============================================
   KEYFRAMES - Definições de Animação
   ============================================ */

/* Fade In com Movimento Suave */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    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(-40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Fade In Simples */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Scale In Elegante */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Pulse Suave */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 8px 25px rgba(212, 165, 116, 0.4);
    }
    50% {
        transform: scale(1.03);
        box-shadow: 0 12px 35px rgba(212, 165, 116, 0.55);
    }
}

/* Pulse para WhatsApp */
@keyframes pulseWhatsApp {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 8px 25px rgba(37, 211, 102, 0.6);
    }
}

/* Glow Sutil */
@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(79, 184, 151, 0.3);
    }
    50% {
        box-shadow: 0 0 40px rgba(79, 184, 151, 0.5);
    }
}

/* Float Suave */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Shimmer (Brilho que passa) */
@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Rotate Suave */
@keyframes rotateIn {
    from {
        opacity: 0;
        transform: rotate(-10deg) scale(0.9);
    }
    to {
        opacity: 1;
        transform: rotate(0) scale(1);
    }
}

/* Bounce Sutil */
@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.95);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Slide In com Spring */
@keyframes slideInSpring {
    0% {
        opacity: 0;
        transform: translateY(60px);
    }
    60% {
        opacity: 1;
        transform: translateY(-10px);
    }
    100% {
        transform: translateY(0);
    }
}

/* Gradient Shift (Para backgrounds animados) */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Underline Grow */
@keyframes underlineGrow {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

/* ============================================
   CLASSES DE ANIMAÇÃO
   ============================================ */

/* Fade In Básico */
.fade-in {
    animation: fadeInUp 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.fade-in-down {
    animation: fadeInDown 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.fade-in-left {
    animation: fadeInLeft 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.fade-in-right {
    animation: fadeInRight 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

/* Scale In */
.scale-in {
    animation: scaleIn 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

/* Pulse Contínuo */
.pulse {
    animation: pulse 2.5s ease-in-out infinite;
}

/* Float Contínuo */
.float {
    animation: float 3s ease-in-out infinite;
}

/* Glow Contínuo */
.glow {
    animation: glow 2s ease-in-out infinite;
}

/* Bounce In */
.bounce-in {
    animation: bounceIn 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

/* Spring Animation */
.spring-in {
    animation: slideInSpring 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

/* ============================================
   DELAYS DE ANIMAÇÃO (Stagger Effect)
   ============================================ */

.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }
.delay-600 { animation-delay: 0.6s; }
.delay-700 { animation-delay: 0.7s; }
.delay-800 { animation-delay: 0.8s; }

/* Para elementos que precisam começar invisíveis */
.animate-on-scroll {
    opacity: 0;
}

.animate-on-scroll.animated {
    animation: fadeInUp 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

/* ============================================
   WHATSAPP FLOATING BUTTON - Sofisticado
   ============================================ */

.whatsapp-float {
    position: fixed;
    bottom: 25px;
    right: 25px;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: white;
    padding: 16px 22px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 
        0 6px 20px rgba(37, 211, 102, 0.4),
        0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 1001;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    animation: fadeInUp 0.6s ease-out 1s both, pulseWhatsApp 3s ease-in-out 2s infinite;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.3px;
}

.whatsapp-float::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 50px;
    background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, transparent 100%);
    pointer-events: none;
}

.whatsapp-float:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 
        0 12px 35px rgba(37, 211, 102, 0.5),
        0 4px 12px rgba(0, 0, 0, 0.2);
    color: white;
}

.whatsapp-float:active {
    transform: translateY(-2px) scale(1.02);
}

.whatsapp-icon {
    width: 26px;
    height: 26px;
    fill: white;
    flex-shrink: 0;
}

/* Texto do WhatsApp - Esconde em mobile pequeno */
.whatsapp-float span {
    display: inline;
}

@media (max-width: 480px) {
    .whatsapp-float {
        bottom: 20px;
        right: 20px;
        padding: 14px;
        border-radius: 50%;
        gap: 0;
    }
    
    .whatsapp-float span {
        display: none;
    }
    
    .whatsapp-icon {
        width: 28px;
        height: 28px;
    }
}

/* ============================================
   HOVER ANIMATIONS - Interatividade
   ============================================ */

/* Link Hover com Underline Animado */
.animated-link {
    position: relative;
    display: inline-block;
}

.animated-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-gold, linear-gradient(135deg, #d4a574 0%, #e8a87c 100%));
    transition: width 0.3s ease;
}

.animated-link:hover::after {
    width: 100%;
}

/* Card Hover Effect */
.hover-lift {
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                box-shadow 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(31, 41, 55, 0.15);
}

/* Button Ripple Effect */
.btn-ripple {
    position: relative;
    overflow: hidden;
}

.btn-ripple::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn-ripple:active::after {
    width: 300px;
    height: 300px;
}

/* ============================================
   LOADING STATES
   ============================================ */

.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 24px;
    margin: -12px 0 0 -12px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(
        90deg,
        rgba(200, 200, 200, 0.2) 25%,
        rgba(200, 200, 200, 0.5) 50%,
        rgba(200, 200, 200, 0.2) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
}

/* ============================================
   SCROLL-TRIGGERED ANIMATIONS
   ============================================ */

/* Elementos que aparecem ao scroll */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger para grupos */
.stagger-group .reveal:nth-child(1) { transition-delay: 0.1s; }
.stagger-group .reveal:nth-child(2) { transition-delay: 0.2s; }
.stagger-group .reveal:nth-child(3) { transition-delay: 0.3s; }
.stagger-group .reveal:nth-child(4) { transition-delay: 0.4s; }
.stagger-group .reveal:nth-child(5) { transition-delay: 0.5s; }

/* ============================================
   MICRO-INTERACTIONS
   ============================================ */

/* Focus Ring Animado */
.focus-ring:focus {
    outline: none;
    box-shadow: 
        0 0 0 3px rgba(79, 184, 151, 0.3),
        0 0 0 6px rgba(79, 184, 151, 0.1);
    transition: box-shadow 0.2s ease;
}

/* Toggle Switch Animation */
.toggle-switch {
    transition: background-color 0.3s ease;
}

.toggle-switch::before {
    transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* ============================================
   PERFORMANCE OPTIMIZATION
   ============================================ */

/* GPU Acceleration para animações pesadas */
.gpu-accelerated {
    transform: translateZ(0);
    will-change: transform;
    backface-visibility: hidden;
}

/* Desabilita animações para preferência do usuário */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .whatsapp-float {
        animation: none;
    }
    
    .pulse,
    .float,
    .glow {
        animation: none;
    }
    
    .reveal {
        opacity: 1;
        transform: none;
    }
}
