/*
Theme Name: Saved Child – Maroubra Presbyterian
Description: Child theme of Saved for Maroubra Presbyterian Church. Quiet, traditional typography and colour refinements. Church colours and fonts are built in as defaults (functions.php) and can still be changed in Appearance → Customize.
Template: saved
Version: 1.1.0
Text Domain: saved-child
License: GPLv2 or later
*/

/* ---------------------------------------------
 * Palette (keep in step with Customizer colours)
 * Main colour (Customizer):   #1f3550  deep navy
 * Accent colour (Customizer): #7a2e2e  muted burgundy
 * --------------------------------------------- */
:root {
	--mpc-navy: #1f3550;
	--mpc-burgundy: #7a2e2e;
	--mpc-ink: #2b2b2b;
	--mpc-paper: #faf8f4;
	--mpc-rule: #e4ded3;
}

/* Body text: comfortable reading for sermons and confessions */
body {
	color: var(--mpc-ink);
	-webkit-font-smoothing: antialiased;
}

.saved-entry-content p,
.saved-entry-content li {
	line-height: 1.75;
}

/* Headings: dignified, no shouting */
h1, .saved-h1,
h2, .saved-h2,
h3, .saved-h3 {
	letter-spacing: 0.01em;
	font-weight: 600;
	text-transform: none;
}

.saved-entry-content h2 {
	margin-top: 2.2em;
	padding-bottom: 0.35em;
	border-bottom: 1px solid var(--mpc-rule);
}

/* Scripture / quotations */
.saved-entry-content blockquote,
.saved-entry-content .wp-block-quote {
	border-left: 3px solid var(--mpc-burgundy);
	background: var(--mpc-paper);
	padding: 1em 1.4em;
	font-style: italic;
}

/* Links in body text: understated underline */
.saved-entry-content a:not(.saved-button):not(.wp-block-button__link) {
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.18em;
}

/* Buttons: squarer, more formal corners */
.saved-button,
.wp-block-button__link,
input[type="submit"] {
	border-radius: 3px;
}

/* Footer and alternating sections: warm paper tone instead of grey */
.saved-bg-secondary,
#saved-footer-widgets-row {
	background-color: var(--mpc-paper);
}

/* Homepage sermon/post cards: Saved caps card height (e.g. 19.1875em in 4 columns),
   which cuts off two-line sermon titles like "15/11/2026 – Evening Service: …".
   Let cards grow to fit the title, keep each row equal height, and drop the faded
   outline excerpt on homepage cards (it is shown on the sermon page itself). */
/* Applies to every card listing: homepage sections, sermon archive, months,
   series, books, speakers, news. */
.saved-loop-entries {
	display: flex;
	flex-wrap: wrap;
	align-items: stretch;
}

.saved-loop-entries .saved-entry-short {
	height: auto !important; /* overrides matchHeight inline height */
	max-height: none !important;
}

.saved-loop-entries .saved-entry-has-image::after {
	display: none;
}

.saved-loop-entries .saved-entry-has-image .saved-entry-content-short {
	display: none;
}

/* ---------------------------------------------
 * Ministry Team: photo with bio beside it
 * (markup from partials/content-person-short.php)
 * --------------------------------------------- */
.saved-loop-entries .mpc-person {
	display: flex;
	gap: 2em;
	align-items: flex-start;
	width: 100%;
	float: none;
	margin: 0 0 2.5em;
	padding-bottom: 2.5em;
	border-bottom: 1px solid var(--mpc-rule);
}

.saved-loop-entries .mpc-person:last-child {
	border-bottom: 0;
	margin-bottom: 0;
	padding-bottom: 0;
}

.mpc-person-photo {
	flex: 0 0 240px;
}

.mpc-person-photo img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 3px;
}

.mpc-person-body {
	flex: 1 1 auto;
	min-width: 0;
}

.mpc-person-position {
	color: var(--mpc-burgundy);
	font-size: 0.85em;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.mpc-person-name {
	margin: 0.15em 0 0.6em;
	font-size: 1.6em;
}

.mpc-person-bio > *:first-child {
	margin-top: 0;
}

@media only screen and (max-width: 600px) {
	.saved-loop-entries .mpc-person {
		flex-direction: column;
		gap: 1em;
	}

	.mpc-person-photo {
		flex-basis: auto;
		width: 60%;
		max-width: 240px;
	}
}

/* ---------------------------------------------
 * Page content helpers
 * --------------------------------------------- */

/* Saved gives every element in page text a 28px top/bottom margin; inside
   panels and columns that stacks into large gaps. */
.saved-entry-content .wp-block-group > :first-child,
.saved-entry-content .wp-block-group .wp-block-columns,
.saved-entry-content .wp-block-column,
.saved-entry-content .wp-block-column > :first-child {
	margin-top: 0 !important;
}

.saved-entry-content .wp-block-group > :last-child,
.saved-entry-content .wp-block-group .wp-block-columns,
.saved-entry-content .wp-block-column,
.saved-entry-content .wp-block-column > :last-child {
	margin-bottom: 0 !important;
}

/* Jump links (#chapter-3, #q21 …) land below the sticky header */
.saved-entry-content [id] {
	scroll-margin-top: 110px;
}

/* Westminster Confession ch. I: books of the Bible in columns */
.saved-entry-content .mpc-book-list {
	column-count: 3;
	column-gap: 2em;
}

@media only screen and (max-width: 600px) {
	.saved-entry-content .mpc-book-list {
		column-count: 2;
	}
}

/* Catechism questions: a little space above each */
.saved-entry-content .mpc-question {
	margin-top: 1.6em;
	margin-bottom: 0.3em;
}

/* Phones: slightly larger body text */
@media only screen and (max-width: 600px) {
	.saved-entry-content p,
	.saved-entry-content li {
		font-size: 1.05em;
	}
}

/* Map sections (footer + homepage "Find Us"): Directions only.
   The location page's details now live on Visit Us. */
.saved-map-button-more,
.saved-buttons-list li:has(> .saved-map-button-more) {
	display: none !important;
}

/* Ministry Team polish: name sits right under the role, no heading bar/rule,
   contact details without bullets. */
.saved-entry-content .mpc-person-name,
.mpc-person .mpc-person-name {
	margin-top: 0.15em !important;
	padding-bottom: 0;
	border-bottom: 0;
}

.mpc-person .mpc-person-name::before {
	display: none !important;
}

.mpc-person .mpc-person-meta {
	list-style: none;
	margin: 1em 0 0;
	padding: 0;
}

.mpc-person .mpc-person-meta li {
	display: inline-block;
	margin: 0 1.5em 0.3em 0;
	padding: 0;
}

.mpc-person .mpc-person-meta li::before {
	display: none;
}

/* Contact form: full-width fields */
.wpcf7-form .mpc-field {
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
}

.wpcf7-form textarea.mpc-field {
	min-height: 10em;
}

.wpcf7-form label {
	display: block;
}

/* Announcements are from the church, not individuals: no author names */
.saved-entry-full-author,
.saved-entry-short-author,
.saved-entry-meta li[class*="-author"],
.saved-author-box {
	display: none !important;
}

/* Homepage Announcements section: keep only the "All Announcements" button
   (Saved adds buttons for the three biggest categories automatically). */
.saved-image-section:has(article.type-post) .saved-buttons-list li:not(:first-child) {
	display: none !important;
}

/* Card images: always square and never stretched, whatever size WordPress cropped */
.saved-loop-entries .saved-entry-short-image img {
	width: 100% !important;
	height: auto !important;
	aspect-ratio: 1 / 1;
	object-fit: cover;
}
