{"id":12,"date":"2026-08-26T20:31:53","date_gmt":"2026-08-26T23:31:53","guid":{"rendered":"https:\/\/asamdepmg.phaineicode.com\/?page_id=12"},"modified":"2026-08-26T21:06:08","modified_gmt":"2026-08-27T00:06:08","slug":"home-page","status":"publish","type":"page","link":"https:\/\/asamdepmg.phaineicode.com\/?page_id=12","title":{"rendered":"Home Page"},"content":{"rendered":"\n<style data-wp-block-html=\"css\">\n.asamdep-hero {\n    position: relative;\n    width: 100%;\n    min-height: 620px;\n    overflow: hidden;\n    background: #123f35;\n    color: #fff;\n}\n\n.asamdep-hero__slides {\n    min-height: inherit;\n}\n\n.asamdep-hero__slide {\n    position: absolute;\n    inset: 0;\n    display: flex;\n    align-items: center;\n    min-height: 620px;\n    padding: 80px 24px;\n    background-color: #123f35;\n    background-position: center;\n    background-size: cover;\n    opacity: 0;\n    visibility: hidden;\n    transition:\n        opacity 600ms ease,\n        visibility 600ms ease;\n}\n\n.asamdep-hero__slide.is-active {\n    position: relative;\n    opacity: 1;\n    visibility: visible;\n    z-index: 1;\n}\n\n.asamdep-hero__content {\n    width: min(100%, 1200px);\n    margin: 0 auto;\n}\n\n.asamdep-hero__category {\n    display: block;\n    margin-bottom: 16px;\n    color: #f2cf63;\n    font-size: 0.82rem;\n    font-weight: 700;\n    letter-spacing: 0.12em;\n    text-transform: uppercase;\n}\n\n.asamdep-hero__title {\n    max-width: 760px;\n    margin: 0 0 20px;\n    color: #fff;\n    font-size: clamp(2rem, 5vw, 4.5rem);\n    line-height: 1.06;\n}\n\n.asamdep-hero__excerpt {\n    max-width: 660px;\n    margin: 0 0 30px;\n    color: rgba(255, 255, 255, 0.9);\n    font-size: clamp(1rem, 1.6vw, 1.2rem);\n    line-height: 1.7;\n}\n\n.asamdep-hero__link {\n    display: inline-flex;\n    align-items: center;\n    justify-content: center;\n    min-height: 46px;\n    padding: 11px 24px;\n    border: 2px solid #fff;\n    color: #fff;\n    font-weight: 700;\n    text-decoration: none;\n}\n\n.asamdep-hero__link:hover,\n.asamdep-hero__link:focus-visible {\n    background: #fff;\n    color: #123f35;\n}\n\n.asamdep-hero__control {\n    position: absolute;\n    bottom: 38px;\n    z-index: 3;\n    border: 1px solid rgba(255, 255, 255, 0.7);\n    background: rgba(9, 48, 39, 0.7);\n    color: #fff;\n    padding: 9px 14px;\n    cursor: pointer;\n}\n\n.asamdep-hero__previous {\n    right: 138px;\n}\n\n.asamdep-hero__next {\n    right: 24px;\n}\n\n.asamdep-hero__pagination {\n    position: absolute;\n    bottom: 45px;\n    left: max(24px, calc((100% - 1200px) \/ 2));\n    z-index: 3;\n    display: flex;\n    gap: 10px;\n}\n\n.asamdep-hero__dot {\n    width: 12px;\n    height: 12px;\n    padding: 0;\n    border: 1px solid #fff;\n    border-radius: 50%;\n    background: transparent;\n    cursor: pointer;\n}\n\n.asamdep-hero__dot.is-active {\n    background: #fff;\n}\n\n.asamdep-hero__status {\n    position: absolute;\n    inset: 0;\n    display: grid;\n    place-items: center;\n    padding: 24px;\n    text-align: center;\n}\n\n.asamdep-hero.has-error {\n    min-height: 200px;\n}\n\n@media (max-width: 700px) {\n    .asamdep-hero,\n    .asamdep-hero__slides,\n    .asamdep-hero__slide {\n        min-height: 540px;\n    }\n\n    .asamdep-hero__slide {\n        align-items: flex-end;\n        padding: 60px 20px 110px;\n        background-position: center;\n    }\n\n    .asamdep-hero__excerpt {\n        display: -webkit-box;\n        overflow: hidden;\n        -webkit-box-orient: vertical;\n        -webkit-line-clamp: 3;\n    }\n\n    .asamdep-hero__previous {\n        right: auto;\n        left: 20px;\n    }\n\n    .asamdep-hero__next {\n        right: 20px;\n    }\n\n    .asamdep-hero__pagination {\n        bottom: 52px;\n        left: 50%;\n        transform: translateX(-50%);\n    }\n}\n\n@media (prefers-reduced-motion: reduce) {\n    .asamdep-hero__slide {\n        transition: none;\n    }\n}\n<\/style>\n\n<script data-wp-block-html=\"js\">\n(function () {\n    'use strict';\n\n    const SITE_URL = 'https:\/\/asamdepmg.phaineicode.com';\n    const TAG_SLUG = 'destaque';\n    const POSTS_LIMIT = 3;\n    const AUTOPLAY_TIME = 7000;\n\n    function iniciarHeroASAMDEP() {\n        const hero = document.querySelector('.asamdep-hero');\n\n        if (!hero || hero.dataset.initialized === 'true') {\n            return;\n        }\n\n        const slidesContainer = hero.querySelector(\n            '.asamdep-hero__slides'\n        );\n\n        const pagination = hero.querySelector(\n            '.asamdep-hero__pagination'\n        );\n\n        const status = hero.querySelector(\n            '.asamdep-hero__status'\n        );\n\n        const previousButton = hero.querySelector(\n            '.asamdep-hero__previous'\n        );\n\n        const nextButton = hero.querySelector(\n            '.asamdep-hero__next'\n        );\n\n        if (\n            !slidesContainer ||\n            !pagination ||\n            !status ||\n            !previousButton ||\n            !nextButton\n        ) {\n            console.error(\n                '[ASAMDEP Hero] Estrutura HTML incompleta.'\n            );\n\n            return;\n        }\n\n        hero.dataset.initialized = 'true';\n\n        let slides = [];\n        let paginationButtons = [];\n        let currentSlide = 0;\n        let autoplayTimer = null;\n\n        function criarURLAPI(route, parameters) {\n            const url = new URL(\n                SITE_URL + '\/index.php'\n            );\n\n            url.searchParams.set(\n                'rest_route',\n                route\n            );\n\n            Object.entries(parameters || {}).forEach(\n                function (entry) {\n                    const key = entry[0];\n                    const value = entry[1];\n\n                    url.searchParams.set(key, value);\n                }\n            );\n\n            return url.toString();\n        }\n\n        function lerJSON(response) {\n            const contentType =\n                response.headers.get('content-type') || '';\n\n            if (!response.ok) {\n                throw new Error(\n                    'A API respondeu com o c\u00f3digo HTTP ' +\n                    response.status +\n                    '.'\n                );\n            }\n\n            if (!contentType.includes('application\/json')) {\n                throw new Error(\n                    'A API n\u00e3o retornou dados JSON.'\n                );\n            }\n\n            return response.json();\n        }\n\n        function converterHTMLParaTexto(html) {\n            const element = document.createElement('div');\n\n            element.innerHTML = html || '';\n\n            return (element.textContent || '')\n                .replace(\/\\s+\/g, ' ')\n                .trim();\n        }\n\n        function obterImagem(post) {\n            const embedded = post._embedded;\n\n            if (\n                !embedded ||\n                !embedded['wp:featuredmedia'] ||\n                !embedded['wp:featuredmedia'][0]\n            ) {\n                return '';\n            }\n\n            const media =\n                embedded['wp:featuredmedia'][0];\n\n            const sizes =\n                media.media_details &&\n                media.media_details.sizes;\n\n            if (sizes && sizes['1536x1536']) {\n                return sizes['1536x1536'].source_url;\n            }\n\n            if (sizes && sizes.large) {\n                return sizes.large.source_url;\n            }\n\n            return media.source_url || '';\n        }\n\n        function obterCategoria(post) {\n            const termGroups =\n                post._embedded &&\n                post._embedded['wp:term'];\n\n            if (!Array.isArray(termGroups)) {\n                return 'Not\u00edcia';\n            }\n\n            for (const group of termGroups) {\n                if (!Array.isArray(group)) {\n                    continue;\n                }\n\n                const category = group.find(\n                    function (term) {\n                        return (\n                            term.taxonomy === 'category'\n                        );\n                    }\n                );\n\n                if (category) {\n                    return category.name;\n                }\n            }\n\n            return 'Not\u00edcia';\n        }\n\n        function criarSlide(post, index) {\n            const slide = document.createElement('article');\n            const content = document.createElement('div');\n            const category = document.createElement('span');\n            const title = document.createElement('h2');\n            const excerpt = document.createElement('p');\n            const link = document.createElement('a');\n\n            const imageURL = obterImagem(post);\n\n            const titleText = converterHTMLParaTexto(\n                post.title &&\n                post.title.rendered\n            );\n\n            const excerptText = converterHTMLParaTexto(\n                post.excerpt &&\n                post.excerpt.rendered\n            );\n\n            slide.className = 'asamdep-hero__slide';\n\n            slide.setAttribute(\n                'aria-hidden',\n                index === 0 ? 'false' : 'true'\n            );\n\n            if (imageURL) {\n                slide.style.backgroundImage =\n                    'linear-gradient(' +\n                    '90deg,' +\n                    'rgba(9, 48, 39, 0.94) 0%,' +\n                    'rgba(9, 48, 39, 0.72) 48%,' +\n                    'rgba(9, 48, 39, 0.15) 100%' +\n                    '),' +\n                    'url(\"' +\n                    imageURL.replace(\/\"\/g, '%22') +\n                    '\")';\n            } else {\n                slide.classList.add(\n                    'asamdep-hero__slide--without-image'\n                );\n            }\n\n            content.className =\n                'asamdep-hero__content';\n\n            category.className =\n                'asamdep-hero__category';\n\n            category.textContent =\n                obterCategoria(post);\n\n            title.className =\n                'asamdep-hero__title';\n\n            title.textContent = titleText;\n\n            excerpt.className =\n                'asamdep-hero__excerpt';\n\n            excerpt.textContent = excerptText;\n\n            link.className =\n                'asamdep-hero__link';\n\n            link.href = post.link;\n            link.textContent = 'Saiba mais';\n\n            link.setAttribute(\n                'aria-label',\n                'Saiba mais sobre: ' + titleText\n            );\n\n            content.appendChild(category);\n            content.appendChild(title);\n\n            if (excerptText) {\n                content.appendChild(excerpt);\n            }\n\n            content.appendChild(link);\n            slide.appendChild(content);\n\n            return slide;\n        }\n\n        function exibirSlide(index) {\n            if (!slides.length) {\n                return;\n            }\n\n            currentSlide =\n                (index + slides.length) %\n                slides.length;\n\n            slides.forEach(\n                function (slide, slideIndex) {\n                    const active =\n                        slideIndex === currentSlide;\n\n                    slide.classList.toggle(\n                        'is-active',\n                        active\n                    );\n\n                    slide.setAttribute(\n                        'aria-hidden',\n                        active ? 'false' : 'true'\n                    );\n                }\n            );\n\n            paginationButtons.forEach(\n                function (button, buttonIndex) {\n                    const active =\n                        buttonIndex === currentSlide;\n\n                    button.classList.toggle(\n                        'is-active',\n                        active\n                    );\n\n                    if (active) {\n                        button.setAttribute(\n                            'aria-current',\n                            'true'\n                        );\n                    } else {\n                        button.removeAttribute(\n                            'aria-current'\n                        );\n                    }\n                }\n            );\n        }\n\n        function pararAutoplay() {\n            if (autoplayTimer) {\n                window.clearInterval(autoplayTimer);\n                autoplayTimer = null;\n            }\n        }\n\n        function iniciarAutoplay() {\n            pararAutoplay();\n\n            const reducedMotion =\n                window.matchMedia(\n                    '(prefers-reduced-motion: reduce)'\n                ).matches;\n\n            if (\n                slides.length < 2 ||\n                reducedMotion\n            ) {\n                return;\n            }\n\n            autoplayTimer = window.setInterval(\n                function () {\n                    exibirSlide(currentSlide + 1);\n                },\n                AUTOPLAY_TIME\n            );\n        }\n\n        function criarPaginacao(index, post) {\n            const button =\n                document.createElement('button');\n\n            const title = converterHTMLParaTexto(\n                post.title &#038;&#038;\n                post.title.rendered\n            );\n\n            button.type = 'button';\n            button.className =\n                'asamdep-hero__dot';\n\n            button.setAttribute(\n                'aria-label',\n                'Mostrar not\u00edcia ' +\n                (index + 1) +\n                ': ' +\n                title\n            );\n\n            button.addEventListener(\n                'click',\n                function () {\n                    exibirSlide(index);\n                    iniciarAutoplay();\n                }\n            );\n\n            return button;\n        }\n\n        function construirHero(posts) {\n            slidesContainer.replaceChildren();\n            pagination.replaceChildren();\n\n            posts.forEach(\n                function (post, index) {\n                    const slide =\n                        criarSlide(post, index);\n\n                    const paginationButton =\n                        criarPaginacao(index, post);\n\n                    slidesContainer.appendChild(slide);\n                    pagination.appendChild(\n                        paginationButton\n                    );\n                }\n            );\n\n            slides = Array.from(\n                slidesContainer.querySelectorAll(\n                    '.asamdep-hero__slide'\n                )\n            );\n\n            paginationButtons = Array.from(\n                pagination.querySelectorAll(\n                    '.asamdep-hero__dot'\n                )\n            );\n\n            status.hidden = true;\n            hero.classList.remove('has-error');\n            hero.classList.add('is-loaded');\n\n            const multipleSlides =\n                slides.length > 1;\n\n            previousButton.hidden =\n                !multipleSlides;\n\n            nextButton.hidden =\n                !multipleSlides;\n\n            pagination.hidden =\n                !multipleSlides;\n\n            exibirSlide(0);\n            iniciarAutoplay();\n        }\n\n        function mostrarErro(message) {\n            pararAutoplay();\n\n            status.hidden = false;\n            status.textContent = message;\n\n            hero.classList.add('has-error');\n\n            previousButton.hidden = true;\n            nextButton.hidden = true;\n            pagination.hidden = true;\n\n            console.error(\n                '[ASAMDEP Hero] ' + message\n            );\n        }\n\n        previousButton.addEventListener(\n            'click',\n            function () {\n                exibirSlide(currentSlide - 1);\n                iniciarAutoplay();\n            }\n        );\n\n        nextButton.addEventListener(\n            'click',\n            function () {\n                exibirSlide(currentSlide + 1);\n                iniciarAutoplay();\n            }\n        );\n\n        hero.addEventListener(\n            'mouseenter',\n            pararAutoplay\n        );\n\n        hero.addEventListener(\n            'mouseleave',\n            iniciarAutoplay\n        );\n\n        hero.addEventListener(\n            'focusin',\n            pararAutoplay\n        );\n\n        hero.addEventListener(\n            'focusout',\n            function (event) {\n                if (\n                    !hero.contains(\n                        event.relatedTarget\n                    )\n                ) {\n                    iniciarAutoplay();\n                }\n            }\n        );\n\n        hero.addEventListener(\n            'keydown',\n            function (event) {\n                if (event.key === 'ArrowLeft') {\n                    exibirSlide(currentSlide - 1);\n                    iniciarAutoplay();\n                }\n\n                if (event.key === 'ArrowRight') {\n                    exibirSlide(currentSlide + 1);\n                    iniciarAutoplay();\n                }\n            }\n        );\n\n        document.addEventListener(\n            'visibilitychange',\n            function () {\n                if (document.hidden) {\n                    pararAutoplay();\n                } else {\n                    iniciarAutoplay();\n                }\n            }\n        );\n\n        const tagsEndpoint = criarURLAPI(\n            '\/wp\/v2\/tags',\n            {\n                slug: TAG_SLUG\n            }\n        );\n\n        fetch(tagsEndpoint, {\n            method: 'GET',\n            credentials: 'same-origin',\n            headers: {\n                Accept: 'application\/json'\n            }\n        })\n            .then(lerJSON)\n            .then(function (tags) {\n                if (\n                    !Array.isArray(tags) ||\n                    !tags.length\n                ) {\n                    throw new Error(\n                        'A tag Destaque n\u00e3o foi encontrada.'\n                    );\n                }\n\n                const tagID = tags[0].id;\n\n                const postsEndpoint =\n                    criarURLAPI(\n                        '\/wp\/v2\/posts',\n                        {\n                            tags: tagID,\n                            per_page: POSTS_LIMIT,\n                            orderby: 'date',\n                            order: 'desc',\n                            _embed: 1\n                        }\n                    );\n\n                return fetch(postsEndpoint, {\n                    method: 'GET',\n                    credentials: 'same-origin',\n                    headers: {\n                        Accept: 'application\/json'\n                    }\n                });\n            })\n            .then(lerJSON)\n            .then(function (posts) {\n                if (\n                    !Array.isArray(posts) ||\n                    !posts.length\n                ) {\n                    throw new Error(\n                        'Nenhuma publica\u00e7\u00e3o em destaque foi encontrada.'\n                    );\n                }\n\n                construirHero(posts);\n            })\n            .catch(function (error) {\n                mostrarErro(\n                    error.message ||\n                    'N\u00e3o foi poss\u00edvel carregar os destaques.'\n                );\n            });\n    }\n\n    function executarQuandoDisponivel() {\n        const hero =\n            document.querySelector('.asamdep-hero');\n\n        if (hero) {\n            iniciarHeroASAMDEP();\n            return;\n        }\n\n        window.setTimeout(\n            executarQuandoDisponivel,\n            300\n        );\n    }\n\n    if (document.readyState === 'loading') {\n        document.addEventListener(\n            'DOMContentLoaded',\n            executarQuandoDisponivel,\n            { once: true }\n        );\n    } else {\n        executarQuandoDisponivel();\n    }\n})();\n<\/script>\n\n<section class=\"asamdep-hero\" aria-label=\"Not\u00edcias em destaque\" aria-roledescription=\"carrossel\">\n    <div class=\"asamdep-hero__status\">\n        Carregando not\u00edcias em destaque&#8230;\n    <\/div>\n\n    <div class=\"asamdep-hero__slides\" aria-live=\"polite\"><\/div>\n\n    <button class=\"asamdep-hero__control asamdep-hero__previous\" type=\"button\" aria-label=\"Not\u00edcia anterior\">\n        Anterior\n    <\/button>\n\n    <button class=\"asamdep-hero__control asamdep-hero__next\" type=\"button\" aria-label=\"Pr\u00f3xima not\u00edcia\">\n        Pr\u00f3xima\n    <\/button>\n\n    <div class=\"asamdep-hero__pagination\" aria-label=\"Selecionar not\u00edcia\"><\/div>\n<\/section>\n","protected":false},"excerpt":{"rendered":"<p>Carregando not\u00edcias em destaque&#8230; Anterior Pr\u00f3xima<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-12","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/asamdepmg.phaineicode.com\/index.php?rest_route=\/wp\/v2\/pages\/12","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/asamdepmg.phaineicode.com\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/asamdepmg.phaineicode.com\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/asamdepmg.phaineicode.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/asamdepmg.phaineicode.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=12"}],"version-history":[{"count":5,"href":"https:\/\/asamdepmg.phaineicode.com\/index.php?rest_route=\/wp\/v2\/pages\/12\/revisions"}],"predecessor-version":[{"id":36,"href":"https:\/\/asamdepmg.phaineicode.com\/index.php?rest_route=\/wp\/v2\/pages\/12\/revisions\/36"}],"wp:attachment":[{"href":"https:\/\/asamdepmg.phaineicode.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=12"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}