/**
 * SCS Video Education Center hub — readability, loop card spacing, uniform card height.
 * Loaded only on the page with slug video-education-center.
 */
body.scs-video-education-hub .site-content,
body.scs-video-education-hub #content {
	padding-left: clamp(0.75rem, 3vw, 1.75rem);
	padding-right: clamp(0.75rem, 3vw, 1.75rem);
}

body.scs-video-education-hub {
	--scs-hub-spacer-cap: clamp(8px, 1.75vw, 14px);
	--scs-card-radius: 10px;
	--scs-card-border: #d8e0ea;
	--scs-card-bg: #ffffff;
	--scs-title-size: clamp(1.08rem, 1.4vw, 1.2rem);
	--scs-body-size: clamp(1rem, 1.2vw, 1.08rem);
	--scs-pagination-size: clamp(1.03rem, 1.2vw, 1.12rem);
	--scs-search-font: clamp(1.05rem, 1.2vw, 1.15rem);
}

/* Hub search form (Elementor Pro) — readable for seniors */
body.scs-video-education-hub .elementor-widget-search-form input[type='search'],
body.scs-video-education-hub .elementor-widget-search-form .elementor-search-form__input {
	font-size: var(--scs-search-font);
	min-height: 2.75rem;
	padding: 0.5rem 0.85rem;
	border-radius: 8px;
}

body.scs-video-education-hub .elementor-widget-search-form button,
body.scs-video-education-hub .elementor-widget-search-form .elementor-search-form__submit {
	font-size: var(--scs-search-font);
	min-height: 2.75rem;
	padding: 0.5rem 1.1rem;
	border-radius: 8px;
	font-weight: 700;
}

/* Tighter hero → search → intro → grid so the first row of cards is visible without scrolling */
body.scs-video-education-hub .site-content .elementor-widget-heading .elementor-widget-container {
	margin-block: 0.3rem;
}
body.scs-video-education-hub .site-content .elementor-widget-heading:first-child .elementor-widget-container {
	margin-block-start: 0;
}
body.scs-video-education-hub .site-content .elementor-widget-text-editor .elementor-widget-container {
	margin-block: 0.35rem;
}
body.scs-video-education-hub .site-content .elementor-widget-search-form .elementor-widget-container {
	margin-block-end: 0.25rem;
}
/* Accumulated spacer widgets stack; cap rendered height only on hub main column */
body.scs-video-education-hub .site-content .elementor-widget-spacer .elementor-spacer-inner {
	max-height: var(--scs-hub-spacer-cap) !important;
	height: var(--scs-hub-spacer-cap) !important;
}
@media (max-width: 767px) {
	body.scs-video-education-hub .site-content .elementor-widget-spacer .elementor-spacer-inner {
		max-height: 10px !important;
		height: 10px !important;
	}
}
body.scs-video-education-hub .elementor-widget-loop-grid .elementor-widget-container {
	margin-block-start: 0;
}

/* --- Loop grid: equal-height cards (flex column; media fixed ratio; text clamped) --- */
body.scs-video-education-hub .elementor-widget-loop-grid .e-loop-item {
	display: flex;
	flex-direction: column;
	align-self: stretch;
	height: 100%;
	min-height: 0;
}

/* Inner loop document root (flexible variant / container) */
body.scs-video-education-hub .elementor-widget-loop-grid .e-loop-item > .elementor-element,
body.scs-video-education-hub .elementor-widget-loop-grid .e-loop-item > .e-con {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	width: 100%;
	min-height: 0;
}

body.scs-video-education-hub .elementor-widget-loop-grid .e-loop-item .e-con-inner,
body.scs-video-education-hub .elementor-widget-loop-grid .e-loop-item .elementor-widget-wrap {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	min-height: 0;
}

/* Push meta (excerpt) toward bottom optional: title + image stay top; excerpt grows */
body.scs-video-education-hub .elementor-widget-loop-grid .e-loop-item .elementor-widget-text-editor {
	flex: 0 1 auto;
	margin-top: auto;
}

/* Loop grid: gap between cards */
body.scs-video-education-hub .elementor-widget-loop-grid .elementor-loop-container,
body.scs-video-education-hub .elementor-widget-loop-grid .e-loop-item,
body.scs-video-education-hub .elementor-widget-loop-grid .elementor-invisible {
	gap: 1.25rem;
}

body.scs-video-education-hub .elementor-widget-loop-grid .e-loop-item > .elementor-element,
body.scs-video-education-hub .elementor-widget-loop-grid .e-loop-item .elementor-widget-wrap {
	padding: 0.65rem;
	border: 1px solid var(--scs-card-border);
	border-radius: var(--scs-card-radius);
	background: var(--scs-card-bg);
}

/* Featured image / thumbnail: same visual height on every card (16:9; crop) */
body.scs-video-education-hub .elementor-widget-loop-grid .elementor-widget-image .elementor-widget-container {
	aspect-ratio: 16 / 9;
	min-height: 170px;
	overflow: hidden;
	border-radius: calc(var(--scs-card-radius) - 2px);
	background: #f0f0f0;
}

body.scs-video-education-hub .elementor-widget-loop-grid .elementor-widget-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* Theme post featured image widget if used instead of generic image */
body.scs-video-education-hub .elementor-widget-loop-grid .elementor-widget-theme-post-featured-image .elementor-widget-container {
	aspect-ratio: 16 / 9;
	min-height: 170px;
	overflow: hidden;
	border-radius: calc(var(--scs-card-radius) - 2px);
	background: #f0f0f0;
}

body.scs-video-education-hub .elementor-widget-loop-grid .elementor-widget-theme-post-featured-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* Post titles: two lines max so rows stay even */
body.scs-video-education-hub .elementor-widget-loop-grid .elementor-heading-title {
	font-size: var(--scs-title-size);
	line-height: 1.35;
	margin-top: 0.35rem;
	margin-bottom: 0.65rem;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	overflow: hidden;
}

/* Excerpt: cap lines (tune 3–5 to taste) */
body.scs-video-education-hub .elementor-widget-loop-grid .elementor-widget-text-editor,
body.scs-video-education-hub .elementor-widget-loop-grid .elementor-theme-post-content {
	font-size: var(--scs-body-size);
	line-height: 1.62;
	max-width: none;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 4;
	overflow: hidden;
}

body.scs-video-education-hub .elementor-widget-loop-grid .elementor-widget-text-editor p {
	margin: 0 0 0.35rem;
}

body.scs-video-education-hub .elementor-widget-loop-grid .elementor-widget-text-editor p:last-child {
	margin-bottom: 0;
}

/* Video widget inside card */
body.scs-video-education-hub .elementor-widget-loop-grid .elementor-widget-image,
body.scs-video-education-hub .elementor-widget-loop-grid .elementor-widget-video {
	margin-bottom: 0.75rem;
}

body.scs-video-education-hub .elementor-widget-loop-grid .elementor-widget-video .elementor-widget-container {
	aspect-ratio: 16 / 9;
	min-height: 170px;
	overflow: hidden;
	border-radius: calc(var(--scs-card-radius) - 2px);
	/* Softer than flat black when there is no Image Overlay / poster */
	background: linear-gradient(155deg, #334155 0%, #1e293b 55%, #0f172a 100%);
}

/* Larger loop pagination controls for easier tapping/reading */
body.scs-video-education-hub .elementor-widget-loop-grid .e-loop-pagination,
body.scs-video-education-hub .elementor-widget-loop-grid .elementor-pagination {
	margin-top: 1rem;
	gap: 0.45rem;
}

body.scs-video-education-hub .elementor-widget-loop-grid .e-loop-pagination .page-numbers,
body.scs-video-education-hub .elementor-widget-loop-grid .elementor-pagination .page-numbers {
	font-size: var(--scs-pagination-size);
	font-weight: 700;
	line-height: 1.15;
	min-width: 2.2rem;
	min-height: 2.2rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.3rem 0.6rem;
	border-radius: 999px;
	border: 1px solid #c4cfdb;
	background: #fff;
}

body.scs-video-education-hub .elementor-widget-loop-grid .e-loop-pagination .page-numbers.current,
body.scs-video-education-hub .elementor-widget-loop-grid .elementor-pagination .page-numbers.current {
	background: #0f172a;
	color: #fff;
	border-color: #0f172a;
}

/* Self-hosted block video at top of post content (mcp-push-tutorial-videos.ps1) */
body.scs-video-education-hub .scs-tutorial-self-video video,
body.scs-video-education-hub .wp-block-video.scs-tutorial-self-video video {
	width: 100%;
	height: auto;
	display: block;
	border-radius: calc(var(--scs-card-radius) - 2px);
	background: #000;
}

body.scs-video-education-hub .elementor-widget-loop-grid .elementor-widget-video .elementor-wrapper,
body.scs-video-education-hub .elementor-widget-loop-grid .elementor-widget-video video,
body.scs-video-education-hub .elementor-widget-loop-grid .elementor-widget-video iframe {
	width: 100%;
	height: 100%;
	min-height: 0;
	object-fit: cover;
}

@media (max-width: 767px) {
	body.scs-video-education-hub .elementor-widget-loop-grid .e-loop-item {
		margin-bottom: 1rem;
	}
	body.scs-video-education-hub .elementor-widget-loop-grid .e-loop-item > .elementor-element,
	body.scs-video-education-hub .elementor-widget-loop-grid .e-loop-item .elementor-widget-wrap {
		padding: 0.55rem;
	}
	body.scs-video-education-hub .elementor-widget-loop-grid .e-loop-pagination .page-numbers,
	body.scs-video-education-hub .elementor-widget-loop-grid .elementor-pagination .page-numbers {
		min-width: 2rem;
		min-height: 2rem;
		padding: 0.26rem 0.45rem;
	}
	body.scs-video-education-hub .elementor-widget-loop-grid .elementor-heading-title {
		-webkit-line-clamp: 3;
	}
	body.scs-video-education-hub .elementor-widget-loop-grid .elementor-widget-text-editor,
	body.scs-video-education-hub .elementor-widget-loop-grid .elementor-theme-post-content {
		-webkit-line-clamp: 5;
	}
}
