/**
 * Homepage: Latest Sermons
 */

.ciywr-sermons {
	width: 100%;
	margin: 0;
	padding: 0;
	background: #f7f6f4;
	font-family: var(--ciywr-font-sans, "Source Sans 3", Verdana, Geneva, sans-serif);
	box-sizing: border-box;
	color: #1a1a1a;
}

.ciywr-sermons *,
.ciywr-sermons *::before,
.ciywr-sermons *::after {
	box-sizing: border-box;
}

.ciywr-sermons__inner {
	max-width: 1140px;
	margin: 0 auto;
	padding: 64px 28px 72px;
}

.ciywr-sermons__header {
	text-align: center;
	margin: 0 0 40px;
}

.ciywr-sermons__title {
	margin: 0;
	padding: 0;
	font-family: inherit;
	font-size: clamp(28px, 3.4vw, 38px);
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: 0.01em;
	color: #1a1a1a;
}

.ciywr-sermons__title::after {
	content: "";
	display: block;
	width: 56px;
	height: 3px;
	margin: 16px auto 0;
	background: #c43c30;
}

.ciywr-sermons__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 28px;
	align-items: stretch;
}

.ciywr-sermons__card {
	display: flex;
	flex-direction: column;
	margin: 0;
	background: #ffffff;
	border: 1px solid rgba(0, 0, 0, 0.06);
	overflow: hidden;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ciywr-sermons__card:hover,
.ciywr-sermons__card:focus-within {
	transform: translateY(-4px);
	box-shadow: 0 16px 36px rgba(0, 0, 0, 0.1);
}

.ciywr-sermons__media {
	position: relative;
	display: block;
	aspect-ratio: 16 / 10;
	overflow: hidden;
	background: #1a1a1a;
	text-decoration: none;
}

.ciywr-sermons__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.35s ease;
}

.ciywr-sermons__img--placeholder {
	background: linear-gradient(135deg, #3a3a3a, #1a1a1a);
}

.ciywr-sermons__card:hover .ciywr-sermons__img {
	transform: scale(1.04);
}

.ciywr-sermons__badge {
	position: absolute;
	top: 14px;
	right: 14px;
	padding: 6px 10px;
	background: #c43c30;
	color: #ffffff;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	line-height: 1;
}

.ciywr-sermons__body {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	padding: 22px 22px 24px;
}

.ciywr-sermons__card-title {
	margin: 0 0 12px;
	padding: 0;
	font-family: inherit;
	font-size: 20px;
	font-weight: 700;
	line-height: 1.3;
}

.ciywr-sermons__card-title a {
	color: #1a1a1a;
	text-decoration: none;
	transition: color 0.18s ease;
}

.ciywr-sermons__card-title a:hover,
.ciywr-sermons__card-title a:focus {
	color: #c43c30;
}

.ciywr-sermons__excerpt {
	margin: 0 0 18px;
	padding: 0;
	font-size: 14px;
	font-weight: 400;
	line-height: 1.65;
	color: #5c616c;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.ciywr-sermons__more {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-top: auto;
	padding-top: 4px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	text-decoration: none;
	color: #c43c30;
	transition: gap 0.18s ease, color 0.18s ease;
}

.ciywr-sermons__more:hover,
.ciywr-sermons__more:focus {
	color: #a83228;
	gap: 12px;
}

.ciywr-sermons__empty {
	text-align: center;
	color: #5c616c;
}

/* Hide original Elementor sermons section if filter misses */
.elementor-element-3aff8acc {
	display: none !important;
}

@media (max-width: 1024px) {
	.ciywr-sermons__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 700px) {
	.ciywr-sermons__inner {
		padding: 48px 18px 56px;
	}

	.ciywr-sermons__header {
		margin-bottom: 28px;
	}

	.ciywr-sermons__grid {
		grid-template-columns: 1fr;
		gap: 22px;
	}

	.ciywr-sermons__card-title {
		font-size: 18px;
	}
}
