/*
 * Portal Institucional - camada visual 2026
 * Inspirada na homepage institucional de Alandroal:
 * verde profundo + creme + amarelo de acento, tipografia editorial,
 * cartões leves, bordas subtis e hierarquia visual clara.
 *
 * Mantida separada de portal-components.css para ser fácil de ajustar/remover.
 */

:root {
    --portal-ui-green: #103b31;
    --portal-ui-green-2: #174b40;
    --portal-ui-green-soft: #eaf0ed;
    --portal-ui-cream: #f7f4ee;
    --portal-ui-cream-2: #eee8de;
    --portal-ui-yellow: #e3b600;
    --portal-ui-ink: #17372f;
    --portal-ui-text: #263b35;
    --portal-ui-muted: #68766f;
    --portal-ui-line: #dedad1;
    --portal-ui-white: #ffffff;
    --portal-ui-shadow: 0 16px 44px rgba(16, 59, 49, .08);
    --portal-ui-shadow-hover: 0 18px 48px rgba(16, 59, 49, .14);
    --portal-ui-radius: 14px;
    --portal-ui-radius-sm: 10px;
    --portal-ui-heading: "Playfair Display", Georgia, "Times New Roman", serif;
    --portal-ui-body: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Base tipográfica dos componentes recuperados. */
.portal-legacy-component,
.portal-page-header,
.portal-cpt-conteudo,
.portal-cpt-acf,
.portal-news-single,
.portal-event-single,
.portal-text-single,
.portal-document-single,
.portal-place-single {
    color: var(--portal-ui-text);
    font-family: var(--portal-ui-body);
}

.portal-legacy-component h1,
.portal-legacy-component h2,
.portal-legacy-component h3,
.portal-page-title,
.portal-news-article__header h1,
.portal-event-article__header h1,
.portal-text-single-article__header h1,
.portal-document-single-article__header h1,
.portal-place-article__header h1,
.portal-news-sidebar h2,
.portal-event-single__aside h2,
.portal-place-contacts h2,
.portal-place-events h2,
.portal-related-content h2,
.portal-acf-field__label {
    color: var(--portal-ui-ink);
    font-family: var(--portal-ui-heading);
    font-weight: 700;
    letter-spacing: -.015em;
}

/* Cabeçalho de páginas/templates. */
.portal-page-header {
    position: relative;
    margin: 0;
    padding: 0;
    border-bottom: 0;
}

.portal-page-header::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 54px;
    height: 3px;
    border-radius: 99px;
    background: var(--portal-ui-yellow);
}

.portal-page-title {
    max-width: 920px;
    margin: .35rem 0 .35rem;
    font-size: clamp(2rem, 4vw, 3.5rem);
    line-height: 1.08;
}

.portal-page-updated,
.portal-news-article__date,
.portal-event-article__updated,
.portal-text-single-article__updated,
.portal-document-single-article__updated,
.portal-place-article__updated {
    color: var(--portal-ui-muted) !important;
    font-size: .875rem !important;
}

/* Breadcrumbs discretos, como elemento auxiliar e não dominante. */
.portal-breadcrumbs,
.portal-news-breadcrumbs,
.portal-event-breadcrumbs,
.portal-text-single-breadcrumbs,
.portal-document-single-breadcrumbs,
.portal-place-breadcrumbs {
    color: var(--portal-ui-muted);
    font-size: .82rem;
    font-weight: 600;
}

.portal-breadcrumbs a,
.portal-news-breadcrumbs a,
.portal-event-breadcrumbs a,
.portal-text-single-breadcrumbs a,
.portal-document-single-breadcrumbs a,
.portal-place-breadcrumbs a {
    color: var(--portal-ui-green) !important;
    text-decoration: none !important;
}

.portal-breadcrumbs a:hover,
.portal-breadcrumbs a:focus-visible,
.portal-news-breadcrumbs a:hover,
.portal-news-breadcrumbs a:focus-visible,
.portal-event-breadcrumbs a:hover,
.portal-event-breadcrumbs a:focus-visible,
.portal-text-single-breadcrumbs a:hover,
.portal-text-single-breadcrumbs a:focus-visible,
.portal-document-single-breadcrumbs a:hover,
.portal-document-single-breadcrumbs a:focus-visible,
.portal-place-breadcrumbs a:hover,
.portal-place-breadcrumbs a:focus-visible {
    text-decoration: underline !important;
    text-underline-offset: .18em;
}

.portal-breadcrumbs li:not(:last-child)::after,
body.single-post nav.portal-news-breadcrumbs li:not(:last-child)::after,
body.single-eventos nav.portal-event-breadcrumbs li:not(:last-child)::after,
body.single-textos nav.portal-text-single-breadcrumbs li:not(:last-child)::after,
body.single-listas_ficheiros nav.portal-document-single-breadcrumbs li:not(:last-child)::after,
body.single-locais nav.portal-place-breadcrumbs li:not(:last-child)::after {
    content: "›";
    margin-left: .55rem;
    color: #96a19c;
}

/* Áreas de conteúdo singulares. */
body.single-post .portal-news-single,
body.single-eventos .portal-event-single,
body.single-textos .portal-text-single,
body.single-listas_ficheiros .portal-document-single,
body.single-locais .portal-place-single {
    background: var(--portal-ui-cream);
}

body.single-post .portal-news-article,
body.single-eventos .portal-event-article,
body.single-textos .portal-text-single-article,
body.single-listas_ficheiros .portal-document-single-article,
body.single-locais .portal-place-article {
    box-sizing: border-box;
    border: 1px solid var(--portal-ui-line);
    border-radius: var(--portal-ui-radius);
    background: var(--portal-ui-white);
    box-shadow: var(--portal-ui-shadow);
    padding: clamp(1.35rem, 3vw, 2.5rem);
}

body.single-post .portal-news-article__header h1,
body.single-eventos .portal-event-article__header h1,
body.single-textos .portal-text-single-article__header h1,
body.single-listas_ficheiros .portal-document-single-article__header h1,
body.single-locais .portal-place-article__header h1 {
    font-size: clamp(2.25rem, 4.8vw, 4rem);
    line-height: 1.04;
}

body.single-post .portal-news-article__content,
body.single-eventos .portal-event-article__content,
body.single-textos .portal-text-single-article__content,
body.single-listas_ficheiros .portal-document-single-article__content,
body.single-locais .portal-place-article__content {
    color: var(--portal-ui-text);
    font-size: 1.04rem;
    line-height: 1.82;
}

body.single-post .portal-news-article__content a,
body.single-eventos .portal-event-article__content a,
body.single-textos .portal-text-single-article__content a,
body.single-listas_ficheiros .portal-document-single-article__content a,
body.single-locais .portal-place-article__content a {
    color: var(--portal-ui-green);
    font-weight: 650;
    text-decoration-color: var(--portal-ui-yellow);
    text-decoration-thickness: 2px;
    text-underline-offset: .18em;
}

/* Galerias/hero visual nos singles. */
.portal-news-gallery,
.portal-event-gallery,
.portal-place-gallery,
.portal-text-gallery {
    overflow: hidden;
    border-radius: var(--portal-ui-radius-sm);
    background: var(--portal-ui-green-soft) !important;
}

.portal-news-gallery img,
.portal-event-gallery img,
.portal-place-gallery img,
.portal-text-gallery img {
    display: block;
    width: 100%;
}

.portal-text-gallery__arrow,
.portal-text-gallery__pause {
    background: rgba(16, 59, 49, .9);
}

.portal-text-gallery__arrow:hover,
.portal-text-gallery__arrow:focus-visible,
.portal-text-gallery__pause:hover,
.portal-text-gallery__pause:focus-visible {
    background: var(--portal-ui-green);
}

/* Sidebars de notícias e eventos. */
body.single-post .portal-news-sidebar,
body.single-post .portal-news-single__aside .portal-related-content,
body.single-eventos .portal-event-details,
body.single-eventos .portal-event-single__aside .portal-related-content {
    border: 1px solid var(--portal-ui-line) !important;
    border-top: 4px solid var(--portal-ui-yellow) !important;
    border-radius: var(--portal-ui-radius-sm);
    background: var(--portal-ui-white);
    box-shadow: 0 10px 30px rgba(16, 59, 49, .06);
    padding: 1.25rem !important;
}

body.single-post .portal-news-sidebar h2,
body.single-post .portal-news-single__aside .portal-related-content h2,
body.single-eventos .portal-event-single__aside .portal-related-content h2 {
    font-size: 1.45rem;
}

body.single-post .portal-news-sidebar__list li,
body.single-post .portal-news-single__aside .portal-related-content__list li,
body.single-eventos .portal-event-single__aside .portal-related-content__list li {
    border-bottom-color: var(--portal-ui-line) !important;
}

body.single-post .portal-news-sidebar__list a,
body.single-post .portal-news-single__aside a,
body.single-eventos .portal-event-single__aside a {
    color: var(--portal-ui-green);
}

body.single-eventos .portal-event-details__item {
    border-bottom: 1px solid var(--portal-ui-line) !important;
    padding: 1rem 0 !important;
}

body.single-eventos .portal-event-details__item:last-child {
    border-bottom: 0 !important;
    padding-bottom: 0 !important;
}

body.single-eventos .portal-event-details__item dt {
    color: var(--portal-ui-muted) !important;
    font-size: .72rem !important;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase !important;
}

body.single-eventos .portal-event-details__item dd {
    color: var(--portal-ui-ink) !important;
    font-size: .95rem !important;
    font-weight: 600;
}

/* Local: painel de contacto com identidade forte. */
body.single-locais .portal-place-info {
    gap: 2rem;
}

body.single-locais .portal-place-info__contacts {
    border-radius: var(--portal-ui-radius-sm);
    background: var(--portal-ui-green);
    color: #fff;
    padding: 1.5rem;
}

body.single-locais .portal-place-contacts {
    border-top: 0 !important;
    padding-top: 0 !important;
}

body.single-locais .portal-place-contacts h2,
body.single-locais .portal-place-contacts h3,
body.single-locais .portal-place-contacts dt,
body.single-locais .portal-place-contacts a {
    color: #fff !important;
}

body.single-locais .portal-place-contacts h2 {
    position: relative;
    padding-bottom: .75rem;
}

body.single-locais .portal-place-contacts h2::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 42px;
    height: 3px;
    border-radius: 99px;
    background: var(--portal-ui-yellow);
}

body.single-locais .portal-place-contacts p,
body.single-locais .portal-place-contacts dd {
    color: rgba(255,255,255,.84);
}

body.single-locais .portal-place-contacts__action {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    margin-top: .35rem;
    border: 1px solid rgba(255,255,255,.3);
    border-radius: 999px;
    padding: .4rem .75rem;
    text-decoration: none !important;
}

body.single-locais .portal-place-contacts__action:hover,
body.single-locais .portal-place-contacts__action:focus-visible {
    border-color: var(--portal-ui-yellow);
    background: var(--portal-ui-yellow);
    color: var(--portal-ui-green) !important;
}

/* Recursos / documentos / links. */
.portal-document-list,
.portal-simple-links,
.portal-text-item__resources ul,
.portal-text-single-resources ul,
.portal-place-resources ul,
.portal-news-resources ul,
.portal-event-resources ul {
    display: grid;
    gap: .6rem;
}

.portal-document-item__link,
.portal-simple-links li,
.portal-text-item__resources .portal-text-resource,
body.single-textos .portal-text-single-resources li,
body.single-locais .portal-place-resource,
body.single-post .portal-news-resources li,
body.single-eventos .portal-event-resources li {
    box-sizing: border-box;
    border: 1px solid var(--portal-ui-line) !important;
    border-radius: var(--portal-ui-radius-sm);
    background: #fff;
    padding: .8rem 1rem !important;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.portal-document-item__link:hover,
.portal-document-item__link:focus-visible,
.portal-text-item__resources .portal-text-resource:hover,
body.single-locais .portal-place-resource:hover {
    border-color: rgba(16,59,49,.35) !important;
    box-shadow: 0 8px 24px rgba(16, 59, 49, .08);
    transform: translateY(-1px);
}

.portal-text-resource__action,
.portal-text-single-resource a,
.portal-place-resource__action,
.portal-document-single__download a,
.portal-acf-file {
    border-radius: 999px;
    color: var(--portal-ui-green) !important;
    font-size: .84rem;
    font-weight: 750 !important;
    text-decoration: none !important;
}

.portal-text-resource__action:not(.portal-text-resource__action--disabled),
.portal-place-resource__action,
.portal-document-single__download a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    border: 1px solid var(--portal-ui-green);
    padding: .35rem .75rem;
}

.portal-text-resource__action:not(.portal-text-resource__action--disabled):hover,
.portal-text-resource__action:not(.portal-text-resource__action--disabled):focus-visible,
.portal-place-resource__action:hover,
.portal-place-resource__action:focus-visible,
.portal-document-single__download a:hover,
.portal-document-single__download a:focus-visible {
    background: var(--portal-ui-green);
    color: #fff !important;
}

/* Cartões de listas: notícias, eventos, locais, eleitos, galerias e relações. */
.portal-card,
.portal-member-card,
.portal-map-place,
.portal-related-card,
.portal-acf-row {
    overflow: hidden;
    border: 1px solid var(--portal-ui-line) !important;
    border-radius: var(--portal-ui-radius-sm);
    background: var(--portal-ui-white);
    box-shadow: 0 8px 26px rgba(16, 59, 49, .04);
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.portal-card:hover,
.portal-card:focus-within,
.portal-member-card:hover,
.portal-map-place:hover,
.portal-related-card:hover {
    border-color: rgba(16,59,49,.28) !important;
    box-shadow: var(--portal-ui-shadow-hover);
    transform: translateY(-3px);
}

.portal-card__media {
    background: var(--portal-ui-green-soft);
}

.portal-card__body,
.portal-member-card__body {
    padding: 1.15rem;
}

.portal-card__body {
    padding-right: 0;
    padding-left: 0;
}

.portal-card {
    background: var(--portal-ui-white) !important;
}

.portal-card__title {
    color: var(--portal-ui-ink);
    font-family: var(--portal-ui-heading);
    font-size: 1.3rem;
    line-height: 1.2;
}

.portal-status {
    border-radius: 999px;
    background: var(--portal-ui-yellow);
    color: var(--portal-ui-green);
    padding: .22rem .5rem;
    font-size: .7rem;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}

/* Filtros/pesquisa dos templates. */
.portal-legacy-filter,
.portal-file-gallery__filters,
.portal-place-map__filters {
    border: 1px solid var(--portal-ui-line);
    border-radius: var(--portal-ui-radius);
    background: var(--portal-ui-cream);
    padding: 1.2rem;
}

.portal-legacy-filter label,
.portal-file-gallery__filters label,
.portal-place-map__filters label {
    color: var(--portal-ui-ink);
    font-size: .78rem;
    font-weight: 750;
}

.portal-legacy-filter input,
.portal-legacy-filter select,
.portal-file-gallery__filters input,
.portal-file-gallery__filters select,
.portal-place-map__filters input,
.portal-place-map__filters select {
    box-sizing: border-box;
    min-height: 46px;
    border: 1px solid var(--portal-ui-line);
    border-radius: 8px;
    background: #fff;
    color: var(--portal-ui-text);
    padding: .65rem .75rem;
}

.portal-legacy-filter input:focus,
.portal-legacy-filter select:focus,
.portal-file-gallery__filters input:focus,
.portal-file-gallery__filters select:focus,
.portal-place-map__filters input:focus,
.portal-place-map__filters select:focus {
    border-color: var(--portal-ui-green);
    outline: 3px solid rgba(16,59,49,.12);
    outline-offset: 1px;
}

.portal-legacy-filter button,
.portal-load-more,
.portal-file-gallery__load-more,
.portal-file-gallery__filter--submit {
    min-height: 46px;
    border: 1px solid var(--portal-ui-green);
    border-radius: 8px;
    background: var(--portal-ui-green);
    color: #fff;
    font-weight: 750;
    transition: background .18s ease, color .18s ease, border-color .18s ease;
}

.portal-legacy-filter button:hover,
.portal-legacy-filter button:focus-visible,
.portal-load-more:hover,
.portal-load-more:focus-visible,
.portal-file-gallery__load-more:hover,
.portal-file-gallery__load-more:focus-visible,
.portal-file-gallery__filter--submit:hover,
.portal-file-gallery__filter--submit:focus-visible {
    border-color: var(--portal-ui-yellow);
    background: var(--portal-ui-yellow);
    color: var(--portal-ui-green);
}

/* Pesquisa numa linha; restantes filtros e botao repartem a linha seguinte. */
.portal-legacy-filter {
    grid-template-columns: minmax(0, 1fr);
}

.portal-legacy-filter__field--keyword {
    grid-column: 1 / -1;
}

.portal-legacy-filter__secondary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
    align-items: end;
    min-width: 0;
}

.portal-legacy-filter__secondary > *,
.portal-legacy-filter__secondary button {
    width: 100%;
}

.portal-events-template .portal-ajax-component[data-portal-ajax-kind="events_past"] {
    margin-top: 40px;
}

/* Botoes textuais dos templates: tamanho legivel e acoes de paginacao centradas. */
.portal-legacy-filter button,
.portal-load-more,
.portal-file-gallery__search,
.portal-file-gallery__load-more {
    font-size: 16px !important;
}

.portal-load-more-wrap,
.portal-file-gallery__actions {
    text-align: center;
}

@media (max-width: 600px) {
    .portal-legacy-filter__secondary {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Accordions, IPIC/ITM, contactos e pastas de documentos. */
.portal-accordion-item,
.portal-folder,
.portal-index__tab {
    overflow: clip;
    margin-bottom: .75rem;
    border: 1px solid var(--portal-ui-line) !important;
    border-radius: var(--portal-ui-radius-sm);
    background: #fff;
}

.portal-accordion-item > summary,
.portal-folder > summary,
.portal-index__tab > summary {
    position: relative;
    min-height: 54px;
    box-sizing: border-box;
    color: var(--portal-ui-ink);
    font-weight: 750;
    padding: .95rem 3.1rem .95rem 1rem;
    list-style: none;
}

.portal-accordion-item > summary::-webkit-details-marker,
.portal-folder > summary::-webkit-details-marker,
.portal-index__tab > summary::-webkit-details-marker {
    display: none;
}

.portal-accordion-item > summary::after,
.portal-folder > summary::after,
.portal-index__tab > summary::after {
    content: "+";
    position: absolute;
    right: 1rem;
    top: 50%;
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
    border-radius: 50%;
    background: var(--portal-ui-green-soft);
    color: var(--portal-ui-green);
    font-size: 1.2rem;
    line-height: 1;
    transform: translateY(-50%);
}

.portal-accordion-item[open] > summary,
.portal-folder[open] > summary,
.portal-index__tab[open] > summary {
    background: var(--portal-ui-cream);
}

.portal-accordion-item[open] > summary::after,
.portal-folder[open] > summary::after,
.portal-index__tab[open] > summary::after {
    content: "−";
    background: var(--portal-ui-green);
    color: #fff;
}

.portal-accordion-item__content,
.portal-folder__content,
.portal-index__tab-content {
    border-top: 1px solid var(--portal-ui-line);
    padding: 1rem !important;
}

/* Mapa/Locais 3. */
.portal-place-map__map,
.portal-event-map iframe,
.portal-acf-map iframe {
    overflow: hidden;
    border: 1px solid var(--portal-ui-line) !important;
    border-radius: var(--portal-ui-radius);
    box-shadow: 0 10px 30px rgba(16, 59, 49, .06);
}

.portal-map-marker span {
    background: var(--portal-ui-green);
    border-color: #fff;
}

/* Mapa do site: diretório institucional em coluna única. */
.portal-sitemap {
    width: 100%;
    max-width: 940px;
    margin: 0 auto;
}

.portal-sitemap .portal-sitemap__menu {
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Cada área principal é um único bloco horizontal, sempre em coluna. */
.portal-sitemap .portal-sitemap__menu > li {
    overflow: hidden;
    margin: 0 0 1.25rem !important;
    padding: 0 !important;
    border: 1px solid var(--portal-ui-line) !important;
    border-radius: 12px !important;
    background: var(--portal-ui-white) !important;
}

.portal-sitemap .portal-sitemap__menu > li:last-child {
    margin-bottom: 0 !important;
}

/* Cabeçalho de cada grupo. */
.portal-sitemap .portal-sitemap__menu > li > a,
.portal-sitemap .portal-sitemap__menu > li > span {
    display: block !important;
    width: 100%;
    box-sizing: border-box;
    margin: 0 !important;
    padding: 1rem 1.25rem 1rem 1.4rem !important;
    border: 0 !important;
    border-left: 5px solid var(--portal-ui-yellow) !important;
    background: var(--portal-ui-cream) !important;
    color: var(--portal-ui-green) !important;
    font-family: var(--portal-ui-heading);
    font-size: clamp(1.35rem, 2vw, 1.65rem);
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none !important;
}

.portal-sitemap .portal-sitemap__menu > li > a::after,
.portal-sitemap .portal-sitemap__menu > li > span::after {
    content: none !important;
}

.portal-sitemap .portal-sitemap__menu > li > a:hover,
.portal-sitemap .portal-sitemap__menu > li > a:focus-visible {
    background: var(--portal-ui-cream-2) !important;
    color: var(--portal-ui-green) !important;
    text-decoration: underline !important;
    text-decoration-color: currentColor !important;
    text-underline-offset: .18em;
}

.portal-sitemap .sub-menu,
.portal-sitemap .children {
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
}

.portal-sitemap .sub-menu li,
.portal-sitemap .children li {
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
}

/* Segundo nível: linhas limpas, como um índice/diretório. */
.portal-sitemap .portal-sitemap__menu > li > .sub-menu > li > a,
.portal-sitemap .portal-sitemap__menu > li > .children > li > a {
    position: relative;
    display: block;
    width: 100%;
    box-sizing: border-box;
    margin: 0 !important;
    padding: .9rem 3rem .9rem 1.4rem !important;
    border: 0 !important;
    border-top: 1px solid var(--portal-ui-line) !important;
    background: var(--portal-ui-white) !important;
    color: var(--portal-ui-ink) !important;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.45;
    text-decoration: none !important;
    transition: background-color 160ms ease, color 160ms ease;
}

.portal-sitemap .portal-sitemap__menu > li > .sub-menu > li > a::after,
.portal-sitemap .portal-sitemap__menu > li > .children > li > a::after {
    content: "→";
    position: absolute;
    top: 50%;
    right: 1.25rem;
    transform: translateY(-50%);
    color: var(--portal-ui-green);
    font-family: var(--portal-ui-body);
    font-size: 1.05rem;
    font-weight: 700;
}

.portal-sitemap .portal-sitemap__menu > li > .sub-menu > li > a:hover,
.portal-sitemap .portal-sitemap__menu > li > .sub-menu > li > a:focus-visible,
.portal-sitemap .portal-sitemap__menu > li > .children > li > a:hover,
.portal-sitemap .portal-sitemap__menu > li > .children > li > a:focus-visible {
    background: var(--portal-ui-green-soft) !important;
    color: var(--portal-ui-green) !important;
    text-decoration: underline !important;
    text-decoration-color: currentColor !important;
    text-underline-offset: .18em;
}

/* Níveis 3 a 5: hierarquia discreta dentro da mesma coluna, sem novos cartões. */
.portal-sitemap .sub-menu .sub-menu,
.portal-sitemap .children .children {
    position: relative;
    margin: 0 1.25rem 0 1.4rem !important;
    padding: .25rem 0 .45rem 1.1rem !important;
    border-left: 2px solid var(--portal-ui-cream-2) !important;
    background: #fbfaf7 !important;
}

.portal-sitemap .sub-menu .sub-menu a,
.portal-sitemap .children .children a {
    position: relative;
    display: block;
    width: 100%;
    box-sizing: border-box;
    margin: 0 !important;
    padding: .58rem 2.2rem .58rem .85rem !important;
    border: 0 !important;
    background: transparent !important;
    color: var(--portal-ui-text) !important;
    font-size: .9375rem;
    font-weight: 500;
    line-height: 1.45;
    text-decoration: none !important;
}

.portal-sitemap .sub-menu .sub-menu a::before,
.portal-sitemap .children .children a::before {
    content: "";
    position: absolute;
    left: -.28rem;
    top: 50%;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--portal-ui-yellow);
    transform: translateY(-50%);
}

.portal-sitemap .sub-menu .sub-menu a::after,
.portal-sitemap .children .children a::after {
    content: "›";
    position: absolute;
    top: 50%;
    right: .8rem;
    transform: translateY(-50%);
    color: var(--portal-ui-muted);
    font-size: 1.05rem;
}

.portal-sitemap .sub-menu .sub-menu a:hover,
.portal-sitemap .sub-menu .sub-menu a:focus-visible,
.portal-sitemap .children .children a:hover,
.portal-sitemap .children .children a:focus-visible {
    background: var(--portal-ui-green-soft) !important;
    color: var(--portal-ui-green) !important;
    text-decoration: underline !important;
    text-decoration-color: currentColor !important;
    text-underline-offset: .18em;
}

/* Profundidade adicional sem aumentar demasiado o recuo. */
.portal-sitemap .sub-menu .sub-menu .sub-menu,
.portal-sitemap .children .children .children {
    margin-right: 0 !important;
    margin-left: .65rem !important;
    padding-left: .8rem !important;
    border-left-color: var(--portal-ui-line) !important;
}

@media (max-width: 700px) {
    .portal-sitemap .portal-sitemap__menu > li > a,
    .portal-sitemap .portal-sitemap__menu > li > span {
        padding: .9rem 1rem .9rem 1.1rem !important;
    }

    .portal-sitemap .portal-sitemap__menu > li > .sub-menu > li > a,
    .portal-sitemap .portal-sitemap__menu > li > .children > li > a {
        padding: .82rem 2.5rem .82rem 1.1rem !important;
    }

    .portal-sitemap .sub-menu .sub-menu,
    .portal-sitemap .children .children {
        margin-right: .75rem !important;
        margin-left: 1.1rem !important;
        padding-left: .75rem !important;
    }
}

/* ACF genérico para CPTs sem renderer específico. */
.portal-cpt-acf > .portal-acf-field,
.portal-cpt-conteudo > .portal-acf-field {
    border: 1px solid var(--portal-ui-line);
    border-radius: var(--portal-ui-radius-sm);
    background: #fff;
    padding: 1.15rem;
}

.portal-acf-field__label {
    position: relative;
    padding-bottom: .55rem;
}

.portal-acf-field__label::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 34px;
    height: 2px;
    background: var(--portal-ui-yellow);
}

/* Estado de foco consistente. */
.portal-legacy-component a:focus-visible,
.portal-news-single a:focus-visible,
.portal-event-single a:focus-visible,
.portal-text-single a:focus-visible,
.portal-document-single a:focus-visible,
.portal-place-single a:focus-visible,
.portal-legacy-component button:focus-visible {
    outline: 3px solid var(--portal-ui-yellow);
    outline-offset: 3px;
}

/* Divi Theme Builder: manter o design, mas sem voltar a criar fundos/paddings externos. */
.portal-news-single--embedded,
.portal-event-single--embedded,
.portal-text-single--embedded,
.portal-document-single--embedded,
.portal-place-single--embedded {
    background: transparent !important;
}

@media (max-width: 980px) {
    body.single-post .portal-news-single__aside,
    body.single-eventos .portal-event-single__aside {
        display: grid;
        grid-template-columns: repeat(2, minmax(0,1fr));
        gap: 1rem;
    }
}

@media (max-width: 600px) {
    .portal-page-title,
    body.single-post .portal-news-article__header h1,
    body.single-eventos .portal-event-article__header h1,
    body.single-textos .portal-text-single-article__header h1,
    body.single-listas_ficheiros .portal-document-single-article__header h1,
    body.single-locais .portal-place-article__header h1 {
        font-size: clamp(2rem, 10vw, 2.7rem);
    }

    body.single-post .portal-news-article,
    body.single-eventos .portal-event-article,
    body.single-textos .portal-text-single-article,
    body.single-listas_ficheiros .portal-document-single-article,
    body.single-locais .portal-place-article {
        padding: 1.15rem;
    }

    body.single-post .portal-news-single__aside,
    body.single-eventos .portal-event-single__aside {
        grid-template-columns: 1fr;
    }

    .portal-sitemap .sub-menu .sub-menu,
    .portal-sitemap .children .children {
        margin-left: .75rem !important;
    }

    .portal-text-item__resources .portal-text-resource,
    body.single-locais .portal-place-resource {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (prefers-reduced-motion: reduce) {
    .portal-card,
    .portal-member-card,
    .portal-map-place,
    .portal-related-card,
    .portal-document-item__link,
    .portal-text-item__resources .portal-text-resource,
    body.single-locais .portal-place-resource {
        transition: none;
    }
}

/* ==========================================================
 * 2.1.41 - refinamentos de legibilidade e recursos clicáveis
 * ========================================================== */

:root {
    --portal-ui-link: #0b6251;
    --portal-ui-link-hover: #073f35;
}

/* Corpo de texto: nunca abaixo de 16 px nos componentes do portal. */
.portal-legacy-component,
.portal-cpt-conteudo,
.portal-cpt-acf,
.portal-news-single,
.portal-event-single,
.portal-text-single,
.portal-document-single,
.portal-place-single,
.portal-text-item__body,
.portal-news-article__content,
.portal-event-article__content,
.portal-text-single-article__content,
.portal-document-single-article__content,
.portal-place-article__content {
    font-size: 1rem;
}

/* Cabeçalho: título mais contido e acento amarelo imediatamente após o H1. */
.portal-page-header {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: 0;
}

.portal-page-header::after {
    content: none;
    display: none;
}

.portal-page-title {
    position: relative;
    max-width: 920px;
    margin: .35rem 0 .65rem;
    padding-bottom: .8rem;
    font-size: clamp(2rem, 3vw, 2.8rem);
    line-height: 1.12;
}

.portal-page-title::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 54px;
    height: 3px;
    border-radius: 99px;
    background: var(--portal-ui-yellow);
}

/* Metadados/elementos auxiliares: mínimo equivalente a 14 px. */
.portal-page-updated,
.portal-news-article__date,
.portal-event-article__updated,
.portal-text-single-article__updated,
.portal-document-single-article__updated,
.portal-place-article__updated,
.portal-breadcrumbs,
.portal-news-breadcrumbs,
.portal-event-breadcrumbs,
.portal-text-single-breadcrumbs,
.portal-document-single-breadcrumbs,
.portal-place-breadcrumbs,
.portal-document-item__date,
.portal-text-resource__meta,
.portal-place-resource__meta,
.portal-event-details__item dt,
.portal-event-details__item dd,
.portal-legacy-filter label,
.portal-file-gallery__filters label,
.portal-place-map__filters label,
.portal-text-resource__action,
.portal-status {
    font-size: .875rem !important;
}

/* Galeria de Texto - 1: viewport maior no desktop. */
.portal-text-gallery__viewport {
    height: 500px !important;
}

/* Links editoriais no meio do texto: visivelmente identificáveis como links. */
.portal-text-item__body a,
.portal-news-article__content a,
.portal-event-article__content a,
.portal-text-single-article__content a,
.portal-document-single-article__content a,
.portal-place-article__content a,
.portal-cpt-conteudo .entry-content a,
.portal-cpt-acf .portal-acf-field__value a {
    color: var(--portal-ui-link) !important;
    font-weight: 650;
    text-decoration-line: underline !important;
    text-decoration-color: currentColor !important;
    text-decoration-thickness: .09em !important;
    text-underline-offset: .18em;
}

.portal-text-item__body a:hover,
.portal-text-item__body a:focus-visible,
.portal-news-article__content a:hover,
.portal-news-article__content a:focus-visible,
.portal-event-article__content a:hover,
.portal-event-article__content a:focus-visible,
.portal-text-single-article__content a:hover,
.portal-text-single-article__content a:focus-visible,
.portal-document-single-article__content a:hover,
.portal-document-single-article__content a:focus-visible,
.portal-place-article__content a:hover,
.portal-place-article__content a:focus-visible,
.portal-cpt-conteudo .entry-content a:hover,
.portal-cpt-conteudo .entry-content a:focus-visible,
.portal-cpt-acf .portal-acf-field__value a:hover,
.portal-cpt-acf .portal-acf-field__value a:focus-visible {
    color: var(--portal-ui-link-hover) !important;
    text-decoration-thickness: .13em !important;
}

/*
 * Documentos e ligações usam a mesma linguagem de cartões.
 * O próprio <a> ocupa a linha completa: não há pequenas áreas clicáveis.
 */
.portal-document-list > .portal-document-item,
.portal-simple-links > li,
.portal-text-item__resources .portal-text-resource,
body.single-textos .portal-text-single-resources li,
body.single-locais .portal-place-resource,
body.single-post .portal-news-resources li,
body.single-eventos .portal-event-resources li {
    border: 0 !important;
    background: transparent !important;
    padding: 0 !important;
    box-shadow: none !important;
}

.portal-document-item__link,
.portal-simple-links > li > a,
.portal-text-item__resources .portal-text-resource__row,
body.single-textos .portal-text-single-resource > a,
body.single-textos .portal-text-single-resource__disabled-row,
body.single-locais .portal-place-resource__row {
    box-sizing: border-box;
    display: grid;
    grid-template-columns: 2rem minmax(0, 1fr) auto;
    gap: .8rem;
    align-items: center;
    width: 100%;
    min-height: 58px;
    border: 1px solid var(--portal-ui-line) !important;
    border-radius: var(--portal-ui-radius-sm);
    background: var(--portal-ui-white);
    color: var(--portal-ui-ink) !important;
    padding: .85rem 1rem !important;
    text-decoration: none !important;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease, background-color .18s ease;
}

.portal-document-item__link[href]:hover,
.portal-document-item__link[href]:focus-visible,
.portal-simple-links > li > a:hover,
.portal-simple-links > li > a:focus-visible,
.portal-text-item__resources .portal-text-resource__row[href]:hover,
.portal-text-item__resources .portal-text-resource__row[href]:focus-visible,
body.single-textos .portal-text-single-resource > a:hover,
body.single-textos .portal-text-single-resource > a:focus-visible,
body.single-locais .portal-place-resource__row[href]:hover,
body.single-locais .portal-place-resource__row[href]:focus-visible {
    border-color: rgba(16,59,49,.42) !important;
    background: #fbfcfb;
    box-shadow: 0 9px 24px rgba(16, 59, 49, .09);
    transform: translateY(-2px);
}

.portal-document-item__title,
.portal-link-item__title,
.portal-text-resource__title,
.portal-place-resource__title,
.portal-text-single-resource > a > span:not(.portal-text-single-resource__icon):not(.portal-visually-hidden) {
    color: var(--portal-ui-ink);
    font-size: 1rem;
    font-weight: 650;
    line-height: 1.45;
}

.portal-document-item__date,
.portal-text-resource__meta,
.portal-place-resource__meta {
    color: var(--portal-ui-muted);
    white-space: nowrap;
}

.portal-text-resource__row--disabled,
.portal-text-single-resource__disabled-row,
.portal-place-resource__row--disabled,
.portal-document-item__link--disabled {
    opacity: .68;
    cursor: default;
}

/* Documento: ícone CSS outline, sem emoji. */
.portal-document-item__icon,
.portal-text-resource__icon--document,
.portal-text-single-resource--document .portal-text-single-resource__icon,
.portal-place-resource__icon {
    position: relative;
    display: block;
    width: 18px;
    height: 22px;
    box-sizing: border-box;
    justify-self: center;
    border: 2px solid var(--portal-ui-green);
    border-radius: 2px;
    color: transparent !important;
    font-size: 0 !important;
}

.portal-document-item__icon::after,
.portal-text-resource__icon--document::after,
.portal-text-single-resource--document .portal-text-single-resource__icon::after,
.portal-place-resource__icon::after {
    content: "";
    position: absolute;
    left: 3px;
    right: 3px;
    top: 7px;
    height: 2px;
    border-radius: 2px;
    background: var(--portal-ui-green);
    box-shadow: 0 5px 0 var(--portal-ui-green);
}

/* Link: seta simples antes do texto, sem emoji. */
.portal-link-item__icon,
.portal-text-resource__icon--link,
.portal-text-single-resource--link .portal-text-single-resource__icon {
    position: relative;
    display: grid;
    width: 24px;
    height: 24px;
    place-items: center;
    justify-self: center;
    border: 1px solid rgba(16,59,49,.32);
    border-radius: 50%;
    color: var(--portal-ui-green) !important;
    font-size: 0 !important;
}

.portal-link-item__icon::before,
.portal-text-resource__icon--link::before,
.portal-text-single-resource--link .portal-text-single-resource__icon::before {
    content: "→";
    color: var(--portal-ui-green);
    font-family: var(--portal-ui-body);
    font-size: 1rem;
    font-weight: 800;
    line-height: 1;
}

/* Links antigos sem span de ícone continuam a receber a seta. */
.portal-simple-links > li:not(.portal-link-item):not(.portal-text-resource) > a::before {
    content: "→";
    display: grid;
    width: 24px;
    height: 24px;
    place-items: center;
    justify-self: center;
    border: 1px solid rgba(16,59,49,.32);
    border-radius: 50%;
    color: var(--portal-ui-green);
    font-size: 1rem;
    font-weight: 800;
}

@media (max-width: 600px) {
    .portal-page-title,
    body.single-post .portal-news-article__header h1,
    body.single-eventos .portal-event-article__header h1,
    body.single-textos .portal-text-single-article__header h1,
    body.single-listas_ficheiros .portal-document-single-article__header h1,
    body.single-locais .portal-place-article__header h1 {
        font-size: clamp(1.85rem, 8vw, 2.35rem);
    }

    .portal-text-gallery__viewport {
        height: 320px !important;
        aspect-ratio: auto !important;
    }

    .portal-document-item__link,
    .portal-simple-links > li > a,
    .portal-text-item__resources .portal-text-resource__row,
    body.single-textos .portal-text-single-resource > a,
    body.single-textos .portal-text-single-resource__disabled-row,
    body.single-locais .portal-place-resource__row {
        grid-template-columns: 2rem minmax(0, 1fr);
    }

    .portal-document-item__date,
    .portal-text-resource__meta,
    .portal-place-resource__meta {
        grid-column: 2;
        white-space: normal;
    }
}

@media (prefers-reduced-motion: reduce) {
    .portal-document-item__link,
    .portal-simple-links > li > a,
    .portal-text-item__resources .portal-text-resource__row,
    body.single-textos .portal-text-single-resource > a,
    body.single-locais .portal-place-resource__row {
        transition: none;
    }
}

/* Evitar que os antigos efeitos aplicados ao <li> se acumulem com o novo cartão clicável. */
.portal-text-item__resources .portal-text-resource:hover,
.portal-text-item__resources .portal-text-resource:focus-within,
body.single-locais .portal-place-resource:hover,
body.single-locais .portal-place-resource:focus-within {
    border-color: transparent !important;
    box-shadow: none !important;
    transform: none !important;
}

/* ================================================================
 * DESIGN 2.1.42 - HOVER DE RECURSOS, ICONE DE LINK E RELACIONADOS
 * ================================================================ */

/*
 * Documentos e links: no hover/focus a geometria permanece estável.
 * A indicação de interação é feita apenas pela cor de fundo/texto.
 */
.portal-document-item__link[href]:hover,
.portal-document-item__link[href]:focus-visible,
.portal-simple-links > li > a:hover,
.portal-simple-links > li > a:focus-visible,
.portal-text-item__resources .portal-text-resource__row[href]:hover,
.portal-text-item__resources .portal-text-resource__row[href]:focus-visible,
body.single-textos .portal-text-single-resource > a:hover,
body.single-textos .portal-text-single-resource > a:focus-visible,
body.single-locais .portal-place-resource__row[href]:hover,
body.single-locais .portal-place-resource__row[href]:focus-visible {
    border-color: var(--portal-ui-green) !important;
    background: var(--portal-ui-green) !important;
    color: var(--portal-ui-white) !important;
    box-shadow: none !important;
    transform: none !important;
}

/* Todo o conteúdo do cartão acompanha a nova cor no hover/focus. */
.portal-document-item__link[href]:hover .portal-document-item__title,
.portal-document-item__link[href]:focus-visible .portal-document-item__title,
.portal-document-item__link[href]:hover .portal-document-item__date,
.portal-document-item__link[href]:focus-visible .portal-document-item__date,
.portal-simple-links > li > a:hover,
.portal-simple-links > li > a:focus-visible,
.portal-simple-links > li > a:hover *,
.portal-simple-links > li > a:focus-visible *,
.portal-text-item__resources .portal-text-resource__row[href]:hover .portal-text-resource__title,
.portal-text-item__resources .portal-text-resource__row[href]:focus-visible .portal-text-resource__title,
.portal-text-item__resources .portal-text-resource__row[href]:hover .portal-text-resource__meta,
.portal-text-item__resources .portal-text-resource__row[href]:focus-visible .portal-text-resource__meta,
body.single-textos .portal-text-single-resource > a:hover,
body.single-textos .portal-text-single-resource > a:focus-visible,
body.single-textos .portal-text-single-resource > a:hover *,
body.single-textos .portal-text-single-resource > a:focus-visible *,
body.single-locais .portal-place-resource__row[href]:hover,
body.single-locais .portal-place-resource__row[href]:focus-visible,
body.single-locais .portal-place-resource__row[href]:hover *,
body.single-locais .portal-place-resource__row[href]:focus-visible * {
    color: var(--portal-ui-white) !important;
}

/* Ícone outline de documento também inverte para branco. */
.portal-document-item__link[href]:hover .portal-document-item__icon,
.portal-document-item__link[href]:focus-visible .portal-document-item__icon,
.portal-text-resource__row--document[href]:hover .portal-text-resource__icon--document,
.portal-text-resource__row--document[href]:focus-visible .portal-text-resource__icon--document,
body.single-textos .portal-text-single-resource--document > a:hover .portal-text-single-resource__icon,
body.single-textos .portal-text-single-resource--document > a:focus-visible .portal-text-single-resource__icon,
body.single-locais .portal-place-resource__row[href]:hover .portal-place-resource__icon,
body.single-locais .portal-place-resource__row[href]:focus-visible .portal-place-resource__icon {
    border-color: var(--portal-ui-white) !important;
}

.portal-document-item__link[href]:hover .portal-document-item__icon::after,
.portal-document-item__link[href]:focus-visible .portal-document-item__icon::after,
.portal-text-resource__row--document[href]:hover .portal-text-resource__icon--document::after,
.portal-text-resource__row--document[href]:focus-visible .portal-text-resource__icon--document::after,
body.single-textos .portal-text-single-resource--document > a:hover .portal-text-single-resource__icon::after,
body.single-textos .portal-text-single-resource--document > a:focus-visible .portal-text-single-resource__icon::after,
body.single-locais .portal-place-resource__row[href]:hover .portal-place-resource__icon::after,
body.single-locais .portal-place-resource__row[href]:focus-visible .portal-place-resource__icon::after {
    background: var(--portal-ui-white) !important;
    box-shadow: 0 5px 0 var(--portal-ui-white) !important;
}

/*
 * Links: seta simples sem círculo/caixa. Mantém leitura visual discreta
 * e evita competir com o ícone outline dos documentos.
 */
.portal-link-item__icon,
.portal-text-resource__icon--link,
.portal-text-single-resource--link .portal-text-single-resource__icon {
    width: 24px;
    height: 24px;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: var(--portal-ui-green) !important;
}

.portal-link-item__icon::before,
.portal-text-resource__icon--link::before,
.portal-text-single-resource--link .portal-text-single-resource__icon::before {
    content: "→";
    display: block;
    color: currentColor;
    font-family: var(--portal-ui-body);
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1;
}

.portal-text-resource__row--link[href]:hover .portal-text-resource__icon--link,
.portal-text-resource__row--link[href]:focus-visible .portal-text-resource__icon--link,
body.single-textos .portal-text-single-resource--link > a:hover .portal-text-single-resource__icon,
body.single-textos .portal-text-single-resource--link > a:focus-visible .portal-text-single-resource__icon {
    color: var(--portal-ui-white) !important;
}

/* Links antigos sem span de ícone: seta simples, sem círculo. */
.portal-simple-links > li:not(.portal-link-item):not(.portal-text-resource) > a::before {
    content: "→";
    display: block;
    width: 24px;
    height: auto;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: var(--portal-ui-green);
    font-family: var(--portal-ui-body);
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1;
    text-align: center;
}

.portal-simple-links > li:not(.portal-link-item):not(.portal-text-resource) > a:hover::before,
.portal-simple-links > li:not(.portal-link-item):not(.portal-text-resource) > a:focus-visible::before {
    color: var(--portal-ui-white);
}

/*
 * Conteúdos relacionados: o tipo continua secundário, enquanto o título
 * clicável passa a ter cor própria e sublinhado permanente.
 */
.portal-related-content__list a {
    color: #0b5d4c !important;
    font-weight: 650;
    text-decoration-line: underline !important;
    text-decoration-color: currentColor !important;
    text-decoration-thickness: 2px !important;
    text-underline-offset: .2em;
}

.portal-related-content__list a:hover,
.portal-related-content__list a:focus-visible {
    color: var(--portal-ui-green) !important;
    text-decoration-color: var(--portal-ui-green) !important;
}

/* ================================================================
 * DESIGN 2.1.46 - LISTAS SEM MOVIMENTO, RITMO TIPOGRAFICO E LOCAIS
 * ================================================================ */

/*
 * Cartoes/listagens: os estados hover/focus deixam de criar profundidade
 * ou deslocacao. A interacao e indicada apenas por borda/fundo/cor.
 */
.portal-card,
.portal-member-card,
.portal-map-place,
.portal-related-card,
.portal-acf-row {
    box-shadow: none !important;
    transition: border-color .18s ease, background-color .18s ease, color .18s ease !important;
}

.portal-card:hover,
.portal-card:focus-within,
.portal-member-card:hover,
.portal-member-card:focus-within,
.portal-map-place:hover,
.portal-map-place:focus-within,
.portal-related-card:hover,
.portal-related-card:focus-within {
    border-color: rgba(16, 59, 49, .34) !important;
    background: #fbfcfb !important;
    box-shadow: none !important;
    transform: none !important;
}

/* O mesmo principio aplica-se aos recursos clicaveis e wrappers legados. */
.portal-document-item__link,
.portal-simple-links > li > a,
.portal-text-item__resources .portal-text-resource__row,
body.single-textos .portal-text-single-resource > a,
body.single-textos .portal-text-single-resource__disabled-row,
body.single-locais .portal-place-resource__row {
    transition: border-color .18s ease, background-color .18s ease, color .18s ease !important;
}

.portal-document-item__link[href]:hover,
.portal-document-item__link[href]:focus-visible,
.portal-simple-links > li > a:hover,
.portal-simple-links > li > a:focus-visible,
.portal-text-item__resources .portal-text-resource__row[href]:hover,
.portal-text-item__resources .portal-text-resource__row[href]:focus-visible,
body.single-textos .portal-text-single-resource > a:hover,
body.single-textos .portal-text-single-resource > a:focus-visible,
body.single-locais .portal-place-resource__row[href]:hover,
body.single-locais .portal-place-resource__row[href]:focus-visible,
.portal-text-item__resources .portal-text-resource:hover,
.portal-text-item__resources .portal-text-resource:focus-within,
body.single-locais .portal-place-resource:hover,
body.single-locais .portal-place-resource:focus-within {
    box-shadow: none !important;
    transform: none !important;
}

/*
 * Ritmo de leitura: texto corrente e auxiliar usa, no minimo, 1.5x o
 * tamanho de letra. Titulos hero/H1 mantem a sua composicao editorial.
 */
.portal-legacy-component,
.portal-cpt-conteudo,
.portal-cpt-acf,
.portal-news-single,
.portal-event-single,
.portal-text-single,
.portal-document-single,
.portal-place-single {
    line-height: 1.5;
}

.portal-legacy-component p,
.portal-legacy-component li,
.portal-legacy-component dd,
.portal-legacy-component dt,
.portal-legacy-component label,
.portal-legacy-component time,
.portal-cpt-conteudo p,
.portal-cpt-conteudo li,
.portal-cpt-acf p,
.portal-cpt-acf li,
.portal-news-article__content,
.portal-news-article__content p,
.portal-news-article__content li,
.portal-event-article__content,
.portal-event-article__content p,
.portal-event-article__content li,
.portal-text-single-article__content,
.portal-text-single-article__content p,
.portal-text-single-article__content li,
.portal-document-single-article__content,
.portal-document-single-article__content p,
.portal-document-single-article__content li,
.portal-place-article__content,
.portal-place-article__content p,
.portal-place-article__content li,
.portal-page-updated,
.portal-news-article__date,
.portal-event-article__updated,
.portal-text-single-article__updated,
.portal-document-single-article__updated,
.portal-place-article__updated,
.portal-breadcrumbs,
.portal-news-breadcrumbs,
.portal-event-breadcrumbs,
.portal-text-single-breadcrumbs,
.portal-document-single-breadcrumbs,
.portal-place-breadcrumbs,
.portal-document-item__title,
.portal-document-item__date,
.portal-link-item__title,
.portal-text-resource__title,
.portal-text-resource__meta,
.portal-place-resource__title,
.portal-place-resource__meta,
.portal-event-details__item dt,
.portal-event-details__item dd,
.portal-sitemap .sub-menu a,
.portal-sitemap .children a {
    line-height: 1.5 !important;
}

/* Cartoes de Locais: titulo mais discreto e compacto. */
.portal-place-card .portal-card__title {
    margin: 0 !important;
    padding: .85rem 1rem 1rem;
    font-size: 1rem !important;
    line-height: 1.5 !important;
    font-weight: 650;
}

/*
 * Locais sem imagem: manter o mesmo espaco visual da fotografia e usar
 * um pin outline decorativo, em vez de deixar a area vazia.
 */
.portal-place-card__media {
    position: relative;
}

.portal-place-card__placeholder {
    position: absolute;
    inset: 0;
    display: grid;
    width: 100%;
    height: 100%;
    place-items: center;
    background: linear-gradient(145deg, var(--portal-ui-cream), var(--portal-ui-green-soft));
}

.portal-place-card__placeholder-icon {
    position: relative;
    display: block;
    width: 42px;
    height: 42px;
    box-sizing: border-box;
    border: 2px solid var(--portal-ui-green);
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
}

.portal-place-card__placeholder-icon::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 10px;
    height: 10px;
    box-sizing: border-box;
    border: 2px solid var(--portal-ui-green);
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

/* O placeholder nao ganha movimento quando o cartao recebe hover/focus. */
.portal-place-card:hover .portal-place-card__placeholder-icon,
.portal-place-card:focus-within .portal-place-card__placeholder-icon {
    transform: rotate(-45deg);
}


/* Todos os titulos de cartao respeitam o mesmo minimo de 1.5. */
.portal-card__title,
.portal-map-place h3,
.portal-member-card h3,
.portal-related-card h3 {
    line-height: 1.5 !important;
}

/* Lista de Locais 3 (mapa): mesma escala tipografica e placeholder. */
.portal-map-place h3 {
    margin: 0 0 .25rem;
    font-size: 1rem !important;
    font-weight: 650;
}

.portal-map-place h3 a {
    color: var(--portal-ui-ink) !important;
    text-decoration: none !important;
}

.portal-map-place p {
    margin: 0;
    color: var(--portal-ui-muted);
    font-size: .875rem;
    line-height: 1.5 !important;
}

.portal-map-place__media {
    display: grid;
    width: 100px;
    height: 80px;
    overflow: hidden;
    place-items: center;
    background: var(--portal-ui-green-soft);
}

.portal-map-place__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.portal-map-place__media--placeholder {
    background: linear-gradient(145deg, var(--portal-ui-cream), var(--portal-ui-green-soft));
}

.portal-map-place__placeholder-icon {
    position: relative;
    display: block;
    width: 28px;
    height: 28px;
    box-sizing: border-box;
    border: 2px solid var(--portal-ui-green);
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
}

.portal-map-place__placeholder-icon::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 7px;
    height: 7px;
    box-sizing: border-box;
    border: 2px solid var(--portal-ui-green);
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.portal-status {
    line-height: 1.5 !important;
}

/* DESIGN 2.1.47 - LOCAIS TOTALMENTE CLICAVEIS
 * O link ocupa a totalidade do cartao, incluindo o espaco que resulta
 * do stretch das linhas da grelha. Assim imagem/placeholder, titulo e
 * toda a area branca fazem parte do mesmo alvo clicavel.
 */
.portal-place-card {
    display: flex;
}

.portal-place-card > .portal-place-card__link {
    display: flex !important;
    flex: 1 1 auto;
    flex-direction: column;
    width: 100%;
    min-width: 0;
    color: inherit !important;
    text-decoration: none !important;
    cursor: pointer;
}

.portal-place-card > .portal-place-card__link .portal-card__title {
    flex: 1 1 auto;
}

/* Lista de Locais 3 / mapa: o cartao inteiro tambem e um unico link. */
.portal-map-place {
    display: block !important;
    padding: 0 !important;
}

.portal-map-place > .portal-map-place__link {
    display: grid;
    grid-template-columns: 100px minmax(0, 1fr);
    gap: 1rem;
    width: 100%;
    min-height: 100%;
    box-sizing: border-box;
    padding: .75rem;
    color: inherit !important;
    text-decoration: none !important;
    cursor: pointer;
}

.portal-map-place > .portal-map-place__link h3,
.portal-map-place > .portal-map-place__link p {
    color: inherit;
}

.portal-map-place > .portal-map-place__link h3 {
    color: var(--portal-ui-ink);
}

.portal-place-card > .portal-place-card__link:focus-visible,
.portal-map-place > .portal-map-place__link:focus-visible {
    outline: 3px solid var(--portal-ui-yellow);
    outline-offset: -3px;
}

@media (max-width: 600px) {
    .portal-map-place > .portal-map-place__link {
        grid-template-columns: 88px minmax(0, 1fr);
    }
}

/* DESIGN 2.1.51 - ESTADOS DOS CARTOES
 * O estado natural e explicitamente branco, mesmo sob estilos do Divi.
 * Hover/focus usa um creme subtil e borda verde, sem movimento.
 */
.portal-legacy-component .portal-card,
.portal-legacy-component .portal-card:not(:hover):not(:focus-within) {
    background-color: #fff !important;
}

.portal-legacy-component .portal-card > a,
.portal-legacy-component .portal-card > button {
    background-color: transparent !important;
}

.portal-legacy-component .portal-card:hover,
.portal-legacy-component .portal-card:focus-within {
    border-color: var(--portal-ui-green) !important;
    background-color: var(--portal-ui-cream) !important;
    box-shadow: none !important;
    transform: none !important;
}

/* DESIGN 2.1.52 - LISTA DE ELEITOS */
.portal-legacy-component .portal-member-card {
    grid-template-columns: 200px minmax(0, 1fr);
    background: var(--portal-ui-white) !important;
    box-shadow: none !important;
    transform: none !important;
    transition: none !important;
}

.portal-legacy-component .portal-member-card:hover,
.portal-legacy-component .portal-member-card:focus-within {
    border-color: var(--portal-ui-line) !important;
    background: var(--portal-ui-white) !important;
    box-shadow: none !important;
    transform: none !important;
}

.portal-legacy-component .portal-member-card__image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.portal-legacy-component .portal-member-card__image {
    position: relative;
    min-height: 240px;
    overflow: hidden;
    background: var(--portal-ui-green-soft);
}

.portal-legacy-component .portal-member-card__placeholder {
    position: absolute;
    inset: 0;
    display: grid;
    width: 100%;
    height: 100%;
    place-items: center;
    background: linear-gradient(145deg, var(--portal-ui-cream), var(--portal-ui-green-soft));
}

/* Silhueta de pessoa, com o mesmo traco verde dos placeholders de Locais. */
.portal-legacy-component .portal-member-card__placeholder-icon {
    position: relative;
    display: block;
    width: 54px;
    height: 58px;
}

.portal-legacy-component .portal-member-card__placeholder-icon::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    width: 20px;
    height: 20px;
    box-sizing: border-box;
    border: 2px solid var(--portal-ui-green);
    border-radius: 50%;
    transform: translateX(-50%);
}

.portal-legacy-component .portal-member-card__placeholder-icon::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 28px;
    box-sizing: border-box;
    border: 2px solid var(--portal-ui-green);
    border-radius: 28px 28px 5px 5px;
}

.portal-legacy-component .portal-member-card__body a {
    color: #0b5d4c !important;
    font-weight: 650;
    text-decoration-line: underline !important;
    text-decoration-color: currentColor !important;
    text-decoration-thickness: 2px !important;
    text-underline-offset: .2em;
}

.portal-legacy-component .portal-member-card__body a:hover,
.portal-legacy-component .portal-member-card__body a:focus-visible {
    color: var(--portal-ui-green) !important;
    text-decoration-color: var(--portal-ui-green) !important;
}

@media (max-width: 600px) {
    .portal-legacy-component .portal-member-card {
        grid-template-columns: minmax(0, 1fr);
    }

    .portal-legacy-component .portal-member-card__image {
        width: 100%;
        min-height: 280px;
        max-height: 360px;
    }
}

/* DESIGN 2.1.57 - LINKS DOS TEMPLATES DE CONTACTOS */
.portal-legacy-component .portal-contact-item > .portal-accordion-item__content a {
    color: #0b5d4c !important;
    font-weight: 650;
    text-decoration-line: underline !important;
    text-decoration-color: currentColor !important;
    text-decoration-thickness: 2px !important;
    text-underline-offset: .2em;
}

.portal-legacy-component .portal-contact-item > .portal-accordion-item__content a:hover,
.portal-legacy-component .portal-contact-item > .portal-accordion-item__content a:focus-visible {
    color: var(--portal-ui-green) !important;
    text-decoration-color: var(--portal-ui-green) !important;
}

/* DESIGN 2.1.58 - PADDING DOS CARTOES DE NOTICIAS */
.portal-legacy-component .portal-news-card .portal-card__body {
    padding: 1.15rem !important;
}

/* DESIGN 2.1.60 - CARTOES DO TEMPLATE CONTEUDOS RELACIONADOS */
.portal-legacy-component .portal-related-template .portal-related-card .portal-card__body {
    padding: 1.15rem !important;
}

.portal-legacy-component .portal-related-template .portal-related-content__type {
    margin-right: 10px;
}

/* DESIGN 2.1.62 - LINKS NO CONTEUDO DO TEMPLATE TEXTO */
.portal-text-page-content a {
    color: #0b5d4c !important;
    font-weight: 650;
    text-decoration-line: underline !important;
    text-decoration-color: currentColor !important;
    text-decoration-thickness: 2px !important;
    text-underline-offset: .2em;
}

.portal-text-page-content a:hover,
.portal-text-page-content a:focus-visible {
    color: var(--portal-ui-green) !important;
    text-decoration-color: var(--portal-ui-green) !important;
}
