/* ============================================
   TRANSIÇÕES SUAVES AVANÇADAS
   ============================================ */

/* Transições em todos os elementos interativos */
button, 
a, 
input, 
textarea, 
select,
.card,
.btn,
.nav-link {
    transition: all 0.3s cubic-bezier(0.23, 1, 0.320, 1) !important;
}

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

/* Transição de fade entre páginas */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

body {
    animation: fadeIn 0.6s ease-out;
}

/* Transição suave para seções */
.section {
    animation: fadeIn 0.8s ease-out backwards;
}

/* Diferentes delays para efeito staggered */
.section:nth-child(1) { animation-delay: 0s; }
.section:nth-child(2) { animation-delay: 0.1s; }
.section:nth-child(3) { animation-delay: 0.2s; }
.section:nth-child(4) { animation-delay: 0.3s; }
.section:nth-child(5) { animation-delay: 0.4s; }

/* Smooth color transitions */
.bg-primary,
.bg-light,
.card,
.btn {
    transition: background-color 0.4s ease, background 0.4s ease !important;
}

/* Smooth shadow transitions */
.card,
.btn,
.video-wrapper {
    transition: box-shadow 0.4s cubic-bezier(0.23, 1, 0.320, 1) !important;
}

/* Smooth transform transitions */
.card,
.btn,
img,
.about-image img {
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.320, 1) !important;
}

/* Efeito de fade em hover */
a {
    position: relative;
}

a::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: currentColor;
    transition: width 0.4s ease;
}

a:hover::before {
    width: 100%;
}

/* Transição suave para inputs */
input:focus,
textarea:focus,
select:focus {
    transition: border-color 0.3s ease, box-shadow 0.3s ease !important;
}

/* Transição suave para elementos com classe "hover" */
.shadow-hover {
    transition: box-shadow 0.4s cubic-bezier(0.23, 1, 0.320, 1);
}

/* Transição suave para ícones */
i,
svg {
    transition: color 0.3s ease, transform 0.3s ease !important;
}

/* Transição para textos */
p, 
h1, h2, h3, h4, h5, h6,
li {
    transition: color 0.3s ease !important;
}

/* Efeito de loading suave */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.loading {
    animation: pulse 1.5s ease-in-out infinite;
}

/* Transição de opacity para imagens */
img {
    transition: opacity 0.4s ease;
}

img:not([src]) {
    opacity: 0.5;
}

img[src] {
    opacity: 1;
}

/* Transição suave para hover em listas */
li {
    transition: all 0.3s cubic-bezier(0.23, 1, 0.320, 1);
}

/* Transição suave no footer */
footer {
    transition: background-color 0.4s ease !important;
}

footer a {
    transition: color 0.3s ease !important;
}

/* Transição suave em badges */
.badge {
    transition: all 0.3s ease;
}

/* Transição suave em alerts */
.alert {
    transition: opacity 0.4s ease, transform 0.4s ease;
}

/* Transição suave em modals */
.modal {
    transition: opacity 0.4s ease, transform 0.4s ease;
}

/* Transição suave em tooltips */
.tooltip {
    transition: opacity 0.3s ease;
}

/* Transição suave para backdrop */
.modal-backdrop {
    transition: opacity 0.3s ease;
}

/* Transição entre cores de tema */
@media (prefers-color-scheme: dark) {
    * {
        transition: background-color 0.4s ease, color 0.4s ease, border-color 0.4s ease !important;
    }
}

/* Respecto por preferência 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;
        scroll-behavior: auto !important;
    }
}

/* ============================================
   HOVER EFFECTS SUAVES
   ============================================ */

/* Hover effect em cards com efeito de "lift" */
.card {
    will-change: transform, box-shadow;
}

.card:hover {
    transform: translateY(-8px);
}

/* Hover effect em botões com ripple */
.btn {
    will-change: transform, box-shadow;
    position: relative;
    overflow: hidden;
}

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

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

/* Hover effect em links */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: currentColor;
    transform: translateX(-50%);
    transition: width 0.4s ease;
}

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

/* ============================================
   TRANSIÇÃO DE PÁGINA
   ============================================ */

/* Quando sair da página */
a[href]:not([href^="#"]) {
    position: relative;
}

/* Loading state */
.is-loading {
    opacity: 0.6;
    pointer-events: none;
}

/* ============================================
   ANIMAÇÃO DE SCROLL
   ============================================ */

/* Suavidade no scroll */
.smooth-scroll {
    scroll-behavior: smooth;
}

/* ============================================
   RESPONSIVIDADE
   ============================================ */

@media (max-width: 768px) {
    /* Reduzir transições em mobile para melhor performance */
    * {
        transition-duration: 0.2s !important;
    }

    .btn:hover::after {
        width: 200px;
        height: 200px;
    }
}
