/*
 * Home sunset hero (Cover block with class "stj-heroSunset"), Oct 23, 2026.
 * Desktop and landscape tablet: full-width photo (the taller 1.733:1 crop, 8590) with the text
 * top-left in the open sky above the church and a forest-green fade from the top-left corner behind it.
 * The photo is anchored to its bottom edge so the entrance and plaza never crop; extra width crops sky.
 * The hero's height grows with the width so there's always room for the text above the roofline
 * (roof ≈ 60% down the photo at the text's right edge, cross ≈ 28%).
 * Stacked (phones, and portrait or near-square windows up to 1279px, which don't have enough sky
 * beside the church): the 4:3 phone crop on top, the text below it on forest green.
 * The <picture> element comes from stjhc-site.php (STJHC_HERO_STACKED matches the query below).
 */
.stj-heroSunset {
	--stj-forest: #142d1e;
	--stj-hero-gold: #e3c98a;
	--stj-hero-rule: #c9a75a;
}

.stj-heroSunset.wp-block-cover {
	/* tied to the width, not the window height: the roofline sits 0.577 × width × 0.4 above the
	   bottom-anchored photo's bottom edge, so 23.1vw + 440px leaves ~440px of sky for the text; 43vw keeps
	   the cross in view on ultrawide screens. Short wide windows scroll a little rather than crop the church. */
	min-height: max(720px, calc(23.1vw + 440px), 43vw);
	padding: 0 !important;
	align-items: flex-start;
	background: var(--stj-forest);
	overflow: hidden;
}
.stj-heroSunset .stj-hero-picture { display: contents; }
.stj-heroSunset.wp-block-cover img.wp-block-cover__image-background {
	object-fit: cover;
	object-position: 80% 100%; /* bottom-anchored: only sky crops on wide screens; narrower boxes crop the left wing first, never the tower */
}
.stj-heroSunset .wp-block-cover__background {
	opacity: 1 !important;
	background:
		/* soft bottom-right corner, so the parked cars by the trees recede (interim, until the retouched photo) */
		radial-gradient(ellipse 38% 45% at 100% 100%, rgba(10, 22, 15, .32) 0%, rgba(10, 22, 15, .14) 55%, rgba(10, 22, 15, 0) 100%),
		/* forest green from the top-left corner, behind the text in the sky; fades out before the tower and roof */
		radial-gradient(ellipse 66% 92% at 0% 0%,
			rgba(20, 45, 30, .92) 0%,
			rgba(20, 45, 30, .88) 36%,
			rgba(20, 45, 30, .68) 58%,
			rgba(20, 45, 30, .26) 80%,
			rgba(20, 45, 30, 0) 100%) !important;
}
.stj-heroSunset .wp-block-cover__inner-container {
	/* pinned to the left edge of the screen (not the content column), over the darkest part of the fade */
	width: 100%;
	max-width: none;
	margin: 0;
	padding: clamp(40px, 3.5vw, 88px) 1.5rem 3rem clamp(48px, 6vw, 140px);
	color: #fff;
}
.stj-heroSunset .wp-block-cover__inner-container > * { max-width: 36rem; }

/* Thin gold rule + WELCOME HOME */
.stj-heroSunset .stj-kicker {
	color: var(--stj-hero-gold);
	font-size: .8rem;
	font-weight: 600;
	letter-spacing: .26em;
	margin: 0 0 1rem;
	opacity: 1;
}
.stj-heroSunset .stj-kicker::before {
	width: 2.75rem;
	height: 1px;
	background: var(--stj-hero-rule);
	margin-bottom: 1.1rem;
}

.stj-heroSunset h1 {
	font-family: var(--stj-font-serif);
	font-weight: 500;
	font-size: clamp(3rem, 3.4vw + 1.2rem, 4.75rem);
	line-height: 1.02;
	letter-spacing: -.005em;
	color: #fff;
	max-width: 7em; /* "St. Joseph / Catholic Church" */
	margin: 0 0 .9rem;
	text-wrap: balance;
	text-shadow: 0 1px 18px rgba(10, 22, 15, .35);
}
.stj-heroSunset .stj-hero-place {
	font-family: var(--stj-font-serif);
	font-weight: 500;
	font-size: clamp(1.3rem, .6vw + 1rem, 1.6rem);
	line-height: 1.3;
	color: #fff;
	margin: 0 0 2.4rem;
	text-shadow: 0 1px 12px rgba(10, 22, 15, .35);
}

.stj-heroSunset .wp-block-buttons { gap: 1rem; }
.stj-heroSunset .wp-block-buttons > .wp-block-button > .wp-block-button__link {
	padding: .85rem 1.85rem;
	font-weight: 600;
	letter-spacing: .01em;
	transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.stj-heroSunset .wp-block-button:not(.is-style-outline) > .wp-block-button__link {
	background: var(--global-palette1, #295038);
	color: #fff;
	border: 1.5px solid #4a7d5e; /* a lighter green edge, so the button reads against the dark overlay */
}
.stj-heroSunset .wp-block-button:not(.is-style-outline) > .wp-block-button__link:hover,
.stj-heroSunset .wp-block-button:not(.is-style-outline) > .wp-block-button__link:focus-visible {
	background: var(--global-palette2, #1D3B29);
	border-color: #fff;
}
.stj-heroSunset .wp-block-button.is-style-outline > .wp-block-button__link {
	border: 1.5px solid rgba(255, 255, 255, .9);
	color: #fff;
	background: rgba(20, 45, 30, .55); /* a translucent green fill, so the white label keeps AA contrast where the fade thins out over the sunset */
}
.stj-heroSunset .wp-block-button.is-style-outline > .wp-block-button__link:hover,
.stj-heroSunset .wp-block-button.is-style-outline > .wp-block-button__link:focus-visible {
	background: #fff;
	color: var(--global-palette1, #295038);
}
.stj-heroSunset .wp-block-button__link:focus-visible {
	outline: 2px solid var(--stj-hero-gold);
	outline-offset: 3px;
}

/* Landscape tablets: smaller type, a shorter hero (same sky rule with the smaller text), a wider fade */
@media (min-width: 768px) and (max-width: 1099px) {
	.stj-heroSunset.wp-block-cover { min-height: max(600px, calc(23.1vw + 380px)); }
	.stj-heroSunset .wp-block-cover__inner-container { padding-left: 40px; padding-top: 36px; }
	.stj-heroSunset .wp-block-cover__background {
		background:
			radial-gradient(ellipse 38% 45% at 100% 100%, rgba(10, 22, 15, .32) 0%, rgba(10, 22, 15, .14) 55%, rgba(10, 22, 15, 0) 100%),
			radial-gradient(ellipse 74% 95% at 0% 0%,
			rgba(20, 45, 30, .92) 0%,
			rgba(20, 45, 30, .88) 40%,
			rgba(20, 45, 30, .68) 62%,
			rgba(20, 45, 30, .26) 82%,
			rgba(20, 45, 30, 0) 100%) !important;
	}
	.stj-heroSunset .wp-block-cover__inner-container > * { max-width: 27rem; }
	.stj-heroSunset h1 { font-size: clamp(2.6rem, 4vw + .6rem, 3.4rem); }
	.stj-heroSunset .stj-hero-place { font-size: 1.25rem; margin-bottom: 2rem; }
	.stj-heroSunset .wp-block-buttons > .wp-block-button > .wp-block-button__link { padding: .75rem 1.4rem; }
}

/* Stacked (phones, and portrait or near-square windows up to 1279px): photo on top (4:3, no text on it),
   text below on forest green */
@media (max-width: 767px), (max-width: 1279px) and (max-aspect-ratio: 5/4) {
	.stj-heroSunset.wp-block-cover {
		display: block;
		min-height: 0 !important;
	}
	.stj-heroSunset.wp-block-cover img.wp-block-cover__image-background {
		position: relative;
		inset: auto;
		display: block;
		width: 100%;
		height: auto;
		aspect-ratio: 4 / 3;
		object-position: 50% 50%;
	}
	.stj-heroSunset .wp-block-cover__background { display: none; }
	.stj-heroSunset .wp-block-cover__inner-container {
		padding: 2.75rem 40px 3rem;
		background: var(--stj-forest);
	}
	.stj-heroSunset h1, .stj-heroSunset .stj-hero-place { text-shadow: none; }
}

/* Phones */
@media (max-width: 767px) {
	.stj-heroSunset .wp-block-cover__inner-container { padding: 2.25rem 1.25rem 2.5rem; }
	.stj-heroSunset .wp-block-cover__inner-container > * { max-width: none; }
	.stj-heroSunset .stj-kicker { font-size: .75rem; margin-bottom: .85rem; }
	.stj-heroSunset .stj-kicker::before { margin-bottom: .95rem; }
	.stj-heroSunset h1 { font-size: clamp(2.35rem, 9.5vw, 2.9rem); text-shadow: none; }
	.stj-heroSunset .stj-hero-place { font-size: 1.2rem; margin-bottom: 1.75rem; text-shadow: none; }
	.stj-heroSunset .wp-block-buttons { flex-direction: column; align-items: stretch; gap: .75rem; }
	.stj-heroSunset .wp-block-button { width: 100%; }
	.stj-heroSunset .wp-block-buttons > .wp-block-button > .wp-block-button__link { display: block; width: 100%; text-align: center; padding: .9rem 1.25rem; }
}

/* Visited links: Kadence colors visited outline buttons green (".wp-block-button.is-style-outline .wp-block-button__link:not(.has-text-color):visited"),
   which hid the label once someone had opened that page. Keep hero buttons the same whether visited or not. */
.stj-heroSunset .wp-block-button.is-style-outline > .wp-block-button__link:not(.has-text-color):visited {
	color: #fff;
}
.stj-heroSunset .wp-block-button.is-style-outline > .wp-block-button__link:not(.has-text-color):visited:hover,
.stj-heroSunset .wp-block-button.is-style-outline > .wp-block-button__link:not(.has-text-color):visited:focus-visible {
	color: var(--global-palette1, #295038);
}
.stj-heroSunset .wp-block-button:not(.is-style-outline) > .wp-block-button__link:visited {
	background: var(--global-palette1, #295038);
	color: #fff;
}
.stj-heroSunset .wp-block-button:not(.is-style-outline) > .wp-block-button__link:visited:hover,
.stj-heroSunset .wp-block-button:not(.is-style-outline) > .wp-block-button__link:visited:focus-visible {
	background: var(--global-palette2, #1D3B29);
}

/* Home Our Heritage (.stj-150, CR 2026-10-29, editorial v1): copied from CR's
   overlapping mockup, with the site's own text and buttons. White band; the
   wide chapel photo (media 8795, full-res WebP of CR's hilltop-chapel-revised
   master, Display P3 profile kept in every size) is large on the left, whole
   (natural ratio, no crop, no filter), square corners, with a thin gold line
   above it. A pale panel on the right is centred on the photo and overlaps
   its right edge (trees only, never the chapel). Distinct from Mass Times:
   white background, landscape photo left, panel centred.
   Below 1025px: no overlap; full-width photo, then the panel. */
.stj-section.stj-150 {
	padding-top: clamp(2.5rem, 5vw, 4.5rem) !important;
	padding-bottom: clamp(2.5rem, 5vw, 4.5rem) !important;
}
.stj-150 .stj-split { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; }
.stj-150 .stj-heritage-photo { grid-row: 1; }
.stj-150 .stj-heritage-text { grid-row: 2; }
.stj-150 .stj-photo { position: relative; margin: 0; }
.stj-150 .stj-photo img {
	display: block;
	width: 100%;
	height: auto;
	contain: none; /* WP's lazy-load sizing would otherwise fix the box at 1500px tall */
	object-fit: contain;
	border-radius: 0;
	box-shadow: none;
	border: 0;
	filter: none;
}
.stj-150 .stj-heritage-text {
	background: #F5EFE6; /* warm limestone, ties to the sunset photo (CR 2026-10-29, option A) */
	border: 1px solid #E8E0D3;
	border-top: 0;
	padding: 30px 24px 32px;
}
/* Eyebrow: short gold line before the label (label stays green for contrast). */
.stj-150 .stj-kicker {
	display: flex;
	align-items: center;
	gap: 14px;
	font-size: 11px;
	letter-spacing: .24em;
	margin: 0;
}
.stj-150 .stj-kicker::before { width: 34px; height: 1px; margin: 0; flex: none; }
.stj-150 h2 {
	font-family: var(--stj-font-serif, Georgia, serif);
	font-weight: 500;
	font-size: clamp(2rem, 1.5rem + 1.6vw, 2.75rem);
	line-height: 1.08;
	letter-spacing: -.015em;
	color: var(--global-palette1, #295038);
	margin: 16px 0 26px;
	max-width: 7.6em; /* breaks after "Faith", as in the mockup */
}
/* Buttons: square; the first solid green, the other two quiet outlines; all with a small arrow. */
.stj-150 .wp-block-buttons { gap: 10px; }
.stj-150 .wp-block-button__link,
.stj-150 .wp-block-button__link:visited {
	display: inline-flex;
	align-items: center;
	gap: 14px;
	border-radius: 0;
	font-size: 14px;
	font-weight: 600;
	letter-spacing: .01em;
	padding: 13px 18px;
	white-space: nowrap;
}
.stj-150 .wp-block-button__link::after { content: "\2192"; font-weight: 400; font-size: 17px; line-height: 10px; }
.stj-150 .wp-block-button:not(.is-style-outline) { flex-basis: 100%; }
.stj-150 .wp-block-button > .wp-block-button__link { width: auto; }
.stj-150 .wp-block-button:not(.is-style-outline) > .wp-block-button__link,
.stj-150 .wp-block-button:not(.is-style-outline) > .wp-block-button__link:visited {
	background: var(--global-palette1, #295038);
	border: 1px solid var(--global-palette1, #295038);
	color: #fff;
}
.stj-150 .wp-block-button:not(.is-style-outline) > .wp-block-button__link::after { color: #DFC78A; }
.stj-150 .wp-block-button:not(.is-style-outline) > .wp-block-button__link:hover,
.stj-150 .wp-block-button:not(.is-style-outline) > .wp-block-button__link:focus-visible {
	background: var(--global-palette2, #1D3B29);
	border-color: var(--global-palette2, #1D3B29);
	color: #fff;
}
.stj-150 .wp-block-button.is-style-outline > .wp-block-button__link,
.stj-150 .wp-block-button.is-style-outline > .wp-block-button__link:visited {
	background: #fff;
	border: 1px solid #CDD3CA;
	color: var(--global-palette1, #295038);
	font-size: 13.5px;
	padding: 11px 14px;
}
.stj-150 .wp-block-button.is-style-outline > .wp-block-button__link:hover,
.stj-150 .wp-block-button.is-style-outline > .wp-block-button__link:focus-visible {
	background: #fff;
	border-color: var(--global-palette1, #295038);
	color: var(--global-palette1, #295038);
}
/* Side by side with overlap (1025px and up). Three tracks: the photo spans
   1–2, the panel 2–3, so track 2 is the overlap (~32px, trees only). */
@media (min-width: 1025px) {
	.stj-section.stj-150 > .wp-block-group__inner-container,
	.stj-150 .wp-block-group__inner-container > .stj-split { max-width: 1280px; }
	.stj-150 .stj-split {
		grid-template-columns: minmax(0, 630fr) minmax(0, 32fr) minmax(0, 374fr);
		align-items: center;
		padding-top: 14px;
	}
	.stj-150 .stj-heritage-photo { grid-column: 1 / 3; grid-row: 1; z-index: 1; }
	.stj-150 .stj-heritage-text {
		grid-column: 2 / 4;
		grid-row: 1;
		z-index: 2;
		align-self: center;
		border-top: 1px solid #E8E0D3;
		box-shadow: 0 18px 40px rgba(40, 48, 39, .08);
		padding: 48px;
	}
	.stj-150 .stj-photo::before {
		content: "";
		position: absolute;
		left: 14px;
		top: -12px;
		width: 60%;
		height: 1px;
		background: var(--global-palette15, #AD8B3B);
	}
}
/* 1280px and up, as in CR's mockup: a narrower panel (~425px) that overlaps
   the photo only slightly, ~32px (CR 2026-10-29). The photo + panel unit (max 1251px) is centred,
   so the outer margins are equal (CR 2026-10-29). */
@media (min-width: 1280px) {
	.stj-150 .wp-block-group__inner-container > .stj-split {
		max-width: 1251px;
		margin-left: auto;
		margin-right: auto;
		grid-template-columns: minmax(0, 826fr) minmax(0, 32fr) minmax(0, 393fr);
	}
	.stj-150 .stj-heritage-text { grid-column: 2 / 4; padding: 48px 44px; }
	.stj-150 h2 { font-size: 2.625rem; }
}

/* Home Mass & Confession Times (.stj-mass-section, CR 2026-10-29, v6):
   editorial layout copied from CR's "Refined" concept, with the site's own
   wording. Warm off-white band; the sanctuary photo (media 8798 since 2026-10-30, full-res WebP of
   CR's "DSCF3051 sanctuary final final" master) is large on the right, always whole (natural ratio, no crop,
   no filter), with a short gold rule under it. The schedule sits in a white
   panel on the left that starts lower and slides under the photo; its extra
   right padding keeps text clear of the photo. Everything is scoped to this
   section, so the synced pattern (8236) on /mass-times/ looks as before.
   Phones (< 782px): panel first, full photo below, no overlap, no rule. */
.stj-section.stj-mass-section {
	background: #F7F7F3;
	padding-top: 74px !important;
	padding-bottom: 74px !important;
}
.stj-mass-section .stj-split { gap: 0; }
.stj-mass-section .stj-mass-text {
	background: #fff;
	border: 1px solid #ECECE6;
	box-shadow: 0 15px 35px rgba(40, 48, 39, .055);
	padding: 30px 26px;
	color: #4F5E55;
}
/* Eyebrow: short gold line before the label (label stays green for contrast). */
.stj-mass-section .stj-kicker {
	display: flex;
	align-items: center;
	gap: 14px;
	font-size: 11px;
	letter-spacing: .24em;
	margin: 0;
}
.stj-mass-section .stj-kicker::before { width: 34px; height: 1px; margin: 0; flex: none; }
.stj-mass-section h2 {
	font-family: var(--stj-font-serif, Georgia, serif);
	font-weight: 500;
	font-size: clamp(2.25rem, 1.4rem + 2.6vw, 3.25rem);
	line-height: 1.04;
	letter-spacing: -.02em;
	color: var(--global-palette1, #295038);
	margin: 17px 0 22px;
	padding-bottom: 22px;
	border-bottom: 1px solid #E2E5DC;
}
/* Schedule groups (from the synced pattern): small green subheads, muted text. */
.stj-mass-section .stj-mass h3 {
	font-size: 11px;
	letter-spacing: .19em;
	margin: 0 0 10px;
}
.stj-mass-section .stj-mass ul { margin: 0 0 22px; }
.stj-mass-section .stj-mass ul:last-of-type { margin-bottom: 0; }
.stj-mass-section .stj-mass li { padding: 0; font-size: 15.5px; line-height: 1.5; margin: 0 0 6px; }
.stj-mass-section .stj-mass ul:first-of-type li + li {
	border-top: 1px solid #E8ECE4;
	padding-top: 9px;
	margin-top: 9px;
}
.stj-mass-section .stj-mass h3:nth-of-type(3) {
	border-top: 1px solid #E2E5DC;
	padding-top: 18px;
}
/* Button: square, solid green, small gold arrow. */
.stj-mass-section .wp-block-buttons { margin-top: 28px !important; }
.stj-mass-section .wp-block-button.is-style-outline > .wp-block-button__link,
.stj-mass-section .wp-block-button.is-style-outline > .wp-block-button__link:visited {
	display: inline-flex;
	align-items: center;
	gap: 18px;
	background: var(--global-palette1, #295038);
	border: 0;
	border-radius: 0;
	color: #fff;
	padding: 15px 20px;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: .015em;
}
.stj-mass-section .wp-block-button.is-style-outline > .wp-block-button__link::after {
	content: "\2192";
	font-size: 19px;
	font-weight: 400;
	line-height: 10px;
	color: #DFC78A;
}
.stj-mass-section .wp-block-button.is-style-outline > .wp-block-button__link:hover,
.stj-mass-section .wp-block-button.is-style-outline > .wp-block-button__link:focus-visible {
	background: var(--global-palette2, #1D3B29);
	color: #fff;
}
/* Photo: whole, square corners. */
.stj-mass-section .stj-photo { position: relative; margin: 0; }
.stj-mass-section .stj-photo img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: auto;
	object-fit: contain;
	border-radius: 0;
	box-shadow: none;
	border: 0;
	filter: none;
}
@media (max-width: 781px) {
	.stj-section.stj-mass-section { padding-top: 40px !important; padding-bottom: 60px !important; }
	.stj-mass-section .stj-split { row-gap: 22px; }
	.stj-mass-section .stj-mass-photo .stj-photo { max-width: 520px; margin: 0 auto; }
}
@media (max-width: 450px) {
	.stj-mass-section .stj-mass-text { padding: 28px 22px; }
}
/* Narrower panels (below 1200px): compact button so its text stays on one line. */
@media (max-width: 1199px) {
	.stj-mass-section .wp-block-button.is-style-outline > .wp-block-button__link { gap: 12px; padding: 14px 16px; font-size: 13.5px; white-space: nowrap; }
}
/* Side by side (782px and up): a 3-track grid. The panel spans tracks 1–2,
   the photo tracks 2–3, so track 2 is the overlap. */
@media (min-width: 782px) {
	.stj-mass-section .stj-split {
		display: grid;
		grid-template-columns: minmax(0, 503fr) minmax(0, 147fr) minmax(0, 350fr); /* photo ~50%, a smidgen smaller (CR 2026-10-29, v8) */
		align-items: start;
	}
	.stj-mass-section .stj-mass-text {
		grid-column: 1 / 3;
		grid-row: 1;
		align-self: start;
		z-index: 1;
		margin-top: 48px;
		padding: 36px calc(26% + 28px) 38px 36px;
	}
	.stj-mass-section .stj-mass-photo {
		grid-column: 2 / 4;
		grid-row: 1;
		align-self: start;
		z-index: 2;
	}
	.stj-mass-section .stj-photo::after {
		content: "";
		position: absolute;
		right: 3px;
		bottom: -16px;
		width: 40%;
		height: 1px;
		background: var(--global-palette15, #AD8B3B);
	}
}
/* Desktop (1200px and up): wider than the usual 1140 column, as in the
   concept: panel ~796, photo ~640 (v8, CR 2026-10-29: a smidgen smaller than
   v7's 670), ~126px overlap at 1440; the 1310px unit is centred. Weekend and daily
   Masses side by side; Confession full width with its label on the left. */
@media (min-width: 1200px) {
	.stj-section.stj-mass-section > .wp-block-group__inner-container,
	.stj-mass-section .wp-block-group__inner-container > .stj-split { max-width: 1340px; }
	.stj-mass-section .wp-block-group__inner-container > .stj-split { max-width: 1310px; margin-left: auto; margin-right: auto; }
	.stj-mass-section .stj-split { grid-template-columns: minmax(0, 670fr) minmax(0, 126fr) minmax(0, 514fr); }
	.stj-mass-section .stj-mass-text { margin-top: 135px; padding: 44px 168px 45px 55px; }
	.stj-mass-section .stj-mass > .wp-block-group__inner-container {
		display: grid;
		grid-template-columns: 104px minmax(0, 1fr) minmax(0, 1.4fr);
		column-gap: 28px;
	}
	.stj-mass-section .stj-mass h3:nth-of-type(1) { grid-column: 1 / 3; grid-row: 1; }
	.stj-mass-section .stj-mass ul:nth-of-type(1) { grid-column: 1 / 3; grid-row: 2; }
	.stj-mass-section .stj-mass h3:nth-of-type(2) { grid-column: 3; grid-row: 1; }
	.stj-mass-section .stj-mass ul:nth-of-type(2) { grid-column: 3; grid-row: 2; }
	.stj-mass-section .stj-mass h3:nth-of-type(3) { grid-column: 1; grid-row: 3; margin-top: 0; padding-top: 22px; border-top: 0; }
	.stj-mass-section .stj-mass ul:nth-of-type(3) { grid-column: 2 / 4; grid-row: 3; padding-top: 18px; }
	.stj-mass-section .stj-mass ul:nth-of-type(3) li { font-size: 15px; }
	/* One divider across the whole Confession row. */
	.stj-mass-section .stj-mass > .wp-block-group__inner-container::after {
		content: "";
		grid-column: 1 / -1;
		grid-row: 3;
		align-self: start;
		border-top: 1px solid #E2E5DC;
	}
}


