/* ============================================================
	Style 3 – Modern Dark Hover Card (Netflix / YouTube inspired)
	Most popular card style used across modern video feed plugins
	============================================================ */

.captfyt-s3-list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: 20px;
	max-width: 1250px;
}

/* ── Card ───────────────────────────────────────────────── */
.captfyt-s3-card {
	position: relative;
	border-radius: 10px;
	overflow: hidden;
	text-decoration: none;
	display: block;
	cursor: pointer;
	background: #000;
	box-shadow: 0 4px 16px rgba(0,0,0,0.12);
	transition: transform 0.35s cubic-bezier(0.4,0,0.2,1),
				box-shadow 0.35s ease;
}

.captfyt-s3-card:hover {
	transform: scale(1.04);
	box-shadow: 0 16px 48px rgba(0,0,0,0.28);
	z-index: 2;
}

/* ── Thumbnail ──────────────────────────────────────────── */
.captfyt-s3-thumb {
	width: 100%;
	aspect-ratio: 16/9;
	object-fit: cover;
	display: block;
	transition: opacity 0.35s ease, transform 0.45s ease;
}

.captfyt-s3-card:hover .captfyt-s3-thumb {
	opacity: 0.45;
	transform: scale(1.06);
}

/* ── Overlay (always visible gradient at bottom) ──────── */
.captfyt-s3-overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(
		to top,
		rgba(0,0,0,0.90) 0%,
		rgba(0,0,0,0.35) 45%,
		rgba(0,0,0,0) 100%
	);
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	padding: 16px;
	transition: background 0.35s ease;
}

.captfyt-s3-card:hover .captfyt-s3-overlay {
	background: linear-gradient(
		to top,
		rgba(0,0,0,0.97) 0%,
		rgba(0,0,0,0.55) 50%,
		rgba(0,0,0,0.20) 100%
	);
}

/* ── Play circle – shows on hover ─────────────────────── */
.captfyt-s3-play {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -55%) scale(0.7);
	opacity: 0;
	transition: opacity 0.3s ease, transform 0.3s ease;
	width: 56px;
	height: 56px;
	background: rgba(255,255,255,0.18);
	border: 2px solid rgba(255,255,255,0.7);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	backdrop-filter: blur(4px);
}

.captfyt-s3-card:hover .captfyt-s3-play {
	opacity: 1;
	transform: translate(-50%, -55%) scale(1);
}

.captfyt-s3-icon-pause { display: none; }
.captfyt-s3-card.captfyt-is-playing .captfyt-s3-icon-play { display: none; }
.captfyt-s3-card.captfyt-is-playing .captfyt-s3-icon-pause { display: block; }
.captfyt-s3-card.captfyt-is-playing .captfyt-s3-play { opacity: 1; }

.captfyt-s3-play svg {
	width: 22px;
	height: 22px;
	fill: #fff;
	margin-left: 3px; /* optical center for triangle */
}

.captfyt-s3-duration {
	position: absolute;
	right: 8px;
	bottom: 8px;
	background: rgba(0, 0, 0, 0.8);
	color: #fff;
	font-size: 12px;
	font-weight: 600;
	line-height: 1;
	padding: 3px 6px;
	border-radius: 4px;
	z-index: 2;
}

.captfyt-s3-stats {
	color: rgba(255, 255, 255, 0.7);
	font-size: 12px;
	margin: 0 0 4px;
}

/* ── Bottom text content ────────────────────────────────── */
.captfyt-s3-meta {
	display: flex;
	align-items: center;
	gap: 6px;
	margin-bottom: 7px;
}

.captfyt-s3-channel-badge {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	background: #ff0000;
	color: #fff;
	font-size: 10.5px;
	font-weight: 700;
	padding: 3px 8px;
	border-radius: 4px;
	letter-spacing: 0.4px;
	text-transform: uppercase;
}

.captfyt-s3-channel-badge svg {
	width: 11px;
	height: 11px;
	fill: #fff;
}

.captfyt-s3-title {
	color: #fff;
	font-size: 14.5px;
	font-weight: 600;
	line-height: 1.45;
	margin: 0 0 4px;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	letter-spacing: -0.1px;
}

.captfyt-s3-desc {
	color: rgba(255,255,255,0.65);
	font-size: 12px;
	line-height: 1.5;
	margin: 0;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	max-height: 0;
	opacity: 0;
	overflow: hidden;
	transition: max-height 0.35s ease, opacity 0.3s ease;
}

.captfyt-s3-card:hover .captfyt-s3-desc {
	max-height: 60px;
	opacity: 1;
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 980px) {
	.captfyt-s3-list {
		margin: 0 auto;
	}
}

@media (hover: none) {
	/* Touch devices – show content always */
	.captfyt-s3-desc {
		max-height: 100px !important;
		opacity: 1 !important;
	}
	.captfyt-s3-play {
		opacity: 1 !important;
		transform: translate(-50%, -55%) scale(1) !important;
	}
}

/* Inline play (added via Video Play Mode = "Play Inline on Page") */
.captfyt-inline-iframe { display: block; width: 100%; height: 100%; border: 0; background: #000; }
.captfyt-inline-close { position: absolute; top: 8px; right: 8px; width: 26px; height: 26px; padding: 0; border: 0; border-radius: 50%; background: rgba(0, 0, 0, 0.65); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; z-index: 5; line-height: 0; }
.captfyt-inline-close:hover { background: rgba(0, 0, 0, 0.85); }
