/*
 * WISER Webinars page template.
 * Values mirror the former Divi Builder page (Divi breakpoints: 980px tablet, 767px phone).
 */

.wiser-webinar-page {
	--wiser-webinar-purple: #662e91;
	--wiser-webinar-date-color: #8300e9;
	--wiser-webinar-text: #333;
	--wiser-webinar-section-bg: #fefefe;
	--wiser-webinar-pattern: url("/wp-content/uploads/2023/12/Untitled-design-7.png");
	--wiser-webinar-hero-image: url("/wp-content/uploads/2023/12/church-01.jpg");
	--wiser-webinar-container: 80%;
	--wiser-webinar-container-max: 1080px;
	--wiser-webinar-featured-width: 50%;
	--wiser-webinar-gap: 3%;
	--wiser-webinar-row-gap: 30px;
	--wiser-webinar-shadow: 1px 2px 6px -3px rgba(51, 51, 51, 0.3);
	--wiser-webinar-shadow-hover: 6px 7px 9px -3px rgba(124, 124, 124, 0.3);
	--wiser-webinar-hero-size: 29px;
	--wiser-webinar-hero-spacing: 3px;
	--wiser-webinar-date-size: 18px;
	--wiser-webinar-title-size: 22px;
	--wiser-webinar-heading-size: 34px;

	font-family: Montserrat, Helvetica, Arial, sans-serif;
	color: var(--wiser-webinar-text);
}

.wiser-webinar-page *,
.wiser-webinar-page *::before,
.wiser-webinar-page *::after {
	box-sizing: border-box;
}

/* Hero band ------------------------------------------------------------ */
.wiser-webinar-hero {
	position: relative;
	z-index: 10;
	padding: 50px 0;
	background-color: var(--wiser-webinar-purple);
	background-image: var(--wiser-webinar-hero-image);
	background-blend-mode: multiply;
	background-size: cover;
	background-position: center;
	box-shadow: 0 -10px 60px 0 rgba(0, 0, 0, 0.3);
}

.wiser-webinar-hero__inner {
	width: var(--wiser-webinar-container);
	max-width: var(--wiser-webinar-container-max);
	margin: 0 auto;
	padding: 18px 0 8px;
}

.wiser-webinar-page h1.wiser-webinar-hero__title {
	margin: 0;
	padding: 0 0 7px;
	font-size: var(--wiser-webinar-hero-size);
	font-weight: 500;
	line-height: 1em;
	letter-spacing: var(--wiser-webinar-hero-spacing);
	text-align: center;
	text-transform: uppercase;
	color: #fff;
}

/* Sections ------------------------------------------------------------- */
.wiser-webinar-section {
	padding: 54px 0;
	background-color: var(--wiser-webinar-section-bg);
	background-image: var(--wiser-webinar-pattern);
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
}

.wiser-webinar-section--featured {
	padding: 60px 0 81px;
}

.wiser-webinar-section--past {
	margin-top: 0;
	padding-bottom: 80px;
}

.wiser-webinar-container {
	width: var(--wiser-webinar-container);
	max-width: var(--wiser-webinar-container-max);
	margin: 0 auto;
}

.wiser-webinar-container--featured {
	width: var(--wiser-webinar-featured-width);
}

.wiser-webinar-page h2.wiser-webinar-past-title {
	margin: 0 0 10px;
	padding: 20px 0 22px;
	font-size: var(--wiser-webinar-heading-size);
	font-weight: 600;
	line-height: 1.1em;
	color: var(--wiser-webinar-text);
}

/* Grid ------------------------------------------------------------------ */
.wiser-webinar-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	column-gap: var(--wiser-webinar-gap);
	row-gap: var(--wiser-webinar-row-gap);
	margin-top: 36px;
	align-items: stretch;
}

/* Card ------------------------------------------------------------------ */
.wiser-webinar-card {
	display: flex;
	flex-direction: column;
	background: #fff;
	box-shadow: var(--wiser-webinar-shadow);
	transition: box-shadow 300ms ease;
}

.wiser-webinar-card:hover {
	box-shadow: var(--wiser-webinar-shadow-hover);
}

.wiser-webinar-media {
	position: relative;
	width: 100%;
	margin-bottom: 3%; /* Divi module margin under the video */
	aspect-ratio: 16 / 9;
	background: #000;
	overflow: hidden;
}

.wiser-webinar-poster {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.wiser-webinar-play {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	background: #000;
	cursor: pointer;
}

.wiser-webinar-play__icon {
	position: absolute;
	top: 50%;
	left: 50%;
	display: block;
	line-height: 0;
	transform: translate(-50%, -50%);
	transition: transform 150ms ease;
}

.wiser-webinar-play:hover .wiser-webinar-play__icon,
.wiser-webinar-play:focus-visible .wiser-webinar-play__icon {
	transform: translate(-50%, -50%) scale(1.08);
}

.wiser-webinar-play:focus-visible {
	outline: 3px solid var(--wiser-webinar-date-color);
	outline-offset: -3px;
}

.wiser-webinar-play--youtube .wiser-webinar-play__icon svg path:first-child {
	fill-opacity: 0.8;
	transition: fill-opacity 150ms ease;
}

.wiser-webinar-play--youtube:hover .wiser-webinar-play__icon svg path:first-child,
.wiser-webinar-play--youtube:focus-visible .wiser-webinar-play__icon svg path:first-child {
	fill-opacity: 1;
}

.wiser-webinar-player,
.wiser-webinar-video {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	border: 0;
	background: #000;
}

/* Text area ------------------------------------------------------------- */
.wiser-webinar-body {
	padding: 0;
}

.wiser-webinar-date {
	display: block;
	padding: 16px 10px 10px 11px;
	font-size: var(--wiser-webinar-date-size);
	font-weight: 500;
	line-height: 1.2em;
	color: var(--wiser-webinar-date-color);
}

.wiser-webinar-page h3.wiser-webinar-title {
	margin: -2px 0 0;
	padding: 0 10px 22px 11px;
	font-size: var(--wiser-webinar-title-size);
	font-weight: 500;
	line-height: 1.2em;
	color: var(--wiser-webinar-text);
}

.wiser-webinar-empty {
	padding: 40px 0;
	font-size: 20px;
	text-align: center;
}

/* Tablet (Divi: max-width 980px): columns stack, featured card widens --- */
@media (max-width: 980px) {
	.wiser-webinar-page {
		--wiser-webinar-featured-width: 90%;
		--wiser-webinar-hero-size: 20px;
	}

	.wiser-webinar-grid {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* Phone (Divi: max-width 767px) ----------------------------------------- */
@media (max-width: 767px) {
	.wiser-webinar-hero {
		padding: 18px 0;
	}

	.wiser-webinar-section--past {
		padding-bottom: 10px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.wiser-webinar-card,
	.wiser-webinar-play__icon {
		transition: none;
	}
}
