/* =====================================================================
   MARTEC — Camada de animação do portal
   Usa animate.css 4.1.1 (styles/animate.min.css) + efeitos suaves próprios.
   O JS (martec_animate.js) aplica as classes; sem JS nada fica escondido.
   ===================================================================== */

/* Estado "aguardando entrar na tela" (colocado pelo JS) */
html .mtc-pre { opacity: 0; }

/* Efeitos próprios, de curta distância.
   (os fadeInUp/Left do animate.css deslocam 100% do tamanho do elemento:
   em cards grandes vira "voo" e pode gerar barra de rolagem horizontal) */
@keyframes mtcFxUp   { from { opacity: 0; transform: translate3d(0, 26px, 0); }  to { opacity: 1; transform: translate3d(0, 0, 0); } }
@keyframes mtcFxLeft { from { opacity: 0; transform: translate3d(-30px, 0, 0); } to { opacity: 1; transform: translate3d(0, 0, 0); } }
@keyframes mtcFxZoom { from { opacity: 0; transform: scale(.92); }               to { opacity: 1; transform: scale(1); } }

.animate__animated.mtc-fx-up   { animation-name: mtcFxUp;   animation-timing-function: cubic-bezier(.22, 1, .36, 1); }
.animate__animated.mtc-fx-left { animation-name: mtcFxLeft; animation-timing-function: cubic-bezier(.22, 1, .36, 1); }
.animate__animated.mtc-fx-zoom { animation-name: mtcFxZoom; animation-timing-function: cubic-bezier(.22, 1, .36, 1); }

/* Carrossel da home: textos e imagem do slide ativo entram em cascata.
   --mtc-intro (definida pelo JS só nos primeiros segundos) espera o #conteudo terminar de subir. */
.owl-carousel .owl-item.active .item_img {
    animation: mtcFxZoom .9s cubic-bezier(.22, 1, .36, 1) calc(var(--mtc-intro, 0s) + .05s) backwards;
}
.owl-carousel .owl-item.active h1.slide_title {
    animation: mtcFxLeft .8s cubic-bezier(.22, 1, .36, 1) calc(var(--mtc-intro, 0s) + .15s) backwards;
}
.owl-carousel .owl-item.active h2.slide_title {
    animation: mtcFxUp .8s cubic-bezier(.22, 1, .36, 1) calc(var(--mtc-intro, 0s) + .30s) backwards;
}
.owl-carousel .owl-item.active .slide_chamada {
    animation: mtcFxUp .8s cubic-bezier(.22, 1, .36, 1) calc(var(--mtc-intro, 0s) + .45s) backwards;
}

/* Acessibilidade: sem movimento para quem pediu */
@media (prefers-reduced-motion: reduce) {
    html .mtc-pre { opacity: 1; }
    .animate__animated,
    .owl-carousel .owl-item.active .item_img,
    .owl-carousel .owl-item.active .slide_title,
    .owl-carousel .owl-item.active .slide_chamada { animation: none !important; }
}
