<!DOCTYPE html>
<html lang="en">
    <head>
        <link rel="preconnect" href="https://wrappers.highleverage.dev" crossorigin>
        <link rel="preconnect" href="https://securepubads.g.doubleclick.net" crossorigin>
        <link rel="preload" href="https://securepubads.g.doubleclick.net/tag/js/gpt.js" as="script">
        <link rel="preload" href="https://wrappers.highleverage.dev/assets/wrappers/clevernesting.com.js" as="script">
        <link rel="preload" href="https://wrappers.highleverage.dev/assets/wrappers/modal.js" as="script">
        <script async src="https://securepubads.g.doubleclick.net/tag/js/gpt.js"></script>
        <script src="https://wrappers.highleverage.dev/assets/wrappers/modal.js"></script>
        <script src="https://wrappers.highleverage.dev/assets/wrappers/clevernesting.com.js"></script>
        <script>
            (function () {
                document.addEventListener("DOMContentLoaded", function () {
                    // Função para verificar se o usuário está em um dispositivo desktop
                    function isDesktop() {
                        return window.innerWidth >= 1024; // Ajuste este valor conforme o breakpoint desejado
                    }

                    // Função para atualizar as divs de anúncios para a versão desktop
                    function updateAdDivsForDesktop() {
                        var adDivs = document.querySelectorAll(".hs-ad");

                        // Configurações para anúncios desktop (em sequência)
                        var desktopAds = [
                            {
                                hsCode: "clevernesting_v2_desktop_top_{source}",
                                hsSizes: "[[300,250],[336,280],[728,90]]",
                            },
                            {
                                hsCode: "clevernesting_v2_desktop_mid1_{source}",
                                hsSizes: "[[300,250],[336,280]]",
                            },
                            {
                                hsCode: "clevernesting_v2_desktop_mid2_{source}",
                                hsSizes: "[[300,250],[336,280]]",
                            },
                        ];

                        // Atualiza cada div de anúncio com a configuração correspondente
                        adDivs.forEach(function (adDiv, index) {
                            if (desktopAds[index]) {
                                adDiv.setAttribute("hs-code", desktopAds[index].hsCode);
                                adDiv.setAttribute("hs-sizes", desktopAds[index].hsSizes);
                            }
                        });
                    }

                    // Verificação inicial ao carregar a página
                    if (isDesktop()) {
                        updateAdDivsForDesktop();
                    }
                });
            })();
        </script>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <title>Clevernesting - Build wealth with smart choices.</title>
        <link rel="canonical" href="https://clevernesting.com/">
        <meta name="description" content="Clevernesting - Build wealth with smart choices.">
        <meta property="og:title" content="Clevernesting - Build wealth with smart choices.">
        <meta property="og:description" content="Clevernesting - Build wealth with smart choices.">
        <meta property="og:image" content="https://clevernesting.com/public/img/logo.svg">
        <meta property="og:url" content="https://clevernesting.com/">
        <meta property="og:type" content="website">
        <meta property="og:locale" content="en">
        <link rel="stylesheet" href="/public/css/index.css">
        <!-- async CSS (optionally increase loading priority with fetchpriority="high") -->
        <link
            rel="stylesheet"
            href="https://fonts.googleapis.com/css2?family=Ubuntu+Sans:ital,wght@0,100..800;1,100..800&amp;display=swap"
            media="print"
            onload="this.onload=null;this.removeAttribute('media');"
            fetchpriority="high"
        >
        <!-- no-JS fallback -->
        <noscript>
            <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Ubuntu+Sans:ital,wght@0,100..800;1,100..800&amp;display=swap">
        </noscript>
        <script>
            //enviroment constants
            const ENVIROMENT_CONSTANTS = {
                SHOW_IFRAMES: true,
            }
        </script>
        <!-- custom headers -->
    </head>
    <body>
        <header class="site-header">
            <div class="container header-container">
                <a href="/" class="logo">
                    <img src="/public/img/logo.svg" style="height: 35px;">
                </a>
                <nav class="main-nav">
                    <!-- Mobile Search Form -->
                    <form class="mobile-search-form search-form" id="search-form">
                        <input
                            type="text"
                            id="search-input-mobile"
                            placeholder="Search..."
                            aria-label="Search"
                        >
                        <button type="submit" id="search-btn-mobile">Search</button>
                    </form>
                    <ul>
                        <li class="menu__item ml-md-3"><a class="menuLink" href="/">Home</a></li>
<li class="menu__item ml-md-3"><a class="menuLink" href="/c/financial-handbook/">Financial Handbook</a></li>
<li class="menu__item ml-md-3"><a class="menuLink" href="/c/investments/">Investments</a></li>
<li class="menu__item ml-md-3"><a class="menuLink" href="/c/loans/">Loans</a></li>
<li class="menu__item ml-md-3"><a class="menuLink" href="/c/credit-cards/">Credit Cards</a></li>
                    </ul>
                </nav>
                <!-- Desktop Search Form -->
                <div class="header-search">
                    <form class="search-form" id="search-form-desktop" aria-label="search form">
                        <input
                            type="text"
                            id="search-input-desktop"
                            placeholder="Search..."
                            aria-label="Search"
                        >
                        <button type="submit" id="search-btn-desktop">Search</button>
                    </form>
                </div>
                <button class="mobile-menu-toggle" aria-label="Abrir menu">☰</button>
            </div>
        </header>
        <!-- Your body content goes here -->
        <div style="background-color: white;" id="tradingview-ticker-tape"></div>
<div style="background-color: white;" id="tradingview-ticker-tape"></div>
<main class="site-main container">
    <div class="main-grid">
        <section class="featured-content">
            <article class="featured-article">
    <a href="/p/your-loan-your-terms-taking-control-of-your-debt/">
        <div class="featured-image">
            <div class="image-container">
                <img src="https://cdn.clevernesting.com/800/400/70/clevernesting.com/1755805141804-c4f106cda078c.png" alt="Your Loan, Your Terms: Taking Control of Your Debt" loading="lazy">
            </div>
        </div>
        <div class="featured-info">
            <h2>
                Your Loan, Your Terms: Taking Control of Your Debt
            </h2>
        </div>
    </a>
</article>

            <section class="posts-grid">
                <article class="post-card">
    <a href="/p/green-loans-financing-sustainable-choices/">
        <div class="image-container">
            <img src="https://cdn.clevernesting.com/250/125/70/clevernesting.com/1755805123213-ef3f77ef0f825.png" alt="Green Loans: Financing Sustainable Choices" loading="lazy">
        </div>
        <time datetime="2025-10-21">10/21/2025</time>
        <h3>Green Loans: Financing Sustainable Choices</h3>
    </a>
</article>
<article class="post-card">
    <a href="/p/the-future-of-lending-trends-and-innovations/">
        <div class="image-container">
            <img src="https://cdn.clevernesting.com/250/125/70/clevernesting.com/1755804275194-91cdd73637247.png" alt="The Future of Lending: Trends and Innovations" loading="lazy">
        </div>
        <time datetime="2025-10-19">10/19/2025</time>
        <h3>The Future of Lending: Trends and Innovations</h3>
    </a>
</article>
<article class="post-card">
    <a href="/p/responsible-borrowing-a-foundation-for-financial-health/">
        <div class="image-container">
            <img src="https://cdn.clevernesting.com/250/125/70/clevernesting.com/1755804235492-719098a45ae028.png" alt="Responsible Borrowing: A Foundation for Financial Health" loading="lazy">
        </div>
        <time datetime="2025-10-16">10/16/2025</time>
        <h3>Responsible Borrowing: A Foundation for Financial Health</h3>
    </a>
</article>
<article class="post-card">
    <a href="/p/negotiating-with-credit-card-companies/">
        <div class="image-container">
            <img src="https://cdn.clevernesting.com/250/125/70/clevernesting.com/1755792059715-a60896d1d6e068.png" alt="Negotiating with Credit Card Companies" loading="lazy">
        </div>
        <time datetime="2025-10-16">10/16/2025</time>
        <h3>Negotiating with Credit Card Companies</h3>
    </a>
</article>
<article class="post-card">
    <a href="/p/the-smart-way-to-start-investing-today/">
        <div class="image-container">
            <img src="https://cdn.clevernesting.com/250/125/70/clevernesting.com/1755796620231-1bb4111cf4aa4.png" alt="The Smart Way to Start Investing Today" loading="lazy">
        </div>
        <time datetime="2025-10-12">10/12/2025</time>
        <h3>The Smart Way to Start Investing Today</h3>
    </a>
</article>
<article class="post-card">
    <a href="/p/your-credit-score-what-it-is-and-why-it-matters/">
        <div class="image-container">
            <img src="https://cdn.clevernesting.com/250/125/70/clevernesting.com/1755792050657-85f8db77289f58.png" alt="Your Credit Score: What It Is and Why It Matters" loading="lazy">
        </div>
        <time datetime="2025-10-12">10/12/2025</time>
        <h3>Your Credit Score: What It Is and Why It Matters</h3>
    </a>
</article>

            </section>
        </section>
        <aside class="sidebar">
            <div id="tradingview-market-overview"></div>
            <div id="tradingview-hotlists"></div>
            <div class="sidebar-block">
                <h2>Read more</h2>
                <ul class="mais-lidos-list">
                    <li>
    <div class="image-container">
        <a href="/p/the-psychology-of-debt-overcoming-challenges/">
            <img src="https://cdn.clevernesting.com/75/75/70/clevernesting.com/1755796620868-ea4245bfdaadc8.png" alt="The Psychology of Debt: Overcoming Challenges" loading="lazy">
        </a>
    </div>
    <div>
        <h3>
            <a href="/p/the-psychology-of-debt-overcoming-challenges/">The Psychology of Debt: Overcoming Challenges</a>
        </h3>
        <time datetime="2025-10-11">10/11/2025</time>
        <a href="/p/the-psychology-of-debt-overcoming-challenges/" class="read-more-link">
            Read more
            <span class="arrow-icon">→</span>
        </a>
    </div>
</li>
<hr><li>
    <div class="image-container">
        <a href="/p/behavioral-finance-understanding-investor-biases/">
            <img src="https://cdn.clevernesting.com/75/75/70/clevernesting.com/1755804206487-022ba4d12513c8.png" alt="Behavioral Finance: Understanding Investor Biases" loading="lazy">
        </a>
    </div>
    <div>
        <h3>
            <a href="/p/behavioral-finance-understanding-investor-biases/">Behavioral Finance: Understanding Investor Biases</a>
        </h3>
        <time datetime="2025-10-11">10/11/2025</time>
        <a href="/p/behavioral-finance-understanding-investor-biases/" class="read-more-link">
            Read more
            <span class="arrow-icon">→</span>
        </a>
    </div>
</li>

                </ul>
            </div>
        </aside>
    </div>
    <section class="section-block">
    <h2>Credit Cards</h2>
    <div class="cards-grid">
        <article class="info-card">
    <a href="/p/comparing-credit-card-offerings-a-checklist/">
        <img src="https://cdn.clevernesting.com/300/150/70/clevernesting.com/1755792073250-6ba32ac96ea648.png" alt="Comparing Credit Card Offerings: A Checklist">
        <time datetime="2025-10-10">10/10/2025</time>
        <h3>Comparing Credit Card Offerings: A Checklist</h3>
    </a>
</article>
<article class="info-card">
    <a href="/p/your-credit-score-what-it-is-and-why-it-matters/">
        <img src="https://cdn.clevernesting.com/300/150/70/clevernesting.com/1755792050657-85f8db77289f58.png" alt="Your Credit Score: What It Is and Why It Matters">
        <time datetime="2025-10-12">10/12/2025</time>
        <h3>Your Credit Score: What It Is and Why It Matters</h3>
    </a>
</article>
<article class="info-card">
    <a href="/p/negotiating-with-credit-card-companies/">
        <img src="https://cdn.clevernesting.com/300/150/70/clevernesting.com/1755792059715-a60896d1d6e068.png" alt="Negotiating with Credit Card Companies">
        <time datetime="2025-10-16">10/16/2025</time>
        <h3>Negotiating with Credit Card Companies</h3>
    </a>
</article>
<article class="info-card">
    <a href="/p/building-business-credit-with-your-card/">
        <img src="https://cdn.clevernesting.com/300/150/70/clevernesting.com/1755792072767-c14e77be44ffb8.png" alt="Building Business Credit with Your Card">
        <time datetime="2025-10-08">10/08/2025</time>
        <h3>Building Business Credit with Your Card</h3>
    </a>
</article>

    </div>
</section>
<section class="section-block">
    <h2>Financial Handbook</h2>
    <div class="cards-grid">
        <article class="info-card">
    <a href="/p/unlocking-your-earning-potential/">
        <img src="https://cdn.clevernesting.com/300/150/70/clevernesting.com/1755795409938-11fac5a283a34.png" alt="Unlocking Your Earning Potential">
        <time datetime="2025-10-04">10/04/2025</time>
        <h3>Unlocking Your Earning Potential</h3>
    </a>
</article>
<article class="info-card">
    <a href="/p/beyond-the-piggy-bank-advanced-savings/">
        <img src="https://cdn.clevernesting.com/300/150/70/clevernesting.com/1755795383200-625d3d8caf80b8.png" alt="Beyond the Piggy Bank: Advanced Savings">
        <time datetime="2025-10-10">10/10/2025</time>
        <h3>Beyond the Piggy Bank: Advanced Savings</h3>
    </a>
</article>
<article class="info-card">
    <a href="/p/the-hidden-costs-of-everyday-spending/">
        <img src="https://cdn.clevernesting.com/300/150/70/clevernesting.com/1755795440976-5d7d8f6664b038.png" alt="The Hidden Costs of Everyday Spending">
        <time datetime="2025-09-29">09/29/2025</time>
        <h3>The Hidden Costs of Everyday Spending</h3>
    </a>
</article>
<article class="info-card">
    <a href="/p/creating-a-financial-roadmap-for-life/">
        <img src="https://cdn.clevernesting.com/300/150/70/clevernesting.com/1755795383122-b939eee07d7108.png" alt="Creating a Financial Roadmap for Life">
        <time datetime="2025-10-07">10/07/2025</time>
        <h3>Creating a Financial Roadmap for Life</h3>
    </a>
</article>

    </div>
</section>
<section class="section-block">
    <h2>Investments</h2>
    <div class="cards-grid">
        <article class="info-card">
    <a href="/p/decoding-financial-jargon-investing-lingo-made-easy/">
        <img src="https://cdn.clevernesting.com/300/150/70/clevernesting.com/1755804247099-4a803f4722975.png" alt="Decoding Financial Jargon: Investing Lingo Made Easy">
        <time datetime="2025-10-04">10/04/2025</time>
        <h3>Decoding Financial Jargon: Investing Lingo Made Easy</h3>
    </a>
</article>
<article class="info-card">
    <a href="/p/the-smart-way-to-start-investing-today/">
        <img src="https://cdn.clevernesting.com/300/150/70/clevernesting.com/1755796620231-1bb4111cf4aa4.png" alt="The Smart Way to Start Investing Today">
        <time datetime="2025-10-12">10/12/2025</time>
        <h3>The Smart Way to Start Investing Today</h3>
    </a>
</article>
<article class="info-card">
    <a href="/p/strategic-asset-allocation-optimizing-your-returns/">
        <img src="https://cdn.clevernesting.com/300/150/70/clevernesting.com/1755796603259-fb1f9f06a623d8.png" alt="Strategic Asset Allocation: Optimizing Your Returns">
        <time datetime="2025-10-09">10/09/2025</time>
        <h3>Strategic Asset Allocation: Optimizing Your Returns</h3>
    </a>
</article>
<article class="info-card">
    <a href="/p/behavioral-finance-understanding-investor-biases/">
        <img src="https://cdn.clevernesting.com/300/150/70/clevernesting.com/1755804206487-022ba4d12513c8.png" alt="Behavioral Finance: Understanding Investor Biases">
        <time datetime="2025-10-11">10/11/2025</time>
        <h3>Behavioral Finance: Understanding Investor Biases</h3>
    </a>
</article>

    </div>
</section>
<section class="section-block">
    <h2>Loans</h2>
    <div class="cards-grid">
        <article class="info-card">
    <a href="/p/responsible-borrowing-a-foundation-for-financial-health/">
        <img src="https://cdn.clevernesting.com/300/150/70/clevernesting.com/1755804235492-719098a45ae028.png" alt="Responsible Borrowing: A Foundation for Financial Health">
        <time datetime="2025-10-16">10/16/2025</time>
        <h3>Responsible Borrowing: A Foundation for Financial Health</h3>
    </a>
</article>
<article class="info-card">
    <a href="/p/green-loans-financing-sustainable-choices/">
        <img src="https://cdn.clevernesting.com/300/150/70/clevernesting.com/1755805123213-ef3f77ef0f825.png" alt="Green Loans: Financing Sustainable Choices">
        <time datetime="2025-10-21">10/21/2025</time>
        <h3>Green Loans: Financing Sustainable Choices</h3>
    </a>
</article>
<article class="info-card">
    <a href="/p/the-future-of-lending-trends-and-innovations/">
        <img src="https://cdn.clevernesting.com/300/150/70/clevernesting.com/1755804275194-91cdd73637247.png" alt="The Future of Lending: Trends and Innovations">
        <time datetime="2025-10-19">10/19/2025</time>
        <h3>The Future of Lending: Trends and Innovations</h3>
    </a>
</article>
<article class="info-card">
    <a href="/p/your-loan-your-terms-taking-control-of-your-debt/">
        <img src="https://cdn.clevernesting.com/300/150/70/clevernesting.com/1755805141804-c4f106cda078c.png" alt="Your Loan, Your Terms: Taking Control of Your Debt">
        <time datetime="2025-10-25">10/25/2025</time>
        <h3>Your Loan, Your Terms: Taking Control of Your Debt</h3>
    </a>
</article>

    </div>
</section>

</main>
<footer class="site-footer">
    <div class="footer-top">
        <div class="container footer-container">
            <div class="footer-col logo-col">
                <div class="footer-logo-box">
                    <a href="/" class="footer-logo">
                        <img src="/public/img/logo.svg" style="width: 100%;max-width: 350px;padding: 35px 10px;margin: auto;">
                    </a>
                </div>
                <p style="text-align: center;">© 2026 Clevernesting - Clevernesting delivers market insights, practical planning tips, and smart comparisons to help you grow and protect your finances.</p>
            </div>
            <div class="footer-col">
                <h3>About Us</h3>
                <ul>
                    <li>
	<a href="/en/s/about-us/">About Us</a>
</li>
<li>
	<a href="/en/a/">Team</a>
</li>
<li>
	<a href="/en/s/contact/">Contact</a>
</li>
                </ul>
            </div>
            <div class="footer-col">
                <h3>Legal Information</h3>
                <ul class="social-list">
                    <li>
	<a href="/en/s/terms-of-use/">Terms of Use</a>
</li>
<li>
	<a href="/en/s/privacy-policy/">Privacy Policy</a>
</li>
                </ul>
            </div>
        </div>
    </div>
    <div class="footer-bottom">
        <ul>
            <li>
	<a href="/en/s/terms-of-use/">Terms of Use</a>
</li>
<li>
	<a href="/en/s/privacy-policy/">Privacy Policy</a>
</li>
        </ul>
    </div>
</footer>
<div class="mobile-overlay"></div>
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/all.min.css" rel="stylesheet">
<script>
    const toggleBtn = document.querySelector('.mobile-menu-toggle');
    const nav = document.querySelector('.main-nav');
    const overlay = document.querySelector('.mobile-overlay');

    toggleBtn.addEventListener('click', () => {
        nav.classList.toggle('open');
        overlay.classList.toggle('active');
    });

    overlay.addEventListener('click', () => {
        nav.classList.remove('open');
        overlay.classList.remove('active');
    });

    const url = new URL(window.location.href);
    const links = document.getElementsByTagName('a');
    const medium = url.searchParams.get('utm_medium');
    const campaign = url.searchParams.get('utm_campaign');
    const source = url.searchParams.get('utm_source');
    const term = url.searchParams.get('utm_term');

    function getAdText() {
        const lang = navigator.language || navigator.userLanguage;
        const langMap = {
            'pt': 'Publicidade',
            'es': 'Publicidad',
            'en': 'Advertisement',
            'fr': 'Publicité',
            'de': 'Werbung'
        };
        const baseLang = (lang.split('-')[0] || 'en').toLowerCase();
        return langMap[baseLang] || langMap['en'];
    }

    function addAdLabel(container, adText) {
        if (!container.querySelector('.ad-label')) {
            container.insertAdjacentHTML('afterbegin',
                `<div class="ad-label" style="font-size:13px;color:#888;text-align:center;margin-bottom:5px;">${adText}</div>`
            );
        }
    }

    function removeAdLabel(container) {
        const label = container.querySelector('.ad-label');
        if (label) {
            label.remove();
        }
    }

    function updateAllAds() {
        const adText = getAdText();
        const units = document.querySelectorAll('.adunit');
        units.forEach(unit => {
            const unitHeight = unit.offsetHeight;
            if (unitHeight > 40) {
                // Ad displayed
                addAdLabel(unit, adText);
                // unit.style.margin = 'auto';
                // unit.style.marginTop = '20px';
                // unit.style.marginBottom = '20px';
            } else {
                // Ad not displayed
                removeAdLabel(unit);
                unit.style.margin = '';
                unit.style.marginTop = '';
                unit.style.marginBottom = '';
            }
        });
    }

    function initAdLabelObserver() {
		window.googletag = window.googletag || {};
		window.googletag.cmd = window.googletag.cmd || [];

		window.googletag.cmd.push(function () {
			if (window.googletag && window.googletag.pubads) {
				window.googletag.pubads().addEventListener('slotRenderEnded', function (event) {
					try {
						updateAllAds();
					} catch (error) {
						console.error('Error updating ads:', error);
					}
				});
			}
		});

		document.addEventListener('DOMContentLoaded', updateAllAds);
	}

    document.addEventListener('DOMContentLoaded', function () {
        let attrs = {};

        if (source) attrs.source = source;

        if (campaign) attrs.campaign = campaign;

        if (medium) attrs.medium = medium;

        if (term) attrs.country = term;

        for (let link of links) {
            for (let attr in attrs) {
                if (!link.href.includes('?')) {
                    link.href = link.href + '?';
                } else {
                    link.href = link.href + '&';
                }

                if (attr == 'country') {
                    link.href += `utm_term=${attrs[attr]}`;
                } else {
                    link.href += `utm_${attr}=${attrs[attr]}`;
                }
            }
        }

        initAdLabelObserver();  
    });

    (function () {
        if (typeof notFoundPage !== "undefined") {
            console.log('Not found page is defined, ignoring preloader.')
            return false
        }

        if (!location.pathname.includes('/p/') &&
            !location.pathname.includes('/l/') &&
            !location.pathname.includes('/m/')
        ) {
            console.log('preloader isnt needed on this page.')
            return false
        }

        // Cria o overlay do preloader
        const preloader = document.createElement('div');
        preloader.id = 'custom-preloader';
        Object.assign(preloader.style, {
            position: 'fixed',
            top: '0',
            left: '0',
            width: '100%',
            height: '100%',
            backgroundColor: 'rgb(255 255 255 / 96%)', // Cor de fundo atualizada
            zIndex: '9999',
            display: 'flex',
            flexDirection: 'column',
            alignItems: 'center',
            justifyContent: 'center',
            flexShrink: '0',
        });

        // Cria a barra de carregamento no topo
        const progressBarContainer = document.createElement('div');
        Object.assign(progressBarContainer.style, {
            position: 'fixed',
            top: '0',
            left: '0',
            width: '100%',
            height: '4px',
            backgroundColor: '#e0e0e0', // Fundo da barra de carregamento
            overflow: 'hidden',
        });

        const progressBar = document.createElement('div');
        Object.assign(progressBar.style, {
            width: '0%',
            height: '100%',
            backgroundColor: 'var(--secondary-color)', // Cor da barra de carregamento
            transition: 'width 5s linear',
        });

        progressBarContainer.appendChild(progressBar);
        preloader.appendChild(progressBarContainer);

        // Cria o spinner central
        const spinner = document.createElement('div');
        Object.assign(spinner.style, {
            border: '8px solid #f3f3f3',
            borderTop: `8px solid var(--secondary-color)`, // Cor do spinner
            borderRadius: '50%',
            width: '60px',
            height: '60px',
            animation: 'spin 2s linear infinite',
            marginBottom: '20px',
        });

        // Adiciona o texto "Carregando"
        const loadingText = document.createElement('div');
        loadingText.innerText = '{{preloader_text}}';
        Object.assign(loadingText.style, {
            fontSize: '20px', // Aumenta o tamanho da fonte
            color: '#0a1822', // Cor do texto para melhor contraste
            fontWeight: 'bold', // Aumenta o peso da fonte
            marginBottom: '30px', // Espaçamento abaixo do texto
        });

        // Adiciona spinner e texto ao preloader
        preloader.appendChild(spinner);
        preloader.appendChild(loadingText);

        // Cria o badge "Site Seguro" com SVG de escudo
        const badge = document.createElement('div');
        Object.assign(badge.style, {
            position: 'fixed',
            bottom: '20px',
            display: 'flex',
            alignItems: 'center',
            backgroundColor: 'var(--secondary-color)',
            color: '#ffffff',
            padding: '12px 16px', // Aumenta o padding para dar mais espaço
            borderRadius: '25px', // Aumenta o raio para bordas mais arredondadas
            boxShadow: '0 4px 8px rgba(0,0,0,0.3)', // Sombra mais pronunciada
            fontSize: '16px', // Aumenta o tamanho da fonte
            fontWeight: 'bold', // Aumenta o peso da fonte
        });

        // SVG de escudo fornecido, aumentado de tamanho
        const shieldSVG = `
            <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="currentColor" viewBox="0 0 512 512" style="margin-right: 8px;">
            <path d="M256 0c4.6 0 9.2 1 13.4 2.9L457.7 82.8c22 9.3 38.4 31 38.3 57.2c-.5 99.2-41.3 280.7-213.6 363.2c-16.7 8-36.1 8-52.8 0C57.3 420.7 16.5 239.2 16 140c-.1-26.2 16.3-47.9 38.3-57.2L242.7 2.9C246.8 1 251.4 0 256 0zm0 66.8l0 378.1C394 378 431.1 230.1 432 141.4L256 66.8s0 0 0 0z"/>
            </svg>
        `;

        // Adiciona o SVG e o texto ao badge
        badge.innerHTML = shieldSVG + ' {{secure_text}}';
        preloader.appendChild(badge);

        // Adiciona keyframes para a animação do spinner
        const styleSheet = document.createElement('style');
        styleSheet.type = 'text/css';
        styleSheet.innerText = `
            @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
            }
        `;
        document.head.appendChild(styleSheet);

        // Adiciona o preloader ao body
        document.body.appendChild(preloader);

        // Armazena referências globais para manipulação futura
        window.loadingEl = preloader;
        window.loadingTimeout = setTimeout(() => {
            removePreloader();
        }, 5000);

        // Inicia a animação da barra de progresso
        setTimeout(() => {
            progressBar.style.width = '100%';
        }, 100); // Pequeno delay para garantir que a transição aconteça


        // Função para remover o preloader
        function removePreloader() {
            if (window.loadingEl) {
                window.loadingEl.style.transition = 'opacity 0.5s ease';
                window.loadingEl.style.opacity = '0';
                setTimeout(() => {
                    if (window.loadingEl && window.loadingEl.parentNode) {
                        window.loadingEl.parentNode.removeChild(window.loadingEl);
                        window.loadingEl = undefined;
                    }
                }, 500);
            }
            if (window.loadingTimeout) {
                clearTimeout(window.loadingTimeout);
                window.loadingTimeout = undefined;
            }
        }

        // Integração com Google Publisher Tags para remover o preloader quando o anúncio for carregado
        window.googletag = window.googletag || {};
        window.googletag.cmd = window.googletag.cmd || [];
        window.googletag.cmd.push(function () {
            if (window.googletag && window.googletag.pubads) {
                window.googletag.pubads().addEventListener('slotRenderEnded', function (event) {
                    try {
                        console.debug('slotRenderEnded', event.slot.getAdUnitPath(), event);
                        if (event.isEmpty) {
                            // Não vendeu, remove o preloader
                            removePreloader();
                        }
                        if (event.slot.getAdUnitPath().includes('header') || event.slot.getAdUnitPath().includes('top')) {
                            if (typeof window.loadingEl !== 'undefined') {
                                removePreloader();
                            }
                        }
                    } catch (error) {
                        console.error(error);
                    }
                });
            }
        });
    })();
</script>
<script src="/public/js/main.js"></script>
<script defer data-domain="clevernesting.com" src="https://clever.clevernesting.com/js/script.hash.outbound-links.pageview-props.tagged-events.js"></script>
<script>
    window.plausible = window.plausible || function () {
        (window.plausible.q = window.plausible.q || []).push(arguments);
    }
</script>
<!-- custom scripts -->
</body>
</html>
