/**
 * Reusable components (v3.3): section wrapper, news cards, video player + cards, readings
 * card, subscribe card, Mass times. One layout breakpoint: 767px.
 */

/* ---------- Layout helpers ---------- */
.naggulu-wrap {
	max-width: var(--naggulu-wrap);
	margin-left: auto;
	margin-right: auto;
	padding-left: var(--naggulu-gutter);
	padding-right: var(--naggulu-gutter);
	box-sizing: border-box;
}

.naggulu-wrap > * {
	margin-top: 0;
}

.naggulu-editor-note {
	padding: 16px;
	border: 1px dashed var(--naggulu-muted);
	color: var(--naggulu-muted);
	font-size: 14px;
}

/* Eyebrow written as a paragraph in page content. */
p.naggulu-eyebrow,
.entry-content p.naggulu-eyebrow {
	display: flex;
	margin: 0 0 14px;
}

.naggulu-on-teal .naggulu-eyebrow {
	color: #fff;
}

.naggulu-btn svg,
.wp-block-button__link svg {
	width: 18px;
	height: 18px;
	flex: none;
}

/* ---------- News cards ---------- */
.naggulu-news__head {
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
	justify-content: space-between;
	align-items: flex-end;
	margin-bottom: 32px;
}

.entry-content .naggulu-news__title {
	margin: 0;
}

.entry-content .naggulu-nx__body > *,
.entry-content .naggulu-vc__b > *,
.entry-content .naggulu-fv__text > *,
.entry-content .naggulu-sub__body > *,
.entry-content .naggulu-latest__head > *,
.entry-content .naggulu-readings > * {
	margin-top: 0;
	margin-bottom: 0;
}

.naggulu-news__all {
	padding-bottom: 3px;
	border-bottom: 2px solid var(--naggulu-gold);
	color: var(--naggulu-teal-dark);
	font-weight: 700;
	text-decoration: none;
}

.naggulu-news__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 24px;
	align-items: stretch;
}

.naggulu-nx {
	display: flex;
	flex-direction: column;
	position: relative;
	height: 100%;
	border-radius: 16px;
}

.naggulu-nx:hover,
.naggulu-nx:focus-within {
	box-shadow: var(--naggulu-shadow);
	transform: translateY(-4px);
}

.naggulu-nx__img {
	position: relative;
	aspect-ratio: 16 / 10;
	overflow: hidden;
	background: var(--naggulu-teal-dark);
}

.naggulu-nx__img img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: 50% 20%;
}

.naggulu-nx__cat {
	position: absolute;
	top: 16px;
	left: 16px;
	padding: 6px 10px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.95);
	color: var(--naggulu-teal-dark);
	font: 700 11px/1.2 var(--naggulu-font-body);
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.naggulu-nx__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 8px;
	padding: 24px;
}

.naggulu-nx__date {
	margin: 0;
	color: var(--naggulu-teal-dark);
	font: 600 12px/1.4 var(--naggulu-font-body);
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.naggulu-nx__title {
	display: -webkit-box;
	min-height: 2.6em;
	margin: 0;
	overflow: hidden;
	font-size: 19px;
	line-height: 1.3;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}

.naggulu-nx__title a {
	color: var(--naggulu-charcoal);
	text-decoration: none;
}

/* Whole card is clickable; the title link is the one accessible link. */
.naggulu-nx__title a::after {
	content: "";
	position: absolute;
	inset: 0;
}

.naggulu-nx__excerpt {
	display: -webkit-box;
	min-height: 4.8em;
	margin: 0;
	overflow: hidden;
	color: var(--naggulu-muted);
	font-size: 14.5px;
	line-height: 1.6;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
}

.naggulu-nx__foot {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 8px;
	margin-top: auto;
	padding-top: 16px;
	border-top: 1px solid var(--naggulu-line);
}

.naggulu-nx__by {
	flex: 1 1 0;
	min-width: 0;
	color: var(--naggulu-muted);
	font-size: 12.5px;
	font-weight: 500;
	line-height: 1.4;
}

.naggulu-nx__more {
	flex: none;
	color: var(--naggulu-teal-dark);
	font-weight: 700;
	font-size: 14.5px;
	text-decoration: none;
}

/* ---------- Featured video ---------- */
.naggulu-fv {
	display: grid;
	grid-template-columns: 1.5fr 1fr;
	gap: 48px;
	align-items: center;
}

.naggulu-player {
	position: relative;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	border-radius: 20px;
	background: #000;
	box-shadow: var(--naggulu-shadow);
}

.naggulu-player iframe,
.naggulu-player .naggulu-player__btn,
.naggulu-player img {
	display: block;
	width: 100%;
	height: 100%;
	border: 0;
}

.naggulu-player .naggulu-player__btn {
	position: relative;
	padding: 0;
	border-radius: 0;
	background: #000;
	color: inherit;
	text-decoration: none;
	cursor: pointer;
}

.naggulu-player img {
	object-fit: cover;
}

.naggulu-player__play {
	position: absolute;
	top: 50%;
	left: 50%;
	display: grid;
	place-items: center;
	width: 84px;
	height: 58px;
	border-radius: 16px;
	background: #d4201b;
	color: #fff;
	transform: translate(-50%, -50%);
}

.naggulu-player__play svg {
	width: 28px;
	height: 28px;
}

.naggulu-player .naggulu-player__btn:focus-visible {
	outline: 3px solid var(--naggulu-teal-dark);
	outline-offset: -6px;
}

.entry-content .naggulu-fv__title {
	margin: 8px 0 12px;
	font-size: 34px;
}

.entry-content .naggulu-fv__meta {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 20px;
	color: var(--naggulu-muted);
	font-weight: 600;
}

.naggulu-fv__meta svg {
	width: 20px;
	height: 20px;
	color: #d4201b;
}

/* ---------- Latest uploads ---------- */
.naggulu-latest {
	margin-top: 56px;
}

.naggulu-latest__head {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	justify-content: space-between;
	align-items: flex-end;
	margin-bottom: 24px;
}

.entry-content .naggulu-latest__title {
	margin: 12px 0 0;
	font-size: 28px;
}

.naggulu-feedtag {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	padding: 7px 12px;
	border-radius: 8px;
	background: var(--naggulu-on-teal);
	color: var(--naggulu-teal-dark);
	font: 700 11px/1.3 var(--naggulu-font-body);
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.naggulu-feedtag svg {
	width: 14px;
	height: 14px;
}

.naggulu-vrow,
.entry-content ul.naggulu-vrow {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 24px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.naggulu-vc {
	border-radius: 16px;
}

.naggulu-vc > a {
	display: flex;
	flex-direction: column;
	height: 100%;
	color: inherit;
	text-decoration: none;
}

.naggulu-vc__th {
	position: relative;
	display: block;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: #0b1416;
}

.naggulu-vc__th img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.naggulu-vc__pb {
	position: absolute;
	top: 50%;
	left: 50%;
	display: grid;
	place-items: center;
	width: 52px;
	height: 36px;
	border-radius: 10px;
	background: rgba(212, 32, 27, 0.95);
	color: #fff;
	transform: translate(-50%, -50%);
}

.naggulu-vc__pb svg {
	width: 20px;
	height: 20px;
}

.naggulu-vc__du {
	position: absolute;
	right: 8px;
	bottom: 8px;
	padding: 3px 6px;
	border-radius: 6px;
	background: rgba(0, 0, 0, 0.8);
	color: #fff;
	font: 600 12px/1.2 var(--naggulu-font-body);
}

.naggulu-vc__b {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 6px;
	padding: 16px 16px 18px;
}

.naggulu-vc__title {
	display: -webkit-box;
	overflow: hidden;
	color: var(--naggulu-charcoal);
	font: 600 15.5px/1.35 var(--naggulu-font-body);
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}

.naggulu-vc small {
	margin-top: auto;
	color: var(--naggulu-muted);
	font-size: 13px;
}

.naggulu-vc:hover,
.naggulu-vc:focus-within {
	box-shadow: var(--naggulu-shadow);
}

/* ---------- Readings card ---------- */
.naggulu-readings {
	position: relative;
	border-radius: 20px;
	box-shadow: var(--naggulu-shadow);
}

.naggulu-readings__day {
	margin: 0;
	padding: 22px 36px 6px;
	color: var(--naggulu-teal-dark);
	font: italic 600 17px/1.4 var(--naggulu-font-heading);
}

.naggulu-readings__list,
.entry-content ul.naggulu-readings__list {
	margin: 0;
	padding: 6px 36px 4px;
	list-style: none;
}

.naggulu-readings__list li {
	display: grid;
	grid-template-columns: clamp(120px, 16vw, 200px) minmax(0, 1fr);
	gap: 2px 20px;
	margin: 0;
	padding: 16px 0;
	border-bottom: 1px solid var(--naggulu-line);
	font-size: 18px;
	line-height: 1.5;
}

.naggulu-readings__label {
	grid-row: span 2;
	color: var(--naggulu-teal-dark);
	font: 700 12.5px/1.9 var(--naggulu-font-body);
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.naggulu-readings__src {
	color: var(--naggulu-charcoal);
	font-weight: 700;
}

.naggulu-readings__list em {
	color: var(--naggulu-muted);
	font-family: var(--naggulu-font-heading);
	font-size: 18px;
}

.naggulu-readings__more {
	margin: 0;
	padding: 12px 36px 0;
}

.naggulu-readings__foot {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	align-items: center;
	padding: 22px 36px 8px;
}

.naggulu-readings__copy {
	margin: 0;
	padding: 6px 36px 22px;
	color: var(--naggulu-muted);
	font-size: 12.5px;
	line-height: 1.5;
}

.naggulu-readings__fallback {
	margin: 0;
	padding: 28px 36px;
	font-size: 18px;
}

/* ---------- Subscribe card ---------- */
.naggulu-sub {
	display: grid;
	grid-template-columns: clamp(220px, 34%, 440px) minmax(0, 1fr);
	border-radius: 24px;
	box-shadow: var(--naggulu-shadow);
}

.naggulu-sub--noimg {
	grid-template-columns: 1fr;
}

.naggulu-sub__img {
	display: grid;
	place-items: center;
	min-height: 330px;
	/* Teal (#049e9e, large areas) so the photo panel contrasts with the cream page.
	   No text sits on this panel; the form stays on the white card body. */
	background: var(--naggulu-teal);
}

.naggulu-sub__img img {
	display: block;
	width: 212px;
	height: 159px;
	object-fit: contain;
}

.naggulu-sub__body {
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: 48px clamp(28px, 4vw, 56px);
}

.entry-content .naggulu-sub__title {
	margin: 0 0 20px;
	font-size: clamp(25px, 2.6vw, 32px);
}

.naggulu-sub__form {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	max-width: 520px;
}

/* Email field + Subscribe button: one single-line pill pair, both exactly 50px tall.
   Heights are explicit so neither flex stretch (row) nor the 220px flex-basis (column, mobile)
   can size them; 16px text stops iOS Safari zooming on focus. */
.naggulu-sub__form input[type="email"] {
	flex: 1 1 220px;
	box-sizing: border-box;
	min-width: 0;
	height: 50px;
	min-height: 0;
	margin: 0;
	padding: 0 22px;
	border-radius: 999px;
	font-size: 16px;
	line-height: 1.25;
	-webkit-appearance: none;
	appearance: none;
}

/* Vertical padding comes from global.css `.entry-content button[type="submit"]`
   (0,2,1), which beats this two-class rule; leaving it off keeps that rendering. */
.naggulu-sub__form .naggulu-btn {
	flex: 0 0 auto;
	box-sizing: border-box;
	height: 50px;
	min-height: 0;
	margin: 0;
}

.naggulu-hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.entry-content .naggulu-sub__ts {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 14px 0 0;
	color: var(--naggulu-muted);
	font-size: 13px;
}

.naggulu-sub__ts svg {
	width: 16px;
	height: 16px;
	color: var(--naggulu-teal-dark);
}

/* Subscribe status (03b items 11–12: success #1f4d37 on #e8f2ec 8.43:1; error #7a2323 on #f7e9e9 8.50:1). */
.entry-content .naggulu-sub__msg {
	max-width: 520px;
	margin: 14px 0 0;
	padding: 10px 14px;
	border-radius: 12px;
	font-size: 15px;
	font-weight: 600;
}

.naggulu-sub__msg--ok {
	background: #e8f2ec;
	color: #1f4d37;
}

.naggulu-sub__msg--err {
	background: #f7e9e9;
	color: #7a2323;
}

/* "Stop receiving the Weekly Parishioner": collapsed, quiet, under the subscribe form. */
.entry-content .naggulu-stop {
	max-width: 520px;
	margin: 14px 0 0;
	font-size: 14px;
}

.naggulu-stop summary {
	cursor: pointer;
	color: var(--naggulu-teal-dark);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.naggulu-stop__form {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
	margin-top: 10px;
}

.naggulu-stop__form label {
	flex: 1 0 100%;
	font-weight: 600;
}

.naggulu-stop__form input[type="email"] {
	flex: 1 1 220px;
	min-width: 0;
	height: 44px;
	padding: 0 12px;
	border: 1px solid #c9c9c9;
	border-radius: 8px;
	font-size: 15px;
}

.entry-content .naggulu-stop__form .naggulu-btn--quiet {
	flex: 0 0 auto;
	background: transparent;
	color: var(--naggulu-teal-dark);
	border: 1px solid currentColor;
	padding: 10px 14px;
	font-size: 14px;
}

.entry-content .naggulu-stop__msg {
	margin: 10px 0 0;
	padding: 8px 12px;
	border-radius: 10px;
	font-weight: 600;
}

/* ---------- Mobile (<= 767px) ---------- */
@media (max-width: 767px) {

	.naggulu-news__grid,
	.naggulu-fv {
		grid-template-columns: 1fr;
	}

	.naggulu-fv {
		gap: 24px;
	}

	.entry-content .naggulu-fv__title {
		font-size: 25px;
	}

	.entry-content .naggulu-latest__title {
		font-size: 23px;
	}

	.naggulu-vrow,
	.entry-content ul.naggulu-vrow {
		grid-template-columns: 1fr 1fr;
		gap: 14px;
	}

	.naggulu-vc__b {
		padding: 12px;
	}

	.naggulu-vc__title {
		font-size: 14px;
	}

	.naggulu-readings__day {
		padding: 18px 20px 4px;
	}

	.naggulu-readings__list,
	.entry-content ul.naggulu-readings__list {
		padding: 4px 20px;
	}

	.naggulu-readings__list li {
		grid-template-columns: 1fr;
	}

	.naggulu-readings__label {
		grid-row: auto;
	}

	.naggulu-readings__foot {
		padding: 18px 20px 6px;
	}

	.naggulu-readings__foot .naggulu-btn {
		width: 100%;
	}

	.naggulu-readings__copy,
	.naggulu-readings__more {
		padding-left: 20px;
		padding-right: 20px;
	}

	.naggulu-readings__fallback {
		padding: 22px 20px;
	}

	.naggulu-sub {
		grid-template-columns: 1fr;
	}

	.naggulu-sub__img {
		min-height: 220px;
	}

	.naggulu-sub__body {
		padding: 28px 22px;
	}

	.entry-content .naggulu-sub__title {
		font-size: 25px;
	}

	.naggulu-sub__form {
		flex-direction: column;
	}

	/* In a column the 220px flex-basis became the field's height (the ~220px oval on phones). */
	.naggulu-sub__form input[type="email"] {
		flex: 0 0 auto;
	}
}

/* Card links: the global underlined content-link style doesn't apply inside cards. */
.entry-content .naggulu-card a:not(.wp-block-button__link):not(.naggulu-btn):not(.naggulu-donate),
.entry-content a.naggulu-news__all:not(.wp-block-button__link):not(.naggulu-btn):not(.naggulu-donate) {
	text-decoration: none;
}

.entry-content .naggulu-nx__title a:not(.wp-block-button__link):not(.naggulu-btn):not(.naggulu-donate),
.entry-content .naggulu-qlc h3 a:not(.wp-block-button__link):not(.naggulu-btn):not(.naggulu-donate),
.entry-content .naggulu-vc > a:not(.wp-block-button__link):not(.naggulu-btn):not(.naggulu-donate) {
	color: var(--naggulu-charcoal);
}

.entry-content .naggulu-nx__more:not(.wp-block-button__link):not(.naggulu-btn):not(.naggulu-donate),
.entry-content .naggulu-ssc__text a:not(.wp-block-button__link):not(.naggulu-btn):not(.naggulu-donate),
.entry-content a.naggulu-news__all:not(.wp-block-button__link):not(.naggulu-btn):not(.naggulu-donate) {
	color: var(--naggulu-teal-dark);
}

.entry-content .naggulu-card a:not(.wp-block-button__link):not(.naggulu-btn):not(.naggulu-donate):hover {
	color: var(--naggulu-teal-dark);
	text-decoration: underline;
	text-decoration-thickness: 2px;
}

/* News – empty state (no posts yet): heading, pill and View all link only. */
.entry-content .naggulu-news__empty {
	margin: 0;
}

.naggulu-nx__cat.naggulu-nx__cat--static {
	position: static;
	display: inline-block;
	background: var(--naggulu-on-teal);
}

/* ---- AI illustrations (M6): caption on single posts ---- */

/* Single post: the hero image with its caption directly under it (no overlap by the content card). */
.naggulu-ai-figure {
	margin: 0 0 var(--global-md-spacing, 2rem);
}

.naggulu-ai-figure > .kadence-thumbnail-position-behind {
	margin-bottom: 0;
}

.naggulu-ai-figure + .entry {
	position: relative;
	z-index: 1;
}

.naggulu-ai-caption {
	margin-top: 8px;
	margin-bottom: 0;
	font: italic 400 14px/1.45 var(--naggulu-font-body);
	color: var(--naggulu-muted);
}

/* Up to 1024px the hero image runs edge to edge; keep the caption text off the screen edge. */
@media (max-width: 1024px) {
	.naggulu-ai-caption {
		padding-inline: var(--global-content-edge-padding, 1.5rem);
	}
}
