/* =========================================================================
   YouTube Video Carousel – v1.0
   Defaults match the reference design; every value can be changed in
   Elementor (Style tab), which always wins over these defaults.
   ========================================================================= */

.yvc-carousel-wrap {
	position: relative;
	width: 100%;
}

/* ---------- Grid layout (unchanged behaviour) ---------- */
.yvc-grid {
	display: grid;
	grid-template-columns: repeat( 4, 1fr );
	gap: 24px;
	width: 100%;
}
.yvc-grid-item { min-width: 0; display: flex; }
@media ( max-width: 1024px ) { .yvc-grid { grid-template-columns: repeat( 2, 1fr ); } }
@media ( max-width: 767px )  { .yvc-grid { grid-template-columns: repeat( 1, 1fr ); } }

/* ---------- Carousel: viewport, edge fades, moving track ---------- */
.yvc-marquee {
	--yvc-gap: 22px;
	--yvc-fade-w: 12%;
	--yvc-card-w: 420px;
}

.yvc-viewport {
	position: relative;
	overflow: hidden;
	padding: 24px 0 30px;
}

.yvc-marquee.has-fade .yvc-viewport::before,
.yvc-marquee.has-fade .yvc-viewport::after {
	content: "";
	position: absolute;
	top: 0;
	bottom: 0;
	z-index: 3;
	width: var(--yvc-fade-w);
	pointer-events: none;
}
.yvc-marquee.has-fade .yvc-viewport::before {
	left: 0;
	background: linear-gradient(90deg, var(--yvc-fade, #0a0c10) 0%, var(--yvc-fade, #0a0c10) 12%, transparent 100%);
}
.yvc-marquee.has-fade .yvc-viewport::after {
	right: 0;
	background: linear-gradient(270deg, var(--yvc-fade, #0a0c10) 0%, var(--yvc-fade, #0a0c10) 12%, transparent 100%);
}

.yvc-track {
	display: flex;
	align-items: stretch;
	gap: var(--yvc-gap);
	width: max-content;
	will-change: transform;
	backface-visibility: hidden;
}

.yvc-slide {
	display: flex;
	flex: 0 0 var(--yvc-card-w);
	width: var(--yvc-card-w);
	min-width: 0;
}

.yvc-marquee.is-draggable .yvc-viewport { cursor: grab; touch-action: pan-y; }
.yvc-marquee.is-dragging .yvc-viewport { cursor: grabbing; }
.yvc-marquee.is-dragging .yvc-card { pointer-events: none; }

/* Default fade: the cards themselves fade out, so ANY section background
   (solid color, gradient or image) shows through at the edges. */
.yvc-marquee.has-fade:not(.has-fade-color) .yvc-viewport {
	-webkit-mask-image: linear-gradient(90deg, transparent 0, #000 var(--yvc-fade-w), #000 calc(100% - var(--yvc-fade-w)), transparent 100%);
	mask-image: linear-gradient(90deg, transparent 0, #000 var(--yvc-fade-w), #000 calc(100% - var(--yvc-fade-w)), transparent 100%);
}
.yvc-marquee.has-fade:not(.has-fade-color) .yvc-viewport::before,
.yvc-marquee.has-fade:not(.has-fade-color) .yvc-viewport::after { display: none; }

/* Reduced motion: a swipeable row instead of auto-scroll */
.yvc-marquee.is-static .yvc-viewport {
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	-webkit-overflow-scrolling: touch;
}
.yvc-marquee.is-static .yvc-slide { scroll-snap-align: start; }
.yvc-marquee.is-static.has-fade .yvc-viewport::before,
.yvc-marquee.is-static.has-fade .yvc-viewport::after { display: none; }
.yvc-marquee.is-static.has-fade .yvc-viewport { -webkit-mask-image: none; mask-image: none; }

/* ---------- Card ---------- */
.yvc-card {
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	width: 100%;
	background-color: #0e1116;
	background-image: radial-gradient(120% 60% at 50% 100%, rgba(255, 255, 255, 0.025), transparent 70%);
	border: 1px solid rgba(52, 199, 123, 0.22);
	border-radius: 16px;
	overflow: hidden;
	transition: border-color .35s ease, transform .35s ease, box-shadow .35s ease;
}
.yvc-card:hover {
	border-color: rgba(52, 199, 123, 0.55);
	transform: translateY(-4px);
}

.yvc-media {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	flex-shrink: 0;
	overflow: hidden;
	background: #0b0e12;
}

.yvc-media video,
.yvc-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.yvc-media-embed {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
}

.yvc-media-embed iframe,
.yvc-media-embed video,
.yvc-media-embed embed,
.yvc-media-embed object {
	position: absolute;
	inset: 0;
	width: 100% !important;
	height: 100% !important;
	border: 0;
	object-fit: cover;
}

/* Some video plugins wrap the embed in a 16:9 padding-ratio div. */
.yvc-media-embed > div {
	position: absolute !important;
	inset: 0 !important;
	padding: 0 !important;
	height: 100% !important;
}

.yvc-media-placeholder {
	width: 100%;
	height: 100%;
	background: repeating-linear-gradient( 45deg, #151a20, #151a20 10px, #1b2128 10px, #1b2128 20px );
}

.yvc-content {
	flex: 1;
	display: flex;
	flex-direction: column;
	padding: 24px 20px 20px;
	min-height: 0;
}

.yvc-title {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	overflow: hidden;
	margin: 0 0 24px;
	color: #ffffff;
	font-family: Montserrat, system-ui, -apple-system, "Segoe UI", sans-serif;
	font-size: 26px;
	font-weight: 700;
	line-height: 1.25;
}

.yvc-description {
	margin: 0 0 16px;
	color: rgba(255, 255, 255, 0.68);
	font-size: 15px;
	line-height: 1.5;
	-webkit-line-clamp: 2;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* ---------- YouTube thumbnail + play button ---------- */
.yvc-thumb {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	padding: 0;
	margin: 0;
	border: 0;
	border-radius: 0;
	background: #000;
	cursor: pointer;
	overflow: hidden;
	color: #fff;
}
.yvc-thumb img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .5s ease, opacity .3s ease;
}
.yvc-thumb:hover img { transform: scale(1.04); }
.yvc-thumb:focus-visible { outline: 2px solid #34c77b; outline-offset: -2px; }

.yvc-play {
	position: absolute;
	top: 50%;
	left: 50%;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 68px;
	height: 68px;
	border-radius: 50%;
	background-color: rgba(10, 145, 80, 0.92);
	color: #fff;
	font-size: 26px;
	transform: translate(-50%, -50%);
	box-shadow: 0 8px 28px -6px rgba(0, 0, 0, .55);
	transition: transform .25s ease, background-color .25s ease;
	pointer-events: none;
}
.yvc-play svg { width: 1em; height: 1em; margin-left: .12em; fill: currentColor; }
.yvc-thumb:hover .yvc-play { transform: translate(-50%, -50%) scale(1.1); }

.yvc-player {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
	background: #000;
}

/* ---------- Popup (lightbox) player ---------- */
.yvc-lightbox {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	background: rgba(0, 0, 0, .86);
	opacity: 0;
	transition: opacity .25s ease;
}
.yvc-lightbox.is-open { opacity: 1; }
.yvc-lightbox-inner {
	position: relative;
	width: min(1100px, 100%);
	aspect-ratio: 16 / 9;
	max-height: calc(100vh - 48px);
	background: #000;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .8);
}
.yvc-lightbox-inner.is-short {
	width: auto;
	height: min(86vh, 900px);
	aspect-ratio: 9 / 16;
}
.yvc-lightbox iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.yvc-lightbox-close {
	position: absolute;
	top: 14px;
	right: 14px;
	z-index: 2;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, .12);
	color: #fff;
	font-size: 26px;
	line-height: 44px;
	cursor: pointer;
}
.yvc-lightbox-close:hover { background: rgba(255, 255, 255, .25); }
body.yvc-lightbox-open { overflow: hidden; }

/* ---------- Read More button ---------- */
.yvc-button {
	box-sizing: border-box;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin-top: auto;
	align-self: stretch;
	min-height: 50px;
	padding: 16px 28px;
	border-radius: 10px;
	background-color: var(--yvc-btn-a, #0a9150);
	color: #ffffff;
	font-family: Montserrat, system-ui, -apple-system, "Segoe UI", sans-serif;
	font-size: 13px;
	font-weight: 800;
	letter-spacing: 3px;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	text-transform: uppercase;
	transition: background-color .25s ease, color .25s ease, filter .25s ease, box-shadow .25s ease;
}

/* Gradient type (Style › Button › Background Type) */
.yvc-btn-bg-gradient .yvc-button {
	background-image: linear-gradient(90deg, var(--yvc-btn-a, #0a9150) 0%, var(--yvc-btn-b, #3ccb86) 100%);
}
.yvc-btn-bg-gradient .yvc-button:hover,
.yvc-btn-bg-gradient .yvc-button:focus {
	background-image: linear-gradient(90deg,
		var(--yvc-btn-a-h, var(--yvc-btn-a, #0a9150)) 0%,
		var(--yvc-btn-b-h, var(--yvc-btn-b, #3ccb86)) 100%);
}
.yvc-btn-bg-solid .yvc-button { background-image: none; }

.yvc-button:hover,
.yvc-button:focus {
	text-decoration: none;
	filter: brightness(1.08);
}
.yvc-button:focus-visible { outline: 2px solid var(--yvc-btn-b, #3ccb86); outline-offset: 3px; }

/* Glow (Style › Button › Glow) – follows the button color unless a Glow Color is set */
.yvc-btn-glow-yes .yvc-button {
	--yvc-glow-auto: rgba(38, 201, 116, 0.38);
	--yvc-glow-auto: color-mix(in srgb, var(--yvc-btn-a, #0a9150) 45%, transparent);
	box-shadow:
		inset 0 1px 0 rgba(255, 255, 255, 0.22),
		0 10px 26px -8px var(--yvc-glow, var(--yvc-glow-auto)),
		0 0 18px -6px var(--yvc-glow, var(--yvc-glow-auto));
}
.yvc-btn-glow-yes .yvc-button:hover {
	box-shadow:
		inset 0 1px 0 rgba(255, 255, 255, 0.28),
		0 14px 34px -8px var(--yvc-glow, var(--yvc-glow-auto)),
		0 0 26px -4px var(--yvc-glow, var(--yvc-glow-auto));
}

.yvc-button svg,
.yvc-button i {
	font-size: 1em;
	line-height: 1;
}
.yvc-button svg { width: 1em; height: 1em; fill: currentColor; }

/* ---------- Arrows ---------- */
.yvc-nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 10;
	width: 44px;
	height: 44px;
	padding: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 1px solid rgba(52, 199, 123, 0.55);
	border-radius: 50%;
	background: #0e1116;
	color: #fff;
	font-size: 18px;
	cursor: pointer;
	transition: background-color .25s ease, border-color .25s ease;
	user-select: none;
}
.yvc-nav:hover { border-color: #34c77b; }
.yvc-nav:focus-visible { outline: 2px solid #34c77b; outline-offset: 3px; }
.yvc-nav-prev { left: 10px; }
.yvc-nav-next { right: 10px; }

/* ---------- Dots (keeps the old "Pagination Dots" style controls working) ---------- */
.yvc-carousel-wrap .yvc-dots {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 8px;
	margin-top: 8px;
}
.yvc-carousel-wrap .yvc-dot {
	width: 10px;
	height: 10px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(52, 199, 123, 0.35);
	opacity: 1;
	margin: 0 !important;
	cursor: pointer;
}
.yvc-carousel-wrap .yvc-dot-active { background: #34c77b; }
.yvc-carousel-wrap .yvc-dot:focus-visible { outline: 2px solid #34c77b; outline-offset: 3px; }

.yvc-empty {
	padding: 40px;
	text-align: center;
	background: #f5f5f5;
	border: 1px dashed #ccc;
	color: #666;
}

@media (max-width: 767px) {
	.yvc-play { width: 56px; height: 56px; font-size: 22px; }
	.yvc-nav { width: 36px; height: 36px; }
	.yvc-title { font-size: 19px; margin-bottom: 18px; }
	.yvc-content { padding: 18px 16px 16px; }
}

@media (prefers-reduced-motion: reduce) {
	.yvc-card, .yvc-button { transition: none; }
	.yvc-card:hover { transform: none; }
}
