/*
 * Site-wide overrides, printed from functions.php at wp_head priority 104.
 * Until 2026-10-20 these rules were the Customizer's "Additional CSS" (printed
 * at priority 101). Position matters: Divi 5 prints its critical CSS, which
 * carries the Customizer colours (footer text #87c4f7, footer bullets, heading
 * colours), inline at priority 103, so anything meant to beat them has to come
 * after that. style.css loads far too early.
 */

/* ==========================================================================
   Site-wide CSS, formerly the Customizer "Additional CSS" (moved here on
   2026-10-20 so it is versioned and deploys with the theme; the original text
   is kept in the option sdm_customizer_css_backup on each environment).

   Header rules now target the stable classes set on the Theme Builder header
   modules (.sdm-header, .sdm-header-menu, .sdm-header-menu--mobile/--desktop)
   instead of Divi's per-page indices (.et_pb_menu_0 … _3), which change under
   the Theme Builder and again under Divi 5. Two rules were dropped as dead:
   the "#main-header {display:none}" part (the legacy header no longer renders)
   and a "#post-2 … .et_pb_section_3 … .et_pb_column_21" selector that no longer
   matched anything on the homepage.
   ========================================================================== */

/* The homepage carries its own header inside its content. */
body.home #secondary-header,
body.page-id-14299 #secondary-header {
	display: none;
}

.footerbtn {
	background-color: #fff;
	display: inline-block;
	cursor: pointer;
	color: #003c6a !important;
	font-size: 12px;
	padding: 7px 10px;
	margin-bottom: 10px;
	text-decoration: none;
	font-family: Montserrat;
	text-transform: uppercase;
	font-weight: 700;
}
.footerbtn:hover {
	opacity: 0.7;
}
.soc_icon a {
	padding: 0 3px;
}
.et_pb_search,
.et_pb_search.et_pb_bg_layout_dark input.et_pb_s {
	border-top: 0;
	border-right: 0;
	border-bottom: solid 1px #fff;
	border-left: 0;
}
.sdm-icon-search input.et_pb_searchsubmit,
.widget_search input#searchsubmit {
	background: transparent;
	color: transparent;
	width: 40px;
	z-index: 2;
}
.sdm-icon-search input.et_pb_s,
.widget_search input#s {
	padding-right: 40px !important;
}
.sdm-icon-search .et_pb_searchform:before,
.widget_search::before {
	content: '\55';
	position: absolute;
	font-family: 'ETModules';
	z-index: 1;
	right: 0;
	font-size: 13px;
	padding: 8px 20px;
}
.et_pb_search.et_pb_bg_layout_dark input.et_pb_searchsubmit {
	border: none;
	color: transparent !important;
}

#main-footer {
	background: #000 !important;
}

.featuredpage img,
.featuredpost img,
.post-image {
	background-color: #F5F5F5;
	border: 1px solid #DDDDDD;
	border-radius: 50% 50% 50% 50% !important;
	padding: 4px;
}
.gform_wrapper .gform_footer input[type=submit],
.et_pb_blog_0 .et_pb_post div.post-content a.more-link {
	background: #003c6a;
	padding: 10px;
	font-family: 'Montserrat', Helvetica, Arial, Lucida, sans-serif;
	font-size: 14px;
	color: #fff;
	text-transform: uppercase;
}
.et_pb_posts a.more-link {
	display: inline-block;
}
.et_pb_blog_0 .et_pb_post .post-meta a {
	font-weight: 600;
}
body .gform_wrapper ul li.gfield {
	margin-top: 5px !important;
}
.gform_wrapper input:not([type=radio]):not([type=checkbox]):not([type=submit]):not([type=button]):not([type=image]):not([type=file]) {
	padding: 10px !important;
	background: #f8f8f8;
	border: 0;
}

/* wp-pagenavi pagination */
.wp-pagenavi a,
.wp-pagenavi span {
	padding: 0.3em 0.5em !important;
	font-size: 1.3em !important;
	color: #000;
	line-height: 2em;
	background: #eeeeee;
	transition: all .5s;
}
.wp-pagenavi span.current {
	color: #ffffff !important;
	background: #8781bd !important;
}
.wp-pagenavi a:hover {
	color: #ffffff !important;
	background: #8781bd !important;
}
.wp-pagenavi .pages {
	background: none;
}

/* Download counter button */
.sdm_download.darkblue {
	background: #003c6a;
	text-shadow: none;
	color: #fff !important;
	font-size: 14px;
	box-shadow: none;
	transition: all 300ms ease 0ms;
	line-height: 1.7em;
}
.sdm_download.darkblue:hover {
	background: #68a8d9;
	border: 2px solid transparent;
}
.sdm_download {
	font-family: 'Montserrat', Helvetica, Arial, Lucida, sans-serif;
	font-weight: normal;
	border: 0;
}
#dl-count-btn .sdm_download.darkblue {
	font-size: 18px;
}

/* GDPR cookie consent (WebToffee) */
a.wt-cli-element.cli_settings_button {
	border: 0 !important;
}
.cli-tab-footer .wt-cli-privacy-accept-btn {
	background-color: #003c6a !important;
}
.cli-bar-message {
	width: 75%;
}
#cookie-law-info-bar {
	box-shadow: rgba(0, 0, 0, .5) 0px 5px 50px;
}
#cliSettingsPopup .cli-tab-footer .cli-btn:hover,
#liSettingsPopup .cli-tab-footer .cli-btn:focus {
	color: #fff;
}
.cli-modal .cli-modal-close {
	border-radius: 0;
	background: #efefef;
	border: 1px solid #f1f1f1;
	cursor: pointer;
}
table.cookielawinfo-winter tbody td,
table.cookielawinfo-winter thead th {
	padding: 10px !important;
}
#cookie-law-info-bar a {
	cursor: pointer;
	padding-left: 2px;
	padding-right: 2px;
	text-decoration: underline;
}
#cookie-law-info-bar #wt-cli-accept-btn {
	text-decoration: none;
}

/* Buttons */
.et_pb_button_module_wrapper a.et_pb_button,
.et_pb_button_module_wrapper a.et_pb_button:hover {
	font-family: Inter;
	font-size: 16px;
	min-width: 210px;
	text-align: center;
	padding: 16px !important;
}
@media (max-width: 980px) {
	.et_pb_button {
		min-width: 170px;
	}
}

/* Footer */
.footer-widget li::before {
	border-color: #000;
}
.footer-widget {
	color: #FFF;
}
#footer-bottom {
	background: #1438ED !important;
}
.footer-widget a {
	color: #FFF !important;
	font-size: 14px;
	font-style: normal;
	font-weight: 500;
	line-height: normal;
	text-decoration-line: underline;
	text-decoration-style: solid;
	text-underline-position: from-font;
}
.footer-widget a:hover {
	text-decoration-line: none;
}

/* Typography */
body {
	font-family: Inter !important;
}
h1, h2, h3, h4, h5, h6 {
	font-family: "Rethink Sans" !important;
}

/* Header menus (Theme Builder "Site Header") */
body .sdm-header-menu.et_pb_menu ul li a {
	text-transform: none;
	font-family: Inter;
	font-weight: 500;
}
body .sdm-header-menu--desktop.et_pb_menu .nav li ul {
	background-color: #FFF !important;
	border-color: #FFF !important;
	color: #000 !important;
}
body .sdm-header-menu.et_pb_menu .nav li ul.sub-menu a,
body .sdm-header-menu--desktop.et_pb_menu .et_mobile_menu a {
	color: #000 !important;
}

/* Phone header (2026-10-27, seen on production after the cutover). The
   "sdm-mobile-menu" row holds the MENU burger that only shows below 768px.
   style.css makes it position:absolute so it floats over the top of the
   logo row, right-aligned; Divi 5's row CSS now wins on both counts, so the
   row sat in the flow (pushing the logo down 62px) with the burger centred.
   Restore the Divi 4 placement with enough specificity to beat the generated
   .et_pb_row_N / .et_pb_menu_N rules; !important because Divi 5's menu
   script also writes "position: relative" inline on rows holding a menu. */
#page-container .et_pb_section .sdm-mobile-menu.et_pb_row {
	position: absolute !important;
	top: 0;
	left: 0;
	right: 0;
	z-index: 3;
	width: 100% !important;
	margin: 0 !important;
}
.et_pb_section .sdm-mobile-menu .et_pb_menu .et_pb_menu__wrap {
	justify-content: flex-end !important;
}
/* Phone header layout (2026-10-28, from the Figma phone design):
     row 1  logo (left, 230px wide) and the burger (right) on one line;
     row 2  search field (left, 97px wide, magnifier inside) and the four
            social icons (right) on one line;
   then the hero. Shared by the homepage header section and the Theme
   Builder header: both carry the "sdm-mobile-menu" row, then the logo row,
   then the "two-columns" row (search + social); other rows also use the
   "two-columns" class (e.g. the hero buttons), hence the sibling chain.
   Divi 5 prints its generated margins/sizes with !important, hence the
   #page-container prefix and !important here. Insets (74px left, 52px
   right of the burger) and the vertical rhythm are the Figma values at
   390px wide. */
@media (max-width: 767px) {
	/* row 1: logo */
	#page-container .et_pb_section .sdm-mobile-menu + .et_pb_row {
		width: 100% !important;
		max-width: none !important;
		margin: 0 !important;
		padding: 33px 52px 0 74px !important;
	}
	#page-container .sdm-mobile-menu + .et_pb_row .et_pb_image {
		text-align: left;
		width: 230px !important;
		max-width: 230px !important;
		margin: 0 !important;
	}
	#page-container .sdm-mobile-menu + .et_pb_row .et_pb_image img {
		width: 100% !important;
		height: auto !important;
	}
	/* row 1: burger (no "MENU" label, as in the design) */
	#page-container .et_pb_section .sdm-mobile-menu.et_pb_row {
		padding: 23px 0 0 !important;
	}
	#page-container .sdm-mobile-menu .et_pb_menu.et_pb_menu {
		margin-right: 36px !important;
	}
	.et_pb_section .sdm-mobile-menu .et_mobile_nav_menu::before {
		content: none !important;
	}
	/* row 2: search + social on one line */
	#page-container .et_pb_section .sdm-mobile-menu + .et_pb_row + .two-columns.et_pb_row {
		display: flex !important;
		flex-wrap: nowrap;
		align-items: flex-end;
		width: 100% !important;
		max-width: none !important;
		margin: 0 !important;
		padding: 32px 0 42px 74px !important;
	}
	#page-container .sdm-mobile-menu + .et_pb_row + .two-columns.et_pb_row .et_pb_column {
		flex: 0 0 auto;
		width: auto !important;
		margin: 0 !important;
		padding: 0 !important;
	}
	#page-container .sdm-mobile-menu + .et_pb_row + .two-columns.et_pb_row .et_pb_column:first-child {
		margin-right: 38px !important;
	}
	#page-container .two-columns .sdm-icon-search.et_pb_search {
		width: 97px !important;
		max-width: 97px !important;
		margin: 0 !important;
	}
	#page-container .two-columns .sdm-icon-search .et_pb_searchform div {
		position: relative;
	}
	#page-container .two-columns .sdm-icon-search input.et_pb_s {
		width: 100% !important;
		padding-right: 22px !important;
	}
	#page-container .two-columns .sdm-icon-search input.et_pb_s::placeholder {
		color: transparent;
	}
	#page-container .two-columns .sdm-icon-search input.et_pb_searchsubmit {
		position: absolute;
		top: 0;
		right: 0;
		width: 30px;
		height: 100%;
		padding: 0 !important;
		margin: 0;
	}
	#page-container .two-columns .sdm-icon-search .et_pb_searchform::before {
		right: 2px;
		padding: 8px 0;
	}
	#page-container .two-columns ul.et_pb_social_media_follow {
		margin: 0 0 1px !important;
		padding: 0 !important;
		line-height: 22px;
	}
	#page-container .two-columns .et_pb_social_media_follow .et_pb_social_media_follow_network {
		margin: 0 4px 0 0 !important;
		vertical-align: bottom;
	}
	#page-container .two-columns .et_pb_social_media_follow .et_pb_social_media_follow_network:last-child {
		margin-right: 0 !important;
	}
}
/* The header search modules carry a "fade" entrance animation, which keeps
   them at opacity:0 until Divi's script sees them scroll into view. On the
   phone that never happened reliably (the bar was simply missing), so show
   them straight away; the animation is cosmetic. */
.et_pb_section .sdm-icon-search.et_animated {
	opacity: 1 !important;
}

/* Social icons after Divi 5 (2026-10-20).
   1. Social Media Follow modules: Divi 5 spaces the items with a 10px margin
      on the <li>; the first icon in each header module carries a -2px right
      margin from the original design, which under Divi 4 only trimmed the
      gap (the gap lived on the <a>) but under Divi 5 removes it. Use one
      consistent gap. */
/* Divi 5 renders the items as flex modules; the first icon in each header
   module carries a -2px margin from the original design, which now makes
   it overlap the next one. Use one explicit 6px gap, which is the 28px
   icon pitch Divi 4 rendered (22px icon + 8px link margin - 2px). */
.et_pb_social_media_follow .et_pb_social_media_follow_network.et_flex_module {
	margin-right: 6px !important;
	margin-left: 0 !important;
}
.et_pb_social_media_follow .et_pb_social_media_follow_network.et_flex_module:last-child {
	margin-right: 0 !important;
}
/* Block-layout variant, should Divi ever render it that way. */
.et_pb_social_media_follow.et_block_module .et_pb_social_media_follow_network.et_block_module {
	margin-right: 6px !important;
}
.et_pb_social_media_follow.et_block_module .et_pb_social_media_follow_network.et_block_module:last-child {
	margin-right: 0 !important;
}
/* Icon colour (2026-10-27, seen on production after the cutover): every
   network in the header modules has its own icon colour (#000000) on a white
   circle, while the module-level icon colour is white. Divi 4 gave the
   network rule more specificity, so black won. Divi 5 emits both at equal
   specificity and prints the second module's module-level rule after the
   network rule, so on the phone header the icons were white on white. The
   footer widget (.soc_icon) sits outside any .et_pb_section and keeps its
   own colours. */
.et_pb_section .et_pb_social_media_follow li.et_pb_social_icon a.icon:before {
	color: #000000;
}
/* 2. The footer "social" widget is hand-written HTML copying Divi 4's module
      markup (ul.et_pb_social_media_follow > li.et-social-*). Divi 4's base
      stylesheet laid it out; Divi 5 ships no CSS for those class names, so
      it fell back to a bulleted vertical list. Reproduce the Divi 4 rules,
      scoped to the widget. */
.soc_icon ul.et_pb_social_media_follow {
	list-style-type: none !important;
	margin: 0 0 22px;
	padding: 0;
}
.soc_icon .et_pb_social_media_follow li {
	display: inline-block;
	margin-bottom: 8px;
	position: relative;
	padding-left: 0;
}
.soc_icon .et_pb_social_media_follow li::before {
	display: none;
}
.soc_icon .et_pb_social_media_follow li a {
	margin-right: 8px;
	display: inline-block;
	text-decoration: none;
	text-align: center;
	position: relative;
}
.soc_icon .et_pb_social_media_follow li:last-child a {
	margin-right: 0;
}
.soc_icon .et_pb_social_media_follow li a.icon {
	height: 32px;
	width: 32px;
	padding: 0;
	box-sizing: content-box;
	border-radius: 3px;
	vertical-align: middle;
}
.soc_icon .et_pb_social_media_follow li a.icon::before {
	font-family: ETmodules;
	height: 32px;
	width: 32px;
	font-size: 16px;
	line-height: 32px;
	display: block;
	color: #fff;
	position: relative;
	z-index: 10;
}
.soc_icon .et_pb_social_media_follow_network_name {
	display: none;
}

/* Content area background (2026-10-20). Divi 4's inlined critical CSS set
   #main-content to white with one exception for builder-built pages; Divi 5
   no longer ships that rule, so the Customizer body colour (#1438ed, meant
   for the area behind boxed layouts) showed through on the 404, search,
   archive and classic pages. Divi 5 also adds .et_pb_pagebuilder_layout to
   classic posts and archives, so the exception is restricted to .page as it
   was in Divi 4. */
html body:not(.page.et_pb_pagebuilder_layout) #main-content {
	background-color: #fff;
}
