/* Comum às páginas das secções (Peritos, Investigação…): o topo com os números, os filtros, a barra de resultados, o
   paginador e o caminho. Cada página junta a sua folha própria. */

.crumb { font-size: 13px; color: #9fb6d1; display: flex; flex-wrap: wrap; gap: 8px; }
.crumb a:hover { color: #fff; }
.crumb b { color: #fff; font-weight: 600; }
/* O caminho sobre fundo claro (fichas). */
.crumb--escuro { color: var(--muted); }
.crumb--escuro b, .crumb--escuro a:hover { color: var(--navy); }
.vazio { text-align: center; padding: 60px 0 90px; color: var(--muted); display: grid; gap: 18px; justify-items: center; }

/* ── Topo da lista ─────────────────────────────────────────── */
.page-hero { background: linear-gradient(115deg, #0a1f39 0%, #0d2b4e 55%, #1d4c80 100%); color: #fff; position: relative; overflow: hidden; }
.page-hero::after { content: ''; position: absolute; right: -120px; top: -160px; width: 560px; height: 560px; border-radius: 50%; background: radial-gradient(circle, var(--brilho, rgba(140, 198, 245, .35)), transparent 65%); pointer-events: none; }
.page-hero .container { position: relative; z-index: 1; display: grid; grid-template-columns: 1.3fr .7fr; gap: 48px; align-items: end; padding-top: 40px; padding-bottom: 120px; }
.page-hero .container > * { min-width: 0; }
.page-hero h1 { font-size: 50px; margin: 26px 0 14px; font-weight: 700; }
.page-hero p { font-size: 18px; color: #d2dfee; max-width: 640px; }
.kpis { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.kpi { background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14); border-radius: 16px; padding: 18px; }
.kpi .n { display: block; font-family: 'Rubik'; font-size: 34px; font-weight: 700; line-height: 1; }
.kpi .l { display: block; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: #a9bdd6; margin-top: 8px; font-weight: 600; }
.kpi.on .n { color: #8cc6f5; }
.kpi.done .n { color: #8fe0a0; }

/* ── Filtros ───────────────────────────────────────────────── */
.filters { position: relative; z-index: 2; margin-top: -60px; background: #fff; border-radius: 20px; box-shadow: var(--shadow-lg); padding: 20px 22px 18px; }
/* Com JavaScript, cada escolha filtra logo: o botão sai. */
.filters.js .filtrar { display: none; }
.field { display: flex; align-items: center; gap: 10px; background: var(--bg); border-radius: 12px; padding: 0 16px; height: 50px; color: #8a98aa; font-size: 14px; min-width: 0; }
.field svg { width: 18px; height: 18px; stroke: var(--muted); flex: none; }
.field input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; color: var(--ink); }
.field input::placeholder { color: #8a98aa; }
.field:focus-within { box-shadow: 0 0 0 2px var(--blue); }
.field.sel { justify-content: space-between; color: var(--ink); font-weight: 500; cursor: pointer; position: relative; }
.field.sel > span { min-width: 0; flex: 1; }
.field.sel small { display: block; color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.field.sel select { appearance: none; -webkit-appearance: none; border: 0; outline: 0; background: transparent; font: inherit; font-weight: 500; color: var(--ink); width: 100%; padding: 0; cursor: pointer; text-overflow: ellipsis; }
/* Escolha entre poucas opções (Todos · A decorrer · Concluídos), em botões. */
.seg { display: flex; background: var(--bg); border-radius: 12px; padding: 4px; gap: 4px; }
.seg a { font-family: 'Rubik'; font-weight: 600; font-size: 13px; padding: 10px 16px; border-radius: 9px; color: var(--muted); white-space: nowrap; display: grid; place-items: center; }
.seg a:hover { color: var(--navy); }
.seg a.on { background: var(--navy); color: #fff; }

/* ── Resultados ────────────────────────────────────────────── */
.result-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin: 34px 0 20px; color: var(--muted); font-size: 14px; }
.result-bar b { color: var(--navy); }
.active-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.active-tags .chip { background: var(--blue-soft); color: var(--blue); }
.active-tags .chip:hover { background: #d6e8fa; }
.active-tags .limpar { color: var(--blue); font-weight: 600; }
.sort { display: flex; gap: 6px; background: var(--bg); padding: 4px; border-radius: 10px; }
.sort a { font-family: 'Rubik'; font-weight: 600; font-size: 12.5px; padding: 7px 12px; border-radius: 8px; color: var(--muted); white-space: nowrap; }
.sort a:hover { color: var(--navy); }
.sort a.on { background: #fff; color: var(--navy); box-shadow: 0 2px 6px rgba(13, 43, 78, .08); }

.card > a { display: flex; flex-direction: column; height: 100%; }
.card > a:hover h3 { color: var(--blue); }
.grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.grid4 > *, .grid3 > * { min-width: 0; }

.pager { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin: 46px 0 90px; }
.pager a, .pager span { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-family: 'Rubik'; font-weight: 600; background: var(--bg); color: var(--muted); }
.pager a:hover { color: var(--navy); background: #e9eef5; }
.pager a.on { background: var(--navy); color: #fff; }
.pager .prev svg { transform: rotate(180deg); }
.pager svg { width: 16px; height: 16px; stroke: currentColor; }

/* ── Ecrãs mais pequenos ─────────────────────────────────────── */
@media (max-width: 1100px) {
    .page-hero .container { grid-template-columns: 1fr; gap: 28px; padding-bottom: 100px; }
    .grid4 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
    .page-hero h1 { font-size: 38px; }
    .page-hero p { font-size: 16px; }
    .kpi { padding: 14px; }
    .kpi .n { font-size: 26px; }
    .filters { padding: 16px; }
    .grid4, .grid3 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
}

@media (max-width: 480px) {
    .grid4, .grid3 { grid-template-columns: 1fr; }
    .sort { width: 100%; }
    .sort a { flex: 1; text-align: center; }
}
