/*
 * Dicas do Chef of the Escola do Queijo page (school-chef-tips). The Figma has no video
 * block: the section takes the heading and the carousel of the Produtos section, and the
 * card is the 289px product column in 9:16, since the videos are vertical. Provisional,
 * docs/BACKLOG.md 125.
 */

.school-tips__header {
	margin-block-end: var(--space-gap-section);
}

.school-tips .section-heading__description {
	max-width: 644px;
}

.school-tips__track {
	padding-block-end: var(--space-1);
}

.school-tips__item {
	width: 289px;
}

.tip-card {
	display: flex;
	flex-direction: column;
	gap: var(--space-3);
	margin: 0;
}

.tip-card__media {
	position: relative;
	aspect-ratio: 9 / 16;
	border-radius: var(--radius-media);
	background-color: var(--color-surface-muted);
	overflow: hidden;
}

.tip-card__video {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	background-color: var(--color-surface-muted);
}

/* Covers the poster until the video plays; the native controls take over after that. */
.tip-card__play {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	border: 0;
	background: transparent;
	cursor: pointer;
}

.tip-card__play[hidden],
.tip-card.is-playing .tip-card__play {
	display: none;
}

.tip-card__play-icon {
	width: 72px;
	height: 72px;
	border-radius: 50%;
	background-color: var(--color-surface-brand);
	color: var(--color-text-on-brand);
	transition: transform var(--duration-base) var(--ease-out);
}

.tip-card__play:hover .tip-card__play-icon,
.tip-card__play:focus-visible .tip-card__play-icon {
	transform: scale(1.1);
}

.tip-card__play:focus-visible {
	outline-offset: -4px;
}

.tip-card__title {
	color: var(--color-title-card);
	font-family: var(--font-heading);
	font-size: var(--font-h5);
	font-weight: var(--weight-heading);
	line-height: var(--lh-heading);
	letter-spacing: var(--ls-heading);
	text-align: center;
	overflow-wrap: anywhere;
}

@media (max-width: 767px) {
	.school-tips__header {
		margin-block-end: var(--space-6);
	}

	.school-tips__item {
		width: min(78vw, 289px);
	}
}

@media (prefers-reduced-motion: reduce) {
	.tip-card__play-icon {
		transition: none;
	}

	.tip-card__play:hover .tip-card__play-icon,
	.tip-card__play:focus-visible .tip-card__play-icon {
		transform: none;
	}
}
