/* Catholic News Feed – sliding cards, 2 per view (1 on phones) */
.cnf {
	--cnf-green: #008F4C;
	--cnf-green-dark: #006B39;
	--cnf-gap: 20px;
	--cnf-per-view: 2;
	position: relative;
	width: 100%;
}

.cnf__track {
	display: flex;
	gap: var(--cnf-gap);
	overflow-x: auto;
	overscroll-behavior-x: contain;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
	padding: 6px 4px 16px;
	margin: 0 -4px;
	outline: none;
}
.cnf__track::-webkit-scrollbar { display: none; }

.cnf-card {
	flex: 0 0 calc((100% - (var(--cnf-per-view) - 1) * var(--cnf-gap)) / var(--cnf-per-view));
	min-width: 0;
	scroll-snap-align: start;
	display: flex;
	flex-direction: column;
	background: #fff;
	border-radius: 14px;
	overflow: hidden;
	box-shadow: 0 6px 20px rgba(20, 45, 30, .08);
	transition: transform .3s ease, box-shadow .3s ease;
}
.cnf-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 12px 28px rgba(20, 45, 30, .14);
}

/* 16:9 frame on the wrapper – reliable in iPhone Safari */
.cnf-card__img {
	position: relative;
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: #e6efe9;
	flex-shrink: 0;
}
.cnf-card__img img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	transition: transform .6s ease;
}
.cnf-card:hover .cnf-card__img img { transform: scale(1.04); }

.cnf-card__tag {
	position: absolute;
	top: 12px;
	left: 12px;
	padding: 4px 11px;
	border-radius: 999px;
	background: var(--cnf-green);
	color: #fff;
	font: 600 11px/1.4 "Raleway", "Roboto", sans-serif;
	letter-spacing: .08em;
	text-transform: uppercase;
	box-shadow: 0 2px 8px rgba(0, 0, 0, .2);
}

.cnf-card__body {
	display: flex;
	flex-direction: column;
	flex: 1;
	gap: 8px;
	padding: 16px 18px 18px;
}
.cnf-card__date {
	font: 500 12px/1.4 "Roboto", sans-serif;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: #76767f;
}
.cnf-card__title {
	margin: 0;
	font: 600 16px/1.4 "Poppins", sans-serif;
	color: #26262c;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.cnf-card__title a { color: inherit; text-decoration: none; }
.cnf-card__title a:hover { color: var(--cnf-green); }
.cnf-card__excerpt {
	margin: 0;
	font: 400 14px/1.6 "Roboto", sans-serif;
	color: #6b6b74;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.cnf-card__more {
	margin-top: auto;
	align-self: flex-start;
	padding-top: 6px;
	font: 700 14px/1.4 "Raleway", sans-serif;
	color: var(--cnf-green);
	text-decoration: none;
}
.cnf-card__more span { display: inline-block; transition: transform .2s ease; }
.cnf-card__more:hover span { transform: translateX(4px); }

/* Navigation */
.cnf__nav {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 14px;
	margin-top: 6px;
}
.cnf__arrow {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	padding: 0;
	border: 2px solid var(--cnf-green);
	border-radius: 50%;
	background: #fff;
	color: var(--cnf-green);
	cursor: pointer;
	transition: background-color .2s ease, color .2s ease, transform .2s ease;
}
.cnf__arrow svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.cnf__arrow:hover, .cnf__arrow:focus-visible { background: var(--cnf-green); color: #fff; transform: scale(1.06); }
.cnf__arrow[disabled] { opacity: .35; cursor: default; transform: none; }

.cnf__dots { display: flex; gap: 7px; align-items: center; }
.cnf__dot {
	width: 9px;
	height: 9px;
	padding: 0;
	border: 0;
	border-radius: 9px;
	background: #c7cfc9;
	cursor: pointer;
	transition: width .3s ease, background-color .3s ease;
}
.cnf__dot[aria-selected="true"] { width: 26px; background: var(--cnf-green); }

.cnf__credit {
	margin: 10px 0 0;
	text-align: right;
	font: 400 12px/1.4 "Roboto", sans-serif;
	color: #8a8a93;
}
.cnf__credit a { color: var(--cnf-green); text-decoration: none; font-weight: 600; }

.cnf__empty { margin: 0; padding: 24px; color: #6b6b74; }

/* Lock text sizes so theme heading styles can't override the cards */
.cnf .cnf-card__title,
.cnf .cnf-card__title a { font-family: "Poppins", sans-serif !important; font-size: 16px !important; font-weight: 600 !important; line-height: 1.4 !important; letter-spacing: 0 !important; text-transform: none !important; }
.cnf .cnf-card__excerpt { font-size: 14px !important; line-height: 1.6 !important; }
.cnf .cnf-card__date { font-size: 12px !important; }
@media (max-width: 767px) {
	.cnf .cnf-card__title,
	.cnf .cnf-card__title a { font-size: 15px !important; }
}

@media (max-width: 767px) {
	.cnf { --cnf-per-view: 1; --cnf-gap: 14px; }
	.cnf__credit { text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
	.cnf__track { scroll-behavior: auto; }
	.cnf-card, .cnf-card__img img { transition: none; }
}
