/* Watermark styles (Marca d’água): the faded Valerim symbol needed opacity,
   which the brand manual does not allow; the styles stay registered (saved
   content uses them) but draw nothing. */

/* Clickable card (Início "Frentes"): the hover background fills exactly the
   grid cell. Top on the rule above the grid, bottom on the card's own bottom
   rule, sides on the column edges (the first card starts where the rules
   start; between cards, the vertical rule). No bleed: the background stops at
   the inner edge of the borders. Fixed 32px padding on all four sides (28px on
   phones), with and without hover, so nothing moves; the text sits inset from
   the section title by that padding. The padding lives here only: the cards'
   saved markup has none. */
.wp-block-group.is-style-card-link {
	position: relative;
	transition: background-color 0.25s;
	padding: 32px !important;
	background-clip: padding-box;
}

@media (max-width: 599.98px) {
	.wp-block-group.is-style-card-link {
		padding: 28px !important;
	}
}

/* The saved markup gives cards 2 and 3 a left rule (the vertical line between
   columns). It only makes sense beside another card: in one column (grid under
   600px, viewport up to 652px) no card has it, and in two columns (viewport
   652–978px) the third card, first of its row, loses it. */
@media (max-width: 652px) {
	.wp-block-group.is-style-card-link {
		border-left-width: 0 !important;
	}
}

@media (min-width: 652.01px) and (max-width: 978.25px) {
	.wp-block-group.is-style-card-link:nth-child(3) {
		border-left-width: 0 !important;
	}
}

/* Hover: solid background swap, white on a light section and #EAEAEA on a
   white one, filling exactly the cell. */
.wp-block-group.is-style-card-link:hover {
	background-color: var(--wp--preset--color--white);
}

.has-white-background-color .wp-block-group.is-style-card-link:hover {
	background-color: var(--wp--preset--color--surface);
}

.wp-block-group.is-style-card-link a {
	text-decoration: none;
}

.wp-block-group.is-style-card-link a::after {
	content: "";
	position: absolute;
	inset: 0;
}

/* Clickable cards on a burgundy section: white text, frame and rules in solid
   grey; on hover the card turns white with burgundy text and icon.
   Follows the section. */
:is(.has-primary-background-color, .has-contrast-background-color) .wp-block-group:has(> .is-style-card-link) {
	border-top-color: var(--wp--preset--color--border-strong) !important;
}

:is(.has-primary-background-color, .has-contrast-background-color) .wp-block-group.is-style-card-link {
	border-color: var(--wp--preset--color--border-strong) !important;
}

:is(.has-primary-background-color, .has-contrast-background-color) .wp-block-group.is-style-card-link a {
	color: var(--wp--preset--color--white);
}

:is(.has-primary-background-color, .has-contrast-background-color) .wp-block-group.is-style-card-link:hover {
	background-color: var(--wp--preset--color--white);
}

:is(.has-primary-background-color, .has-contrast-background-color) .wp-block-group.is-style-card-link:hover :is(h2, h3, h4, p, a, li, .has-text-color) {
	color: var(--wp--preset--color--primary) !important;
}

:is(.has-primary-background-color, .has-contrast-background-color) .wp-block-group.is-style-card-link:hover .wp-block-image.is-style-icone-linha img {
	filter: none;
}

:is(.has-primary-background-color, .has-contrast-background-color) .wp-block-group.is-style-card-link:focus-within {
	outline: 2px solid var(--wp--preset--color--white);
	outline-offset: 2px;
}

.wp-block-group.is-style-align-start {
	align-items: start;
}

.wp-block-group.is-style-align-end {
	align-items: end;
}

.wp-block-group.is-style-align-center {
	align-items: center;
}

/* "Vidro fosco" (header): solid burgundy, no transparency. */
.wp-block-group.is-style-frosted {
	background-color: var(--wp--preset--color--primary);
}

footer.wp-block-template-part .wp-block-group.is-layout-grid {
	row-gap: 48px;
}

.wp-block-group.is-style-step-row {
	align-items: baseline;
	row-gap: 12px;
}

/* On a burgundy section: the step rules in solid grey. */
:is(.has-primary-background-color, .has-contrast-background-color) .wp-block-group.is-style-step-row {
	border-top-color: var(--wp--preset--color--border-strong) !important;
	border-bottom-color: var(--wp--preset--color--border-strong) !important;
}

.wp-block-group.is-style-step-row > .is-layout-flex {
	align-items: baseline;
}

.wp-block-group.is-style-step-row > .is-layout-flex > :first-child {
	flex-shrink: 0;
}

/* Step number in the rows: same size as every other step number (40px). */
.wp-block-group.is-style-step-row > .is-layout-flex > p.has-heading-font-family:first-child {
	flex-basis: 48px !important;
	width: 48px;
	font-size: 40px !important;
	line-height: 1 !important;
}

/* Layer ladder (Contratos › Sociedade › Governança): narrow steps, about the
   width of the longest word plus breathing room, keeping the stair offset. */
/* Ladder rising from left to right: Contratos at the bottom left, Governança
   at the top right (reading order in the HTML stays Contratos → Governança).
   Every step has the same full 1px frame in the same colour, the same height,
   the same offset from the step below, and centred text; neighbouring steps
   overlap by 1px so the shared edge is a single line. */
.wp-block-group:has(> .is-style-layer) {
	flex-direction: column-reverse !important;
}

.wp-block-group.is-style-layer {
	--layer-step: clamp(20px, 3vw, 40px);
	align-self: flex-start;
	box-sizing: border-box;
	width: 16rem;
	max-width: calc(100% - 2 * var(--layer-step));
	min-height: 80px;
	align-items: center;
	justify-content: center !important;
	text-align: center;
	border-style: solid !important;
	border-width: 1px !important;
	border-color: var(--wp--preset--color--border-strong) !important;
}

/* On a burgundy section: Cinza frame (same 1px on the three steps). */
.has-contrast-background-color .wp-block-group.is-style-layer,
.has-primary-background-color .wp-block-group.is-style-layer {
	border-color: var(--wp--preset--color--border-strong) !important;
}

.wp-block-group.is-style-layer:nth-child(1) {
	margin-left: 0 !important;
}

.wp-block-group.is-style-layer:nth-child(2) {
	margin-left: var(--layer-step) !important;
}

.wp-block-group.is-style-layer:nth-child(3) {
	margin-left: calc(2 * var(--layer-step)) !important;
}

.wp-block-group.is-style-layer + .is-style-layer {
	margin-top: 0 !important;
	margin-bottom: -1px !important;
}

/* Programa section: the ladder sits right after the text instead of being
   pushed to the far edge (only once the two columns sit side by side). */
@media (min-width: 1080px) {
	.wp-block-group.is-style-align-center:has(> * > .is-style-layer) {
		/* Ladder column: step width plus the two offsets (--layer-step at 1080px+ is 32–40px). */
		grid-template-columns: minmax(0, 620px) calc(16rem + 2 * clamp(20px, 3vw, 40px));
		justify-content: start;
		column-gap: clamp(64px, 9vw, 140px);
	}
}

/* Steps that appear one after another when the row scrolls into view (the
   delays only apply where the steps share a row; stacked, each one reveals on
   its own). With reduced motion, reveal.js does not animate at all. */
@media (min-width: 600px) {
	.wp-block-group.is-style-etapas-em-sequencia > .reveal:nth-child(2n) {
		--reveal-delay: 300ms !important;
	}

	.wp-block-group.is-style-etapas-em-sequencia > .reveal:nth-child(2n+1) {
		--reveal-delay: 0ms !important;
	}
}

@media (min-width: 1100px) {
	.wp-block-group.is-style-etapas-em-sequencia > .reveal:nth-child(2) { --reveal-delay: 300ms !important; }
	.wp-block-group.is-style-etapas-em-sequencia > .reveal:nth-child(3) { --reveal-delay: 600ms !important; }
	.wp-block-group.is-style-etapas-em-sequencia > .reveal:nth-child(4) { --reveal-delay: 900ms !important; }
	.wp-block-group.is-style-etapas-em-sequencia > .reveal:nth-child(5) { --reveal-delay: 1200ms !important; }
}

@media (max-width: 599.98px) {
	.wp-block-group.is-style-etapas-em-sequencia > .reveal {
		--reveal-delay: 0ms !important;
	}
}

/* Símbolo como marca de fundo (site rule, 2026-11-04): at most one symbol per
   page (the A Valerim cover counts), only on light single-column sections
   (white or #EAEAEA; the only burgundy exception is the A Valerim cover, the
   signature), large and cut by a side edge, never behind the text with at
   least 120px of clearance to any text, decorative (generated content,
   outside the accessibility tree), absent under 1200px. Solid colour, no
   transparency: white on #EAEAEA, #EAEAEA on white. Same method as the
   A Valerim cover: the official symbol as a mask painted with the palette
   colour, 86% of the section height and centred vertically; the visible part
   is the space beside the central column (720px) minus 120px, the rest is
   cut by the edge (--esquerda / --direita choose the side). */
@media (min-width: 1200px) {
	.wp-block-group.valerim-simbolo-fundo {
		--valerim-simbolo-coluna: 720px;
		position: relative;
		isolation: isolate;
		overflow: hidden;
	}

	.wp-block-group.valerim-simbolo-fundo::after {
		content: "";
		position: absolute;
		z-index: -1;
		top: 50%;
		height: 86%;
		aspect-ratio: 743.19 / 681.29;
		transform: translateY(-50%);
		background-color: var(--wp--preset--color--surface);
		-webkit-mask: url("../../images/simbolo-cinza.svg") no-repeat center / contain;
		mask: url("../../images/simbolo-cinza.svg") no-repeat center / contain;
		pointer-events: none;
	}

	.wp-block-group.valerim-simbolo-fundo--direita::after {
		left: calc(100% - ((100% - var(--valerim-simbolo-coluna)) / 2 - 120px));
	}

	.wp-block-group.valerim-simbolo-fundo--esquerda::after {
		right: calc(100% - ((100% - var(--valerim-simbolo-coluna)) / 2 - 120px));
	}

	.wp-block-group.valerim-simbolo-fundo.has-surface-background-color::after {
		background-color: var(--wp--preset--color--white);
	}

	.wp-block-group.valerim-simbolo-fundo.has-white-background-color::after {
		background-color: var(--wp--preset--color--surface);
	}
}

/* Linhas editoriais (Assessoria "O que muda"): every item takes the content
   width, title on the left (2/5) and description on the right (3/5), aligned
   at the top; 1px rule above each item and below the last (#EAEAEA on
   burgundy, grey on a light section); no boxes, no side borders, no reserved
   height. Under 782px the title sits above the description. */
.wp-block-group.is-style-linhas-editoriais > .wp-block-group {
	padding: 28px 0;
	border-top: 1px solid var(--wp--preset--color--surface);
	align-items: start;
	/* The grid layout sets container-type: inline-size for its own column
	   query; here the columns come from the media queries below, and in Chrome
	   that containment inflated each row to several times its content. */
	container-type: normal;
}

.wp-block-group.is-style-linhas-editoriais > .wp-block-group:last-child {
	border-bottom: 1px solid var(--wp--preset--color--surface);
}

:is(.has-white-background-color, .has-surface-background-color) .wp-block-group.is-style-linhas-editoriais > .wp-block-group {
	border-color: var(--wp--preset--color--border-strong);
}

@media (min-width: 782px) {
	.wp-block-group.is-style-linhas-editoriais > .wp-block-group.is-layout-grid {
		grid-template-columns: 2fr 3fr;
	}
}

@media (max-width: 781.98px) {
	.wp-block-group.is-style-linhas-editoriais > .wp-block-group.is-layout-grid {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* Channels card (Contato): a solid grey frame when it sits on a white section. */
.has-white-background-color .wp-block-group.valerim-canais-card {
	border: 1px solid var(--wp--preset--color--border-strong);
}

/* Sections in a grid at content width (not full width) that have a
   background: the section's own background colour reaches both edges of the
   screen, like the full-width sections, without changing their layout. A
   layer behind the section inherits its background (the section stays the
   only source of the colour, whatever palette colour is chosen in the
   editor) and is cut at the edges of the page content, so there is no
   horizontal scroll. */
.wp-block-post-content {
	overflow-x: clip;
}

.wp-block-post-content > .wp-block-group.has-background:not(.alignfull) {
	position: relative;
	isolation: isolate;
}

.wp-block-post-content > .wp-block-group.has-background:not(.alignfull)::before {
	content: "";
	position: absolute;
	z-index: -1;
	top: 0;
	bottom: 0;
	left: -100vmax;
	right: -100vmax;
	background-color: inherit;
	pointer-events: none;
}
