/* Custom Video Library v2.8 */

/* ------------------------------------------------
   Archive and page layout
------------------------------------------------ */

.cvl-archive-inner {
	max-width: 1210px;
}

@media (max-width: 1024px) {
	.cvl-archive-inner,
	.cvl-single-video {
		padding-right: 30px;
		padding-left: 30px;
		box-sizing: border-box;
	}
}

/* ------------------------------------------------
   Search and filter form
------------------------------------------------ */

#cvl-filter-form {
	display: grid;
	grid-template-columns:
		minmax(0, 1fr)
		minmax(0, 1fr)
		auto;
	grid-template-rows: auto 50px;
	column-gap: 20px;
	row-gap: 8px;
	align-items: end;
	margin-bottom: 30px;
}


/* Search label */

#cvl-filter-form > label[for="cvl-search-input"] {
	grid-column: 1;
	grid-row: 1;
	margin: 0;
}

/* Search input */

#cvl-filter-form > #cvl-search-input {
	grid-column: 1;
	grid-row: 2;
	min-width: 0;
}

/* Service-line filter */

#cvl-filter-form > .cvl-filter-group {
	grid-column: 2;
	grid-row: 1 / span 2;
	display: flex;
	flex-direction: column;
	gap: 8px;
	min-width: 0;
	max-width: none;
	margin: 0;
}

/* Search button */

#cvl-filter-form > button[type="submit"] {
	grid-column: 3;
	grid-row: 2;
	width: auto;
	height: 50px;
	min-height: 50px;
	padding: 10px 26px;
	font-size: 16px;
	font-weight: 400;
	line-height: 1.4;
	white-space: nowrap;
	color: #fff;
	background-color: #0a72a1;
	border: 1px solid #0a72a1;
	border-radius: 0 25px 25px 0;
	box-shadow: none;
	cursor: pointer;
}

/* Labels */

#cvl-filter-form label {
	display: block;
	margin: 0;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.3;
	color: #333;
}

/* Input and select */

#cvl-filter-form input[type="search"],
#cvl-filter-form select {
	width: 100%;
	height: 50px;
	min-width: 0;
	min-height: 50px;
	padding: 10px 14px;
	font-family: inherit;
	font-size: 17px;
	font-weight: 400;
	line-height: 1.4;
	color: #333;
	background-color: #fff;
	border: 1px solid #000;
	box-shadow: none;
	box-sizing: border-box;
}

/* Rounded outside edges */

#cvl-filter-form input[type="search"] {
	border-radius: 25px 0 0 25px;
}

/* Select field */

#cvl-filter-form select {
	appearance: none;
	-webkit-appearance: none;
	-moz-appearance: none;
	margin-left: -1px;
	padding-right: 48px;
	border-radius: 0;
	background-image: url("https://www.tfhd.com/wp-content/uploads/2024/10/down-arrow.png");
	background-repeat: no-repeat;
	background-position: right 18px center;
	background-size: 16px auto;
}

/* Prevent doubled border beside button */

#cvl-filter-form > button[type="submit"] {
	margin-left: -1px;
}

/* Focus styles */

#cvl-filter-form input[type="search"]:focus,
#cvl-filter-form select:focus {
	position: relative;
	z-index: 2;
	border-color: #0a72a1;
	outline: 3px solid rgba(10, 114, 161, 0.25);
	outline-offset: 1px;
}

#cvl-filter-form button[type="submit"]:hover {
	color: #fff;
	background-color: #2e91bc;
	border-color: #2e91bc;
}

#cvl-filter-form button[type="submit"]:focus-visible {
	position: relative;
	z-index: 2;
	color: #fff;
	background-color: #2e91bc;
	border-color: #2e91bc;
	outline: 3px solid rgba(10, 114, 161, 0.35);
	outline-offset: 2px;
}

/* Mobile form layout */

@media (max-width: 768px) {
	#cvl-filter-form {
		display: grid;
		grid-template-columns: minmax(0, 1fr);
		grid-template-rows: auto;
		column-gap: 0;
		row-gap: 0;
	}

	#cvl-filter-form > label[for="cvl-search-input"] {
		grid-column: 1;
		grid-row: auto;
		margin-bottom: 8px;
	}

	#cvl-filter-form > #cvl-search-input {
		grid-column: 1;
		grid-row: auto;
		border-radius: 4px;
	}

	#cvl-filter-form > .cvl-filter-group {
		grid-column: 1;
		grid-row: auto;
		margin-top: 18px;
	}

	#cvl-filter-form select {
		margin-left: 0;
		border-radius: 4px;
	}

	#cvl-filter-form > button[type="submit"] {
		grid-column: 1;
		grid-row: auto;
		justify-self: start;
		width: auto;
		margin-top: 20px;
		margin-left: 0;
		padding-right: 36px;
		padding-left: 36px;
		border-radius: 25px;
	}
}

/* ------------------------------------------------
   Video archive grid
------------------------------------------------ */

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

@media (max-width: 900px) {
	.cvl-video-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 600px) {
	.cvl-video-grid {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* ------------------------------------------------
   Video cards
------------------------------------------------ */

/* Reset list styles on the grid ul */
.cvl-video-grid {
	list-style: none;
	margin: 0;
	padding: 0;
}

.cvl-video-grid > li {
	display: flex;
}

.cvl-video-card {
	display: flex;
	flex-direction: column;
	min-width: 0;
	width: 100%;
	box-shadow: 2px 2px 4px 1px rgb(174, 174, 176);
}

/* Stretched link: the ::after pseudo-element covers the full card,
   making the entire card clickable while keeping the title as the
   only real link (better for screen readers). */
.cvl-video-card-link {
	color: inherit;
	text-decoration: none;
}


/* Ensure description sits above the stretched ::after link layer. */
.cvl-video-card-thumb-wrap {
	width: 100%;
	aspect-ratio: 16 / 9;
	overflow: hidden;
}

.cvl-video-card-thumb {
	display: block;
	width: 100%;
	height: 100%;
	max-width: 100%;
	object-fit: cover;
	transform: scale(1.15);
}

.cvl-video-card-title {
	margin: 0;
	padding: 15px 15px 0;
	font-family: "Libre Franklin", sans-serif;
	font-size: 19px;
	font-weight: 500;
	line-height: 1.68;
	color: #000 !important;
}

.cvl-video-card-description {
	margin: 0;
	padding: 15px;
	font-size: 0.9rem;
}

/* ------------------------------------------------
   Featured videos
------------------------------------------------ */

.cvl-featured-videos {
	margin-bottom: 3rem;
}

.cvl-featured-heading {
	margin-bottom: 1.25rem;
}

/* ------------------------------------------------
   Results and active filters
------------------------------------------------ */

.cvl-results-count {
	margin-bottom: 1rem;
}

.cvl-active-filters {
	margin-bottom: 1.5rem;
	padding: 0.75rem 1rem;
	background: #f4f1e9;
	border-radius: 4px;
}

.cvl-reset-filters {
	margin-left: 0.75rem;
}

.cvl-filter-hint {
	font-size: 0.8rem;
	color: #5a5a5a;
}

.cvl-no-results {
	padding: 2rem 0;
}

/* ------------------------------------------------
   Single video page
------------------------------------------------ */

.cvl-single-video-layout {
	display: grid;
	grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
	gap: 2rem;
	align-items: start;
}

.cvl-single-video-main,
.cvl-single-video-sidebar {
	min-width: 0;
}

.cvl-single-video-sidebar h2 {
	font-size: 25px !important;
	color: #000 !important;
}

@media (max-width: 800px) {
	.cvl-single-video-layout {
		grid-template-columns: minmax(0, 1fr);
	}
}

.cvl-video-embed {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	margin-bottom: 1.5rem;
}

.cvl-video-embed iframe {
	width: 100%;
	height: 100%;
	border: 0;
}

.cvl-video-description {
	margin-bottom: 1.5rem;
}

/* ------------------------------------------------
   Transcript toggle
------------------------------------------------ */

.cvl-transcript {
	margin-top: 1.5rem;
	padding-top: 1rem;
	border-top: 1px solid #d8d3c8;
}

.cvl-transcript-toggle {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.25rem 0;
	font-size: 1rem;
	font-weight: 600;
	background: none;
	border: 0;
	cursor: pointer;
}

.cvl-transcript-toggle:focus-visible {
	outline: 3px solid rgba(10, 114, 161, 0.35);
	outline-offset: 3px;
}

.cvl-transcript-icon::before {
	content: "+";
}

.cvl-transcript-toggle[aria-expanded="true"]
	.cvl-transcript-icon::before {
	content: "\2212";
}

.cvl-transcript-panel {
	margin-top: 0.75rem;
}

/* ----------------------------------------------------
   Pagination
----------------------------------------------------- */

.cvl-pagination {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-end;
	gap: 5px;
	width: 100%;
	margin: 40px 0 0;
}

/* Number buttons */
.cvl-pagination
	.page-numbers:not(.next):not(.prev):not(.dots) {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	box-sizing: border-box;
	border: 1px solid #32709d;
	background: #fff;
	color: #32709d;
	font-size: 13px;
	font-weight: 400;
	line-height: 1;
	text-decoration: none !important;
}

/* Current page */
.cvl-pagination .page-numbers.current {
	background: #32709d !important;
	color: #fff !important;
	font-weight: 600;
}

/* Number-button hover state */
.cvl-pagination
	a.page-numbers:not(.next):not(.prev):not(.dots):hover {
	background: #32709d;
	color: #fff;
}

/* Ellipsis */
.cvl-pagination .page-numbers.dots {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 32px;
	height: 60px;
	color: #32709d;
	font-size: 13px;
	line-height: 1;
}

/* Previous link */
.cvl-pagination .prev {
	display: inline-flex;
	align-items: center;
	width: auto;
	min-width: 0;
	min-height: 60px;
	padding: 0;
	border: 0;
	background: transparent;
	color: #32709d;
	font-size: 13px;
	font-weight: 400;
	line-height: 1;
	text-decoration: none !important;
	white-space: nowrap;
}

/* Next link */
.cvl-pagination .next {
	display: inline-flex;
	align-items: center;
	width: auto;
	min-width: 0;
	min-height: 60px;
	padding: 0;
	border: 0;
	background: transparent;
	color: #32709d;
	font-size: 0;
	line-height: 1;
	text-decoration: none !important;
	white-space: nowrap;
}

a.cvl-video-card-link:hover {
	color:#32709d;
}

/* Rebuild the Next label so the arrow can be styled separately */
.cvl-pagination .next::before {
	content: "Next";
	font-size: 13px;
	font-weight: 400;
}

.cvl-pagination .next::after {
	content: "»";
	margin-left: 3px;
	font-size: 15px;
	font-weight: 300;
	line-height: 1;
	text-decoration: none !important;
	transform: translateY(-1px);
}

/* Remove underlines from navigation links */
.cvl-pagination .prev:hover,
.cvl-pagination .next:hover,
.cvl-pagination .next:hover::before,
.cvl-pagination .next:hover::after {
	text-decoration: none !important;
}

/* Keyboard focus */
.cvl-pagination a:focus-visible {
	outline: 3px solid #111;
	outline-offset: 3px;
}

/* Smaller screens */
@media (max-width: 600px) {
	.cvl-pagination {
		gap: 8px;
	}

	.cvl-pagination
		.page-numbers:not(.next):not(.prev):not(.dots) {
		width: 48px;
		height: 48px;
		font-size: 13px;
	}

	.cvl-pagination .page-numbers.dots,
	.cvl-pagination .prev,
	.cvl-pagination .next {
		min-height: 48px;
		text-decoration: none !important;
	}

	.cvl-pagination .prev {
		font-size: 13px;
	}

	.cvl-pagination .next::before {
		font-size: 13px;
		text-decoration: none !important;
	}

	.cvl-pagination .next::after {
		margin-left: 8px;
		font-size: 13px;
		text-decoration: none !important;
	}
}