/**
 * CCDC Hero Slider — front-end styles
 *
 * @package Listable_CCDC
 */

.ccdc-hero {
	position: relative;
	width: 100%;
	height: 100vh;          /* overridden by the Elementor Height control */
	overflow: hidden;
	background-color: #1a1a1a;
}

.ccdc-hero__viewport,
.ccdc-hero__slide {
	position: absolute;
	inset: 0;
}

/* ── Slides (cross-fade) ───────────────────────── */
.ccdc-hero__slide {
	background-size: cover;
	background-position: center center;
	background-repeat: no-repeat;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.8s ease, visibility 0s linear 0.8s;
	z-index: 1;
}

.ccdc-hero__slide.is-active {
	opacity: 1;
	visibility: visible;
	transition: opacity 0.8s ease;
	z-index: 2;
}

/* ── Video background ──────────────────────────── */
.ccdc-hero__video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* ── YouTube background ────────────────────────── */
.ccdc-hero__yt {
	position: absolute;
	inset: 0;
	overflow: hidden;
	background-size: cover;
	background-position: center center;
	pointer-events: none;
}

.ccdc-hero__yt iframe {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 100vw;
	height: 56.25vw;        /* 16:9 relative to width */
	min-width: 177.78vh;    /* 16:9 relative to height */
	min-height: 100vh;
	transform: translate(-50%, -50%);
	border: 0;
	pointer-events: none;
}

/* Skip the iframe on small screens — the poster background shows instead. */
@media (max-width: 767px) {
	.ccdc-hero__yt iframe { display: none; }
}

/* ── Interactive slides (video controls visible) ── */
/* Let clicks pass through empty content area to the video below. */
.ccdc-hero__content { pointer-events: none; }
.ccdc-hero__content > * { pointer-events: auto; }

.ccdc-hero__slide.is-interactive .ccdc-hero__overlay { pointer-events: none; }
.ccdc-hero__slide.is-interactive .ccdc-hero__video,
.ccdc-hero__slide.is-interactive .ccdc-hero__yt,
.ccdc-hero__slide.is-interactive .ccdc-hero__yt iframe { pointer-events: auto; }

/* ── Overlay ───────────────────────────────────── */
.ccdc-hero__overlay {
	position: absolute;
	inset: 0;
	background-color: rgba(0, 0, 0, 0.35);
	z-index: 1;
}

/* ── Content ───────────────────────────────────── */
.ccdc-hero__content {
	position: absolute;
	inset: 0;
	z-index: 2;
	display: flex;
	flex-direction: column;
	padding: 6vw clamp(20px, 8vw, 120px);
	color: #fff;
}

.ccdc-hero--align-center .ccdc-hero__content {
	align-items: center;
	justify-content: center;
	text-align: center;
}

.ccdc-hero--align-bottom .ccdc-hero__content {
	align-items: center;
	justify-content: flex-end;
	text-align: center;
}

.ccdc-hero--align-bottom-left .ccdc-hero__content {
	align-items: flex-start;
	justify-content: flex-end;
	text-align: left;
}

.ccdc-hero__title {
	margin: 0 0 0.4em;
	font-size: clamp(2rem, 5vw, 4rem);
	line-height: 1.1;
	color: #fff;
	max-width: 18ch;
}

.ccdc-hero--align-center .ccdc-hero__title,
.ccdc-hero--align-bottom .ccdc-hero__title {
	max-width: 22ch;
}

.ccdc-hero__subtitle {
	margin: 0 0 1.4em;
	font-size: clamp(1rem, 1.6vw, 1.375rem);
	line-height: 1.5;
	max-width: 48ch;
	color: rgba(255, 255, 255, 0.9);
}

.ccdc-hero__btn {
	display: inline-block;
	padding: 14px 30px;
	background-color: #323625;
	color: #fff;
	font-size: 0.95rem;
	font-weight: 600;
	text-decoration: none;
	border-radius: 32px;
	border: 0 solid transparent;
	transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease, opacity 0.25s ease, transform 0.25s ease;
}

.ccdc-hero__btn:hover {
	opacity: 0.92;
}

/* ── Arrows ────────────────────────────────────── */
.ccdc-hero__nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 5;
	width: 52px;
	height: 52px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 28px;
	line-height: 1;
	color: #fff;
	/* background: rgba(0, 0, 0, 0.25); */
	/* border: 1px solid rgba(255, 255, 255, 0.7); */
	border: 0;
	border-radius: 50%;
	cursor: pointer;
	/* transition: background 0.25s ease, opacity 0.25s ease; */
}

/* .ccdc-hero__nav:hover { background: rgba(0, 0, 0, 0.5); } */
.ccdc-hero__nav--prev { left: clamp(12px, 2vw, 32px); }
.ccdc-hero__nav--next { right: clamp(12px, 2vw, 32px); }
.ccdc-hero__nav span {
	font-size: 38px;
	/* margin-bottom: 4px; */
}

/* ── Dots ──────────────────────────────────────── */
.ccdc-hero__dots {
	position: absolute;
	left: 0;
	right: 0;
	bottom: clamp(16px, 3vh, 32px);
	z-index: 5;
	display: flex;
	gap: 10px;
	justify-content: center;
}

.ccdc-hero__dot {
	width: 11px;
	height: 11px;
	padding: 0;
	border-radius: 50%;
	border: 1px solid #fff;
	background: transparent;
	cursor: pointer;
	transition: background 0.25s ease;
}

.ccdc-hero__dot.is-active { background: #fff; }

/* ── Motion-reduction ──────────────────────────── */
@media (prefers-reduced-motion: reduce) {
	.ccdc-hero__slide { transition: opacity 0.01s linear; }
}
