/* Custom CSS.
   Colours, fonts and spacing belong in Elementor Site Settings (driven by
   build/brand.json). Only put here what Elementor cannot express — clip-path,
   pseudo-elements, and the odd responsive override. */

/* Long uppercase headings can out-measure a narrow viewport. Scope this to
   heading widgets: applying it to every h1-h3 also hits icon-box titles, where
   it breaks words mid-syllable. */
.elementor-widget-heading .elementor-heading-title {
	overflow-wrap: break-word;
}

/* ==========================================================================
   Bridgeway — site-wide. Prefix: bw-
   ========================================================================== */

:root {
	--bw-navy: #0B1F4F;
	--bw-navy-deep: #001D4B;
	--bw-ink: #0B1648;
	--bw-gold: #D38A12;
	--bw-body: #4A5470;
	--bw-hairline: #E1E6EF;
	--bw-surface: #F2F6FC;
	--bw-sans: "Figtree", system-ui, sans-serif;
	--bw-serif: "Source Serif 4", Georgia, serif;
	--bw-nav-gap: 24px;
}

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Anchor targets clear the header when jumped to from a menu link. */
[id] { scroll-margin-top: 24px; }

/* Hello Elementor paints bare buttons pink (#c36) on hover/focus. Retire it,
   scoped under body so it beats reset.css's (0,2,0) selectors outright. */
body button:not(.elementor-button):hover,
body button:not(.elementor-button):focus,
body [type="button"]:not(.elementor-button):hover,
body [type="button"]:not(.elementor-button):focus,
body [type="submit"]:not(.elementor-button):hover,
body [type="submit"]:not(.elementor-button):focus {
	background-color: transparent;
	color: inherit;
}

/* Text-editor paragraphs: keep spacing between paragraphs, not after the last. */
.elementor-widget-text-editor p:last-child { margin-bottom: 0; }

/* Brand buttons: arrow nudges on hover; visible keyboard focus. */
.bw-button .elementor-button-icon { transition: transform .2s ease; }
.bw-button .elementor-button:hover .elementor-button-icon { transform: translateX(3px); }
.bw-button .elementor-button { transition: background-color .2s, color .2s, border-color .2s; }
.bw-button .elementor-button:focus-visible,
.bw-btn:focus-visible,
.bw-nav a:focus-visible,
.bw-nav button:focus-visible {
	outline: 2px solid var(--bw-gold);
	outline-offset: 3px;
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.bw-site-header { position: relative; z-index: 100; }
.bw-header { box-shadow: 0 2px 14px rgba(11, 31, 79, .06); }
.bw-topbar .elementor-icon-list-item a { color: inherit; }
.bw-header__nav { flex: 1 1 auto; min-width: 0; }
.bw-header__logo, .bw-header__cta, .bw-topbar__tagline, .bw-topbar__cta { flex: 0 0 auto; }
.bw-header__cta .elementor-button, .bw-topbar__cta .elementor-button, .bw-topbar__tagline p { white-space: nowrap; }

/* Elementor containers are position:relative; let the mobile panel anchor to
   the header bar instead of the widget wrapper. */
.bw-header, .bw-header__nav, .bw-header__nav .elementor-widget-container,
.bw-header__nav .elementor-shortcode { position: static; }
.bw-header { position: relative; }

.screen-reader-text {
	border: 0; clip: rect(1px,1px,1px,1px); clip-path: inset(50%);
	height: 1px; width: 1px; margin: -1px; overflow: hidden; padding: 0;
	position: absolute; word-wrap: normal !important;
}

.bw-nav { font-family: var(--bw-sans); }
.bw-nav__list { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; justify-content: center; gap: var(--bw-nav-gap); }
.bw-nav__list > li { position: relative; display: flex; align-items: center; }
.bw-nav__list a {
	color: var(--bw-ink);
	font-size: 14px;
	font-weight: 500;
	text-decoration: none;
	white-space: nowrap;
	display: inline-block;
	padding: 10px 0;
	position: relative;
}
.bw-nav__list a:hover { color: var(--bw-gold); }

/* Active page: short navy rule under the label, as in the design. */
.bw-nav__list > .current-menu-item > a::after,
.bw-nav__list > .current-menu-ancestor > a::after,
.bw-nav__list > .current_page_parent > a::after {
	content: ""; position: absolute; left: 50%; bottom: -2px;
	width: 26px; height: 3px; border-radius: 2px;
	background: var(--bw-navy); transform: translateX(-50%);
}

/* Submenu chevron: a real button, not decoration. */
.bw-nav__subtoggle {
	background: none; border: 0; padding: 0; margin-left: 4px;
	width: 18px; height: 28px; cursor: pointer; color: var(--bw-ink);
	display: inline-flex; align-items: center; justify-content: center;
}
.bw-nav__subtoggle::before {
	content: ""; width: 6px; height: 6px;
	border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor;
	transform: translateY(-2px) rotate(45deg); transition: transform .2s;
}
.bw-nav__subtoggle[aria-expanded="true"]::before { transform: translateY(1px) rotate(-135deg); }

.bw-nav .sub-menu {
	list-style: none; margin: 0; padding: 10px 0;
	position: absolute; top: 100%; left: -18px; min-width: 240px;
	background: #fff; border: 1px solid var(--bw-hairline); border-radius: 6px;
	box-shadow: 0 14px 30px rgba(11, 31, 79, .12);
	opacity: 0; visibility: hidden; transform: translateY(6px);
	transition: opacity .18s, transform .18s, visibility .18s;
	z-index: 50;
}
.bw-nav .sub-menu a { display: block; padding: 10px 20px; font-size: 14px; }
.bw-nav .sub-menu a:hover { background: var(--bw-surface); color: var(--bw-navy); }
.bw-nav__list > li.is-sub-open > .sub-menu { opacity: 1; visibility: visible; transform: none; }

/* Panel extras (CTAs, contact) and the burger exist for the collapsed nav
   only. Hidden by default so they never leak onto desktop. */
.bw-nav__toggle, .bw-nav__ctas { display: none; }

@media (min-width: 1200px) {
	.bw-nav__list > li:hover > .sub-menu { opacity: 1; visibility: visible; transform: none; }
}

/* Tighten the bar before it has to collapse. Widths measured: nav ~840px at
   14px/24 gap. Figtree runs ~8% wider than the design's face. */
.bw-header { gap: 28px; }
.bw-header__logo img { width: 230px !important; }
@media (max-width: 1439px) {
	:root { --bw-nav-gap: 18px; }
	.bw-header__logo img { width: 205px !important; }
	.bw-header, .bw-topbar { padding-left: 40px !important; padding-right: 40px !important; }
}
/* Below 1340 the header CTA goes (it stays in the top bar and the mobile panel). */
@media (max-width: 1339px) {
	.bw-header__cta { display: none; }
	.bw-header, .bw-topbar { padding-left: 32px !important; padding-right: 32px !important; }
	.bw-nav__list { justify-content: flex-end; }
}

/* --- collapsed nav (below 1200: 8 items + logo + CTA stop fitting) --- */
@media (max-width: 1199px) {
	.bw-header__cta { display: none; }
	.bw-header__nav { flex: 0 0 auto; margin-left: auto; }
	.bw-nav__toggle {
		display: inline-flex; align-items: center; justify-content: center;
		width: 48px; height: 48px; padding: 0; cursor: pointer;
		background: transparent; border: 1.5px solid var(--bw-navy); border-radius: 4px;
		color: var(--bw-navy);
	}
	.bw-nav__toggle:hover, .bw-nav__toggle:focus { background: transparent; color: var(--bw-navy); }
	.bw-nav__bars, .bw-nav__bars::before, .bw-nav__bars::after {
		display: block; width: 22px; height: 2px; background: currentColor; border-radius: 2px;
		position: relative; transition: transform .2s, background-color .2s;
	}
	.bw-nav__bars::before, .bw-nav__bars::after { content: ""; position: absolute; left: 0; }
	.bw-nav__bars::before { top: -7px; }
	.bw-nav__bars::after { top: 7px; }
	.bw-nav.is-open .bw-nav__bars { background: transparent; }
	.bw-nav.is-open .bw-nav__bars::before { transform: translateY(7px) rotate(45deg); }
	.bw-nav.is-open .bw-nav__bars::after { transform: translateY(-7px) rotate(-45deg); }

	.bw-nav__panel {
		display: none;
		position: absolute; left: 0; right: 0; top: 100%;
		background: #fff; border-top: 1px solid var(--bw-hairline);
		box-shadow: 0 18px 30px rgba(11, 31, 79, .14);
		padding: 8px 24px 28px;
		max-height: calc(100dvh - var(--bw-header-bottom, 170px)); overflow-y: auto; overscroll-behavior: contain;
	}
	.bw-nav.is-open .bw-nav__panel { display: block; }

	.bw-nav__list { flex-direction: column; align-items: stretch; gap: 0; }
	.bw-nav__list > li { flex-wrap: wrap; border-bottom: 1px solid var(--bw-hairline); }
	.bw-nav__list > li > a { flex: 1; padding: 14px 0; font-size: 16px; }
	.bw-nav__list > .current-menu-item > a::after,
	.bw-nav__list > .current-menu-ancestor > a::after { left: 0; bottom: 8px; transform: none; }
	.bw-nav__subtoggle { width: 48px; height: 48px; }
	.bw-nav .sub-menu {
		position: static; width: 100%; min-width: 0; display: none;
		opacity: 1; visibility: visible; transform: none;
		box-shadow: none; border: 0; padding: 0 0 10px 14px;
	}
	.bw-nav__list > li.is-sub-open > .sub-menu { display: block; }
	.bw-nav .sub-menu a { padding: 12px 0; font-size: 15px; }

	.bw-nav__ctas { display: flex; flex-direction: column; gap: 12px; padding-top: 20px; }
	.bw-nav__contact { display: flex; flex-direction: column; gap: 4px; margin: 6px 0 0; font-size: 15px; }
	.bw-nav__contact a { color: var(--bw-navy); padding: 8px 0; text-decoration: none; }
}

/* Plain-link buttons used in the mobile panel. */
.bw-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 12px;
	min-height: 48px; padding: 12px 22px; border-radius: 4px;
	font-family: var(--bw-sans); font-weight: 600; font-size: 15px; text-decoration: none;
	border: 1.5px solid transparent;
}
a.bw-btn--gold, a.bw-btn--gold:visited { background: var(--bw-gold); border-color: var(--bw-gold); color: #fff; }
a.bw-btn--gold:hover { background: var(--bw-navy); border-color: var(--bw-navy); color: #fff; }
a.bw-btn--outline, a.bw-btn--outline:visited { border-color: var(--bw-navy); color: var(--bw-navy); }
a.bw-btn--outline:hover { background: var(--bw-navy); color: #fff; }

/* Top bar on smaller screens: lose the tagline, then the email. */
@media (max-width: 1024px) {
	.bw-topbar__tagline { display: none; }
	.bw-topbar > .e-con-inner, .bw-topbar { justify-content: flex-end; }
}
@media (max-width: 767px) {
	.bw-topbar__contact .elementor-icon-list-item:first-child { display: none; }
	.bw-topbar .e-con { gap: 14px; }
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.bw-flinks, .bw-legal { list-style: none; margin: 0; padding: 0; }
.bw-flinks { display: flex; flex-direction: column; gap: 6px; }
.bw-flinks a, .bw-legal a, .bw-footer__contact a {
	color: rgba(255, 255, 255, .85); font-family: var(--bw-sans); font-size: 13px; text-decoration: none;
}
.bw-flinks a:hover, .bw-legal a:hover { color: var(--bw-gold); }
.bw-footer__social .elementor-social-icon:hover { background-color: var(--bw-gold); }

.bw-footer__legal .elementor-shortcode { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 0; }
.bw-footer__copy { margin: 0; color: rgba(255, 255, 255, .82); font-family: var(--bw-sans); font-size: 12px; }
.bw-legal { display: flex; flex-wrap: wrap; }
.bw-legal li { display: flex; align-items: center; }
.bw-legal li::before, .bw-footer__copy + nav .bw-legal li:first-child::before {
	content: ""; width: 1px; height: 12px; background: rgba(255, 255, 255, .3); margin: 0 14px;
}
.bw-legal a { font-size: 12px; }
.bw-credit { color: #fff; font-weight: 700; }

/* Touch: footer links become real tap targets, long lists go two-up. */
@media (max-width: 1024px) {
	.bw-flinks { gap: 0; }
	.bw-flinks a, .bw-legal a { display: inline-block; padding: 12px 0; font-size: 14px; }
	.bw-footer__contact .elementor-icon-list-item { min-height: 44px; }
	.bw-footer__col .bw-flinks { display: block; column-count: 2; column-gap: 20px; }
	.bw-footer__col .bw-flinks li { break-inside: avoid; }
	.bw-legal li::before { margin: 0 10px; }
	.bw-footer__bottom { padding-bottom: 24px !important; }
}

/* --------------------------------------------------------------------------
   Shared components
   -------------------------------------------------------------------------- */
.bw-group-logos .bw-group-logo:not(.bw-group-logo--first) { border-left: 1px solid var(--bw-hairline); }
@media (max-width: 1024px) {
	.bw-group-logos .bw-group-logo { border-left: 0 !important; }
}
.bw-anchor { display: block; position: relative; top: -24px; }

/* --- Inner-page hero (components.page_hero) ------------------------------ */
.bw-hero { position: relative; overflow: hidden; }
/* Gold sweep along the bottom edge, with a navy wave beneath it. */
.bw-hero::after {
	content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 64px;
	pointer-events: none; z-index: 2;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 64' preserveAspectRatio='none'%3E%3Cpath d='M560 64 C 900 30 1180 6 1440 0 L1440 64 Z' fill='%23D38A12'/%3E%3Cpath d='M620 64 C 940 40 1200 22 1440 18 L1440 64 Z' fill='%23001D4B'/%3E%3C/svg%3E") no-repeat bottom / 100% 100%;
}
.bw-hero > .e-con-inner, .bw-hero .bw-hero__copy { position: relative; z-index: 3; }
.bw-crumbs { font-family: var(--bw-sans); font-size: 14px; font-weight: 500; color: #fff; display: flex; flex-wrap: wrap; align-items: center; }
.bw-crumbs a { color: var(--bw-gold); text-decoration: none; }
.bw-crumbs a:hover { text-decoration: underline; }
.bw-crumbs__sep { margin: 0 9px; color: rgba(255, 255, 255, .8); }
.bw-hero__body p { margin-bottom: .8em; }

/* Navy fades into the photo (which sits in the right ~60%). */
.bw-hero::before {
	content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
	background: linear-gradient(90deg, #0B1F4F 0%, #0B1F4F 40%, rgba(11,31,79,.75) 48%, rgba(11,31,79,0) 64%);
}
/* Tablet: photo behind the copy, darkened so the text stays readable. */
@media (max-width: 1024px) {
	.bw-hero::before {
		background: linear-gradient(90deg, rgba(11,31,79,.96) 0%, rgba(11,31,79,.86) 55%, rgba(11,31,79,.55) 100%);
	}
}
/* Phone: copy only on solid navy; a photo under paragraph text is unreadable at 390. */
@media (max-width: 767px) {
	.bw-hero.e-con { background-image: none !important; }
	.bw-hero::before { display: none; }
	.bw-hero::after { height: 34px; }
	.bw-crumbs { font-size: 13px; }
}
/* Touch: breadcrumb links become 44px targets without changing the look. */
@media (max-width: 1024px) {
	.bw-crumbs a { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; }
	.bw-crumbs { margin-block: -12px; }
}

/* Centred-rule headings. */
.bw-rule .elementor-divider { padding-block: 4px 0; }

/* CTA banner. */
.bw-cta { position: relative; overflow: hidden; }
.bw-cta .e-con.bw-cta__icon { flex: 0 0 104px !important; width: 104px; height: 104px; min-height: 0; }
.bw-cta__icon img { filter: brightness(0) invert(1); }
.bw-cta > .e-con:first-child { flex: 1 1 auto !important; }
.bw-cta > .e-con:last-child { flex: 0 0 auto !important; width: auto !important; }
@media (max-width: 1199px) {
	.bw-cta.e-con { flex-wrap: wrap !important; }
	.bw-cta > .e-con:first-child, .bw-cta > .e-con:last-child { flex: 1 1 100% !important; }
	.bw-cta > .e-con:last-child { justify-content: flex-start !important; }
}
.bw-cta .e-con.bw-cta__words { flex: 1 1 0 !important; width: auto; min-width: 0; }
.bw-group-band__label .elementor-heading-title { white-space: nowrap; }
@media (max-width: 1199px) { .bw-group-band__label .elementor-heading-title { white-space: normal; } }
@media (max-width: 1024px) { .bw-group-band__label .elementor-heading-title { text-align: center; } }

/* Small laptops (1025–1319): the 1260px boxed content would otherwise run to
   the screen edge in sections with no side padding. */
@media (min-width: 1025px) and (max-width: 1319px) {
	.elementor .e-con.e-parent { --content-width: min(calc(100% - 48px), var(--container-max-width, 1260px)); }
}

/* Touch: brand buttons are at least 48px tall. */
@media (max-width: 1024px) {
	.bw-button .elementor-button { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; }
}

/* Phones: the top bar keeps the phone number; the referral CTA lives in the
   burger panel, so it drops here rather than overflow. */
@media (max-width: 480px) {
	.bw-topbar__cta { display: none; }
	.bw-topbar > .e-con, .bw-topbar .e-con { justify-content: center !important; }
}

/* Phones: drop the design's hand-set line breaks in headings and let text flow. */
@media (max-width: 767px) {
	.elementor-widget-heading .elementor-heading-title br { display: none; }
	/* CTA banner: icon above the heading, not squeezing it. */
	.bw-cta > .e-con:first-child { flex-wrap: wrap !important; gap: 18px !important; }
	.bw-cta .e-con.bw-cta__icon { flex: 0 0 84px !important; width: 84px; height: 84px; }
	.bw-cta .e-con.bw-cta__words { flex: 1 1 100% !important; }
}

/* Skip-link target: no visible focus ring on the landmark itself. */
#content:focus { outline: none; }

/* Forminator success/error box receives focus — brand ring, not browser blue. */
.forminator-response-message:focus { outline: 2px solid var(--bw-gold); outline-offset: 2px; }

/* Footer legal links: separators only between items on one line; on touch
   widths they wrap, so drop them for spacing instead of stray leading bars. */
@media (max-width: 1024px) {
	.bw-legal li::before, .bw-footer__copy + nav .bw-legal li:first-child::before { display: none; }
	.bw-legal { column-gap: 18px; }
	.bw-footer__legal .elementor-shortcode { flex-direction: column; align-items: flex-start; }
}

/* Touch: footer social icons are 44px targets. */
@media (max-width: 1024px) {
	.bw-footer__social .elementor-social-icon { --icon-padding: 0.9em; width: 44px; height: 44px; }
	.bw-footer__copy { font-size: 13px; }
}
