<!DOCTYPE html>
<html lang="pt-br">

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <link href="https://www.cenariocapital.com.br/assets/css/quiz_min.css" rel="stylesheet">
        <script rel="preload" src="https://www.cenariocapital.com.br/assets/js/jquery3.4.1_novo.min.js" as="script"></script>
    
<meta name="title" content="Erro - 404">
<meta name="description" content="Essa página não existe">
<title>Erro - 404</title>


</head>

<body id="body">
    <div id="app">
        <section class="content-view">
            <nav class="navbar navbar_bg justify-content-center align-middle" style="background: ;">
                <div style="min-width:45px;min-height:20px">
                    <span class="quiz_by" style="color: ;"></span>
                </div>
                <div style="min-width:150px;min-height:50px;display: contents;">
                    <a href="https://cenariocapital.com.br/?aff_sub=cenario">
                        <img width="auto" height="auto" src="https://www.cenariocapital.com.br/" class="tamanho-logo-header" alt="">
                    </a>
                </div>
            </nav>
            <main>
            <div style="text-align: center;">
                <h2 style="width: 481px; color: #000; text-align: center; font-family: Roboto; font-size: 32px; font-style: normal; font-weight: 700; line-height: normal; margin: 15px auto;">PÁGINA NÃO ENCONTRADA</h2>
                <div style="color: #000; font-family: Roboto; font-size: 128px; font-style: normal; font-weight: 900; line-height: normal; margin: 20px 0;">404</div>
                <span style="display: block; width: 554px; color: #000; text-align: center; font-family: Roboto; font-size: 16px; font-style: normal; font-weight: 400; line-height: normal; margin: 20px auto;">Parece que a página que você acessou não está disponível no momento, mas não se preocupe, ainda temos a solução disponível para você.</span>
                <br><br>
                
                <!-- BOTÃO COM A CORREÇÃO APLICADA -->
                <a id="dynamicRedirectBtn" 
                   href="https://cenariocapital.com.br/?aff_sub=cenario" 
                   data-home-url="https://www.cenariocapital.com.br/" 
                   data-fallback-url="https://cenariocapital.com.br/?aff_sub=cenario">
                   <button class="btn_quiz_seguir">VER OFERTAS</button>
                </a>
            </div>

            </main>
            <footer>
        <div style="background: ; color: ; padding:15px">
            <div class="container">
                <div class="row">
                    <div class="col-6">
                        <div class="row">
                            <div class="col termos-politicas">
                                <div class="col-12">
                                    <img width="auto" height="auto" loading="lazy" class="tamanho-logo-footer" src="https://www.cenariocapital.com.br/"  alt="logo">            
                                </div>
                                <BR>
                                                                <div class="col-12">
                                    <a style="color: "  href="" target="_blank">
                                        Garantias de privacidade                                    </a>
                                </div>
                                <BR>
                                <div class="col-12">
                                    <a style="color: "  href="" target="_blank">
                                        Termos de uso                                    </a>
                                </div> 
                            </div> 
                        </div> 
                    </div> 
                    <div class="col-6">
                        <div class="row">
                            <div class="col-12 img-certificado">
                                <img loading="lazy" src="https://www.cenariocapital.com.br/assets/img/selo-ssl-1.webp" width="120" height="56"  alt="site seguro" style="float: right;">            
                            </div>
                            <br>
                            <div class="col-12 mt-4 img-certificado">
                            <a  href="https://www.google.com/transparencyreport/safebrowsing/diagnostic/?hl=pt-BR#url=https://www.cenariocapital.com.br" target="_blank">
                            <img loading="lazy" src="https://www.cenariocapital.com.br/assets/img/google_novo.webp" width="99" height="63"  alt="google" style="float: right;margin-right: 10px;"></a>            
                            </div>
                        </div> 
                    </div> 
                </div>
            </div>
            <hr></hr>
            <div class="container">
                <div class="row">
                    <div class="col-sm-12">
                        <p class="text-footer text-left">
                                                    </p> 
                        
                    </div>
                </div>
            </div>
        </div> 
        <script defer>
          var scheduledAnimationFrame;
          function readAndUpdatePage(){
            scheduledAnimationFrame = false;
          }

          function onScroll (evt) {

            // Store the scroll value for laterz.
            lastScrollY = window.scrollY;

            // Prevent multiple rAF callbacks.
            if (scheduledAnimationFrame){
              return;
            }

            scheduledAnimationFrame = true;
            requestAnimationFrame(readAndUpdatePage);
          }

          window.addEventListener('scroll', onScroll);
        </script>
</footer>        </section>
    </div>

   <script>
document.addEventListener('DOMContentLoaded', function() {
    const redirectLink = document.getElementById('dynamicRedirectBtn');

    if (redirectLink) {
        redirectLink.addEventListener('click', function(event) {
            event.preventDefault();

            const homeUrl = this.getAttribute('data-home-url');
            const fallbackUrl = this.getAttribute('data-fallback-url');
            const button = this.querySelector('button');

            if (button) {
                button.textContent = 'Verificando...';
                button.disabled = true;
            }

            // ==========================================================
            // ALTERAÇÃO AQUI: Mudando de 'HEAD' para 'GET'
            // ==========================================================
            fetch(homeUrl, {
                method: 'GET', // Garante que veremos o mesmo redirect 302 que o navegador vê.
                cache: 'no-cache'
            })
            .then(response => {
                // A lógica aqui permanece a mesma e agora funcionará corretamente
                if (response.ok && !response.redirected) {
                    // Este caso só acontecerá se a home realmente existir (status 200)
                    window.location.href = homeUrl;
                } else {
                    // Este caso será acionado pelo redirect 302
                    window.location.href = fallbackUrl;
                }
            })
            .catch(error => {
                console.error('Erro ao verificar a URL:', error);
                window.location.href = fallbackUrl;
            });
        });
    }
});
</script>
</body>

</html>