/* ==========================================================================
   Ajustes do WordPress sobre o CSS do site (css/style.css vem do site estático)
   ========================================================================== */

/* blocos de largura total fora do Painel: mesma margem lateral do painel */
#swup > .photo, #swup > .feature, #swup > .testimonials { margin-left: var(--bleed); margin-right: var(--bleed); }

/* texto corrido dos posts (blocos do núcleo) com o estilo do site */
.article .body > * + * { margin-top: 1.3em; }
.article .body h2, .article .body h3 { font-family: var(--f-display); font-variation-settings: "opsz" 24; font-weight: var(--w-medium); text-transform: uppercase; color: var(--vinho); line-height: 1.1; }
.article .body h2 { font-size: var(--t-card); margin-top: 1.6em; }
.article .body h3 { font-size: max(18px, calc(24 * var(--u))); margin-top: 1.4em; }
.article .body ul, .article .body ol { padding-left: 1.2em; }
.article .body figure { margin: 1.6em 0; }
.article .body img { width: 100%; height: auto; display: block; }
.article .body figcaption { font-size: var(--t-small); margin-top: .5em; }
.article .body blockquote { margin: 1.6em 0; padding-left: 1em; border-left: max(2px, calc(4 * var(--u))) solid var(--laranja); font-size: max(18px, calc(27 * var(--u))); line-height: 1.26; }
.article .body .wp-block-embed iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; }
.article .body hr { border: 0; border-top: max(1px, calc(2 * var(--u))) solid var(--vinho); }

/* contatos e livro: parágrafos vindos do editor de texto */
.contacts p + p, .book-txt p + p { margin-top: 1em; }

/* paginação das listagens */
.pager .page-numbers { color: var(--vinho); font-family: var(--f-display); font-variation-settings: "opsz" 24; font-size: var(--t-card); text-decoration: none; min-width: 44px; min-height: 44px; display: grid; place-items: center; }
.pager .page-numbers.current { color: var(--vermelho); }

/* barra do WordPress (usuário logado): header e rolagem descem junto */
.admin-bar .site-header { top: 32px; }
.admin-bar #smooth-wrapper { top: 32px !important; }
@media (max-width: 782px) {
  .admin-bar .site-header { top: 46px; }
  .admin-bar #smooth-wrapper { top: 46px !important; }
  #wpadminbar { position: fixed !important; }
}
.pub .langs:empty { min-width: 2.6em; }
.article .meta .more { display: inline-flex; align-items: center; gap: .4em; white-space: nowrap; }
/* post sem imagem destacada: espaço na cor laranja da marca (card e página) */
.hero-art--vazio, .card .thumb--vazio { background: var(--laranja); }

/* busca do arquivo de conteúdos (formulário GET) */
.filters form.search label { flex: 1; display: flex; min-width: 0; }
.filters .search-btn { appearance: none; background: none; border: 0; padding: 0; color: var(--vinho); cursor: pointer; display: grid; place-items: center; min-width: 32px; min-height: 32px; }

/* cards: hover do título em laranja; a linha laranja embaixo é a de pixels (js/hover-line.js) */
.js .card a:hover h3, .js .card a:focus-visible h3 { color: var(--laranja); }
.card h3 { transition: color .25s ease; }

/* galeria no lugar da imagem destacada (post) */
.post-gal { position: relative; }
.post-gal__track { display: grid; grid-auto-flow: column; grid-auto-columns: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; height: 100%; }
.post-gal__track::-webkit-scrollbar { display: none; }
.post-gal__track > figure { margin: 0; scroll-snap-align: start; height: 100%; }
.post-gal__track img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-gal .pub-ctrl { right: calc(20 * var(--u)); bottom: calc(14 * var(--u)); text-shadow: 0 1px 6px rgba(0,0,0,.35); }

/* ==========================================================================
   Sem efeitos em pixels (feedback do cliente): hovers simples
   ========================================================================== */
/* transição de página: fade laranja */
.tx { background: var(--laranja); opacity: 0; visibility: hidden; }
.tx > * { display: none !important; }
/* abertura: a tela já nasce laranja e o main.js descobre igual à troca de página */
html.abrindo::after { content: ""; position: fixed; inset: 0; z-index: 2147483000; background: var(--laranja, #ED7102); }

/* links de texto: linha em pixels no hover (js/hover-line.js); os fundos em pixels (caixas) ficam desligados */
.faq .hl-box, .olhar .hl-box { display: none !important; }   /* FAQ e "Conheça nossas agendas": hover branco; redes e créditos: pixels */
.faq summary.is-filled, .olhar .links a.is-filled { color: inherit; }
/* submenu: cada item em uma linha, com respiro para o sublinhado */
@media (min-width: 1024px) {
  .nav .sub a { white-space: nowrap !important; width: auto !important; }
  .nav .sub { gap: calc(18 * var(--u)) !important; }
}
/* "Conheça nossas agendas" e FAQ: no hover, fundo branco só no título */
.olhar .links a, .faq summary { transition: background-color .2s ease; }
.js .olhar .links a:hover, .js .olhar .links a:focus-visible { background: var(--laranja); text-decoration: none !important; }
.olhar .links a { padding-left: 10px; padding-right: 10px; margin: 0 -10px; }
.js .faq summary:hover, .js .faq summary:focus-visible { background: var(--laranja); }
.js .faq details[open] > summary, .js .faq details[open] > summary:hover { background: transparent; color: var(--vinho); }   /* aberto: sem hover branco */
.faq details[open] > div { background: transparent; }
/* FAQ: resposta alinhada com a pergunta (não recuada) */
@media (min-width: 1024px) { .faq details > div { margin-left: 0 !important; } }
/* documentos (Transparência): uma linha só no hover */
.split .doc-links a span[aria-hidden] { text-decoration: none; }
/* setas "próxima seção" de Quem somos: fora (fica só a rolagem) */
.down-arrow { display: none !important; }

/* banners: imagem + título ocupam a primeira dobra (Home e páginas internas) */
.hero:has(+ .hero-title) { height: calc(100vh - var(--header-h) - var(--hero-title-h, 120px)); height: calc(100svh - var(--header-h) - var(--hero-title-h, 120px)); min-height: 260px; }
.hero--estatico > img { width: 100%; height: 100%; object-fit: cover; image-rendering: auto; opacity: 1 !important; }
/* faixa de newsletter "colada" no bloco de cima (Home) */
#swup > .feature + .news-band, #swup > .testimonials + .news-band { margin-top: 0; }
/* publicações: 3 capas inteiras visíveis no desktop */
@media (min-width: 1024px) { .pubs { grid-auto-columns: calc((100% - 2 * 30 * var(--u)) / 3); } }
/* rodapé: linha divisória acima do copyright, termos e transparência */
.foot-grid .foot-sep { grid-column: 1 / -1; border-top: 1px solid rgba(255,255,255,.7); margin-top: calc(10 * var(--u)); }

/* Nossa história: textos menores, espaço para o texto mais longo (2015) e fundo cobrindo a caixa toda */
.timeline p { font-size: max(15px, calc(21 * var(--u))); line-height: 1.3; }
@media (min-width: 1024px) {
  .timeline ol { --tl-line: calc(370 * var(--u)) !important; }
  .timeline .year { font-size: calc(48 * var(--u)); }
}
/* imagem precisa de largura explícita (em <img>, width:auto = largura natural, não estica) */
.timeline .bg { left: calc(-1 * (var(--side) - var(--bleed))) !important; right: auto !important; width: calc(100% + 2 * (var(--side) - var(--bleed))) !important; max-width: none !important; height: 100% !important; mix-blend-mode: multiply; object-fit: cover; }
.timeline .flor { mix-blend-mode: multiply; }

/* "Ver tudo" (Conteúdos): link em destaque */
.ver-tudo { display: flex; justify-content: flex-end; padding: calc(40 * var(--u)) 0; margin: 0; }
.ver-tudo .cta { color: var(--vinho); font-family: var(--f-display); font-variation-settings: "opsz" 24; font-weight: var(--w-medium); text-transform: uppercase; font-size: var(--t-h2); display: inline-flex; align-items: center; gap: .35em; }
.ver-tudo .cta svg { width: .9em; height: auto; }

/* Zoom da imagem do post: cresce para a largura do artigo, fundo verde, imagem inteira */
[data-zoom] { cursor: zoom-in; }
.zoom-close { display: none; }
.article.is-zoom { grid-template-columns: calc(882 * var(--u)) minmax(0, 1fr); }
.article.is-zoom > [data-zoom] { grid-column: 1 / -1; aspect-ratio: 1800 / 840; margin: 0; background: var(--verde); cursor: default; }
.article.is-zoom > div:last-child { grid-column: 2; max-width: calc(733 * var(--u)); }
.article.is-zoom [data-zoom] img { object-fit: contain !important; padding: 4% 0; box-sizing: border-box; filter: drop-shadow(20px 20px 30px rgba(0,0,0,.25)); }
.article.is-zoom .zoom-close { display: grid; place-items: center; position: absolute; top: calc(12 * var(--u)); right: calc(18 * var(--u)); z-index: 3; width: 44px; height: 44px; background: none; border: 0; color: var(--branco); cursor: pointer; }
.zoom-close svg { width: 20px; height: 20px; }
.zoom-count { font-family: var(--f-display); font-variation-settings: "opsz" 24; font-size: max(18px, calc(27 * var(--u))); color: var(--branco); min-width: 2.6em; text-align: center; }
@media (max-width: 1023px) {
  .article.is-zoom { grid-template-columns: 1fr; }
  .article.is-zoom > [data-zoom] { aspect-ratio: 4 / 5; }
  .article.is-zoom > div:last-child { grid-column: 1; max-width: none; }
}

/* tags (linha laranja dos cards e do post): laranja da marca */
.card .tags, .article .tags { color: #ED7102; }
.article .tags a { color: inherit; text-decoration: none; }
/* destaque de Conteúdos: tudo leva ao post */
.featured .featured-liga:not(.eyebrow), .featured .featured-img { color: inherit; } .featured .featured-liga, .featured .featured-img { text-decoration: none; }
.featured .featured-img { display: block; height: 100%; }
.featured a.eyebrow { display: inline-block; }   /* tipo e temas: linha em pixels no hover (hover-line.js) */

/* título do banner: sempre visível, sem animação */
.hero-title { opacity: 1 !important; transform: none !important; }
/* logado (barra do WP no topo): o banner desconta a barra para o título não cortar */
.admin-bar .hero:has(+ .hero-title) { height: calc(100vh - var(--header-h) - var(--hero-title-h, 120px) - 32px); height: calc(100svh - var(--header-h) - var(--hero-title-h, 120px) - 32px); }
@media (max-width: 782px) { .admin-bar .hero:has(+ .hero-title) { height: calc(100svh - var(--header-h) - var(--hero-title-h, 120px) - 46px); } }

/* divisor solto: carrossel vazio (oculto) deixa dois divisores seguidos ou um no fim do painel */
hr.divider:has(+ hr.divider), hr.divider:last-child { display: none; }

/* CTA: só a linha de pixels no hover (o sublinhado do CSS duplicava a linha) */
.js .cta:hover { text-decoration: none; }

/* tablet: carrosséis com ~2 cards à vista (no celular segue 1 card retrato, como no Figma mobile) */
@media (min-width: 640px) and (max-width: 1023px) {
  .cards { grid-auto-columns: 42%; }
  .card .thumb { aspect-ratio: 428 / 270; }   /* mesma proporção do desktop: capas não cortam */
}

/* faixa de newsletter: seta colada no texto quando a chamada quebra em 2 linhas (celular) */
.news-band .cta { display: inline-block; }

/* Quem somos: primeiro bloco colado no topo do painel (sem margem dupla) */
.page-panel .acf-innerblocks-container > .split:first-child, .page-panel .acf-innerblocks-container > .pin-spacer:first-child > .split { padding-top: 0; }

/* Capas de publicação (carrosséis "pubs"): capa inteira, com sombra, sobre um retângulo colorido (como no Figma) */
.pub .rv.thumb { display: grid; place-items: center; overflow: hidden; background: var(--lima); }
.pub:nth-child(5n+2) .rv.thumb { background: var(--vermelho); }
.pub:nth-child(5n+3) .rv.thumb { background: var(--violeta); }
.pub:nth-child(5n+4) .rv.thumb { background: var(--vinho); }
.pub:nth-child(5n+5) .rv.thumb { background: var(--verde); }
.pub .rv.thumb img { width: auto; height: auto; max-width: 74%; max-height: 76%; object-fit: fill; box-shadow: calc(18 * var(--u)) calc(18 * var(--u)) calc(28 * var(--u)) rgba(0, 0, 0, .3); }

/* evento: data e local separados (como no Figma) */
.event-head .when span + span { margin-left: 1.6em; }

/* Home › Programa de fellows: a ilustração nova já é o banner inteiro (lima + pássaro à esquerda) */
.feature--lima > .bg--fel { inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 0 50%; }
@media (max-width: 1023px) {
  .feature--lima > .bg--fel { position: relative; inset: auto; order: 2; width: 100%; height: auto; aspect-ratio: 4 / 3; object-position: 10% 50%; }
}

/* livro ligado a ciclo: o atributo hidden precisa vencer o display:grid do .book */
.book[hidden] { display: none !important; }
/* ciclo sem livro: some também o divisor que vinha antes dos livros */
hr.divider:has(+ .book[hidden]):not(:has(~ .book:not([hidden]))) { display: none; }
/* evento: parágrafos do texto da direita com respiro (como no layout da agenda) */
.event-intro > div > p + p { margin-top: 1em; }
