/**
 * 视频栏目列表（各主题共用）
 *
 * 只用自有 class，不依赖任何主题的栅格，所以换主题不会散。宽度由外层容器给，
 * 这里用 grid 自适应，窄屏自动落到一列。
 */

.jc-vlist {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 24px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.jc-vlist-item {
	margin: 0;
	padding: 0;
	list-style: none;
}

/* 播放器容器：16:9 用 padding-top 撑住，避免载入 iframe 时页面跳动 */
.jc-vlist-frame {
	position: relative;
	width: 100%;
	padding-top: 56.25%;
	border-radius: 10px;
	overflow: hidden;
	background: #000;
}

.jc-vlist-frame iframe,
.jc-vlist-frame video {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	border: 0;
	display: block;
	background: #000;
}

/* 未点播放前只有一张封面图，不载入任何第三方脚本 */
.jc-vlist-poster {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	background: #111;
	cursor: pointer;
	display: block;
	overflow: hidden;
}

.jc-vlist-poster img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform .35s ease, opacity .2s ease;
}

.jc-vlist-poster:hover img,
.jc-vlist-poster:focus-visible img {
	transform: scale(1.04);
}

/* 没有封面时的兜底底色，避免出现一块空白 */
.jc-vlist-poster.is-noimg {
	background: linear-gradient(135deg, #263238 0%, #37474f 100%);
}

.jc-vlist-play {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 64px;
	height: 64px;
	margin: -32px 0 0 -32px;
	border-radius: 50%;
	background: rgba(0, 0, 0, .55);
	border: 2px solid rgba(255, 255, 255, .9);
	box-sizing: border-box;
	transition: background .2s ease, transform .2s ease;
	pointer-events: none;
}

/* 播放三角：用边框拼，省一张图 */
.jc-vlist-play::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	margin: -11px 0 0 -6px;
	border-style: solid;
	border-width: 11px 0 11px 18px;
	border-color: transparent transparent transparent #fff;
}

.jc-vlist-poster:hover .jc-vlist-play,
.jc-vlist-poster:focus-visible .jc-vlist-play {
	background: rgba(204, 0, 0, .85);
	border-color: #fff;
	transform: scale(1.08);
}

.jc-vlist-poster:focus-visible {
	outline: 3px solid #3a9bb8;
	outline-offset: 2px;
}

.jc-vlist-body {
	padding: 12px 2px 0;
}

.jc-vlist-title {
	margin: 0;
	font-size: 16px;
	line-height: 1.45;
	font-weight: 600;
	color: #1f2933;
	word-wrap: break-word;
}

.jc-vlist-desc {
	margin: 6px 0 0;
	font-size: 13px;
	line-height: 1.7;
	color: #6b7784;
	word-wrap: break-word;
}

.jc-vlist-empty {
	margin: 0;
	padding: 40px 16px;
	text-align: center;
	color: #94a3b8;
	font-size: 14px;
}

/* ---------- 正文里插入的单个视频 ---------- */

/*
 * 后台编辑器的「插入视频」写进正文的那一块（产品、新闻、案例、单页都可能有）。
 *
 * 播放器容器、封面、播放按钮全部复用上面列表那套 class，点击播放也是同一个脚本，
 * 所以这里只管正文里的留白与宽度。样式和脚本由 CommonAction::jcInjectVideoEmbedAssets
 * 在页面里发现这个 class 时自动带上，主题不用各自引入。
 */
.jc-vembed {
	margin: 22px 0;
	/* 宽屏正文里铺满一整行会很突兀，也让 16:9 的高度过大 */
	max-width: 760px;
}

.jc-vembed-cap {
	margin: 10px 0 0;
	font-size: 13px;
	line-height: 1.7;
	color: #6b7784;
	text-align: center;
}

@media screen and (max-width: 640px) {
	.jc-vlist {
		grid-template-columns: 1fr;
		gap: 20px;
	}
	.jc-vlist-play {
		width: 54px;
		height: 54px;
		margin: -27px 0 0 -27px;
	}
	.jc-vlist-play::before {
		margin: -9px 0 0 -5px;
		border-width: 9px 0 9px 15px;
	}
}
