/* ============================================================
   JF-Frontend Design System — Stockholm × Barcelona
   Version: 1.0
   ============================================================ */

/* ------------------------------------------------------------
   1. TOKENS (CSS Custom Properties)
   ------------------------------------------------------------ */
:root {
    /* Palette — Stockholm (institutional blue) × Barcelona (warm amber) */
    --jf-primary: #14375C;
    --jf-primary-dark: #0F2843;
    --jf-secondary: #2776A3;
    --jf-accent: #9B6614;
    --jf-accent-dark: #855711;
    /* Cores de fabrica: iguais a App\Libraries\TemaPorOmissao (TemaPorOmissaoTest compara).
       Texto sobre o destaque. O layout publico reescreve --jf-on-accent a partir do destaque da
       junta (TextoSobreCor); o --jf-accent-dark nao vem do tema, e o seu texto e fixo.
       Destaque #9B6614 (4.51:1 sobre --jf-bg): branco por cima da 4.88:1; hover 6.23:1. */
    --jf-on-accent: #FFFFFF;
    --jf-on-accent-dark: #FFFFFF;
    --jf-success: #15803D;
    --jf-warning: #B45309;
    --jf-danger: #B91C1C;

    /* Surfaces */
    --jf-bg: #F7F6F3;
    --jf-surface: #FFFFFF;
    --jf-surface-warm: #FDFCFA;
    --jf-border: #E2DDD7;

    /* Text */
    --jf-text: #1A1917;
    --jf-muted: #6B6560;

    /* Special */
    --jf-whatsapp: #25D366;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(26, 25, 23, .05);
    --shadow-card: 0 1px 3px rgba(26, 25, 23, .07), 0 4px 16px rgba(26, 25, 23, .05);
    --shadow-lift: 0 6px 16px rgba(26, 25, 23, .10), 0 24px 40px rgba(26, 25, 23, .07);

    /* Radii */
    --radius-sm: 6px;
    --radius-card: 10px;
    --radius-lg: 16px;
    --radius-pill: 24px;

    /* Spacing scale (base 8px) */
    --sp-xs: 4px;
    --sp-sm: 8px;
    --sp-md: 16px;
    --sp-lg: 24px;
    --sp-xl: 32px;
    --sp-2xl: 48px;
    --sp-3xl: 64px;
    --sp-4xl: 80px;

    /* Layout widths */
    --width-content: 1120px;
    --width-prose: 720px;

    /* Transitions */
    --ease-out: cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --duration-fast: 100ms;
    --duration-base: 150ms;
    --duration-slow: 200ms;
}


/* ------------------------------------------------------------
   2. RESET & BASE
   ------------------------------------------------------------ */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    font-size: 17px;
    line-height: 1.65;
    color: var(--jf-text);
    background: var(--jf-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img,
svg {
    display: block;
    max-width: 100%;
    height: auto;
}

a {
    color: var(--jf-secondary);
    text-decoration: none;
    transition: color var(--duration-base) var(--ease-out);
}

a:hover {
    color: var(--jf-primary);
}

a:focus-visible {
    outline: 2px solid var(--jf-secondary);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

::selection {
    background: rgba(20, 55, 92, .15);
    color: var(--jf-text);
}


/* ------------------------------------------------------------
   3. TYPOGRAPHY
   ------------------------------------------------------------ */
.display {
    font-family: 'DM Serif Display', Georgia, 'Times New Roman', serif;
    font-size: 48px;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--jf-text);
    font-weight: 400;
}

.heading-1 {
    font-family: 'DM Serif Display', Georgia, 'Times New Roman', serif;
    font-size: 36px;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--jf-text);
    font-weight: 400;
    margin: 0 0 var(--sp-lg);
}

.heading-2 {
    font-family: 'DM Serif Display', Georgia, 'Times New Roman', serif;
    font-size: 26px;
    line-height: 1.25;
    letter-spacing: -0.01em;
    color: var(--jf-text);
    font-weight: 400;
    margin: 0 0 var(--sp-md);
}

.heading-3 {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 20px;
    line-height: 1.3;
    color: var(--jf-text);
    font-weight: 600;
    margin: 0 0 var(--sp-sm);
}

.meta {
    font-size: 14px;
    line-height: 1.5;
    color: var(--jf-muted);
}

.prose {
    max-width: var(--width-prose);
    font-size: 17px;
    line-height: 1.65;
    color: var(--jf-text);
}

.prose p {
    margin: 0 0 1.2em;
}

.prose h2 {
    font-family: 'DM Serif Display', Georgia, serif;
    font-size: 26px;
    line-height: 1.25;
    margin: 2em 0 0.6em;
}

.prose h3 {
    font-size: 20px;
    font-weight: 600;
    margin: 1.6em 0 0.5em;
}

/*
 * h4 a h6 tinham estilo nenhum, e caiam no tamanho por omissao do browser -- h5 a ~14px e h6 a
 * ~11px, mais pequenos do que o texto corrido a 17px.
 *
 * Isso nao e so feio: e o incentivo que produziu os 11 achados de acessibilidade de 2026-09-09.
 * Quem escrevia no editor queria um titulo de cartao pequeno, o h3 parecia grande de mais, e o h5
 * "ficava bem" -- com o resultado de a pagina saltar de h2 para h5 e um leitor de ecra anunciar
 * dois niveis de seccao que nao existem.
 *
 * Corrigir o conteudo sem corrigir isto deixava a armadilha montada para o proximo autor.
 */
.prose h4 {
    font-size: 18px;
    font-weight: 600;
    margin: 1.5em 0 0.4em;
}

.prose h5,
.prose h6 {
    font-size: 17px;
    font-weight: 600;
    margin: 1.4em 0 0.4em;
}

.prose a {
    color: var(--jf-secondary);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.prose img {
    border-radius: var(--radius-card);
    margin: 1.5em 0;
}

.prose ul,
.prose ol {
    padding-left: 1.5em;
    margin: 0 0 1.2em;
}

.prose li+li {
    margin-top: 0.4em;
}

/*
 * Paginas por blocos (`RenderizadorDeBlocos`). So tokens: as cores vem da configuracao publicada
 * da junta, e cada combinacao abaixo e texto escuro sobre fundo claro ou o botao primario, que ja
 * passa pelo contraste no publicar.
 */
/*
 * A moldura de cada bloco (largura, espacamento, alinhamento, fundo). As cores do fundo chegam em
 * `--bloco-fundo` e `--bloco-texto`, decididas e medidas no PHP (4.5:1): o CSS so as usa.
 */
.pagina-blocos > .breadcrumb,
.pagina-blocos > nav,
.pagina-blocos article > h1 {
    max-width: var(--width-prose);
    margin-left: auto;
    margin-right: auto;
}

.bloco-moldura {
    max-width: var(--width-prose);
    margin: var(--sp-xl) auto 0;
}

.blocos > .bloco-moldura:first-child {
    margin-top: 0;
}

.bloco-moldura--larga {
    max-width: var(--width-content);
}

.bloco-moldura--compacto {
    margin-top: var(--sp-md);
}

.bloco-moldura--amplo {
    margin-top: var(--sp-3xl);
}

.bloco-moldura--centro {
    text-align: center;
}

.bloco-moldura--fundo {
    background: var(--bloco-fundo);
    color: var(--bloco-texto);
    padding: var(--sp-xl);
    border-radius: var(--radius-lg);
}

.bloco-moldura--fundo.bloco-moldura--compacto {
    padding: var(--sp-md);
}

.bloco-moldura--fundo.bloco-moldura--amplo {
    padding: var(--sp-2xl);
}

/* Sobre um fundo de cor, tudo herda a cor do texto: as ligacoes ficam sublinhadas, e o contraste e o
   mesmo que foi medido. O botao inverte as duas cores, e o contraste continua o mesmo.
   A classe dupla nao e por acaso: estas regras tem de ganhar as dos blocos que vem mais abaixo
   (legendas em --jf-muted, `.prose blockquote`, o foco da tabela e das perguntas). Revisao do Codex,
   2026-09-21: com uma classe so, perdiam por ordem e a legenda saia com 2.6:1 sobre o escuro. */
.bloco-moldura.bloco-moldura--fundo .prose,
.bloco-moldura.bloco-moldura--fundo blockquote,
.bloco-moldura.bloco-moldura--fundo h2,
.bloco-moldura.bloco-moldura--fundo h3,
.bloco-moldura.bloco-moldura--fundo a:not(.btn),
.bloco-moldura.bloco-moldura--fundo figcaption,
.bloco-moldura.bloco-moldura--fundo .bloco-ligacoes__descricao,
.bloco-moldura.bloco-moldura--fundo summary {
    color: inherit;
}

.bloco-moldura.bloco-moldura--fundo .bloco-chamada {
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 0;
}

.bloco-moldura.bloco-moldura--fundo .bloco-chamada__botao,
.bloco-moldura.bloco-moldura--fundo .bloco-chamada__botao:hover {
    background: var(--bloco-texto);
    border-color: var(--bloco-texto);
    color: var(--bloco-fundo);
}

.bloco-moldura.bloco-moldura--fundo :focus-visible {
    outline: 3px solid currentColor;
    outline-offset: 2px;
}

.bloco-moldura.bloco-moldura--fundo .bloco-perguntas details,
.bloco-moldura.bloco-moldura--fundo .bloco-tabela th,
.bloco-moldura.bloco-moldura--fundo .bloco-tabela td {
    border-color: currentColor;
}

.blocos .bloco-texto > :last-child {
    margin-bottom: 0;
}

.prose blockquote {
    margin: 0 0 1.2em;
    padding: var(--sp-sm) var(--sp-lg);
    border-left: 4px solid var(--jf-border);
    color: var(--jf-text);
}

.bloco-imagem {
    margin: 0;
}

.bloco-imagem img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: var(--radius-card);
}

.bloco-imagem figcaption {
    margin-top: var(--sp-sm);
    font-size: 15px;
    color: var(--jf-muted);
}

.bloco-chamada {
    padding: var(--sp-xl);
    border-radius: var(--radius-lg);
    background: var(--jf-surface);
    border: 1px solid var(--jf-border);
}

.bloco-chamada--destaque {
    border-left: 6px solid var(--jf-primary);
    box-shadow: var(--shadow-card);
}

.bloco-chamada--suave {
    background: var(--jf-surface-warm);
}

.bloco-chamada h2,
.bloco-perguntas h2 {
    font-family: 'DM Serif Display', Georgia, serif;
    font-size: 26px;
    line-height: 1.25;
    margin: 0 0 var(--sp-md);
}

.bloco-chamada p {
    margin: 0 0 var(--sp-md);
}

.bloco-chamada p:last-child {
    margin-bottom: 0;
}

/*
 * O botao da chamada usa a cor PRIMARIA e nao o `.btn--primary` do resto do site, que pinta o
 * destaque (`--jf-accent`). A publicacao da configuracao so mede cada cor contra o fundo do site: a
 * primaria com 4.5:1 contra #F7F6F3 tem pelo menos isso contra o branco, e por isso texto branco
 * sobre ela fica garantido. O `.btn--primary` escolhe o texto pelo destaque (`--jf-on-accent`).
 */
.bloco-chamada__botao {
    background: var(--jf-primary);
    border-color: var(--jf-primary);
    color: #fff;
}

.bloco-chamada__botao:hover {
    background: var(--jf-primary-dark);
    border-color: var(--jf-primary-dark);
    color: #fff;
}

.bloco-perguntas details {
    border-bottom: 1px solid var(--jf-border);
}

.bloco-perguntas summary {
    cursor: pointer;
    padding: var(--sp-md) 0;
    font-weight: 600;
}

.bloco-perguntas summary:focus-visible {
    outline: 3px solid var(--jf-secondary);
    outline-offset: 2px;
}

.bloco-perguntas__resposta {
    padding: 0 0 var(--sp-md);
}

.bloco-perguntas__resposta p {
    margin: 0 0 0.8em;
}

/* Imagem: tamanho e recorte. */
.bloco-imagem--media {
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}

.bloco-imagem--pequena {
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
}

.bloco-proporcao--16-9,
.bloco-proporcao--4-3,
.bloco-proporcao--1-1 {
    width: 100%;
    object-fit: cover;
}

.bloco-proporcao--16-9 {
    aspect-ratio: 16 / 9;
}

.bloco-proporcao--4-3 {
    aspect-ratio: 4 / 3;
}

.bloco-proporcao--1-1 {
    aspect-ratio: 1 / 1;
}

/* Imagem com texto ao lado; num telemovel, a imagem vem primeiro. */
.bloco-imagem-texto {
    display: grid;
    gap: var(--sp-lg);
    align-items: start;
}

.bloco-imagem-texto__imagem {
    margin: 0;
}

.bloco-imagem-texto__imagem img,
.bloco-galeria__figura img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: var(--radius-card);
}

.bloco-imagem-texto__imagem img[class^="bloco-proporcao"],
.bloco-galeria__figura img {
    height: auto;
    object-fit: cover;
}

@media (min-width: 768px) {
    .bloco-imagem-texto {
        grid-template-columns: 1fr 1fr;
    }

    .bloco-imagem-texto--direita .bloco-imagem-texto__imagem {
        order: 2;
    }
}

/* Colunas: uma por baixo da outra num telemovel. */
.bloco-colunas {
    display: grid;
    gap: var(--sp-lg);
}

@media (min-width: 768px) {
    .bloco-colunas--2 {
        grid-template-columns: repeat(2, 1fr);
    }

    .bloco-colunas--3 {
        grid-template-columns: repeat(3, 1fr);
    }
}

.bloco-colunas__coluna > :last-child {
    margin-bottom: 0;
}

/* Galeria. */
.bloco-galeria h2,
.bloco-ligacoes h2,
.bloco-contactos h2,
.bloco-aviso h2 {
    font-family: 'DM Serif Display', Georgia, serif;
    font-size: 26px;
    line-height: 1.25;
    margin: 0 0 var(--sp-md);
}

.bloco-galeria__lista {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: var(--sp-md);
    grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 768px) {
    .bloco-galeria--3 .bloco-galeria__lista {
        grid-template-columns: repeat(3, 1fr);
    }

    .bloco-galeria--4 .bloco-galeria__lista {
        grid-template-columns: repeat(4, 1fr);
    }
}

.bloco-galeria__figura {
    margin: 0;
}

.bloco-galeria__figura figcaption {
    margin-top: var(--sp-xs);
    font-size: 14px;
    color: var(--jf-muted);
}

/* Tabela: desliza na horizontal num ecra estreito, sem partir a pagina. */
.bloco-tabela__rolar {
    overflow-x: auto;
}

.bloco-tabela__rolar:focus-visible {
    outline: 3px solid var(--jf-secondary);
    outline-offset: 2px;
}

.bloco-tabela table {
    width: 100%;
    border-collapse: collapse;
    font-size: 16px;
}

.bloco-tabela caption {
    text-align: left;
    font-weight: 600;
    margin-bottom: var(--sp-sm);
}

.bloco-tabela th,
.bloco-tabela td {
    border-bottom: 1px solid var(--jf-border);
    padding: var(--sp-sm) var(--sp-md);
    text-align: left;
    vertical-align: top;
}

.bloco-tabela th {
    font-weight: 600;
    border-bottom-width: 2px;
}

/* Aviso: tres niveis com cores fixas (texto escuro sobre fundo claro, mais de 12:1) e o nivel
   escrito, nunca so a cor. */
.bloco-aviso {
    padding: var(--sp-lg);
    border-radius: var(--radius-card);
    border-left: 6px solid;
    color: var(--jf-text);
}

.bloco-aviso p {
    margin: 0 0 0.6em;
}

.bloco-aviso p:last-child {
    margin-bottom: 0;
}

.bloco-aviso__nivel {
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.bloco-aviso--info {
    background: #EAF2FB;
    border-left-color: #2A6EBB;
}

.bloco-aviso--aviso {
    background: #FFF4E0;
    border-left-color: #B45309;
}

.bloco-aviso--importante {
    background: #FDECEC;
    border-left-color: #B91C1C;
}

/* Ligacoes uteis. */
.bloco-ligacoes__lista {
    list-style: none;
    margin: 0;
    padding: 0;
}

.bloco-ligacoes__lista li {
    padding: var(--sp-sm) 0;
    border-bottom: 1px solid var(--jf-border);
}

/*
 * As ligacoes dos blocos tem a cor do texto, sublinhadas, e nao a secundaria da junta: medido a
 * 2026-09-21 numa junta local, a secundaria dava 3.8:1 sobre o fundo do site. O sublinhado e o que as
 * distingue (WCAG 1.4.1), e o contraste passa a ser o do texto.
 */
.blocos .prose a,
.bloco-ligacoes__lista a,
.bloco-contactos a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.bloco-ligacoes__lista a {
    font-weight: 600;
}

.bloco-ligacoes__descricao {
    display: block;
    font-size: 15px;
    color: var(--jf-muted);
}

/* Contactos. */
.bloco-contactos dl {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: var(--sp-xs) var(--sp-lg);
    margin: 0;
}

.bloco-contactos dt {
    font-weight: 600;
}

.bloco-contactos dd {
    margin: 0;
}


/* Separador. */
hr.bloco-separador {
    border: 0;
    border-top: 1px solid var(--jf-border);
    margin: 0;
}

.bloco-separador--espaco {
    height: var(--sp-lg);
}


/* ------------------------------------------------------------
   4. LAYOUT
   ------------------------------------------------------------ */
.container {
    width: 100%;
    max-width: var(--width-content);
    margin: 0 auto;
    padding-left: var(--sp-md);
    padding-right: var(--sp-md);
}

.section {
    padding-top: var(--sp-2xl);
    padding-bottom: var(--sp-2xl);
}

.section--alt {
    background: var(--jf-surface-warm);
}

.section--dark {
    background: var(--jf-primary-dark);
    color: #fff;
}

.section--dark a {
    color: rgba(255, 255, 255, .85);
}

.section--dark a:hover {
    color: #fff;
}

@media (min-width: 768px) {
    .section {
        padding-top: var(--sp-4xl);
        padding-bottom: var(--sp-4xl);
    }
}

/* Section header — title + "see all" link row */
.section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--sp-md);
    margin-bottom: var(--sp-lg);
    flex-wrap: wrap;
}

.section-header .heading-2 {
    margin-bottom: 0;
}


/* ------------------------------------------------------------
   5. GRID
   ------------------------------------------------------------ */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--sp-lg);
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--sp-lg);
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--sp-lg);
}

.grid-auto {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: var(--sp-lg);
}

/* Responsive collapses */
@media (max-width: 1023px) {
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767px) {

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
}


/* ------------------------------------------------------------
   6. BUTTONS
   ------------------------------------------------------------ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--sp-sm);
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 15px;
    font-weight: 600;
    line-height: 1;
    padding: 12px 24px;
    border: 2px solid transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    text-decoration: none;
    min-height: 44px;
    transition:
        background var(--duration-base) var(--ease-out),
        color var(--duration-base) var(--ease-out),
        border-color var(--duration-base) var(--ease-out),
        box-shadow var(--duration-base) var(--ease-out),
        transform var(--duration-fast) var(--ease-out);
}

.btn:focus-visible {
    outline: 2px solid var(--jf-secondary);
    outline-offset: 2px;
}

.btn:active {
    transform: scale(0.97);
}

/* Primary — amber CTA (Barcelona warmth) */
.btn--primary {
    background: var(--jf-accent);
    color: var(--jf-on-accent);
    border-color: var(--jf-accent);
}

.btn--primary:hover {
    background: var(--jf-accent-dark);
    border-color: var(--jf-accent-dark);
    color: var(--jf-on-accent-dark);
}

/* Secondary — outline blue (Stockholm) */
.btn--secondary {
    background: transparent;
    color: var(--jf-primary);
    border-color: var(--jf-primary);
}

.btn--secondary:hover {
    background: var(--jf-primary);
    color: #fff;
}

/* Ghost — text only */
.btn--ghost {
    background: transparent;
    color: var(--jf-secondary);
    border-color: transparent;
    padding-left: var(--sp-sm);
    padding-right: var(--sp-sm);
}

.btn--ghost:hover {
    background: rgba(42, 127, 175, .08);
    color: var(--jf-primary);
}

/* WhatsApp */
.btn--whatsapp {
    background: var(--jf-whatsapp);
    color: #fff;
    border-color: var(--jf-whatsapp);
}

.btn--whatsapp:hover {
    background: #20BD5A;
    border-color: #20BD5A;
    color: #fff;
}

/* Sizes */
.btn--sm {
    font-size: 13px;
    padding: 8px 16px;
    min-height: 36px;
}

.btn--lg {
    font-size: 17px;
    padding: 16px 32px;
    min-height: 52px;
}

/* Outline light — white border for dark backgrounds (hero) */
.btn--outline-light {
    background: transparent;
    color: #fff;
    border-color: rgba(255, 255, 255, .6);
}

.btn--outline-light:hover {
    background: rgba(255, 255, 255, .12);
    border-color: #fff;
    color: #fff;
}

/* Disabled state */
.btn[disabled],
.btn--disabled {
    opacity: 0.5;
    pointer-events: none;
    cursor: not-allowed;
}


/* ------------------------------------------------------------
   7. CARDS
   ------------------------------------------------------------ */

/* Base card */
.card {
    background: var(--jf-surface);
    border-radius: var(--radius-card);
    padding: var(--sp-lg);
    box-shadow: var(--shadow-card);
    transition:
        transform var(--duration-base) var(--ease-out),
        box-shadow var(--duration-base) var(--ease-out);
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lift);
}

/* Card — no hover lift (static info card) */
.card--static {
    transition: none;
}

.card--static:hover {
    transform: none;
    box-shadow: var(--shadow-card);
}

/* Stat number (KPI cards) */
.stat-number {
    font-size: 30px;
    margin: var(--sp-xs) 0 0;
}

/* Article lead (summary before prose body) */
.article-lead {
    color: var(--jf-muted);
    font-family: 'Inter', system-ui, sans-serif;
    font-weight: 400;
}

/* Card — service (icon + title + desc + arrow) */
.card--service {
    display: flex;
    flex-direction: column;
    gap: var(--sp-sm);
    padding: var(--sp-lg);
    text-decoration: none;
    color: var(--jf-text);
    min-height: 120px;
    position: relative;
}

.card--service .card__icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(20, 55, 92, .08);
    border-radius: var(--radius-sm);
    color: var(--jf-primary);
    flex-shrink: 0;
}

.card--service .card__icon svg {
    width: 22px;
    height: 22px;
}

.card--service .card__title {
    font-size: 17px;
    font-weight: 600;
    color: var(--jf-text);
    margin: 0;
}

.card--service .card__desc {
    font-size: 14px;
    color: var(--jf-muted);
    margin: 0;
    line-height: 1.5;
}

.card--service .card__arrow {
    position: absolute;
    top: var(--sp-lg);
    right: var(--sp-lg);
    color: var(--jf-muted);
    opacity: 0;
    transform: translateX(-4px);
    transition:
        opacity var(--duration-base) var(--ease-out),
        transform var(--duration-base) var(--ease-out);
}

.card--service:hover .card__arrow {
    opacity: 1;
    transform: translateX(0);
}

/* Card — news (image + date pill + title serif + excerpt) */
.card--news {
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.card--news .card__image {
    aspect-ratio: 3 / 2;
    overflow: hidden;
    background: var(--jf-border);
}

.card--news .card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--duration-slow) var(--ease-out);
}

.card--news:hover .card__image img {
    transform: scale(1.03);
}

.card--news .card__body {
    padding: var(--sp-md) var(--sp-lg) var(--sp-lg);
    display: flex;
    flex-direction: column;
    gap: var(--sp-sm);
    flex: 1;
}

.card--news .card__date {
    font-size: 13px;
    color: var(--jf-muted);
    font-weight: 500;
}

.card--news .card__title {
    font-family: 'DM Serif Display', Georgia, serif;
    font-size: 20px;
    line-height: 1.3;
    color: var(--jf-text);
    margin: 0;
    font-weight: 400;
}

.card--news .card__title a {
    color: inherit;
    text-decoration: none;
}

.card--news .card__title a:hover {
    color: var(--jf-primary);
}

.card--news .card__excerpt {
    font-size: 14px;
    color: var(--jf-muted);
    line-height: 1.55;
    margin: 0;
}

/* Card — event (date-block + title + location) */
.card--event {
    display: flex;
    align-items: flex-start;
    gap: var(--sp-md);
    padding: var(--sp-md) var(--sp-lg);
}

.card--event .card__title {
    font-size: 17px;
    font-weight: 600;
    margin: 0 0 4px;
    color: var(--jf-text);
}

.card--event .card__title a {
    color: inherit;
    text-decoration: none;
}

.card--event .card__title a:hover {
    color: var(--jf-primary);
}

.card--event .card__location {
    font-size: 14px;
    color: var(--jf-muted);
    margin: 0;
}

/* Card — document (file icon + name + type + download) */
.card--document {
    display: flex;
    align-items: center;
    gap: var(--sp-md);
    padding: var(--sp-md) var(--sp-lg);
}

.card--document .card__file-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(20, 55, 92, .06);
    border-radius: var(--radius-sm);
    color: var(--jf-primary);
    flex-shrink: 0;
}

.card--document .card__file-icon svg {
    width: 22px;
    height: 22px;
}

.card--document .card__info {
    flex: 1;
    min-width: 0;
}

.card--document .card__name {
    font-size: 15px;
    font-weight: 600;
    color: var(--jf-text);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card--document .card__type {
    font-size: 13px;
    color: var(--jf-muted);
    margin: 0;
}

.card--document .card__download {
    flex-shrink: 0;
}


/* Events list — vertical stack */
.events-list {
    display: flex;
    flex-direction: column;
    gap: var(--sp-md);
}


/* ------------------------------------------------------------
   8. DATE BLOCK (Barcelona pattern)
   ------------------------------------------------------------ */
.date-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 56px;
    min-height: 56px;
    background: var(--jf-primary);
    color: #fff;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
    padding: var(--sp-xs) var(--sp-sm);
}

.date-block__day {
    font-size: 22px;
    font-weight: 700;
    line-height: 1;
}

.date-block__month {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: 1;
    margin-top: 2px;
}


/* ------------------------------------------------------------
   9. BADGES / PILLS
   ------------------------------------------------------------ */
.badge {
    display: inline-flex;
    align-items: center;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    line-height: 1;
    white-space: nowrap;
}

/* Status badges */
.badge--status-submitted {
    background: #EFF6FF;
    color: #1D4ED8;
}

.badge--status-in_progress {
    background: #FFF7ED;
    color: #C2410C;
}

.badge--status-completed {
    background: #F0FDF4;
    color: #166534;
}

.badge--status-cancelled {
    background: #FEF2F2;
    color: #991B1B;
}

/* Priority badges */
.badge--priority-low {
    background: #F8FAFC;
    color: #475569;
}

.badge--priority-normal {
    background: #EFF6FF;
    color: #1D4ED8;
}

.badge--priority-high {
    background: #FFF7ED;
    color: #C2410C;
}

.badge--priority-urgent {
    background: #FEF2F2;
    color: #991B1B;
}

/* Category badge */
.badge--category {
    /* O fundo e o proprio fundo do site, e nao um tom por cima dele. O CRM so deixa publicar uma
       primaria com 4,5:1 contra #F7F6F3 (ConfiguracaoDoSite::FUNDO_DO_SITE); o fundo antigo,
       rgba(20,55,92,.08), dava #ECEFF2, mais escuro, e uma primaria no limite ficava a 4,2:1
       (visto em producao a 2026-09-25: #DC1818 a 4,34:1). O contorno mantem a forma da etiqueta. */
    background: var(--jf-bg);
    box-shadow: inset 0 0 0 1px rgba(20, 55, 92, .16);
    color: var(--jf-primary);
}

/* Filter bar */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-sm);
    margin-bottom: var(--sp-lg);
}

/* Filtros dos documentos: os campos tem rotulo por cima e o grupo do botao nao. Alinhados pelo
   topo, o botao ficava a altura dos rotulos (29 px acima dos campos, 2026-09-24). Pela base, fica
   na linha dos campos; «Limpar filtros» ao lado dele. */
.documentos-filtros {
    align-items: flex-end;
}

.documentos-filtros .documentos-filtros__accoes {
    flex-direction: row;
    align-items: center;
    gap: var(--sp-md);
}

.documentos-filtros__accoes .btn {
    min-height: 44px;
}

.filter-btn {
    display: inline-flex;
    align-items: center;
    padding: 6px 16px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
    border: 1px solid var(--jf-border);
    border-radius: var(--radius-pill);
    background: transparent;
    color: var(--jf-muted);
    cursor: pointer;
    transition: all var(--duration-fast) ease;
}

.filter-btn:hover {
    border-color: var(--jf-secondary);
    color: var(--jf-secondary);
}

.filter-btn:focus-visible {
    outline: 2px solid var(--jf-secondary);
    outline-offset: 2px;
}

.filter-btn--active {
    background: var(--jf-primary);
    border-color: var(--jf-primary);
    color: #fff;
}

.filter-btn--active:hover {
    background: var(--jf-primary-dark);
    border-color: var(--jf-primary-dark);
    color: #fff;
}


/* ------------------------------------------------------------
   10. FORMS
   ------------------------------------------------------------ */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: var(--sp-md);
}

.form-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--jf-text);
}

.form-label .required {
    color: var(--jf-danger);
    margin-left: 2px;
}

.form-label--inline {
    flex-direction: row;
    gap: var(--sp-sm);
    align-items: center;
    font-weight: 400;
}

.form-input,
.form-textarea,
.form-select {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 15px;
    line-height: 1.5;
    padding: 10px 14px;
    border: 1.5px solid var(--jf-border);
    border-radius: var(--radius-sm);
    background: var(--jf-surface);
    color: var(--jf-text);
    width: 100%;
    min-height: 44px;
    transition:
        border-color var(--duration-base) var(--ease-out),
        box-shadow var(--duration-base) var(--ease-out);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--jf-secondary);
    box-shadow: 0 0 0 3px rgba(42, 127, 175, .15);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--jf-muted);
    opacity: 0.7;
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%236B6560' viewBox='0 0 16 16'%3E%3Cpath d='M4.646 6.146a.5.5 0 0 1 .708 0L8 8.793l2.646-2.647a.5.5 0 0 1 .708.708l-3 3a.5.5 0 0 1-.708 0l-3-3a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

/* Error state */
.form-input--error,
.form-textarea--error,
.form-select--error {
    border-color: var(--jf-danger);
}

.form-input--error:focus,
.form-textarea--error:focus,
.form-select--error:focus {
    box-shadow: 0 0 0 3px rgba(185, 28, 28, .15);
}

.form-error {
    font-size: 13px;
    color: var(--jf-danger);
    display: flex;
    align-items: center;
    gap: 4px;
}


/* ------------------------------------------------------------
   11. TABLES
   ------------------------------------------------------------ */
.table {
    width: 100%;
    border-collapse: collapse;
    min-width: 650px;
}

.table th,
.table td {
    padding: 10px 8px;
    text-align: left;
    vertical-align: top;
}

.table thead th {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--jf-muted);
    border-bottom: 2px solid var(--jf-border);
}

.table tbody tr {
    border-bottom: 1px solid var(--jf-border);
    transition: background var(--duration-fast) ease;
}

.table tbody tr:hover {
    background: rgba(0, 0, 0, 0.015);
}

.table tbody td {
    font-size: 15px;
}


/* ------------------------------------------------------------
   12. ALERTS
   ------------------------------------------------------------ */
.alert {
    padding: var(--sp-md);
    border-radius: var(--radius-sm);
    border-left: 4px solid transparent;
    font-size: 15px;
    line-height: 1.5;
    margin-bottom: var(--sp-md);
}

.alert--success {
    background: #F0FDF4;
    border-left-color: var(--jf-success);
    color: #166534;
}

.alert--warning {
    background: #FFFBEB;
    border-left-color: var(--jf-warning);
    color: #92400E;
}

.alert--error {
    background: #FEF2F2;
    border-left-color: var(--jf-danger);
    color: #991B1B;
}

.alert--info {
    background: #EFF6FF;
    border-left-color: var(--jf-secondary);
    color: #1E40AF;
}


/* ------------------------------------------------------------
   12. NAVIGATION
   ------------------------------------------------------------ */

/* Skip to content */
.skip-link {
    position: absolute;
    top: -100px;
    left: var(--sp-md);
    background: var(--jf-primary);
    color: #fff;
    padding: 10px 20px;
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    z-index: 100;
    transition: top var(--duration-base) var(--ease-out);
}

.skip-link:focus {
    top: 0;
    color: #fff;
    outline: 2px solid var(--jf-accent);
    outline-offset: 2px;
}

/* Site header — tres colunas, fixo (desenho de 2026-09-25)

   [menu, metade 1] [logotipo, centrado] [menu, metade 2 + icones]. Abaixo de 1024 px:
   [botao do menu] [logotipo] [Area do Cidadao].

   Dois estados. Solido: fundo branco, texto escuro. Transparente: so na pagina inicial
   (body.tem-hero), por cima do destaque, antes de rolar 40 px -- e so com JavaScript (html.js),
   porque e o script que o volta a por solido; sem ele o texto branco ficava sobre a pagina branca.

   Contraste no estado transparente: o texto branco assenta num veu escuro proprio do cabecalho
   (::before), e nao so no veu da fotografia, que e da vista e muda com ela. Com o veu a 0,65 sobre
   uma fotografia branca (o pior caso, ja com o veu de 0,12 do destaque) o fundo fica em
   rgb(84,91,102), e o branco sobre ele da 6,77:1 (calculado a 2026-09-25). */
:root {
    --header-h: 64px;
}

@media (min-width: 1024px) {
    :root {
        --header-h: 84px;
    }
}

/* WCAG 2.4.11 (2.2): o cabecalho fixo nao pode tapar o elemento com foco, nem o alvo de uma ancora
   (o "Saltar para o conteudo" incluido). */
html {
    scroll-padding-top: calc(var(--header-h) + var(--sp-sm));
}

body:not(.tem-hero) {
    padding-top: var(--header-h);
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    height: var(--header-h);
    color: var(--jf-text);
    background-color: var(--jf-surface);
    box-shadow: 0 1px 0 rgba(26, 25, 23, 0.06), 0 6px 20px rgba(26, 25, 23, 0.06);
    transition:
        background-color 250ms var(--ease-out),
        color 250ms var(--ease-out),
        box-shadow 250ms var(--ease-out);
}

.site-header::before {
    content: '';
    position: absolute;
    inset: 0 0 -60% 0;
    pointer-events: none;
    opacity: 0;
    background: linear-gradient(180deg,
            rgba(8, 18, 32, 0.65) 0%,
            rgba(8, 18, 32, 0.65) 40%,
            rgba(8, 18, 32, 0) 100%);
    transition: opacity 250ms var(--ease-out);
}

html.js body.tem-hero .site-header:not(.site-header--solido) {
    color: #fff;
    background-color: transparent;
    box-shadow: none;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

html.js body.tem-hero .site-header:not(.site-header--solido)::before {
    opacity: 1;
}

.site-header__inner {
    position: relative;
    height: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 var(--sp-md);
    display: flex;
    align-items: center;
    gap: var(--sp-md);
}

@media (min-width: 1024px) {
    .site-header__inner {
        padding: 0 var(--sp-lg);
    }
}

@media (min-width: 1280px) {
    .site-header__inner {
        padding: 0 var(--sp-xl);
    }
}

/* ── Logotipo, centrado por posicao ── */
.brand-block {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    /* Nunca por cima do botao do menu nem do icone da direita (44 px + margem de cada lado). */
    max-width: calc(100% - 2 * (44px + var(--sp-md) + var(--sp-sm)));
    color: inherit;
    text-decoration: none;
}

.brand-block:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 4px;
    border-radius: var(--radius-sm);
}

.brand-block__logo {
    height: 40px;
    width: auto;
    max-width: 56px;
    object-fit: contain;
    flex-shrink: 0;
}

/* Variante larga do cabecalho gerada pelo CRM (tela 320x96), so quando nao ha brasao. */
.brand-block__logo--cabecalho {
    max-width: 160px;
}

.brand-block__name {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.005em;
    /* No telemovel o nome parte em duas linhas, e nunca em tres. */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (min-width: 1024px) {
    .brand-block__logo {
        height: 48px;
        max-width: 64px;
    }

    .brand-block__logo--cabecalho {
        max-width: 180px;
    }

    /* Abaixo de 1400 px tres ligacoes de cada lado nao deixam lugar ao nome (a 1280 sobrepunha-se
       27 px ao menu da direita, medido a 2026-09-25): fica o brasao, e o nome continua no nome
       acessivel da ligacao (aria-label). */
    .site-header:not(.site-header--compacto) .brand-block__name {
        display: none;
    }
}

@media (min-width: 1400px) {
    .site-header:not(.site-header--compacto) .brand-block__name {
        display: -webkit-box;
        font-size: 16px;
        max-width: 260px;
    }
}

/* ── Menu do computador ── */
.header-nav {
    display: none;
}

.header-nav__lista {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: stretch;
    gap: 18px;
}

@media (min-width: 1024px) {
    .site-header:not(.site-header--compacto) .header-nav {
        display: flex;
        flex: 1;
        align-self: stretch;
        justify-content: space-between;
    }

    .site-header:not(.site-header--compacto) .nav-toggle {
        display: none;
    }
}

@media (min-width: 1280px) {
    .header-nav__lista {
        gap: 32px;
    }
}

.nav-tab {
    position: relative;
    display: flex;
    align-items: center;
}

.nav-tab__link {
    position: relative;
    display: inline-flex;
    align-items: center;
    padding: 8px 0;
    font-family: inherit;
    /* 13 px entre 1024 e 1280: a 14 px o menu da direita ficava a 15 px do brasao. */
    font-size: 13px;
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    white-space: nowrap;
    color: inherit;
    text-decoration: none;
    background: none;
    border: 0;
    cursor: pointer;
}

@media (min-width: 1280px) {
    .nav-tab__link {
        font-size: 15px;
        letter-spacing: 0.06em;
    }
}

/* Sublinhado que entra da esquerda para a direita. Na cor do texto: e visivel nos dois estados, e a
   cor do destaque de algumas juntas nao se le sobre branco. */
.nav-tab__link::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 2px;
    height: 2px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 250ms var(--ease-out);
}

.nav-tab__link:hover::after,
.nav-tab__link:focus-visible::after,
.nav-tab__link--active::after,
.nav-tab__link[aria-expanded="true"]::after,
.nav-tab:hover .nav-tab__link::after {
    transform: scaleX(1);
}

.nav-tab__link:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 4px;
    border-radius: 2px;
}

/* Submenu: um painel limpo encostado ao fundo do cabecalho. */
.nav-tab__dropdown {
    position: absolute;
    top: 100%;
    left: -20px;
    min-width: 240px;
    padding: var(--sp-sm) 0;
    background: var(--jf-surface);
    color: var(--jf-text);
    text-shadow: none;
    border-top: 1px solid var(--jf-border);
    box-shadow: 0 16px 32px -12px rgba(26, 25, 23, 0.18);
    z-index: 60;
}

.header-nav__lista--direita .nav-tab__dropdown {
    left: auto;
    right: -20px;
}

.nav-tab__dropdown-link {
    display: block;
    padding: 10px 20px;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.4;
    color: var(--jf-text);
    text-decoration: none;
    transition: background-color var(--duration-base), color var(--duration-base);
}

.nav-tab__dropdown-link:hover {
    background: rgba(20, 55, 92, 0.05);
    color: var(--jf-primary);
}

.nav-tab__dropdown-link:focus-visible {
    outline: 2px solid var(--jf-secondary);
    outline-offset: -2px;
}

.nav-tab__dropdown-link[aria-current="page"] {
    font-weight: 600;
}

/* ── Icones (pesquisa, Area do Cidadao) e botao do menu ── */
.header-icones {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
}

/* Com o menu a vista, os icones seguem-no; sem ele (telemovel, compacto) vao para a direita. */
@media (min-width: 1024px) {
    .site-header:not(.site-header--compacto) .header-icones {
        margin-left: var(--sp-sm);
    }
}

.header-icone,
.nav-toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    color: inherit;
    background: none;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color var(--duration-base);
}

.header-icone:hover,
.nav-toggle:hover {
    background-color: rgba(127, 127, 127, 0.14);
}

.header-icone:focus-visible,
.nav-toggle:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

.nav-toggle {
    margin-left: -10px;
}

.nav-toggle svg {
    width: 26px;
    height: 26px;
}

/* A pesquisa do telemovel esta dentro do menu; no cabecalho so a partir de 1024 px. */
.header-icone--pesquisa {
    display: none;
}

@media (min-width: 1024px) {
    .header-icone--pesquisa {
        display: inline-flex;
    }
}

/* Sessao iniciada: um ponto no icone, e o painel com o nome e o "Terminar sessao". */
.header-icone__sinal {
    position: absolute;
    top: 9px;
    right: 9px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--jf-accent);
    box-shadow: 0 0 0 2px var(--jf-surface);
}

.header-conta {
    position: relative;
}

.header-conta__painel {
    position: absolute;
    top: calc(100% + (var(--header-h) - 44px) / 2);
    right: calc(-1 * var(--sp-sm));
    min-width: 240px;
    padding: var(--sp-sm) 0;
    background: var(--jf-surface);
    color: var(--jf-text);
    text-shadow: none;
    border-top: 1px solid var(--jf-border);
    box-shadow: 0 16px 32px -12px rgba(26, 25, 23, 0.18);
    z-index: 60;
}

.header-conta__nome {
    margin: 0 0 var(--sp-xs);
    padding: 8px 20px 12px;
    font-size: 14px;
    color: var(--jf-muted);
    border-bottom: 1px solid var(--jf-border);
}

.header-conta__nome strong {
    color: var(--jf-text);
}

/* ── Menu do telemovel: ecra inteiro ── */
.mobile-nav {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: flex;
    flex-direction: column;
    padding: 0 var(--sp-lg) var(--sp-xl);
    overflow-y: auto;
    overscroll-behavior: contain;
    background: var(--jf-surface);
    color: var(--jf-text);
    text-shadow: none;
}

@media (min-width: 1024px) {
    .site-header:not(.site-header--compacto) .mobile-nav {
        display: none !important;
    }
}

.mobile-nav__topo {
    position: sticky;
    top: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-md);
    min-height: var(--header-h);
    margin: 0 calc(-1 * var(--sp-lg));
    padding: 0 var(--sp-lg);
    background: var(--jf-surface);
    border-bottom: 1px solid var(--jf-border);
}

.mobile-nav__titulo {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.25;
    color: var(--jf-text);
}

.mobile-nav__close {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    min-height: 44px;
    padding: 0 16px 0 12px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    color: var(--jf-text);
    background: none;
    border: 1px solid var(--jf-border);
    border-radius: var(--radius-pill);
    cursor: pointer;
}

.mobile-nav__close:hover {
    background: rgba(20, 55, 92, 0.06);
}

.mobile-nav__close:focus-visible,
.mobile-nav__group-btn:focus-visible,
.mobile-nav__sub-link:focus-visible,
.mobile-nav__pesquisa-btn:focus-visible,
.mobile-nav__sair:focus-visible,
.mobile-nav__contactos a:focus-visible {
    outline: 2px solid var(--jf-secondary);
    outline-offset: 2px;
}

.mobile-nav__pesquisa {
    position: relative;
    margin-top: var(--sp-lg);
}

.mobile-nav__pesquisa .form-input {
    width: 100%;
    min-height: 48px;
    padding-right: 52px;
    /* 16 px: abaixo disso o Safari do iPhone faz zoom a pagina ao entrar no campo. */
    font-size: 16px;
}

.mobile-nav__pesquisa-btn {
    position: absolute;
    top: 50%;
    right: 2px;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    color: var(--jf-text);
    background: none;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
}

.mobile-nav__menu {
    margin-top: var(--sp-md);
}

.mobile-nav__group {
    border-bottom: 1px solid var(--jf-border);
}

.mobile-nav__group-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-md);
    width: 100%;
    padding: 16px 0;
    font-family: inherit;
    font-size: 22px;
    font-weight: 600;
    line-height: 1.25;
    color: var(--jf-text);
    text-align: left;
    text-decoration: none;
    background: none;
    border: 0;
    cursor: pointer;
}

.mobile-nav__group-btn[aria-current="page"] {
    color: var(--jf-primary);
}

.mobile-nav__group-btn svg {
    flex-shrink: 0;
    color: var(--jf-muted);
    transition: transform var(--duration-slow) var(--ease-out);
}

.mobile-nav__group-btn svg.rotate-180 {
    transform: rotate(180deg);
}

.mobile-nav__sub {
    padding: 0 0 var(--sp-md);
}

.mobile-nav__sub-link {
    display: block;
    padding: 10px 0 10px var(--sp-md);
    font-size: 17px;
    line-height: 1.35;
    color: var(--jf-muted);
    text-decoration: none;
}

.mobile-nav__sub-link:hover,
.mobile-nav__sub-link[aria-current="page"] {
    color: var(--jf-primary);
}

.mobile-nav__fundo {
    display: flex;
    flex-direction: column;
    gap: var(--sp-sm);
    margin-top: auto;
    padding-top: var(--sp-xl);
}

.mobile-nav__cta {
    width: 100%;
}

.mobile-nav__sair {
    align-self: center;
    padding: 10px;
    font-size: 15px;
    color: var(--jf-text);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.mobile-nav__contactos {
    list-style: none;
    margin: var(--sp-sm) 0 0;
    padding: 0;
    font-size: 15px;
    line-height: 1.8;
    color: var(--jf-muted);
}

.mobile-nav__contactos a {
    color: var(--jf-text);
}

.mobile-nav__fundo .mobile-nav__sub-link {
    padding-left: 0;
    font-size: 15px;
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ── Destaque da pagina inicial por baixo do cabecalho ── */
body.tem-hero .prem-hero {
    height: 100vh;
    height: 100svh;
    max-height: 1000px;
}

body.tem-hero .prem-hero__content {
    padding-top: var(--header-h);
}

body.tem-hero .hero-weather {
    top: calc(var(--header-h) + var(--sp-md));
}

/* ── Pesquisa (/pesquisa) ── */
.pesquisa-form {
    max-width: var(--width-prose);
    margin-bottom: var(--sp-xl);
}

.pesquisa-form__linha {
    display: flex;
    gap: var(--sp-sm);
}

.pesquisa-form__linha .form-input {
    flex: 1;
    min-width: 0;
}

.pesquisa-resumo {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: var(--sp-lg);
}

.pesquisa-grupo {
    max-width: var(--width-prose);
    margin-bottom: var(--sp-xl);
}

.pesquisa-grupo__conta {
    font-weight: 400;
    color: var(--jf-muted);
}

.pesquisa-lista {
    list-style: none;
    margin: var(--sp-sm) 0 0;
    padding: 0;
}

.pesquisa-lista__item {
    padding: var(--sp-md) 0;
    border-bottom: 1px solid var(--jf-border);
}

.pesquisa-lista__link {
    font-size: 17px;
    font-weight: 600;
    color: var(--jf-primary);
}

.pesquisa-lista__meta {
    display: block;
    margin-top: 2px;
    font-size: 14px;
    color: var(--jf-muted);
}

.pesquisa-lista__texto {
    margin: var(--sp-xs) 0 0;
    font-size: 15px;
    color: var(--jf-text);
}

/* As palavras encontradas. Cores fixas, as da .faixa-previa: #1A1917 sobre #FFE08A da 13,62:1, seja
   qual for o tema da junta. */
.pesquisa-lista mark {
    padding: 0 2px;
    border-radius: 2px;
    background: #FFE08A;
    color: #1A1917;
}


/* ------------------------------------------------------------
   13. WHATSAPP SECTION
   ------------------------------------------------------------ */
.whatsapp-section {
    background: #F0FFF4;
    border: 1px solid rgba(37, 211, 102, .2);
    border-radius: var(--radius-card);
    padding: var(--sp-lg) var(--sp-xl);
    display: flex;
    align-items: center;
    gap: var(--sp-lg);
    flex-wrap: wrap;
}

.whatsapp-section__icon {
    width: 48px;
    height: 48px;
    background: var(--jf-whatsapp);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
}

.whatsapp-section__icon svg {
    width: 26px;
    height: 26px;
}

.whatsapp-section__content {
    flex: 1;
    min-width: 200px;
}

.whatsapp-section__title {
    font-size: 17px;
    font-weight: 600;
    color: var(--jf-text);
    margin: 0 0 4px;
}

.whatsapp-section__number {
    font-size: 20px;
    font-weight: 700;
    color: var(--jf-text);
    letter-spacing: 0.02em;
}

.whatsapp-section__note {
    font-size: 13px;
    color: var(--jf-muted);
    margin: 4px 0 0;
}


/* ------------------------------------------------------------
   14. FOOTER
   ------------------------------------------------------------ */
.footer {
    background: var(--jf-primary-dark);
    color: rgba(255, 255, 255, .8);
    padding-top: var(--sp-3xl);
    padding-bottom: var(--sp-xl);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr;
    gap: var(--sp-xl);
}

.footer-col__title {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(255, 255, 255, .5);
    margin: 0 0 var(--sp-md);
}

.footer-link {
    display: block;
    color: rgba(255, 255, 255, .75);
    text-decoration: none;
    padding: 4px 0;
    font-size: 14px;
    transition: color var(--duration-base) var(--ease-out);
}

.footer-link:hover {
    color: #fff;
}

.footer-link--inline {
    display: inline;
}

.footer-link--cta {
    display: inline-block;
    margin-top: var(--sp-sm);
    font-weight: 600;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: var(--sp-sm);
    margin-bottom: var(--sp-md);
}

.footer-brand img {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
}

.footer-brand strong {
    font-size: 15px;
    color: #fff;
}

.footer-address {
    font-size: 14px;
    line-height: 1.6;
    color: rgba(255, 255, 255, .65);
}

.footer-legal {
    border-top: 1px solid rgba(255, 255, 255, .1);
    margin-top: var(--sp-xl);
    padding-top: var(--sp-lg);
    font-size: 13px;
    /* Era .4: 3,6:1 sobre o --jf-primary-dark, abaixo do AA (medido a 2026-09-22). */
    color: rgba(255, 255, 255, .7);
    text-align: center;
}

/* Linha legal (Fase B2). Branco a .85 sobre o --jf-primary-dark: o .4 do resto da linha nao
   chegava aos 4.5:1 para ligacoes que o cidadao tem de encontrar. */
.footer-legal__ligacoes {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--sp-xs) var(--sp-lg);
    margin-bottom: var(--sp-sm);
}

.footer-legal__link {
    color: rgba(255, 255, 255, .85);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.footer-legal__link:hover {
    color: #fff;
}

/* "Definicoes de cookies": um botao (abre o banner, nao leva a outra pagina) com o aspecto das
   ligacoes ao lado. */
.footer-legal__botao {
    background: none;
    border: 0;
    padding: 0;
    font: inherit;
    cursor: pointer;
}

.footer-legal__ligacoes[hidden],
.footer-legal__botao[hidden] {
    display: none;
}

.footer-legal__link:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.footer-legal p {
    margin: 0;
}

@media (max-width: 767px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--sp-xl);
    }
}


/* ------------------------------------------------------------
   14b. COOKIE CONSENT BANNER
   ------------------------------------------------------------ */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 900;
    background: var(--jf-heading);
    color: rgba(255, 255, 255, .9);
    padding: var(--sp-md) var(--sp-lg);
    box-shadow: 0 -2px 12px rgba(0, 0, 0, .15);
}

.cookie-banner__inner {
    max-width: var(--width-content);
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: var(--sp-lg);
    flex-wrap: wrap;
}

.cookie-banner__text {
    flex: 1;
    min-width: 240px;
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
}

.cookie-banner__link {
    color: var(--jf-accent);
    text-decoration: underline;
}

.cookie-banner__link:hover {
    color: #fff;
}

[x-cloak] {
    display: none !important;
}


/* ------------------------------------------------------------
   15. BREADCRUMB
   ------------------------------------------------------------ */
.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--sp-xs);
    font-size: 14px;
    color: var(--jf-muted);
    margin-bottom: var(--sp-lg);
    padding: 0;
    list-style: none;
}

.breadcrumb-item a {
    color: var(--jf-muted);
    text-decoration: none;
    transition: color var(--duration-base) var(--ease-out);
}

.breadcrumb-item a:hover {
    color: var(--jf-primary);
}

.breadcrumb-item+.breadcrumb-item::before {
    content: '›';
    margin-right: var(--sp-xs);
    color: var(--jf-border);
}

.breadcrumb-item:last-child {
    color: var(--jf-text);
    font-weight: 500;
}


/* ------------------------------------------------------------
   16. PAGINATION
   ------------------------------------------------------------ */
.pagination {
    display: flex;
    align-items: center;
    gap: var(--sp-xs);
    margin-top: var(--sp-xl);
    flex-wrap: wrap;
}

.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    min-height: 40px;
    padding: 8px 12px;
    font-size: 14px;
    font-weight: 500;
    color: var(--jf-muted);
    text-decoration: none;
    border: 1px solid var(--jf-border);
    border-radius: var(--radius-sm);
    transition:
        background var(--duration-base) var(--ease-out),
        color var(--duration-base) var(--ease-out),
        border-color var(--duration-base) var(--ease-out);
}

.page-link:hover {
    background: rgba(20, 55, 92, .04);
    color: var(--jf-primary);
    border-color: var(--jf-primary);
}

.page-link:focus-visible {
    outline: 2px solid var(--jf-secondary);
    outline-offset: 2px;
}

.page-link--active {
    background: var(--jf-primary);
    color: #fff;
    border-color: var(--jf-primary);
    font-weight: 600;
}

.page-link--active:hover {
    background: var(--jf-primary-dark);
    color: #fff;
}

.page-link--disabled {
    opacity: 0.4;
    pointer-events: none;
}

.pagination__info {
    font-size: 14px;
    color: var(--jf-muted);
    margin-left: auto;
}


/* ------------------------------------------------------------
   17. HERO
   ------------------------------------------------------------ */
.hero {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    color: #fff;
    padding: var(--sp-3xl) var(--sp-xl);
    min-height: 380px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.hero__bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero__bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg,
            rgba(20, 55, 92, .3) 0%,
            rgba(20, 55, 92, .75) 60%,
            rgba(15, 40, 67, .9) 100%);
    z-index: 1;
}

.hero__content {
    position: relative;
    z-index: 2;
    max-width: 680px;
}

.hero__badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    background: rgba(255, 255, 255, .15);
    border-radius: var(--radius-pill);
    font-size: 13px;
    font-weight: 500;
    margin-bottom: var(--sp-md);
    backdrop-filter: blur(4px);
}

.hero__title {
    font-family: 'DM Serif Display', Georgia, serif;
    font-size: 48px;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin: 0 0 var(--sp-md);
    font-weight: 400;
}

.hero__subtitle {
    font-size: 18px;
    line-height: 1.5;
    opacity: 0.9;
    margin: 0 0 var(--sp-lg);
    max-width: 540px;
}

.hero__actions {
    display: flex;
    gap: var(--sp-md);
    flex-wrap: wrap;
}

@media (max-width: 767px) {
    .hero {
        padding: var(--sp-2xl) var(--sp-lg);
        min-height: 320px;
    }

    .hero__title {
        font-size: 32px;
    }

    .hero__subtitle {
        font-size: 16px;
    }
}


/* ------------------------------------------------------------
   18. SEARCH BAR
   ------------------------------------------------------------ */
.search-bar {
    position: relative;
    display: flex;
    gap: var(--sp-sm);
    max-width: 640px;
    margin: 0 auto;
}

.search-bar .form-input {
    font-size: 17px;
    padding: 14px 18px;
    min-height: 52px;
    border-radius: var(--radius-card);
    flex: 1;
}

.search-bar .btn {
    border-radius: var(--radius-card);
    min-width: 52px;
}

.search-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 4px;
    background: var(--jf-surface);
    border: 1px solid var(--jf-border);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-lift);
    overflow: hidden;
    z-index: 50;
}

.search-dropdown__item {
    display: flex;
    align-items: center;
    gap: var(--sp-sm);
    padding: 12px 18px;
    text-decoration: none;
    color: var(--jf-text);
    font-size: 15px;
    transition: background var(--duration-fast) ease;
}

.search-dropdown__item:hover,
.search-dropdown__item:focus {
    background: rgba(0, 0, 0, 0.03);
    outline: none;
}

.search-dropdown__item+.search-dropdown__item {
    border-top: 1px solid var(--jf-border);
}

.search-dropdown__icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    color: var(--jf-muted);
}

.search-dropdown__label {
    flex: 1;
}

.search-dropdown__section {
    font-size: 12px;
    color: var(--jf-muted);
    margin-left: auto;
}

.search-dropdown__item--focused {
    background: var(--jf-surface-alt, rgba(0, 0, 0, 0.04));
}


/* ------------------------------------------------------------
   19. CTA BANNER
   ------------------------------------------------------------ */
.cta-banner {
    background: var(--jf-primary-dark);
    border-radius: var(--radius-lg);
    padding: var(--sp-2xl) var(--sp-xl);
    text-align: center;
    color: #fff;
}

.cta-banner__title {
    font-family: 'DM Serif Display', Georgia, serif;
    font-size: 30px;
    line-height: 1.2;
    margin: 0 0 var(--sp-sm);
    font-weight: 400;
}

.cta-banner__desc {
    font-size: 16px;
    opacity: 0.8;
    margin: 0 0 var(--sp-lg);
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}


/* ------------------------------------------------------------
   20. TIMELINE (for request tracking)
   ------------------------------------------------------------ */
.timeline {
    position: relative;
    padding-left: var(--sp-xl);
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 11px;
    width: 2px;
    background: var(--jf-border);
}

.timeline-item {
    position: relative;
    padding-bottom: var(--sp-lg);
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-item__dot {
    position: absolute;
    left: calc(-1 * var(--sp-xl) + 4px);
    top: 4px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--jf-border);
    border: 3px solid var(--jf-bg);
}

.timeline-item--active .timeline-item__dot {
    background: var(--jf-secondary);
}

.timeline-item--completed .timeline-item__dot {
    background: var(--jf-success);
}

.timeline-item__title {
    font-size: 15px;
    font-weight: 600;
    color: var(--jf-text);
    margin: 0 0 4px;
}

.timeline-item__meta {
    font-size: 13px;
    color: var(--jf-muted);
}


/* ------------------------------------------------------------
   21. STEPS INDICATOR
   ------------------------------------------------------------ */
.steps {
    display: flex;
    align-items: center;
    gap: var(--sp-sm);
    margin-bottom: var(--sp-xl);
}

.step {
    display: flex;
    align-items: center;
    gap: var(--sp-sm);
    font-size: 14px;
    color: var(--jf-muted);
}

.step__number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    background: var(--jf-border);
    color: var(--jf-muted);
}

.step--active .step__number {
    background: var(--jf-primary);
    color: #fff;
}

.step--active {
    color: var(--jf-text);
    font-weight: 600;
}

.step--completed .step__number {
    background: var(--jf-success);
    color: #fff;
}

.step__connector {
    flex: 1;
    height: 2px;
    background: var(--jf-border);
    min-width: 24px;
}

.step--completed+.step .step__connector {
    background: var(--jf-success);
}

@media (max-width: 640px) {
    .step__label {
        display: none;
    }
}


/* ------------------------------------------------------------
   22. EMPTY STATE
   ------------------------------------------------------------ */
.empty-state {
    text-align: center;
    padding: var(--sp-3xl) var(--sp-lg);
    color: var(--jf-muted);
}

.empty-state__icon {
    width: 64px;
    height: 64px;
    margin: 0 auto var(--sp-md);
    background: rgba(20, 55, 92, .06);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--jf-muted);
}

.empty-state__icon svg {
    width: 28px;
    height: 28px;
}

.empty-state__title {
    font-size: 18px;
    font-weight: 600;
    color: var(--jf-text);
    margin: 0 0 var(--sp-sm);
}

.empty-state__desc {
    font-size: 15px;
    max-width: 400px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Ligacao no meio do texto: so a cor nao a distingue (WCAG 1.4.1; axe link-in-text-block). */
.empty-state__desc a {
    text-decoration: underline;
    text-underline-offset: 2px;
}


/* ------------------------------------------------------------
   22b. ERROR PAGE (404 / 500)
   ------------------------------------------------------------ */
.error-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: var(--sp-xl);
    background: var(--jf-bg);
}

.error-page__content {
    text-align: center;
    max-width: 480px;
}

.error-page__code {
    font-family: 'DM Serif Display', serif;
    font-size: clamp(72px, 15vw, 140px);
    font-weight: 400;
    color: var(--jf-primary);
    line-height: 1;
    margin: 0 0 var(--sp-sm);
    opacity: .15;
}

.error-page__title {
    font-family: 'DM Serif Display', serif;
    font-size: clamp(24px, 4vw, 36px);
    color: var(--jf-heading);
    margin: 0 0 var(--sp-md);
}

.error-page__desc {
    font-size: 16px;
    line-height: 1.6;
    color: var(--jf-muted);
    margin: 0 0 var(--sp-xl);
}

.error-page__debug {
    margin: 0 0 var(--sp-lg);
}

.error-page__debug code {
    font-size: 13px;
    background: var(--jf-surface);
    border: 1px solid var(--jf-border);
    border-radius: var(--radius-sm);
    padding: var(--sp-sm) var(--sp-md);
    display: block;
    word-break: break-word;
}


/* ------------------------------------------------------------
   S1. BARCELONA DEFAULT TEMPLATE EVOLUTION
   ------------------------------------------------------------ */

/* Top bar */
.top-bar {
    background: var(--jf-primary-dark);
    color: rgba(255, 255, 255, .75);
    font-size: 12px;
}

.top-bar__inner {
    max-width: var(--width-content);
    margin: 0 auto;
    padding: 0 var(--sp-md);
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-md);
}

.top-bar__links {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-wrap: wrap;
}

.top-bar__link {
    color: rgba(255, 255, 255, .75);
    text-decoration: none;
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    padding: 6px 8px;
    border-radius: var(--radius-sm);
}

.top-bar__link:hover {
    color: #fff;
    background: rgba(255, 255, 255, .1);
}

.top-bar__link--icon {
    padding: 6px;
}

@media (max-width: 640px) {
    .top-bar {
        display: none;
    }
}

/* Weather widget */
.weather-widget {
    flex-shrink: 0;
}

.weather-widget__inner {
    display: flex;
    align-items: center;
    gap: 6px;
    color: rgba(255, 255, 255, .88);
}

.weather-widget__icon {
    font-size: 16px;
    line-height: 1;
}

.weather-widget__temp {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
}

.weather-widget__label {
    opacity: .8;
}

/* Hero carousel */
.carousel {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.carousel__viewport {
    position: relative;
    min-height: 380px;
}

.carousel__slide {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    color: #fff;
    padding: var(--sp-3xl) var(--sp-xl);
}

.carousel__bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.carousel__bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel__overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(180deg,
            rgba(20, 55, 92, .3) 0%,
            rgba(20, 55, 92, .75) 60%,
            rgba(15, 40, 67, .9) 100%);
}

.carousel__content {
    position: relative;
    z-index: 2;
    max-width: 680px;
}

.carousel__badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    background: rgba(255, 255, 255, .15);
    border-radius: var(--radius-pill);
    font-size: 13px;
    font-weight: 500;
    margin-bottom: var(--sp-md);
    backdrop-filter: blur(4px);
}

.carousel__title {
    font-family: 'DM Serif Display', Georgia, serif;
    font-size: 48px;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin: 0 0 var(--sp-md);
    font-weight: 400;
}

.carousel__subtitle {
    font-size: 18px;
    line-height: 1.5;
    opacity: 0.9;
    margin: 0 0 var(--sp-lg);
    max-width: 540px;
}

.carousel__actions {
    display: flex;
    gap: var(--sp-md);
    flex-wrap: wrap;
}

.carousel__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, .15);
    backdrop-filter: blur(6px);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel__arrow:hover {
    background: rgba(255, 255, 255, .3);
}

.carousel__arrow--prev {
    left: var(--sp-md);
}

.carousel__arrow--next {
    right: var(--sp-md);
}

.carousel__dots {
    position: absolute;
    bottom: var(--sp-md);
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    display: flex;
    gap: 8px;
}

.carousel__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, .5);
    background: transparent;
    cursor: pointer;
    padding: 0;
}

.carousel__dot--active {
    background: #fff;
    border-color: #fff;
}

.carousel__transition-enter {
    transition: opacity 500ms ease-in-out;
}

.carousel__transition-enter-start {
    opacity: 0;
}

.carousel__transition-enter-end {
    opacity: 1;
}

.carousel__transition-leave {
    transition: opacity 300ms ease-in-out;
    position: absolute;
    inset: 0;
}

.carousel__transition-leave-start {
    opacity: 1;
}

.carousel__transition-leave-end {
    opacity: 0;
}

@media (max-width: 767px) {
    .carousel__viewport {
        min-height: 320px;
    }

    .carousel__slide {
        padding: var(--sp-2xl) var(--sp-lg);
    }

    .carousel__title {
        font-size: 32px;
    }

    .carousel__subtitle {
        font-size: 16px;
    }

    .carousel__arrow {
        width: 36px;
        height: 36px;
    }
}

/* Thematic cards */
.card--thematic {
    padding: 0;
    overflow: hidden;
    text-decoration: none;
    color: var(--jf-text);
    display: flex;
    flex-direction: column;
}

.card--thematic__image {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--jf-border);
}

.card--thematic__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--duration-slow) var(--ease-out);
}

.card--thematic:hover .card--thematic__image img {
    transform: scale(1.05);
}

.card--thematic__body {
    padding: var(--sp-md) var(--sp-lg) var(--sp-lg);
    display: flex;
    gap: var(--sp-md);
    align-items: flex-start;
}

.card--thematic__icon {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(20, 55, 92, .08);
    border-radius: var(--radius-sm);
    color: var(--jf-primary);
}

.card--thematic__icon svg {
    width: 20px;
    height: 20px;
}

.card--thematic__title {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 17px;
    font-weight: 600;
    margin: 0 0 4px;
    color: var(--jf-text);
}

.card--thematic__desc {
    font-size: 14px;
    color: var(--jf-muted);
    margin: 0;
    line-height: 1.5;
}

/* News featured layout */
.news-featured {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-lg);
}

.news-featured__main {
    border-radius: var(--radius-card);
    overflow: hidden;
    background: var(--jf-surface);
    box-shadow: var(--shadow-card);
}

.news-featured__main:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lift);
}

.news-featured__link {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: var(--jf-text);
}

.news-featured__image {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--jf-border);
}

.news-featured__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-featured__body {
    padding: var(--sp-lg);
    display: flex;
    flex-direction: column;
    gap: var(--sp-sm);
    flex: 1;
}

.news-featured__title {
    font-family: 'DM Serif Display', Georgia, serif;
    font-size: 26px;
    line-height: 1.25;
    color: var(--jf-text);
    margin: 0;
    font-weight: 400;
}

.news-featured__excerpt {
    font-size: 15px;
    color: var(--jf-muted);
    line-height: 1.55;
    margin: 0;
}

.news-featured__date {
    font-size: 13px;
    color: var(--jf-muted);
    font-weight: 500;
    margin-top: auto;
}

.news-featured__side {
    display: flex;
    flex-direction: column;
    gap: var(--sp-md);
}

.news-featured__item {
    background: var(--jf-surface);
    border-radius: var(--radius-card);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    flex: 1;
}

.news-featured__item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lift);
}

.news-featured__item-link {
    display: flex;
    height: 100%;
    text-decoration: none;
    color: var(--jf-text);
}

.news-featured__item-image {
    width: 140px;
    flex-shrink: 0;
    overflow: hidden;
    background: var(--jf-border);
}

.news-featured__item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-featured__item-body {
    padding: var(--sp-md);
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
    min-width: 0;
}

.news-featured__item-title {
    font-family: 'DM Serif Display', Georgia, serif;
    font-size: 17px;
    line-height: 1.3;
    color: var(--jf-text);
    margin: 0;
    font-weight: 400;
}

.news-featured__item-date {
    font-size: 12px;
    color: var(--jf-muted);
    font-weight: 500;
    margin-top: auto;
}

@media (max-width: 767px) {
    .news-featured {
        grid-template-columns: 1fr;
    }

    .news-featured__item-link {
        flex-direction: column;
    }

    .news-featured__item-image {
        width: 100%;
        aspect-ratio: 16 / 9;
    }
}

/* Mega footer */
.footer-grid--mega {
    /* A marca mais larga, e as restantes colunas repartem o espaco. As colunas variam (Links
       Uteis e condicional; a newsletter saiu a 2026-09-21 e as Areas a 2026-09-25), e um molde fixo de 5 deixava buracos. */
    grid-template-columns: 1.5fr;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
}

.footer-social {
    display: flex;
    gap: var(--sp-sm);
    margin-top: var(--sp-md);
}

.footer-social__link {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, .1);
    color: rgba(255, 255, 255, .7);
}

.footer-social__link:hover {
    background: rgba(255, 255, 255, .2);
    color: #fff;
}

@media (max-width: 1023px) {
    .footer-grid--mega {
        grid-template-columns: 1fr 1fr;
        grid-auto-flow: row;
    }
}

@media (max-width: 640px) {
    .footer-grid--mega {
        grid-template-columns: 1fr;
    }
}


/* ------------------------------------------------------------
   23. UTILITIES
   ------------------------------------------------------------ */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.mt-0 {
    margin-top: 0;
}

.mt-sm {
    margin-top: var(--sp-sm);
}

.mt-md {
    margin-top: var(--sp-md);
}

.mt-lg {
    margin-top: var(--sp-lg);
}

.mt-xl {
    margin-top: var(--sp-xl);
}

.mb-0 {
    margin-bottom: 0;
}

.mb-sm {
    margin-bottom: var(--sp-sm);
}

.mb-md {
    margin-bottom: var(--sp-md);
}

.mb-lg {
    margin-bottom: var(--sp-lg);
}

.mb-xl {
    margin-bottom: var(--sp-xl);
}

.gap-sm {
    gap: var(--sp-sm);
}

.gap-md {
    gap: var(--sp-md);
}

.gap-lg {
    gap: var(--sp-lg);
}

.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.flex-wrap {
    flex-wrap: wrap;
}

.flex-1 {
    flex: 1;
}

.w-full {
    width: 100%;
}

.m-0 {
    margin: 0;
}

.overflow-x-auto {
    overflow-x: auto;
}


/* ------------------------------------------------------------
   24. MOTION SAFE
   ------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}


/* ------------------------------------------------------------
   25. PRINT
   ------------------------------------------------------------ */
@media print {

    *,
    *::before,
    *::after {
        background: transparent !important;
        color: #000 !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }

    body {
        font-size: 12pt;
        line-height: 1.5;
    }

    .nav,
    .site-header,
    .faixa-previa,
    .top-bar,
    .footer,
    .cookie-banner,
    .skip-link,
    .search-bar,
    .filter-bar,
    .btn,
    .cta-banner,
    .carousel__arrow,
    .carousel__dots {
        display: none !important;
    }

    main {
        padding: 0 !important;
    }

    /* O cabecalho fixo nao se imprime; o espaco que lhe estava guardado tambem nao. */
    body {
        padding-top: 0 !important;
    }

    .section {
        padding: 1em 0 !important;
        break-inside: avoid;
    }

    a[href]::after {
        content: " (" attr(href) ")";
        font-size: 90%;
        color: #555 !important;
    }

    a[href^="#"]::after,
    a[href^="javascript:"]::after {
        content: "";
    }

    img {
        max-width: 100% !important;
        break-inside: avoid;
    }

    h1,
    h2,
    h3 {
        break-after: avoid;
    }

    .card {
        border: 1px solid #ccc !important;
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .grid-2,
    .grid-3,
    .grid-4 {
        display: block !important;
    }

    .grid-2>*,
    .grid-3>*,
    .grid-4>* {
        margin-bottom: 1em;
    }

    .hero {
        min-height: auto !important;
        padding: 1em 0 !important;
    }

    .prose {
        max-width: 100% !important;
    }
}


/* ------------------------------------------------------------
   26. PREMIUM HOMEPAGE
   ------------------------------------------------------------ */

/* --- Premium Hero — Cinematic full-viewport --- */
.prem-hero {
    position: relative;
    height: calc(100vh - 120px);
    min-height: 540px;
    max-height: 920px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    color: #fff;
    background: var(--jf-primary-dark);
}

.prem-hero__slides,
.prem-hero__slide {
    position: absolute;
    inset: 0;
}

.prem-hero__slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (prefers-reduced-motion: no-preference) {
    .prem-hero__slide img {
        animation: prem-ken-burns 25s ease-in-out infinite alternate;
    }
}

@keyframes prem-ken-burns {
    from {
        transform: scale(1);
    }

    to {
        transform: scale(1.06);
    }
}

.prem-hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg,
            rgba(15, 40, 67, 0.12) 0%,
            rgba(15, 40, 67, 0.28) 40%,
            rgba(15, 40, 67, 0.72) 100%);
    z-index: 1;
}

.prem-hero__content {
    position: relative;
    z-index: 2;
    max-width: 760px;
    padding: 0 var(--sp-lg);
}

.prem-hero__badge {
    display: inline-flex;
    align-items: center;
    padding: 8px 22px;
    background: rgba(255, 255, 255, 0.10);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-pill);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: var(--sp-lg);
}

.prem-hero__title {
    font-family: 'DM Serif Display', Georgia, serif;
    font-size: clamp(34px, 5vw, 62px);
    line-height: 1.06;
    letter-spacing: -0.025em;
    margin: 0 0 var(--sp-lg);
    font-weight: 400;
}

.prem-hero__subtitle {
    font-size: clamp(16px, 1.6vw, 20px);
    line-height: 1.55;
    opacity: 0.82;
    margin: 0 0 var(--sp-xl);
    max-width: 540px;
    margin-left: auto;
    margin-right: auto;
}

.prem-hero__actions {
    display: flex;
    gap: var(--sp-md);
    justify-content: center;
    flex-wrap: wrap;
}

/* Hero dots */
.prem-hero__dots {
    position: absolute;
    bottom: 56px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    display: flex;
    gap: 6px;
}

.prem-hero__dot {
    width: 32px;
    height: 3px;
    border: none;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.35);
    cursor: pointer;
    padding: 0;
    transition:
        background var(--duration-base) var(--ease-out),
        width var(--duration-base) var(--ease-out);
}

.prem-hero__dot--active {
    background: #fff;
    width: 48px;
}

/* Scroll indicator — hidden when ticker present */
.prem-hero__scroll {
    display: none;
}

.prem-hero__scroll-line {
    width: 1px;
    height: 28px;
    background: rgba(255, 255, 255, 0.20);
    position: relative;
    overflow: hidden;
}

@media (prefers-reduced-motion: no-preference) {
    .prem-hero__scroll-line::after {
        content: '';
        position: absolute;
        top: -100%;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(255, 255, 255, 0.70);
        animation: prem-scroll-pulse 2.2s ease-in-out infinite;
    }
}

@keyframes prem-scroll-pulse {
    0% {
        top: -100%;
    }

    50% {
        top: 100%;
    }

    100% {
        top: 100%;
    }
}

/* --- Mission intro --- */
.prem-intro {
    padding: var(--sp-3xl) 0;
    background: var(--jf-surface);
    border-bottom: 1px solid var(--jf-border);
}

.prem-intro__text {
    font-family: 'DM Serif Display', Georgia, serif;
    font-size: clamp(22px, 2.5vw, 32px);
    line-height: 1.4;
    color: var(--jf-text);
    max-width: 680px;
    margin: 0 auto;
    letter-spacing: -0.01em;
}

/* --- Weather widget (overlaid on hero) --- */
.hero-weather {
    position: absolute;
    top: var(--sp-lg);
    right: var(--sp-lg);
    z-index: 4;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 18px;
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-card);
    color: #fff;
}

.hero-weather__icon {
    font-size: 24px;
    line-height: 1;
}

.hero-weather__degrees {
    font-family: 'DM Serif Display', Georgia, serif;
    font-size: 28px;
    font-weight: 400;
    line-height: 1;
    letter-spacing: -0.02em;
}

.hero-weather__meta {
    display: flex;
    flex-direction: column;
    gap: 1px;
    border-left: 1px solid rgba(255, 255, 255, 0.20);
    padding-left: 12px;
}

.hero-weather__location {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    opacity: 0.80;
}

.hero-weather__desc {
    font-size: 13px;
    opacity: 0.65;
}

/* --- News/alerts ticker (bottom of hero) --- */
.hero-ticker {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 4;
    display: flex;
    align-items: stretch;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    overflow: hidden;
    height: 40px;
}

.hero-ticker__label {
    display: flex;
    align-items: center;
    padding: 0 16px;
    background: var(--jf-secondary);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    white-space: nowrap;
    flex-shrink: 0;
}

.hero-ticker__track {
    position: relative;
    overflow: hidden;
    flex: 1;
    display: flex;
    align-items: center;
}

.hero-ticker__scroll {
    display: flex;
    align-items: center;
    gap: 0;
    white-space: nowrap;
    animation: ticker-scroll 40s linear infinite;
    will-change: transform;
}

/* Parado pelo botao ou com o rato por cima: fica onde esta. Com foco la dentro volta ao inicio,
   porque so a primeira copia recebe foco e o browser rola a faixa ate a noticia com foco. */
.hero-ticker--parado .hero-ticker__scroll,
.hero-ticker:hover .hero-ticker__scroll {
    animation-play-state: paused;
}

.hero-ticker:focus-within .hero-ticker__scroll {
    animation: none;
}

/* Camada propria acima da faixa: as noticias que deslizam ficam cortadas pelo overflow da faixa,
   mas o axe nao conta esse corte e acusava target-size neste botao (WCAG 2.5.8) sempre que uma
   passava por tras dele. Medido em teste.jfdigital.pt a 2026-10-19: 1 falha em 5 posicoes sem
   isto, 0 com isto. */
.hero-ticker__pausa {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 36px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 11px;
    cursor: pointer;
}

.hero-ticker__pausa:focus-visible {
    outline: 2px solid #fff;
    outline-offset: -4px;
}

@media (prefers-reduced-motion: reduce) {
    .hero-ticker__scroll {
        animation: none;
        overflow-x: auto;
    }

    /* Nao ha movimento para parar. */
    .hero-ticker__pausa {
        display: none;
    }
}

@keyframes ticker-scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* O texto de 13px dava um alvo de 21px de altura: o axe acusava target-size (WCAG 2.5.8, 24px),
   medido em teste.jfdigital.pt a 2026-10-19. */
.hero-ticker__item {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    color: rgba(255, 255, 255, 0.90);
    font-size: 13px;
    font-weight: 500;
    padding: 0 8px;
}

.hero-ticker__sep {
    color: rgba(255, 255, 255, 0.30);
    padding: 0 10px;
    font-size: 10px;
}

/* --- Stats strip --- */
.prem-stats {
    background: var(--jf-primary-dark);
    padding: var(--sp-2xl) 0;
    color: #fff;
}

.prem-stats__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--sp-lg);
    text-align: center;
}

.prem-stats__item {
    padding: var(--sp-md);
}

.prem-stats__value {
    display: block;
    font-family: 'DM Serif Display', Georgia, serif;
    font-size: clamp(28px, 3vw, 42px);
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: #fff;
    margin-bottom: 6px;
}

.prem-stats__label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(255, 255, 255, 0.55);
}

/* --- CTA banner enhancements --- */
.cta-banner__actions {
    display: flex;
    gap: var(--sp-md);
    justify-content: center;
    flex-wrap: wrap;
}


/* --- Responsive premium --- */
@media (max-width: 767px) {
    .prem-hero {
        min-height: 480px;
        height: calc(100svh - 80px);
    }

    .prem-hero__scroll {
        display: none;
    }

    .hero-weather {
        top: var(--sp-sm);
        right: var(--sp-sm);
        padding: 8px 12px;
        gap: 8px;
    }

    .hero-weather__degrees {
        font-size: 22px;
    }

    .hero-weather__meta {
        display: none;
    }

    .hero-ticker {
        height: 36px;
    }

    .hero-ticker__item {
        font-size: 12px;
    }

    .prem-stats__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .prem-intro__text {
        font-size: 22px;
    }

}

@media (max-width: 480px) {
    .prem-stats__grid {
        gap: var(--sp-sm);
    }
}

/* ------------------------------------------------------------
   26. REPARACOES DA AUDITORIA DE NAVEGACAO (2026-08-22)
   ------------------------------------------------------------ */

/* D3/D4 · Sem imagem mostra-se um marcador neutro, e nao um retangulo vazio
   nem uma fotografia aleatoria de um servico externo. */
.media-vazia {
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        repeating-linear-gradient(-45deg,
            rgba(0, 0, 0, 0.02) 0 10px,
            rgba(0, 0, 0, 0.04) 10px 20px);
    border: 1px dashed var(--jf-border);
    color: var(--jf-muted);
    min-height: 120px;
}

.media-vazia img {
    display: none;
}

.media-vazia__rotulo {
    font-size: 12px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.prem-hero__slide--sem-imagem {
    background: linear-gradient(135deg, var(--jf-primary) 0%, var(--jf-primary-dark) 100%);
}

.article-figura {
    margin: var(--sp-lg) 0;
}

.article-figura img {
    width: 100%;
    height: auto;
    border-radius: var(--radius-card);
}

/* D17 · Os titulos dos cartoes eram links sem nenhum sinal de o serem: cor
   herdada, sem sublinhado, sem estado. Quem olhava nao sabia que podia clicar. */
.card__link {
    color: var(--jf-primary);
    text-decoration: none;
    text-underline-offset: 3px;
}

.card__link:hover,
.card__link:focus-visible {
    text-decoration: underline;
    text-decoration-thickness: 2px;
}

/* D14 · Botao de parar a rotacao automatica do carrossel. */
.prem-hero__pausa {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    margin-right: var(--sp-sm);
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: var(--radius-pill);
    background: rgba(0, 0, 0, 0.35);
    color: #fff;
    font-size: 11px;
    cursor: pointer;
}

.prem-hero__pausa:hover,
.prem-hero__pausa:focus-visible {
    background: rgba(0, 0, 0, 0.6);
}

/* D13 · Com a gaveta ou o dialogo de cookies abertos, a pagina por baixo nao rola. */
body.tem-modal-aberto {
    overflow: hidden;
}

/* D12 · A tabela dos pedidos media 650px num ecra de 375: estado, prioridade e
   data so se viam a arrastar. Abaixo de 640px cada linha passa a ser um cartao,
   com o cabecalho da coluna a frente do valor (data-rotulo). */
@media (max-width: 640px) {
    .table--cartoes {
        min-width: 0;
    }

    .table--cartoes thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }

    .table--cartoes tbody tr {
        display: block;
        margin-bottom: var(--sp-md);
        padding: var(--sp-sm) 0;
        border: 1px solid var(--jf-border);
        border-radius: var(--radius-card);
    }

    .table--cartoes tbody td {
        display: flex;
        justify-content: space-between;
        gap: var(--sp-md);
        padding: 6px var(--sp-md);
        border: 0;
    }

    .table--cartoes tbody td::before {
        content: attr(data-rotulo);
        flex: 0 0 auto;
        font-size: 12px;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        color: var(--jf-muted);
    }

    .table--cartoes tbody td:not([data-rotulo])::before {
        content: none;
    }
}

/* D22 · Tipo de ficheiro na lista de documentos. */
.doc-tipo {
    font-weight: 600;
    letter-spacing: 0.04em;
}

/* D1 · Arquivo de eventos ja realizados, visualmente distinto da agenda. */
.section-block {
    margin-top: var(--sp-xl);
    padding-top: var(--sp-lg);
    border-top: 1px solid var(--jf-border);
}

.card--past {
    /* Sem opacidade: a 0.82 desbotava o texto todo do cartao, e o cinzento dos detalhes caia para
       3,9:1 (visto em producao a 2026-09-25). O que marca o evento como passado e o bloco da data,
       a cinzento. */
}

.date-block--past {
    background: var(--jf-muted);
}

.form-hint {
    margin-top: 4px;
    font-size: 13px;
    color: var(--jf-muted);
}

.lead {
    margin-bottom: var(--sp-lg);
    color: var(--jf-muted);
    max-width: 68ch;
}

/* D16 · Saidas na pagina de erro: era so "Voltar ao inicio". */
.error-page__saidas {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-md);
    justify-content: center;
    margin-top: var(--sp-lg);
    font-size: 14px;
}

/* D39 · Iniciais quando a junta ainda nao carregou logotipo. O fallback anterior ia buscar
   uma imagem a um servico externo para desenhar duas letras. */
.brand-block__logo--iniciais {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--jf-primary);
    color: #fff;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.02em;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
    /* Quadrado da altura do logotipo (.brand-block__logo da a altura). */
    aspect-ratio: 1;
    width: auto;
    text-shadow: none;
}

/* Aviso do mapa por carregar: os mosaicos do OpenStreetMap so sao pedidos depois de a pessoa
   autorizar. Ver public/js/jf-mapa.js. */
.jf-mapa-aviso {
    position: absolute;
    inset: 0;
    z-index: 500;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--sp-sm);
    padding: var(--sp-lg);
    text-align: center;
    background: var(--jf-bg);
    border: 1px dashed var(--jf-border);
    border-radius: var(--radius-card);
}

.jf-mapa-aviso__titulo {
    margin: 0;
    font-weight: 600;
    color: var(--jf-text);
}

.jf-mapa-aviso__texto {
    margin: 0;
    max-width: 46ch;
    font-size: 14px;
    color: var(--jf-muted);
}

.jf-mapa-aviso__botoes {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--sp-sm);
}

/* ------------------------------------------------------------
   Faixa da pre-visualizacao do menu (Fase B2). Cores fixas, e nao as da junta: a faixa tem de se
   ler seja qual for o tema. #1A1917 sobre #FFE08A: 13,62:1 (medido no browser a 2026-09-22).
   ------------------------------------------------------------ */
/* Fixa ao fundo (2026-09-25): o cabecalho passou a fixo no topo, e uma faixa no topo ficava tapada
   por ele. */
.faixa-previa {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 70;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: var(--sp-xs) var(--sp-md);
    padding: 10px var(--sp-md);
    background: #FFE08A;
    color: #1A1917;
    font-size: 14px;
    text-align: center;
    border-top: 2px solid #1A1917;
}

.faixa-previa__sair {
    color: #1A1917;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.faixa-previa__sair:focus-visible {
    outline: 2px solid #1A1917;
    outline-offset: 2px;
}

/* ------------------------------------------------------------
   Horarios de atendimento e cartoes de departamento (desenho dos horarios, §5).
   A grelha adapta-se ao numero de cartoes: um ocupa a largura toda, muitos fazem colunas.
   ------------------------------------------------------------ */
.grid-cartoes {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--sp-lg);
}

.horarios {
    margin-top: var(--sp-sm);
}

.horario__titulo {
    margin: var(--sp-sm) 0 4px;
    font-size: 14px;
    font-weight: 700;
    color: var(--jf-text);
}

.horario {
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 14px;
    line-height: 1.6;
    color: var(--jf-text);
}

.horario li + li {
    margin-top: 2px;
}

/* No rodape, sobre o fundo escuro. */
.footer .horario,
.footer .horario__titulo {
    color: rgba(255, 255, 255, .85);
}

.horarios--rodape {
    margin-bottom: var(--sp-sm);
}
