/* ========================================
   INFOLUX INFORMÁTICA - Microanimações
   Animações Sutis e Elegantes
   ======================================== */

/* ========================================
   ANIMAÇÕES KEYFRAMES
   ======================================== */

/* Fade In Suave */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Pulse Suave */
@keyframes pulseSuave {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
}

/* Glow Pulsante */
@keyframes glowPulse {
    0%, 100% {
        box-shadow: 0 0 20px rgba(220, 38, 38, 0.3);
    }
    50% {
        box-shadow: 0 0 40px rgba(220, 38, 38, 0.5);
    }
}

/* Float Suave */
@keyframes floatSuave {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

/* Shimmer Effect */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

/* Rotate Suave */
@keyframes rotateSuave {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Bounce Suave */
@keyframes bounceSuave {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px);
    }
}

/* Scale In */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ========================================
   HOVER MICROANIMAÇÕES
   ======================================== */

/* Botões - Hover elegante */
.btn {
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn:hover::after {
    width: 300px;
    height: 300px;
}

/* Links - Underline animado */
.footer-section a,
.categoria-card ul li a {
    position: relative;
}

.footer-section a::after,
.categoria-card ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--cor-primaria);
    transition: width 0.3s ease;
}

.footer-section a:hover::after,
.categoria-card ul li a:hover::after {
    width: 100%;
}

/* Cards - Lift Effect */
.categoria-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.categoria-card:hover {
    transform: translateY(-5px);
}

/* ========================================
   ELEMENTOS INTERATIVOS
   ======================================== */

/* Logo Float */
.logo {
    animation: floatSuave 4s ease-in-out infinite;
}

/* Header H2 Glow no hover */
.section-header h2:hover {
    animation: glowPulse 2s ease-in-out infinite;
}

/* ========================================
   SCROLL ANIMATIONS (aplicadas via JS)
   ======================================== */

/* Classe para elementos que aparecem no scroll */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Delay escalonado para elementos em lista */
.animate-on-scroll.delay-1 { transition-delay: 0.1s; }
.animate-on-scroll.delay-2 { transition-delay: 0.2s; }
.animate-on-scroll.delay-3 { transition-delay: 0.3s; }
.animate-on-scroll.delay-4 { transition-delay: 0.4s; }
.animate-on-scroll.delay-5 { transition-delay: 0.5s; }

/* ========================================
   ÍCONE WHATSAPP ANIMAÇÃO
   ======================================== */

.whatsapp-float a {
    animation: bounceSuave 2s ease-in-out infinite;
}

.whatsapp-float a:hover {
    animation: none;
}

/* ========================================
   EFEITOS DE TEXTO
   ======================================== */

/* Gradient Text Animation */
.hero h1 {
    background-size: 200% auto;
    animation: shimmer 3s linear infinite;
}

/* ========================================
   LOADING STATES (para uso futuro)
   ======================================== */

.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top-color: var(--cor-primaria);
    border-radius: 50%;
    animation: rotateSuave 0.8s linear infinite;
}

/* ========================================
   FOCUS STATES ANIMADOS
   ======================================== */

.btn:focus,
a:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.3);
}

.btn:focus-visible,
a:focus-visible {
    outline: 2px solid var(--cor-primaria);
    outline-offset: 2px;
}

/* ========================================
   TRANSIÇÕES SUAVES GLOBAIS
   ======================================== */

/* Transição suave para mudança de cor de fundo */
* {
    transition-property: background-color, border-color, color, fill, stroke;
    transition-duration: 0.2s;
    transition-timing-function: ease;
}

/* Exceções - elementos que não devem ter transição automática */
.hero::before,
.hero::after,
.whatsapp-float::before {
    transition: none;
}

/* ========================================
   EFEITOS DE PARALLAX SUAVE (CSS only)
   ======================================== */

.hero {
    background-attachment: fixed;
}

@media (max-width: 768px) {
    .hero {
        background-attachment: scroll;
    }
}

/* ========================================
   RIPPLE EFFECT
   ======================================== */

.ripple {
    position: relative;
    overflow: hidden;
}

.ripple::before {
    content: '';
    position: absolute;
    top: var(--ripple-y, 50%);
    left: var(--ripple-x, 50%);
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.5s ease, height 0.5s ease, opacity 0.5s ease;
    opacity: 0;
}

.ripple:active::before {
    width: 200px;
    height: 200px;
    opacity: 1;
}

/* ========================================
   SKELETON LOADING
   ======================================== */

.skeleton {
    background: linear-gradient(
        90deg,
        var(--bg-dark-lighter) 25%,
        var(--cor-prata-dark) 50%,
        var(--bg-dark-lighter) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--borda-radius-sm);
}

/* ========================================
   DECORATIVE ELEMENTS
   ======================================== */

/* Linha animada decorativa */
.linha-decorativa {
    height: 2px;
    background: linear-gradient(
        90deg,
        transparent,
        var(--cor-primaria),
        transparent
    );
    background-size: 200% 100%;
    animation: shimmer 2s linear infinite;
}

/* Ponto pulsante */
.ponto-status {
    width: 10px;
    height: 10px;
    background: var(--whatsapp-verde);
    border-radius: 50%;
    animation: pulseSuave 2s ease-in-out infinite;
}

/* ========================================
   PREFERÊNCIAS DE MOVIMENTO REDUZIDO
   ======================================== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .logo,
    .whatsapp-float a,
    .hero h1 {
        animation: none;
    }
    
    .animate-on-scroll {
        opacity: 1;
        transform: none;
    }
}

