/* Lecture List — measured off Figma `05. Educação`, node 921:17445 ("Aulas Abertas").
 * The modal further down is unchanged; only the trigger's presentation moves. */
:root {
	--move-lecture-bg: var(--move-color-surface, #ffffff);
	--move-lecture-text: var(--move-color-text, #475c76);
	--move-lecture-text-muted: var(--move-color-text-muted, #627995);
	--move-lecture-title: var(--move-color-text-title, #061b33);
	--move-lecture-thumb-bg: var(--move-color-placeholder-photo, #f8fafd);

	--move-lecture-font-heading: var(--move-font-size-4xl, 2.5rem); /* 40px */
	--move-lecture-font-intro: var(--move-font-size-md, 1.125rem);  /* 18px */
	--move-lecture-font-title: var(--move-font-size-lg, 1.25rem);   /* 20px */
	--move-lecture-font-submeta: var(--move-font-size-sm, 0.875rem);/* 14px */

	--move-lecture-play-size: 3.5rem; /* 56px, measured */
}

.move-lecture-list-section {
	container-type: inline-size;
	container-name: move-lecture-list-section;
	width: 100%;
	background: var(--move-lecture-bg);
	color: var(--move-lecture-text);
	font-family: var(--move-font-base);
	font-size: 1rem;
	font-weight: 400;
	--move-strong-weight: var(--move-font-weight-bold, 700);
	/* Clears the sticky sub-nav bar when a tab link jumps here; main.js keeps this in sync with its measured height. */
	scroll-margin-top: var(--move-subnav-sticky-height, 2.5rem);
}

.move-lecture-list-section__container {
	max-width: var(--move-container-max, 1312px);
	margin-inline: auto;
	padding: 5rem var(--move-container-gutter, 2rem);
}

/* 40px Regular, -1.6px (-0.04em) at 1.2, then a 20px gap to the intro and
   48px out to the grid. */
.move-lecture-list-section__heading {
	margin: 0 0 var(--move-space-20, 1.25rem);
	font-size: var(--move-lecture-font-heading);
	font-weight: var(--move-font-weight-regular, 400);
	letter-spacing: var(--move-letter-spacing-tightest, -0.04em);
	line-height: var(--move-line-tight, 1.2);
	color: var(--move-lecture-title);
	--move-em-weight: var(--move-font-weight-medium, 500);
}
.move-lecture-list-section__intro {
	margin: 0 0 var(--move-space-lg, 3rem);
	max-width: 62rem;
	font-size: var(--move-lecture-font-intro);
	font-weight: var(--move-font-weight-light, 300);
	line-height: var(--move-line-relaxed, 1.5);
	color: var(--move-lecture-text);
}
/* Keyed on the intro actually following, not :last-of-type (the heading is the
   only h2 either way, so that always matched and double-added the gap). */
.move-lecture-list-section__heading:not(:has(+ .move-lecture-list-section__intro)) {
	margin-bottom: var(--move-space-lg, 3rem);
}

.move-lecture-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--move-space-20, 1.25rem);
}

/* The card: a 12px-padded white box at the design's larger 20px radius, with
   the thumbnail's own 12px radius nested inside it. */
.move-lecture {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
	padding: var(--move-space-12, 0.75rem);
	background: var(--move-color-surface, #ffffff);
	border-radius: var(--move-radius-md, 1.25rem);
	overflow: hidden;
	min-width: 0;
}

.move-lecture__thumb {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	border-radius: var(--move-radius, 0.75rem);
	overflow: hidden;
	background: var(--move-lecture-thumb-bg);
}
.move-lecture__thumb img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Whole thumbnail is the click target — Figma draws only the 56px disc, but SC
   2.5.8 is a floor not a ceiling. Disc is the ::before, painted at centre. */
.move-lecture__play {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	min-width: var(--move-target-min, 24px);
	min-height: var(--move-target-min, 24px);
	display: flex;
	align-items: center;
	justify-content: center;
	background: transparent;
	border: none;
	cursor: pointer;
}
.move-lecture__play::before {
	content: "";
	position: absolute;
	width: var(--move-lecture-play-size);
	height: var(--move-lecture-play-size);
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.9);
}
.move-lecture__play-icon {
	position: relative;
	width: 0;
	height: 0;
	margin-left: 0.25rem;
	border-style: solid;
	border-width: 9px 0 9px 15px;
	border-color: transparent transparent transparent var(--move-color-dark, #0f2a4a);
}
.move-lecture__play:hover::before {
	background: #ffffff;
}
.move-lecture__play:focus-visible {
	outline: 2px solid var(--move-color-focus, #315179);
	outline-offset: 2px;
}

.move-lecture__meta {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
	padding-block: var(--move-space-20, 1.25rem);
	min-width: 0;
}
.move-lecture__title {
	margin: 0;
	font-size: var(--move-lecture-font-title);
	font-weight: var(--move-font-weight-regular, 400);
	letter-spacing: -0.04em; /* -0.8px at 20px */
	line-height: var(--move-line-relaxed, 1.5);
	color: var(--move-lecture-title);
}
.move-lecture__submeta {
	margin: 0;
	color: var(--move-lecture-text-muted);
	font-size: var(--move-lecture-font-submeta);
	font-weight: var(--move-font-weight-light, 300);
	line-height: var(--move-line-normal, 1.4);
	letter-spacing: var(--move-letter-spacing-tight, -0.01em);
}

@container move-lecture-list-section (min-width: 768px) {
	.move-lecture-list {
		grid-template-columns: repeat(3, 1fr);
	}
}

/* Video modal — appended to <body> by main.js, not nested in the section, so it needs its own root-level tokens. */
:root {
	--move-lecture-modal-overlay: rgba(28, 27, 25, 0.8);
	--move-lecture-modal-bg: #000;
	--move-lecture-modal-close-bg: rgba(0, 0, 0, 0.6);
	--move-lecture-modal-close-text: #ffffff;
}

body.move-lecture-modal-open {
	overflow: hidden;
}

.move-lecture-modal {
	position: fixed;
	inset: 0;
	z-index: 1000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: var(--move-space-md, 1.5rem);
	background: var(--move-lecture-modal-overlay);
}
.move-lecture-modal[hidden] {
	display: none;
}

.move-lecture-modal__dialog {
	position: relative;
	width: 100%;
	max-width: 64rem;
	background: var(--move-lecture-modal-bg);
}

/* The 16:9 lives on the frame wrapper, not the dialog: the dialog also holds
   the optional description below the video, so a fixed ratio on it would
   either crop that copy or squash the player. */
.move-lecture-modal__frame-wrap {
	width: 100%;
	aspect-ratio: 16 / 9;
}

.move-lecture-modal__body {
	padding: var(--move-space-md, 1.5rem);
	color: var(--move-color-text-inverse, #e3e7ec);
	font-size: var(--move-font-size-base, 1rem);
	line-height: 1.4;
	letter-spacing: var(--move-letter-spacing-tight, -0.01em);
}
.move-lecture-modal__body > *:first-child {
	margin-top: 0;
}
.move-lecture-modal__body > *:last-child {
	margin-bottom: 0;
}
.move-lecture__description p:first-child {
	margin-top: 0;
}
.move-lecture__description p:last-child {
	margin-bottom: 0;
}
.move-lecture-modal__frame {
	width: 100%;
	height: 100%;
	border: none;
	display: block;
}

.move-lecture-modal__close {
	position: absolute;
	top: -2.75rem;
	right: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.25rem;
	height: 2.25rem;
	min-width: var(--move-target-min, 24px);
	min-height: var(--move-target-min, 24px);
	background: var(--move-lecture-modal-close-bg);
	color: var(--move-lecture-modal-close-text);
	border: none;
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
}
.move-lecture-modal__close:hover {
	filter: brightness(1.2);
}
.move-lecture-modal__close:focus-visible {
	outline: 2px solid var(--move-lecture-modal-close-text);
	outline-offset: 2px;
}

/* Opt-in via no-preference, not opt-out via reduce (the pattern hero/cta-banner
   use) — deliberately: this dialog has no base "settled" visual state the way
   a played-once decoration does, so gating the entrance itself is simpler here
   than writing a redundant `animation: none` override. */
@media (prefers-reduced-motion: no-preference) {
	.move-lecture-modal__dialog {
		animation: move-lecture-modal-in 0.2s ease-out;
	}
}
@keyframes move-lecture-modal-in {
	from {
		opacity: 0;
		transform: scale(0.97);
	}
	to {
		opacity: 1;
		transform: scale(1);
	}
}
