/**
 * CIYWR Page Banner — single / slider / video.
 */

.ciywr-page-banner {
	--ciywr-banner-height: clamp(380px, 52vh, 560px);
	--ciywr-banner-text: #ffffff;
	--ciywr-banner-eyebrow: var(--ciywr-banner-text);
	--ciywr-banner-title: var(--ciywr-banner-text);
	--ciywr-banner-subtitle: var(--ciywr-banner-text);
	--ciywr-banner-overlay-opacity: 0.55;
	position: relative;
	isolation: isolate;
	overflow: hidden;
	width: 100%;
	min-height: var(--ciywr-banner-height);
	background: #0a0c10;
	color: var(--ciywr-banner-text);
	margin: 0;
}

.ciywr-page-banner--video {
	min-height: 0;
}

.ciywr-page-banner__media {
	position: absolute;
	inset: 0;
	z-index: 0;
}

.ciywr-page-banner__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center center;
}

.ciywr-page-banner__media::after,
.ciywr-page-banner__slide::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	pointer-events: none;
	background: linear-gradient(
		180deg,
		rgba(0, 0, 0, calc(var(--ciywr-banner-overlay-opacity) * 0.72)) 0%,
		rgba(0, 0, 0, calc(var(--ciywr-banner-overlay-opacity) * 0.9)) 45%,
		rgba(0, 0, 0, var(--ciywr-banner-overlay-opacity)) 100%
	);
	opacity: 1;
}

.ciywr-page-banner--overlay-none .ciywr-page-banner__media::after,
.ciywr-page-banner--overlay-none .ciywr-page-banner__slide::after {
	display: none;
}

.ciywr-page-banner__inner {
	position: relative;
	z-index: 2;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	min-height: var(--ciywr-banner-height);
	padding: 48px 20px;
	max-width: 900px;
	margin: 0 auto;
	color: var(--ciywr-banner-text);
}

.ciywr-page-banner__eyebrow,
.ciywr-page-banner__heading,
.ciywr-page-banner__text {
	color: #ffffff !important;
}

.ciywr-page-banner__eyebrow {
	margin: 0 0 10px;
	font-family: var(--ciywr-font-sans, "Source Sans 3", sans-serif);
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: #ffffff !important;
	text-shadow: 0 1px 10px rgba(0, 0, 0, 0.45);
}

.ciywr-page-banner__heading {
	margin: 0 0 12px;
	font-family: var(--ciywr-font-sans, "Source Sans 3", sans-serif);
	font-size: clamp(26px, 4.2vw, 46px);
	font-weight: 700;
	line-height: 1.25;
	color: #ffffff !important;
	text-shadow: 0 2px 16px rgba(0, 0, 0, 0.65);
}

.ciywr-page-banner__text {
	margin: 0;
	max-width: 700px;
	font-family: var(--ciywr-font-serif, "Source Serif 4", serif);
	font-size: clamp(15px, 1.7vw, 19px);
	font-style: italic;
	line-height: 1.55;
	color: #ffffff !important;
	opacity: 0.95;
	text-shadow: 0 1px 12px rgba(0, 0, 0, 0.6);
}

/* Slider */
.ciywr-page-banner__slider {
	position: relative;
	min-height: var(--ciywr-banner-height);
}

.ciywr-page-banner__track {
	position: relative;
	min-height: var(--ciywr-banner-height);
}

.ciywr-page-banner__slide {
	position: absolute;
	inset: 0;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.6s ease, visibility 0.6s ease;
}

.ciywr-page-banner__slide.is-active {
	opacity: 1;
	visibility: visible;
	z-index: 1;
}

.ciywr-page-banner__slide .ciywr-page-banner__media {
	position: absolute;
	inset: 0;
}

.ciywr-page-banner__slide .ciywr-page-banner__inner {
	position: relative;
	z-index: 2;
}

.ciywr-page-banner__nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 5;
	width: 44px;
	height: 44px;
	border: 0;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.45);
	color: #ffffff;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 18px;
	line-height: 1;
}

.ciywr-page-banner__nav:hover,
.ciywr-page-banner__nav:focus {
	background: #c43c30;
}

.ciywr-page-banner__nav--prev {
	left: 16px;
}

.ciywr-page-banner__nav--next {
	right: 16px;
}

.ciywr-page-banner__dots {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 18px;
	z-index: 5;
	display: flex;
	justify-content: center;
	gap: 8px;
}

.ciywr-page-banner__dot {
	width: 10px;
	height: 10px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.45);
	cursor: pointer;
}

.ciywr-page-banner__dot.is-active {
	background: #c43c30;
}

/* Video */
.ciywr-page-banner__video-wrap {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	max-height: 70vh;
	background: #000;
}

.ciywr-page-banner__video,
.ciywr-page-banner__iframe,
.ciywr-page-banner__video-wrap iframe {
	display: block;
	width: 100%;
	height: 100%;
	border: 0;
	object-fit: cover;
}

.ciywr-page-banner__inner--video {
	position: absolute;
	inset: 0;
	min-height: 0;
	pointer-events: none;
	background: linear-gradient(
		180deg,
		rgba(0, 0, 0, calc(var(--ciywr-banner-overlay-opacity) * 0.65)),
		rgba(0, 0, 0, var(--ciywr-banner-overlay-opacity))
	);
}

.ciywr-page-banner--overlay-none .ciywr-page-banner__inner--video {
	background: transparent;
}

/* When theme banner replaces Elementor home slider / page heroes */
body.ciywr-banner-replaces-home-slider #cust-slider,
body.ciywr-has-page-banner #cust-slider {
	display: none !important;
}

body.ciywr-has-page-banner:not(.ciywr-kenya-a-page):not(.ciywr-kenya-b-page):not(.ciywr-mission-page):not(.ciywr-donate-page)
	.elementor-top-section.elementor-section-height-min-height:first-of-type,
body.ciywr-has-page-banner:not(.ciywr-kenya-a-page):not(.ciywr-kenya-b-page):not(.ciywr-mission-page):not(.ciywr-donate-page)
	.elementor > .elementor-section:first-child.elementor-section-height-min-height,
body.ciywr-has-page-banner:not(.ciywr-kenya-a-page):not(.ciywr-kenya-b-page):not(.ciywr-mission-page):not(.ciywr-donate-page)
	.elementor > .e-con:first-child.e-flex,
body.ciywr-has-page-banner:not(.ciywr-kenya-a-page):not(.ciywr-kenya-b-page):not(.ciywr-mission-page):not(.ciywr-donate-page)
	.elementor > .e-con.e-con-full:first-child {
	display: none !important;
}

body.ciywr-has-page-banner .page-header,
body.ciywr-has-page-banner .entry-header {
	display: none !important;
}

@media (max-width: 700px) {
	.ciywr-page-banner {
		--ciywr-banner-height: clamp(300px, 48vh, 420px);
	}

	.ciywr-page-banner__nav {
		width: 38px;
		height: 38px;
	}
}
