/*
Theme Name: Rock Hill Prayer Room
Description: The Rock Hill Prayer Room site: a hub Home and six pages, in speakupcommunity.com's layout language (Candle colours). Design lives in theme.json and here; every word lives in the pages.
Version: 0.5.4
Requires at least: 6.6
Text Domain: rockhill-prayer-room
*/

/* Mechanics only. Colours, type and spacing are theme.json presets, so Global Styles can override them.
   The layout language is speakupcommunity.com's: the Spread (name left, content right, hairline rows),
   Gloock display, Newsreader reading, Instrument Sans for labels, thin accent line icons. */

html { scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; }
img { height: auto; }
h1, h2, h3 { text-wrap: balance; }
:where(a, button, summary):focus-visible { outline: 2px solid var(--wp--preset--color--accent); outline-offset: 3px; }
.wp-site-blocks > footer { margin-block-start: clamp(40px, 6vw, 80px); }

/* ── Header: name left, serif nav right, one filled button ── */
.rh-hdr { background: var(--wp--preset--color--paper); }
@media (min-width: 761px) {
  .wp-site-blocks > header.wp-block-template-part { position: sticky; top: 0; z-index: 20; }
  .admin-bar .wp-site-blocks > header.wp-block-template-part { top: 32px; }
}
.rh-hdr .wp-block-site-title { font-family: var(--wp--preset--font-family--display); font-size: 26px; line-height: 1; letter-spacing: -.01em; }
.rh-hdr .wp-block-site-title a { color: var(--wp--preset--color--ink); text-decoration: none; }
.rh-hdr .wp-block-navigation a { text-decoration: none; }
.rh-hdr .wp-block-navigation a:hover, .rh-hdr .wp-block-navigation a[aria-current="page"] { color: var(--wp--preset--color--ink); }
.rh-donate .wp-block-button__link { background: var(--wp--preset--color--accent); font-size: 15px; padding: 11px 18px; }
@media (max-width: 760px) {
  .rh-hdr .wp-block-navigation { font-size: 18px; gap: 6px 16px !important; }
}

/* ── Page heads ── */
.rh-statement { padding-block: clamp(56px, 9vw, 120px) clamp(32px, 4vw, 48px); }
.rh-statement h1, .rh-page-h h1 { max-width: 18ch; margin: 0; }
.rh-st-sub { font-size: clamp(20px, 2vw, 24px); line-height: 1.5; color: var(--wp--preset--color--soft); max-width: 36ch; margin-top: 30px !important; }
.rh-cover { margin-bottom: clamp(40px, 6vw, 72px) !important; }
.rh-cover img { width: 100%; aspect-ratio: 21 / 9; object-fit: cover; }
.rh-page-h { padding-block: clamp(48px, 7vw, 96px) clamp(28px, 4vw, 44px); }
.rh-crumb { font-family: var(--wp--preset--font-family--sans); font-size: 13px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; margin: 0 0 18px !important; }
.rh-crumb a { color: var(--wp--preset--color--soft); text-decoration: none; }
.rh-crumb a:hover { color: var(--wp--preset--color--accent); }

/* ── The Spread row ── */
.wp-block-columns.rh-spread { display: grid; grid-template-columns: minmax(0, .86fr) minmax(0, 1.14fr); gap: 20px clamp(32px, 5vw, 72px); padding-block: clamp(44px, 5vw, 64px); border-top: 1px solid var(--wp--preset--color--line); margin-block: 0 !important; }
.rh-spread > .wp-block-column { min-width: 0; }
.rh-spread-l h2 { margin: 0; }
.rh-sub { font-family: var(--wp--preset--font-family--sans); font-size: 13px; font-weight: 500; line-height: 1.4; letter-spacing: .12em; text-transform: uppercase; color: var(--wp--preset--color--soft); margin-top: 10px !important; }
.rh-spread-l .rh-fine { margin-top: 14px !important; }
.rh-spread.rh-hl { background: var(--wp--preset--color--warm); border-top-color: transparent; padding-inline: clamp(20px, 3vw, 40px); }
.rh-spread.rh-hl + .rh-spread { border-top-color: transparent; }
@media (max-width: 860px) { .wp-block-columns.rh-spread { grid-template-columns: minmax(0, 1fr); } }
.rh-ic svg { display: block; width: 34px; height: 34px; fill: none; stroke: var(--wp--preset--color--accent); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.rh-spread-r > .has-lede-font-size { color: var(--wp--preset--color--ink); line-height: 1.45; }
.rh-quote { font-style: italic; }
.rh-names p { margin: 0 !important; font-size: var(--wp--preset--font-size--lede); line-height: 1.6; color: var(--wp--preset--color--ink); }
.rh-fine { font-family: var(--wp--preset--font-family--sans); font-size: 15px; line-height: 1.5; color: var(--wp--preset--color--soft); }
.rh-wide { border-top: 1px solid var(--wp--preset--color--line); padding-block: clamp(44px, 5vw, 64px); }
.rh-wide > .has-lede-font-size { max-width: 760px; color: var(--wp--preset--color--ink); line-height: 1.45; }

.rh-spread[id] { scroll-margin-top: 120px; }
.rh-sub a { color: inherit; text-decoration: none; }
.rh-sub a:hover { color: var(--wp--preset--color--accent); }

/* ── Follow: a hairline, one line, the Substack button and two icon marks (speakupcommunity.com/ycp/) ── */
.rh-follow { border-top: 1px solid var(--wp--preset--color--line); padding-top: 22px; margin-top: 30px !important; }
.rh-follow-row { gap: 14px 12px !important; margin-top: 14px !important; }
.rh-marks.wp-block-social-links { gap: 12px !important; margin: 0 !important; padding: 0; }
.rh-marks.wp-block-social-links.is-style-logos-only .wp-social-link { display: flex; width: 48px; height: 48px; align-items: center; justify-content: center; margin: 0; border: 1px solid color-mix(in srgb, var(--wp--preset--color--soft) 35%, #fff); color: var(--wp--preset--color--ink); }
.rh-marks.wp-block-social-links.is-style-logos-only .wp-social-link:hover { border-color: var(--wp--preset--color--ink); }
.rh-marks.wp-block-social-links .wp-social-link { border-radius: 0; }
.rh-marks .wp-social-link a { padding: 0 !important; }
.rh-marks .wp-social-link svg { width: 22px; height: 22px; }

/* ── Actions: a filled button, and the quiet outbound link with an accent arrow ── */
.rh-acts { gap: 14px 24px; align-items: center; margin-top: 26px !important; }
.wp-block-button.is-style-ext > .wp-block-button__link { background: none; color: var(--wp--preset--color--soft); padding: 0; font-weight: 400; line-height: 1.4; }
.wp-block-button.is-style-ext > .wp-block-button__link::after { content: " ↗"; color: var(--wp--preset--color--accent); }
.wp-block-button.is-style-ext > .wp-block-button__link:hover { background: none; color: var(--wp--preset--color--ink); }

/* ── Events (rhpr/events), community style ── */
.rh-evs-month { font-family: var(--wp--preset--font-family--display); font-size: 26px; line-height: 1.2; color: var(--wp--preset--color--ink); margin: 0 0 12px; }
.rh-evs-month ~ .rh-evs-month { margin-top: 24px; }
.rh-ev { display: grid; grid-template-columns: 56px 72px minmax(0, 1fr); gap: 20px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--wp--preset--color--line); text-decoration: none; }
.rh-ev-d { text-align: center; }
.rh-ev-d b { display: block; font-family: var(--wp--preset--font-family--display); font-weight: 400; font-size: 38px; line-height: 1; color: var(--wp--preset--color--ink); }
.rh-ev-d i { display: block; font-family: var(--wp--preset--font-family--sans); font-style: normal; font-size: 12px; font-weight: 500; line-height: 1.6; letter-spacing: .14em; color: var(--wp--preset--color--soft); }
.rh-ev img, .rh-ev-noimg { display: block; width: 72px; height: 72px; object-fit: cover; background: var(--wp--preset--color--warm); }
.rh-ev-w strong { display: block; font-weight: 400; font-size: 21px; line-height: 1.3; color: var(--wp--preset--color--ink); }
.rh-ev-w span { font-family: var(--wp--preset--font-family--sans); font-size: 15px; line-height: 1.4; color: var(--wp--preset--color--soft); }
.rh-ev:hover strong { color: var(--wp--preset--color--accent); }
@media (max-width: 480px) { .rh-ev { grid-template-columns: 44px 56px minmax(0, 1fr); gap: 14px; } .rh-ev img, .rh-ev-noimg { width: 56px; height: 56px; } .rh-ev-d b { font-size: 32px; } }

/* ── Accordions: hairlines and an accent + ── */
.rh-folds { border-top: 1px solid var(--wp--preset--color--line); margin-top: 18px !important; }
.rh-spread-r > .rh-folds:first-child { margin-top: 6px !important; }
.wp-block-details { padding: 0; margin-top: 0 !important; }
.wp-block-details summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 18px 0; font-size: 21px; line-height: 1.35; color: var(--wp--preset--color--ink); }
.wp-block-details summary::-webkit-details-marker { display: none; }
.wp-block-details summary::after { content: "+"; flex: none; font-family: var(--wp--preset--font-family--sans); font-size: 22px; line-height: 1; color: var(--wp--preset--color--accent); }
.wp-block-details[open] > summary::after { content: "−"; }
.wp-block-details > :not(summary) { margin-top: 0; font-size: 17.5px; }
.wp-block-details > :last-child:not(summary) { padding-bottom: 20px; }
.rh-q.wp-block-details summary { font-style: italic; font-size: 19px; }
.rh-two { columns: 2; column-gap: 48px; }
.rh-two > .wp-block-details { break-inside: avoid; }
@media (max-width: 860px) { .rh-two { columns: 1; } }

/* ── Life rows ── */
.rh-lrows { border-top: 1px solid var(--wp--preset--color--line); }
.rh-lrows > * { margin-top: 0 !important; }
.wp-block-columns.rh-lrow { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 6px 28px; padding: 18px 0; margin: 0 !important; border-bottom: 1px solid var(--wp--preset--color--line); }
.rh-lrow h3 { font-size: 22px; line-height: 1.3; margin: 0; }
.rh-meta { font-family: var(--wp--preset--font-family--sans); font-size: 14px; font-weight: 500; line-height: 1.4; color: var(--wp--preset--color--accent); margin: 4px 0 0 !important; }
.rh-lrow p { font-size: 17.5px; margin: 0; }
.rh-lrow a { font-family: var(--wp--preset--font-family--sans); font-size: 15px; color: var(--wp--preset--color--soft); text-decoration: none; white-space: nowrap; }
.rh-lrow a:hover { color: var(--wp--preset--color--ink); }
@media (max-width: 620px) { .wp-block-columns.rh-lrow { grid-template-columns: minmax(0, 1fr); } }

/* ── Gallery: photos and fliers as even tiles, lightboxed ── */
.rh-gallery { padding-block: 8px clamp(48px, 6vw, 80px); }
.rh-tiles.wp-block-gallery { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 6px !important; }
@media (min-width: 900px) { .rh-tiles.wp-block-gallery { grid-template-columns: repeat(9, 1fr); } } /* 18 tiles: two even rows */
@media (max-width: 520px) { .rh-tiles.wp-block-gallery { grid-template-columns: repeat(3, 1fr); } }
.rh-tiles.wp-block-gallery.has-nested-images figure.wp-block-image { width: auto !important; margin: 0 !important; }
.rh-tiles.wp-block-gallery figure.wp-block-image img { aspect-ratio: 1; width: 100%; height: 100% !important; object-fit: cover; }
.rh-tiles.wp-block-gallery figure.wp-block-image.rh-fl img { object-fit: contain !important; background: var(--wp--preset--color--warm); }

/* ── Inline photo ── */
.rh-inline { margin-top: 24px !important; }
.rh-inline img { width: 100%; }

/* ── Upcoming schedule (rhpr/weeks): the Substack post's key and weeks, mirrored ── */
.rh-wk-key { font-family: var(--wp--preset--font-family--sans); font-size: 14px; line-height: 1.5; color: var(--wp--preset--color--soft); margin-bottom: 18px; }
.rh-wk-key p { margin: 0 0 8px; }
.rh-wk-key strong { color: var(--wp--preset--color--body); font-weight: 600; }
.rh-weeks { border-top: 0; }
.rh-weeks > .rh-wk:first-of-type { border-top: 1px solid var(--wp--preset--color--line); }
.rh-wk.wp-block-details { border-bottom: 1px solid var(--wp--preset--color--line); } /* a dynamic block: core/details' own style isn't printed on this page */
.rh-wk-body { padding-bottom: 18px; display: grid; gap: 14px; }
.rh-wk-date { font-family: var(--wp--preset--font-family--sans); font-size: 14px; font-weight: 600; color: var(--wp--preset--color--ink); margin: 0 0 4px; }
.rh-wk-date strong { font-weight: 600; }
.rh-wk ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.rh-wk li { font-size: 17px; line-height: 1.5; }
.rh-wk li p { margin: 0; }
.rh-wk li a { text-decoration: none; }
.rh-wk li a:hover { color: var(--wp--preset--color--accent); }

/* ── Give: Donorbox's newer embed ── */
.rh-give, .rh-donorbox { max-width: 440px; }

/* ── Footer: community-style columns ── */
.rh-foot { font-family: var(--wp--preset--font-family--sans); }
.rh-foot p { margin: 0; }
.rh-fcols { padding-block: 56px 40px; border-bottom: 1px solid rgba(247, 238, 227, .14); gap: 28px 40px !important; }
.rh-fhead { font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--wp--preset--color--night-ink); margin: 0 0 12px !important; }
.rh-flist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.rh-flist a { font-size: 15px; color: var(--wp--preset--color--night-soft); text-decoration: none; }
.rh-flist a:hover { color: var(--wp--preset--color--night-ink); }
.rh-logo { margin: 0 !important; }
.rh-logo img { width: auto; opacity: .92; }
.rh-logo a:hover img { opacity: 1; }
