/*
Theme Name:   WSTF
Theme URI:    https://waterfund.go.ke
Author:       Mr. Njeru
Description:  Custom theme for the Water Sector Trust Fund (waterfund.go.ke). Clean corporate layout in the spirit of Impreza and iwa-network.org: sticky header with dropdown menus, transparent header over the homepage hero, a full footer, and templates for pages, news, search and 404. Renders the page layouts made by the WaterFund Site plugin without needing WPBakery.
Version:      1.2.0
Requires at least: 6.0
Tested up to: 6.8
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:  wstf
*/

/* ==========================================================================
   Tokens. The colour values can be changed in Appearance → Customize → Colours.
   ========================================================================== */

:root {
	--wstf-deep: #06304d;
	--wstf-blue: #0a6fb5;
	--wstf-sky: #7fd0f0;
	--wstf-mist: #eef4f7;
	--wstf-ink: #12222d;
	--wstf-muted: #4a5d69;
	--wstf-line: #d5e1e8;
	--wstf-urban: #1f7fd1;
	--wstf-rural: #4f9a3c;
	--wstf-wrcc: #13968a;
	--wstf-rbf: #c98a1e;
	--wstf-alert: #b3402a;

	--wstf-font: "Archivo", "Helvetica Neue", Arial, sans-serif;
	--wstf-wrap: 1240px;
	--wstf-gutter: 1.5rem;
	--wstft-topbar-h: 2.5rem;
	--wstft-header-h: 5.25rem;
	--wstft-adminbar: var(--wp-admin--admin-bar--height, 0px);
}

/* ==========================================================================
   Base
   ========================================================================== */

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
	margin: 0;
	background: #fff;
	color: var(--wstf-ink);
	font-family: var(--wstf-font);
	font-size: 1.0625rem;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
	margin: 0 0 .6em;
	color: var(--wstf-deep);
	font-family: var(--wstf-font);
	font-weight: 720;
	line-height: 1.15;
	letter-spacing: -.005em;
}
h1 { font-size: clamp(2rem, 4.4vw, 3.25rem); font-stretch: 112%; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-stretch: 108%; }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.1rem; }

p, ul, ol, table, figure, blockquote { margin: 0 0 1.1em; }
a { color: var(--wstf-blue); text-underline-offset: 3px; }
a:hover { color: var(--wstf-deep); }
img, video, iframe { max-width: 100%; }
img { height: auto; }
hr { border: 0; border-top: 1px solid var(--wstf-line); margin: 2rem 0; }

:focus-visible { outline: 3px solid var(--wstf-sky); outline-offset: 2px; }

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}
.skip-link {
	position: absolute;
	left: 1rem;
	top: -4rem;
	z-index: 1000;
	padding: .75rem 1.25rem;
	background: #fff;
	color: var(--wstf-deep);
	font-weight: 700;
}
.skip-link:focus { top: 1rem; }

.wstft-wrap { width: 100%; max-width: var(--wstf-wrap); margin: 0 auto; padding: 0 var(--wstf-gutter); }

/* Buttons (the plugin styles its own; these cover theme templates). */
.wstft-btn {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 0 1.25rem;
	border: 2px solid var(--wstf-deep);
	border-radius: 2px;
	background: var(--wstf-deep);
	color: #fff !important;
	font-weight: 650;
	font-size: .98rem;
	line-height: 1;
	text-decoration: none !important;
	white-space: nowrap;
	cursor: pointer;
	transition: background-color .15s, border-color .15s, color .15s;
}
.wstft-btn:hover { background: var(--wstf-blue); border-color: var(--wstf-blue); }
.wstft-btn--line { background: transparent; color: var(--wstf-deep) !important; }
.wstft-btn--line:hover { background: var(--wstf-deep); border-color: var(--wstf-deep); color: #fff !important; }

/* ==========================================================================
   Top bar
   ========================================================================== */

.wstft-topbar {
	position: relative;
	z-index: 60;
	height: var(--wstft-topbar-h);
	background: var(--wstf-deep);
	color: rgba(255, 255, 255, .85);
	font-size: .88rem;
}
.wstft-topbar .wstft-wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; height: 100%; }
.wstft-topbar ul { display: flex; gap: 1.5rem; margin: 0; padding: 0; list-style: none; }
.wstft-topbar a { color: inherit; text-decoration: none; }
.wstft-topbar a:hover { color: #fff; text-decoration: underline; }
@media (max-width: 760px) {
	.wstft-topbar__links { display: none !important; }
	.wstft-topbar .wstft-wrap { justify-content: center; }
}

/* ==========================================================================
   Header
   ========================================================================== */

.wstft-header {
	position: sticky;
	top: var(--wstft-adminbar);
	z-index: 50;
	background: #fff;
	border-bottom: 1px solid var(--wstf-line);
	transition: background-color .2s, box-shadow .2s, border-color .2s;
}
.wstft-header.is-scrolled { box-shadow: 0 6px 24px rgba(6, 48, 77, .08); }
.wstft-header__bar { display: flex; align-items: center; gap: 1.5rem; min-height: var(--wstft-header-h); }

.wstft-brand { display: flex; align-items: center; min-width: 0; margin-right: auto; text-decoration: none; }
/* The header runs wider than the page content so logo, menu and button fit on one line. */
.wstft-header .wstft-wrap, .wstft-topbar .wstft-wrap { max-width: 1440px; }
@media (min-width: 1301px) { .wstft-brand { flex-shrink: 0; } .wstft-brand img { max-width: 260px; } .wstft-brand.has-arms img.wstft-brand__dark, .wstft-brand.has-arms .wstft-brand__light { max-width: 220px; } }
@media (max-width: 600px) {
	.wstft-brand__text { font-size: 1.1rem; }
	.wstft-brand img { max-height: 44px; }
	.wstft-header__bar { gap: .5rem; }
}
.wstft-brand img { display: block; width: auto; max-height: 56px; }
.wstft-brand__text { color: var(--wstf-deep); font-weight: 780; font-size: 1.35rem; font-stretch: 112%; line-height: 1.05; }
.wstft-brand__text small { display: block; color: var(--wstf-muted); font-weight: 500; font-size: .78rem; font-stretch: 100%; }
.wstft-brand__light { display: none !important; }

/* Coat of arms beside the WaterFund logo, separated by a thin rule. */
.wstft-brand.has-arms { gap: 1rem; }
.wstft-brand__arms { display: block; width: auto; height: 56px; max-height: none; flex-shrink: 0; }
.wstft-brand__rule { align-self: center; width: 1px; height: 44px; background: var(--wstf-line); flex-shrink: 0; }
@media (max-width: 600px) {
	.wstft-brand.has-arms { gap: .6rem; }
	.wstft-brand__arms { height: 40px; }
	.wstft-brand__rule { height: 32px; }
	.wstft-brand.has-arms img.wstft-brand__dark,
	.wstft-brand.has-arms .wstft-brand__light { max-height: 40px; max-width: 150px; }
	.wstft-brand.has-arms .wstft-brand__text small { display: none; }
}

/* Primary menu */
.wstft-nav ul { margin: 0; padding: 0; list-style: none; }
.wstft-nav > ul { display: flex; align-items: center; }
.wstft-nav li { position: relative; margin: 0; }
.wstft-nav > ul > li > a,
.wstft-nav > ul > li > .wstft-nav__parent {
	display: flex;
	align-items: center;
	gap: .35rem;
	min-height: var(--wstft-header-h);
	padding: 0 .7rem;
	border: 0;
	background: none;
	color: var(--wstf-deep);
	font: inherit;
	font-weight: 620;
	font-size: .96rem;
	white-space: nowrap;
	text-decoration: none;
	cursor: pointer;
	position: relative;
}
/* Active and hover marker: a bar on the bottom edge of the header. */
.wstft-nav > ul > li > a::after,
.wstft-nav > ul > li > .wstft-nav__parent::after {
	content: "";
	position: absolute;
	left: .7rem;
	right: .7rem;
	bottom: -1px;
	height: 3px;
	background: var(--wstf-blue);
	transform: scaleX(0);
	transition: transform .2s;
}
.wstft-nav > ul > li:hover > a::after,
.wstft-nav > ul > li:hover > .wstft-nav__parent::after,
.wstft-nav > ul > li.current-menu-item > a::after,
.wstft-nav > ul > li.current-menu-ancestor > a::after,
.wstft-nav > ul > li.current-menu-ancestor > .wstft-nav__parent::after,
.wstft-nav > ul > li.is-open > .wstft-nav__parent::after { transform: scaleX(1); }

.wstft-nav__chev { width: 10px; height: 10px; transition: transform .2s; }
.is-open > .wstft-nav__parent .wstft-nav__chev,
.is-open > .wstft-nav__toggle .wstft-nav__chev { transform: rotate(180deg); }
.wstft-nav__toggle {
	display: none;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border: 0;
	background: none;
	color: var(--wstf-deep);
	cursor: pointer;
}

.wstft-nav .sub-menu {
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 17rem;
	padding: .6rem 0;
	background: #fff;
	border-top: 3px solid var(--wstf-blue);
	box-shadow: 0 18px 40px rgba(6, 48, 77, .14);
	opacity: 0;
	visibility: hidden;
	transform: translateY(6px);
	transition: opacity .15s, transform .15s, visibility 0s .15s;
}
.wstft-nav > ul > li:nth-last-child(-n+2) > .sub-menu { left: auto; right: 0; }
.wstft-nav li.is-open > .sub-menu,
.wstft-nav li:focus-within > .sub-menu {
	opacity: 1;
	visibility: visible;
	transform: none;
	transition: opacity .15s, transform .15s;
}
@media (hover: hover) and (min-width: 1301px) {
	.wstft-nav li:hover > .sub-menu { opacity: 1; visibility: visible; transform: none; transition: opacity .15s, transform .15s; }
}
.wstft-nav .sub-menu a {
	display: block;
	padding: .6rem 1.25rem;
	color: var(--wstf-ink);
	font-size: .95rem;
	line-height: 1.35;
	text-decoration: none;
}
.wstft-nav .sub-menu a:hover,
.wstft-nav .sub-menu .current-menu-item > a { background: var(--wstf-mist); color: var(--wstf-deep); }
.wstft-nav .sub-menu .current-menu-item > a { font-weight: 650; box-shadow: inset 3px 0 0 var(--wstf-blue); }

/* Header actions */
.wstft-actions { display: flex; align-items: center; gap: .5rem; flex-shrink: 0; }
.wstft-icon-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border: 0;
	border-radius: 2px;
	background: none;
	color: var(--wstf-deep);
	cursor: pointer;
}
.wstft-icon-btn:hover { background: var(--wstf-mist); }
.wstft-icon-btn svg { width: 22px; height: 22px; }
.wstft-burger { display: none; }
/* The header button needs room; below this width it lives in the contact bar and the mobile menu. */
@media (max-width: 1499px) { .wstft-header__cta { display: none !important; } }
@media (min-width: 1500px) { .wstft-topbar__cta { display: none; } }
.wstft-topbar__cta a { color: #fff !important; font-weight: 650; }

/* Search panel */
.wstft-search-panel {
	position: absolute;
	left: 0;
	right: 0;
	top: 100%;
	padding: 1.5rem 0;
	background: #fff;
	border-top: 1px solid var(--wstf-line);
	box-shadow: 0 18px 40px rgba(6, 48, 77, .12);
}
.wstft-search-panel[hidden] { display: none; }

.wstft-searchform { display: flex; gap: .5rem; max-width: 42rem; }
.wstft-searchform input[type="search"] {
	flex: 1;
	min-height: 48px;
	padding: 0 1rem;
	border: 1px solid #9fb3c0;
	border-radius: 2px;
	font: inherit;
	color: var(--wstf-ink);
}
.wstft-searchform input[type="search"]:focus-visible { border-color: var(--wstf-blue); }
.wstft-searchform .wstft-btn { min-height: 48px; }

/* ---- Transparent header over the homepage hero ---- */
.wstft-overlay .wstft-topbar { position: absolute; top: var(--wstft-adminbar); left: 0; right: 0; background: rgba(4, 30, 48, .45); }
.wstft-overlay .wstft-header:not(.is-scrolled) {
	position: absolute;
	top: calc(var(--wstft-adminbar) + var(--wstft-topbar-h));
	left: 0;
	right: 0;
	background: transparent;
	border-bottom-color: rgba(255, 255, 255, .18);
}
.wstft-overlay.no-topbar .wstft-header:not(.is-scrolled) { top: var(--wstft-adminbar); }
.wstft-overlay .wstft-header.is-scrolled { position: fixed; left: 0; right: 0; top: var(--wstft-adminbar); animation: wstft-drop .25s ease-out; }
@keyframes wstft-drop { from { transform: translateY(-100%); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) { .wstft-overlay .wstft-header.is-scrolled { animation: none; } }

@media (min-width: 1301px) {
	.wstft-overlay .wstft-header:not(.is-scrolled) .wstft-nav > ul > li > a,
	.wstft-overlay .wstft-header:not(.is-scrolled) .wstft-nav > ul > li > .wstft-nav__parent { color: #fff; }
	.wstft-overlay .wstft-header:not(.is-scrolled) .wstft-nav > ul > li > a::after,
	.wstft-overlay .wstft-header:not(.is-scrolled) .wstft-nav > ul > li > .wstft-nav__parent::after { background: var(--wstf-sky); }
}
.wstft-overlay .wstft-header:not(.is-scrolled) .wstft-actions .wstft-icon-btn { color: #fff; }
.wstft-overlay .wstft-header:not(.is-scrolled) .wstft-actions .wstft-icon-btn:hover { background: rgba(255, 255, 255, .12); }
.wstft-overlay .wstft-header:not(.is-scrolled) .wstft-brand__text,
.wstft-overlay .wstft-header:not(.is-scrolled) .wstft-brand__text small { color: #fff; }
.wstft-overlay .wstft-header:not(.is-scrolled) .wstft-actions .wstft-btn { background: #fff; border-color: #fff; color: var(--wstf-deep) !important; }
.wstft-overlay .wstft-header:not(.is-scrolled) .wstft-brand.has-light .wstft-brand__dark { display: none !important; }
.wstft-overlay .wstft-header:not(.is-scrolled) .wstft-brand.has-light .wstft-brand__light { display: block !important; }
/* No white logo uploaded: sit the normal logo on a white tile so it stays legible. */
.wstft-overlay .wstft-header:not(.is-scrolled) .wstft-brand:not(.has-light) { padding: 6px 12px; background: #fff; border-radius: 2px; }
.wstft-overlay .wstft-header:not(.is-scrolled) .wstft-brand:not(.has-light) .wstft-brand__text,
.wstft-overlay .wstft-header:not(.is-scrolled) .wstft-brand:not(.has-light) .wstft-brand__text small { color: var(--wstf-deep); }
.wstft-overlay .wstft-header:not(.is-scrolled) .wstft-brand.has-light .wstft-brand__rule { background: rgba(255, 255, 255, .45); }

/* ---- Tablet and mobile menu ---- */
@media (max-width: 1300px) {
	.wstft-burger { display: inline-flex; }
	.wstft-header__cta { display: none !important; }

	.wstft-nav {
		position: fixed;
		top: var(--wstft-adminbar);
		right: 0;
		bottom: 0;
		z-index: 100;
		width: min(24rem, 100%);
		padding: 5rem 0 2rem;
		overflow-y: auto;
		background: #fff;
		box-shadow: -20px 0 50px rgba(6, 48, 77, .18);
		transform: translateX(100%);
		visibility: hidden;
		transition: transform .25s ease, visibility 0s .25s;
	}
	.menu-open .wstft-nav { transform: none; visibility: visible; transition: transform .25s ease; }
	.wstft-nav > ul { display: block; }
	.wstft-nav > ul > li { border-bottom: 1px solid var(--wstf-line); }
	.wstft-nav > ul > li > a,
	.wstft-nav > ul > li > .wstft-nav__parent {
		width: 100%;
		min-height: 56px;
		padding: 0 1.5rem;
		justify-content: space-between;
		color: var(--wstf-deep) !important;
		text-align: left;
	}
	.wstft-nav > ul > li > a::after,
	.wstft-nav > ul > li > .wstft-nav__parent::after { display: none; }
	.wstft-nav li.menu-item-has-children > a { padding-right: 4rem; }
	.wstft-nav__toggle { display: inline-flex; position: absolute; right: .75rem; top: 6px; }
	.wstft-nav .sub-menu {
		position: static;
		display: none;
		min-width: 0;
		padding: 0 0 .75rem;
		border: 0;
		box-shadow: none;
		opacity: 1;
		visibility: visible;
		transform: none;
		transition: none;
	}
	.wstft-nav li.is-open > .sub-menu { display: block; }
	.wstft-nav .sub-menu a { padding: .6rem 1.5rem .6rem 2.25rem; }
	.wstft-nav__close { position: absolute; top: 1rem; right: 1rem; }
	.wstft-nav__cta { display: block; padding: 1.5rem; }

	.wstft-scrim {
		position: fixed;
		inset: 0;
		z-index: 90;
		background: rgba(4, 30, 48, .5);
		opacity: 0;
		visibility: hidden;
		transition: opacity .25s, visibility 0s .25s;
	}
	.menu-open .wstft-scrim { opacity: 1; visibility: visible; transition: opacity .25s; }
	.menu-open { overflow: hidden; }
	/* The header is its own stacking layer; lift it above the scrim so the panel is usable. */
	.menu-open .wstft-header { z-index: 110; }
}
@media (min-width: 1301px) {
	.wstft-nav > ul > li.wstft-home { display: none; }
	.wstft-nav__close, .wstft-nav__cta, .wstft-scrim { display: none !important; }
}

/* ==========================================================================
   Page header band (used when a page has no header of its own)
   ========================================================================== */

.wstft-pagehead { position: relative; background: var(--wstf-deep); color: #fff; }
.wstft-pagehead::after,
.wstft-footer::before {
	content: "";
	display: block;
	height: 4px;
	background: linear-gradient(90deg, var(--wstf-urban) 0 25%, var(--wstf-rural) 25% 50%, var(--wstf-wrcc) 50% 75%, var(--wstf-rbf) 75% 100%);
}
.wstft-pagehead__inner { padding-top: 3.5rem; padding-bottom: 3rem; }
.wstft-pagehead h1 { max-width: 24ch; margin: 0; color: #fff; text-wrap: balance; line-height: 1.05; }
.wstft-pagehead__meta { margin: 1rem 0 0; color: rgba(255, 255, 255, .8); }
.wstft-crumbs { margin-bottom: 1.25rem; font-size: .9rem; color: rgba(255, 255, 255, .72); }
.wstft-crumbs a { color: rgba(255, 255, 255, .92); text-decoration: none; }
.wstft-crumbs a:hover { color: #fff; text-decoration: underline; }
.wstft-crumbs span[aria-hidden] { margin: 0 .45rem; opacity: .5; }

/* ==========================================================================
   Content
   ========================================================================== */

.wstft-main { display: block; min-height: 40vh; }
.wstft-content { padding-top: clamp(2.5rem, 5vw, 4rem); padding-bottom: clamp(3rem, 6vw, 5rem); }
.wstft-prose { max-width: 46rem; }
.wstft-prose > *:first-child { margin-top: 0; }
.wstft-prose h2 { margin-top: 2.25rem; }
.wstft-prose h3 { margin-top: 1.75rem; }
.wstft-prose li { margin-bottom: .35rem; }
.wstft-prose blockquote { margin: 1.5rem 0; padding: .25rem 0 .25rem 1.25rem; border-left: 4px solid var(--wstf-blue); color: var(--wstf-muted); font-size: 1.15rem; }
.wstft-prose table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.wstft-prose th, .wstft-prose td { padding: .65rem .75rem; border-bottom: 1px solid var(--wstf-line); text-align: left; vertical-align: top; }
.wstft-prose th { background: var(--wstf-mist); color: var(--wstf-deep); }
.wstft-prose .wp-block-image, .wstft-prose figure { margin: 1.75rem 0; }
.wstft-prose figcaption { margin-top: .5rem; color: var(--wstf-muted); font-size: .9rem; }
.alignleft { float: left; margin: .3rem 1.5rem 1rem 0; }
.alignright { float: right; margin: .3rem 0 1rem 1.5rem; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }

.wstft-featured { margin: 0 0 2rem; }
.wstft-featured img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }

/* News cards */
.wstft-posts { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 2.5rem 2rem; margin: 0; padding: 0; list-style: none; }
.wstft-post { display: flex; flex-direction: column; }
.wstft-post__media { display: block; aspect-ratio: 3 / 2; margin-bottom: 1rem; overflow: hidden; background: var(--wstf-mist); border-bottom: 4px solid var(--wstf-blue); }
.wstft-post__media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s; }
.wstft-post:hover .wstft-post__media img { transform: scale(1.03); }
.wstft-post__date { margin: 0 0 .35rem; color: var(--wstf-muted); font-size: .9rem; }
.wstft-post__title { margin: 0 0 .5rem; font-size: 1.25rem; line-height: 1.25; }
.wstft-post__title a { color: var(--wstf-deep); text-decoration: none; }
.wstft-post__title a:hover { color: var(--wstf-blue); text-decoration: underline; }
.wstft-post__excerpt { margin: 0; color: var(--wstf-muted); font-size: .98rem; }

/* Search results */
.wstft-results { margin: 2rem 0 0; padding: 0; list-style: none; border-top: 1px solid var(--wstf-line); max-width: 52rem; }
.wstft-result { padding: 1.25rem 0; border-bottom: 1px solid var(--wstf-line); }
.wstft-result__type { margin: 0 0 .25rem; color: var(--wstf-muted); font-size: .88rem; }
.wstft-result__title { margin: 0 0 .35rem; font-size: 1.2rem; }
.wstft-result__title a { color: var(--wstf-deep); text-decoration: none; }
.wstft-result__title a:hover { text-decoration: underline; }
.wstft-result__excerpt { margin: 0; color: var(--wstf-muted); }

/* Pagination */
.wstft-pagination { margin-top: 3rem; }
.wstft-pagination .nav-links { display: flex; flex-wrap: wrap; gap: .35rem; }
.wstft-pagination .page-numbers {
	min-width: 2.75rem;
	padding: .6rem .8rem;
	border: 1px solid var(--wstf-line);
	color: var(--wstf-deep);
	text-align: center;
	text-decoration: none;
}
.wstft-pagination .page-numbers.current { background: var(--wstf-deep); border-color: var(--wstf-deep); color: #fff; }
.wstft-pagination a.page-numbers:hover { background: var(--wstf-mist); }

.wstft-postnav { display: flex; justify-content: space-between; gap: 2rem; margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--wstf-line); }
.wstft-postnav a { text-decoration: none; font-weight: 600; }
.wstft-postnav span { display: block; color: var(--wstf-muted); font-size: .88rem; font-weight: 400; }

/* 404 */
.wstft-404 h2 { font-size: 1.3rem; margin-top: 2.5rem; }
.wstft-404 ul { padding-left: 1.1rem; }

/* Blog layout with sidebar */
.wstft-with-sidebar { display: grid; grid-template-columns: minmax(0, 1fr) 18rem; gap: 3.5rem; }
@media (max-width: 900px) { .wstft-with-sidebar { grid-template-columns: 1fr; } }
.wstft-sidebar .widget { margin-bottom: 2.5rem; }
.wstft-sidebar .widget-title { font-size: 1.1rem; padding-bottom: .6rem; border-bottom: 2px solid var(--wstf-deep); }
.wstft-sidebar ul { padding: 0; list-style: none; }
.wstft-sidebar li { padding: .5rem 0; border-bottom: 1px solid var(--wstf-line); }
.wstft-sidebar a { text-decoration: none; color: var(--wstf-ink); }
.wstft-sidebar a:hover { color: var(--wstf-blue); }

/* ==========================================================================
   Page-builder layout (reads the WaterFund plugin's row / column layouts)
   ========================================================================== */

.l-section { position: relative; padding: clamp(3rem, 6vw, 5rem) 0; }
.l-section-h { width: 100%; max-width: var(--wstf-wrap); margin: 0 auto; padding: 0 var(--wstf-gutter); }
.g-cols { display: flex; flex-wrap: wrap; margin: 0 -1.25rem; }
.g-cols > .wpb_column { width: 100%; padding: 0 1.25rem; }
.wpb_wrapper > *:last-child { margin-bottom: 0; }
.g-cols.vc_inner { margin-top: 0; }
.wpb_text_column { margin-bottom: 1.5rem; }
.wpb_text_column:last-child { margin-bottom: 0; }

@media (min-width: 901px) {
	.g-cols > .vc_col-sm-1 { width: 8.333%; }
	.g-cols > .vc_col-sm-2 { width: 16.667%; }
	.g-cols > .vc_col-sm-3 { width: 25%; }
	.g-cols > .vc_col-sm-4 { width: 33.333%; }
	.g-cols > .vc_col-sm-5 { width: 41.667%; }
	.g-cols > .vc_col-sm-6 { width: 50%; }
	.g-cols > .vc_col-sm-7 { width: 58.333%; }
	.g-cols > .vc_col-sm-8 { width: 66.667%; }
	.g-cols > .vc_col-sm-9 { width: 75%; }
	.g-cols > .vc_col-sm-10 { width: 83.333%; }
	.g-cols > .vc_col-sm-11 { width: 91.667%; }
	.g-cols > .vc_col-sm-12 { width: 100%; }
}
@media (max-width: 900px) {
	.g-cols > .wpb_column + .wpb_column { margin-top: 2rem; }
	.l-section.wstf-flush .g-cols > .wpb_column + .wpb_column { margin-top: 0; }
	/* Section menu goes below the content on phones so the page starts with its text. */
	.g-cols > .wstf-col-nav { order: 2; margin-top: 2.5rem; }
}
@media (min-width: 601px) and (max-width: 900px) {
	.g-cols.vc_inner > .vc_col-sm-3 { width: 50%; }
	.g-cols.vc_inner > .vc_col-sm-4 { width: 50%; }
	.g-cols.vc_inner > .vc_col-sm-3:nth-child(2) { margin-top: 0; }
	.g-cols.vc_inner { row-gap: 2rem; }
	.g-cols.vc_inner > .wpb_column + .wpb_column { margin-top: 0; }
}

/* The homepage hero sits under the transparent header. */
.wstft-overlay .wstft-main > .l-section.wstf-flush:first-child .wstf-hero__inner { padding-top: calc(var(--wstft-topbar-h) + var(--wstft-header-h) + 4rem); }

/* ==========================================================================
   Footer
   ========================================================================== */

.wstft-footer { background: var(--wstf-deep); color: rgba(255, 255, 255, .82); font-size: .98rem; }
.wstft-footer__grid {
	display: grid;
	grid-template-columns: 1.4fr 1fr 1.1fr 1.1fr;
	gap: 2.5rem;
	padding-top: 4rem;
	padding-bottom: 3rem;
}
@media (max-width: 1000px) { .wstft-footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .wstft-footer__grid { grid-template-columns: 1fr; } }

.wstft-footer h2 {
	margin: 0 0 1rem;
	color: #fff;
	font-size: 1.05rem;
	font-stretch: 100%;
	font-weight: 700;
}
.wstft-footer a { color: #fff; text-decoration: none; }
.wstft-footer a:hover { color: var(--wstf-sky); text-decoration: underline; }
.wstft-footer ul { margin: 0; padding: 0; list-style: none; }
.wstft-footer li { margin-bottom: .55rem; }
.wstft-footer p { margin: 0 0 .9rem; }
.wstft-footer address { font-style: normal; }

.wstft-footer__logos { display: inline-flex; align-items: center; gap: 1rem; margin-bottom: 1.25rem; }
.wstft-footer__logos.is-tiled { padding: 10px 14px; background: #fff; }
.wstft-footer__logos img { display: block; width: auto; max-height: 56px; margin: 0; }
.wstft-footer__logos .wstft-brand__text { margin: 0; }
.wstft-footer__brand .wstft-brand__text { color: #fff; }
.wstft-footer__brand .wstft-brand__text small { color: rgba(255, 255, 255, .7); }
.wstft-footer__about { max-width: 26rem; }

.wstft-hotline { margin-top: 1rem; padding: 1rem 1.1rem; border-left: 4px solid var(--wstf-rbf); background: rgba(255, 255, 255, .06); }
.wstft-hotline strong { display: block; color: #fff; }

.wstft-social { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; margin-top: 1.25rem !important; }

.wstft-footer__base { border-top: 1px solid rgba(255, 255, 255, .14); font-size: .9rem; }
.wstft-footer__base .wstft-wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .75rem 2rem; padding-top: 1.25rem; padding-bottom: 1.25rem; }
.wstft-footer__base ul { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; }
.wstft-footer__base li { margin: 0; }
.wstft-footer__base p { margin: 0; }

/* Back to top */
.wstft-totop {
	position: fixed;
	right: 1.25rem;
	bottom: 1.25rem;
	z-index: 40;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	border-radius: 2px;
	background: var(--wstf-deep);
	color: #fff;
	box-shadow: 0 8px 20px rgba(6, 48, 77, .25);
	opacity: 0;
	visibility: hidden;
	transform: translateY(8px);
	transition: opacity .2s, transform .2s, visibility 0s .2s;
}
.wstft-totop.is-visible { opacity: 1; visibility: visible; transform: none; transition: opacity .2s, transform .2s; }
.wstft-totop:hover { background: var(--wstf-blue); color: #fff; }
.wstft-totop svg { width: 20px; height: 20px; }

/* ==========================================================================
   Print
   ========================================================================== */

@media print {
	.wstft-topbar, .wstft-header, .wstft-footer, .wstft-totop, .wstf-sidenav, .wstf-hero__rail, .wstf-form { display: none !important; }
	.wstf-pagehead, .wstft-pagehead { background: none !important; color: #000 !important; }
	.wstf-pagehead__title, .wstft-pagehead h1 { color: #000 !important; }
	a[href^="http"]::after { content: " (" attr(href) ")"; font-size: .8em; }
}

/* Full-bleed rows (homepage hero, page header band, map) have no column gutters. */
.l-section.wstf-flush .g-cols > .wpb_column { padding: 0; }

/* Mid-size desktops: tighten the menu so it stays on one line. */
@media (min-width: 1301px) and (max-width: 1439px) {
	.wstft-nav > ul > li > a,
	.wstft-nav > ul > li > .wstft-nav__parent { padding: 0 .5rem; font-size: .92rem; }
	.wstft-nav > ul > li > a::after,
	.wstft-nav > ul > li > .wstft-nav__parent::after { left: .5rem; right: .5rem; }
	.wstft-header__bar { gap: 1rem; }
}
@media (min-width: 1440px) and (max-width: 1599px) {
	.wstft-nav > ul > li > a,
	.wstft-nav > ul > li > .wstft-nav__parent { padding: 0 .6rem; }
}
