/*
Theme Name: PIANC BRASIL
Theme URI: https://piancbrasil.org.br
Author: Mosten
Author URI: https://mosten.com.br
Description: Tema clássico híbrido da PIANC BRASIL — header e footer em PHP, conteúdo editável com blocos Gutenberg e padrões de página.
Version: 1.0.22
Requires at least: 6.6
Requires PHP: 8.1
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: pianc-brasil
Tags: custom-menu, custom-logo, editor-style, featured-images, block-patterns
*/

/* ---------------------------------------------------------------
   Design tokens — espelhados em theme.json
   --------------------------------------------------------------- */
:root {
	--navy: #001f4e;
	--navy-deep: #1f366c;
	--navy-mid: #3356a7;
	--navy-soft: #7e8ebf;
	--mist: #f2f6fd;
	--brasil-green: #029739;
	--brasil-yellow: #ffdf00;
	--font-color: #0e172c;
	--muted-color: #5c6577;
	--border-color: #dee2ea;
	--white: #ffffff;

	--font-sans: "Inter", ui-sans-serif, system-ui, sans-serif;
	--font-display: "Montserrat", ui-sans-serif, system-ui, sans-serif;

	--shell-max: 88rem;
	--shell-pad: 1.5rem;
	--header-height: 4rem;

	--radius: 0.125rem;
	--gradient-brasil: linear-gradient(90deg, var(--brasil-green) 0%, var(--brasil-yellow) 45%, var(--navy-mid) 100%);
	--gradient-hero: linear-gradient(180deg, rgba(0, 31, 78, 0.62) 0%, rgba(0, 31, 78, 0.4) 42%, rgba(0, 31, 78, 0.94) 100%);
	--shadow-editorial: 0 24px 70px -32px var(--navy);
}

@media (min-width: 1024px) {
	:root {
		--shell-pad: 3.5rem;
		--header-height: 6rem;
	}
}

/* ---------------------------------------------------------------
   Base
   --------------------------------------------------------------- */
*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

body {
	margin: 0;
	background-color: var(--white);
	color: var(--font-color);
	font-family: var(--font-sans);
	font-size: 1rem;
	line-height: 1.65;
}

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

h1,
h2,
h3,
h4,
h5,
h6 {
	margin: 0;
	font-family: var(--font-display);
	color: var(--navy);
	text-wrap: balance;
}

p {
	margin: 0;
}

a {
	color: var(--navy-mid);
	text-decoration: none;
	transition: color 0.2s ease;
}

a:hover {
	color: var(--navy);
}

ul,
ol {
	margin: 0;
	padding: 0;
}

:focus-visible {
	outline: 2px solid var(--navy-mid);
	outline-offset: 3px;
}

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

.skip-link:focus {
	position: fixed;
	top: 1rem;
	left: 1rem;
	z-index: 100;
	width: auto;
	height: auto;
	padding: 0.5rem 1rem;
	clip: auto;
	background: var(--white);
	color: var(--navy);
}

/* ---------------------------------------------------------------
   Layout
   --------------------------------------------------------------- */
.shell {
	width: 100%;
	max-width: var(--shell-max);
	margin-inline: auto;
	padding-inline: var(--shell-pad);
}

.section {
	padding-block: 6rem;
}

.section--mist {
	background-color: var(--mist);
	border-block: 1px solid var(--border-color);
}

.section--navy {
	background-color: var(--navy);
	color: var(--white);
}

.section--tight {
	padding-block: 5rem;
}

@media (min-width: 1024px) {
	.section {
		padding-block: 8rem;
	}

	.section--tight {
		padding-block: 6rem;
	}
}

.section > .shell > .wp-block-group {
	max-width: none;
}

/* ---------------------------------------------------------------
   Tipografia de seção
   --------------------------------------------------------------- */
.eyebrow {
	margin: 0;
	font-family: var(--font-display);
	font-size: 0.6875rem;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: var(--navy-mid);
}

.display-lg {
	font-size: 2rem;
	font-weight: 800;
	line-height: 1.04;
	letter-spacing: 0;
}

.display-md {
	font-size: 1.75rem;
	font-weight: 700;
	line-height: 1.08;
	letter-spacing: 0;
}

@media (min-width: 768px) {
	.display-lg {
		font-size: 2.75rem;
	}

	.display-md {
		font-size: 2.25rem;
	}
}

@media (min-width: 1024px) {
	.display-lg {
		font-size: 3.5rem;
	}
}

.lede {
	font-size: 1.0625rem;
	font-weight: 400;
	line-height: 1.62;
}

@media (min-width: 1024px) {
	.lede {
		font-size: 1.25rem;
	}
}

.section-heading {
	max-width: 48rem;
}

.section-heading .eyebrow + h2,
.section-heading .eyebrow + .display-md {
	margin-top: 1.25rem;
}

.section-heading p:not(.eyebrow) {
	margin-top: 1.25rem;
	color: var(--muted-color);
}

.text-muted {
	color: var(--muted-color);
}

/* ---------------------------------------------------------------
   Botões
   --------------------------------------------------------------- */
.btn,
.wp-block-button__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.75rem;
	min-height: 3rem;
	padding: 0.875rem 1.75rem;
	border: 1px solid transparent;
	border-radius: var(--radius);
	background-color: var(--navy);
	color: var(--white);
	font-family: var(--font-display);
	font-size: 0.75rem;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: 0;
	text-transform: uppercase;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn:hover,
.wp-block-button__link:hover {
	background-color: var(--navy-mid);
	color: var(--white);
}

.btn svg {
	width: 1rem;
	height: 1rem;
	flex-shrink: 0;
}

.btn-outline {
	background-color: transparent;
	border-color: var(--navy);
	color: var(--navy);
}

.btn-outline:hover {
	background-color: var(--navy);
	color: var(--white);
}

.btn-light {
	background-color: var(--white);
	color: var(--navy);
}

.btn-light:hover {
	background-color: var(--mist);
	color: var(--navy-mid);
}

.btn-outline-light {
	background-color: transparent;
	border-color: rgba(255, 255, 255, 0.7);
	color: var(--white);
}

.btn-outline-light:hover {
	background-color: var(--white);
	border-color: var(--white);
	color: var(--navy);
}

.btn-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 1rem;
}

.wp-block-buttons .wp-block-button .wp-block-button__link {
	border-radius: var(--radius);
}

.wp-block-button.is-style-outline .wp-block-button__link {
	border-color: var(--navy);
	color: var(--navy);
	background: transparent;
}

.wp-block-button.is-style-outline .wp-block-button__link:hover {
	background: var(--navy);
	color: var(--white);
}

/* ---------------------------------------------------------------
   Header
   --------------------------------------------------------------- */
.site-header {
	position: fixed;
	inset-inline: 0;
	top: 0;
	z-index: 50;
	background-color: var(--white);
	border-bottom: 1px solid var(--border-color);
	transition: box-shadow 0.3s ease;
}

.admin-bar .site-header {
	top: 32px;
}

@media (max-width: 782px) {
	.admin-bar .site-header {
		top: 46px;
	}
}

.site-header.is-scrolled {
	box-shadow: 0 8px 24px rgba(0, 31, 78, 0.12);
}

.site-header__stripe {
	height: 3px;
	background-image: var(--gradient-brasil);
}

.site-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	min-height: var(--header-height);
}

.site-header__logo {
	display: inline-flex;
	align-items: center;
	flex-shrink: 0;
}

.site-header__logo img {
	display: block;
	width: 7rem;
	height: auto;
}

@media (min-width: 640px) {
	.site-header__logo img {
		width: 11rem;
	}
}

@media (min-width: 1024px) {
	.site-header__logo img {
		width: 12rem;
	}
}

.site-header__navrow {
	border-top: 1px solid var(--border-color);
	background: var(--white);
}

.site-nav {
	display: block;
	padding-block: 0.25rem;
	margin-inline: auto;
	width: 100%;
	max-width: var(--shell-max);
	padding-inline: var(--shell-pad);
	text-align: center;
}

.site-nav > ul {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	align-items: center;
	gap: 0 0.75rem;
	list-style: none;
}

.site-nav li {
	min-width: 0;
}

.site-nav a {
	position: relative;
	display: flex;
	min-height: 2rem;
	align-items: center;
	justify-content: center;
	padding-block: 0.25rem;
	color: rgba(0, 31, 78, 0.72);
	font-size: 0.75rem;
	font-weight: 500;
	letter-spacing: 0.01em;
	white-space: nowrap;
}

.site-nav a::after {
	content: "";
	position: absolute;
	inset-inline: 0;
	bottom: 0;
	height: 2px;
	background-color: var(--navy-mid);
	transform: scaleX(0);
	transform-origin: left;
	transition: transform 0.25s ease;
}

.site-nav a:hover,
.site-nav .current-menu-item > a,
.site-nav a[aria-current="page"] {
	color: var(--navy);
}

.site-nav .current-menu-item > a,
.site-nav a[aria-current="page"] {
	font-weight: 600;
}

.site-nav a:hover::after,
.site-nav .current-menu-item > a::after,
.site-nav a[aria-current="page"]::after {
	transform: scaleX(1);
}

.site-header__actions {
	display: flex;
	align-items: center;
	gap: 0.75rem;
}

.site-header__cta {
	min-height: 0;
	padding: 0.625rem 1rem;
	font-size: 0.6875rem;
}

.site-header__languages ul {
	display: flex;
	align-items: center;
	gap: 0.25rem;
	list-style: none;
}

.site-header__languages :is(a, button) {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.25rem;
	height: 2.25rem;
	min-width: 2.25rem;
	min-height: 2.25rem;
	border: 1px solid transparent;
	border-radius: var(--radius);
	font-size: 1.125rem;
	line-height: 1;
}

/* Botão hambúrguer — visível abaixo de 980px */
.site-header__menu-toggle {
	display: inline-flex;
	flex-shrink: 0;
	align-items: center;
	justify-content: center;
	width: 2.75rem;
	height: 2.75rem;
	min-width: 2.75rem;
	min-height: 2.75rem;
	padding: 0;
	border: 1px solid var(--border-color);
	border-radius: var(--radius);
	background: var(--white);
	color: var(--navy);
	cursor: pointer;
	transition: border-color 0.2s ease, background-color 0.2s ease;
}

.site-header__menu-toggle:hover {
	border-color: var(--navy-mid);
	background: var(--mist);
}

.site-header__menu-icon {
	position: relative;
	display: block;
	width: 1.125rem;
	height: 0.875rem;
}

.site-header__menu-bar {
	position: absolute;
	left: 0;
	display: block;
	width: 100%;
	height: 2px;
	border-radius: 1px;
	background-color: currentColor;
	transition: transform 0.25s ease, opacity 0.2s ease, top 0.25s ease;
}

.site-header__menu-bar:nth-child(1) {
	top: 0;
}

.site-header__menu-bar:nth-child(2) {
	top: calc(50% - 1px);
}

.site-header__menu-bar:nth-child(3) {
	top: calc(100% - 2px);
}

.site-header__menu-toggle.is-active .site-header__menu-bar:nth-child(1) {
	top: calc(50% - 1px);
	transform: rotate(45deg);
}

.site-header__menu-toggle.is-active .site-header__menu-bar:nth-child(2) {
	opacity: 0;
}

.site-header__menu-toggle.is-active .site-header__menu-bar:nth-child(3) {
	top: calc(50% - 1px);
	transform: rotate(-45deg);
}

@media (prefers-reduced-motion: reduce) {
	.site-header__menu-bar,
	.site-header__menu {
		transition-duration: 0.01ms !important;
	}
}

/* Painel mobile */

.site-header__menu-cta {
	display: none;
}

.site-header__cta--panel {
	display: none;
}

.site-header__languages button {
	padding: 0;
	background: transparent;
	color: inherit;
	font: inherit;
	cursor: pointer;
}

.site-header__languages button:disabled {
	opacity: 0.55;
	cursor: not-allowed;
}

.site-header__languages :is(a[aria-current="true"], a[aria-current="page"], button.is-current) {
	background-color: var(--mist);
	border-color: var(--navy);
}

@media (max-width: 639px) {
	body:is(.is-pianc-brasil, .is-grupos-tecnicos) .site-nav a {
		min-height: 1.75rem;
	}
}

@media (min-width: 640px) {
	.site-header__inner {
		min-height: 5rem;
	}

	.site-nav {
		padding-block: 0.25rem;
	}

	.site-nav > ul {
		display: flex;
		flex-wrap: wrap;
		justify-content: center;
		gap: 0 1.25rem;
	}

	.site-nav a {
		min-height: 2.25rem;
		font-size: 0.875rem;
	}
}

@media (min-width: 1024px) {
	.site-header__inner {
		min-height: var(--header-height);
	}

	.site-header__cta {
		padding-inline: 1.25rem;
		font-size: 0.75rem;
	}
}

@media (max-width: 979px) {
	.site-header__actions {
		gap: 0.375rem;
	}

	.site-header__languages :is(a, button) {
		width: 2.75rem;
		height: 2.75rem;
		min-width: 2.75rem;
		min-height: 2.75rem;
	}

	.site-header__cta--desktop {
		display: none;
	}

	.site-header__menu {
		position: absolute;
		inset-inline: 0;
		top: 100%;
		z-index: 40;
		display: flex;
		flex-direction: column;
		max-height: var(--site-menu-panel-max-height, min(32rem, calc(100dvh - var(--site-header-height, 5rem))));
		overflow-y: auto;
		overscroll-behavior: contain;
		border-top: 1px solid var(--border-color);
		background-color: var(--white);
		box-shadow: 0 12px 32px rgba(0, 31, 78, 0.1);
		visibility: hidden;
		opacity: 0;
		transition: opacity 0.22s ease, visibility 0.22s;
		pointer-events: none;
		isolation: isolate;
	}

	.site-header__menu:not([hidden]).is-open {
		visibility: visible;
		opacity: 1;
		pointer-events: auto;
	}

	.site-header__menu .site-header__navrow,
	.site-header__menu .site-header__menu-cta,
	.site-header__menu .site-nav {
		background-color: var(--white);
	}

	.site-header__navrow {
		border-top: 0;
	}

	.site-nav {
		padding-block: 0.75rem 0.5rem;
		text-align: start;
	}

	.site-nav > ul {
		display: flex;
		flex-direction: column;
		align-items: stretch;
		gap: 0;
	}

	.site-header__menu .site-nav a {
		justify-content: flex-start;
		min-height: 2.75rem;
		padding-inline: 0.25rem;
		font-size: 0.9375rem;
		font-weight: 500;
		white-space: normal;
	}

	.site-header__menu .site-nav a::after {
		inset-inline: 0.25rem;
		bottom: 0.35rem;
		width: auto;
	}

	body:is(.is-a-pianc, .is-pianc-brasil, .is-grupos-tecnicos, .is-publicacoes, .is-eventos, .is-jovens-profissionais, .is-associe-se, .is-contato) .site-header__menu .site-nav a {
		min-height: 2.75rem;
	}

	.site-header__menu-cta {
		display: block;
		padding-block: 0.75rem 1.25rem;
	}

	.site-header__cta--panel {
		display: inline-flex;
		width: 100%;
		min-height: 2.75rem;
		justify-content: center;
		padding-block: 0.75rem;
		font-size: 0.8125rem;
	}

	/* Fallback sem JS: header no fluxo, sem sobrepor o conteúdo */
	html:not(.has-mobile-menu-js) .site-header {
		position: relative;
		inset-inline: auto;
	}

	html:not(.has-mobile-menu-js) .site-header__menu-toggle {
		display: none;
	}

	html:not(.has-mobile-menu-js) .site-header__menu {
		position: static;
		max-height: none;
		overflow: visible;
		visibility: visible;
		opacity: 1;
		pointer-events: auto;
		box-shadow: none;
	}

	html:not(.has-mobile-menu-js) .site-header__menu[hidden] {
		display: block;
	}

	html:not(.has-mobile-menu-js) .site-header__cta--desktop {
		display: none;
	}

	html:not(.has-mobile-menu-js) .site-header__menu-cta {
		display: block;
	}

	html:not(.has-mobile-menu-js) .site-header__cta--panel {
		display: inline-flex;
	}

	html:not(.has-mobile-menu-js) body {
		padding-top: 0;
	}
}

@media (min-width: 980px) {
	.site-header__menu-toggle {
		display: none;
	}

	.site-header__menu {
		display: contents;
	}

	.site-header__menu-cta {
		display: none;
	}

	.site-header__inner {
		justify-content: space-between;
		padding-inline: clamp(1.5rem, calc(25vw - 14rem), var(--shell-pad));
	}

	.site-header__navrow {
		position: absolute;
		inset-block: 3px 1px;
		left: 50%;
		width: max-content;
		max-width: 52%;
		transform: translateX(-50%);
		border: 0;
		background: transparent;
		pointer-events: none;
	}

	.site-header__navrow .site-nav {
		max-width: none;
		padding: 0;
		pointer-events: auto;
	}

	.site-header__navrow .site-nav > ul {
		flex-wrap: nowrap;
		gap: 1rem;
	}

	.site-header__navrow .site-nav a {
		min-height: var(--header-height);
		font-size: 0.8125rem;
	}

	.site-header__navrow .site-nav a::after {
		bottom: calc(50% - 1.1875rem);
	}

	.site-header__navrow {
		border-top: 0;
	}

	.site-header__navrow .site-nav {
		display: block;
	}

	.site-nav > ul {
		display: flex;
		gap: 1.25rem;
	}
}

body {
	padding-top: var(--site-header-height, calc(var(--header-height) + 3px));
}

body:is(.is-pianc-brasil, .is-grupos-tecnicos, .is-publicacoes, .is-eventos, .is-jovens-profissionais, .is-associe-se) {
	padding-top: 0;
}

@media (min-width: 640px) {
	body {
		padding-top: var(--site-header-height, calc(5rem + 3px));
	}
}

@media (min-width: 980px) {
	body {
		padding-top: var(--site-header-height, calc(var(--header-height) + 4px));
	}
}

@media (min-width: 980px) {
	html:not(.has-mobile-menu-js) .site-header {
		position: fixed;
		inset-inline: 0;
		top: 0;
	}

	html:not(.has-mobile-menu-js) body {
		padding-top: var(--site-header-height, calc(var(--header-height) + 4px));
	}
}

/* ---------------------------------------------------------------
   Footer
   --------------------------------------------------------------- */
.site-footer {
	border-top: 1px solid var(--border-color);
	background-color: var(--mist);
	color: var(--navy);
}

.site-footer__grid {
	display: grid;
	gap: 3.5rem;
	padding-block: 5rem;
}

.site-footer__brand p {
	margin-top: 1.5rem;
	max-width: 24rem;
	color: var(--muted-color);
	font-size: 0.875rem;
	line-height: 1.7;
}

.site-footer__brand img {
	width: 12rem;
	height: auto;
}

.site-footer__stripe {
	width: 10rem;
	height: 3px;
	margin-top: 2rem;
	background-image: var(--gradient-brasil);
}

.site-footer__grid h2 {
	margin-bottom: 1.5rem;
}

.site-footer__grid ul {
	list-style: none;
}

.site-footer__links li + li {
	margin-top: 0.75rem;
}

.site-footer__links a {
	color: rgba(0, 31, 78, 0.75);
	font-size: 0.875rem;
}

.site-footer__links a:hover {
	color: var(--navy);
}

.site-footer__contact li {
	display: flex;
	align-items: flex-start;
	gap: 0.75rem;
	color: rgba(0, 31, 78, 0.75);
	font-size: 0.875rem;
}

.site-footer__contact li + li {
	margin-top: 1rem;
}

.site-footer__contact svg {
	width: 1rem;
	height: 1rem;
	margin-top: 0.2rem;
	flex-shrink: 0;
	color: var(--navy-mid);
}

.site-footer__bottom {
	border-top: 1px solid var(--border-color);
}

.site-footer__bottom-inner {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	padding-block: 1.75rem;
	color: var(--muted-color);
	font-size: 0.75rem;
}

@media (min-width: 640px) {
	.site-footer__bottom-inner {
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
	}
}

@media (min-width: 1024px) {
	.site-footer__grid {
		grid-template-columns: 1.4fr 1fr 1fr;
		padding-block: 6rem;
	}
}

/* ---------------------------------------------------------------
   Formulários
   --------------------------------------------------------------- */
.field label,
.field-label {
	display: block;
	font-family: var(--font-display);
	font-size: 0.6875rem;
	font-weight: 700;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: var(--navy-mid);
}

.field input,
.field select,
.field textarea {
	width: 100%;
	margin-top: 0.75rem;
	padding: 0.875rem 1rem;
	border: 1px solid var(--border-color);
	border-radius: var(--radius);
	background-color: var(--white);
	color: var(--font-color);
	font-family: var(--font-sans);
	font-size: 0.9375rem;
	outline: none;
	transition: border-color 0.2s ease;
}

.field textarea {
	resize: vertical;
	min-height: 9rem;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
	border-color: var(--navy-mid);
}

.field-grid {
	display: grid;
	gap: 1.5rem;
}

@media (min-width: 640px) {
	.field-grid--two {
		grid-template-columns: 1fr 1fr;
	}
}

.form-note {
	margin-top: 1rem;
	color: var(--muted-color);
	font-size: 0.875rem;
	line-height: 1.6;
}

.form-status {
	display: flex;
	align-items: flex-start;
	gap: 0.75rem;
	margin-top: 1.25rem;
	padding: 0.875rem 1rem;
	border-left: 3px solid var(--brasil-green);
	background: var(--mist);
	color: var(--navy);
	font-size: 0.875rem;
	scroll-margin-top: calc(var(--site-header-height, var(--header-height)) + 1.5rem);
}

.form-status--success {
	align-items: center;
	padding-block: 0.75rem;
	border: 1px solid #cce8d5;
	border-left: 3px solid var(--brasil-green);
	border-radius: var(--radius);
	background: #f3faf5;
	line-height: 1.5;
}

.form-status__icon {
	display: grid;
	flex: 0 0 2rem;
	place-items: center;
	width: 2rem;
	height: 2rem;
	border-radius: 50%;
	background: #dff2e5;
	color: #116638;
}

.form-status__icon svg {
	width: 1.125rem;
	height: 1.125rem;
}

.form-status--error {
	border-left-color: #b3261e;
}

.form-honeypot {
	position: absolute !important;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* Utilitários de espaço */
.mt-4 {
	margin-top: 1rem;
}

.mt-6 {
	margin-top: 1.5rem;
}

.mt-8 {
	margin-top: 2rem;
}

.mt-10 {
	margin-top: 2.5rem;
}

.mt-16 {
	margin-top: 4rem;
}

/* Listagens de posts */
.post-list {
	margin-top: 3rem;
	border-top: 1px solid var(--border-color);
}

.post-list__item {
	padding-block: 2rem;
	border-bottom: 1px solid var(--border-color);
}

.post-list__title {
	margin-top: 0.75rem;
	font-size: 1.375rem;
}

.post-list__title a {
	color: var(--navy);
}

.post-list__item p:not(.eyebrow) {
	margin-top: 0.75rem;
}

.pagination {
	margin-top: 2.5rem;
}

.pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.5rem;
	min-height: 2.5rem;
	border: 1px solid var(--border-color);
	color: var(--navy);
	font-size: 0.875rem;
}

.pagination .current {
	background: var(--navy);
	border-color: var(--navy);
	color: var(--white);
}

/* Busca */
.search-form {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin-top: 2rem;
	max-width: 34rem;
}

.search-form input[type="search"] {
	flex: 1 1 12rem;
	min-height: 3rem;
	padding: 0.75rem 1rem;
	border: 1px solid var(--border-color);
	border-radius: var(--radius);
	font-size: 0.9375rem;
}

/* ---------------------------------------------------------------
   Utilitários
   --------------------------------------------------------------- */
.link-underline {
	background-image: linear-gradient(currentColor, currentColor);
	background-position: 0 100%;
	background-repeat: no-repeat;
	background-size: 0% 1px;
	transition: background-size 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.link-underline:hover {
	background-size: 100% 1px;
}

.credit {
	pointer-events: none;
	position: absolute;
	right: 0;
	bottom: 0;
	max-width: 90%;
	padding: 0.25rem 0.625rem;
	background: rgba(0, 31, 78, 0.7);
	color: rgba(255, 255, 255, 0.85);
	font-size: 0.625rem;
	line-height: 1.35;
}

.media-frame {
	position: relative;
	overflow: hidden;
	background-color: var(--navy);
}

.media-frame img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

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

.ratio-3-2 {
	aspect-ratio: 3 / 2;
}

.rule {
	height: 1px;
	background-color: var(--border-color);
	border: 0;
}

/* Revelação ao rolar */
.reveal {
	opacity: 0;
}

.reveal-in {
	animation: reveal-up 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes reveal-up {
	from {
		opacity: 0;
		transform: translateY(26px);
	}
	to {
		opacity: 1;
		transform: none;
	}
}

.back-to-top {
	position: fixed;
	right: 1.5rem;
	bottom: var(--back-to-top-bottom, 1.5rem);
	z-index: 40;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.75rem;
	height: 2.75rem;
	border: 0;
	background: var(--navy);
	color: var(--white);
	box-shadow: var(--shadow-editorial);
	cursor: pointer;
	opacity: 0;
	transform: translateY(0.75rem);
	pointer-events: none;
	transition: opacity 0.25s ease, transform 0.25s ease;
}

.back-to-top.is-visible {
	opacity: 1;
	transform: none;
	pointer-events: auto;
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	.reveal {
		opacity: 1;
	}

	.reveal-in {
		animation: none;
	}

	.back-to-top {
		transition: none;
	}
}

/* ---------------------------------------------------------------
   Ajustes do editor de blocos no front
   --------------------------------------------------------------- */
.entry-content > * + * {
	margin-top: 1.5rem;
}

.entry-content > .alignwide {
	max-width: var(--shell-max);
	width: 100%;
	margin-inline: auto;
}

.entry-content > .alignfull {
	max-width: none;
	width: 100%;
}

.entry-content h2,
.entry-content h3 {
	margin-top: 2rem;
}

.wp-block-image img {
	height: auto;
}

.wp-block-image figcaption {
	color: var(--muted-color);
	font-size: 0.8125rem;
}

/* Conteúdo simples (post/página genérica) */
.prose {
	max-width: 46rem;
	margin-inline: auto;
}

.prose > * + * {
	margin-top: 1.25rem;
}

.prose h2 {
	margin-top: 2.5rem;
}

.prose h3 {
	margin-top: 2rem;
}

.prose ul,
.prose ol {
	padding-left: 1.5rem;
	list-style: revert;
}

.prose li + li {
	margin-top: 0.5rem;
}

.prose blockquote {
	margin: 2rem 0;
	padding-left: 1.5rem;
	border-left: 3px solid var(--navy-mid);
	color: var(--muted-color);
	font-size: 1.125rem;
}

.prose a {
	text-decoration: underline;
}

/* ---------------------------------------------------------------
   Seções compostas com blocos core (usadas nos patterns)
   --------------------------------------------------------------- */
/* Seções encostadas: sem a margem de fluxo entre blocos de nível superior */
.entry-content > :is(section, nav, .alignfull) + :is(section, nav, .alignfull) {
	margin-top: 0;
}

.section > .shell > .wp-block-group,
.section > .shell > .wp-block-columns {
	margin-block: 0;
}

.section .wp-block-heading,
.section .wp-block-paragraph,
.section .wp-block-image {
	margin-block: 0;
}

.section-heading > * + * {
	margin-top: 1.25rem;
}

.section-heading > p:not(.eyebrow) {
	color: var(--muted-color);
}

.section--mist {
	border-block: 1px solid var(--border-color);
}

.section--navy .wp-block-heading,
.section--navy p {
	color: var(--white);
}

.section--navy .eyebrow {
	color: var(--navy-soft);
}

/* Duas colunas editoriais */
.split {
	align-items: center;
	gap: 3rem;
}

.split p {
	color: var(--muted-color);
	line-height: 1.7;
}

.split > .wp-block-column > * + * {
	margin-top: 1.25rem;
}

.split .lede {
	color: var(--navy);
	font-size: 1.125rem;
}

@media (min-width: 1024px) {
	.split {
		gap: 4rem;
	}
}

/* Moldura de imagem com crédito sobreposto */
.figure-frame {
	position: relative;
	overflow: hidden;
	margin: 0;
	background-color: var(--navy);
}

.figure-frame img {
	display: block;
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
}

.figure-frame figcaption,
.figure-frame .wp-element-caption {
	position: absolute;
	right: 0;
	bottom: 0;
	max-width: 90%;
	padding: 0.25rem 0.625rem;
	background: rgba(0, 15, 38, 0.72);
	color: rgba(255, 255, 255, 0.85);
	font-size: 0.625rem;
	line-height: 1.35;
}

/* Nota de Grupo de Trabalho ativo */
.gt-note {
	border-left: 2px solid var(--brasil-green);
	background-color: var(--white);
	padding: 1.25rem;
}

.gt-note .eyebrow {
	color: var(--brasil-green);
}

.gt-note p + p {
	margin-top: 0.5rem;
	font-family: var(--font-display);
	font-weight: 700;
	color: var(--navy);
}

/* Botão claro em faixas navy */
.wp-block-button.is-style-light .wp-block-button__link {
	background-color: var(--white);
	color: var(--navy);
}

.wp-block-button.is-style-light .wp-block-button__link:hover {
	background-color: var(--mist);
	color: var(--navy);
}

/* Lista de destaques em coluna */
.feature-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.feature-list li {
	display: flex;
	gap: 0.75rem;
	padding-block: 1rem;
	border-bottom: 1px solid var(--border-color);
	color: var(--navy);
	font-weight: 500;
}

.feature-list li::before {
	content: "";
	flex-shrink: 0;
	width: 0.375rem;
	height: 0.375rem;
	margin-top: 0.55rem;
	background-color: var(--brasil-green);
}

@media print {
	.reveal {
		opacity: 1;
	}
}
