.video-library {
	padding: 24px 0 96px;
}
.video-library .section-head {
	margin-bottom: 44px;
}
.video-library .section-head h2 {
	font-size: 32px;
	margin-bottom: 10px;
}
.video-library .section-head p {
	color: #5B5F66;
	max-width: 560px;
	font-size: 15px;
}

.video-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 28px;
}

/* Card: thumbnail on top, separate white body below — text never sits
   on top of the image, so there's no contrast/readability fight with
   whatever colors happen to be in a given thumbnail. */
.video-card {
	background: var(--paper);
	border: 1px solid var(--line);
	cursor: pointer;
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.video-card:hover {
	box-shadow: 0 12px 28px rgba(1, 37, 106, 0.12);
	transform: translateY(-2px);
}
.video-card:focus-visible {
	outline: 2px solid var(--teal);
	outline-offset: 2px;
}

.video-thumb {
	position: relative;
	aspect-ratio: 16/9;
	overflow: hidden;
	background: var(--ink);
}
.video-thumb img,
.video-thumb video {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s ease;
	display: block;
	pointer-events: none; /* clicks pass through to the card, not the video element itself */
}
.video-card:hover .video-thumb img,
.video-card:hover .video-thumb video {
	transform: scale(1.04);
}
.video-play-icon {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 56px;
	height: 56px;
	background: rgba(1, 37, 106, 0.75);
	border: 2px solid var(--cream);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.2s ease, transform 0.2s ease;
}
.video-card:hover .video-play-icon {
	background: var(--gold);
	transform: translate(-50%, -50%) scale(1.08);
}
.video-play-icon svg {
	width: 22px;
	height: 22px;
	fill: var(--cream);
	margin-left: 3px; /* optical centering for the play triangle */
}

.video-card-body {
	padding: 20px 22px 18px;
}
.video-title {
	font-size: 17px;
	color: var(--ink);
	margin-bottom: 10px;
	line-height: 1.3;
}
.video-description {
	font-size: 14px;
	color: #5B5F66;
	line-height: 1.6;
	margin-bottom: 18px;
}

.video-card-footer {
	display: flex;
	align-items: center;
	padding-top: 14px;
	border-top: 1px solid var(--line);
}
.video-context {
	font-family: 'IBM Plex Mono', monospace;
	font-size: 11.5px;
	color: var(--teal);
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

@media (max-width: 860px) {
	.video-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}
@media (max-width: 560px) {
	.video-grid {
		grid-template-columns: 1fr;
	}
}

.video-library-cta {
	text-align: center;
	margin-top: 40px;
}

/* Lightbox */
.video-lightbox {
	position: fixed;
	inset: 0;
	background: rgba(1, 37, 106, 0.95);
	display: none;
	align-items: center;
	justify-content: center;
	z-index: 9999;
	padding: 24px;
}
.video-lightbox.is-open {
	display: flex;
}
.video-lightbox-frame {
	width: min(1000px, 100%);
	aspect-ratio: 16/9;
	background: #000;
}
#video-lightbox-player {
	width: 100%;
	height: 100%;
}
#video-lightbox-player iframe,
#video-lightbox-player video {
	width: 100%;
	height: 100%;
	border: none;
	display: block;
	object-fit: contain; /* fits the whole video inside the frame instead of
	                         cropping/zooming to fill it, regardless of the
	                         clip's actual resolution or aspect ratio */
	background: #000;
}
.video-lightbox-close {
	position: absolute;
	top: 24px;
	right: 32px;
	background: transparent;
	border: none;
	color: var(--cream);
	font-size: 36px;
	line-height: 1;
	cursor: pointer;
	padding: 8px;
}
.video-lightbox-close:hover {
	color: var(--gold);
}