/* Ajustes que o theme.json não cobre. */

html {
	scroll-behavior: smooth;
}

/* Âncoras do menu (#sobre, #contato…) não ficam escondidas atrás do cabeçalho fixo. */
[id] {
	scroll-margin-top: 5.5rem;
}

/* Cabeçalho, conteúdo e rodapé encostados: cada seção cuida do próprio espaçamento. */
.wp-site-blocks > * + * {
	margin-block-start: 0;
}

/* Cabeçalho fixo no topo durante a rolagem. */
.wp-site-blocks > header {
	position: sticky;
	top: 0;
	z-index: 100;
}

.admin-bar .wp-site-blocks > header {
	top: var(--wp-admin--admin-bar--height, 0px);
}

@media (max-width: 600px) {
	.admin-bar .wp-site-blocks > header {
		top: 0;
	}
}

/* Seções de largura total seguidas encostam umas nas outras. */
.wp-block-post-content > .alignfull + .alignfull {
	margin-block-start: 0;
}

/* Links e foco visível para quem navega pelo teclado. */
a {
	text-underline-offset: 0.2em;
	text-decoration-thickness: 1px;
}

:where(a, button, input, select, textarea, .wp-element-button):focus-visible {
	outline: 2px solid var(--wp--preset--color--accent);
	outline-offset: 2px;
}

.abvesa-escuro :where(a, button, .wp-element-button):focus-visible {
	outline-color: var(--wp--preset--color--accent-light);
}

/* Campo de busca no mesmo estilo dos botões. */
.wp-block-search__input {
	padding: 0.7rem 0.9rem;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--wp--custom--radius--small);
}

/* Botão com contorno: mesma altura do botão cheio (o CSS padrão do WordPress troca o espaçamento). */
.wp-block-button.is-style-outline > .wp-element-button {
	padding: calc(0.85rem - 1.5px) calc(1.5rem - 1.5px);
}

.wp-block-button.is-style-outline > .wp-element-button:hover {
	background-color: var(--wp--preset--color--primary-light);
	color: var(--wp--preset--color--primary);
}

/* Fundo de hexágonos, como o símbolo da logo. Usado em faixas escuras, sempre bem discreto. */
:root {
	--abvesa-hexagonos: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='100'%3E%3Cpath d='M28 66L0 50L0 16L28 0L56 16L56 50L28 66L28 100' fill='none' stroke='%23fff' stroke-opacity='.07'/%3E%3Cpath d='M28 0L28 34L0 50L0 84L28 100L56 84L56 50L28 34' fill='none' stroke='%23fff' stroke-opacity='.07'/%3E%3C/svg%3E");
}

/* ---------- Faixas escuras (azul da logo e azul institucional) ---------- */

.abvesa-escuro :where(h1, h2, h3, h4, h5, h6) {
	color: var(--wp--preset--color--base);
}

.abvesa-escuro a:where(:not(.wp-element-button)) {
	color: var(--wp--preset--color--accent-light);
}

.abvesa-escuro a:where(:not(.wp-element-button)):hover {
	color: var(--wp--preset--color--base);
}

.abvesa-escuro .wp-element-button {
	background-color: var(--wp--preset--color--accent);
}

.abvesa-escuro .wp-element-button:hover {
	background-color: var(--wp--preset--color--base);
	color: var(--wp--preset--color--primary);
}

.abvesa-escuro .wp-block-button.is-style-outline > .wp-element-button {
	border-color: rgba(255, 255, 255, 0.55);
	background-color: transparent;
	color: var(--wp--preset--color--base);
}

.abvesa-escuro .wp-block-button.is-style-outline > .wp-element-button:hover {
	border-color: var(--wp--preset--color--base);
	background-color: rgba(255, 255, 255, 0.08);
	color: var(--wp--preset--color--base);
}

/* Botão branco, para o fundo azul institucional. */
.abvesa-escuro .abvesa-botao-claro > .wp-element-button {
	background-color: var(--wp--preset--color--base);
	color: var(--wp--preset--color--primary);
}

.abvesa-escuro .abvesa-botao-claro > .wp-element-button:hover {
	background-color: var(--wp--preset--color--primary-light);
	color: var(--wp--preset--color--primary);
}

/* Rótulo curto acima dos títulos, com um traço antes. */
.abvesa-eyebrow {
	font-family: var(--wp--preset--font-family--heading);
	font-size: 0.8125rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--wp--preset--color--accent);
}

.abvesa-eyebrow::before {
	content: "";
	display: inline-block;
	width: 1.5rem;
	height: 2px;
	margin-right: 0.65rem;
	vertical-align: middle;
	background-color: currentColor;
}

.abvesa-escuro .abvesa-eyebrow {
	color: var(--wp--preset--color--accent-light);
}

.abvesa-eyebrow + .wp-block-heading {
	margin-top: 0.75rem;
}

/* Lema da marca: "Força coletiva. Mercado mais forte." */
.abvesa-lema {
	font-family: var(--wp--preset--font-family--heading);
	font-size: 0.9375rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--wp--preset--color--base);
}

.abvesa-lema span {
	color: var(--wp--preset--color--accent-light);
}

/* Link com seta. */
.abvesa-link-seta,
.abvesa-link-seta a {
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 700;
	text-decoration: none;
}

.abvesa-link-seta a::after,
a.abvesa-link-seta::after {
	content: " →";
}

/* Hexágono com ícone (pilares e "Para quem é"): os ícones são brancos e ficam sobre o hexágono azul. */
.abvesa-icone-users { --abvesa-icone: url("../images/icones/users.svg"); }
.abvesa-icone-store { --abvesa-icone: url("../images/icones/store.svg"); }
.abvesa-icone-graduation-cap { --abvesa-icone: url("../images/icones/graduation-cap.svg"); }
.abvesa-icone-landmark { --abvesa-icone: url("../images/icones/landmark.svg"); }
.abvesa-icone-trending-up { --abvesa-icone: url("../images/icones/trending-up.svg"); }
.abvesa-icone-building-2 { --abvesa-icone: url("../images/icones/building-2.svg"); }
.abvesa-icone-stethoscope { --abvesa-icone: url("../images/icones/stethoscope.svg"); }

.abvesa-pilar::before,
.abvesa-lista-icones li::before {
	content: "";
	display: block;
	width: 3rem;
	height: 3.46rem;
	clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
	background-color: var(--wp--preset--color--primary);
	background-image: var(--abvesa-icone);
	background-position: center;
	background-repeat: no-repeat;
	background-size: 1.4rem;
}

/* ---------- Cabeçalho ---------- */

.abvesa-header {
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.abvesa-logo-topo img,
.abvesa-logo-rodape img {
	display: block;
}

.abvesa-header .wp-block-navigation a {
	color: inherit;
}

.abvesa-header .wp-block-navigation a:hover {
	color: var(--wp--preset--color--accent-light);
}

/* O WordPress só troca o menu pelo hambúrguer abaixo de 600 px. Com sete itens e o botão,
   o menu não cabe numa linha até 1180 px: nessa faixa, o hambúrguer também aparece. */
@media (min-width: 600px) and (max-width: 1180px) {
	.abvesa-header .wp-block-navigation__responsive-container-open:not(.always-shown) {
		display: flex;
	}

	.abvesa-header .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) {
		display: none;
	}
}

.abvesa-header .wp-block-navigation__responsive-container.is-menu-open {
	padding: var(--wp--preset--spacing--40);
}

.abvesa-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item {
	font-size: 1.25rem;
}

@media (max-width: 781px) {
	.abvesa-logo-topo img {
		height: 30px !important;
	}

	.abvesa-header .abvesa-header-direita {
		gap: 0.75rem;
	}

	.abvesa-header .abvesa-header-cta .wp-element-button {
		padding: 0.6rem 0.9rem;
		font-size: 0.875rem;
	}
}

/* ---------- Abertura ---------- */

.abvesa-hero,
.abvesa-titulo-pagina,
.abvesa-painel-logo,
.abvesa-contato {
	position: relative;
	overflow: hidden;
	isolation: isolate;
}

/* Hexágonos que somem para a esquerda, e um brilho azul no canto. */
.abvesa-hero::before,
.abvesa-titulo-pagina::before,
.abvesa-painel-logo::before,
.abvesa-contato::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background-image: var(--abvesa-hexagonos);
	-webkit-mask-image: linear-gradient(to left, #000 15%, transparent 75%);
	mask-image: linear-gradient(to left, #000 15%, transparent 75%);
}

.abvesa-hero {
	background-image: radial-gradient(55rem 32rem at 90% -10%, rgba(29, 92, 140, 0.55), transparent 65%);
}

.abvesa-hero h1 {
	line-height: 1.08;
	letter-spacing: -0.03em;
}

.abvesa-hero-card {
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: var(--wp--custom--radius--medium);
	background-color: rgba(255, 255, 255, 0.04);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
}

/* Lista com hexágono e ícone em cada item. */
.abvesa-lista-icones {
	margin-bottom: 0;
	padding-left: 0;
	list-style: none;
}

.abvesa-lista-icones li {
	position: relative;
	min-height: 3.46rem;
	padding-left: 4rem;
	line-height: 1.5;
}

.abvesa-lista-icones li + li {
	margin-top: 1.25rem;
}

.abvesa-lista-icones li::before {
	position: absolute;
	top: 0;
	left: 0;
	background-color: var(--wp--preset--color--accent);
}

.abvesa-lista-icones strong {
	font-family: var(--wp--preset--font-family--heading);
	font-size: 1.0625rem;
	color: var(--wp--preset--color--base);
}

/* ---------- Quem somos ---------- */

.abvesa-painel-logo {
	align-items: center;
	border-radius: var(--wp--custom--radius--medium);
	text-align: center;
}

.abvesa-painel-logo::before {
	-webkit-mask-image: radial-gradient(circle at 50% 40%, transparent 25%, #000 85%);
	mask-image: radial-gradient(circle at 50% 40%, transparent 25%, #000 85%);
}

.abvesa-painel-logo .wp-block-image {
	margin: 0;
}

.abvesa-painel-logo .wp-block-image img {
	display: block;
	max-width: 100%;
}

/* ---------- Cards ---------- */

.abvesa-card {
	height: 100%;
	overflow: hidden;
	background-color: var(--wp--preset--color--base);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--wp--custom--radius--medium);
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.abvesa-card:hover {
	box-shadow: var(--wp--preset--shadow--suave);
	transform: translateY(-2px);
}

.abvesa-pilar::before {
	margin-bottom: 1.25rem;
}


/* Evento sem imagem de destaque: faixa azul com o símbolo, no lugar da foto. */
.abvesa-card-evento {
	display: flex;
	flex-direction: column;
}

.abvesa-card-evento .wp-block-post-featured-image {
	margin: 0;
}

.abvesa-card-evento:not(:has(.wp-block-post-featured-image))::before {
	content: "";
	display: block;
	aspect-ratio: 16 / 9;
	background-color: var(--wp--preset--color--navy);
	background-image: url("../images/simbolo.svg"), var(--abvesa-hexagonos);
	background-position: center, center;
	background-repeat: no-repeat, repeat;
	background-size: auto 38%, auto;
}

/* ---------- Por que agora ---------- */

.abvesa-elo {
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-left: 3px solid var(--wp--preset--color--accent-light);
	border-radius: var(--wp--custom--radius--small);
	background-color: rgba(255, 255, 255, 0.04);
}

.abvesa-elo p {
	margin: 0;
}

.abvesa-elo .abvesa-eyebrow::before {
	display: none;
}

.abvesa-destaque-frase {
	border-top: 1px solid rgba(255, 255, 255, 0.12);
}

/* ---------- Logos de associados e parceiros ---------- */

.abvesa-logos {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(11rem, 13rem));
	justify-content: center;
	gap: 1rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.abvesa-grupo-logos .abvesa-logos {
	justify-content: start;
}

.abvesa-logo {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 7.5rem;
	margin: 0;
	padding: 1rem 1.25rem;
	background-color: var(--wp--preset--color--base);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--wp--custom--radius--medium);
	transition: box-shadow 0.2s ease;
}

.abvesa-logo:hover {
	box-shadow: var(--wp--preset--shadow--suave);
}

.abvesa-logo a {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
}

.abvesa-logo img {
	display: block;
	width: auto;
	max-width: 100%;
	object-fit: contain;
}

.abvesa-logos-vazio {
	color: var(--wp--preset--color--muted);
}

.abvesa-associados .abvesa-logos-vazio {
	text-align: center;
}

@media (max-width: 600px) {
	.abvesa-logos {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.abvesa-logo {
		height: 6rem;
		padding: 0.75rem;
	}

	.abvesa-logo img {
		zoom: 0.8;
	}
}

/* ---------- Contato ---------- */

.abvesa-contato a:where(:not(.wp-element-button)) {
	color: var(--wp--preset--color--base);
	text-decoration: underline;
}

.abvesa-contato-email {
	color: var(--wp--preset--color--navy-soft);
}

/* ---------- Faixa de título das páginas internas ---------- */

.abvesa-titulo-pagina .wp-block-post-date,
.abvesa-titulo-pagina .wp-block-term-description {
	color: var(--wp--preset--color--navy-soft);
}

.abvesa-titulo-pagina .wp-block-post-terms a {
	color: var(--wp--preset--color--accent-light);
}

/* Texto em 760 px, dentro dos grupos largos (layout padrão, alinhado à esquerda). */
.abvesa-largura-texto {
	max-width: 760px;
}

/* ---------- Rodapé ---------- */

.abvesa-footer {
	border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.abvesa-footer .abvesa-lema {
	font-size: 0.8125rem;
}

.abvesa-footer-titulo {
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.abvesa-footer a:where(:not(.wp-element-button)),
.abvesa-footer .wp-block-navigation a {
	color: var(--wp--preset--color--navy-soft);
	text-decoration: none;
}

.abvesa-footer a:where(:not(.wp-element-button)):hover,
.abvesa-footer .wp-block-navigation a:hover {
	color: var(--wp--preset--color--base);
}

.abvesa-footer-base {
	border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.abvesa-footer .abvesa-social {
	gap: 0.85rem;
}

.abvesa-footer .abvesa-social.is-style-logos-only .wp-social-link {
	color: var(--wp--preset--color--navy-soft);
}

.abvesa-footer .abvesa-social.is-style-logos-only .wp-social-link:hover {
	color: var(--wp--preset--color--base);
}

/* ---------- Páginas institucionais ---------- */

.abvesa-subtitulo {
	margin-top: var(--wp--preset--spacing--50) !important;
}

.abvesa-frase-destaque {
	font-family: var(--wp--preset--font-family--heading);
	font-size: 1.1875rem;
	font-weight: 700;
	line-height: 1.45;
	color: var(--wp--preset--color--primary);
}

/* Texto dos cards: cinza no fundo claro, azul-acinzentado nas faixas escuras. */
.abvesa-card p,
.abvesa-card li {
	color: var(--wp--preset--color--muted);
	font-size: 0.9375rem;
}

/* Só a margem de baixo: a de cima é o espaçamento entre blocos do próprio card. */
.abvesa-card p {
	margin-bottom: 0;
}

.abvesa-escuro .abvesa-card {
	border-color: rgba(255, 255, 255, 0.14);
	background-color: rgba(255, 255, 255, 0.05);
}

.abvesa-escuro .abvesa-card p {
	color: var(--wp--preset--color--navy-soft);
}

.abvesa-card-destaque {
	border-color: var(--wp--preset--color--accent);
	box-shadow: inset 0 3px 0 var(--wp--preset--color--accent);
}

.abvesa-card-categoria .abvesa-eyebrow {
	margin: 0;
}

.abvesa-card-categoria p:last-child {
	font-size: 1rem;
}

.abvesa-destaque {
	height: auto;
	margin-top: var(--wp--preset--spacing--40);
	background-color: var(--wp--preset--color--surface);
}

.has-surface-background-color .abvesa-destaque {
	background-color: var(--wp--preset--color--base);
}

.abvesa-destaque:hover {
	transform: none;
	box-shadow: none;
}

.abvesa-contato-destaque {
	font-family: var(--wp--preset--font-family--heading);
	font-size: 1.125rem !important;
	font-weight: 700;
}

/* Etiquetas (órgãos, temas, princípios). */
.abvesa-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
	margin-top: 1rem;
	padding: 0;
	list-style: none;
}

.abvesa-chips li {
	margin: 0;
	padding: 0.45rem 1rem;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 999px;
	background-color: var(--wp--preset--color--base);
	color: var(--wp--preset--color--contrast);
	font-size: 0.875rem;
	line-height: 1.4;
}

/* Linha do tempo (marcos). */
.abvesa-linha-do-tempo {
	margin-top: var(--wp--preset--spacing--40);
	padding: 0 0 0 1.75rem;
	border-left: 2px solid var(--wp--preset--color--border);
	list-style: none;
}

.abvesa-linha-do-tempo li {
	position: relative;
	max-width: 760px;
}

.abvesa-linha-do-tempo li + li {
	margin-top: 1.75rem;
}

.abvesa-linha-do-tempo li::before {
	content: "";
	position: absolute;
	top: 0.3rem;
	left: calc(-1.75rem - 7px);
	width: 12px;
	height: 12px;
	border: 3px solid var(--wp--preset--color--surface);
	border-radius: 50%;
	background-color: var(--wp--preset--color--accent);
	box-shadow: 0 0 0 2px var(--wp--preset--color--accent);
}

.abvesa-linha-do-tempo strong {
	font-family: var(--wp--preset--font-family--heading);
	font-size: 0.8125rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--wp--preset--color--accent);
}

/* Passos numerados (processo de adesão). */
.abvesa-passos {
	max-width: 870px;
	margin-top: var(--wp--preset--spacing--40);
	padding: 0;
	list-style: none;
	counter-reset: passo;
}

.abvesa-passos li {
	position: relative;
	min-height: 2.25rem;
	padding: 1.25rem 0 1.25rem 3.25rem;
	border-top: 1px solid var(--wp--preset--color--border);
	counter-increment: passo;
}

.abvesa-passos li:last-child {
	border-bottom: 1px solid var(--wp--preset--color--border);
}

.abvesa-passos li::before {
	content: counter(passo);
	position: absolute;
	top: 1.1rem;
	left: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 2.25rem;
	height: 2.25rem;
	border-radius: 50%;
	background-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--base);
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 800;
}

/* Lista com marcador de check. */
.abvesa-lista-check,
.abvesa-lista-links {
	margin: 0;
	padding: 0;
	list-style: none;
}

.abvesa-lista-check li {
	position: relative;
	padding-left: 1.75rem;
}

.abvesa-lista-check li + li,
.abvesa-lista-links li + li {
	margin-top: 0.6rem;
}

.abvesa-lista-check li::before {
	content: "";
	position: absolute;
	top: 0.25em;
	left: 0;
	width: 1.1rem;
	height: 1.1rem;
	border-radius: 50%;
	background: var(--wp--preset--color--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.6 2.6L12 5.5' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 0.75rem no-repeat;
}

.abvesa-lista-links a {
	font-weight: 600;
}

/* ---------- Carrossel de associados ---------- */

.abvesa-carrossel {
	overflow: hidden;
	-webkit-mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
	mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
}

.abvesa-carrossel-faixa {
	display: flex;
	gap: 1rem;
	width: max-content;
	margin: 0;
	padding: 0.5rem 0;
	list-style: none;
	animation: abvesa-rolar var(--abvesa-duracao, 30s) linear infinite;
}

.abvesa-carrossel-faixa .abvesa-logo {
	flex: none;
	width: 13rem;
}

/* A faixa tem duas metades iguais (separadas por um espaço de 1rem): andar metade + meio espaço emenda sem salto. */
@keyframes abvesa-rolar {
	to {
		transform: translateX(calc(-50% - 0.5rem));
	}
}

.abvesa-carrossel:hover .abvesa-carrossel-faixa,
.abvesa-carrossel:focus-within .abvesa-carrossel-faixa {
	animation-play-state: paused;
}

@media (max-width: 600px) {
	.abvesa-carrossel-faixa .abvesa-logo {
		width: 10rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.abvesa-carrossel {
		-webkit-mask-image: none;
		mask-image: none;
	}

	.abvesa-carrossel-faixa {
		flex-wrap: wrap;
		justify-content: center;
		width: auto;
		animation: none;
	}

	.abvesa-carrossel-faixa .abvesa-copia {
		display: none;
	}
}

/* ---------- Posts (eventos) ---------- */

/* Galeria ainda sem fotos (marcada no post para receber as imagens): não ocupa espaço no site. */
.wp-block-gallery:not(:has(img)) {
	display: none;
}

/* Tabelas dos posts: bordas finas e cabeçalho em cinza claro, no lugar das bordas pretas padrão. */
.wp-block-table table {
	border-collapse: collapse;
	font-size: 0.95em;
}

.wp-block-table thead {
	border-bottom: 0;
}

.wp-block-table th,
.wp-block-table td {
	padding: 0.65rem 0.9rem;
	border: 1px solid var(--wp--preset--color--border);
	text-align: left;
	vertical-align: top;
}

.wp-block-table th {
	background-color: var(--wp--preset--color--surface);
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 700;
}

@media (max-width: 600px) {
	.wp-block-table table {
		font-size: 0.85em;
	}

	.wp-block-table th,
	.wp-block-table td {
		padding: 0.5rem 0.6rem;
	}
}

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

	.abvesa-card,
	.abvesa-logo {
		transition: none;
	}

	.abvesa-card:hover {
		transform: none;
	}
}
