/* Estilos customizados para o site VA Sistemas */

/* Animações suaves */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* Scroll suave */
html {
    scroll-behavior: smooth;
}

/* Estilos para o header fixo */
header {
    transition: all 0.3s ease;
}

header.scrolled {
    background-color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

/* Menu mobile */
#mobileMenu {
    transition: all 0.3s ease;
}

#mobileMenu.hidden {
    display: none;
}

#mobileMenu:not(.hidden) {
    display: block;
}

/* Estilos para ícones SVG */
svg {
    display: inline-block;
    vertical-align: middle;
}

/* Hover effects */
.hover-lift:hover {
    transform: translateY(-2px);
    transition: transform 0.2s ease;
}

/* Formulário */
input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #93cb60;
    box-shadow: 0 0 0 3px rgba(147, 203, 96, 0.1);
}

/* Botões */
button,
a.button {
    transition: all 0.2s ease;
}

button:hover,
a.button:hover {
    transform: translateY(-1px);
}

/* Cards */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* Responsividade adicional */
@media (max-width: 640px) {
    .clip-path-slant-bottom {
        clip-path: none;
    }
}

/* Animações de entrada */
.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);
}

/* Efeitos de active no header */
nav a.active {
    position: relative;
}

nav a.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #93cb60, #649697);
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: scaleX(0);
    }
    to {
        transform: scaleX(1);
    }
}

/* Modal animations */
#systemModal {
    animation: fadeIn 0.3s ease-out;
}

#modalContent {
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(20px) scale(0.95);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

/* Hover effects para cards do modal */
.group:hover {
    transform: translateY(-4px);
}

/* Smooth transitions */
* {
    transition-property: color, background-color, border-color, transform, opacity;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

/* Melhorias no header active */
.nav-link {
    position: relative;
    color: #93cb60;
    transition: color 0.3s ease;
    display: inline-block;
    padding-bottom: 0.25rem;
}

.nav-link span {
    position: relative;
    z-index: 1;
    display: inline-block;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #93cb60;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 1px;
}

.nav-link:hover {
    color: #649697;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link.active {
    color: #93cb60;
    font-weight: 700;
}

.nav-link.active::after {
    width: 100% !important;
    background: #93cb60;
    height: 2px;
}

/* Melhorias no modal */
#systemModal {
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

#systemModal:not(.hidden) {
    opacity: 1;
}

#systemModal.hidden {
    display: none !important;
}

#modalContent {
    will-change: transform, opacity;
    transform-origin: center;
}

/* Efeitos de hover nos cards do modal */
.group:hover .group-hover\:scale-110 {
    transform: scale(1.1);
}

/* Melhorias no menu mobile */
#mobileMenu a.border-l-4 {
    padding-left: calc(1rem - 4px);
}

/* ============================================
   ANIMAÇÕES FADE IN/OUT INTERATIVAS
   ============================================ */

/* Estado inicial - elementos invisíveis */
.fade-in-element {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), 
                transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Estado visível */
.fade-in-element.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Fade in da esquerda */
.fade-in-left {
    opacity: 0;
    transform: translateX(-40px);
    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-left.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Fade in da direita */
.fade-in-right {
    opacity: 0;
    transform: translateX(40px);
    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-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Fade in com escala */
.fade-in-scale {
    opacity: 0;
    transform: scale(0.9);
    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-scale.visible {
    opacity: 1;
    transform: scale(1);
}

/* Fade in com rotação sutil */
.fade-in-rotate {
    opacity: 0;
    transform: translateY(30px) rotate(-2deg);
    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-rotate.visible {
    opacity: 1;
    transform: translateY(0) rotate(0deg);
}

/* Delays escalonados */
.fade-delay-100 {
    transition-delay: 0.1s;
}

.fade-delay-200 {
    transition-delay: 0.2s;
}

.fade-delay-300 {
    transition-delay: 0.3s;
}

.fade-delay-400 {
    transition-delay: 0.4s;
}

.fade-delay-500 {
    transition-delay: 0.5s;
}

.fade-delay-600 {
    transition-delay: 0.6s;
}

/* Fade out quando sai da viewport (opcional) */
.fade-in-element.fade-out {
    opacity: 0;
    transform: translateY(20px);
}

/* Animação de entrada rápida para hero */
.fade-in-fast {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

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

/* Animação de entrada lenta para elementos importantes */
.fade-in-slow {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 1.2s cubic-bezier(0.4, 0, 0.2, 1), 
                transform 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Prevenir animações em telas muito pequenas ou quando reduzido motion */
@media (prefers-reduced-motion: reduce) {
    .fade-in-element,
    .fade-in-left,
    .fade-in-right,
    .fade-in-scale,
    .fade-in-rotate,
    .fade-in-fast,
    .fade-in-slow {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
}
