/* Parceiros — atv-core atv_render_partner_rows(): homepage band (.atv-partners--band, inside an atv/section) and the
   inner-page band at the top of the footer. One slowly moving logo strip + the institutional partner as a small line.
   Tokens only. Every logo sits in the same fixed white tile (no layout shift; JPG logos' white backgrounds disappear). */

.atv-partners {
	--atv-strip-gap: var(--spacing-s);
	--atv-strip-tile-w: 9.5rem;
	--atv-strip-tile-h: 4.5rem;
}

@media (min-width: 768px) {
	.atv-partners {
		--atv-strip-gap: var(--spacing-m);
		--atv-strip-tile-w: 10rem;
	}
}

/* Inner pages: its own full-width white band at the top of the footer, opened by a hairline so it reads as a band after
   any page ending (white or tinted); the navy footer body starts under it. */
.atv-footer__partners {
	background-color: var(--color-white);
	border-block-start: 1px solid var(--color-black-10);
	padding-block: var(--spacing-layout-m);
}

/* No max-width override: the strip is a plain .hds-container like .atv-footer__top / __main, so its title and logos line up
   with the footer columns at every width (a fixed 75rem cap drifted ~4px between 1200 and 1248px). */

.atv-partners__title {
	margin: 0 0 var(--spacing-m);
	font-family: var(--font-heading);
	font-weight: 800;
	font-size: var(--fontsize-heading-s);
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.atv-partners__row,
.atv-partners__institutional-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.atv-partners__item {
	margin: 0;
}

/* The strip. Static by default (wrapped row): the marquee only runs with prefers-reduced-motion: no-preference. */
.atv-logo-strip {
	display: block;
}

.atv-logo-strip__track {
	display: flex;
	flex-wrap: wrap;
	gap: var(--atv-strip-gap);
	align-items: center;
}

/* Static row on phones: centred, so an odd last tile doesn't hang on the left with an empty right column. */
@media (max-width: 575px) {
	.atv-logo-strip__track {
		justify-content: center;
	}
}

.atv-logo-strip__track[aria-hidden="true"] {
	display: none;
}

/* Fixed tile: logos normalised to at most 140 × 40 px, centred. */
.atv-logo-strip .atv-partners__logo,
.atv-logo-strip .atv-partners__placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	width: var(--atv-strip-tile-w);
	height: var(--atv-strip-tile-h);
	padding: var(--spacing-xs) var(--spacing-s);
	box-sizing: border-box;
	background: var(--color-white);
	border: 1px solid var(--color-black-10);
	border-radius: var(--atv-radius-m);
}

.atv-partners__logo img {
	display: block;
	width: auto;
	height: auto;
	max-width: 8.75rem;
	max-height: 2.5rem;
	object-fit: contain;
}

.atv-logo-strip .atv-partners__logo img {
	filter: grayscale(1);
	opacity: 0.75;
	transition:
		filter var(--atv-motion-base) var(--atv-motion-ease),
		opacity var(--atv-motion-base) var(--atv-motion-ease);
}

.atv-logo-strip .atv-partners__item:hover img,
.atv-logo-strip .atv-partners__link:focus-visible img {
	filter: none;
	opacity: 1;
}

.atv-partners__placeholder {
	color: var(--atv-navy);
	font-family: var(--font-heading);
	font-weight: 700;
	font-size: var(--fontsize-body-s);
	line-height: 1.2;
	text-align: center;
}

.atv-partners__link {
	display: block;
	border-radius: var(--atv-radius-m);
	text-decoration: none;
}

.atv-partners__link:focus-visible {
	outline: var(--atv-focus-width) solid var(--atv-focus-light);
	outline-offset: var(--atv-focus-offset);
}

@media (prefers-reduced-motion: no-preference) {
	.atv-logo-strip--moving {
		display: flex;
		gap: var(--atv-strip-gap);
		overflow: hidden;
		/* Soft edges: the logos fade in and out instead of being cut. */
		mask-image: linear-gradient(90deg, transparent, var(--color-black) var(--spacing-layout-s), var(--color-black) calc(100% - var(--spacing-layout-s)), transparent);
		/* Room for the focus ring inside the clipped strip. */
		padding-block: var(--spacing-2-xs);
	}

	.atv-logo-strip--moving .atv-logo-strip__track {
		flex: 0 0 auto;
		flex-wrap: nowrap;
		justify-content: space-around;
		min-width: 100%;
		animation: atv-logo-strip var(--atv-strip-duration, 36s) linear infinite;
	}

	.atv-logo-strip--moving .atv-logo-strip__track[aria-hidden="true"] {
		display: flex;
	}

	.atv-logo-strip--moving:hover .atv-logo-strip__track,
	.atv-logo-strip--moving:focus-within .atv-logo-strip__track {
		animation-play-state: paused;
	}
}

/* Each track slides by its own width plus one gap, so the copy lands exactly where the first track began. */
@keyframes atv-logo-strip {
	to {
		transform: translateX(calc(-100% - var(--atv-strip-gap)));
	}
}

/* Parceiro institucional: one quiet line under the strip. */
.atv-partners__institutional {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--spacing-xs) var(--spacing-s);
	margin-block-start: var(--spacing-m);
}

.atv-partners__institutional-label {
	margin: 0;
	font-size: var(--fontsize-body-s);
	font-weight: 700;
	color: var(--color-black-60);
}

.atv-partners__institutional-list {
	display: flex;
	flex-wrap: wrap;
	gap: var(--spacing-s);
}

.atv-partners__institutional .atv-partners__logo img {
	max-height: 2rem;
	max-width: 8rem;
}

/* 44px hit area for the institutional partner link (the logo is only 2rem tall). */
.atv-partners__institutional .atv-partners__link {
	display: flex;
	align-items: center;
	min-height: 44px;
}

.atv-partners__institutional .atv-partners__placeholder {
	display: inline-block;
}

@media (prefers-reduced-motion: reduce) {
	.atv-logo-strip .atv-partners__logo img {
		transition: none;
	}
}

@media (forced-colors: active) {
	.atv-logo-strip .atv-partners__logo img {
		filter: none;
		opacity: 1;
	}

	.atv-partners__link:focus-visible {
		outline-color: Highlight;
	}
}
