{% import 'macros.twig' as macros %} {# === FOOTER === footer.contacts_info -> matriz: text, link_href footer.menu -> matriz: menu_text, link_href footer.menu_policy -> matriz: menu_text, link_href footer.copyright -> entry: text, text_2 footer.socials -> matriz: icone, menu_link -> dentro de .ft-div-3-pp footer.projects_images -> matriz: image -> dentro de .ft-3-div-sm #} {% set copy = footer.copyright.one() ?? null %} {% set project_images = footer.projects_images.all() ?? [] %} {# === CTA DE CONTACTO (secção dinâmica por página, passada pelo layout) === cta_section.image, cta_section.section_title, cta_section.btn_text, cta_section.btn_link Sem cta_section, mantém o conteúdo por defeito (fallback) — não requer backend. #} {% set cta_section = cta_section ?? null %} {% set cta_img = cta_section ? (cta_section.image.one() ?? null) : null %} {% set cta_btn_href = cta_section and cta_section.btn_link ? (cta_section.btn_link.url ?? (cta_section.btn_link ?? '#')) : '#' %} {# Footer "minimal" (sem CTA, .ft-div-r.con, .ft-div-2 escondido): Contactos e Política de Privacidade #} {% set is_contacts = entry is defined and entry and entry.section.handle == 'contacts' %} {% set is_privacy = entry is defined and entry and (entry.privacy_policy_section_1 ?? null) %} {% set footer_minimal = is_contacts or is_privacy %} {% set user_agent = craft.app.request.userAgent %} {% set is_mobile = user_agent matches '/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i' %} {% if 'Chrome-Lighthouse' in user_agent and is_mobile %} {% else %} {% endif %}