/* ==========================================================================
   CTA Tecnologia - Custom CSS
   Animações e efeitos especiais para complementar TailwindCSS
   ========================================================================== */

/* Variáveis CSS Customizadas */
:root {
    --primary-color: #152765;
    --primary-light: #1e3a8a;
    --primary-dark: #0f1729;
    --accent-color: #3b82f6;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --dark-bg: #0a0a0a;
    --dark-surface: #1a1a1a;
    --glass-bg: rgba(21, 39, 101, 0.1);
    --glass-border: rgba(21, 39, 101, 0.2);
}

/* Animações Keyframes */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 20px rgba(21, 39, 101, 0.3); }
    50% { box-shadow: 0 0 40px rgba(21, 39, 101, 0.6); }
}

@keyframes slide-in-left {
    0% {
        opacity: 0;
        transform: translateX(-50px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slide-in-right {
    0% {
        opacity: 0;
        transform: translateX(50px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slide-in-up {
    0% {
        opacity: 0;
        transform: translateY(50px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scale-in {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes rotate-in {
    0% {
        opacity: 0;
        transform: rotate(-10deg) scale(0.9);
    }
    100% {
        opacity: 1;
        transform: rotate(0deg) scale(1);
    }
}

@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes particle-float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
        opacity: 0.7;
    }
    33% {
        transform: translateY(-20px) rotate(120deg);
        opacity: 1;
    }
    66% {
        transform: translateY(-10px) rotate(240deg);
        opacity: 0.8;
    }
}

@keyframes text-glow {
    0%, 100% {
        text-shadow: 0 0 10px rgba(21, 39, 101, 0.5);
    }
    50% {
        text-shadow: 0 0 20px rgba(21, 39, 101, 0.8), 0 0 30px rgba(21, 39, 101, 0.6);
    }
}

/* Classes de Animação */
.animate-float {
    animation: float 3s ease-in-out infinite;
}

.animate-pulse-glow {
    animation: pulse-glow 2s ease-in-out infinite;
}

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

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

.animate-slide-in-up {
    animation: slide-in-up 0.8s ease-out forwards;
}

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

.animate-rotate-in {
    animation: rotate-in 0.8s ease-out forwards;
}

.animate-gradient {
    background-size: 200% 200%;
    animation: gradient-shift 3s ease infinite;
}

.animate-particle {
    animation: particle-float 4s ease-in-out infinite;
}

.animate-text-glow {
    animation: text-glow 2s ease-in-out infinite;
}

/* Efeitos de Hover Customizados */
.hover-lift {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.hover-glow {
    transition: all 0.3s ease;
}

.hover-glow:hover {
    box-shadow: 0 0 30px rgba(21, 39, 101, 0.6);
    transform: scale(1.02);
}

.hover-slide {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.hover-slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.hover-slide:hover::before {
    left: 100%;
}

/* Efeitos de Glass/Blur */
.glass-effect {
    background: rgba(21, 39, 101, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(21, 39, 101, 0.2);
}

.glass-card {
    background: rgba(26, 26, 26, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Gradientes Customizados */
.gradient-primary {
    background: linear-gradient(135deg, #152765 0%, #1e3a8a 50%, #3b82f6 100%);
}

.gradient-dark {
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 50%, #2a2a2a 100%);
}

.gradient-text {
    background: linear-gradient(135deg, #152765, #3b82f6, #60a5fa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Efeitos de Partículas */
.particles-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(21, 39, 101, 0.6);
    border-radius: 50%;
    animation: particle-float 6s ease-in-out infinite;
}

.particle:nth-child(2) { animation-delay: -1s; }
.particle:nth-child(3) { animation-delay: -2s; }
.particle:nth-child(4) { animation-delay: -3s; }
.particle:nth-child(5) { animation-delay: -4s; }

/* Scrollbar Customizada */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #1a1a1a;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #152765, #1e3a8a);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #1e3a8a, #3b82f6);
}

/* Efeitos de Loading */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(21, 39, 101, 0.3);
    border-top: 4px solid #152765;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Efeitos de Texto */
.text-shadow-glow {
    text-shadow: 0 0 10px rgba(21, 39, 101, 0.5);
}

.text-shadow-strong {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

/* Botões Customizados */
.btn-primary-custom {
    background: linear-gradient(135deg, #152765, #1e3a8a);
    border: none;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary-custom::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-primary-custom:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(21, 39, 101, 0.4);
}

.btn-primary-custom:hover::before {
    left: 100%;
}

/* Responsividade para Animações */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Utilitários de Performance */
.will-change-transform {
    will-change: transform;
}

.will-change-opacity {
    will-change: opacity;
}

.gpu-accelerated {
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
}

/* Advanced Modern Design Styles */

/* Enhanced Gradient Animations */
@keyframes gradient-x {
    0%, 100% {
        background-size: 200% 200%;
        background-position: left center;
    }
    50% {
        background-size: 200% 200%;
        background-position: right center;
    }
}

@keyframes gradient-y {
    0%, 100% {
        background-size: 400% 400%;
        background-position: center top;
    }
    50% {
        background-size: 400% 400%;
        background-position: center bottom;
    }
}

@keyframes gradient-xy {
    0%, 100% {
        background-size: 400% 400%;
        background-position: left center;
    }
    25% {
        background-size: 400% 400%;
        background-position: center top;
    }
    50% {
        background-size: 400% 400%;
        background-position: right center;
    }
    75% {
        background-size: 400% 400%;
        background-position: center bottom;
    }
}

/* Advanced Glow Effects */
@keyframes glow-pulse {
    0%, 100% {
        box-shadow: 
            0 0 20px rgba(21, 39, 101, 0.4),
            0 0 40px rgba(21, 39, 101, 0.2),
            inset 0 0 20px rgba(21, 39, 101, 0.1);
    }
    50% {
        box-shadow: 
            0 0 30px rgba(21, 39, 101, 0.6),
            0 0 60px rgba(21, 39, 101, 0.4),
            inset 0 0 30px rgba(21, 39, 101, 0.2);
    }
}

@keyframes text-glow-advanced {
    0%, 100% {
        text-shadow: 
            0 0 10px rgba(21, 39, 101, 0.8),
            0 0 20px rgba(21, 39, 101, 0.6),
            0 0 30px rgba(21, 39, 101, 0.4);
    }
    50% {
        text-shadow: 
            0 0 20px rgba(21, 39, 101, 1),
            0 0 30px rgba(21, 39, 101, 0.8),
            0 0 40px rgba(21, 39, 101, 0.6),
            0 0 50px rgba(59, 130, 246, 0.4);
    }
}

/* Modern Button Effects */
.btn-modern {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #152765, #1e3a8a, #3b82f6);
    background-size: 200% 200%;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    transition: left 0.6s ease;
}

.btn-modern:hover {
    background-position: right center;
    transform: translateY(-2px) scale(1.02);
    box-shadow: 
        0 10px 30px rgba(21, 39, 101, 0.4),
        0 0 20px rgba(21, 39, 101, 0.3);
}

.btn-modern:hover::before {
    left: 100%;
}

/* Glass Morphism Effects */
.glass-morphism {
    background: rgba(21, 39, 101, 0.08);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(21, 39, 101, 0.2);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.glass-card-modern {
    background: rgba(26, 26, 26, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 0 20px rgba(21, 39, 101, 0.1);
}

/* Advanced Particle System */
.particle-field {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.particle-modern {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    animation: particle-drift 8s linear infinite;
    opacity: 0;
}

@keyframes particle-drift {
    0% {
        transform: translateY(100vh) scale(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) scale(1);
        opacity: 0;
    }
}

/* Advanced Animation Classes */
.animate-gradient-x {
    animation: gradient-x 3s ease infinite;
}

.animate-gradient-y {
    animation: gradient-y 3s ease infinite;
}

.animate-gradient-xy {
    animation: gradient-xy 4s ease infinite;
}

.animate-glow-pulse {
    animation: glow-pulse 2s ease-in-out infinite;
}

.animate-text-glow-advanced {
    animation: text-glow-advanced 2.5s ease-in-out infinite;
}

/* Modern Typography Effects */
.text-gradient-modern {
    background: linear-gradient(
        135deg,
        #152765 0%,
        #3b82f6 25%,
        #60a5fa 50%,
        #3b82f6 75%,
        #152765 100%
    );
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-x 3s ease infinite;
}

/* Advanced Hover States */
.hover-lift-strong {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-lift-strong:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.4),
        0 0 30px rgba(21, 39, 101, 0.3);
}

.hover-glow-strong {
    transition: all 0.4s ease;
    position: relative;
}

.hover-glow-strong::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(
        45deg,
        #152765,
        #3b82f6,
        #152765
    );
    border-radius: inherit;
    opacity: 0;
    z-index: -1;
    transition: opacity 0.4s ease;
}

.hover-glow-strong:hover::after {
    opacity: 1;
}

.hover-glow-strong:hover {
    transform: scale(1.03);
}

/* Performance Optimizations */
.optimize-animations {
    will-change: transform, opacity;
    backface-visibility: hidden;
    perspective: 1000px;
}

/* Responsive Animation Control */
@media (max-width: 768px) {
    .animate-float,
    .animate-glow-pulse,
    .animate-gradient-xy {
        animation-duration: 4s;
    }
}

@media (prefers-reduced-motion: reduce) {
    .animate-float,
    .animate-glow-pulse,
    .animate-gradient-x,
    .animate-gradient-y,
    .animate-gradient-xy,
    .animate-text-glow-advanced {
        animation: none;
    }
}

/* Modern Scrollbar for Webkit */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(26, 26, 26, 0.8);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #152765, #3b82f6);
    border-radius: 5px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #1e3a8a, #60a5fa);
    box-shadow: 0 0 10px rgba(21, 39, 101, 0.5);
}