/* NC YouTube Playlist Carousel. */
.nc-ytc {
	--nc-ytc-navy: #00164d;
	--nc-ytc-green: #c1de83;
	--nc-ytc-green-hover: #daecb4;
	--nc-ytc-focus: #97dbf8;
	--nc-ytc-radius: 16px;
	--nc-ytc-gap: 20px;
	margin: 2rem 0;
}

.nc-ytc__heading {
	margin: 0 0 1.25rem;
	color: var(--nc-ytc-navy);
	font-weight: 800;
}

/* Carousel (Swiper). Before Swiper starts, and in the editor preview, the row scrolls sideways instead of collapsing. */
.nc-ytc .nc-ytc__carousel {
	overflow: hidden;
	padding: 0 10px; 
}

.nc-ytc.is-editor-preview .nc-ytc__carousel {
	overflow-x: auto;
}

.nc-ytc .nc-ytc__wrapper {
	display: flex;
}

.nc-ytc .nc-ytc__slide {
	flex: 0 0 auto;
	width: 30%;
	margin-right: var(--nc-ytc-gap);
	padding: 6px 0 18px; 
	box-sizing: border-box;
}

.nc-ytc[data-columns="1"] .nc-ytc__slide { width: 62%; }
.nc-ytc[data-columns="2"] .nc-ytc__slide { width: 42%; }

.nc-ytc__trigger {
	display: block;
	width: 100%;
	padding: 0;
	border: 0;
	background: none;
	text-align: left;
	color: inherit;
	font: inherit;
	cursor: pointer;
}

.nc-ytc__thumb {
	position: relative;
	display: block;
	aspect-ratio: 16 / 9;
	background-color: var(--nc-ytc-navy);
	background-size: cover;
	background-position: center;
	border-radius: var(--nc-ytc-radius);
	box-shadow: 0 6px 16px rgba(11, 31, 92, 0.18);
	overflow: hidden;
}

/* White play button with no background. */
.nc-ytc__play {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 92px;
	height: 92px;
	margin: -46px 0 0 -46px;
	border-radius: 50%;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath fill='%23fff' fill-rule='evenodd' d='M50 0A50 50 0 1 0 50 100A50 50 0 1 0 50 0ZM42.33 30.51L71.67 47.5Q76 50 71.67 52.51L42.33 69.5Q38 72 38 67L38 33Q38 28 42.33 30.51Z'/%3E%3C/svg%3E") center / contain no-repeat;
	transition: transform 0.2s ease;
}

.nc-ytc__trigger:hover .nc-ytc__play,
.nc-ytc__trigger:focus-visible .nc-ytc__play {
	transform: scale(1.08);
}

.nc-ytc__trigger:focus-visible {
	outline: 3px solid var(--nc-ytc-focus);
	outline-offset: 3px;
	border-radius: var(--nc-ytc-radius);
}

/* Prev/next: round green buttons under the carousel, bottom left. */
.nc-ytc__nav {
	display: flex;
	gap: 8px;
	margin: 0 0 0 10px;
}

.nc-ytc__prev,
.nc-ytc__next {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--nc-ytc-green);
	cursor: pointer;
}

.nc-ytc__prev:hover,
.nc-ytc__next:hover {
	opacity: 0.85;
}

.nc-ytc__prev:focus-visible,
.nc-ytc__next:focus-visible {
	outline: 3px solid var(--nc-ytc-focus);
	outline-offset: 2px;
}

.nc-ytc__nav svg {
	width: 18px;
	height: 18px;
	fill: none;
	stroke: var(--nc-ytc-navy);
	stroke-width: 3;
	stroke-linecap: round;
	stroke-linejoin: round;
}

@media (max-width: 640px) {
	.nc-ytc__play { 
		width: 68px; 
		height: 68px; 
		margin: -34px 0 0 -34px; 
	}

	.nc-ytc__close {
		right: 2rem;
	}
}

@media (max-height: 500px) {
	.nc-ytc__modal {
		padding: 0.5rem max(3.5rem, env(safe-area-inset-right)) 0.5rem max(3.5rem, env(safe-area-inset-left));
	}

	.nc-ytc__modal .nc-ytc__player {
		width: min(1053px, 100%);
		width: min(1053px, 100%, calc((100vh - 1rem) * 16 / 9));
		width: min(1053px, 100%, calc((100dvh - 1rem) * 16 / 9));
	}

	.nc-ytc__modal .nc-ytc__close {
		position: fixed;
		top: 0.5rem;
		right: max(0.5rem, env(safe-area-inset-right));
		font-size: 2.25rem;
	}
}

/* Lightbox with the full video. */
.nc-ytc__modal {
	position: fixed;
	inset: 0;
	z-index: 999999; /* above sticky theme headers */
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	padding: 3.5rem 1rem; 
	overflow: hidden;
	background: rgba(0, 0, 0, 0.75);
}

.nc-ytc__modal[hidden] {
	display: none;
}

.nc-ytc__player {
	width: min(1053px, 100%);
	aspect-ratio: 16 / 9;
}

.nc-ytc__player iframe {
	width: 100%;
	height: 100%;
	border: 0;
}

.nc-ytc__close {
	position: absolute;
	top: 3.75rem;
	right: 3rem;
	padding: 0 0.5rem;
	border: 0;
	border-radius: 0;
	background: none;
	box-shadow: none;
	color: #fff;
	font-size: 2.75rem;
	line-height: 1;
	cursor: pointer;
}

.nc-ytc__modal .nc-ytc__close:hover,
.nc-ytc__modal .nc-ytc__close:focus-visible {
	border: 0;
	outline: 0;
	box-shadow: none;
	background-color: #fff;
	color: #000;
}