/*
Theme Name: St. Bernard Scio
Description: The parish website for St. Bernard Catholic Church in Scio, Oregon.
Version: 1.0.5
Requires at least: 6.6
Requires PHP: 8.3
Text Domain: st-bernard-scio
*/

:root {
	--parish-ink: #172d32;
	--parish-night: #20373b;
	--parish-green: #314d47;
	--parish-paper: #f8f6ef;
	--parish-brass: #ead8a8;
	--parish-rule: #dcd9cd;
}

body { color: var(--parish-ink); }
.wp-site-blocks > * { margin-block-start: 0; }
.wp-block-post-content > .parish-section, .wp-block-post-content > .parish-welcome { margin-block-start: 0; }
a { text-underline-offset: .2em; }
:focus-visible { outline: 3px solid #876420; outline-offset: 4px; }
.parish-header { background: var(--parish-paper); border-bottom: 1px solid var(--parish-rule); }
.parish-masthead { min-height: 86px; padding-inline: clamp(1rem, 3vw, 3rem); }
.parish-brand img { display: block; width: 285px; max-width: 100%; height: auto; }
.parish-header a { text-decoration: none; }
.parish-header a:hover { text-decoration: underline; }
.parish-header .wp-block-social-links { gap: .35rem; }
.parish-header .wp-block-social-link a { padding: .48rem; }
.parish-header .wp-block-navigation__responsive-container-open { padding: .5rem; }
.parish-header .wp-block-navigation__responsive-container.is-menu-open { padding: 2rem 1.5rem; }
.parish-mobile-menu { display: none !important; }
.parish-hero { position: relative; display: grid; align-items: end; min-height: clamp(450px, min(52vw, 100svh - 98px), 650px); isolation: isolate; background: var(--parish-night); color: #fff; }
.parish-slides, .parish-hero::before { position: absolute; inset: 0; }
.parish-slides { z-index: -2; overflow: hidden; }
.parish-slides > .wp-block-image { position: absolute; inset: 0; margin: 0; }
.parish-slides > .wp-block-image img { display: block; width: 100%; height: 100%; object-fit: cover; }
.parish-slides > .wp-block-image:not(:first-child):not(.is-current) { display: none; }
.parish-slides > .wp-block-image[hidden] { display: none; }
.parish-hero::before { content: ""; z-index: -1; background: linear-gradient(90deg, rgb(15 26 25 / .82), rgb(15 26 25 / .42) 54%, transparent), linear-gradient(0deg, rgb(15 26 25 / .52), transparent 52%); }
.parish-hero-copy { box-sizing: border-box; display: grid; grid-template-columns: 1fr auto; align-items: center; width: min(100%, 1200px); margin: 0 auto; padding: 0 clamp(1.25rem, 5vw, 4rem) 2.5rem; }
.parish-hero-copy h1 { grid-column: 1 / -1; max-width: min(100%, 690px); font-size: clamp(2.65rem, 6.7vw, 5.35rem); line-height: .99; margin: .65rem 0 1.45rem; color: inherit; }
.parish-hero-location { grid-column: 1 / -1; margin: 0; font-weight: 600; letter-spacing: .17em; text-transform: uppercase; font-size: .77rem; }
.parish-hero .wp-block-buttons { gap: .7rem; margin-block: 0; }
.parish-hero .wp-block-button__link { background: var(--parish-brass); color: var(--parish-ink); border: 1px solid var(--parish-brass); }
.parish-hero .is-style-outline .wp-block-button__link { background: rgb(17 31 29 / .42); color: #fff; border: 1px solid #fff; }
.parish-hero .wp-block-button__link:hover { background: #f9edcb; color: var(--parish-ink); }
.parish-hero :focus-visible, .parish-footer :focus-visible { outline-color: var(--parish-brass); }
.parish-slide-controls { display: flex; gap: .6rem; align-items: center; justify-content: flex-end; color: #fff; margin-block: 0; }
.parish-slide-controls button { box-sizing: border-box; display: grid; place-items: center; border: 1px solid #fff; border-radius: 50%; width: 44px; height: 44px; font: inherit; font-size: 1.25rem; background: rgb(17 31 29 / .65); color: inherit; cursor: pointer; }
.parish-slide-controls button:hover { background: #fff; color: var(--parish-ink); }
.parish-slide-count { min-width: 2.5rem; text-align: center; font-variant-numeric: tabular-nums; }
.parish-welcome, .parish-section { padding-block: clamp(3rem, 7vw, 5.5rem); }
.parish-welcome { background: var(--parish-paper); text-align: center; }
.parish-welcome p { font-size: clamp(1.05rem, 2vw, 1.25rem); }
.parish-masses { background: #e9ede6; }
.parish-mass-card { background: var(--parish-paper); padding: clamp(1.2rem, 3vw, 2rem); border-top: 2px solid #887446; }
.parish-mass-card h3 { margin-top: 0; }
.parish-events { background: #fff; }
.parish-events > h2 { margin-bottom: 1.75rem; }
.parish-event-card { gap: 0; margin-block: 0; background: var(--parish-paper); border: 1px solid var(--parish-rule); border-radius: 4px; overflow: hidden; }
.parish-event-photo { margin: 0; }
.parish-event-photo img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: 60% center; }
.parish-event-photo figcaption { margin: 0; padding: .7rem 1rem; font-size: .85rem; color: #52605a; }
.parish-event-copy { box-sizing: border-box; padding: clamp(1.5rem, 3.5vw, 3rem); }
.parish-event-copy h3 { margin-top: 0; font-size: clamp(1.8rem, 3vw, 2.6rem); line-height: 1.12; }
.parish-event-date { color: var(--parish-green); font-weight: 650; }
.parish-event-copy .wp-block-buttons { margin-top: 1.5rem; }
.parish-event-copy .wp-block-button__link { background: var(--parish-green); color: #fff; }
.parish-event-copy .wp-block-button__link:hover { background: var(--parish-night); }
.parish-page-header { background: var(--parish-paper); padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.parish-page-header h1 { margin-block: 0; }
.parish-page-body { padding-block: clamp(2.5rem, 6vw, 4rem); }
.parish-footer { background: var(--parish-night); color: #fff; padding-block: 2.4rem; }
.parish-footer a { color: var(--parish-brass); }
.parish-footer .wp-block-group { gap: 1.5rem; align-items: flex-start; padding-inline: clamp(1.25rem, 4vw, 3rem); }
.parish-footer p { margin-block: 0 .5rem; }
.parish-map iframe { width: 100%; min-height: 290px; display: block; border: 0; }
.parish-contact-details { padding: clamp(1.15rem, 3vw, 2rem); background: var(--parish-paper); }
.parish-contact-details h2 { margin-top: 0; }
.wpcf7 label { font-weight: 600; }
.wpcf7 input:not([type=submit]):not([type=hidden]):not([type=checkbox]):not([type=radio]), .wpcf7 textarea { box-sizing: border-box; width: 100%; margin-top: .35rem; padding: .7rem .8rem; font: inherit; border: 1px solid #737e77; border-radius: 3px; background: #fff; color: var(--parish-ink); }
.wpcf7 textarea { min-height: 9rem; }
.wpcf7 input[type=submit] { cursor: pointer; color: #fff; background: var(--parish-green); border: 0; border-radius: 3px; padding: .75rem 1.1rem; font: inherit; font-weight: 650; }
.parish-bulletins .wp-block-file { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; padding-block: .85rem; border-bottom: 1px solid var(--parish-rule); }
.parish-bulletins .wp-block-file__button { margin-left: auto; }
.parish-page-body > .parish-contact-columns { align-items: start !important; }
.parish-about-section + .parish-about-section { border-top: 1px solid var(--parish-rule); padding-top: 1.5rem; margin-top: 1.5rem; }

@media (max-width: 1200px) {
	.parish-brand img { width: 230px; }
	.parish-masthead > .wp-block-group { gap: .55rem; }
	.parish-mobile-menu { display: flex !important; }
	.parish-desktop-menu { display: none !important; }
}

@media (max-width: 600px) {
	.parish-masthead { min-height: 72px; }
	.parish-brand img { width: min(48vw, 215px); }
	.parish-header .wp-block-social-links { gap: 0; font-size: 1rem; }
	.parish-header .wp-block-social-link a { padding: .37rem; }
	.parish-hero-copy { grid-template-columns: 1fr; gap: .5rem; padding-bottom: 1.25rem; }
	.parish-hero-copy h1 { margin: 0 0 .6rem; }
	.parish-hero::before { background: linear-gradient(0deg, rgb(15 26 25 / .88), rgb(15 26 25 / .43) 62%, rgb(15 26 25 / .08)); }
	.parish-footer .wp-block-group { flex-direction: column; gap: .5rem; }
}

/* Weekly bulletin signup: keep the optional checkbox separate from text fields. */
.wpcf7 .parish-bulletin-signup { margin-block: 1.25rem; padding: 1rem 1.1rem; background: var(--parish-paper); border-left: 3px solid #887446; }
.wpcf7 .parish-bulletin-signup .wpcf7-list-item { display: block; margin: 0; }
.wpcf7 .parish-bulletin-signup label { display: flex; align-items: flex-start; gap: .65rem; cursor: pointer; }
.wpcf7 .parish-bulletin-signup input[type=checkbox] { flex: 0 0 auto; width: 1.15rem; height: 1.15rem; margin: .2rem 0 0; padding: 0; accent-color: var(--parish-green); }
.wpcf7 .parish-bulletin-signup-help { margin: .55rem 0 0 1.8rem; font-size: .95rem; font-weight: 400; line-height: 1.5; }

/* Fr. Peter's bulletin messages. Desktop uses the approved complete graphic. */
.parish-fr-peter-page { padding-block: clamp(1.5rem, 4vw, 3rem); }
.parish-fr-peter-banner { position: relative; background: var(--parish-paper); }
.parish-fr-peter-desktop { display: block; width: 100%; height: auto; }
.parish-fr-peter-title { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.parish-fr-peter-portrait { display: none; }
.parish-fr-peter-entry { padding-block: 1.6rem; border-bottom: 1px solid var(--parish-rule); }
.parish-fr-peter-entry h2 { margin: 0; font-size: clamp(1.65rem, 3vw, 2.1rem); line-height: 1.25; }
.parish-fr-peter-entry p { margin-block: .85rem 0; }
.parish-fr-peter-meta { color: var(--parish-green); font-size: 1rem; }
.parish-fr-peter-message h1 { font-size: clamp(2rem, 4vw, 3rem); overflow-wrap: anywhere; }
.parish-fr-peter-message .wp-block-post-content { line-height: 1.7; }
.parish-fr-peter-source { border-top: 1px solid var(--parish-rule); margin-top: 2rem; padding-top: 1rem; }
.parish-fr-peter-pagination ul { list-style: none; display: flex; flex-wrap: wrap; gap: .6rem; padding: 0; margin-block: 2rem; }
.parish-fr-peter-pagination a, .parish-fr-peter-pagination .current { display: inline-block; padding: .5rem .8rem; border: 1px solid var(--parish-rule); }
.parish-fr-peter-pagination .current { color: #fff; background: var(--parish-green); }
@media (max-width: 600px) {
	.parish-fr-peter-desktop { display: none; }
	.parish-fr-peter-banner { display: grid; justify-items: center; gap: 1.5rem; padding: 2rem 1rem; background: linear-gradient(90deg, #f8f6ef77, #f8f6efee 55%), url('assets/fr-peter-wheat.png') left center / auto 100%; }
	.parish-fr-peter-title { position: static; width: auto; height: auto; margin: 0; overflow: visible; clip-path: none; white-space: normal; text-align: center; font-size: clamp(1.9rem, 7vw, 2.5rem); line-height: 1.2; color: var(--parish-green); }
	.parish-fr-peter-title span { display: block; }
	.parish-fr-peter-portrait { display: block; width: 212px; max-width: 85%; margin: 0; padding: 4px; border: 1px solid #b69754; background: var(--parish-paper); }
	.parish-fr-peter-portrait img { display: block; width: 100%; height: auto; }
}
