/*
Theme Name: Bella Vista
Theme URI: https://bellavista.church
Author: Bella Vista Church Vernon
Description: Custom theme for Bella Vista Church Vernon, matched to the BVCV Weekly newsletter. Includes a home banner, normal, full width, ministry, and lobby screen templates.
Version: 1.0.15
Requires at least: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: bella-vista
*/

/* ---------- Colours and type ---------- */
:root {
	--bv-teal: #1A363B;
	--bv-teal-dark: #13292D;
	--bv-charcoal: #242628;
	--bv-gold: #DEB374;
	--bv-gold-light: #E9C996;
	--bv-light: #F5F5F5;
	--bv-soft: #CDD4D1;
	--bv-muted: #BEC9C6;
	--bv-serif: Georgia, "Times New Roman", serif;
	--bv-sans: Arial, Helvetica, sans-serif;
	--bv-read: 44rem;
	--bv-wide: 72rem;
	--bv-gutter: clamp(1.25rem, 4vw, 2.5rem);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
	margin: 0;
	background: var(--bv-charcoal);
	color: var(--bv-light);
	font-family: var(--bv-sans);
	font-size: 1.125rem;
	line-height: 1.65;
}

h1, h2, h3, h4, h5, h6 {
	text-wrap: balance;
	font-family: var(--bv-serif);
	font-weight: normal;
	line-height: 1.2;
	color: var(--bv-light);
	margin: 2em 0 0.6em;
}
h1 { font-size: clamp(2.1rem, 5vw, 3.1rem); }
h2 { font-size: clamp(1.6rem, 3.6vw, 2.2rem); }
h3 { font-size: clamp(1.3rem, 2.6vw, 1.6rem); }
h4 { font-size: 1.2rem; }

p { margin: 0 0 1.2em; }

a { color: var(--bv-gold); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--bv-gold-light); text-decoration-thickness: 2px; }

:focus-visible { outline: 3px solid var(--bv-light); outline-offset: 3px; }

img, video, iframe { max-width: 100%; height: auto; }

.skip-link {
	position: absolute;
	left: 1rem;
	top: -4rem;
	z-index: 100;
	background: var(--bv-gold);
	color: var(--bv-teal);
	padding: 0.6rem 1rem;
	font-weight: bold;
}
.skip-link:focus { top: 1rem; }

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}

/* ---------- Buttons ---------- */
.button,
.wp-block-button__link {
	display: inline-block;
	font-family: var(--bv-sans);
	font-weight: bold;
	font-size: 1.05rem;
	line-height: 1.2;
	padding: 0.95em 1.7em;
	border-radius: 3px;
	text-decoration: none;
	cursor: pointer;
}
.button-gold,
.wp-block-button__link {
	background: var(--bv-gold);
	color: var(--bv-teal);
	border: 2px solid var(--bv-gold);
}
.button-gold:hover,
.wp-block-button__link:hover {
	background: var(--bv-gold-light);
	border-color: var(--bv-gold-light);
	color: var(--bv-teal);
}
.button-outline,
.is-style-outline .wp-block-button__link {
	background: transparent;
	color: var(--bv-gold);
	border: 2px solid var(--bv-gold);
}
.button-outline:hover,
.is-style-outline .wp-block-button__link:hover {
	background: var(--bv-gold);
	color: var(--bv-teal);
}

/* ---------- Directions and call buttons ---------- */
.button-light {
	background: rgba(19, 41, 45, 0.35);
	color: var(--bv-light);
	border: 2px solid rgba(245, 245, 245, 0.85);
}
.button-light:hover { background: var(--bv-light); color: var(--bv-teal); border-color: var(--bv-light); }

.hero-actions,
.bv-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
}
.hero-actions { justify-content: center; }
.entry-content > .bv-actions,
.entry-content .bv-actions { margin: 1.4rem 0 0.6rem; }
.maps-alt {
	display: block;
	margin-top: 0.7rem;
	font-size: 0.95rem;
}
.hero .maps-alt { color: var(--bv-light); text-shadow: 0 1px 3px rgba(19, 41, 45, 0.9); }
.entry-content .maps-alt { margin-bottom: 1.2rem; }

.entry-content > .bv-newsletter-form { max-width: 34rem; margin: 1rem auto 2rem; }

/* Plan your visit sections */
.bv-visit-sunday,
.bv-visit-tuesday,
.bv-visit-getting-here,
.bv-visit-questions {
	border-top: 1px solid rgba(222, 179, 116, 0.35);
	margin-top: 2.5rem !important;
	padding-top: 0.5rem;
}
[class*="bv-visit-"] > h2:first-child,
[class*="bv-visit-"] > .wp-block-group__inner-container > h2:first-child { margin-top: 1.2rem; }

/* ---------- Header ---------- */

/* Short banner strip on every page except the home page, like BVCV Weekly */
.page-strip {
	position: relative;
	height: clamp(110px, 20vw, 200px);
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	background: var(--bv-teal);
}
.strip-bg {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: 50% var(--bv-strip-y, 60%);
}
.strip-shade {
	position: absolute;
	inset: 0;
	background: radial-gradient(ellipse at 50% 50%, rgba(26, 54, 59, 0.35) 0%, rgba(26, 54, 59, 0.10) 60%, rgba(26, 54, 59, 0) 100%);
}
.strip-logo-link {
	position: relative;
	display: block;
	line-height: 0;
	text-decoration: none;
}
.strip-logo {
	width: clamp(190px, 30vw, 380px);
	height: auto;
	max-height: 78%;
	filter: drop-shadow(0 2px 12px rgba(19, 41, 45, 0.55));
}
.strip-name {
	font-family: var(--bv-serif);
	font-size: clamp(1.8rem, 5vw, 3rem);
	color: var(--bv-light);
	line-height: 1.2;
	text-shadow: 0 2px 14px rgba(19, 41, 45, 0.7);
}

/* Teal menu bar, like the BVCV Weekly bar under the banner */
.menu-bar {
	background: var(--bv-teal);
	border-bottom: 1px solid rgba(222, 179, 116, 0.35);
}
.menu-bar-inner {
	max-width: var(--bv-wide);
	margin: 0 auto;
	padding: 0.35rem var(--bv-gutter);
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 0.5rem 1.5rem;
}
.has-bar-logo .menu-bar-inner { justify-content: space-between; }

.site-brand .custom-logo-link { display: block; line-height: 0; }
.site-brand .custom-logo { max-height: 52px; width: auto; }

.main-nav .menu {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0 1.9rem;
}
.main-nav .menu a {
	display: block;
	padding: 0.7rem 0;
	color: var(--bv-soft);
	text-decoration: none;
	font-size: 1rem;
	border-bottom: 2px solid transparent;
}
.main-nav .menu a:hover,
.main-nav .current-menu-item > a,
.main-nav .current_page_item > a,
.main-nav .current-menu-ancestor > a {
	color: var(--bv-gold);
	border-bottom-color: var(--bv-gold);
}

/* Drop down menus on larger screens */
.main-nav .menu li { position: relative; }
.main-nav .sub-menu {
	list-style: none;
	margin: 0;
	padding: 0.5rem 0;
	position: absolute;
	top: 100%;
	left: -1rem;
	min-width: 13rem;
	background: var(--bv-teal-dark);
	border-top: 2px solid var(--bv-gold);
	z-index: 50;
	display: none;
}
.main-nav .sub-menu a { padding: 0.5rem 1rem; border-bottom: 0; }
.main-nav li:hover > .sub-menu,
.main-nav li:focus-within > .sub-menu { display: block; }

.menu-toggle {
	display: none;
	align-items: center;
	gap: 0.6rem;
	background: transparent;
	color: var(--bv-light);
	border: 1px solid var(--bv-muted);
	border-radius: 3px;
	padding: 0.55rem 0.85rem;
	margin: 0.35rem 0;
	font: bold 1rem var(--bv-sans);
	cursor: pointer;
}
.menu-toggle-bars,
.menu-toggle-bars::before,
.menu-toggle-bars::after {
	display: block;
	width: 1.2rem;
	height: 2px;
	background: currentColor;
	position: relative;
}
.menu-toggle-bars::before,
.menu-toggle-bars::after { content: ""; position: absolute; left: 0; }
.menu-toggle-bars::before { top: -6px; }
.menu-toggle-bars::after { top: 6px; }

@media (max-width: 860px) {
	.site-brand .custom-logo { max-height: 44px; }
	/* The toggle and the menu sit directly in the bar */
	.main-nav { display: contents; }
	.js .menu-toggle { display: inline-flex; }
	.main-nav .menu {
		order: 3;
		flex-basis: 100%;
		flex-direction: column;
		gap: 0;
		padding: 0 0 0.75rem;
	}
	.js .main-nav .menu { display: none; }
	.js .main-nav.is-open .menu { display: flex; }
	.main-nav .menu a {
		padding: 0.75rem 0;
		font-size: 1.1rem;
		border-bottom: 1px solid rgba(190, 201, 198, 0.2);
	}
	.main-nav .menu a:hover,
	.main-nav .current-menu-item > a,
	.main-nav .current_page_item > a { border-bottom-color: rgba(190, 201, 198, 0.2); }
	.main-nav .sub-menu {
		position: static;
		display: block;
		background: none;
		border: 0;
		padding: 0 0 0 1rem;
	}
	.main-nav .sub-menu a { padding: 0.6rem 0; }
}

/* ---------- Home banner ---------- */
.hero {
	position: relative;
	min-height: min(88vh, 900px);
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	align-items: center;
	text-align: center;
	overflow: hidden;
	background: var(--bv-teal);
	border-bottom: 3px solid var(--bv-gold);
}
.hero-no-image {
	background: radial-gradient(ellipse at 50% 85%, #3d4a3f 0%, var(--bv-teal) 55%, var(--bv-teal-dark) 100%);
}
.hero-bg {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: var(--bv-pos-wide, 50%) 50%;
}
@media (max-width: 700px) {
	.hero-bg { object-position: var(--bv-pos-phone, 50%) 50%; }
}
.hero-picture { display: contents; }
/* The phone image is made with calm sky behind the words, so it needs less shading
   and the sunset, lake, and trees can show through. */
@media (max-width: 700px) {
	.has-phone-image .hero-shade {
		background:
			radial-gradient(ellipse 85% 45% at 50% 50%, rgba(19, 41, 45, 0.35) 0%, rgba(19, 41, 45, 0) 100%),
			linear-gradient(to bottom, rgba(26, 54, 59, 0.10) 0%, rgba(26, 54, 59, 0.10) 55%, rgba(26, 54, 59, 0.45) 85%, rgba(26, 54, 59, 0.70) 100%) !important;
	}
}
.hero-shade {
	position: absolute;
	inset: 0;
	/* A soft dark oval behind the words, plus a fade toward the bottom.
	   The sun and the edges of the photo stay bright. */
	background:
		radial-gradient(ellipse 48% 58% at 50% 56%, rgba(19, 41, 45, 0.55) 0%, rgba(19, 41, 45, 0.30) 55%, rgba(19, 41, 45, 0) 100%),
		linear-gradient(
			to bottom,
			rgba(26, 54, 59, 0.12) 0%,
			rgba(26, 54, 59, 0.25) 35%,
			rgba(26, 54, 59, 0.70) 75%,
			rgba(26, 54, 59, 0.92) 100%
		);
}
@media (max-width: 700px) {
	.hero-shade {
		background:
			radial-gradient(ellipse 90% 50% at 50% 55%, rgba(19, 41, 45, 0.50) 0%, rgba(19, 41, 45, 0) 100%),
			linear-gradient(to bottom, rgba(26, 54, 59, 0.20) 0%, rgba(26, 54, 59, 0.35) 35%, rgba(26, 54, 59, 0.75) 75%, rgba(26, 54, 59, 0.92) 100%);
	}
}
.hero-inner {
	position: relative;
	width: 100%;
	max-width: 54rem;
	padding: 6rem var(--bv-gutter) clamp(3rem, 8vh, 5.5rem);
	display: flex;
	flex-direction: column;
	align-items: center;
}
.hero-logo {
	width: clamp(220px, 40vw, 460px);
	height: auto;
	margin-bottom: 1.75rem;
	filter: drop-shadow(0 2px 14px rgba(19, 41, 45, 0.55));
}
.hero-welcome {
	margin: 0 0 0.5rem;
	font-size: clamp(2rem, 5.4vw, 3.4rem);
	text-shadow: 0 1px 3px rgba(19, 41, 45, 0.8), 0 2px 18px rgba(19, 41, 45, 0.7);
}
.hero-tagline {
	margin: 0 0 1.8rem;
	font-family: var(--bv-serif);
	font-size: clamp(1.1rem, 2.4vw, 1.4rem);
	color: var(--bv-light);
	text-shadow: 0 1px 10px rgba(19, 41, 45, 0.8);
}
.hero-service {
	margin: 0 0 1.9rem;
	display: flex;
	flex-direction: column;
	align-items: center;
	line-height: 1.1;
}
.hero-service-label {
	font-size: 1rem;
	color: var(--bv-soft);
	margin-bottom: 0.35rem;
}
.hero-service-time {
	font-family: var(--bv-serif);
	font-size: clamp(2.4rem, 7vw, 3.6rem);
	color: var(--bv-gold);
}

/* Next gathering countdown */
.gathering {
	margin: 0 0 1.9rem;
	max-width: 32rem;
}
.gathering p { margin: 0; }
.gathering [hidden] { display: none; }
.gathering-label {
	font-size: 1rem;
	color: var(--bv-light);
	margin-bottom: 0.3rem !important;
}
.gathering-name {
	font-family: var(--bv-serif);
	font-size: clamp(2rem, 6vw, 3rem);
	line-height: 1.15;
	color: var(--bv-gold);
	text-shadow: 0 2px 14px rgba(19, 41, 45, 0.6);
}
.hero-inner p { text-wrap: balance; text-shadow: 0 1px 3px rgba(19, 41, 45, 0.9), 0 0 18px rgba(19, 41, 45, 0.6); }
.gathering-detail {
	margin-top: 0.35rem !important;
	color: var(--bv-light);
}
.gathering-count {
	margin-top: 0.6rem !important;
	font-family: var(--bv-serif);
	font-size: clamp(1.15rem, 2.6vw, 1.4rem);
	color: var(--bv-light);
}
.gathering-note {
	margin-top: 0.9rem !important;
	padding-top: 0.9rem;
	border-top: 1px solid rgba(222, 179, 116, 0.5);
	color: var(--bv-light);
	font-size: 1.05rem;
}

@media (max-width: 600px) {
	.hero { min-height: 86svh; }
	.hero-actions { flex-direction: column; align-items: center; width: 100%; }
	.hero-logo { width: 62vw; }
	.hero-inner { padding-top: 4rem; }
	.hero .button { width: 100%; max-width: 20rem; text-align: center; }
}

/* ---------- Page layout ---------- */
.site-main { padding-bottom: 4rem; }

.page-header,
.entry-content > * {
	max-width: var(--bv-read);
	margin-left: auto;
	margin-right: auto;
	padding-left: var(--bv-gutter);
	padding-right: var(--bv-gutter);
}
.entry-content > .alignwide { max-width: var(--bv-wide); }
.entry-content > .alignfull { max-width: none; padding-left: 0; padding-right: 0; }
.entry-content > .wp-block-cover.alignfull,
.entry-content > .wp-block-group.alignfull.has-background { padding-left: var(--bv-gutter); padding-right: var(--bv-gutter); }

.page-header { padding-top: clamp(2.5rem, 7vw, 4.5rem); }
.page-title { margin: 0; }
.page-title::after {
	content: "";
	display: block;
	width: 3rem;
	height: 3px;
	background: var(--bv-gold);
	margin-top: 1.1rem;
}
.page-header + .entry-content { padding-top: 1.75rem; }

.front-content { padding-top: clamp(2.5rem, 6vw, 4rem); }
.entry-content > :first-child { margin-top: 0; }

.entry-content-full > * { padding-left: var(--bv-gutter); padding-right: var(--bv-gutter); }
.entry-content-full > .alignfull { padding-left: 0; padding-right: 0; }
.site-main-full { padding-bottom: 0; }
.site-main-full .entry-content-full > :first-child.alignfull { margin-top: 0; }

/* Content details */
.entry-content blockquote,
.wp-block-quote {
	border-left: 3px solid var(--bv-gold);
	margin: 1.8em auto;
	padding-left: 1.4rem;
	font-family: var(--bv-serif);
	font-size: 1.2rem;
	color: var(--bv-soft);
}
.entry-content blockquote cite,
.wp-block-quote cite { display: block; font-size: 0.95rem; font-style: normal; color: var(--bv-muted); margin-top: 0.5rem; }

.entry-content hr,
.wp-block-separator {
	border: 0;
	border-top: 1px solid rgba(222, 179, 116, 0.5);
	margin: 2.5em auto;
}

.entry-content figcaption,
.wp-element-caption { font-size: 0.9rem; color: var(--bv-muted); margin-top: 0.5rem; }

.entry-content table { width: 100%; border-collapse: collapse; }
.entry-content th,
.entry-content td { border-bottom: 1px solid rgba(190, 201, 198, 0.25); padding: 0.6rem 0.5rem; text-align: left; }

.wp-block-cover { min-height: 50vh; }
.wp-block-image img { border-radius: 2px; }

.post-list { list-style: none; padding: 0; }
.post-list li { padding: 0.9rem 0; border-bottom: 1px solid rgba(190, 201, 198, 0.2); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem; }
.post-date { color: var(--bv-muted); font-size: 0.95rem; }

/* Editor colour classes */
.has-bv-teal-color { color: var(--bv-teal); }
.has-bv-charcoal-color { color: var(--bv-charcoal); }
.has-bv-gold-color { color: var(--bv-gold); }
.has-bv-light-color { color: var(--bv-light); }
.has-bv-soft-color { color: var(--bv-soft); }
.has-bv-muted-color { color: var(--bv-muted); }
.has-bv-teal-background-color { background-color: var(--bv-teal); }
.has-bv-charcoal-background-color { background-color: var(--bv-charcoal); }
.has-bv-gold-background-color { background-color: var(--bv-gold); }
.has-bv-light-background-color { background-color: var(--bv-light); }
.has-bv-soft-background-color { background-color: var(--bv-soft); }
.has-bv-muted-background-color { background-color: var(--bv-muted); }
.has-background { padding-top: 2rem; padding-bottom: 2rem; }

/* ---------- Ministry template ---------- */
.ministry-head {
	max-width: var(--bv-wide);
	margin: 0 auto;
	padding: clamp(2.5rem, 7vw, 4.5rem) var(--bv-gutter) 0;
}

.ministry-body {
	max-width: var(--bv-wide);
	margin: 0 auto;
	padding: 2rem var(--bv-gutter) 0;
	display: grid;
	grid-template-columns: minmax(0, 1fr) 19rem;
	gap: 3rem;
	align-items: start;
}
.ministry-body-single { grid-template-columns: minmax(0, 1fr); }
.ministry-glance { grid-column: 2; grid-row: 1; }
.ministry-content { grid-column: 1; grid-row: 1; }
.ministry-content > * { padding-left: 0; padding-right: 0; margin-left: 0; }

.ministry-glance {
	background: var(--bv-teal);
	border-top: 3px solid var(--bv-gold);
	padding: 1.4rem 1.5rem 0.6rem;
	border-radius: 0 0 3px 3px;
}
.ministry-glance dl { margin: 0; }
.ministry-glance dt { font-size: 0.9rem; color: var(--bv-muted); }
.ministry-glance dd { margin: 0.15rem 0 1.1rem; font-family: var(--bv-serif); font-size: 1.15rem; overflow-wrap: anywhere; }

@media (max-width: 860px) {
	.ministry-body { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
	.ministry-glance,
	.ministry-content { grid-column: 1; grid-row: auto; }
}

/* ---------- Footer ---------- */
.site-footer {
	background: var(--bv-teal);
	color: var(--bv-soft);
	border-top: 1px solid rgba(222, 179, 116, 0.45);
	font-size: 1rem;
}
.footer-inner {
	max-width: var(--bv-wide);
	margin: 0 auto;
	padding: 3rem var(--bv-gutter) 2rem;
	display: grid;
	grid-template-columns: 1.3fr 1fr auto;
	gap: 2rem;
	align-items: start;
}
.site-footer p { margin: 0 0 0.45rem; }
.footer-name { font-family: var(--bv-serif); font-size: 1.35rem; color: var(--bv-light); }
.footer-tagline { color: var(--bv-muted); }
.site-footer a { color: var(--bv-soft); }
.site-footer a:hover { color: var(--bv-gold); }
.site-footer .button-outline { color: var(--bv-gold); }
.site-footer .button-outline:hover { color: var(--bv-teal); }

.footer-nav { max-width: var(--bv-wide); margin: 0 auto; padding: 0 var(--bv-gutter); }
.footer-menu { list-style: none; margin: 0; padding: 1rem 0; display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; border-top: 1px solid rgba(190, 201, 198, 0.2); }

.footer-base {
	max-width: var(--bv-wide);
	margin: 0 auto !important;
	padding: 1rem var(--bv-gutter) 1.75rem;
	font-size: 0.875rem;
	color: var(--bv-muted);
}

@media (max-width: 760px) {
	.footer-inner { grid-template-columns: 1fr; gap: 1.5rem; }
}

@media (prefers-reduced-motion: reduce) {
	* { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
