/* Video Single Template Styles
---------------------------------------------------------------------------------------------------- */

article.type-video {
	display: flex;
	flex-wrap: wrap;
	flex-direction: column;
	align-items: center;
}

.single-video .entry-header {
	max-width: 800px;
	width: 100%;
}

/* Back link */
.video-back {
	font-size: 14px;
	margin-bottom: 20px;
}

.video-back a {
	color: #888;
	text-decoration: none;
}

.video-back a:hover {
	color: #ff6c00;
}

/* Responsive YouTube embed — 16:9 aspect ratio */
.video-embed-wrapper {
	position: relative;
	width: 100%;
	padding-bottom: 56.25%;
	height: 0;
	overflow: hidden;
	margin-bottom: 2em;
	border-radius: 4px;
}

.video-embed-wrapper iframe {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
}

/* Transcript heading */
.video-transcript-heading {
	margin-top: 0;
	margin-bottom: 0.75em;
	font-size: 22px;
}

/* Transcript content area */
.single-video .entry-content {
	max-width: 800px;
	line-height: 1.8;
	font-size: 16px;
}

.single-video .entry-content p {
	margin-bottom: 1.2em;
}

/* Pending/error transcript notice */
.video-transcript-pending {
	color: #888;
	font-size: 15px;
	text-align: center;
	padding: 2em 0;
}

/* Video Archive Styles
---------------------------------------------------------------------------------------------------- */

.video-archive-header {
	max-width: 900px;
	margin: 0 auto 30px;
	text-align: center;
}

.video-archive-header h1 {
	margin-bottom: 5px;
}

.video-archive-desc {
	color: #666;
	font-size: 17px;
	margin-bottom: 25px;
}

/* Search form */
.video-search-form {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 8px;
	margin-bottom: 15px;
}

.video-search-input {
	width: 100%;
	max-width: 400px;
	padding: 10px 14px;
	font-size: 15px;
	border: 1px solid #b3b3b3;
	border-radius: 4px;
}

.video-search-input:focus {
	outline: none;
	border-color: #ff6c00;
}

/* Topic dropdown — select.class.class gives (0,2,1) to beat the global select:not([multiple]) rule */
select.video-topic-select.video-topic-select {
	padding: 0.35em;
	padding-right: 1.5em;
	padding-left: 0.5em;
	font-size: 15px;
	border: 1px solid #b3b3b3;
	border-radius: 4px;
	background-color: #fff;
	cursor: pointer;
	min-width: 160px;
}

.video-topic-select:focus {
	outline: none;
	border-color: #ff6c00;
}

.video-search-button {
	padding: 5px 20px;
	margin-top: 0px;
	font-size: 15px;
	font-weight: 600;
	color: #fff;
	background-color: #ff6c00;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	transition: background-color 0.2s ease;
}

.video-search-button:hover {
	background-color: #e55e00;
}

.video-result-count {
	color: #888;
	font-size: 14px;
}

.video-clear-filters {
	color: #888;
	text-decoration: underline;
	font-size: 14px;
}

.video-clear-filters:hover {
	color: #333;
}

/* Card grid */
.video-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
	max-width: 1100px;
	margin: 0 auto;
}

.video-grid .entry {
	position: relative;
	background: #fff;
	border: 1px solid #d5d5d5;
	box-shadow:
		rgba(0, 0, 0, 0.12) 0px 1px 3px,
		rgba(0, 0, 0, 0.24) 0px 1px 0px;
	border-radius: 6px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: box-shadow 0.2s ease;
	cursor: pointer;
}

.video-grid .entry:hover {
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

/* Thumbnail — YouTube mqdefault */
.video-card-thumbnail {
	width: 100%;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	display: block;
}

.video-card-body {
	padding: 18px 20px 0;
	flex: 1;
	display: flex;
	flex-direction: column;
}

.video-card-title {
	font-size: 17px;
	line-height: 1.3;
	margin: 0 0 8px;
}

.video-card-title a {
	color: #333;
	text-decoration: none;
}

.video-card-title a::after {
	content: "";
	position: absolute;
	inset: 0;
}

.video-card-title a:hover {
	color: #ff6c00;
}

.video-card-excerpt {
	font-size: 14px;
	color: #555;
	line-height: 1.6;
	flex: 1;
}

/* Card footer: date */
.video-grid .entry-footer {
	margin-top: auto;
	width: 100%;
	text-align: left;
}

.video-card-footer {
	font-size: 13px;
	color: #888;
	margin: 0;
	padding: 0 20px 18px;
	text-align: left;
}

/* Pagination (Genesis) */
.post-type-archive-video .archive-pagination {
	max-width: 1100px;
	margin: 40px auto;
	text-align: center;
	width: 100%;
	display: flex;
}

/* Responsive */
@media only screen and (max-width: 900px) {
	.video-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 18px;
	}
}

@media only screen and (max-width: 600px) {
	.video-grid {
		grid-template-columns: 1fr;
	}

	.video-search-form {
		flex-direction: column;
	}

	.video-search-input {
		max-width: 100%;
	}

	.video-topic-select {
		width: 100%;
	}
}

@media only screen and (max-width: 800px) {
	.single-video .entry-content {
		font-size: 15px;
	}
}

@media only screen and (max-width: 400px) {
	.single-video .entry-header {
		width: unset;
	}
}
