/* ============================================================
   blocks.css — maps site.css component styles onto the markup
   that core blocks generate. This is the "adaptation layer"
   discussed in the block-theme plan; site.css stays authoritative.
   ============================================================ */

/* Core's own block-margin resets are stripped from the global stylesheet in
   functions.php, so site.css's component margins (e.g. .season-card) apply to
   Group blocks exactly as they do in the static design — nothing to neutralize
   here any more. */

/* ---- img-hero built as a core Cover block ---- */
.wp-block-cover.img-hero {
	min-height: 0;
	padding: 0;
	align-items: stretch;
	justify-content: flex-start;
}
/* Overlay is handled by Cover's native dim (overlayColor:foreground, dimRatio:60). */
.wp-block-cover.img-hero .wp-block-cover__inner-container {   /* = .container.img-hero-content */
	position: relative;
	z-index: 2;
	width: 100%;
	max-width: var(--container-max, 1200px);
	margin-inline: auto;
	padding: 5rem 1.5rem;
	text-align: center;
	color: hsl(var(--primary-foreground));
}
@media (min-width: 768px) {
	.wp-block-cover.img-hero .wp-block-cover__inner-container { padding: 8rem 1.5rem; }
}
/* Worship variant hero: deeper vertical padding (matches .img-hero--worship). */
.wp-block-cover.img-hero.img-hero--worship .wp-block-cover__inner-container { padding: 5rem 1.5rem 8rem; }
@media (min-width: 768px) {
	.wp-block-cover.img-hero.img-hero--worship .wp-block-cover__inner-container { padding: 8rem 1.5rem 10rem; }
}
.wp-block-cover.img-hero h1 {
	font-family: "Cormorant Garamond", Garamond, Georgia, serif;
	font-size: clamp(2.25rem, 6vw, 3.75rem);
	font-weight: 600;
	line-height: 1.15;
	margin-bottom: 1rem;
}
.wp-block-cover.img-hero p {
	color: hsl(var(--primary-foreground) / 0.85);
	font-size: 1.125rem;
	max-width: 42rem;
	margin: 0 auto;
}
.wp-block-cover.img-hero .img-hero-icon { margin: 0 auto 1rem; display: block; opacity: 0.85; }
.wp-block-cover.img-hero .hero-citation {
	font-size: 0.875rem;
	color: hsl(var(--primary-foreground) / 0.6);
	margin-top: 0.5rem;
}

/* Core Buttons block styled as the site's light CTA button (.btn-light) */
.wp-block-button.is-style-light .wp-block-button__link {
	background: hsl(var(--primary-foreground));
	color: hsl(var(--primary));
	border-radius: 0;
	padding: 0.625rem 1.5rem;
	font-size: 0.8125rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	font-weight: 600;
}
.wp-block-button.is-style-light .wp-block-button__link:hover {
	background: hsl(var(--primary-foreground) / 0.9);
}

/* Small labels (.badge, .event-when) were <span>s in the static markup and are
   Paragraph blocks now so they can be edited. As <p> they fall into site.css's
   card rules (`.detail-card__body p`, `.ruled-item p`), which set a bigger type
   scale — re-assert the label's own scale. blocks.css loads after site.css, so
   these win the specificity tie. */
:root p.badge { font-size: 0.625rem; line-height: normal; color: hsl(var(--primary)); }
:root p.badge.badge--accent { color: hsl(var(--accent-text)); }
:root p.event-when { font-size: 0.7rem; line-height: normal; color: hsl(var(--accent-text)); }

/* Core Buttons block styled as the site's .btn-primary / .btn-outline. The
   selectors outweigh core's `:root :where(.wp-element-button)` defaults. */
.wp-block-button.is-style-primary .wp-block-button__link {
	background: hsl(var(--primary));
	color: hsl(var(--primary-foreground));
	border-radius: 0;
	padding: 0.75rem 2rem;
	font-size: 0.8125rem;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	font-weight: 600;
}
.wp-block-button.is-style-primary .wp-block-button__link:hover {
	background: hsl(var(--primary) / 0.9);
}
/* Secondary button for light sections: the maroon outline reads at 7.9:1 on
   the cream and tinted grounds, where is-style-outline (cream on cream) is
   invisible. */
.wp-block-button.is-style-outline-light .wp-block-button__link {
	background: transparent;
	border: 1px solid hsl(var(--primary) / 0.5);
	color: hsl(var(--primary));
	border-radius: 0;
	padding: 0.75rem 2rem;
	font-size: 0.8125rem;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	font-weight: 600;
}
.wp-block-button.is-style-outline-light .wp-block-button__link:hover {
	background: hsl(var(--primary) / 0.06);
	border-color: hsl(var(--primary));
}

.wp-block-button.is-style-outline .wp-block-button__link {
	background: transparent;
	border: 1px solid hsl(var(--primary-foreground) / 0.4);
	color: hsl(var(--primary-foreground));
	border-radius: 0;
	padding: 0.75rem 2rem;
	font-size: 0.8125rem;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	font-weight: 600;
}
.wp-block-button.is-style-outline .wp-block-button__link:hover {
	background: hsl(var(--primary-foreground) / 0.1);
}

/* Rows of buttons. theme.json's blockGap of 0 also zeroes the gap core gives a
   Buttons block, so two buttons sat flush against each other (Cemetery's
   "Learn More", About's leadership links). 1rem is the hero buttons' spacing.
   Beside an outline button, a primary one also needs a clear 1px border to be
   the same height; single buttons are left exactly as they were. */
.wp-block-buttons.is-layout-flex { gap: 1rem; }
.wp-block-buttons:has(> .wp-block-button + .wp-block-button) .wp-block-button.is-style-primary .wp-block-button__link {
	border: 1px solid transparent;
}

/* Heading block inside our section-header carries no block margins of its own,
   but must not lose the component margins site.css gives it (.section-title). */
.section-header > .wp-block-heading:not([class*="-title"]) { margin: 0; }

/* ---- Navigation block (header) — match the site's nav design ---- */
.nav-cluster { align-items: center; gap: 0; }
.main-nav.wp-block-navigation { --wp--style--block-gap: 0; }
.main-nav .wp-block-navigation__container { gap: 2rem; align-items: center; }
.main-nav .wp-block-navigation-item__content,
.main-nav .wp-block-navigation-item__content:visited {
	font-size: 0.8125rem; font-weight: 500; color: hsl(var(--muted-foreground));
	letter-spacing: 0.1em; text-transform: uppercase; text-decoration: none;
}
.main-nav .wp-block-navigation-item__content:hover { color: hsl(var(--primary)); }
.main-nav .wp-block-navigation__submenu-icon { margin-left: 0.15rem; }
.main-nav .wp-block-navigation__submenu-container {
	background: hsl(var(--background));
	border: 1px solid hsl(var(--border));
	box-shadow: var(--shadow-lg);
	min-width: 210px; padding: 0.4rem 0;
}
.main-nav .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	padding: 0.55rem 1.1rem; font-size: 0.75rem;
}
.main-nav .wp-block-navigation__submenu-container .wp-block-navigation-item__content:hover {
	background: hsl(var(--secondary) / 0.5); color: hsl(var(--primary));
}
/* mobile hamburger + overlay */
header .wp-block-navigation__responsive-container-open,
header .wp-block-navigation__responsive-container-close { color: hsl(var(--foreground)); }

/* ---- Header search (core Search block, button-only) ----
   A magnifier beside the social links. Core's view script toggles
   .wp-block-search__searchfield-hidden; open, the field drops down as a small
   panel under the icon instead of widening the header, which has no room to
   spare beside the menu. */
.nav-cluster .header-search { position: relative; margin: 0 0 0 1.25rem; }
.header-search .wp-block-search__inside-wrapper { border: 0; padding: 0; background: none; }
.header-search .wp-block-search__button {
	display: flex; align-items: center; justify-content: center;
	margin: 0; padding: 0.25rem; border: 0; border-radius: 0.25rem; background: none;
	color: hsl(var(--muted-foreground)); cursor: pointer;
}
.header-search .wp-block-search__button:hover { color: hsl(var(--primary)); }
.header-search .wp-block-search__button svg { width: 20px; height: 20px; min-width: 20px; min-height: 20px; }
.header-search:not(.wp-block-search__searchfield-hidden) .wp-block-search__inside-wrapper { overflow: visible; }
.header-search .wp-block-search__input {
	position: absolute; top: calc(100% + 0.9rem); right: 0; z-index: 2;
	width: min(20rem, calc(100vw - 2rem)); height: auto;
	padding: 0.6rem 0.85rem; margin: 0;
	border: 1px solid hsl(var(--border)); border-radius: 0.375rem;
	background: hsl(var(--background)); box-shadow: var(--shadow-lg);
	font: inherit; font-size: 0.9375rem; color: hsl(var(--foreground));
}
.header-search .wp-block-search__input:focus {
	outline: none; border-color: hsl(var(--ring)); box-shadow: var(--shadow-lg), 0 0 0 2px hsl(var(--ring) / 0.2);
}
/* Collapsed, not display:none: core focuses the field in the same tick it
   un-hides it, and a display:none element can't take focus. Core's own
   collapsed rules zero its width/padding and keep it out of the tab order. */
.header-search.wp-block-search__searchfield-hidden .wp-block-search__input {
	opacity: 0; pointer-events: none; box-shadow: none;
}
/* Below the hamburger breakpoint the icon sits mid-header, so a panel aligned
   to it would run off the left edge; anchor to the header's right instead. */
@media (max-width: 1023.98px) {
	.nav-cluster .header-search { position: static; }
	.header-search .wp-block-search__input { top: calc(100% + 0.5rem); right: 1.5rem; width: min(20rem, calc(100vw - 3rem)); }
}

/* Collapse the nav to a hamburger below 1024px. The Navigation block's default
   breakpoint is 600px, but this menu (7 items + dropdowns + social) overflows
   off-screen around 950px, so raise the breakpoint. Overrides core's
   @media(min-width:600px) rules via higher specificity (.main-nav ...).
   The overlay-open (.is-menu-open) styling is unconditional, so the hamburger
   opens the full menu at these widths too. */
@media (max-width: 1023.98px) {
	.main-nav .wp-block-navigation__responsive-container-open:not(.always-shown) { display: flex; }
	.main-nav .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) { display: none; }
	/* full-screen overlay when open (core only sizes the overlay at <=599px) */
	.main-nav .wp-block-navigation__responsive-container.is-menu-open { position: fixed; inset: var(--admin-bar-h, 0px) 0 0 0; width: auto; height: auto; }
}
/* the header's backdrop-filter creates a containing block that traps the
   fixed overlay; drop it only while the menu is open so the overlay fills
   the viewport (blur is restored when closed). */
html.has-modal-open header { backdrop-filter: none; }

/* Opened overlay: consistent left-aligned list; flatten submenus (drop the
   desktop dropdown-card + right-justify inherited from .main-nav). */
.main-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content,
.main-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container,
.main-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container {
	align-items: flex-start;
	text-align: left;
}
.main-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
	justify-content: flex-start;
	text-align: left;
}
.main-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container {
	background: transparent;
	border: none;
	box-shadow: none;
	min-width: 0;
	padding: 0 0 0 1rem;
}

/* Larger, finger-friendly tap targets in the opened overlay. Bumps the link
   text up and gives each row generous vertical padding (>=44px touch target)
   so the menu is easy to use on a phone. Desktop nav (closed) is untouched. */
.main-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
	font-size: 1.125rem;
	padding-top: 0.75rem;
	padding-bottom: 0.75rem;
}
.main-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	font-size: 1rem;
}
/* Give the whole opened list a bit more breathing room between rows. */
.main-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
	gap: 0.25rem;
	--wp--style--block-gap: 0.25rem;
}

/* ---- Core Details block styled as the site's FAQ accordion ----
   Replaces the old .faq-item/.faq-btn/.faq-body markup (which needed an
   onclick handler) with the native <details> element — no JS. The chevron
   is a pure-CSS border caret so it inherits the theme color. */
.wp-block-details {
	border: 1px solid hsl(var(--border));
	border-radius: 0.5rem;
	overflow: hidden;
	margin-bottom: 0.5rem;
}
.wp-block-details summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 1rem 1.25rem;
	cursor: pointer;
	list-style: none;
	font-size: 0.875rem;
	font-weight: 500;
	color: hsl(var(--foreground));
	transition: background 0.15s;
}
.wp-block-details summary::-webkit-details-marker { display: none; }
.wp-block-details summary::after {
	content: "";
	flex-shrink: 0;
	width: 0.5rem;
	height: 0.5rem;
	border-right: 2px solid hsl(var(--muted-foreground));
	border-bottom: 2px solid hsl(var(--muted-foreground));
	transform: translateY(-2px) rotate(45deg);
	transition: transform 0.2s;
}
.wp-block-details[open] summary::after { transform: translateY(2px) rotate(-135deg); }
.wp-block-details summary:hover { background: hsl(var(--secondary) / 0.4); }
.wp-block-details > *:not(summary) {
	margin: 0;
	padding: 0 1.25rem 1rem;
	font-size: 0.875rem;
	color: hsl(var(--muted-foreground));
	line-height: 1.7;
}

/* ---- Rectors list built as a core Table block (editable in wp-admin) ----
   Styled as a clean three-column list: right-aligned muted number, the
   rector's name, and right-aligned muted years, with hairline row dividers. */
.wp-block-table.rectors-table { margin: 0; overflow-x: auto; }
/* font-size/padding match the static page's own <style> block for this table. */
.wp-block-table.rectors-table table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.wp-block-table.rectors-table td {
	border: 0;
	border-bottom: 1px solid hsl(var(--border));
	padding: 0.45rem 0.75rem;
	font-size: inherit;
	color: hsl(var(--foreground));
	text-align: left;
	vertical-align: baseline;
}
.wp-block-table.rectors-table tr td:first-child {
	width: 2.5rem;
	text-align: right;
	padding-right: 1rem;
	color: hsl(var(--muted-foreground));
	font-variant-numeric: tabular-nums;
}
.wp-block-table.rectors-table tr td:last-child {
	text-align: right;
	white-space: nowrap;
	color: hsl(var(--muted-foreground));
	font-variant-numeric: tabular-nums;
}
.wp-block-table.rectors-table tr:last-child td { border-bottom: 0; }

/* ---- Core Image block carrying the site's aspect-ratio classes ----
   site.css puts .img-ratio-* on the <img>; the core Image block puts a block's
   className on the <figure>, so re-target the ratio onto the inner <img> and
   drop core's default figure margin. The figure now takes the grid-cell role
   the plain wrapper <div> used to have.

   The two `auto`s below are load-bearing. site.css's bare .img-ratio-* rule
   still matches the <figure> here, and its `height: 100%` resolves against the
   grid row — which is as tall as the text column beside it. The frame then
   takes that height and the aspect-ratio is silently ignored: on /im-new/ at
   768px a 4:3 frame was rendering 67% too tall, and object-fit cropped the
   photograph to match. Undo the inherited height on the figure, and let the
   ratio (not a percentage height) size the image inside it. */
.wp-block-image.img-ratio-4-3,
.wp-block-image.img-ratio-4-5,
.wp-block-image.img-ratio-1-1 {
	margin: 0;
	height: auto;
	aspect-ratio: auto;
}
.wp-block-image.img-ratio-4-3 img,
.wp-block-image.img-ratio-4-5 img,
.wp-block-image.img-ratio-1-1 img {
	display: block;
	width: 100%;
	height: auto;
	object-fit: cover;
	object-position: center;
}
.wp-block-image.img-ratio-4-3 img { aspect-ratio: 4 / 3; }
.wp-block-image.img-ratio-4-5 img { aspect-ratio: 4 / 5; }
.wp-block-image.img-ratio-1-1 img { aspect-ratio: 1 / 1; }

/* The photo band's image is the band's backdrop: the figure has to fill it. */
.photo-cta-band > .wp-block-image { margin: 0; height: 100%; }

/* Core List block used as the site's .dot-list — keep the custom ::before
   bullets by neutralizing core list padding/markers. */
ul.wp-block-list.dot-list { list-style: none; margin: 0; padding: 0; }

/* ---- Home hero as a core Cover block ----
   Photo is editable via the Media Library (click the cover → replace).
   Preserves the original .hero-section look: viewport fill (site.js sets the
   inline min-height), 55% overlay, Ken Burns zoom, and full-bleed light-rays. */
.wp-block-cover.hero-section {
	min-height: 85vh;               /* fallback; site.js overrides inline to fill the viewport */
	align-items: center;
	justify-content: center;
}
.wp-block-cover.hero-section .wp-block-cover__image-background {
	animation: kenBurns 20s ease-in-out infinite alternate;
}
.wp-block-cover.hero-section .wp-block-cover__inner-container {
	position: static;               /* so .hero-rays resolve to the section, not the inner container */
	width: 100%;
	max-width: none;
	padding: 0;
}

/* ---- Templates added for search, archives, 404 and the two CPT singles ----
   These are the only places core's Query, Search and post-* blocks appear, so
   map them onto the design's existing card and form looks. */

/* Result cards: a Query loop's <li> wrapping a .ser-card group. */
.wp-block-post-template.grid-2col { padding: 0; list-style: none; }
.ser-card .wp-block-post-title { margin-bottom: 0.35rem; }
.ser-card .wp-block-post-title a { color: inherit; text-decoration: none; }
.ser-card .wp-block-post-title a:hover { color: hsl(var(--primary)); }
.ser-card .wp-block-post-excerpt { margin: 0; }
.ser-card .wp-block-post-excerpt__excerpt {
	font-size: 0.875rem;
	color: hsl(var(--muted-foreground));
	line-height: 1.65;
}
.ser-card .wp-block-post-excerpt__more-link {
	font-size: 0.8125rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: hsl(var(--primary));
}

/* Pagination under a result list. */
.wp-block-query-pagination {
	margin-top: 2.5rem;
	gap: 0.75rem;
	font-size: 0.8125rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}
.wp-block-query-pagination .page-numbers.current { color: hsl(var(--primary)); font-weight: 600; }

/* Search form, styled like the site's other inputs. */
.wp-block-search.stjohns-search { margin: 0 auto 2.5rem; max-width: 32rem; }
/* ...but line it up with the column when it sits beside body copy (404). */
.inner--sm .wp-block-search.stjohns-search { margin-left: 0; }
.wp-block-search.stjohns-search .wp-block-search__inside-wrapper { gap: 0.5rem; }
.wp-block-search.stjohns-search .wp-block-search__input {
	padding: 0.5rem 0.75rem;
	border: 1px solid hsl(var(--border));
	border-radius: 0.375rem;
	background: hsl(var(--background));
	font-family: inherit;
	font-size: 0.9375rem;
	color: hsl(var(--foreground));
}
.wp-block-search.stjohns-search .wp-block-search__input:focus {
	outline: none;
	border-color: hsl(var(--ring));
}
.wp-block-search.stjohns-search .wp-block-search__button {
	background: hsl(var(--primary));
	color: hsl(var(--primary-foreground));
	border: 0;
	border-radius: 0;
	padding: 0.5rem 1.5rem;
	font-size: 0.8125rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	font-weight: 600;
	cursor: pointer;
}
.wp-block-search.stjohns-search .wp-block-search__button:hover { background: hsl(var(--primary) / 0.9); }

/* Archive / search heading and term description sit in the solid hero. */
.solid-hero .wp-block-query-title { margin-bottom: 0.5rem; }
.solid-hero .wp-block-term-description p { color: hsl(var(--primary-foreground) / 0.8); }

/* Single sermon: the meta line under the title, on the hero's dark ground. */
.solid-hero .ser-card-meta--single {
	justify-content: center;
	color: hsl(var(--primary-foreground) / 0.85);
	margin-top: 0.75rem;
}
.solid-hero .ser-card-scripture { color: hsl(var(--primary-foreground) / 0.7); display: block; margin-top: 0.5rem; }
.solid-hero .sermon-watch { margin-top: 0.75rem; }
.solid-hero .sermon-watch .text-link { color: hsl(var(--primary-foreground)); border-bottom-color: hsl(var(--primary-foreground) / 0.4); }

/* Single ministry: the category shown above the title. */
.solid-hero .wp-block-post-terms.section-eyebrow a { color: inherit; text-decoration: none; }

/* ---- Blog (inc/blog.php; templates home, category and single-post) ---- */

/* List pages (Blog, topic, series, year, blog search): one column of posts
   beside a sidebar; the sidebar drops below the posts on narrow screens. */
.blog-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 3rem;
	max-width: 72rem;
	margin: 0 auto;
}
@media (min-width: 960px) {
	.blog-layout { grid-template-columns: minmax(0, 1fr) 17rem; gap: 4rem; align-items: start; }
}

/* A post in the list: the sermon card, laid out as a row, with the featured
   photo (if the post has one) beside the text; above it on phones. */
.wp-block-post-template.blog-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
}
.blog-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem 1.5rem; align-items: start; }
.blog-row:has(.blog-row__image) { grid-template-columns: minmax(0, 1fr) 12rem; }
.blog-row .wp-block-post-title { font-size: 1.375rem; line-height: 1.3; }
.blog-row__image { margin: 0; }
.blog-row__image img {
	display: block;
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	border-radius: 0.375rem;
}
@media (max-width: 599px) {
	.blog-row:has(.blog-row__image) { grid-template-columns: minmax(0, 1fr); }
	.blog-row__image { order: -1; }
}

/* The sidebar: blog search, then titled lists with post counts (Topics,
   Series, Browse by year), the current one filled. */
.blog-sidebar { display: flex; flex-direction: column; gap: 2.25rem; }
.blog-side-list__title,
.blog-sidebar .wp-block-search__label {
	display: block;
	margin: 0 0 0.75rem;
	padding-bottom: 0.5rem;
	border-bottom: 1px solid hsl(var(--border));
	font-family: inherit;
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: hsl(var(--muted-foreground));
}
.blog-sidebar .wp-block-search.stjohns-search { margin: 0; max-width: none; }
.blog-sidebar .wp-block-search.stjohns-search .wp-block-search__button { padding: 0.5rem 1rem; }
.blog-side-list ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
}
.blog-side-list a {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 1rem;
	margin: 0 -0.5rem;
	padding: 0.35rem 0.5rem;
	border-radius: 0.25rem;
	font-size: 0.9375rem;
	color: hsl(var(--foreground));
	text-decoration: none;
}
.blog-side-list a:hover { background: hsl(var(--primary) / 0.06); color: hsl(var(--primary)); }
.blog-side-list a[aria-current] { background: hsl(var(--primary)); color: hsl(var(--primary-foreground)); }
.blog-side-list__count { font-size: 0.8125rem; color: hsl(var(--muted-foreground)); }
.blog-side-list a[aria-current] .blog-side-list__count { color: hsl(var(--primary-foreground) / 0.85); }
.blog-side-list__sr {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}
/* Twenty-odd years read better as a compact grid than a long column. */
.blog-years ul { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.15rem 0.75rem; }
.blog-years a { margin: 0; }
/* The RSS link at the foot of the sidebar: small and quiet. */
.blog-feed { margin: 0; font-size: 0.8125rem; }
.blog-feed a {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	color: hsl(var(--muted-foreground));
	text-decoration: none;
}
.blog-feed a:hover { color: hsl(var(--primary)); }
.blog-feed a:hover span { text-decoration: underline; }
/* A post's own page: the article fills the main column (on its own it was a
   centred 48rem column with padding of its own). */
.blog-layout .prose-body { max-width: none; margin: 0; padding: 0; }

/* "More from <series>" at the end of a post (stjohns/series-more). */
.blog-series-more {
	margin-top: 2.5rem;
	padding: 1.25rem 1.5rem;
	border: 1px solid hsl(var(--border));
	border-left: 3px solid hsl(var(--accent));
	border-radius: 0.375rem;
}
.blog-series-more__label {
	font-size: 0.75rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: hsl(var(--muted-foreground));
	margin-bottom: 0.5rem;
}
.blog-series-more ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.35rem; }
.blog-series-more a {
	font-family: "Cormorant Garamond", Garamond, Georgia, serif;
	font-size: 1.25rem;
	color: hsl(var(--primary));
	text-decoration: none;
}
.blog-series-more a:hover { text-decoration: underline; }

/* The topic and date line on a post in the list. */
.blog-card-meta .wp-block-post-terms {
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: hsl(var(--accent-text));
}
.blog-card-meta .wp-block-post-terms a { color: inherit; text-decoration: none; }
.blog-card-meta .wp-block-post-terms a:hover { text-decoration: underline; }
.blog-empty { text-align: center; }

/* The home page's From the Blog (stjohns/recent-posts): cards with the photo
   edge to edge across the top. The title link is stretched over the card
   (site.css .ser-card-link), so anywhere on it opens the post. */
.post-cards {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
	gap: 1.5rem;
	max-width: 72rem;
	margin: 0 auto;
}
.post-card { position: relative; padding: 0; overflow: hidden; }
.post-card__image { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; }
.post-card__image--none {
	display: flex;
	align-items: center;
	justify-content: center;
	background: hsl(var(--secondary));
	color: hsl(var(--primary) / 0.45);
}
/* Stacked on a phone there's no row to keep level, so the panel shrinks to a band. */
@media (max-width: 599px) {
	.post-card__image--none { aspect-ratio: 4 / 1; }
}
.post-card__body { padding: 1.25rem 1.5rem 1.5rem; }
.post-card h3 { font-size: 1.375rem; line-height: 1.3; }
.post-card__topic {
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: hsl(var(--accent-text));
}
.post-card:hover .ser-card-link,
.post-card .ser-card-link:focus-visible { color: hsl(var(--primary)); }
.post-card:focus-within { box-shadow: var(--shadow-md); }

/* The home page's latest video (stjohns/latest-video, inc/latest-video.php):
   the playlist's newest video at 16:9 across the column, its title and date
   beneath. */
.latest-video { max-width: 56rem; margin: 0 auto; text-align: center; }
.latest-video__frame {
	aspect-ratio: 16 / 9;
	border-radius: 0.5rem;
	overflow: hidden;
	box-shadow: var(--shadow-md);
	background: hsl(var(--foreground));
}
.latest-video__frame iframe { display: block; width: 100%; height: 100%; border: 0; }
.latest-video__title {
	font-family: "Cormorant Garamond", Garamond, Georgia, serif;
	font-size: 1.375rem;
	font-weight: 400;
	line-height: 1.3;
	color: hsl(var(--foreground));
	margin-top: 1.25rem;
}
.latest-video__date { font-size: 0.75rem; color: hsl(var(--muted-foreground)); margin-top: 0.25rem; }
.latest-video .text-link { display: inline-block; margin-top: 1rem; }

/* Single post. */
.solid-hero .blog-post-date {
	color: hsl(var(--primary-foreground) / 0.85);
	font-size: 0.875rem;
	margin-top: 0.75rem;
}
.solid-hero .blog-post-byline {
	color: hsl(var(--primary-foreground) / 0.85);
	font-size: 0.875rem;
	margin-top: 0.25rem;
}
.blog-post-image { margin: 0 0 2.5rem; }
/* Never wider than the photo itself (many newsletter portraits are small), and
   never taller than a screenful. */
.blog-post-image img {
	display: block;
	width: auto;
	max-width: 100%;
	height: auto;
	max-height: 34rem;
	margin: 0 auto;
	border-radius: 0.5rem;
}
/* A sermon's transcript (single-sermon.html) reads like a blog post: the same
   type size and line height, and a gap between paragraphs. */
.sermon-content > * + * { margin-top: 1.25rem; }
.sermon-content p { font-size: 1.0625rem; line-height: 1.8; color: hsl(var(--foreground)); }
.sermon-content h2 { margin-top: 2.5rem; }
.sermon-content h2 + * { margin-top: 0.75rem; }
/* A YouTube link pasted in the Word-style editor (inc/classic-editor.php)
   comes out as a bare, fixed-size iframe; fill the column at 16:9 as the
   imported video blocks do. */
:is(.sermon-content, .blog-post-content) iframe[src*="youtube"]:not(.wp-block-embed__wrapper *) {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
}
/* A post's own text is plain editor blocks with none of the design's classes,
   so give them the site's reading type here. */
.blog-post-content > * + * { margin-top: 1.25rem; }
.blog-post-content :is(p, li) { font-size: 1.0625rem; line-height: 1.8; color: hsl(var(--foreground)); }
.blog-post-content :is(h2, h3, h4) {
	font-family: "Cormorant Garamond", Garamond, Georgia, serif;
	font-weight: 400;
	line-height: 1.25;
	color: hsl(var(--foreground));
	margin-top: 2.5rem;
}
.blog-post-content h2 { font-size: 1.75rem; }
.blog-post-content h3 { font-size: 1.375rem; }
.blog-post-content h4 { font-size: 1.125rem; }
.blog-post-content :is(h2, h3, h4) + * { margin-top: 0.75rem; }
.blog-post-content ul { list-style: disc; padding-left: 1.5rem; }
.blog-post-content ol { list-style: decimal; padding-left: 1.5rem; }
.blog-post-content li + li { margin-top: 0.375rem; }
.blog-post-content a { color: hsl(var(--primary)); text-decoration: underline; text-underline-offset: 0.15em; }
.blog-post-content blockquote {
	border-left: 3px solid hsl(var(--accent));
	padding-left: 1.25rem;
	font-style: italic;
}
.blog-post-content img { height: auto; border-radius: 0.5rem; }
/* "Originally published in …" under a reprint from the newsletter archive. */
.blog-post-content p.blog-source {
	margin-top: 2.5rem;
	padding-top: 1rem;
	border-top: 1px solid hsl(var(--border));
	font-size: 0.875rem;
	color: hsl(var(--muted-foreground));
}
.blog-post-content .wp-element-caption {
	font-size: 0.8125rem;
	color: hsl(var(--muted-foreground));
	text-align: center;
	margin-top: 0.5rem;
}
.blog-post-nav {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 1rem 2rem;
	margin-top: 3rem;
	padding-top: 2rem;
	border-top: 1px solid hsl(var(--border));
	font-size: 0.875rem;
}
.blog-post-nav:not(:has(a)) { display: none; }
.blog-post-nav .post-navigation-link-next { margin-left: auto; text-align: right; }
.blog-post-nav a { color: hsl(var(--primary)); text-decoration: none; }
.blog-post-nav a:hover { text-decoration: underline; }

/* Comments: the thread, then the form. */
.blog-comments { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid hsl(var(--border)); }
.blog-comments :is(.wp-block-comments-title, .comment-reply-title) {
	font-family: "Cormorant Garamond", Garamond, Georgia, serif;
	font-size: 1.5rem;
	font-weight: 400;
	margin-bottom: 1.25rem;
}
.blog-comments .wp-block-comment-template { list-style: none; padding: 0; margin: 0 0 2.5rem; }
.blog-comments .wp-block-comment-template ol {
	list-style: none;
	margin: 0;
	padding-left: 1.5rem;
	border-left: 2px solid hsl(var(--border));
}
.blog-comment { padding: 1.25rem 0; border-bottom: 1px solid hsl(var(--border)); }
.blog-comment-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.25rem 0.75rem;
	margin-bottom: 0.5rem;
}
.blog-comment .wp-block-comment-author-name { font-weight: 600; }
.blog-comment .wp-block-comment-date { font-size: 0.75rem; color: hsl(var(--muted-foreground)); }
.blog-comment .wp-block-comment-content p { font-size: 0.9375rem; line-height: 1.7; margin-bottom: 0.75rem; }
.blog-comment .comment-awaiting-moderation {
	font-size: 0.8125rem;
	font-style: italic;
	color: hsl(var(--muted-foreground));
}
.blog-comment .wp-block-comment-reply-link a {
	font-size: 0.75rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: hsl(var(--primary));
	text-decoration: none;
}
.blog-comments #cancel-comment-reply-link { font-family: inherit; font-size: 0.8125rem; margin-left: 0.75rem; }

/* The comment form, laid out like the site's own forms (.form-field). */
.blog-comments :is(.comment-notes, .logged-in-as) {
	font-size: 0.875rem;
	color: hsl(var(--muted-foreground));
	margin-bottom: 1.25rem;
}
.blog-comments :is(.comment-form-comment, .comment-form-author, .comment-form-email) {
	display: flex;
	flex-direction: column;
	gap: 0.375rem;
	margin-bottom: 1.25rem;
}
.blog-comments .comment-form label { font-size: 0.875rem; font-weight: 500; }
.blog-comments .comment-form :is(input[type="text"], input[type="email"], textarea) {
	width: 100%;
	padding: 0.5rem 0.75rem;
	border: 1px solid hsl(var(--border));
	border-radius: 0.375rem;
	background: hsl(var(--background));
	font-family: inherit;
	font-size: 0.875rem;
	color: hsl(var(--foreground));
}
.blog-comments .comment-form :is(input[type="text"], input[type="email"], textarea):focus {
	outline: none;
	border-color: hsl(var(--ring));
	box-shadow: 0 0 0 2px hsl(var(--ring) / 0.2);
}
.blog-comments .comment-form textarea { min-height: 8rem; resize: vertical; }
.blog-comments .comment-form-cookies-consent {
	display: flex;
	align-items: flex-start;
	gap: 0.5rem;
	margin-bottom: 1.25rem;
}
.blog-comments .comment-form-cookies-consent input { margin-top: 0.2rem; }
.blog-comments .comment-form-cookies-consent label { font-weight: 400; color: hsl(var(--muted-foreground)); }
.blog-comments .required { color: hsl(var(--primary)); }
/* Block themes give the submit wp-element-button instead of .submit. */
.blog-comments .comment-form input[type="submit"] {
	display: inline-block;
	padding: 0.75rem 2rem;
	background: hsl(var(--primary));
	color: hsl(var(--primary-foreground));
	border: 0;
	border-radius: 0;
	font-family: inherit;
	font-size: 0.8125rem;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	cursor: pointer;
}
.blog-comments .comment-form .submit:hover { background: hsl(var(--primary) / 0.9); }
