/*
 * Evolve Chiro — WPBakery building blocks + row helpers
 *
 * ROW CLASSES (Row → Edit → "Extra class name"):
 *   ec-row          Full-width row, content aligned to the 1240px container.
 *                   Top / bottom spacing: Row → Spacing tab (Extra Large 140,
 *                   Large 120, Default 100, Medium 80, Small 60, None);
 *                   scales down on tablet / mobile.
 *   ec-bg-cream     Cream background       ec-bg-sand   Sand background
 *   ec-bg-linen     Linen (warm off-white) background
 *   ec-bg-ink       Dark background (use light text/headings)
 *   ec-glow         Soft gold glow in the top-right corner
 *   (Colours come from Theme Settings → Styles.)
 *
 * INNER ROW CLASSES (Inner Row → "Extra class name"):
 *   ec-feature-row  Bordered 2-column grid row for Evolve Feature items.
 *   ec-gap-sm       18px gaps between columns (e.g. review tiles).
 *   ec-banner       Gold rounded panel ("Had a great visit?").
 *   ec-mt-sm/md/lg/xl  Space above (18 / 32 / 64 / 110px) — any row or element.
 *
 * COLUMN CLASS:
 *   ec-col-indent   Pushes column content in from the left on desktop.
 *
 * TEXT BLOCK CLASSES:
 *   ec-lead         Intro paragraph (Styles → Intro Paragraph).
 *   ec-lead--wide   Add to ec-lead for a wider (540px) intro.
 *   ec-note         15px muted note.
 */

/* =========================================================
   Row helpers
   ========================================================= */

/*
 * WPBakery columns have 15px side padding and rows use -15px margins.
 * Here the row itself is full width (for the background) and its padding
 * lines the column content up with the 1240px container.
 */
.vc_row.ec-row {
	margin-right: 0;
	margin-left: 0;
	padding-top: var(--ec-pt, var(--ec-space-default));
	padding-bottom: var(--ec-pb, var(--ec-space-default));
	padding-right: calc(max(16px, (100% - 1240px) / 2) - 15px);
	padding-left: calc(max(16px, (100% - 1240px) / 2) - 15px);
}

/*
 * Section spacing scale (Row → Spacing → Top / Bottom Spacing, and the
 * spacing options of section elements such as Evolve Call to Action).
 * Desktop / tablet (< 992px) / mobile (< 576px).
 */
:root {
	--ec-space-xl: 140px;
	--ec-space-lg: 120px;
	--ec-space-default: 100px;
	--ec-space-md: 80px;
	--ec-space-sm: 60px;
}

@media (max-width: 991.98px) {
	:root {
		--ec-space-xl: 96px;
		--ec-space-lg: 88px;
		--ec-space-default: 80px;
		--ec-space-md: 64px;
		--ec-space-sm: 48px;
	}
}

@media (max-width: 575.98px) {
	:root {
		--ec-space-xl: 72px;
		--ec-space-lg: 64px;
		--ec-space-default: 60px;
		--ec-space-md: 48px;
		--ec-space-sm: 40px;
	}
}

.ec-pt-xl { --ec-pt: var(--ec-space-xl); }
.ec-pt-lg { --ec-pt: var(--ec-space-lg); }
.ec-pt-md { --ec-pt: var(--ec-space-md); }
.ec-pt-sm { --ec-pt: var(--ec-space-sm); }
.ec-pt-none { --ec-pt: 0px; }

.ec-pb-xl { --ec-pb: var(--ec-space-xl); }
.ec-pb-lg { --ec-pb: var(--ec-space-lg); }
.ec-pb-md { --ec-pb: var(--ec-space-md); }
.ec-pb-sm { --ec-pb: var(--ec-space-sm); }
.ec-pb-none { --ec-pb: 0px; }

.vc_row.ec-row.wpb_row {
	margin-bottom: 0;
}

/* Column content: no default 35px gaps from WPBakery elements. */
.vc_row.ec-row .vc_column-inner {
	padding-top: 0;
}

.vc_row.ec-row .wpb_content_element {
	margin-bottom: 0;
}

/* Backgrounds */
.ec-bg-cream {
	background-color: var(--ec-cream);
}

.ec-bg-sand {
	background-color: var(--ec-sand);
}

.ec-bg-linen {
	background-color: var(--ec-linen);
}

.ec-bg-ink {
	background-color: var(--ec-ink);
	color: var(--ec-white);
}

/* Soft gold glow in the top-right corner (Figma radial "before"). */
.vc_row.ec-glow {
	position: relative;
	overflow: hidden;
}

.vc_row.ec-glow::before {
	content: "";
	position: absolute;
	top: -400px;
	right: -300px;
	width: 900px;
	height: 900px;
	background: radial-gradient(circle 636px at center, color-mix(in srgb, var(--ec-gold) 16%, transparent) 0, color-mix(in srgb, var(--ec-gold) 8%, transparent) 191px, transparent 382px);
	pointer-events: none;
}

.vc_row.ec-glow > .wpb_column {
	position: relative;
	z-index: 1;
}

/* Inner rows inside Evolve rows: no WPBakery 35px bottom gap. */
.vc_row.ec-row .vc_row.vc_inner {
	margin-bottom: 0;
}

/*
 * Space above an inner row / element (Extra class name):
 *   ec-mt-sm 18px · ec-mt-md 32px (+ heading's 18px = 50px) · ec-mt-lg 64px · ec-mt-xl 110px
 */
.ec-mt-sm { margin-top: 18px !important; }
.ec-mt-md { margin-top: 32px !important; }
.ec-mt-lg { margin-top: 64px !important; }
.ec-mt-xl { margin-top: 110px !important; }
.ec-mb-0 { margin-bottom: 0 !important; } /* e.g. a heading centred next to a button */

@media (max-width: 991.98px) {
	.ec-mt-lg { margin-top: 48px !important; }
	.ec-mt-xl { margin-top: 72px !important; }
}

/*
 * Inner Row class "ec-gap-sm": 18px gaps between its columns (instead of 30px),
 * content still lines up with the rest of the row.
 */
.vc_row.vc_inner.ec-gap-sm {
	margin-right: -9px;
	margin-left: -9px;
}

.vc_row.vc_inner.ec-gap-sm > .wpb_column > .vc_column-inner {
	padding-right: 9px;
	padding-left: 9px;
}

@media (max-width: 991.98px) {
	.vc_row.ec-row .vc_inner.ec-gap-sm > .wpb_column + .wpb_column {
		margin-top: 18px;
	}
}

/*
 * Inner Row class "ec-banner": gold rounded panel (e.g. "Had a great visit?").
 * Use Content position → Middle on the inner row.
 */
.vc_row.vc_inner.ec-banner {
	margin-right: 0;
	margin-left: 0;
	padding: 35px 24px;
	border-radius: 22px;
	background-color: var(--ec-gold);
	color: var(--ec-ink);
}

.ec-banner .ec-heading {
	margin-bottom: 10px;
}

.ec-banner .ec-note,
.ec-banner .ec-note p {
	color: var(--ec-ink);
	font-size: 16px;
	line-height: 25.6px;
}

@media (max-width: 767.98px) {
	.vc_row.vc_inner.ec-banner {
		padding: 28px 9px;
	}
}

/* Inner columns get a gap once they stack. */
@media (max-width: 991.98px) {
	.vc_row.ec-row .vc_inner > .wpb_column + .wpb_column {
		margin-top: 24px;
	}

	/* "Right" aligned buttons sit left once columns stack. */
	.ec-btn-wrap--right {
		text-align: left;
	}
}

/* Spacing between columns once they stack */
@media (max-width: 991.98px) {
	.vc_row.ec-row > .wpb_column + .wpb_column {
		margin-top: 48px;
	}
}

/* Columns set to full width on "Tablet landscape" (vc_col-md-12) stack up to 1199px */
@media (min-width: 992px) and (max-width: 1199.98px) {
	.vc_row.ec-row > .wpb_column.vc_col-md-12 + .wpb_column.vc_col-md-12 {
		margin-top: 48px;
	}
}

@media (min-width: 1200px) {
	.ec-col-indent > .vc_column-inner {
		padding-left: 60px;
	}
}

/* =========================================================
   Evolve Eyebrow
   ========================================================= */

.ec-eyebrow {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 16px;
	font-family: var(--ec-font-sans);
	font-size: var(--ec-t-eyebrow-fs);
	font-weight: var(--ec-t-eyebrow-fw);
	line-height: var(--ec-t-eyebrow-lh);
	letter-spacing: 2.2px;
	text-transform: uppercase;
}

.ec-eyebrow--line::before {
	content: "";
	flex: 0 0 28px;
	height: 1px;
	background-color: currentColor;
}

.ec-eyebrow--bronze {
	color: var(--ec-bronze);
}

.ec-eyebrow--gold {
	color: var(--ec-gold);
}

/* =========================================================
   Evolve Heading
   ========================================================= */

.ec-heading {
	margin: 0 0 18px;
	clear: none;
}

.ec-heading--dark {
	color: var(--ec-ink);
}

.ec-heading--light {
	color: var(--ec-white);
}

.ec-heading--lg {
	font-size: var(--ec-t-h2-fs);
	font-weight: var(--ec-t-h2-fw);
	line-height: var(--ec-t-h2-lh);
	letter-spacing: -0.02em;
}

.ec-heading--md {
	font-size: var(--ec-t-h3-fs);
	font-weight: var(--ec-t-h3-fw);
	line-height: var(--ec-t-h3-lh);
	letter-spacing: -0.015em;
}

.ec-heading--sm {
	font-size: var(--ec-t-h4-fs);
	font-weight: var(--ec-t-h4-fw);
	line-height: var(--ec-t-h4-lh);
	letter-spacing: -0.6px;
}

.ec-highlight {
	color: var(--ec-gold);
	font-style: italic;
	font-weight: var(--ec-fw-highlight);
}

/* Evolve Heading → Size "Custom": px at desktop, down to 75% on small screens. */
.ec-heading--custom {
	font-size: clamp(calc(var(--ec-heading-size, 40) * 0.75px), calc(var(--ec-heading-size, 40) / 1440 * 100vw), calc(var(--ec-heading-size, 40) * 1px));
	font-weight: var(--ec-t-h3-fw);
	line-height: 1.05;
	letter-spacing: -0.02em;
}

/* =========================================================
   Text block: lead paragraph (WPBakery Text Block, class "ec-lead")
   ========================================================= */

.ec-lead,
.ec-lead p {
	color: var(--ec-muted);
	font-family: var(--ec-font-sans);
	font-size: var(--ec-t-lead-fs);
	font-weight: var(--ec-t-lead-fw);
	line-height: var(--ec-t-lead-lh);
}

.ec-lead {
	max-width: 470px;
	margin-bottom: 26px !important;
}

.ec-lead p {
	margin: 0 0 1em;
}

.ec-lead p:last-child {
	margin-bottom: 0;
}

.ec-lead.ec-lead--wide {
	max-width: 540px;
}

/* Text block: small note (class "ec-note"), e.g. "Not sure where to start?" */
.ec-note,
.ec-note p {
	margin: 0;
	color: var(--ec-muted);
	font-family: var(--ec-font-sans);
	font-size: 15px;
	line-height: 24px;
}

.ec-bg-ink .ec-lead,
.ec-bg-ink .ec-lead p,
.ec-bg-ink .ec-note,
.ec-bg-ink .ec-note p {
	color: var(--ec-muted-dark);
}

/* =========================================================
   Evolve Text Link
   ========================================================= */

.ec-link-wrap {
	margin: 0;
}

.ec-link,
.ec-link:visited {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding-bottom: 4px;
	border-bottom: 1px solid currentColor;
	font-family: var(--ec-font-sans);
	font-size: 15px;
	font-weight: 700;
	line-height: 24px;
	text-decoration: none;
}

.ec-link--dark,
.ec-link--dark:visited,
.ec-link--dark:hover {
	color: var(--ec-ink);
}

.ec-link--light,
.ec-link--light:visited,
.ec-link--light:hover {
	color: var(--ec-white);
}

.ec-link--gold,
.ec-link--gold:visited,
.ec-link--gold:hover {
	color: var(--ec-gold);
}

.ec-link .ec-icon-arrow {
	display: block;
	flex-shrink: 0;
	transition: transform 0.2s ease;
}

.ec-link:hover .ec-icon-arrow,
.ec-link:focus-visible .ec-icon-arrow {
	transform: translateX(3px);
}

/* =========================================================
   Evolve Quote [ec_quote]
   ========================================================= */

.ec-quote {
	margin: 0 auto 37px;
	padding: 0;
	border: 0;
	quotes: none;
}

.ec-quote--left {
	margin-left: 0;
}

.ec-quote p {
	margin: 0;
	font-size: var(--ec-t-quote-fs);
	font-weight: var(--ec-t-quote-fw);
	line-height: var(--ec-t-quote-lh);
	letter-spacing: -0.01em;
}

.ec-quote--center p {
	text-align: center;
}

.ec-quote--dark p {
	color: var(--ec-ink);
}

.ec-quote--light p {
	color: var(--ec-white);
}

.ec-quote .ec-highlight {
	font-weight: var(--ec-fw-highlight);
}

.ec-quote--hl-bronze .ec-highlight {
	color: var(--ec-bronze);
}

.ec-quote--hl-gold .ec-highlight {
	color: var(--ec-gold);
}

/* =========================================================
   Evolve Button [ec_button] — also used by the hero
   (Figma "H2 / Button": 54px, or 58px with --lg)
   ========================================================= */

.ec-btn-wrap {
	margin: 0;
}

.ec-btn-wrap--center {
	text-align: center;
}

.ec-btn-wrap--right {
	text-align: right;
}

.ec-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	height: 54px;
	padding: 0 28px;
	border: 1px solid transparent;
	border-radius: 27px;
	font-family: var(--ec-font-sans);
	font-size: var(--ec-t-button-fs);
	font-weight: var(--ec-t-button-fw);
	line-height: var(--ec-t-button-lh);
	text-align: center;
	text-decoration: none;
	white-space: nowrap;
	transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.ec-btn img {
	display: block;
	flex-shrink: 0;
	transition: transform 0.2s ease;
}

.ec-btn--lg {
	height: 58px;
}

.ec-btn--gold,
.ec-btn--gold:visited {
	background-color: var(--ec-gold);
	color: var(--ec-ink);
}

.ec-btn--gold:hover,
.ec-btn--gold:focus-visible {
	background-color: var(--ec-gold-hover);
	color: var(--ec-ink);
}

.ec-btn:hover img:last-child {
	transform: translateX(3px);
}

.ec-btn--glass,
.ec-btn--glass:visited {
	background-color: rgba(255, 255, 255, 0.06);
	border-color: rgba(255, 255, 255, 0.4);
	color: var(--ec-white);
	-webkit-backdrop-filter: blur(4px);
	backdrop-filter: blur(4px);
}

.ec-btn--glass:hover,
.ec-btn--glass:focus-visible {
	background-color: rgba(255, 255, 255, 0.14);
	border-color: rgba(255, 255, 255, 0.7);
	color: var(--ec-white);
}

.ec-btn--dark,
.ec-btn--dark:visited {
	background-color: var(--ec-ink);
	color: var(--ec-white);
}

.ec-btn--dark:hover,
.ec-btn--dark:focus-visible {
	background-color: var(--ec-bronze);
	color: var(--ec-white);
}

/* Outline – dark: for light backgrounds (e.g. "@evolvechiro"). */
.ec-btn--outline,
.ec-btn--outline:visited {
	border-color: var(--ec-ink);
	background-color: transparent;
	color: var(--ec-ink);
}

.ec-btn--outline:hover,
.ec-btn--outline:focus-visible {
	border-color: var(--ec-bronze);
	background-color: color-mix(in srgb, var(--ec-bronze) 8%, transparent);
	color: var(--ec-ink);
}

/* Icon before the text: no slide on hover. */
.ec-btn--icon-left:hover img {
	transform: none;
}

/* =========================================================
   Evolve Review Tile [ec_review_tile]
   ========================================================= */

.ec-review-tile,
.ec-review-tile:visited {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	min-height: 241px;
	padding: 34px;
	border: 1px solid var(--ec-line);
	border-radius: 22px;
	color: var(--ec-muted);
	font-family: var(--ec-font-sans);
	text-decoration: none;
	transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

a.ec-review-tile:hover,
a.ec-review-tile:focus-visible {
	border-color: var(--ec-gold);
	box-shadow: 0 12px 28px color-mix(in srgb, var(--ec-bronze) 12%, transparent);
	color: var(--ec-muted);
	transform: translateY(-2px);
}

.ec-review-tile__label {
	display: flex;
	align-items: center;
	gap: 12px;
	font-size: 14px;
	font-weight: 700;
	line-height: 22.4px;
}

.ec-review-tile__label img {
	display: block;
	flex-shrink: 0;
}

.ec-review-tile__score {
	display: flex;
	align-items: flex-end;
	gap: 12px;
	margin-top: 14px;
}

.ec-review-tile__rating {
	color: var(--ec-ink);
	font-size: clamp(56px, 5vw, 72px);
	font-weight: var(--ec-t-stat-fw);
	line-height: 1;
	letter-spacing: -0.02em;
}

.ec-review-tile__stars {
	display: flex;
	gap: 3px;
	padding-bottom: 10px;
}

.ec-review-tile__stars img {
	display: block;
}

.ec-review-tile__stars img.is-empty {
	opacity: 0.25;
}

.ec-review-tile__meta {
	margin-top: 13px;
	font-size: 14px;
	line-height: 22.4px;
}

@media (max-width: 575.98px) {
	.ec-review-tile {
		min-height: 0;
		padding: 28px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ec-review-tile {
		transition: none;
	}
}

/* =========================================================
   Evolve Feature
   ========================================================= */

.ec-feature,
.ec-feature:visited {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	height: 100%;
	padding: 34px 0 37px;
	color: inherit;
	text-decoration: none;
}

.ec-feature__icon {
	display: block;
	width: 30px;
	height: 30px;
	margin-bottom: 11.5px;
	object-fit: contain;
}

.ec-feature__number {
	margin-bottom: 11.5px;
	color: var(--ec-gold);
	font-size: 15px;
	font-style: italic;
	line-height: 24px;
}

.ec-feature__title {
	margin: 0 0 14px;
	color: var(--ec-ink);
	font-size: var(--ec-t-h4-fs);
	font-weight: var(--ec-t-h4-fw);
	line-height: var(--ec-t-h4-lh);
	letter-spacing: -0.6px;
	clear: none;
}

.ec-feature__text {
	max-width: 290px;
	margin: 0;
	color: var(--ec-muted);
	font-family: var(--ec-font-sans);
	font-size: 15px;
	line-height: 24px;
}

a.ec-feature:hover .ec-feature__title,
a.ec-feature:focus-visible .ec-feature__title {
	color: var(--ec-bronze);
}

/* ---------- Why Choose Us grid [ec_why_grid] (CPT driven) ---------- */

.ec-why-grid {
	display: grid;
	grid-template-columns: 1fr;
	border-top: 1px solid var(--ec-line);
}

.ec-why-grid > .ec-feature {
	height: auto;
	border-bottom: 1px solid var(--ec-line);
}

@media (min-width: 768px) {
	.ec-why-grid--cols-2,
	.ec-why-grid--cols-3 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	/* 2 columns: left cell gets the divider */
	.ec-why-grid > .ec-feature:nth-child(odd) {
		padding-right: 28px;
		border-right: 1px solid var(--ec-line);
	}

	.ec-why-grid > .ec-feature:nth-child(even) {
		padding-left: 28px;
	}
}

@media (min-width: 1200px) {
	.ec-why-grid--cols-3 {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.ec-why-grid--cols-3 > .ec-feature:nth-child(n) {
		padding-right: 28px;
		padding-left: 28px;
		border-right: 1px solid var(--ec-line);
	}

	.ec-why-grid--cols-3 > .ec-feature:nth-child(3n + 1) {
		padding-left: 0;
	}

	.ec-why-grid--cols-3 > .ec-feature:nth-child(3n) {
		padding-right: 0;
		border-right: 0;
	}
}

@media (max-width: 767.98px) {
	.ec-why-grid > .ec-feature {
		padding: 28px 0;
	}
}

/* Editor-only "nothing to show" notice for CPT grids. */
.ec-editor-notice {
	padding: 24px;
	border: 1px dashed var(--ec-line);
	color: var(--ec-muted);
}

/* ---------- Feature grid (Inner Row class "ec-feature-row") ---------- */

.vc_row.vc_inner.ec-feature-row {
	margin-right: 0;
	margin-left: 0;
	border-bottom: 1px solid var(--ec-line);
}

.vc_row.vc_inner.ec-feature-row:first-child,
.wpb_wrapper > .ec-feature-row:first-of-type {
	border-top: 1px solid var(--ec-line);
}

.ec-feature-row > .wpb_column > .vc_column-inner {
	height: 100%;
	padding-top: 0;
	padding-right: 0;
	padding-left: 0;
}

.ec-feature-row > .wpb_column > .vc_column-inner > .wpb_wrapper {
	height: 100%;
}

@media (min-width: 768px) {
	.ec-feature-row {
		display: flex;
	}

	.ec-feature-row > .wpb_column {
		float: none;
	}

	.ec-feature-row > .wpb_column:first-child {
		border-right: 1px solid var(--ec-line);
	}

	.ec-feature-row > .wpb_column:first-child > .vc_column-inner {
		padding-right: 28px;
	}

	.ec-feature-row > .wpb_column + .wpb_column > .vc_column-inner {
		padding-left: 28px;
	}
}

@media (max-width: 767.98px) {
	.ec-feature-row > .wpb_column + .wpb_column {
		border-top: 1px solid var(--ec-line);
	}

	.ec-feature {
		padding: 28px 0;
	}
}
