/* Electrician Squad — design tokens + base styles.
   Source: design_handoff_electrician_squad_homepage (README.md design system).
   Fluid type/spacing via clamp() and flex-wrap are used deliberately instead of
   breakpoints — see README point 2. */

:root {
	/* Colors */
	--es-color-primary: #f4b400; /* electric amber — CTAs, links */
	--es-color-primary-hover: #d99a00;
	--es-color-secondary: #0b1220; /* charcoal navy — dark sections */
	--es-color-secondary-surface: #1c2536; /* cards/tags on dark sections */
	--es-color-secondary-border: #2a3547;
	--es-color-urgent: #e2472b; /* live-wire orange — urgency accents */
	--es-color-bg: #fafaf7; /* page background */
	--es-color-surface-alt: #f1eee6; /* warm light beige surface */
	--es-color-white: #ffffff;
	--es-color-text: #12151a; /* body text on light bg */
	--es-color-text-muted: #5b6472; /* muted text on light bg */
	--es-color-text-muted-dark: #aeb6c4; /* muted text on dark bg */
	--es-color-label-dark: #7c8798; /* faint label on dark bg */
	--es-color-border: #e7e4dc;

	/* Typography */
	--es-font-display: 'Archivo Black', sans-serif;
	--es-font-body: 'Manrope', sans-serif;

	--es-text-h1: clamp(2.25rem, 1.55rem + 3vw, 4.25rem);
	--es-text-h2: clamp(1.75rem, 1.5rem + 1.4vw, 2.5rem);
	--es-text-h3: clamp(1.2rem, 1.1rem + 0.5vw, 1.5rem);
	--es-text-h4: clamp(1.05rem, 1rem + 0.3vw, 1.2rem);
	--es-text-body: clamp(0.95rem, 0.9rem + 0.2vw, 1.125rem);
	--es-text-small: 0.875rem;
	--es-text-eyebrow: 0.8125rem;

	/* Spacing */
	--es-space-section-y: clamp(2rem, 1.6rem + 1.6vw, 3.25rem);
	--es-space-section-x: clamp(1.25rem, 1rem + 2vw, 2.5rem);
	--es-space-gap-lg: clamp(1.75rem, 1.4rem + 1.6vw, 2.5rem);
	--es-space-gap-md: 1.5rem;
	--es-space-gap-sm: 0.9rem;

	/* Radius */
	--es-radius-card: 16px;
	--es-radius-btn: 8px;
	--es-radius-pill: 999px;

	/* Layout */
	--es-max-width: 1250px;
}

/* ── Base ─────────────────────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; }

body.es-view {
	margin: 0;
	font-family: var(--es-font-body);
	color: var(--es-color-text);
	background: var(--es-color-bg);
	-webkit-font-smoothing: antialiased;
}

/* :where() keeps these base rules at "one element" specificity, so any
   component class (e.g. .es-state-list__grid li, .es-btn--primary) can
   override them without needing its own body.es-view prefix. */
:where(body.es-view) h1,
:where(body.es-view) h2,
:where(body.es-view) h3,
:where(body.es-view) h4,
:where(body.es-view) h5,
:where(body.es-view) h6 {
	font-family: var(--es-font-display);
	color: var(--es-color-secondary);
	line-height: 1.1;
	letter-spacing: -0.01em;
	margin: 0 0 var(--es-space-gap-sm);
}
:where(body.es-view) h1 { font-size: var(--es-text-h1); line-height: 1.2; font-weight: 500; }
:where(body.es-view) h2 { font-size: var(--es-text-h2); font-weight: 500; }
:where(body.es-view) h3 { font-family: var(--es-font-body); font-weight: 800; font-size: var(--es-text-h3); }
:where(body.es-view) h4 { font-family: var(--es-font-body); font-weight: 700; font-size: var(--es-text-h4); }
:where(body.es-view) h5,
:where(body.es-view) h6 {
	font-family: var(--es-font-body);
	font-weight: 700;
	font-size: var(--es-text-small);
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

:where(body.es-view) p,
:where(body.es-view) li {
	font-size: var(--es-text-body);
	line-height: 1.7;
	color: var(--es-color-text-muted);
}
:where(body.es-view) p { margin: 0 0 var(--es-space-gap-sm); }
:where(body.es-view) p:last-child { margin-bottom: 0; }

:where(body.es-view) ul,
:where(body.es-view) ol {
	margin: var(--es-space-gap-md) 0;
}
:where(body.es-view) li + li { margin-top: 0.5em; }
:where(body.es-view) li > ul,
:where(body.es-view) li > ol { margin-top: 0.5em; margin-bottom: 0; }

:where(body.es-view) a { color: var(--es-color-primary); text-decoration: none; }
:where(body.es-view) a:hover { color: var(--es-color-primary-hover); }

/* Images inserted via the editor arrive wrapped in their own <p> (that's how
   TinyMCE stores a standalone image) — style the image itself and let it own
   the block spacing, rather than stacking image + text-paragraph margins. */
.es-article img {
	display: block;
	max-width: 100%;
	height: auto;
	margin: var(--es-space-gap-md) auto;
	border-radius: var(--es-radius-card);
}
.es-article p:has(> img:only-child) {
	margin: 0;
}

/* Prose blocks (admin-authored Body content) get extra rhythm between headings
   and the text that follows them, without needing per-tag overrides elsewhere. */
.es-article h2,
.es-article h3,
.es-article h4,
.es-article h5,
.es-article h6 {
	margin-top: clamp(1.5rem, 1.2rem + 1vw, 2.5rem);
}
.es-article .es-container > *:first-child { margin-top: 0; }

/* ── Layout primitives ────────────────────────────────────────────────────── */

.es-container {
	max-width: var(--es-max-width);
	margin: 0 auto;
	padding: var(--es-space-section-y) var(--es-space-section-x);
}

/* ── Buttons ──────────────────────────────────────────────────────────────── */

.es-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5em;
	font-family: var(--es-font-body);
	font-weight: 800;
	font-size: 1rem;
	padding: 0.95em 1.75em;
	border-radius: var(--es-radius-btn);
	border: 2px solid transparent;
	cursor: pointer;
	white-space: nowrap;
}
.es-btn--primary { background: var(--es-color-primary); color: var(--es-color-text); }
.es-btn--primary:hover { background: var(--es-color-primary-hover); color: var(--es-color-text); }
.es-btn--secondary { background: transparent; color: var(--es-color-white); border-color: var(--es-color-secondary-border); }
.es-btn--secondary:hover { border-color: var(--es-color-white); color: var(--es-color-white); }
.es-btn--dark { background: var(--es-color-secondary); color: var(--es-color-white); }
.es-btn--dark:hover { background: var(--es-color-secondary-surface); color: var(--es-color-white); }

/* ── Breadcrumbs ──────────────────────────────────────────────────────────── */

.es-breadcrumbs { border-bottom: 1px solid var(--es-color-border); }
.es-breadcrumbs__list {
	max-width: var(--es-max-width);
	margin: 0 auto;
	padding: 0.6rem var(--es-space-section-x);
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	font-size: var(--es-text-small);
	color: var(--es-color-text-muted);
}
.es-breadcrumbs__list li { display: flex; align-items: center; margin-top: 0; }
.es-breadcrumbs__list li:not(:last-child)::after { content: '/'; margin: 0 0.5em; color: var(--es-color-border); }
.es-breadcrumbs__list a { color: var(--es-color-text-muted); }
.es-breadcrumbs__list a:hover { color: var(--es-color-secondary); }
.es-breadcrumbs__current { color: var(--es-color-text); font-weight: 600; }

/* ── Header / Footer ──────────────────────────────────────────────────────── */

.es-header {
	position: sticky;
	top: 0;
	z-index: 20;
	background: var(--es-color-bg);
	border-bottom: 1px solid var(--es-color-border);
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.es-header--scrolled { box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08); }
.es-header--hidden { transform: translateY(-100%); }
.es-header__inner {
	max-width: var(--es-max-width);
	margin: 0 auto;
	padding: 0.2rem var(--es-space-section-x);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--es-space-gap-sm);
}
.es-header__brand { display: inline-flex; align-items: center; line-height: 0; margin: 0; }
.es-header__logo { display: block; height: 65px; width: auto; margin: 0; }
.es-header__phone.es-btn { padding: 0.75em 1.35em; font-size: var(--es-text-small); }

/* Primary nav — shared by the plugin's shell.php and the theme's header.php so
   every page (virtual or themed) gets the identical header. */
.es-nav-toggle { display: none; }
.es-nav-burger { display: none; }
.es-nav__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	align-items: center;
	gap: 1.5rem;
	font-weight: 600;
	font-size: var(--es-text-small);
}
.es-nav__list li { margin: 0; }
.es-nav__list a { color: var(--es-color-text); }
.es-nav__list a:hover { color: var(--es-color-primary-hover); }

/* Mobile: collapse the nav behind a burger toggle (pure CSS checkbox-hack, no
   JS). The one deliberate breakpoint in this stylesheet — a hamburger and an
   inline nav can't coexist fluidly, same exception class as the CTA
   background-image swap. */
@media (max-width: 760px) {
	.es-header__inner { flex-wrap: wrap; }
	.es-header__logo { height: 36px; }
	.es-nav-burger {
		display: flex;
		flex-direction: column;
		justify-content: center;
		gap: 4px;
		width: 24px;
		height: 24px;
		cursor: pointer;
	}
	.es-nav-burger span {
		display: block;
		height: 2px;
		background: var(--es-color-secondary);
		border-radius: 2px;
	}
	.es-nav {
		flex-basis: 100%;
		order: 3;
		max-height: 0;
		overflow: hidden;
		transition: max-height 0.3s ease;
	}
	.es-nav-toggle:checked ~ .es-nav {
		max-height: 20rem;
	}
	.es-nav__list {
		flex-direction: column;
		align-items: flex-start;
		gap: 0.75rem;
		padding: 1rem 0 0;
	}

	/* Phone CTA moves out of the top bar and into the dropdown, below the nav
	   links — collapses/expands off the same checkbox as .es-nav (both are its
	   siblings, so the ~ combinator reaches each independently). display:none
	   (not just max-height:0) as the default state — fully removes it from
	   the top bar rather than relying on a height-collapse trick for that. */
	.es-header__phone {
		display: none;
		order: 4;
		flex-basis: 100%;
		width: 100%;
		margin: 0 0 1rem;
	}
	.es-nav-toggle:checked ~ .es-header__phone {
		display: flex;
	}
}

/* ── Footer: 3-column top (brand / menu / contact), a "Recent Posts" row,
   and a bottom copyright bar — shared by the plugin's shell.php and the
   theme's footer.php so every page gets the identical footer. */

.es-footer {
	background: var(--es-color-secondary);
	color: var(--es-color-text-muted-dark);
	font-size: var(--es-text-small);
}
.es-footer p { color: inherit; margin: 0; }

.es-footer__top {
	display: flex;
	flex-wrap: wrap;
	gap: var(--es-space-gap-lg);
}
.es-footer__brand { flex: 2 1 260px; }
.es-footer__col { flex: 1 1 160px; }
.es-footer__logo-link { display: inline-block; margin-bottom: var(--es-space-gap-md); }
.es-footer__logo { display: block; height: 70px; width: auto; }
.es-footer__tagline { max-width: 24rem; font-size: var(--es-text-small); }

.es-footer__heading {
	color: var(--es-color-white);
	font-size: var(--es-text-small);
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	margin: 0 0 var(--es-space-gap-sm);
}

.es-footer__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.6em;
}
.es-footer__list li { margin: 0; }
/* Real menu assigned to the footer location may include a "Home" item (WP adds
   .menu-item-home when it's added via the "Home" quick-link) — hidden only in
   this Menu column since the logo right above it already links home; the
   fallback markup (no menu assigned) simply omits Home outright instead. */
.es-footer__col .menu-item-home { display: none; }
.es-footer__list a { color: var(--es-color-text-muted-dark); }
.es-footer__list a:hover { color: var(--es-color-white); }

/* RSS link — icon is a mask (not an <img>) so it inherits currentColor and
   picks up the same hover transition as any other footer link, with no new
   hardcoded color introduced. */
.es-footer__rss { display: inline-flex; align-items: center; gap: 0.5em; }
.es-footer__rss::before {
	content: '';
	display: inline-block;
	width: 14px;
	height: 14px;
	flex-shrink: 0;
	background-color: currentColor;
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 11a9 9 0 0 1 9 9'/%3E%3Cpath d='M4 4a16 16 0 0 1 16 16'/%3E%3Ccircle cx='5' cy='19' r='1'/%3E%3C/svg%3E");
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 11a9 9 0 0 1 9 9'/%3E%3Cpath d='M4 4a16 16 0 0 1 16 16'/%3E%3Ccircle cx='5' cy='19' r='1'/%3E%3C/svg%3E");
	-webkit-mask-size: contain;
	mask-size: contain;
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
}

.es-footer__posts {
	border-top: 1px solid var(--es-color-secondary-border);
	margin-top: var(--es-space-gap-lg);
	padding-top: var(--es-space-gap-lg);
}
.es-footer__posts-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
}
.es-footer__posts-list li { margin: 0; display: flex; align-items: center; }
.es-footer__posts-list li:not(:first-child)::before {
	content: '\00b7';
	padding: 0 0.75em;
	color: var(--es-color-label-dark);
}
.es-footer__posts-list a { color: var(--es-color-text-muted-dark); font-size: var(--es-text-small); }
.es-footer__posts-list a:hover { color: var(--es-color-white); }

.es-footer__bottom { background: var(--es-color-secondary-surface); }
.es-footer__bottom-inner {
	max-width: var(--es-max-width);
	margin: 0 auto;
	padding: var(--es-space-gap-sm) var(--es-space-section-x);
	text-align: left;
}
.es-footer__copy { margin: 0; font-size: var(--es-text-small); }

/* ── Top hero: shared by every page type (plugin virtual pages + theme pages)
   via templates/partials/hero.php. Background is always an image + navy
   wash — --es-hero-bg is set inline per-page (own image, or falls back to
   the shared default), so this rule needs no per-page-type CSS variant. */

.es-state-top {
	background:
		linear-gradient(
			color-mix(in srgb, var(--es-color-secondary) 85%, transparent),
			color-mix(in srgb, var(--es-color-secondary) 85%, transparent)
		),
		var(--es-hero-bg) center/cover no-repeat;
	background-color: var(--es-color-secondary);
	color: var(--es-color-white);
}
.es-state-top .es-container {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: var(--es-space-gap-md);
}
/* Margins zeroed on every direct child so `gap` alone controls spacing —
   otherwise a child's own base-typography margin (e.g. the badge <p>'s
   bottom margin) stacks on top of the gap and makes spacing uneven
   depending on which elements happen to be adjacent. */
.es-state-top .es-container > * { margin: 0; }
.es-state-top h1 { color: var(--es-color-white); }
.es-state-top p { color: var(--es-color-text-muted-dark); }

/* Desktop only: fixed hero band height with vertically-centered content —
   mobile keeps its natural (padding-driven) height. Same 760px breakpoint the
   header burger uses. */
@media (min-width: 761px) {
	.es-state-top {
		display: flex;
		align-items: center;
		min-height: 465px;
	}
	.es-state-top .es-container { width: 100%; }
}

/* Hero badge — pill + pulsing dot, same behavior as the design-handoff
   reference's "OPEN NOW" badge, restyled with our tokens (amber-on-navy
   tint via color-mix, no new colors introduced). Fixed/standard copy,
   rendered by templates/partials/hero.php on every page. */
.es-hero__badge {
	display: inline-flex;
	align-items: center;
	gap: 0.5em;
	margin: 0;
	padding: 0.2rem 1rem;
	font-family: var(--es-font-body);
	font-size: var(--es-text-eyebrow);
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--es-color-primary);
	background: color-mix(in srgb, var(--es-color-primary) 15%, transparent);
	border: 1px solid color-mix(in srgb, var(--es-color-primary) 40%, transparent);
	border-radius: var(--es-radius-pill);
}
.es-hero__badge::before {
	content: '';
	width: 6px;
	height: 6px;
	flex-shrink: 0;
	border-radius: 50%;
	background: var(--es-color-primary);
	animation: es-hero-pulse 2s ease-in-out infinite;
}
@keyframes es-hero-pulse {
	0%, 100% { opacity: 1; transform: scale(1); }
	50% { opacity: 0.5; transform: scale(1.35); }
}
@media (prefers-reduced-motion: reduce) {
	.es-hero__badge::before { animation: none; }
}

/* ── Marquee stripe — shared, sits right under the hero on every page.
   Native horizontal scroll (not a CSS transform loop) so grabbing/dragging
   it is just normal scrollLeft manipulation; JS in site.js auto-advances it
   and handles the drag. Icon is a placeholder square (matches the header
   brand mark) until real icons are supplied. ──────────────────────────── */

.es-marquee { background: var(--es-color-secondary); overflow: hidden; }
.es-marquee__track {
	display: flex;
	overflow-x: auto;
	scrollbar-width: none;
	cursor: grab;
	padding: var(--es-space-gap-md) 0;
	user-select: none;
}
.es-marquee__track::-webkit-scrollbar { display: none; }
.es-marquee__track.is-dragging { cursor: grabbing; }
.es-marquee__group {
	display: flex;
	flex-shrink: 0;
	gap: var(--es-space-gap-lg);
	padding-right: var(--es-space-gap-lg);
}
.es-marquee__item {
	display: flex;
	align-items: center;
	gap: 0.6em;
	white-space: nowrap;
	color: var(--es-color-white);
	font-weight: 700;
	font-size: var(--es-text-small);
}
.es-marquee__icon {
	width: 10px;
	height: 10px;
	background: var(--es-color-primary);
	transform: rotate(45deg);
	flex-shrink: 0;
	display: inline-block;
}

/* ── State page: city list ────────────────────────────────────────────────── */

.es-state-list { background: var(--es-color-white); }
/* Multi-column, not flex-wrap: fills top-to-bottom within a column before
   starting the next one (vertical grouping), and a partial last column just
   has fewer items sitting at their normal width — nothing stretches to fill
   leftover row space, unlike flex-wrap's last-row behavior. */
.es-state-list__grid {
	list-style: none;
	margin: 0;
	padding: 0;
	columns: 5 14rem;
	column-gap: 0.75rem;
}
.es-state-list__grid li { margin: 0 0 0.75rem; break-inside: avoid; }
.es-state-list__grid a {
	display: block;
	background: var(--es-color-bg);
	border: 1px solid var(--es-color-border);
	border-radius: var(--es-radius-btn);
	padding: 0.85em 1.1em;
	color: var(--es-color-text);
	font-weight: 600;
	text-align: center;
}
.es-state-list__grid a:hover { border-color: var(--es-color-primary); color: var(--es-color-secondary); }

/* ── City page: intro + services two-column strip ─────────────────────────── */
/* Edge-aligned two columns: ~60/40 on desktop via flex-grow ratio (3:2), each
   with a pixel min-width so the row wraps to two 100%-width rows on narrow
   viewports without needing a media query. */

.es-service-list { background: var(--es-color-white); }
.es-service-list__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	gap: var(--es-space-gap-lg);
}
.es-service-list__intro { flex: 3 1 320px; }
.es-service-list__map {
	width: 100%;
	height: 250px;
	border-radius: var(--es-radius-card);
	overflow: hidden;
	margin-bottom: var(--es-space-gap-md);
}
.es-service-list__map iframe { display: block; width: 100%; height: 100%; border: 0; }
.es-service-list__grid {
	flex: 2 1 240px;
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.6rem;
}
.es-service-list__grid li { margin: 0; }
.es-service-list__grid a {
	display: block;
	background: var(--es-color-bg);
	border: 1px solid var(--es-color-border);
	border-radius: var(--es-radius-btn);
	padding: 0.85em 1.1em;
	color: var(--es-color-text);
	font-weight: 600;
}
.es-service-list__grid a:hover { border-color: var(--es-color-primary); color: var(--es-color-secondary); }

/* ── State/city page: hardcoded CTA band ──────────────────────────────────── */

.es-cta { background: var(--es-color-surface-alt); }
.es-cta__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--es-space-gap-lg);
}
.es-cta__media {
	flex: 1 1 240px;
	aspect-ratio: 4 / 3;
	border-radius: var(--es-radius-card);
	overflow: hidden;
}
.es-cta__media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.es-cta__content { flex: 2 1 320px; }
.es-cta__content h2 { margin-bottom: 0.35em; }
.es-cta__content p { margin-bottom: 0; }
.es-cta__action { flex: 1 1 200px; display: flex; justify-content: flex-end; }

/* ── Article body: collapsed preview + "Show more" ────────────────────────── */

.es-article { background: var(--es-color-white); }
.es-article__content {
	position: relative;
	max-height: 28rem;
	overflow: hidden;
}
.es-article__content::after {
	content: '';
	position: absolute;
	inset: auto 0 0 0;
	height: 4rem;
	background: linear-gradient(to bottom, transparent, var(--es-color-bg));
	opacity: 0;
	transition: opacity 0.3s ease;
}
/* Only fade the bottom (and only clip via max-height) when content actually
   overflows and there's a working "Show more" to reveal it — otherwise short
   body text (e.g. the Locations page) rendered fine but looked cut off under
   an always-on gradient with no way to dismiss it. */
.es-article__content.has-overflow::after { opacity: 1; }
.es-article__content.is-expanded { max-height: none; }
.es-article__content.is-expanded::after { opacity: 0; }
.es-article__toggle {
	display: none;
	margin-top: var(--es-space-gap-sm);
	width: 100%;
	background: none;
	border: none;
	padding: 0;
	color: var(--es-color-primary);
	font-family: var(--es-font-body);
	font-weight: 700;
	font-size: var(--es-text-small);
	text-align: right;
	cursor: pointer;
}
.es-article__toggle:hover { color: var(--es-color-primary-hover); }
.es-article__content.has-overflow + .es-article__toggle { display: block; }

/* ── FAQ section: semantic <details>/<summary> accordion, no JS needed ──────── */

.es-faq { background: var(--es-color-bg); }
.es-faq__header { text-align: center; max-width: 40rem; margin: 0 auto var(--es-space-gap-lg); }
.es-faq__list {
	max-width: 46rem;
	margin: 0 auto;
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}
.es-faq__item {
	background: var(--es-color-white);
	border: 1px solid var(--es-color-border);
	border-radius: var(--es-radius-btn);
	padding: 1em 1.25em;
}
.es-faq__question {
	cursor: pointer;
	list-style: none;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1em;
	font-weight: 700;
	color: var(--es-color-secondary);
}
.es-faq__question::-webkit-details-marker { display: none; }
.es-faq__question::after {
	content: '+';
	flex-shrink: 0;
	font-size: 1.25em;
	line-height: 1;
	color: var(--es-color-primary);
	transition: transform 0.2s ease;
}
.es-faq__item[open] .es-faq__question::after { transform: rotate(45deg); }
.es-faq__answer { padding-top: 0.75em; }
.es-faq__answer p:last-child { margin-bottom: 0; }

/* ── Floating "Call Now" widget — mobile: fixed full-width strip at the
   viewport bottom; desktop: fixed card, bottom-right corner. Hidden until
   the hero scrolls out of view (JS in site.js watches .es-state-top), then
   fades/slides in — shared by every page type. Uses a component-specific
   60rem breakpoint (not the header's 760px) matching the reference widget
   this was modeled on. ──────────────────────────────────────────────── */

@media (max-width: 59.99rem) {
	body.es-view { padding-bottom: 80px; }
}

.es-cta-bar {
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	z-index: 90;
	background: var(--es-color-white);
	border-top: 1px solid var(--es-color-border);
	box-shadow: 0 -4px 24px color-mix(in srgb, var(--es-color-primary) 8%, transparent);
	transform: translateY(100%);
	opacity: 0;
	transition: transform 0.4s ease, opacity 0.4s ease;
}
.es-cta-bar.is-visible { transform: none; opacity: 1; }

.es-cta-bar__inner {
	display: flex;
	align-items: center;
	gap: var(--es-space-gap-sm);
	padding: var(--es-space-gap-sm) var(--es-space-section-x);
	max-width: var(--es-max-width);
	margin-inline: auto;
	min-height: 80px;
}

.es-cta-bar__profile {
	display: flex;
	align-items: center;
	gap: var(--es-space-gap-sm);
	flex: 1;
	min-width: 0;
}
.es-cta-bar__avatar {
	display: none;
	width: clamp(3.25rem, 10vw, 3.75rem);
	height: clamp(3.25rem, 10vw, 3.75rem);
	border-radius: var(--es-radius-card);
	object-fit: cover;
	object-position: center top;
	flex-shrink: 0;
	border: 2px solid var(--es-color-border);
}
.es-cta-bar__text { display: flex; flex-direction: column; gap: 0.5em; min-width: 0; }
.es-cta-bar__status {
	display: flex;
	align-items: center;
	gap: 0.5em;
	font-size: var(--es-text-small);
	font-weight: 600;
	color: var(--es-color-secondary);
	line-height: 1;
	white-space: nowrap;
}
.es-cta-bar__dot {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--es-color-primary);
	flex-shrink: 0;
	animation: es-hero-pulse 2s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) {
	.es-cta-bar__dot { animation: none; }
}

/* Phone number — hidden on mobile (space constraint), shown on desktop */
.es-cta-bar__number {
	display: none;
	font-family: var(--es-font-display);
	font-size: var(--es-text-small);
	font-weight: 500;
	color: var(--es-color-primary-hover);
	text-decoration: none;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	transition: color 0.2s ease;
}
.es-cta-bar__number:hover { color: var(--es-color-secondary); }

.es-cta-bar__action { flex: 0 0 62%; }
.es-cta-bar__btn { width: 100%; }

/* Responsive button label: short on mobile, full phone number on desktop */
.es-cta-bar__label-full { display: none; }

@media (min-width: 60rem) {
	.es-cta-bar {
		left: auto;
		right: clamp(2rem, 3vw, 3rem);
		bottom: clamp(2rem, 3vw, 3rem);
		width: clamp(14rem, 18vw, 17rem);
		border: 1px solid var(--es-color-border);
		border-radius: var(--es-radius-card);
		box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
		overflow: hidden;
	}
	.es-cta-bar__inner {
		flex-direction: column;
		align-items: stretch;
		gap: var(--es-space-gap-md);
		padding: var(--es-space-gap-md);
		max-width: none;
		margin: 0;
		min-height: 0;
	}
	.es-cta-bar__avatar {
		display: block;
		width: clamp(2.5rem, 3.5vw, 3rem);
		height: clamp(2.5rem, 3.5vw, 3rem);
	}
	.es-cta-bar__number { display: block; }
	.es-cta-bar__action {
		flex: 0 0 auto;
		border-top: 1px solid var(--es-color-border);
		padding-top: var(--es-space-gap-sm);
	}
	.es-cta-bar__label-short { display: none; }
	.es-cta-bar__label-full { display: inline; }
}

/* ── Nearby Businesses — city page listing (Local SEO → Import → Google
   Places Settings; fetched per city from the Locations admin list). Column
   widths as CSS vars so a single 3-col grid rule handles every row; own
   business is always pinned first (hardcoded content), followed by
   Google-fetched competitor listings. ─────────────────────────────────── */

.es-businesses__list {
	--biz-col-photo: 320px;
	--biz-col-hours: 300px;
}

.es-businesses { background: var(--es-color-white); border-top: 1px solid var(--es-color-border); }

.es-businesses__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: var(--es-space-gap-md);
}

.es-businesses__item {
	border: 1px solid var(--es-color-border);
	border-radius: var(--es-radius-card);
	background: var(--es-color-white);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
	overflow: hidden;
	display: flex;
	flex-direction: column;
}

.es-businesses__item--main {
	background: var(--es-color-bg);
	border: 1px solid color-mix(in srgb, var(--es-color-primary) 40%, transparent);
	border-radius: var(--es-radius-btn);
}

.es-biz__body {
	display: grid;
	grid-template-columns: var(--biz-col-photo) 1fr var(--biz-col-hours);
	align-items: stretch;
	min-height: clamp(160px, 16vw, 220px);
	flex: 1;
}

/* Col 1: photo/logo */
.es-biz__logo {
	overflow: hidden;
	background: color-mix(in srgb, var(--es-color-primary) 8%, transparent);
	position: relative;
}
.es-biz__logo-img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center top;
	display: block;
}
.es-biz__logo-placeholder {
	width: 100%;
	height: 100%;
	min-height: inherit;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--es-color-secondary);
	opacity: 0.35;
}
.es-biz__logo-placeholder::after {
	content: '';
	display: block;
	width: 48px;
	height: 48px;
	background: currentColor;
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M19 3H5a2 2 0 00-2 2v14a2 2 0 002 2h14a2 2 0 002-2V5a2 2 0 00-2-2zm0 16H5V5h14v14zm-5.5-9.5a1.5 1.5 0 11-3 0 1.5 1.5 0 013 0zM5 17l4-4 2.5 2.5 3.5-4.5L19 17H5z'/%3E%3C/svg%3E");
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M19 3H5a2 2 0 00-2 2v14a2 2 0 002 2h14a2 2 0 002-2V5a2 2 0 00-2-2zm0 16H5V5h14v14zm-5.5-9.5a1.5 1.5 0 11-3 0 1.5 1.5 0 013 0zM5 17l4-4 2.5 2.5 3.5-4.5L19 17H5z'/%3E%3C/svg%3E");
	mask-size: contain;
	-webkit-mask-size: contain;
	mask-repeat: no-repeat;
	-webkit-mask-repeat: no-repeat;
}
.es-businesses__item--main .es-biz__logo {
	background: color-mix(in srgb, var(--es-color-primary) 8%, transparent);
}
/* Our own logo: never crop, unlike a competitor's cover-fit photo */
.es-businesses__item--main .es-biz__logo-img {
	object-fit: contain;
	object-position: center;
	padding: var(--es-space-gap-md);
}

/* Col 2: name + rating + CTA/phone */
.es-biz__main {
	padding: var(--es-space-gap-md) var(--es-space-gap-lg) var(--es-space-gap-md) var(--es-space-gap-md);
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: var(--es-space-gap-sm);
	min-width: 0;
}
.es-biz__name {
	font-size: var(--es-text-h4);
	color: var(--es-color-secondary);
	margin: 0;
}
.es-businesses__item--main .es-biz__name { font-size: var(--es-text-h3); }
/* Badge would otherwise stretch full-width — .es-biz__main is a column flex
   container with the default align-items: stretch, unlike the hero's centered
   layout this badge class was originally written for. */
.es-biz__main .es-hero__badge { max-width: max-content; }

.es-biz__rating { display: flex; align-items: center; gap: 0.5em; flex-wrap: wrap; }
.es-biz__rating-avatars-img { height: 24px; width: auto; display: block; border-radius: var(--es-radius-btn); }
.es-star-rating {
	display: inline-block;
	font-size: 1.1rem;
	letter-spacing: 0.12rem;
	line-height: 1;
	background: linear-gradient(90deg, var(--es-color-primary) var(--es-rating), var(--es-color-border) var(--es-rating));
	background-clip: text;
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	user-select: none;
}
.es-biz__rating-score { font-size: var(--es-text-small); font-weight: 700; color: var(--es-color-secondary); }
.es-biz__review-count { font-size: var(--es-text-small); color: var(--es-color-text-muted); }

/* Toggle and number both occupy the exact same absolutely-positioned box, so
   revealing the number never changes .es-biz__phone-wrap's own size — nothing
   in the column above it re-centers/shifts when the phone number appears. */
.es-biz__phone-wrap { position: relative; min-height: 1.6em; }
.es-biz__phone-toggle {
	position: absolute;
	inset: 0;
	display: inline-flex;
	align-items: center;
	gap: 0.35em;
	background: none;
	border: none;
	padding: 0;
	cursor: pointer;
	font-size: var(--es-text-small);
	font-weight: 700;
	color: var(--es-color-primary-hover);
	text-decoration: underline;
	text-underline-offset: 2px;
	white-space: nowrap;
}
.es-biz__phone-toggle svg { flex-shrink: 0; }
.es-biz__phone-toggle:hover { color: var(--es-color-secondary); }
.es-biz__phone-toggle[aria-expanded="true"] { display: none; }
.es-biz__phone-number {
	position: absolute;
	inset: 0;
	display: inline-flex;
	align-items: center;
	font-size: var(--es-text-small);
	font-weight: 700;
	color: var(--es-color-secondary);
	white-space: nowrap;
}
.es-biz__phone-number[hidden] { display: none; }

/* Col 3: opening hours */
.es-biz__hours {
	padding: var(--es-space-gap-md);
	border-left: 1px solid var(--es-color-border);
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 0.5em;
	overflow-x: auto;
}
.es-businesses__item--main .es-biz__hours { border-left-color: color-mix(in srgb, var(--es-color-primary) 40%, transparent); }
.es-biz__hours-label {
	font-size: var(--es-text-eyebrow);
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--es-color-secondary);
	margin: 0;
	white-space: nowrap;
}
.es-biz__hours-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; }
.es-biz__hours-list li { font-size: var(--es-text-small); color: var(--es-color-text-muted); white-space: nowrap; }
.es-biz__hours-list .es-biz__hours-closed { opacity: 0.45; }
.es-biz__hours-day { font-weight: 700; color: var(--es-color-secondary); }
.es-biz__hours-value-text { font-size: var(--es-text-small); color: var(--es-color-text-muted); margin: 0; }

/* Our own listing's fixed feature list, in place of a real hours string —
   same sizing as .es-biz__hours-list (a <ul>'s own font-size doesn't cascade
   onto <li> here: the base typography rule sets font-size directly on every
   <li>, which wins over the inherited value unless <li> is targeted too). */
.es-biz__hours-value {
	list-style: disc;
	padding-left: var(--es-space-gap-sm);
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 3px;
}
.es-biz__hours-value li { font-size: var(--es-text-small); color: var(--es-color-text-muted); white-space: nowrap; margin-top: 0; }

.es-biz__cta-text { font-size: var(--es-text-small); font-weight: 700; color: var(--es-color-urgent); margin: 0; line-height: 1.4; }
.es-biz__cta-btn { font-size: var(--es-text-small); padding: 0.7em 1.1em; align-self: flex-start; }

@media (max-width: 61.25rem) {
	.es-biz__body { grid-template-columns: 1fr; min-height: unset; }
	.es-biz__logo { aspect-ratio: 7 / 3; }
	.es-biz__hours { border-left: none; border-top: 1px solid var(--es-color-border); }
}
