/**
 * Variant CSS: locations--cards-grid
 *
 * Branches as cards — name, address, hours, phone and a navigation link. For
 * businesses with more than one location (contact handles a single one, coverage
 * handles a service area). Text stays --ink (polarity-aware); name accent rule,
 * phone, em and the link take --accent. Cards stack to one column on mobile.
 * First variant of the new `locations` role.
 */

body.aibt-universal .universal-locations--cards-grid {
	padding-block: calc(clamp(3rem, 7vw, 5rem) * var(--density, 1));
}

/* Intro. */
body.aibt-universal .universal-locations--cards-grid .universal-locations__intro {
	margin-bottom: clamp(2.2rem, 5vw, 3.4rem);
}

body.aibt-universal .universal-locations--cards-grid .universal-locations__kicker {
	font-family: var(--font-body) !important;
	font-size: var(--text-xs) !important;
	font-weight: 600 !important;
	letter-spacing: var(--tracking-widest) !important;
	text-transform: uppercase !important;
	color: var(--accent) !important;
	margin: 0 auto var(--space-sm) auto !important;
}

body.aibt-universal .universal-locations--cards-grid .universal-locations__headline {
	font-family: var(--font-display) !important;
	color: var(--ink) !important;
	margin: 0 auto var(--space-sm) auto !important;
}

body.aibt-universal .universal-locations--cards-grid .universal-locations__headline em {
	color: var(--accent) !important;
	font-style: italic;
}

body.aibt-universal .universal-locations--cards-grid .universal-locations__deck {
	font-family: var(--font-body) !important;
	font-size: var(--text-base) !important;
	color: var(--ink) !important;
	opacity: 0.74;
	margin: 0 !important;
}

/* Cards. */
body.aibt-universal .universal-locations--cards-grid .universal-locations__cards {
	gap: clamp(1.2rem, 3vw, 2rem) !important;
	align-items: stretch !important;
}

body.aibt-universal .universal-locations--cards-grid .universal-locations__card {
	display: flex;
	flex-direction: column;
	padding: clamp(1.4rem, 2.8vw, 2rem) !important;
	border-radius: var(--decor-radius, 16px);
	background: color-mix(in srgb, var(--ink) 3%, var(--bg-main, transparent));
	border: 1px solid color-mix(in srgb, var(--ink) 11%, transparent);
	box-shadow: 0 20px 44px -30px rgba(0, 0, 0, 0.38);
	transition: transform var(--duration-fast, 0.18s) var(--ease-default, ease),
		box-shadow var(--duration-fast, 0.18s) var(--ease-default, ease);
}

body.aibt-universal .universal-locations--cards-grid .universal-locations__card:hover {
	transform: translateY(-4px);
	box-shadow: 0 26px 50px -28px rgba(0, 0, 0, 0.44);
}

body.aibt-universal .universal-locations--cards-grid .universal-locations__name {
	font-family: var(--font-display) !important;
	font-size: clamp(1.25rem, 2.4vw, 1.5rem) !important;
	font-weight: 600 !important;
	line-height: 1.2 !important;
	color: var(--ink) !important;
	margin: 0 0 var(--space-sm) 0 !important;
	padding-bottom: var(--space-sm);
	border-bottom: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
}

body.aibt-universal .universal-locations--cards-grid .universal-locations__address {
	font-family: var(--font-body) !important;
	font-size: var(--text-sm) !important;
	line-height: var(--leading-relaxed) !important;
	color: var(--ink) !important;
	opacity: 0.8;
	margin: 0 0 0.4rem 0 !important;
}

body.aibt-universal .universal-locations--cards-grid .universal-locations__hours {
	font-family: var(--font-body) !important;
	font-size: var(--text-sm) !important;
	color: var(--ink) !important;
	opacity: 0.66;
	margin: 0 0 0.4rem 0 !important;
}

body.aibt-universal .universal-locations--cards-grid .universal-locations__phone {
	font-family: var(--font-body) !important;
	font-size: var(--text-base) !important;
	font-weight: 600 !important;
	color: var(--accent) !important;
	margin: 0 0 var(--space-md) 0 !important;
}

body.aibt-universal .universal-locations--cards-grid .universal-locations__link-wrap {
	margin-top: auto !important;
}

body.aibt-universal .universal-locations--cards-grid .universal-locations__link .wp-block-button__link {
	padding: 0 !important;
	background: transparent !important;
	color: var(--accent) !important;
	font-family: var(--font-body) !important;
	font-weight: 600 !important;
	font-size: var(--text-sm) !important;
	border: none !important;
}

body.aibt-universal .universal-locations--cards-grid .universal-locations__link .wp-block-button__link:hover {
	color: var(--accent-hover, var(--accent)) !important;
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* Keyboard focus ring (a11y) — links lack a visible focus state. */
body.aibt-universal .universal-locations--cards-grid .universal-locations__link .wp-block-button__link:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 2px;
	border-radius: var(--decor-radius, 6px);
}

/* One column on mobile. */
@media (max-width: 781px) {
	body.aibt-universal .universal-locations--cards-grid .universal-locations__card {
		flex-basis: 100% !important;
	}
}

/* Respect reduced-motion — drop card lift transform. */
@media (prefers-reduced-motion: reduce) {
	body.aibt-universal .universal-locations--cards-grid .universal-locations__card,
	body.aibt-universal .universal-locations--cards-grid .universal-locations__card:hover {
		transition: none;
		transform: none;
	}
}

/* A8/A9 left-shift fix (2026-06-08): centered intro element(s) were max-width-capped by
   WP constrained layout but pinned left by horizontal margin:0. Force margin-inline:auto.
   Section class doubled -> specificity (0,4,1) beats h2.__headline-style rules; harmless on
   already-centered elements (auto margins compute to 0). Only left/right are overridden. */
body.aibt-universal .universal-locations--cards-grid.universal-locations--cards-grid .universal-locations__deck { margin-inline: auto !important; }
