/* Awards strip (Figma 1:685, footer 1:712): one line of awards, spread edge to edge, a dot
   centred in every gap. The awards are a synced pattern ("Nagrade"), one paragraph each; the
   band around it sets the colour where it is placed. When the awards don't fit on one line
   the line scrolls sideways in a loop: mano-core/assets/js/mano-ticker.js measures the fit,
   sets .is-ticker and adds the second copy the loop needs. */

.mano-awards-band.mano-awards-band {
	margin-block: 0;
}

.mano-awards-band {
	padding: 10px var(--wp--preset--spacing--gutter);
	overflow: hidden;
	background: var(--wp--preset--color--dark-kaptol);
	color: var(--wp--preset--color--topla-bijela);
}

.mano-awards.mano-awards {
	gap: 1em; /* minimum; space-between spreads the rest (the five awards fill 1248px at 1440) */
	font-family: var(--wp--preset--font-family--sans);
	font-size: var(--wp--preset--font-size--eyebrow);
	font-weight: 600;
	letter-spacing: 0.18em;
	line-height: 1.2;
	text-transform: uppercase;
	white-space: nowrap;
}

/* Each paragraph's box is dropped, so its text and the dot before it are separate flex items:
   space-between then puts every dot exactly halfway between two awards. */
.mano-awards > p {
	display: contents;
}

.mano-awards > p + p::before {
	content: "·";
}

.mano-awards > .is-copy {
	display: none;
}

.mano-awards.is-ticker {
	justify-content: flex-start;
	width: max-content;
	animation: mano-ticker 40s linear infinite;
}

.mano-awards.is-ticker > .is-copy {
	display: contents;
}

/* The first copy follows the last original: it needs its dot too. */
.mano-awards.is-ticker > .is-copy:first-of-type::before,
.mano-awards.is-ticker > p.is-copy::before {
	content: "·";
}

@keyframes mano-ticker {
	to {
		transform: translateX(calc(-50% - 0.5em));
	}
}

@media (prefers-reduced-motion: reduce) {
	.mano-awards.is-ticker {
		animation: none;
	}
}

/* Phones (Figma 353:280): a 33px band, Inter 8px semibold, 0.18em tracking, three spaces each side
   of the dot. */
@media (max-width: 781px) {
	.mano-awards-band {
		padding-block: 12px;
		-webkit-font-smoothing: antialiased; /* light on dark, as Figma renders it */
		-moz-osx-font-smoothing: grayscale;
	}

	.mano-awards.mano-awards {
		gap: 1.3em; /* three spaces */
		font-size: 8px;
		line-height: 9px;
	}
}

/* The loop moves by half the row plus half a gap: 0.65em with the wider gap. */
@media (max-width: 781px) and (prefers-reduced-motion: no-preference) {
	.mano-awards.is-ticker {
		animation-name: mano-ticker-phone;
	}

	@keyframes mano-ticker-phone {
		to {
			transform: translateX(calc(-50% - 0.65em));
		}
	}
}
