/* Bola na Rede · complementos para o WordPress
   (o que a maqueta não tinha: páginas de arquivo, conteúdo vindo do editor, barra de administração). */

/* filtros passaram a ligações (categorias) */
.tabs .chip[aria-current="page"] { background: var(--navy-2); color: #fff; border-color: var(--navy-2); }
.tabs { scrollbar-width: none; }

/* cabeçalho das páginas de secção, etiqueta, autor e pesquisa */
.arch-head { color: #fff; background: var(--net), var(--aurora); padding: 22px 16px 26px; }
.arch-in { max-width: var(--wrap); margin: 0 auto; }
.arch-kicker { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font: 600 12px/1 var(--f-text); letter-spacing: .12em; text-transform: uppercase; color: rgba(255, 255, 255, .82); }
.arch-kicker .av { width: 28px; height: 32px; font-size: 10px; letter-spacing: .02em; }
.arch-head h1 { font: 700 clamp(28px, 8vw, 44px)/1.08 var(--f-display); letter-spacing: -.02em; }
.arch-count { margin: 8px 0 0; color: rgba(255, 255, 255, .82); font-size: 15px; }
.arch-head .btn { margin-top: 14px; }
@media (min-width: 1080px) { .arch-head { padding: 34px 24px 36px; } }

/* o cartão do Google só aparece no feed no telemóvel; no desktop está na coluna */
@media (min-width: 1080px) { .inline-google { display: none; } }
.card-google.desk { margin: 0; }

.author-row .who b a { color: inherit; }
.author-row .who b a:hover { text-decoration: underline; }

/* nome e foto do autor levam à página dele (topo do artigo, caixa do fim, cartões grandes) */
.face-link { flex: none; display: inline-flex; border-radius: 50%; transition: filter var(--t) var(--ease); }
.face-link:hover { filter: brightness(1.08); }
.autor-link { color: inherit; text-underline-offset: 3px; }
.autor-link:hover { text-decoration: underline; }
/* área de toque maior sem mexer na linha */
.post-meta .autor-link, .author-box .autor-link { display: inline-block; padding: 10px 0; margin: -10px 0; }

/* imagens do WordPress dentro dos cartões */
.post-media img, .row-img img, .rank-img img, .hero-img img, .toplist .th img { max-width: none; }
img.sem-imagem { object-fit: contain !important; padding: 18%; background: var(--navy-2); }

/* conteúdo do editor dentro do artigo */
.prose a { color: var(--link); text-decoration: underline; text-underline-offset: 2px; }
.prose ul, .prose ol { margin: 0 0 1.1em; padding-left: 1.3em; max-width: 68ch; }
.prose li { margin: .3em 0; }
.prose img, .prose video, .prose iframe { max-width: 100%; height: auto; border-radius: 12px; }
.prose iframe { aspect-ratio: 16 / 9; width: 100%; height: auto; border: 0; }
.prose figure { margin: 1.4em 0; max-width: 100%; }
.prose figcaption, .prose .wp-caption-text { font-size: 13px; color: var(--muted); margin-top: 6px; }
.prose .wp-block-embed, .prose .twitter-tweet, .prose .instagram-media { margin: 1.4em auto !important; max-width: 550px; }
.prose .wp-block-embed__wrapper { display: flex; justify-content: center; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.4em 0; font-size: 15px; display: block; overflow-x: auto; }
.prose th, .prose td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; }
.prose th { font-weight: 600; background: #eef4fa; }
.prose .alignleft, .prose .alignright { float: none; margin: 1.4em 0; }
.prose h3 { font: 600 21px/1.25 var(--f-display); margin: 1.4em 0 .5em; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }

/* barra de administração do WordPress */
.admin-bar .topbar { top: 32px; }
@media (max-width: 782px) { .admin-bar .topbar { top: 46px; } }
@media (max-width: 600px) { .admin-bar .topbar { top: 0; } }

.screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
#more[aria-busy="true"] { opacity: .6; pointer-events: none; }

/* comentários: extras do WordPress */
.coms .nav-links { display: flex; gap: 8px; justify-content: center; margin: 8px 0 16px; }
.coms .nav-links a, .coms .nav-links span { min-height: 40px; display: inline-flex; align-items: center; padding: 0 14px; border-radius: 999px; background: #eef4fa; color: var(--ink-2); }
.coms .nav-links .current { background: var(--navy-2); color: #fff; }
.com.bypostauthor > .com-av { box-shadow: 0 0 0 2px var(--paper), 0 0 0 3.5px var(--brand); }
.com-form .check { margin: 0; }
.com-form .check input { accent-color: var(--brand); }

/* faixa «Última hora» (marcada no editor) */
.breaking { position: relative; z-index: 3; background: linear-gradient(90deg, #b10f2e, var(--red)); color: #fff; }
.breaking-in { max-width: var(--wrap); margin: 0 auto; display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 4px 0 16px; }
.breaking-tag { flex: none; display: inline-flex; align-items: center; gap: 6px; font: 700 12px/1 var(--f-text); letter-spacing: .1em; text-transform: uppercase; }
.breaking a { flex: 1; min-width: 0; font: 600 15px/1.25 var(--f-display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.breaking a:hover { text-decoration: underline; }
.breaking .icon-btn { flex: none; color: #fff; }
.breaking .icon-btn:hover { background: rgba(255, 255, 255, .16); }

/* página de autor */
.autor-in { display: grid; grid-template-columns: 76px 1fr; gap: 16px; align-items: start; }
.autor-foto { width: 76px; height: 76px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 3px #0d3564, 0 0 0 5px var(--cyan); }
span.autor-foto { display: grid; place-items: center; font: 600 26px/1 var(--f-display); }
.autor-bio { margin: 10px 0 0; max-width: 62ch; color: rgba(255, 255, 255, .9); font-size: 16px; line-height: 1.55; }
.autor-redes { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; }
.autor-redes a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 999px; background: rgba(255, 255, 255, .12); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22); font: 500 14px/1 var(--f-text); }
.autor-redes a:hover { background: rgba(255, 255, 255, .22); }
@media (min-width: 768px) { .autor-in { grid-template-columns: 112px 1fr; gap: 24px; } .autor-foto { width: 112px; height: 112px; } }

/* ═════════ arquivos: secção, tema, autor, data, pesquisa ═════════ */
.arch-crumbs { margin-bottom: 14px; }
.arch-crumbs a::after { content: ""; }
.arch-id { display: flex; align-items: center; gap: 16px; }
.arch-crest { flex: none; display: grid; place-items: center; width: 64px; height: 64px; border-radius: 18px; background: #fff; box-shadow: 0 10px 30px -12px rgba(0, 0, 0, .6); }
.arch-crest img { width: 76%; height: 76%; object-fit: contain; }
.arch-crest.is-sigla { background: var(--c); color: var(--fg); font: 700 18px/1 var(--f-display); letter-spacing: .02em; }
.arch-id .arch-count { margin-top: 6px; }
.arch-desc { margin: 14px 0 0; max-width: 62ch; color: rgba(255, 255, 255, .9); font-size: 16px; line-height: 1.55; }
.arch-desc p { margin: 0 0 8px; }
.arch-desc a { color: #fff; text-decoration: underline; text-underline-offset: 2px; }
.arch-btn { width: auto; display: inline-flex; min-height: 44px; margin-top: 16px; font-size: 15px; }
.arch-tabs { padding-top: 12px; }
@media (min-width: 1080px) { .tabs.arch-tabs { display: flex; flex-wrap: wrap; padding: 18px 0 2px; overflow: visible; } }
.chip.has-crest { padding-left: 8px; }
.chip .crest { width: 24px; height: 24px; border-radius: 7px; }
.chip[aria-current="page"] .crest { box-shadow: none; }
.chip-dark { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 999px; background: rgba(255, 255, 255, .12); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22); font: 500 14px/1 var(--f-text); color: #fff; transition: background var(--t) var(--ease); }
.chip-dark:hover { background: rgba(255, 255, 255, .22); }
.chip-dark .icon { width: 18px; height: 18px; }
.chip-dark .crest { width: 24px; height: 24px; border-radius: 7px; }
.arch-nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; }

/* campo de pesquisa (pesquisa e 404) */
.busca { position: relative; display: flex; gap: 8px; margin-top: 12px; max-width: 640px; }
.busca > .icon { position: absolute; left: 16px; top: 15px; width: 20px; height: 20px; color: var(--muted); pointer-events: none; }
.busca input { flex: 1; min-width: 0; min-height: 50px; padding: 0 16px 0 46px; border: 0; border-radius: 999px; background: #fff; color: var(--ink); font: 500 17px/1 var(--f-text); box-shadow: 0 10px 30px -14px rgba(0, 0, 0, .6); }
.busca input:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; }
.busca .btn { margin: 0; min-height: 50px; width: auto; flex: none; padding: 0 20px; background: rgba(255, 255, 255, .14); color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .45); }
.busca .btn:hover { background: rgba(255, 255, 255, .24); }
@media (max-width: 479px) { .busca .btn { padding: 0 14px; } }

/* estado vazio (pesquisa sem resultados) */
.arch-vazio { padding: 28px 4px 8px; }
.arch-vazio h2 { font: 700 24px/1.2 var(--f-display); letter-spacing: -.01em; }
.arch-vazio p { margin: 8px 0 14px; color: var(--muted); max-width: 52ch; }
.arch-vazio .tabs { flex-wrap: wrap; padding: 0; overflow: visible; }

/* paginação numerada */
.pager { display: grid; justify-items: center; gap: 10px; margin: 0 12px 28px; }
.pager-pos { margin: 0; color: var(--muted); font-size: 14px; }
.pager-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.pager .page-numbers { display: inline-grid; place-items: center; min-width: 44px; min-height: 44px; padding: 0 10px; border-radius: 999px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); font: 600 15px/1 var(--f-text); color: var(--ink-2); font-variant-numeric: tabular-nums; }
.pager a.page-numbers:hover { box-shadow: inset 0 0 0 1.5px #b9c8d8; }
.pager .page-numbers.current { background: var(--navy-2); color: #fff; box-shadow: none; }
.pager .page-numbers.dots { background: none; box-shadow: none; min-width: 20px; padding: 0; }
.pager .page-numbers .icon { width: 18px; height: 18px; }
.load-more + .pager, .end-note + .pager { margin-top: -6px; }

/* autor: mais espaço para a foto e para as secções */
.autor-in { grid-template-columns: 84px 1fr; }
.autor-foto { width: 84px; height: 84px; }
.autor-redes a { gap: 8px; }
.autor-redes .icon { width: 17px; height: 17px; }
.autor-secs { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-top: 16px; margin-top: 2px; border-top: 1px solid rgba(255, 255, 255, .16); }
.autor-secs > span { font: 600 12px/1 var(--f-text); letter-spacing: .12em; text-transform: uppercase; color: rgba(255, 255, 255, .78); margin-right: 4px; }
@media (min-width: 768px) {
  .autor-in { grid-template-columns: 136px 1fr; gap: 28px; }
  .autor-foto { width: 136px; height: 136px; }
  .autor-secs { grid-column: 2; }
}

/* ═════════ páginas institucionais ═════════ */
.pag-head h1 { max-width: 20ch; }
.pag-shell { display: grid; gap: 16px; padding: 16px 12px 32px; }
.pag-corpo { min-width: 0; background: var(--paper); border-radius: var(--r-l); box-shadow: 0 0 0 1px var(--line); padding: 4px 20px 24px; }
.pag-corpo .prose { margin-top: 18px; font-size: 17px; }
.pag-corpo .prose > :first-child { margin-top: 0; }
.pag-corpo .prose h2 { font-size: 22px; }
.pag-nav { margin: 0; padding: 20px 8px 10px; }
.pag-nav .card-h { font-size: 18px; padding: 0 12px; }
.pag-nav ul { list-style: none; margin: 0; padding: 0; }
.pag-nav li a { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 46px; padding: 0 12px; border-radius: 10px; color: var(--ink-2); font-size: 15px; }
.pag-nav li a:hover { background: #eef4fa; }
.pag-nav li a[aria-current="page"] { background: #e3f1fb; color: var(--navy); font-weight: 600; }
.pag-nav li .icon { width: 16px; height: 16px; color: var(--muted); flex: none; }
.pag-mail { display: flex; align-items: center; gap: 8px; margin: 8px 12px 6px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 15px; }
.pag-mail .icon { width: 18px; height: 18px; color: var(--brand); }
.pag-mail a { color: var(--link); }
@media (min-width: 768px) { .pag-corpo { padding: 12px 40px 36px; } .pag-shell { padding: 24px 24px 48px; } }
@media (min-width: 1080px) {
  .pag-shell { grid-template-columns: minmax(0, 720px) 300px; gap: 40px; justify-content: center; max-width: var(--wrap); margin: 0 auto; align-items: start; }
  .pag-lado { position: sticky; top: calc(var(--top-h) + 20px); }
}

/* Ficha Técnica */
.ft { padding-top: 8px; }
.ft-grupo { padding: 20px 0; border-top: 1px solid var(--line); }
.ft-grupo:first-child { border-top: 0; }
.ft-grupo h2 { margin: 0 0 12px; font: 600 12px/1.3 var(--f-text); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.ft-pessoas { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ft-pessoa { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 6px 12px 6px 6px; border-radius: 14px; background: #f4f8fc; color: var(--ink); }
a.ft-pessoa { transition: background var(--t) var(--ease); }
a.ft-pessoa:hover { background: #e3f1fb; }
.ft-pessoa > span:not(.ft-foto) { flex: 1; min-width: 0; display: grid; gap: 2px; }
.ft-pessoa b { font: 600 16px/1.25 var(--f-display); }
.ft-pessoa small { color: var(--muted); font-size: 13.5px; }
.ft-pessoa > .icon { width: 18px; height: 18px; color: var(--muted); flex: none; }
.ft-foto { flex: none; width: 52px; height: 52px; border-radius: 50%; object-fit: cover; display: grid; place-items: center; background: var(--navy-2); color: #fff; font: 600 17px/1 var(--f-display); }
.ft-info { margin: 0; font-size: 16px; }
.ft-info p { margin: 0 0 .4em; }
@media (min-width: 560px) { .ft-pessoas { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); } }

/* anexo */
.anexo { margin: 18px 0 0; }
.anexo img { width: 100%; height: auto; border-radius: 12px; }
.anexo figcaption { margin-top: 8px; color: var(--muted); font-size: 14px; }
.arch-count a { color: #fff; text-decoration: underline; text-underline-offset: 2px; }

/* ═════════ alertas (Web Push pelo plugin BnR Push Notifications) ═════════ */
.sheet-estado { min-height: 1.4em; margin: 14px 0 0; font-size: 14px; color: var(--muted); }
.sheet-estado:empty { margin: 0; min-height: 0; }
.sheet-estado.is-erro { color: #b3122e; }
#sh-alertas .btn-primary { margin-top: 18px; }
#sh-alertas .chip .crest { margin-left: -2px; }
.top-act.rel { position: relative; }

/* dentro da app Bola na Rede (Capacitor): a app tem o seu cabeçalho, sino e barra de separadores (do plugin) */
.bnr-app-mode .topbar, .bnr-app-mode .bottom-nav { display: none !important; }
.bnr-app-mode { padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px)); }
.bnr-app-mode.single-post { padding-bottom: calc(140px + env(safe-area-inset-bottom, 0px)); }
.bnr-app-mode .art-bar { bottom: calc(68px + env(safe-area-inset-bottom, 0px)); }
.bnr-app-mode .toast { bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
/* nos artigos, o sino da app (do plugin, a 75 px do fundo) sobe para cima da barra do artigo */
body.bnr-app-mode.single-post #bnr-app-bell { bottom: calc(68px + var(--nav-h) + 14px + env(safe-area-inset-bottom, 0px)) !important; }

/* rodapé: todas as secções (ligações em HTML para o Google; recolhido por omissão) */
.foot-todas { position: relative; margin-top: 8px; border-top: 1px solid rgba(255, 255, 255, .14); }
.foot-todas > summary { display: flex; align-items: center; justify-content: space-between; min-height: 52px; cursor: pointer; list-style: none; font: 600 16px/1 var(--f-display); }
.foot-todas > summary::-webkit-details-marker { display: none; }
.foot-todas > summary .icon { width: 20px; height: 20px; transition: transform var(--t) var(--ease); }
.foot-todas[open] > summary .icon { transform: rotate(45deg); }
.foot-todas-in { display: grid; gap: 18px 24px; padding: 6px 0 18px; }
.foot-todas h3 { margin: 0 0 6px; font: 600 12px/1.3 var(--f-text); letter-spacing: .12em; text-transform: uppercase; color: rgba(255, 255, 255, .7); }
.foot-todas ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 14px; }
.foot-todas li a { display: inline-flex; align-items: center; min-height: 36px; font-size: 14.5px; color: rgba(255, 255, 255, .88); }
.foot-todas li a:hover { color: #fff; text-decoration: underline; }
@media (min-width: 768px) { .foot-todas-in { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1080px) { .foot-todas-in { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
