/**
 * Good Guys Tree Service - CWV helpers
 *
 * Goals from lab audit of /contact-us/:
 * - Cut mobile CLS from WPFront promo bar + late fonts
 * - Prefer swap for icon/web fonts
 * - Reduce layout jump from unsized placeholders
 */

/* -------------------------------------------------------------------------
 * WPFront Notification Bar - reserve space before JS unhides the spacer.
 * Plugin CSS uses .wpfront-notification-bar-spacer.hidden { display: none }
 * which is a major mobile CLS source (lab CLS ~0.34).
 * ---------------------------------------------------------------------- */
#wpfront-notification-bar-spacer.hidden {
	display: block !important;
	min-height: 72px;
	visibility: hidden;
}

#wpfront-notification-bar-spacer:not(.hidden) {
	min-height: 72px;
}

/* Prefer a stable bar height while content paints (matches promo copy). */
#wpfront-notification-bar.wpfront-fixed,
#wpfront-notification-bar {
	min-height: 72px;
	box-sizing: border-box;
}

@media (max-width: 782px) {
	#wpfront-notification-bar-spacer.hidden,
	#wpfront-notification-bar-spacer:not(.hidden),
	#wpfront-notification-bar.wpfront-fixed,
	#wpfront-notification-bar {
		min-height: 96px;
	}
}

/* Promo bar H2 should not inflate heading metrics / unexpected wrap jump. */
#wpfront-notification-bar h1,
#wpfront-notification-bar h2,
#wpfront-notification-bar h3,
.wpfront-message h1,
.wpfront-message h2,
.wpfront-message h3 {
	margin: 0;
	line-height: 1.25;
	font-size: clamp(0.95rem, 2.8vw, 1.25rem);
}

/* -------------------------------------------------------------------------
 * Images - avoid zero-dimension SVG placeholders shifting layout.
 * Font-display for Google Fonts is handled in functions.php (display=swap).
 * Font Awesome preloads are printed from functions.php.
 * ---------------------------------------------------------------------- */
img:not([width]):not([height]) {
	height: auto;
	max-width: 100%;
}

.fusion-imageframe img,
.fusion-image-wrapper img {
	height: auto;
	max-width: 100%;
}
