{"id":43304,"date":"2025-10-28T14:49:17","date_gmt":"2025-10-28T14:49:17","guid":{"rendered":"https:\/\/www.ccdr-lvt.pt\/?page_id=43304"},"modified":"2025-10-29T10:42:09","modified_gmt":"2025-10-29T10:42:09","slug":"contact-us","status":"publish","type":"page","link":"https:\/\/www.ccdr-lvt.pt\/en\/contact-us\/","title":{"rendered":"Contacts"},"content":{"rendered":"\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<section class=\"flex flex-col gap-8\">\n\n    <div class=\"ccdr-contact-form-header\">\n                    <h2 class=\"ccdr-contactform-title\">Contact Form<\/h2>\n        \n                    <p class=\"ccdr-contactform-description\">Fill the fields to contact us:<\/p>\n            <\/div>\n            <div class=\"ccdr-contact-form\">\n            <div class='fluentform ff-default fluentform_wrapper_106 ffs_default_wrap'><form data-form_id=\"106\" id=\"fluentform_106\" class=\"frm-fluent-form fluent_form_106 ff-el-form-top ff_form_instance_106_1 ff-form-loading ffs_default\" data-form_instance=\"ff_form_instance_106_1\" method=\"POST\" ><fieldset  style=\"border: none!important;margin: 0!important;padding: 0!important;background-color: transparent!important;box-shadow: none!important;outline: none!important; min-inline-size: 100%;\">\n                    <legend class=\"ff_screen_reader_title\" style=\"display: block; margin: 0!important;padding: 0!important;height: 0!important;text-indent: -999999px;width: 0!important;overflow:hidden;\">0002 Formul\u00e1rio Contacto EN<\/legend>        <div\n                style=\"display: none!important; position: absolute!important; transform: translateX(1000%)!important;\"\n                class=\"ff-el-group ff-hpsf-container\"\n        >\n            <div class=\"ff-el-input--label asterisk-right\">\n                <label for=\"ff_106_item_sf\" aria-label=\"Subscribe\">\n                    Subscribe                <\/label>\n            <\/div>\n            <div class=\"ff-el-input--content\">\n                <input type=\"text\"\n                       name=\"item_106__fluent_sf\"\n                       class=\"ff-el-form-control\"\n                       id=\"ff_106_item_sf\"\n                \/>\n            <\/div>\n        <\/div>\n        <input type='hidden' name='__fluent_form_embded_post_id' value='43304' \/><input type=\"hidden\" id=\"_fluentform_106_fluentformnonce\" name=\"_fluentform_106_fluentformnonce\" value=\"a6c4703297\" \/><input type=\"hidden\" name=\"_wp_http_referer\" value=\"\/en\/wp-json\/wp\/v2\/pages\/43304\" \/><div data-type=\"name-element\" data-name=\"names\" class=\" ff-field_container ff-name-field-wrapper\" ><div class='ff-t-container'><div class='ff-t-cell '><div class='ff-el-group ff-el-form-hide_label'><div class=\"ff-el-input--label ff-el-is-required asterisk-right\"><label for='ff_106_names_first_name_' id='label_ff_106_names_first_name_' >First Name<\/label><\/div><div class='ff-el-input--content'><input type=\"text\" name=\"names[first_name]\" id=\"ff_106_names_first_name_\" class=\"ff-el-form-control\" placeholder=\"Name \/ Entity\" aria-invalid=\"false\" aria-required=true><\/div><\/div><\/div><\/div><\/div><div class='ff-el-group ff-el-form-hide_label'><div class=\"ff-el-input--label ff-el-is-required asterisk-right\"><label for='ff_106_NIF' id='label_ff_106_NIF' aria-label=\"NIF\">NIF<\/label><\/div><div class='ff-el-input--content'><input type=\"text\" name=\"NIF\" class=\"ff-el-form-control\" placeholder=\"NIF\" maxlength=\"9\" data-name=\"NIF\" id=\"ff_106_NIF\"  aria-invalid=\"false\" aria-required=true><\/div><\/div><div data-name=\"ff_cn_id_1\"  class='ff-t-container ff-column-container ff_columns_total_2 '><div class='ff-t-cell ff-t-column-1' style='flex-basis: 50%;'><div class='ff-el-group ff-el-form-hide_label'><div class=\"ff-el-input--label ff-el-is-required asterisk-right\"><label for='ff_106_email' id='label_ff_106_email' aria-label=\"E-mail\">E-mail<\/label><\/div><div class='ff-el-input--content'><input type=\"email\" name=\"email\" id=\"ff_106_email\" class=\"ff-el-form-control\" placeholder=\"E-mail\" data-name=\"email\"  aria-invalid=\"false\" aria-required=true><\/div><\/div><\/div><div class='ff-t-cell ff-t-column-2' style='flex-basis: 50%;'><div class='ff-el-group ff-el-form-hide_label'><div class=\"ff-el-input--label asterisk-right\"><label for='ff_106_phone' id='label_ff_106_phone' aria-label=\"Phone Number\">Phone Number<\/label><\/div><div class='ff-el-input--content'><input name=\"phone\" class=\"ff-el-form-control ff-el-phone ff_el_with_extended_validation\" type=\"tel\" placeholder=\"Phone Number\" data-name=\"phone\" id=\"ff_106_phone\" inputmode=\"tel\"  aria-invalid='false' aria-required=false><\/div><\/div><\/div><\/div><div class='ff-el-group ff-el-form-hide_label'><div class=\"ff-el-input--label ff-el-is-required asterisk-right\"><label for='ff_106_dropdown' id='label_ff_106_dropdown' aria-label=\"Subject\">Subject<\/label><\/div><div class='ff-el-input--content'><select name=\"dropdown\" id=\"ff_106_dropdown\" class=\"ff-el-form-control\" data-name=\"dropdown\" data-calc_value=\"0\"  aria-invalid=\"false\" aria-required=\"true\" aria-labelledby=\"label_ff_106_dropdown\"><option value=\"\">Subject<\/option><option value=\"Administra\u00e7\u00e3o Local\"  >Administra\u00e7\u00e3o Local<\/option><option value=\"Agricultura e Pescas\"  >Agricultura e Pescas<\/option><option value=\"Apoios e Incentivos\"  >Apoios e Incentivos<\/option><option value=\"Cultura\"  >Cultura<\/option><option value=\"Licenciamento, Permiss\u00f5es, Certifica\u00e7\u00f5es\"  >Licenciamento, Permiss\u00f5es, Certifica\u00e7\u00f5es<\/option><option value=\"Ordenamento do Territ\u00f3rio\"  >Ordenamento do Territ\u00f3rio<\/option><\/select><\/div><\/div><div class='ff-el-group ff-el-form-hide_label'><div class=\"ff-el-input--label ff-el-is-required asterisk-right\"><label for='ff_106_texto' id='label_ff_106_texto' aria-label=\"Text Area\">Text Area<\/label><\/div><div class='ff-el-input--content'><textarea aria-required=\"true\" aria-labelledby=\"label_ff_106_texto\" name=\"texto\" id=\"ff_106_texto\" class=\"ff-el-form-control\" rows=\"3\" cols=\"2\" maxlength=\"500\" data-name=\"texto\" ><\/textarea><\/div><\/div><div class='ff-el-group  ff-dropzone'><div class=\"ff-el-input--label asterisk-right\"><label for='ff_106_file-upload_1' id='label_ff_106_file-upload_1' aria-label=\"Attachment\">Attachment<\/label><\/div><div class='ff-el-input--content'><label for='ff_106_file-upload_1' class='ff_file_upload_holder'><span class='ff_upload_btn ff-btn' tabindex='0'>Select File<\/span> <input type=\"file\" name=\"file-upload\" id=\"ff_106_file-upload_1\" class=\"ff-el-form-control  ff-screen-reader-element\" data-name=\"file-upload\" multiple=\"1\"  aria-invalid='false' aria-required=false><\/label><\/div><\/div><div class='ff-el-group    ff-el-input--content'><div class='ff-el-form-check ff-el-tc'><label aria-label='Terms and Conditions: Yes, I have read and agree to the Terms and Conditions. Contains 1 link. Use tab navigation to review.' class='ff-el-form-check-label ff_tc_label' for=terms-n-condition_36fb3f6b5b88434d95b8e582375ddfac><span class='ff_tc_checkbox'><input type=\"checkbox\" name=\"terms-n-condition\" class=\"ff-el-form-check-input\" data-name=\"terms-n-condition\" id=\"terms-n-condition_36fb3f6b5b88434d95b8e582375ddfac\"  value='on' aria-invalid='false' aria-required=true><\/span> <div class='ff_t_c'><p>Yes, I have read and agree to the <a href=\"https:\/\/www.ccdr-lvt.pt\/politica-privacidade\/\">Terms and Conditions<\/a>.<\/p><\/div><\/label><\/div><\/div><div class='ff-el-group ff-text-left ff_submit_btn_wrapper'><button type=\"submit\" class=\"ff-btn ff-btn-submit ff-btn-md ff_btn_style\"  aria-label=\"Submit\">Submit<\/button><\/div><\/fieldset><\/form><div id='fluentform_106_errors' class='ff-errors-in-stack ff_form_instance_106_1 ff-form-loading_errors ff_form_instance_106_1_errors'><\/div><\/div>            <script type=\"text\/javascript\">\n                window.fluent_form_ff_form_instance_106_1 = {\"id\":\"106\",\"settings\":{\"layout\":{\"labelPlacement\":\"top\",\"helpMessagePlacement\":\"with_label\",\"errorMessagePlacement\":\"inline\"},\"restrictions\":{\"denyEmptySubmission\":{\"enabled\":false}}},\"form_instance\":\"ff_form_instance_106_1\",\"form_id_selector\":\"fluentform_106\",\"rules\":{\"names[first_name]\":{\"required\":{\"value\":true,\"message\":\"Required field\",\"global_message\":\"This field is required\",\"global\":false}},\"names[middle_name]\":{\"required\":{\"value\":false,\"message\":\"This field is required\",\"global_message\":\"This field is required\",\"global\":true}},\"names[last_name]\":{\"required\":{\"value\":false,\"message\":\"This field is required\",\"global_message\":\"This field is required\",\"global\":true}},\"NIF\":{\"required\":{\"value\":true,\"message\":\"Required field\",\"global_message\":\"This field is required\",\"global\":false}},\"email\":{\"required\":{\"value\":true,\"message\":\"Required field\",\"global_message\":\"This field is required\",\"global\":false},\"email\":{\"value\":true,\"message\":\"This field must contain a valid email address\",\"global_message\":\"This field must contain a valid email\",\"global\":false}},\"phone\":{\"required\":{\"value\":false,\"global\":true,\"message\":\"This field is required\",\"global_message\":\"This field is required\"},\"valid_phone_number\":{\"value\":true,\"global\":false,\"message\":\"Phone number is not valid\",\"global_message\":\"Phone number is not valid\"}},\"dropdown\":{\"required\":{\"value\":true,\"message\":\"Required field\",\"global_message\":\"This field is required\",\"global\":false}},\"texto\":{\"required\":{\"value\":true,\"message\":\"Required field\",\"global_message\":\"This field is required\",\"global\":false}},\"file-upload\":{\"required\":{\"value\":false,\"message\":\"This field is required\",\"global_message\":\"This field is required\",\"global\":true},\"max_file_size\":{\"value\":10485760,\"_valueFrom\":\"MB\",\"message\":\"Maximum size of 10 MB\",\"global_message\":\"Validation fails for maximum file size\",\"global\":false},\"max_file_count\":{\"value\":1,\"message\":\"Maximum limit of 1 file\",\"global_message\":\"Validation fails for maximum file count\",\"global\":false},\"allowed_file_types\":{\"value\":[\"jpg|jpeg|gif|png|bmp\",\"pdf\",\"zip|gz|gzip|rar|7z\"],\"message\":\"Invalid file type\",\"global_message\":\"Invalid file type\",\"global\":false}},\"terms-n-condition\":{\"required\":{\"value\":true,\"message\":\"Required field\",\"global_message\":\"This field is required\",\"global\":false}}},\"debounce_time\":300};\n                            <\/script>\n                    <\/div>\n    <\/section>\n\n<style>\n    @media (max-width: 768px) {\n        .wp-block-column.has-contact-form {\n            border-bottom: 1px solid #E5E7EB;\n        }\n    }\n<\/style>\n\n<script>\n    document.addEventListener('DOMContentLoaded', function() {\n        const contactForm = document.querySelector('.ccdr-contact-form');\n        if (contactForm) {\n            contactForm.closest('.wp-block-column').classList.add('has-contact-form');\n        }\n\n        \/\/ File upload handler\n        const fileUploads = document.querySelectorAll('.ff_file_upload_holder');\n\n        fileUploads.forEach(holder => {\n            const fileInfo = document.createElement('div');\n            fileInfo.className = 'file-info';\n            fileInfo.innerHTML = `\n            <span>Supported Files: jpeg, pdf, png<\/span>\n            <span>Maximum Size: 10MB<\/span>\n        `;\n            holder.appendChild(fileInfo);\n        });\n\n        \/\/ Select elements handler\n        const selects = document.querySelectorAll('.ccdr-contact-form select');\n\n        selects.forEach(select => {\n            if (select.parentNode.querySelector('.select-selected')) return;\n\n            const wrapper = document.createElement('div');\n            wrapper.className = 'custom-select-wrapper';\n            select.parentNode.insertBefore(wrapper, select);\n            wrapper.appendChild(select);\n\n            const selectedDiv = document.createElement('div');\n            selectedDiv.className = 'select-selected';\n            selectedDiv.textContent = select.options[select.selectedIndex].textContent;\n            wrapper.appendChild(selectedDiv);\n\n            const optionsDiv = document.createElement('div');\n            optionsDiv.className = 'select-items select-hide';\n\n            Array.from(select.options).forEach(option => {\n                const optionDiv = document.createElement('div');\n                optionDiv.textContent = option.textContent;\n                optionDiv.addEventListener('click', function() {\n                    select.value = option.value;\n                    selectedDiv.textContent = option.textContent;\n                    this.parentNode.querySelector('.same-as-selected')?.classList.remove('same-as-selected');\n                    this.classList.add('same-as-selected');\n                    select.dispatchEvent(new Event('change'));\n                    closeSelectDropdown();\n                });\n                optionsDiv.appendChild(optionDiv);\n            });\n\n            wrapper.appendChild(optionsDiv);\n\n            selectedDiv.addEventListener('click', function(e) {\n                e.stopPropagation();\n                const wasOpen = !this.classList.contains('select-arrow-active');\n                closeSelectDropdown();\n                if (wasOpen) {\n                    this.classList.add('select-arrow-active');\n                    optionsDiv.classList.remove('select-hide');\n                }\n            });\n        });\n\n        function closeSelectDropdown() {\n            document.querySelectorAll('.select-selected').forEach(el => {\n                el.classList.remove('select-arrow-active');\n            });\n            document.querySelectorAll('.select-items').forEach(el => {\n                el.classList.add('select-hide');\n            });\n        }\n\n        document.addEventListener('click', closeSelectDropdown);\n    });\n<\/script><\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\"><div>\n            <h2 class=\"text-base md:text-lg text-left font-bold text-ccdr-neutral-500\">Sede CCDR Lisboa e Vale do Tejo, I.P.<\/h2>\n        \n            <div class=\"flex items-start md:items-center pt-3 text-grey-darkest gap-2\">\n                            <div class=\"icon\">\n                    <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\">\n<path d=\"M12 6.00006C11.2583 6.00006 10.5333 6.22 9.91661 6.63205C9.29993 7.04411 8.81928 7.62978 8.53545 8.315C8.25162 9.00022 8.17736 9.75422 8.32205 10.4816C8.46675 11.2091 8.8239 11.8773 9.34835 12.4017C9.8728 12.9262 10.541 13.2833 11.2684 13.428C11.9958 13.5727 12.7498 13.4984 13.4351 13.2146C14.1203 12.9308 14.706 12.4501 15.118 11.8334C15.5301 11.2168 15.75 10.4917 15.75 9.75006C15.75 8.7555 15.3549 7.80167 14.6517 7.09841C13.9484 6.39515 12.9946 6.00006 12 6.00006ZM12 12.0001C11.555 12.0001 11.12 11.8681 10.75 11.6209C10.38 11.3736 10.0916 11.0222 9.92127 10.6111C9.75097 10.2 9.70642 9.74757 9.79323 9.31111C9.88005 8.87465 10.0943 8.47374 10.409 8.15907C10.7237 7.8444 11.1246 7.63011 11.561 7.54329C11.9975 7.45648 12.4499 7.50103 12.861 7.67133C13.2722 7.84163 13.6236 8.13002 13.8708 8.50003C14.118 8.87004 14.25 9.30505 14.25 9.75006C14.25 10.3468 14.0129 10.9191 13.591 11.3411C13.169 11.763 12.5967 12.0001 12 12.0001ZM12 1.50006C9.81273 1.50254 7.71575 2.37253 6.16911 3.91917C4.62247 5.46581 3.75248 7.56279 3.75 9.75006C3.75 12.6938 5.11031 15.8138 7.6875 18.7735C8.84552 20.1109 10.1489 21.3152 11.5734 22.3641C11.6995 22.4525 11.8498 22.4999 12.0037 22.4999C12.1577 22.4999 12.308 22.4525 12.4341 22.3641C13.856 21.3148 15.1568 20.1105 16.3125 18.7735C18.8859 15.8138 20.25 12.6938 20.25 9.75006C20.2475 7.56279 19.3775 5.46581 17.8309 3.91917C16.2843 2.37253 14.1873 1.50254 12 1.50006ZM12 20.8126C10.4503 19.5938 5.25 15.1172 5.25 9.75006C5.25 7.95985 5.96116 6.24296 7.22703 4.97709C8.4929 3.71122 10.2098 3.00006 12 3.00006C13.7902 3.00006 15.5071 3.71122 16.773 4.97709C18.0388 6.24296 18.75 7.95985 18.75 9.75006C18.75 15.1154 13.5497 19.5938 12 20.8126Z\" fill=\"#312F2C\"\/>\n<\/svg>\n                <\/div>\n                        <div class=\"flex items-center\">\n                <span class=\"text-sm md:text-base text-left\">Rua Alexandre Herculano, n\u00ba 37, 1250-009 Lisboa<\/span>\n            <\/div>\n        <\/div>\n    <\/div>\n\n\n\n<div id=\"divider-69db08bf223ea\" class=\"w-full\">\n    <hr class=\"border-gray-200\">\n<\/div>\n\n<style>\n    #divider-69db08bf223ea {\n        margin: 32px 0;\n    }\n    @media (min-width: 768px) {\n        #divider-69db08bf223ea {\n            margin: 40px 0;\n        }\n    }\n<\/style>\n\n\n\n<div class=\"relative dl-block ccdr-contact-form\">\n    <div class=\"mb-6 text-left\">\n                    <h2 class=\"text-lg md:text-2xl font-bold text-ccdr-neutral-500 !pt-0\">Consultation on Decentralized Services<\/h2>\n        \n                    <p class=\"text-sm md:text-base text-ccdr-neutral-400 !py-0\">Search for the ideal contact for your subject of interest:<\/p>\n            <\/div>\n\n    <div class=\"dl-filter-section flex flex-col gap-4 mb-6\">\n        <div class=\"dl-input-content relative w-full\">\n            <div class=\"dl-select-selected\">\n                <span>Themes<\/span>\n            <\/div>\n            <div class=\"dl-select-items dl-select-hide\">\n                <div class=\"dl-themes-container\"><\/div>\n            <\/div>\n        <\/div>\n\n        <div class=\"dl-input-content relative w-full dl-disabled\">\n            <div class=\"dl-select-selected\">\n                <span>Sub-themes<\/span>\n            <\/div>\n            <div class=\"dl-select-items dl-select-hide\">\n                <div class=\"dl-subthemes-container\"><\/div>\n            <\/div>\n        <\/div>\n\n        <div class=\"dl-input-content relative w-full dl-disabled\">\n            <div class=\"dl-select-selected\">\n                <span>Locations<\/span>\n            <\/div>\n            <div class=\"dl-select-items dl-select-hide\">\n                <div class=\"dl-locations-container\"><\/div>\n            <\/div>\n        <\/div>\n    <\/div>\n\n    <button class=\"p-2 bg-primary h-12 w-full text-white text-base  font-bold hover:bg-ccdr-blue\/80 focus:bg-ccdr-blue\/80 dl-search-delegations dl-disabled\" disabled>\n        Search    <\/button>\n\n    <button class=\"hidden p-2 bg-white h-12 w-full text-primary text-base font-bold border-2 border-primary hover:bg-gray-50 focus:bg-gray-50 dl-new-search mb-6\">\n        New Research    <\/button>\n\n    <div class=\"dl-loading hidden\">\n        <div class=\"dl-loading-spinner\"><\/div>\n    <\/div>\n\n    <div class=\"dl-results-section\">\n        <!-- Results will be dynamically inserted here -->\n    <\/div>\n<\/div>\n\n<script>\n    function createDelegationList() {\n        const apiEndpoint = 'https:\/\/www.ccdr-lvt.pt\/en\/wp-json\/ccdrv\/v1\/delegations';\n        \n        const state = {\n            allDelegations: [], \n            themes: [],\n            subthemes: [],\n            locations: [],\n            selectedTheme: null,\n            selectedSubtheme: null,\n            selectedLocation: null,\n            delegations: [],\n            page: 1,\n            per_page: 10\n        };\n\n        \/\/ Update extractUniqueValues to handle filtering\n        function extractUniqueValues(delegations, selectedTheme = null, selectedSubtheme = null) {\n            const themes = new Set();\n            const subthemes = new Set();\n            const locations = new Set();\n\n            delegations.forEach(delegation => {\n                if (delegation.themes) {\n                    delegation.themes.forEach(theme => themes.add(theme));\n                }\n\n                if (!selectedTheme) {\n                    if (delegation.subthemes) {\n                        delegation.subthemes.forEach(subtheme => subthemes.add(subtheme));\n                    }\n                } else if (delegation.themes && delegation.themes.includes(selectedTheme)) {\n                    if (delegation.theme_subthemes && delegation.theme_subthemes[selectedTheme]) {\n                        delegation.theme_subthemes[selectedTheme].forEach(subtheme => subthemes.add(subtheme));\n                    }\n                }\n\n                if (selectedSubtheme) {\n                    if (delegation.subthemes && delegation.subthemes.includes(selectedSubtheme)) {\n                        if (delegation.acf_fields?.delegations_localidade) {\n                            locations.add(delegation.acf_fields.delegations_localidade);\n                        }\n                    }\n                } else if (selectedTheme) {\n                    if (delegation.themes && delegation.themes.includes(selectedTheme)) {\n                        if (delegation.acf_fields?.delegations_localidade) {\n                            locations.add(delegation.acf_fields.delegations_localidade);\n                        }\n                    }\n                } else {\n                    if (delegation.acf_fields?.delegations_localidade) {\n                        locations.add(delegation.acf_fields.delegations_localidade);\n                    }\n                }\n            });\n\n            return {\n                themes: Array.from(themes).sort((a, b) => a.localeCompare(b, 'pt', { sensitivity: 'base' })),\n                subthemes: Array.from(subthemes).sort((a, b) => a.localeCompare(b, 'pt', { sensitivity: 'base' })),\n                locations: Array.from(locations).sort((a, b) => a.localeCompare(b, 'pt', { sensitivity: 'base' }))\n            };\n        }\n\n        \/\/ Update initializeFilters function\n        async function initializeFilters() {\n            try {\n                document.querySelector('.dl-loading').classList.add('hidden'); \/\/ Ensure loading is hidden initially\n                const response = await fetch(apiEndpoint, {\n                    method: 'POST',\n                    headers: {\n                        'Content-Type': 'application\/json',\n                    },\n                    body: JSON.stringify({\n                        action: 'get_delegations',\n                        page: 1,\n                        per_page: 100\n                    })\n                });\n\n                if (!response.ok) throw new Error('Network response was not ok');\n                \n                const data = await response.json();\n                state.allDelegations = data.data.delegations;\n                const uniqueValues = extractUniqueValues(state.allDelegations);\n                \n                \/\/ Update state with the fetched values\n                state.themes = uniqueValues.themes;\n                state.subthemes = uniqueValues.subthemes;\n                state.locations = uniqueValues.locations;\n                \n                renderFilters();\n            } catch (error) {\n                console.error('Error initializing filters:', error);\n            }\n        }\n\n        function closeAllDropdowns() {\n            document.querySelectorAll('.dl-select-items').forEach(items => {\n                items.classList.add('dl-select-hide');\n            });\n            document.querySelectorAll('.dl-select-selected').forEach(select => {\n                select.classList.remove('dl-select-arrow-active');\n            });\n        }\n\n        function setupSelectEvents() {\n            \/\/ Setup click events for select headers\n            document.querySelectorAll('.dl-select-selected').forEach(select => {\n                select.removeEventListener('click', handleSelectClick);\n                select.addEventListener('click', handleSelectClick);\n            });\n\n            \/\/ Setup click events for options\n            document.querySelectorAll('.dl-select-items .dl-select-option').forEach(option => {\n                option.removeEventListener('click', handleOptionClick);\n                option.addEventListener('click', handleOptionClick);\n            });\n        }\n\n        function handleSelectClick(e) {\n            e.stopPropagation();\n            \/\/ Check if parent container is disabled\n            if (this.closest('.dl-input-content').classList.contains('dl-disabled')) {\n                return;\n            }\n            \n            const items = this.nextElementSibling;\n            const isOpen = !items.classList.contains('dl-select-hide');\n\n            closeAllDropdowns();\n\n            if (!isOpen) {\n                this.classList.add('dl-select-arrow-active');\n                items.classList.remove('dl-select-hide');\n            }\n        }\n\n        function handleOptionClick(e) {\n            e.stopPropagation();\n            \/\/ Check if parent container is disabled\n            if (this.closest('.dl-input-content').classList.contains('dl-disabled')) {\n                return;\n            }\n            \n            if (this.classList.contains('dl-empty-option')) return;\n            \n            const value = this.dataset.value;\n            const container = this.closest('div[class$=\"-container\"]');\n            const select = container.parentElement.previousElementSibling;\n\n            \/\/ Update the selected value\n            select.querySelector('span').textContent = value;\n\n            \/\/ Remove previous selection\n            container.querySelectorAll('.same-as-selected').forEach(el => {\n                el.classList.remove('same-as-selected');\n            });\n\n            \/\/ Add selection to current option\n            this.classList.add('same-as-selected');\n\n            \/\/ Update the state based on container class\n            if (container.classList.contains('dl-themes-container')) {\n                const previousTheme = state.selectedTheme;\n                state.selectedTheme = value;\n                \n                if (previousTheme !== value && state.selectedSubtheme) {\n                    const filteredValues = extractUniqueValues(state.allDelegations, value);\n                    if (!filteredValues.subthemes.includes(state.selectedSubtheme)) {\n                        state.selectedSubtheme = null;\n                        const subthemeSelectSpan = document.querySelector('.dl-subthemes-container').closest('.dl-input-content').querySelector('.dl-select-selected span');\n                        subthemeSelectSpan.textContent = 'Sub-themes';\n                    }\n                }\n                \n                renderFilters();\n                updateDisabledStates();\n            } else if (container.classList.contains('dl-subthemes-container')) {\n                state.selectedSubtheme = value;\n                renderFilters();\n            } else if (container.classList.contains('dl-locations-container')) {\n                state.selectedLocation = value;\n            }\n\n            closeAllDropdowns();\n        }\n\n        \/\/ Update renderFilters to handle filtered options\n        function renderFilters() {\n            const filteredValues = state.selectedTheme \n                ? extractUniqueValues(state.allDelegations, state.selectedTheme, state.selectedSubtheme)\n                : extractUniqueValues(state.allDelegations);\n\n            \/\/ Themes are always all options\n            document.querySelector('.dl-themes-container').innerHTML =\n                state.themes.length ? \n                state.themes.map(theme => `<div class=\"dl-select-option\" data-value=\"${theme}\">${theme}<\/div>`).join('') :\n                '<div class=\"dl-select-option dl-empty-option\">Nenhum tema dispon\u00edvel<\/div>';\n\n            \/\/ Subthemes and locations are filtered\n            document.querySelector('.dl-subthemes-container').innerHTML =\n                filteredValues.subthemes.length ?\n                filteredValues.subthemes.map(subtheme => `<div class=\"dl-select-option\" data-value=\"${subtheme}\">${subtheme}<\/div>`).join('') :\n                '<div class=\"dl-select-option dl-empty-option\">Nenhum subtema dispon\u00edvel<\/div>';\n\n            document.querySelector('.dl-locations-container').innerHTML =\n                filteredValues.locations.length ?\n                filteredValues.locations.map(location => `<div class=\"dl-select-option\" data-value=\"${location}\">${location}<\/div>`).join('') :\n                '<div class=\"dl-select-option dl-empty-option\">No location to show<\/div>';\n\n            \/\/ Reattach event listeners after DOM update\n            setupSelectEvents();\n\n            const subthemeSelectSpan = document.querySelector('.dl-subthemes-container').closest('.dl-input-content').querySelector('.dl-select-selected span');\n            const locationSelectSpan = document.querySelector('.dl-locations-container').closest('.dl-input-content').querySelector('.dl-select-selected span');\n\n            if (state.selectedSubtheme) {\n                subthemeSelectSpan.textContent = state.selectedSubtheme;\n            } else {\n                subthemeSelectSpan.textContent = 'Sub-themes';\n            }\n\n            if (state.selectedLocation) {\n                locationSelectSpan.textContent = state.selectedLocation;\n            } else {\n                locationSelectSpan.textContent = 'Locations';\n            }\n        }\n\n        async function fetchDelegations() {\n            try {\n                const response = await fetch(apiEndpoint, {\n                    method: 'POST',\n                    headers: {\n                        'Content-Type': 'application\/json',\n                    },\n                    body: JSON.stringify({\n                        action: 'get_delegations',\n                        theme: state.selectedTheme,\n                        subtheme: state.selectedSubtheme,\n                        location: state.selectedLocation,\n                        page: state.page,\n                        per_page: state.per_page\n                    })\n                });\n\n                if (!response.ok) {\n                    throw new Error('Network response was not ok');\n                }\n\n                const data = await response.json();\n                return data.data;\n            } catch (error) {\n                console.error('Error fetching delegations:', error);\n                return { delegations: [] };\n            }\n        }\n\n        function renderResults() {\n            const resultsContainer = document.querySelector('.dl-results-section');\n            resultsContainer.innerHTML = state.delegations.map(delegation => {\n                \/\/ Get ACF fields with fallback\n                const acf = delegation.acf_fields || {};\n                const email = acf.delegations_email || '';\n                const phone = acf.delegations_telefone || '';\n                const address = acf.delegations_endereco_postal || '';\n                const postalCode = acf.delegations_codigo_postal || '';\n                const location = acf.delegations_localidade || '';\n                const schedule = acf.delegations_horario_de_funcionamento || '';\n                const notas = acf.delegations_notas || '';\n\n                return `\n                <div class=\"flex flex-col delegation-card bg-white p-6 shadow-sm mb-6 text-left gap-2\">\n                    <h3 class=\"text-lg md:text-xl font-bold text-ccdr-neutral-500 !p-0\">${delegation.title}<\/h3>\n                    <div class=\"flex flex-col gap-2\">\n                        ${email ? `\n                        <p class=\"flex text-sm md:text-base gap-2 text-left !p-0\">\n                            <svg class=\"mt-1 min-w-[18px]\" width=\"22\" height=\"16\" viewBox=\"0 0 22 16\" fill=\"none\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\">\n                                <path d=\"M20 0.5H2C1.60218 0.5 1.22064 0.658035 0.93934 0.93934C0.658035 1.22064 0.5 1.60218 0.5 2V14C0.5 14.3978 0.658035 14.7794 0.93934 15.0607C1.22064 15.342 1.60218 15.5 2 15.5H20C20.3978 15.5 20.7794 15.342 21.0607 15.0607C21.342 14.7794 21.5 14.3978 21.5 14V2C21.5 1.60218 21.342 1.22064 21.0607 0.93934C20.7794 0.658035 20.3978 0.5 20 0.5ZM18.35 2L11 7.085L3.65 2H18.35ZM2 14V2.6825L10.5725 8.615C10.698 8.7021 10.8472 8.74877 11 8.74877C11.1528 8.74877 11.302 8.7021 11.4275 8.615L20 2.6825V14H2Z\" fill=\"#312F2C\"\/>\n                            <\/svg>\n                            <a href=\"mailto:${email}\" class=\"text-[#005B99] underline transition-colors duration-300 hover:text-[#005B99]\/80\">${email}<\/a>\n                        <\/p>` : ''}\n\n                        ${phone ? `\n                        <p class=\"flex text-sm md:text-base gap-2 text-left !p-0\">\n                            <svg class=\"mt-1 min-w-[18px]\" width=\"20\" height=\"19\" viewBox=\"0 0 20 19\" fill=\"none\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\">\n                            <path d=\"M13.6292 12.891L14.0852 12.438L13.0262 11.374L12.5722 11.827L13.6292 12.891ZM15.6142 12.248L17.5252 13.287L18.2402 11.969L16.3302 10.931L15.6142 12.248ZM17.8922 15.351L16.4722 16.764L17.5292 17.827L18.9492 16.415L17.8922 15.351ZM15.6062 17.218C14.1562 17.354 10.4062 17.233 6.34417 13.195L5.28617 14.258C9.71817 18.665 13.9372 18.881 15.7462 18.712L15.6062 17.218ZM6.34417 13.195C2.47317 9.34496 1.83117 6.10796 1.75117 4.70296L0.253173 4.78796C0.353173 6.55596 1.14817 10.144 5.28617 14.258L6.34417 13.195ZM7.71917 7.01496L8.00617 6.72896L6.95017 5.66596L6.66317 5.95096L7.71917 7.01496ZM8.23417 3.09396L6.97417 1.40996L5.77317 2.30996L7.03317 3.99296L8.23417 3.09396ZM2.73317 1.04296L1.16317 2.60296L2.22117 3.66696L3.79017 2.10696L2.73317 1.04296ZM7.19117 6.48296C6.66117 5.95096 6.66117 5.95096 6.66117 5.95296H6.65917L6.65617 5.95696C6.60865 6.00487 6.5661 6.05748 6.52917 6.11396C6.47517 6.19396 6.41617 6.29896 6.36617 6.43196C6.24445 6.77529 6.21412 7.14437 6.27817 7.50296C6.41217 8.36796 7.00817 9.51096 8.53417 11.029L9.59217 9.96496C8.16317 8.54496 7.82317 7.68096 7.76017 7.27296C7.73017 7.07896 7.76117 6.98296 7.77017 6.96096C7.77617 6.94763 7.77617 6.94563 7.77017 6.95496C7.76126 6.96876 7.75122 6.9818 7.74017 6.99396L7.73017 7.00396L7.72017 7.01296L7.19117 6.48296ZM8.53417 11.029C10.0612 12.547 11.2102 13.139 12.0762 13.271C12.5192 13.339 12.8762 13.285 13.1472 13.184C13.299 13.1284 13.4408 13.0487 13.5672 12.948L13.6172 12.903L13.6242 12.897L13.6272 12.894L13.6282 12.892C13.6282 12.892 13.6292 12.891 13.1002 12.359C12.5702 11.827 12.5732 11.826 12.5732 11.826L12.5752 11.824L12.5772 11.822L12.5832 11.817L12.5932 11.807L12.6312 11.777C12.6405 11.771 12.6382 11.7716 12.6242 11.779C12.5992 11.788 12.5012 11.819 12.3042 11.789C11.8902 11.725 11.0202 11.385 9.59217 9.96496L8.53417 11.029ZM6.97417 1.40896C5.95417 0.0489599 3.95017 -0.16704 2.73317 1.04296L3.79017 2.10696C4.32217 1.57796 5.26617 1.63296 5.77317 2.30996L6.97417 1.40896ZM1.75217 4.70396C1.73217 4.35796 1.89117 3.99596 2.22117 3.66796L1.16217 2.60396C0.625174 3.13796 0.202173 3.89396 0.253173 4.78796L1.75217 4.70396ZM16.4722 16.764C16.1982 17.038 15.9022 17.192 15.6072 17.219L15.7462 18.712C16.4812 18.643 17.0822 18.273 17.5302 17.828L16.4722 16.764ZM8.00617 6.72896C8.99117 5.74996 9.06417 4.20296 8.23517 3.09496L7.03417 3.99396C7.43717 4.53296 7.37717 5.23996 6.94917 5.66696L8.00617 6.72896ZM17.5262 13.288C18.3432 13.732 18.4702 14.778 17.8932 15.352L18.9512 16.415C20.2912 15.082 19.8782 12.859 18.2412 11.97L17.5262 13.288ZM14.0852 12.439C14.4692 12.057 15.0872 11.963 15.6152 12.249L16.3312 10.932C15.2472 10.342 13.9032 10.505 13.0272 11.375L14.0852 12.439Z\" fill=\"#312F2C\"\/>\n                        <\/svg>\n                        Tel.: ${phone.startsWith('+') ? '' : '+'}${phone}\n                    <\/p>` : ''} \n\n                    ${address ? `\n                    <p class=\"flex text-sm md:text-base gap-2 text-left !p-0\">\n                        <svg class=\"min-w-[18px]\" width=\"18\" height=\"22\" viewBox=\"0 0 18 22\" fill=\"none\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\">\n                            <path d=\"M9 5C8.25832 5 7.5333 5.21993 6.91661 5.63199C6.29993 6.04404 5.81928 6.62971 5.53545 7.31494C5.25162 8.00016 5.17736 8.75416 5.32205 9.48159C5.46675 10.209 5.8239 10.8772 6.34835 11.4017C6.8728 11.9261 7.54098 12.2833 8.26841 12.4279C8.99584 12.5726 9.74984 12.4984 10.4351 12.2145C11.1203 11.9307 11.706 11.4501 12.118 10.8334C12.5301 10.2167 12.75 9.49168 12.75 8.75C12.75 7.75544 12.3549 6.80161 11.6517 6.09835C10.9484 5.39509 9.99456 5 9 5ZM9 11C8.55499 11 8.11998 10.868 7.74997 10.6208C7.37996 10.3736 7.09157 10.0222 6.92127 9.61104C6.75097 9.1999 6.70642 8.7475 6.79323 8.31105C6.88005 7.87459 7.09434 7.47368 7.40901 7.15901C7.72368 6.84434 8.12459 6.63005 8.56105 6.54323C8.9975 6.45642 9.4499 6.50097 9.86104 6.67127C10.2722 6.84157 10.6236 7.12996 10.8708 7.49997C11.118 7.86998 11.25 8.30499 11.25 8.75C11.25 9.34674 11.0129 9.91903 10.591 10.341C10.169 10.7629 9.59674 11 9 11ZM9 0.5C6.81273 0.502481 4.71575 1.37247 3.16911 2.91911C1.62247 4.46575 0.752481 6.56273 0.75 8.75C0.75 11.6938 2.11031 14.8138 4.6875 17.7734C5.84552 19.1108 7.14887 20.3151 8.57344 21.3641C8.69954 21.4524 8.84978 21.4998 9.00375 21.4998C9.15772 21.4998 9.30796 21.4524 9.43406 21.3641C10.856 20.3147 12.1568 19.1104 13.3125 17.7734C15.8859 14.8138 17.25 11.6938 17.25 8.75C17.2475 6.56273 16.3775 4.46575 14.8309 2.91911C13.2843 1.37247 11.1873 0.502481 9 0.5ZM9 19.8125C7.45031 18.5938 2.25 14.1172 2.25 8.75C2.25 6.95979 2.96116 5.2429 4.22703 3.97703C5.4929 2.71116 7.20979 2 9 2C10.7902 2 12.5071 2.71116 13.773 3.97703C15.0388 5.2429 15.75 6.95979 15.75 8.75C15.75 14.1153 10.5497 18.5938 9 19.8125Z\" fill=\"#312F2C\"\/>\n                        <\/svg>\n                        <a href=\"https:\/\/www.google.com\/maps\/search\/?api=1&#038;query=${encodeURIComponent(address + (postalCode ? `, ${postalCode}` : '') + (location ? `, ${location}` : ''))}\" target=\"_blank\" rel=\"noopener noreferrer\" class=\"text-[#005B99] underline transition-colors duration-300 hover:text-[#005B99]\/80\">\n                            ${address}${postalCode ? `, ${postalCode}` : ''}${location ? `, ${location}` : ''}\n                        <\/a>\n                    <\/p>` : ''}\n\n                    ${schedule ? `\n                    <p class=\"flex text-sm md:text-base gap-2 text-left !p-0\">\n                        <svg class=\"min-w-[18px]\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\">\n                            <path d=\"M9.99 0C4.47 0 0 4.48 0 10C0 15.52 4.47 20 9.99 20C15.52 20 20 15.52 20 10C20 4.48 15.52 0 9.99 0ZM10 18C5.58 18 2 14.42 2 10C2 5.58 5.58 2 10 2C14.42 2 18 5.58 18 10C18 14.42 14.42 18 10 18ZM10.5 5H9V11L14.25 14.15L15 12.92L10.5 10.25V5Z\" fill=\"#312F2C\"\/>\n                        <\/svg>\n                        ${schedule}\n                    <\/p>` : ''}\n\n                    ${notas ? `\n                    <p class=\"flex text-sm md:text-base gap-2 text-left !p-0 text-ccdr-red-500\">\n                        <svg class=\"min-w-[18px]\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\">\n                        <path d=\"M10 19.25C15.1086 19.25 19.25 15.1086 19.25 10C19.25 4.89137 15.1086 0.75 10 0.75C4.89137 0.75 0.75 4.89137 0.75 10C0.75 15.1086 4.89137 19.25 10 19.25Z\" stroke=\"#312F2C\" stroke-width=\"1.5\"\/>\n                        <path d=\"M10 9.81299V14.813\" stroke=\"#312F2C\" stroke-width=\"1.5\" stroke-linecap=\"round\"\/>\n                        <path d=\"M10 7.68799C10.6904 7.68799 11.25 7.12834 11.25 6.43799C11.25 5.74763 10.6904 5.18799 10 5.18799C9.30964 5.18799 8.75 5.74763 8.75 6.43799C8.75 7.12834 9.30964 7.68799 10 7.68799Z\" fill=\"#312F2C\"\/>\n                        <\/svg>\n\n                        ${notas}\n                    <\/p>` : ''}\n                <\/div>\n            <\/div>`;\n        }).join('');\n    }\n\n        \/\/ Update searchDelegations function\n        async function searchDelegations() {\n            const loadingEl = document.querySelector('.dl-loading');\n            const resultsEl = document.querySelector('.dl-results-section');\n\n            try {\n                loadingEl.classList.remove('hidden');\n                resultsEl.innerHTML = '';\n\n                const response = await fetchDelegations();\n                state.delegations = response.delegations;\n\n                \/\/ Hide search elements and show new search button\n                document.querySelector('.dl-filter-section').style.display = 'none';\n                document.querySelector('.dl-search-delegations').style.display = 'none';\n                document.querySelector('.dl-new-search').style.display = 'block';\n\n                if (state.delegations.length === 0) {\n                    resultsEl.innerHTML = `\n                        <div class=\"flex flex-col items-center justify-center p-8 text-center\">\n                            <p class=\"text-lg text-ccdr-neutral-500 mb-2\">No results were found for your search.<\/p>\n                            <p class=\"text-sm text-ccdr-neutral-400\">Please try different search criteria.<\/p>\n                        <\/div>\n                    `;\n                } else {\n                    renderResults();\n                }\n            } catch (error) {\n                console.error('[Delegation List] Search error:', error);\n                resultsEl.innerHTML = '<p class=\"text-red-500\">Erro ao carregar os resultados.<\/p>';\n            } finally {\n                loadingEl.classList.add('hidden');\n            }\n        }\n\n        function resetSearch() {\n            const filterSection = document.querySelector('.dl-filter-section');\n            const searchButton = document.querySelector('.dl-search-delegations');\n            const newSearchButton = document.querySelector('.dl-new-search');\n            const resultsSection = document.querySelector('.dl-results-section');\n\n            \/\/ Show\/hide elements if they exist\n            if (filterSection) filterSection.style.display = 'flex';\n            if (searchButton) searchButton.style.display = 'block';\n            if (newSearchButton) newSearchButton.style.display = 'none';\n            if (resultsSection) resultsSection.innerHTML = '';\n            document.querySelector('.dl-loading').classList.add('hidden');\n\n            \/\/ Reset selections\n            const selects = document.querySelectorAll('.dl-select-selected span');\n            selects.forEach(span => {\n                if (!span || !span.closest('.dl-input-content')) return;\n                \n                const parentContent = span.closest('.dl-input-content');\n                let defaultText = 'Themes';\n                \n                if (parentContent.querySelector('.dl-subthemes-container')) {\n                    defaultText = 'Sub-themes';\n                } else if (parentContent.querySelector('.dl-locations-container')) {\n                    defaultText = 'Locations';\n                }\n                \n                span.textContent = defaultText;\n            });\n\n            \/\/ Reset state\n            state.selectedTheme = null;\n            state.selectedSubtheme = null;\n            state.selectedLocation = null;\n            state.delegations = [];\n\n            updateDisabledStates();\n        }\n\n        function updateDisabledStates() {\n            const subthemesSelect = document.querySelector('.dl-subthemes-container').closest('.dl-input-content');\n            const locationsSelect = document.querySelector('.dl-locations-container').closest('.dl-input-content');\n            const searchButton = document.querySelector('.dl-search-delegations');\n            \n            if (!state.selectedTheme) {\n                subthemesSelect.classList.add('dl-disabled');\n                locationsSelect.classList.add('dl-disabled');\n                searchButton.classList.add('dl-disabled');\n                searchButton.disabled = true;\n            } else {\n                subthemesSelect.classList.remove('dl-disabled');\n                locationsSelect.classList.remove('dl-disabled');\n                searchButton.classList.remove('dl-disabled');\n                searchButton.disabled = false;\n            }\n        }\n\n        function setupEventListeners() {\n            document.querySelector('.dl-search-delegations').addEventListener('click', searchDelegations);\n            document.querySelector('.dl-new-search').addEventListener('click', resetSearch);\n\n            \/\/ Close dropdowns when clicking outside\n            document.removeEventListener('click', closeAllDropdowns);\n            document.addEventListener('click', closeAllDropdowns);\n            \n            \/\/ Initial setup of select events\n            setupSelectEvents();\n        }\n\n        function init() {\n            initializeFilters();\n            setupEventListeners();\n            updateDisabledStates();\n        }\n\n        return {\n            init,\n            selectFilter: function(type, value) {\n                const selectElement = document.getElementById(type + 's');\n                selectElement.value = value;\n                selectElement.dispatchEvent(new Event('change'));\n            },\n            searchDelegations\n        };\n    }\n\n    function initCustomSelects() {\n        const selects = document.querySelectorAll('.ccdr-contact-form select');\n\n        selects.forEach(select => {\n            if (select.parentNode.querySelector('.select-selected')) return;\n\n            const wrapper = document.createElement('div');\n            wrapper.className = 'custom-select-wrapper';\n            select.parentNode.insertBefore(wrapper, select);\n            wrapper.appendChild(select);\n\n            const selectedDiv = document.createElement('div');\n            selectedDiv.className = 'select-selected';\n            selectedDiv.textContent = select.options[select.selectedIndex].textContent;\n            wrapper.appendChild(selectedDiv);\n\n            const optionsDiv = document.createElement('div');\n            optionsDiv.className = 'select-items select-hide';\n\n            Array.from(select.options).forEach(option => {\n                const optionDiv = document.createElement('div');\n                optionDiv.textContent = option.textContent;\n                optionDiv.addEventListener('click', function() {\n                    select.value = option.value;\n                    selectedDiv.textContent = option.textContent;\n                    this.parentNode.querySelector('.same-as-selected')?.classList.remove('same-as-selected');\n                    this.classList.add('same-as-selected');\n                    select.dispatchEvent(new Event('change'));\n                    closeSelectDropdown();\n                });\n                optionsDiv.appendChild(optionDiv);\n            });\n\n            wrapper.appendChild(optionsDiv);\n\n            selectedDiv.addEventListener('click', function(e) {\n                e.stopPropagation();\n                const wasOpen = !this.classList.contains('select-arrow-active');\n                closeSelectDropdown();\n                if (wasOpen) {\n                    this.classList.add('select-arrow-active');\n                    optionsDiv.classList.remove('select-hide');\n                }\n            });\n        });\n    }\n\n    function closeSelectDropdown() {\n        document.querySelectorAll('.select-selected').forEach(el => {\n            el.classList.remove('select-arrow-active');\n        });\n        document.querySelectorAll('.select-items').forEach(el => {\n            el.classList.add('select-hide');\n        });\n    }\n\n    \/\/ Initialize when DOM is ready\n    let delegationList;\n    document.addEventListener('DOMContentLoaded', () => {\n        delegationList = createDelegationList();\n        delegationList.init();\n    });\n<\/script>\n\n\n<style>\n    \/* Base styles for select container *\/\n    .dl-input-content {\n        position: relative;\n    }\n\n    \/* Target parent columns that contain dl-block *\/\n    .wp-block-columns:has(.dl-block),\n    :where(.wp-block-columns.is-layout-flex):has(.dl-block),\n    :where(.is-layout-flex):has(.dl-block) {\n        gap: 0rem !important;\n    }\n\n    @media (max-width: 764px) {\n        .wp-block-column:has(.dl-block),\n        .wp-block-column .dl-block {\n            align-items: normal !important;\n        }\n    }\n\n    @media (min-width: 768px) {\n\n        .wp-block-columns:has(.dl-block),\n        :where(.wp-block-columns.is-layout-flex):has(.dl-block),\n        :where(.is-layout-flex):has(.dl-block) {\n            gap: 4rem !important;\n        }\n    }\n\n    \/* Selected item styles *\/\n    .dl-select-selected {\n        background-color: white;\n        border: 1px solid #575757;\n        font-size: 1rem;\n        line-height: 1.5rem;\n        text-align: left;\n        color: #312F2C;\n        padding: 0.75rem 1rem;\n        cursor: pointer;\n        position: relative;\n    }\n\n    \/* Arrow indicator *\/\n    .dl-select-selected:after {\n        content: '';\n        position: absolute;\n        right: 1rem;\n        top: 50%;\n        transform: translateY(-50%);\n        width: 10px;\n        height: 6px;\n        transition: transform 0.2s;\n        background-image: url(\"data:image\/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http:\/\/www.w3.org\/2000\/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M5.09532 4.16218C5.07267 4.18468 5.04267 4.19723 5.01148 4.19723C4.98029 4.19723 4.95029 4.18468 4.92764 4.16218L1.23099 0.22618C1.16443 0.156316 1.08541 0.100898 0.998442 0.0630884C0.911475 0.0252785 0.818264 0.00581833 0.724132 0.00581834C0.629999 0.00581834 0.536788 0.0252785 0.449821 0.0630884C0.362854 0.100898 0.283834 0.156316 0.217272 0.22618C0.15071 0.296043 0.0979106 0.378983 0.0618877 0.470263C0.0258647 0.561544 0.00732399 0.659378 0.00732399 0.75818C0.00732399 0.856981 0.0258647 0.954815 0.0618877 1.0461C0.0979107 1.13738 0.15071 1.22032 0.217272 1.29018L4.38648 5.72218C4.46987 5.80777 4.56821 5.87568 4.67611 5.92218C4.78212 5.9697 4.89621 5.99419 5.01148 5.99418C5.1293 5.99505 5.24603 5.97055 5.35447 5.92218C5.46271 5.87277 5.56101 5.80218 5.6441 5.71418L9.78282 1.29018C9.91725 1.14908 9.99277 0.957718 9.99277 0.758179C9.99277 0.558641 9.91725 0.367275 9.78282 0.22618C9.64839 0.0850845 9.46607 0.00581795 9.27596 0.00581796C9.08585 0.00581797 8.90353 0.085084 8.7691 0.226179L6.30721 2.86618L5.09532 4.16218Z' fill='%23312F2C'\/%3E%3C\/svg%3E\");\n    }\n\n    \/* Rotated arrow when active *\/\n    .dl-select-selected.dl-select-arrow-active:after {\n        transform: translateY(-50%) rotate(180deg);\n    }\n\n    \/* Options container *\/\n    .dl-select-items {\n        position: absolute;\n        left: 0;\n        right: 0;\n        top: calc(100% + 4px);\n        z-index: 50;\n        background-color: white;\n        border: 1px solid #D1D5DB;\n        box-shadow: 0 8px 24px 0 rgba(0, 0, 0, 0.12);\n        max-height: 250px;\n        overflow-y: auto;\n        padding: 0;\n    }\n\n    \/* Individual option *\/\n    .dl-select-option {\n        padding: 0.75rem 1rem;\n        cursor: pointer;\n        color: #312F2C;\n        text-align: left;\n        font-size: 1rem;\n        line-height: 1.5rem;\n    }\n\n    \/* Option hover and selected states *\/\n    .dl-select-option:hover,\n    .dl-select-option.same-as-selected {\n        background-color: #F5F9FC;\n    }\n\n    \/* Hide class *\/\n    .dl-select-hide {\n        display: none;\n    }\n\n    .dl-empty-option {\n        color: #666;\n        font-style: italic;\n        cursor: not-allowed;\n    }\n\n    .dl-disabled {\n        cursor: not-allowed;\n    }\n\n    .dl-disabled .dl-select-selected,\n    .dl-disabled .dl-select-items,\n    .dl-disabled * {\n        cursor: not-allowed !important;\n    }\n\n    button.dl-disabled {\n        background-color: #cccccc;\n        cursor: not-allowed;\n    }\n\n    \/* Loading Styles *\/\n    .dl-loading {\n        justify-content: center;\n        padding: 2rem 0;\n        margin: auto;\n        ;\n    }\n\n    .dl-loading-spinner {\n        width: 48px;\n        height: 48px;\n        border: 5px solid #f3f3f3;\n        border-top: 5px solid #005B99;\n        border-radius: 50%;\n        animation: dl-spin 1s linear infinite;\n        position: absolute;\n        right: 50%;\n    }\n\n    @keyframes dl-spin {\n        0% {\n            transform: rotate(0deg);\n        }\n\n        100% {\n            transform: rotate(360deg);\n        }\n    }\n<\/style><\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":6,"featured_media":0,"parent":0,"menu_order":5,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_acf_changed":false,"footnotes":""},"categories":[],"tags":[],"class_list":["post-43304","page","type-page","status-publish","hentry"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.ccdr-lvt.pt\/en\/wp-json\/wp\/v2\/pages\/43304","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ccdr-lvt.pt\/en\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.ccdr-lvt.pt\/en\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.ccdr-lvt.pt\/en\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ccdr-lvt.pt\/en\/wp-json\/wp\/v2\/comments?post=43304"}],"version-history":[{"count":2,"href":"https:\/\/www.ccdr-lvt.pt\/en\/wp-json\/wp\/v2\/pages\/43304\/revisions"}],"predecessor-version":[{"id":43308,"href":"https:\/\/www.ccdr-lvt.pt\/en\/wp-json\/wp\/v2\/pages\/43304\/revisions\/43308"}],"wp:attachment":[{"href":"https:\/\/www.ccdr-lvt.pt\/en\/wp-json\/wp\/v2\/media?parent=43304"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ccdr-lvt.pt\/en\/wp-json\/wp\/v2\/categories?post=43304"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ccdr-lvt.pt\/en\/wp-json\/wp\/v2\/tags?post=43304"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}