/**
 * Ebbert — site footer.
 *
 * Built as Spectra blocks (Rule 1) inside an Astra Pro Custom Layout (astra-advanced-hook,
 * layout = footer, global). Every NAP value comes from a CFM shortcode; the address is split
 * across separate fields and never combined.
 *
 * Colours/spacing measured from the artboard footer — see design-tokens-measured.md.
 */

.ebbert-footer {
	background-color: var(--ebbert-ink);
	color: #FFFFFF;
}

.ebbert-footer p,
.ebbert-footer li,
.ebbert-footer a {
	font-family: var(--ebbert-font-body);
}

/* ---------- Office column ---------- */

/* Gold 20x20 stroked icons before each NAP line, matching the artboard (measured: 20x20 SVG,
   stroke rgb(223,176,62), fill none). Delivered as CSS masks so the colour is set here rather
   than baked into the data URI. The artboard has no email row at all — the envelope is carried
   over for consistency with the address and phone lines above it. */
.ebbert-footer-address,
.ebbert-footer-phone,
.ebbert-footer-email {
	display: grid;
	grid-template-columns: 20px minmax(0, 1fr);
	column-gap: 10px;
	align-items: start;
}

.ebbert-footer-address::before,
.ebbert-footer-phone::before,
.ebbert-footer-email::before {
	content: "";
	width: 20px;
	height: 20px;
	background-color: var(--ebbert-accent);
	-webkit-mask-position: center;
	mask-position: center;
	-webkit-mask-size: contain;
	mask-size: contain;
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
	/* Nudge onto the cap height of the first line rather than the line box top. */
	margin-top: 4px;
}

.ebbert-footer-address::before {
	-webkit-mask-image: var(--ebbert-icon-map-pin);
	mask-image: var(--ebbert-icon-map-pin);
}

.ebbert-footer-phone::before {
	-webkit-mask-image: var(--ebbert-phone-icon);
	mask-image: var(--ebbert-phone-icon);
}

.ebbert-footer-email::before {
	-webkit-mask-image: var(--ebbert-icon-mail);
	mask-image: var(--ebbert-icon-mail);
}

.ebbert-footer-address {
	color: #FFFFFF;
	font-size: 17px;
	line-height: 28px;
}

.ebbert-footer-phone a {
	color: var(--ebbert-accent);
	font-size: 20px;
	font-weight: var(--ebbert-w-semi);
	text-decoration: none;
}

.ebbert-footer-phone a:hover {
	color: #FFFFFF;
}

.ebbert-footer-email a {
	color: #FFFFFF;
	font-size: 16px;
	text-decoration: none;
}

.ebbert-footer-email a:hover {
	color: var(--ebbert-accent);
}

/* ---------- Map ---------- */
.ebbert-footer-mapframe {
	display: block;
	width: 100%;
	height: 200px;
	border: 1px solid rgba(255, 255, 255, 0.14);
	border-radius: var(--ebbert-radius);
	/* The embed renders a light map inside a near-black footer; knock it back so it sits in the
	   panel rather than glaring out of it. Restored on hover/focus for legibility. */
	filter: grayscale(0.35) brightness(0.9);
	transition: filter 0.2s ease;
}

.ebbert-footer-mapframe:hover,
.ebbert-footer-mapframe:focus-within {
	filter: none;
}

@media (prefers-reduced-motion: reduce) {
	.ebbert-footer-mapframe { transition: none; }
}

/* ---------- Social ----------
   The CFM shortcodes emit plain <a>Facebook</a> style links. Rather than duplicate those URLs in
   markup just to attach an icon, the glyph is applied by matching the href. Avvo keeps its
   wordmark — inventing an Avvo glyph would be worse than showing the name. */
.ebbert-footer-social {
	display: inline-flex;
	gap: 12px;
	flex-wrap: wrap;
}

.ebbert-footer-social a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	height: 44px;
	padding-inline: 10px;
	border: 1px solid rgba(255, 255, 255, 0.25);
	color: #FFFFFF;
	font-size: 13px;
	font-weight: var(--ebbert-w-semi);
	text-decoration: none;
	transition: border-color .2s ease, background-color .2s ease;
}

.ebbert-footer-social a:hover {
	border-color: var(--ebbert-accent);
	background-color: rgba(223, 176, 62, .12);
}

.ebbert-footer-social a[href*="facebook."],
.ebbert-footer-social a[href*="linkedin."] {
	font-size: 0;               /* icon replaces the label for platforms with a known glyph */
	padding-inline: 0;
}

.ebbert-footer-social a[href*="facebook."]::before,
.ebbert-footer-social a[href*="linkedin."]::before {
	content: "";
	width: 20px;
	height: 20px;
	background-color: currentColor;
	-webkit-mask-position: center;
	mask-position: center;
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
	-webkit-mask-size: contain;
	mask-size: contain;
}

.ebbert-footer-social a[href*="facebook."]::before {
	-webkit-mask-image: var(--ebbert-icon-facebook);
	mask-image: var(--ebbert-icon-facebook);
}

.ebbert-footer-social a[href*="linkedin."]::before {
	-webkit-mask-image: var(--ebbert-icon-linkedin);
	mask-image: var(--ebbert-icon-linkedin);
}

/* ---------- Disclaimer + bottom bar ---------- */
/* Spectra's per-post stylesheet sets `border-top-color: inherit` on the container at 0-2-0
   (uag-css-161.css), which beat the plain class at 0-1-0 and rendered these rules SOLID WHITE
   instead of a 12% wash — measured rgb(255,255,255). Known-overrides #12. Scoped up to 0-3-0
   and set to the artboard's measured rgba(255,255,255,0.14). */
.ebbert-footer .wp-block-uagb-container.ebbert-footer-disclaimer,
.ebbert-footer .wp-block-uagb-container.ebbert-footer-legal {
	border-top-color: rgba(255, 255, 255, 0.14);
}

.ebbert-footer-disclaimer {
	border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.ebbert-footer-disclaimer p {
	color: #A8A2A0;
	font-size: 14px;
	line-height: 22px;
}

/* The divider now sits above the legal links, which open the closing block; the copyright bar
   follows directly beneath them as one centred group. */
.ebbert-footer-legal {
	border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.ebbert-footer-copy {
	color: #A8A2A0;
	font-size: 14px;
	margin: 0;
}

.ebbert-footer-linklist {
	list-style: none;
	margin: 8px 0 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 8px 20px;
}

.ebbert-footer-linklist a {
	color: #A8A2A0;
	font-size: 14px;
	text-decoration: none;
}

.ebbert-footer-linklist a:hover {
	color: var(--ebbert-accent);
}

.ebbert-footer-agency img {
	max-width: 120px;
	height: auto;
}

.ebbert-footer-legal .ebbert-footer-linklist {
	justify-content: center;
	margin: 0;
}

@media (max-width: 768px) {
	.ebbert-footer-linklist { gap: 8px 14px; }
}

/* ---------- Heading ----------
   typography.css paints every heading --ebbert-ink (#1B1919), which on the #1B1919 footer rendered
   "Our Office" invisible — the block was in the DOM the whole time (measured computed colour
   rgb(27,25,25)). Spectra's own headingColor attribute did not survive serialization, so the
   colour is set here where it can be verified. */
.ebbert-footer .uagb-heading-text,
.ebbert-footer h2,
.ebbert-footer h3 {
	color: var(--ebbert-accent);
	font-family: var(--ebbert-font-heading);
	font-weight: var(--ebbert-w-head);
	font-size: 24px;
	line-height: 32px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	margin: 0 0 4px;
}

/* ---------- Layout tightening ----------
   Spectra generates generous default gaps; the artboard footer is far more compact. These
   constrain the rows without touching the block structure. */
.ebbert-footer .uagb-container-inner-blocks-wrap > .wp-block-uagb-container {
	margin-block: 0;
}

.ebbert-footer p {
	margin-block: 0;
}

.ebbert-footer-address {
	margin-bottom: 4px;
}

/* Bottom bar: copyright + legal links on the left, agency mark right-aligned, on one row. */
.ebbert-footer-bottom > .uagb-container-inner-blocks-wrap {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 12px 20px;
}

/* SHIM: Spectra's per-post CSS forces `width: 100%` on every non-container child of a container,
   via `body .wp-block-uagb-container > :not(...x12)` at 0-27-1. In this row that made the copyright
   line and the SMBTeam mark 550px each — half the bar apiece — so "centred" put them at opposite
   ends. They need to size to their content for the pair to centre. No sane selector reaches
   0-27-1; same trap and same answer as `.ebbert-page-aside` in sections.css.
   REMOVE if Spectra drops or narrows that rule. */
.ebbert-footer-bottom > .ebbert-footer-copy,
.ebbert-footer-bottom > .wp-block-uagb-image {
	flex: 0 0 auto;
	width: auto !important;
}

/* The mark's `aligncenter` class brings auto side margins, and auto margins take the free space
   before justify-content can — it sat centred in the space LEFT OVER beside the copyright line
   (measured x 825 against the line's 160) rather than beside it. */
.ebbert-footer-bottom > .wp-block-uagb-image {
	margin-inline: 0;
}

/* ---------- Container discipline ----------
   Measured: with width settings only on the outer container, each row sized independently —
   rowMain 819px, disclaimer 1420px, bottom bar 750px, all with different left edges. Constrain
   every direct row to one centred 1200px box (the design's --container-max) so the columns,
   disclaimer and bottom bar share a left edge. */
.ebbert-footer > .wp-block-uagb-container {
	width: 100%;
	max-width: var(--ebbert-container);
	margin-inline: auto;
	padding-inline: var(--ebbert-pad-x);
}

/* §55 The footer container now carries Spectra's root marker (so editing it in wp-admin no longer
   rewrites it), and Spectra caps every container inside a root at
   `.wp-block-uagb-container.uagb-is-root-container .uagb-block-<id> { max-width: 100% }` (0-3-0),
   which beat the 1200px above (0-2-0) — rows measured 1420px. footer.ast-custom-footer + two classes = 0-3-1. */
footer.ast-custom-footer .ebbert-footer > .wp-block-uagb-container {
	max-width: var(--ebbert-container);
}

/* The three top columns share the row proportionally; the map column holds its share even while
   empty, so adding the GBP embed later does not reflow the other two. */
.ebbert-footer > .wp-block-uagb-container:first-child {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	gap: 40px;
}

.ebbert-footer > .wp-block-uagb-container:first-child > .wp-block-uagb-container {
	flex: 1 1 260px;
	min-width: 0;
}

@media (max-width: 768px) {
	.ebbert-footer > .wp-block-uagb-container:first-child > .wp-block-uagb-container {
		flex: 1 1 100%;
	}
	/* Empty map column must not add a gap on mobile. */
	.ebbert-footer-map:empty,
	.ebbert-footer-map > .uagb-container-inner-blocks-wrap:empty {
		display: none;
	}
}
