/*
 * Site footer (footer.php, .bpf). Loaded after the main stylesheets.
 * Pixel units on purpose: the theme sets html { font-size: 10px }.
 */

.bpf {
	--bpf-navy: #062235;
	--bpf-navy-deep: #031421;
	--bpf-brass: #c99643;
	--bpf-brass-light: #f0c56b;
	--bpf-text: rgba(255, 250, 240, 0.74);
	--bpf-text-strong: #fffaf0;
	--bpf-line: rgba(255, 255, 255, 0.09);

	position: relative;
	background:
		radial-gradient(ellipse at 88% 0%, rgba(201, 150, 67, 0.13), transparent 42%),
		radial-gradient(ellipse at 0% 100%, rgba(61, 135, 166, 0.12), transparent 45%),
		linear-gradient(180deg, var(--bpf-navy) 0%, #04192a 100%);
	border-top: 1px solid rgba(240, 197, 107, 0.35);
	color: var(--bpf-text);
	font-family: "Poppins", sans-serif;
	font-size: 14px;
	line-height: 1.65;
}

.bpf__wrap {
	max-width: 1280px;
	margin: 0 auto;
	padding: 0 28px;
}

.bpf__grid {
	display: grid;
	/* Brand, Services, Company, Get in Touch, Locations. The last two size to
	   their longest line so the email address and street addresses never break. */
	grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.85fr) minmax(0, 0.6fr) max-content max-content;
	gap: 48px 44px;
	padding: 72px 0 60px;
}

.bpf ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.bpf li {
	margin: 0;
}

.bpf a {
	text-decoration: none;
	transition: color 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
}

.bpf a:focus-visible {
	outline: 2px solid var(--bpf-brass-light);
	outline-offset: 3px;
	border-radius: 4px;
}

/* Brand column */
.bpf__logo {
	display: inline-block;
	padding: 10px 14px;
	background: #fff;
	border-radius: 10px;
	box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
}

.bpf__logo img {
	display: block;
	width: 150px;
	height: auto;
}

.bpf .bpf__about {
	max-width: 34ch;
	margin: 22px 0 24px;
	color: var(--bpf-text);
	font-size: 14px;
	line-height: 1.7;
}

.bpf__social {
	display: flex;
	gap: 10px;
}

.bpf .bpf__social a {
	display: grid;
	place-items: center;
	width: 38px;
	height: 38px;
	border: 1px solid rgba(255, 255, 255, 0.16);
	border-radius: 50%;
	color: var(--bpf-text-strong);
}

.bpf .bpf__social a:hover {
	border-color: var(--bpf-brass);
	background: rgba(201, 150, 67, 0.12);
	color: var(--bpf-brass-light);
}

/* Column headings. !important only where the theme's bare h2 rules force it. */
.bpf .bpf__heading {
	position: relative;
	margin: 0 0 22px !important;
	padding: 0 0 14px !important;
	color: var(--bpf-text-strong) !important;
	font-family: "Poppins", sans-serif !important;
	font-size: 13px !important;
	font-weight: 600 !important;
	line-height: 1.4 !important;
	letter-spacing: 0.14em !important;
	text-transform: uppercase;
}

.bpf .bpf__heading::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: 0;
	width: 28px;
	height: 2px;
	border-radius: 2px;
	background: var(--bpf-brass);
}

/* Link lists */
.bpf__links li + li {
	margin-top: 6px;
}

.bpf .bpf__links a {
	display: inline-block;
	padding: 3px 0;
	color: var(--bpf-text);
	font-size: 14px;
	line-height: 1.5;
}

.bpf .bpf__links a:hover {
	color: var(--bpf-brass-light);
}

/* Contact column */
.bpf__contact li + li {
	margin-top: 16px;
}

.bpf .bpf__contact-row {
	display: flex;
	align-items: flex-start;
	gap: 14px;
	color: var(--bpf-text-strong);
}

.bpf__icon {
	display: grid;
	flex: none;
	place-items: center;
	width: 34px;
	height: 34px;
	border: 1px solid rgba(240, 197, 107, 0.28);
	border-radius: 8px;
	background: rgba(201, 150, 67, 0.1);
	color: var(--bpf-brass-light);
}

.bpf__contact-text {
	min-width: 0;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.5;
	overflow-wrap: break-word;
}

.bpf__contact-text small {
	display: block;
	margin-bottom: 1px;
	color: rgba(255, 250, 240, 0.55);
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.bpf__contact-row--phone .bpf__contact-text {
	font-size: 17px;
	font-weight: 600;
}

.bpf a.bpf__contact-row:hover .bpf__contact-text {
	color: var(--bpf-brass-light);
}

.bpf a.bpf__contact-row:hover .bpf__icon {
	border-color: var(--bpf-brass);
}

/* Bottom bar */
.bpf__bottom {
	border-top: 1px solid var(--bpf-line);
	background: rgba(3, 20, 33, 0.55);
}

.bpf__bottom-inner {
	/* Centred so the floating chat (bottom-left) and WhatsApp (bottom-right)
	   buttons never sit on top of the text. */
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 8px 28px;
	padding-top: 22px;
	padding-bottom: 22px;
	text-align: center;
}

.bpf .bpf__bottom p {
	margin: 0;
	color: rgba(255, 250, 240, 0.6);
	font-size: 13px;
	line-height: 1.5;
}


.bpf .bpf__legal {
	display: flex;
	gap: 10px;
}

.bpf .bpf__bottom a {
	color: rgba(255, 250, 240, 0.78);
}

.bpf .bpf__bottom a:hover {
	color: var(--bpf-brass-light);
}

.bpf .bpf__credit a {
	border-bottom: 1px solid rgba(224, 180, 91, 0.45);
	color: #e0b45b;
	font-weight: 600;
}

.bpf .bpf__credit a:hover,
.bpf .bpf__credit a:focus-visible {
	border-bottom-color: var(--bpf-brass-light);
	color: var(--bpf-brass-light);
}

/* Sticky Call / Free Quote bar on phones (markup in footer.php).
   style.css caps this bar at 100vw - 32px together with the round floating
   buttons, which left a gap on the right; the bar is meant to span the screen. */
body .mobile-cta-bar {
	left: 0;
	right: 0;
	width: 100%;
	max-width: none;
	border-top: 1px solid rgba(240, 197, 107, 0.35);
	box-shadow: 0 -10px 30px rgba(3, 20, 33, 0.28);
}

body .mobile-cta-bar a {
	gap: 8px;
	padding: 0 12px;
	white-space: nowrap;
}

body .mobile-cta-bar a svg {
	flex: none;
	margin-right: 0 !important; /* replaces the inline margin on the icons */
}

/* Navy on gold reads at about 6:1; the white it replaces was about 2.5:1. */
body .mobile-cta-bar .mobile-cta-quote {
	color: #062235;
}

body .mobile-cta-bar .mobile-cta-quote:hover,
body .mobile-cta-bar .mobile-cta-quote:focus-visible {
	background-color: #dcb066;
	color: #062235;
}

body .mobile-cta-bar a:focus-visible {
	outline: 2px solid #f0c56b;
	outline-offset: -4px;
}

/* Small phones: keep both halves the same width. */
@media (max-width: 360px) {
	body .mobile-cta-bar a {
		gap: 6px;
		padding: 0 6px;
		font-size: 12px;
		letter-spacing: 0.02em;
	}
}

/* Tablet: brand on its own row, four columns below */
@media (max-width: 1279px) {
	.bpf__grid {
		grid-template-columns: minmax(0, 0.85fr) minmax(0, 0.6fr) max-content max-content;
		gap: 44px 40px;
	}
	.bpf__brand {
		grid-column: 1 / -1;
		display: grid;
		grid-template-columns: auto minmax(0, 1fr);
		gap: 8px 32px;
		align-items: start;
	}
	.bpf__brand .bpf__logo {
		grid-row: span 2;
	}
	.bpf .bpf__about {
		max-width: 60ch;
		margin: 0;
	}
}

/* Small tablet: services, company and contact in a row, locations below in two columns */
@media (max-width: 1023px) {
	.bpf__grid {
		grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr) max-content;
	}
	.bpf__col--locations {
		grid-column: 1 / -1;
	}
	.bpf__col--locations .bpf__contact {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 16px 28px;
	}
	.bpf__col--locations .bpf__contact li + li {
		margin-top: 0;
	}
}

/* Phone: services and company side by side, contact and locations full width */
@media (max-width: 767px) {
	.bpf__wrap {
		padding: 0 20px;
	}
	.bpf__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 36px 24px;
		padding: 52px 0 40px;
	}
	.bpf__brand {
		display: block;
	}
	.bpf .bpf__about {
		margin: 18px 0 20px;
	}
	.bpf__col--contact,
	.bpf__col--locations {
		grid-column: 1 / -1;
	}
	.bpf__col--locations .bpf__contact {
		display: block;
	}
	.bpf__col--locations .bpf__contact li + li {
		margin-top: 16px;
	}
	.bpf__bottom-inner {
		flex-direction: column;
		gap: 6px;
		/* .bpf__wrap above resets the padding shorthand, so restate the top. */
		padding-top: 24px;
		/* Clear the sticky call/quote bar and the floating chat and WhatsApp buttons. */
		padding-bottom: calc(176px + env(safe-area-inset-bottom, 0px));
	}
	/* js/main.js hides those buttons while this bar is on screen, so only the
	   call/quote bar needs clearing. */
	.bpd-fab-aware .bpf__bottom-inner {
		padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px));
	}
}

@media (prefers-reduced-motion: reduce) {
	.bpf a {
		transition: none;
	}
}
