/* Peritos: a lista (filtros, letras, ordem, páginas) e a ficha de cada perito. */

.filters .row1 { display: grid; grid-template-columns: 1.3fr 1fr 1fr .8fr auto; gap: 14px; }
.filters.js .row1 { grid-template-columns: 1.3fr 1fr 1fr .8fr; }
.az { display: flex; justify-content: space-between; align-items: center; gap: 2px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.az a, .az span { font-family: 'Rubik'; font-weight: 600; font-size: 13.5px; color: var(--muted); width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; flex: none; }
.az a:hover { background: var(--bg); color: var(--navy); }
.az a.on { background: var(--navy); color: #fff; }
.az a.all { width: auto; padding: 0 12px; }
.az span.off { color: #c4ccd8; }


.experts { list-style: none; }
.exp > a { display: flex; flex-direction: column; align-items: center; height: 100%; text-align: center; padding: 28px 20px 22px; position: relative; }
.exp > a::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 96px; background: linear-gradient(120deg, #e8f2fc, #eef0fb); }
/* A fotografia num retângulo vertical (retrato), centrada na cara. As fotografias têm 200 a 400 px: este tamanho não as desfoca. */
.exp .av { position: relative; width: 160px; height: 196px; border-radius: 16px; margin: 0 auto 16px; object-fit: cover; object-position: center 20%; border: 5px solid #fff; box-shadow: var(--shadow); background: #dbe4ee; }
.exp .av--iniciais { display: grid; place-items: center; font-family: 'Rubik'; font-weight: 700; font-size: 40px; color: var(--navy-3); background: #e3ecf7; }
.exp b { font-family: 'Rubik'; font-weight: 600; font-size: 17px; color: var(--navy); display: block; }
.exp > a:hover > b { color: var(--blue); }
.exp .org { font-size: 13px; color: var(--muted); margin-top: 2px; min-height: 20px; }
.exp .dots { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 14px; }
.exp .dots i { font-style: normal; font-family: 'Rubik'; font-size: 11px; font-weight: 600; color: #fff; border-radius: 999px; padding: 3px 9px; }
.exp .foot { display: flex; justify-content: space-between; align-items: center; align-self: stretch; margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.exp .dots + .foot, .exp .org + .foot { margin-top: 16px; }
.exp .foot b { display: inline; font-size: 13px; color: var(--navy); }
.exp .go { width: 32px; height: 32px; border-radius: 50%; background: var(--blue-soft); display: grid; place-items: center; }
.exp .go svg { width: 15px; height: 15px; stroke: var(--blue); }


/* ── Ficha: topo ───────────────────────────────────────────── */
.p-hero { background: linear-gradient(115deg, #0a1f39 0%, #0d2b4e 60%, #1d4c80 100%); color: #fff; }
.p-hero .container { padding-top: 40px; padding-bottom: 64px; }
.p-main { display: grid; grid-template-columns: 220px minmax(0, 1fr) 330px; gap: 44px; align-items: start; margin-top: 32px; }
/* Retrato vertical, como nos cartões da lista. */
.p-photo { width: 220px; height: 270px; border-radius: 20px; object-fit: cover; object-position: center 20%; border: 6px solid rgba(255, 255, 255, .18); box-shadow: var(--shadow-lg); background: #1d4c80; }
.p-photo--vazia { display: grid; place-items: center; }
.p-photo--vazia svg { width: 90px; height: 90px; stroke: rgba(255, 255, 255, .5); stroke-width: 1.4; }
.p-main h1 { font-size: 52px; font-weight: 700; line-height: 1.05; }
.p-main .role { font-size: 18px; color: #d2dfee; margin-top: 10px; max-width: 680px; }
.orgs { list-style: none; display: flex; gap: 8px; margin-top: 18px; flex-wrap: wrap; }
.orgs .chip { background: rgba(255, 255, 255, .12); color: #fff; }
.p-main .bio { font-size: 15.5px; color: #c9d8ea; margin-top: 18px; line-height: 1.7; max-width: 680px; }
.p-main .bio p + p { margin-top: 10px; }
.p-main .bio a { color: #fff; text-decoration: underline; }
.counts { background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .14); border-radius: 20px; padding: 22px; }
.counts ul { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 16px 14px; margin-bottom: 16px; }
.counts li { display: flex; gap: 12px; align-items: center; }
.counts i { width: 10px; height: 38px; border-radius: 6px; flex: none; }
.counts b { font-family: 'Rubik'; font-size: 26px; font-weight: 700; line-height: 1; display: block; }
.counts small { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: #a9bdd6; font-weight: 600; }
.counts .share { display: flex; flex-wrap: wrap; gap: 8px; border-top: 1px solid rgba(255, 255, 255, .14); padding-top: 16px; }
.counts ul:empty + .share, .counts > .share:first-child { border-top: 0; padding-top: 0; }
.counts .share a, .counts .share button { flex: 1 1 auto; white-space: nowrap; text-align: center; background: rgba(255, 255, 255, .1); border: 0; color: #fff; border-radius: 10px; padding: 9px 10px; font-weight: 600; font-size: 12.5px; cursor: pointer; }
.counts .share a:hover, .counts .share button:hover { background: rgba(255, 255, 255, .2); }
/* A caixa Partilhar (a mesma de todas as páginas) no fundo do quadro escuro. */
.counts .partilhar-caixa { margin-top: 16px; border: 0; }
.counts .share + .partilhar-caixa { margin-top: 12px; }

/* ── Ficha: separadores ────────────────────────────────────── */
.tabs-wrap { background: #fff; border-bottom: 1px solid var(--line); position: relative; scroll-margin-top: 0; }
.tabs { display: flex; gap: 6px; overflow-x: auto; }
.tabs a { display: flex; gap: 8px; align-items: center; padding: 20px 18px 18px; font-family: 'Rubik'; font-weight: 600; font-size: 14.5px; color: var(--muted); border-bottom: 3px solid transparent; white-space: nowrap; }
.tabs a:hover { color: var(--navy); }
.tabs a em { font-style: normal; font-size: 12px; background: var(--bg); border-radius: 999px; padding: 2px 9px; }
.tabs a.on { color: var(--navy); border-color: var(--navy); }
.tabs a.on em { background: var(--navy); color: #fff; }

/* ── Ficha: blocos ─────────────────────────────────────────── */
.groups { padding-top: 54px; padding-bottom: 80px; display: grid; gap: 56px; }
.ghead { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 22px; }
.ghead h2 { font-size: 26px; color: var(--navy); display: flex; gap: 12px; align-items: center; }
.ghead h2::before { content: ''; width: 6px; height: 26px; border-radius: 3px; background: var(--c); flex: none; }
.ghead .all { font-family: 'Rubik'; font-weight: 600; color: var(--blue); font-size: 14px; display: flex; gap: 6px; align-items: center; white-space: nowrap; }
.ghead .all svg { width: 16px; height: 16px; stroke: currentColor; }

.proj .chip, .deb .chip { position: absolute; top: 12px; left: 12px; color: #fff; font-size: 11px; }
.deb .chip { background: var(--debate); }
.proj .body, .deb .body { padding: 16px 18px 18px; display: grid; gap: 10px; align-content: start; flex: 1; }
.proj h3, .deb h3 { font-family: 'Rubik'; font-size: 15.5px; font-weight: 600; color: var(--navy); line-height: 1.35; }
.deb .meta { flex-wrap: wrap; gap: 6px 16px; align-items: flex-start; }
.deb .meta span:first-child { white-space: nowrap; }
.proj .role { font-size: 12px; font-weight: 600; color: var(--inv); text-transform: uppercase; letter-spacing: .06em; }

.two { display: grid; grid-template-columns: 1.35fr 1fr; gap: 28px; }
/* As capas na largura toda (as recomendações vêm numa secção própria, por baixo). */
.books { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; }
.book .cv { background: #eef1f6 center / contain no-repeat; aspect-ratio: 3 / 3.6; border-radius: 14px; }
.book h3 { font-family: 'Rubik'; font-size: 14.5px; color: var(--navy); margin-top: 12px; line-height: 1.35; font-weight: 600; }
.book:hover h3 { color: var(--blue); }
.book .meta { font-size: 12px; margin-top: 6px; }
.recs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.recbox { display: block; background: linear-gradient(150deg, #46a35a, #2f8a4a); color: #fff; border-radius: 20px; padding: 26px 28px; }
.recbox small { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: #d6f0d9; font-weight: 600; }
.recbox h3 { font-family: 'Rubik'; font-size: 20px; margin: 10px 0 12px; line-height: 1.3; }
.recbox p { color: #e2f4e5; font-size: 14px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.recbox .n { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.recbox .n span { background: rgba(255, 255, 255, .15); border-radius: 12px; padding: 10px 14px; font-family: 'Rubik'; font-weight: 600; font-size: 13px; }
.recbox:hover h3 { text-decoration: underline; }

.podc { background: var(--pod); color: #fff; border-radius: var(--radius); padding: 22px; display: grid; gap: 14px; align-content: start; }
.podc > small { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: #9fb3c9; font-weight: 600; }
.podc .ep { display: grid; grid-template-columns: 58px 1fr 36px; gap: 12px; align-items: center; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, .1); }
.podc .cv { width: 58px; height: 58px; border-radius: 12px; background: linear-gradient(135deg, #f3a33a, #e8467c) center / cover; }
.podc b { font-family: 'Rubik'; font-weight: 600; font-size: 14px; line-height: 1.3; display: block; }
.podc .ep small { display: block; color: #9fb3c9; font-size: 12px; margin-top: 2px; }
.podc .play { width: 36px; height: 36px; border-radius: 50%; background: #fff; display: grid; place-items: center; }
.podc .play svg { width: 14px; height: 14px; fill: var(--pod); stroke: none; margin-left: 2px; }

.two > *, .books > *, .p-main > * { min-width: 0; }

/* ── Ecrãs mais pequenos ─────────────────────────────────────── */
@media (max-width: 1100px) {
    .filters .row1, .filters.js .row1 { grid-template-columns: 1fr 1fr; }
    .az { flex-wrap: wrap; justify-content: flex-start; }
    .p-main { grid-template-columns: 180px minmax(0, 1fr); }
    .p-photo { width: 180px; height: 220px; }
    .counts { grid-column: 1 / -1; }
    .counts ul { grid-template-columns: repeat(3, 1fr); }
    .two { grid-template-columns: 1fr; }
    .books { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
    .filters .row1, .filters.js .row1 { grid-template-columns: 1fr; }
    .exp > a { padding: 22px 12px 16px; }
    .exp > a::before { height: 72px; }
    .exp .av { width: 120px; height: 148px; border-radius: 12px; }
    .exp b { font-size: 15px; }
    .p-main { grid-template-columns: 1fr; gap: 24px; justify-items: start; }
    .p-photo { width: 140px; height: 172px; border-radius: 14px; }
    .p-main h1 { font-size: 36px; }
    .counts { justify-self: stretch; }
    .counts ul { grid-template-columns: 1fr 1fr; }
    .books { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .recs { grid-template-columns: 1fr; }
    .ghead h2 { font-size: 21px; }
}