/*
 * Baseline structural + visual styles for every core Nova Builder
 * element. Always enqueued on any page with builder content (see
 * Renderer::maybe_enqueue_frontend_assets), independent of whichever
 * theme is active — the plugin must render sensibly with zero theme
 * cooperation, so it defines its own small set of fallback design
 * tokens rather than depending on any theme's CSS variables. A theme
 * (like Zenith) can still override these variables for tighter visual
 * integration, but isn't required to.
 */

:root {
	--nova-color-primary: #2563eb;
	--nova-color-primary-contrast: #ffffff;
	--nova-color-text: #1a1a1a;
	--nova-color-text-muted: #6b7280;
	--nova-color-surface: #ffffff;
	--nova-color-surface-alt: #f3f4f6;
	--nova-color-border: #e5e7eb;
	--nova-space-sm: 0.75rem;
	--nova-space-md: 1.25rem;
	--nova-space-lg: 2rem;
	--nova-radius: 0.5rem;
	--nova-container-width: 72rem;
}

/* ---------- Structure ---------- */
.nova-content {
	display: block;
}

.nova-section__inner {
	width: 100%;
	max-width: var(--nova-container-width);
	margin-inline: auto;
	padding-inline: var(--nova-space-md);
}

/* A section's background already spans edge-to-edge on its own (it's set
   on the outer <section>, while only .nova-section__inner is width-
   constrained) — this class is for when the *content* itself should also
   go full-bleed, not just the background behind it. */
.nova-section--full-width > .nova-section__inner {
	max-width: none;
	padding-inline: 0;
}

/* "Container Width" mode (Section -> Section Width setting): boxes the
   *section itself*, background included, to the container width -- unlike
   the default ("Background Only Full Width"), where only .nova-section__
   inner's own max-width/margin-auto (below) keeps the content centered
   while the section's background still spans edge-to-edge on its own as a
   plain block. */
.nova-section--boxed {
	max-width: var(--nova-container-width);
	margin-inline: auto;
}

/* Same flex-centering CssCompiler applies for a custom Min Height value
   (see CssCompiler::settings_to_css) so full-height sections vertically
   center their content instead of top-aligning it, without CssCompiler
   and this static rule racing at equal selector specificity — CssCompiler
   never emits min-height at all for a full_height section.
   align-items (rather than leaning on .nova-section__inner's own
   margin-inline: auto) is what horizontally centers .nova-section__inner
   here — margin: auto on a flex item's cross axis switches that item out
   of stretch sizing and into fit-content sizing instead, which collapses
   to ~0 width for content like a Slider whose only children are
   absolutely positioned (and so contribute nothing to fit-content). */
.nova-section--full-height {
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	min-height: 100vh;
}

/* ---------- Entrance animations ---------- */
/* See assets/js/animations.js, which adds .nova-animate--in once an
   element scrolls into view (or immediately, for prefers-reduced-motion /
   browsers without IntersectionObserver — so this never leaves content
   permanently invisible when JS can't run the reveal).

   Duration/distance read from --nova-anim-* custom properties rather than
   fixed values, falling back to this plugin's own previous hardcoded
   numbers when nothing sets them — so Nova Builder still looks and behaves
   exactly as before on its own. When the active theme bridges these (Zenith
   does, from its own Theme Options > Animations tab — see
   zenith_output_theme_options_css()), a site owner's chosen speed/distance
   also tunes these per-element animations, so the two independently
   editor-controlled systems (this plugin's per-element style picker, the
   theme's global timing) share one consistent feel without either one
   hardcoding a value the other can't reach. */
.nova-animate {
	opacity: 0;
	transition: opacity var(--nova-anim-duration, 0.6s) ease, transform var(--nova-anim-duration, 0.6s) ease;
}

.nova-animate--fade-up { transform: translateY(var(--nova-anim-distance, 28px)); }
.nova-animate--fade-in { transform: none; }
.nova-animate--slide-left { transform: translateX(var(--nova-anim-distance, 40px)); }
.nova-animate--slide-right { transform: translateX(calc(var(--nova-anim-distance, 40px) * -1)); }
.nova-animate--zoom-in { transform: scale(0.94); }

.nova-animate--in {
	opacity: 1;
	transform: none;
}

@media (prefers-reduced-motion: reduce) {
	.nova-animate {
		opacity: 1;
		transform: none;
		transition: none;
	}
}

.nova-column {
	padding-block: var(--nova-space-sm);
}

.nova-columns-layout {
	display: grid;
	gap: var(--nova-space-md);
}

/* Column track widths (1-6 columns, any ratio) are computed per-instance
   as an inline grid-template-columns style by ColumnsElement::render() —
   each layout part becomes an `fr` track — rather than needing a matching
   CSS rule here for every combination the settings panel offers. */

.nova-columns-layout--gap-none { gap: 0; }
.nova-columns-layout--gap-sm { gap: var(--nova-space-sm); }
.nova-columns-layout--gap-lg { gap: var(--nova-space-lg); }

/* Equal Height Columns: grid items already stretch to the row's height by
   default, so the "equal" part needs no extra CSS -- what actually needs
   wiring up is giving each column's own *content* somewhere to go within
   that now-taller box, via Vertical Alignment. Turning a column into a
   flex column is what makes justify-content able to position its content
   at the top/middle/bottom of the equalized height. */
.nova-columns-layout--equal-height > .nova-column {
	display: flex;
	flex-direction: column;
}

.nova-columns-layout--valign-middle > .nova-column { justify-content: center; }
.nova-columns-layout--valign-bottom > .nova-column { justify-content: flex-end; }

@media (max-width: 48rem) {
	.nova-columns-layout {
		grid-template-columns: 1fr !important;
	}
}

/* ---------- Content ---------- */
.nova-heading {
	margin: 0 0 var(--nova-space-sm);
	line-height: 1.2;
	color: var(--nova-color-text);
}

/* Optional "kicker"/subtitle line a Heading can show above or below
   itself — see HeadingElement.php's `subheading` control. Kept visually
   subordinate by default (smaller, lighter) since its whole purpose is to
   support the heading, not compete with it. */
.nova-subheading {
	margin: 0;
	color: var(--nova-color-text-muted, var(--nova-color-text));
	font-size: 0.85em;
	font-weight: 400;
	line-height: 1.4;
}

.nova-subheading--above {
	margin-bottom: 0.4em;
}

.nova-subheading--below {
	margin-top: 0.4em;
}

.nova-text-block {
	color: var(--nova-color-text);
	line-height: 1.6;
}

.nova-button {
	display: inline-block;
	padding: 0.6em 1.4em;
	border-radius: var(--nova-radius);
	text-decoration: none;
	font-weight: 600;
	cursor: pointer;
}

.nova-button--solid {
	background: var(--nova-color-primary);
	color: var(--nova-color-primary-contrast);
}

.nova-button--outline {
	background: transparent;
	color: var(--nova-color-primary);
	border: 2px solid var(--nova-color-primary);
}

.nova-button--text {
	background: transparent;
	color: var(--nova-color-primary);
	padding-inline: 0;
}

.nova-image__img {
	width: 100%;
	height: auto;
	border-radius: var(--nova-radius);
}

.nova-icon {
	display: inline-block;
	color: var(--nova-color-primary);
}

.nova-icon--sm { font-size: 1rem; width: 1rem; height: 1rem; }
.nova-icon--md { font-size: 1.5rem; width: 1.5rem; height: 1.5rem; }
.nova-icon--lg { font-size: 2.25rem; width: 2.25rem; height: 2.25rem; }
.nova-icon--xl { font-size: 3rem; width: 3rem; height: 3rem; }

.nova-icon-box {
	padding: var(--nova-space-md);
}

.nova-icon-box__icon {
	display: block;
	font-size: 2rem;
	width: 2rem;
	height: 2rem;
	color: var(--nova-color-primary);
	margin-bottom: var(--nova-space-sm);
}

.nova-icon-box__title {
	margin: 0 0 0.25rem;
}

.nova-icon-box__text {
	margin: 0;
	color: var(--nova-color-text-muted);
}

.nova-divider {
	border: none;
	border-top-width: 1px;
	border-color: var(--nova-color-border);
	margin: var(--nova-space-md) 0;
}

.nova-icon-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: var(--nova-space-sm);
}

.nova-icon-list--cols-2,
.nova-icon-list--cols-3,
.nova-icon-list--cols-4 {
	display: grid;
	flex-direction: unset;
}

.nova-icon-list--cols-2 { grid-template-columns: repeat(2, 1fr); }
.nova-icon-list--cols-3 { grid-template-columns: repeat(3, 1fr); }
.nova-icon-list--cols-4 { grid-template-columns: repeat(4, 1fr); }

.nova-icon-list__item {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

/* ---------- Counter / Progress ---------- */
.nova-counter {
	text-align: center;
}

.nova-counter__number,
.nova-counter__suffix {
	font-size: 2.5rem;
	font-weight: 700;
	color: var(--nova-color-primary);
}

.nova-counter__label {
	display: block;
	color: var(--nova-color-text-muted);
	margin-top: 0.25rem;
}

.nova-progress-bar__label {
	display: block;
	margin-bottom: 0.4rem;
}

.nova-progress-bar__track {
	background: var(--nova-color-surface-alt);
	border-radius: 999px;
	overflow: hidden;
	height: 0.6rem;
}

.nova-progress-bar__fill {
	background: var(--nova-color-primary);
	height: 100%;
	border-radius: inherit;
}

/* ---------- Tabs / Accordion ---------- */
.nova-tabs__nav {
	display: flex;
	gap: 0.25rem;
	border-bottom: 1px solid var(--nova-color-border);
}

.nova-tabs__tab {
	padding: 0.6rem 1rem;
	background: none;
	border: none;
	border-bottom: 2px solid transparent;
	cursor: pointer;
	font: inherit;
}

.nova-tabs__tab.is-active {
	border-bottom-color: var(--nova-color-primary);
	font-weight: 600;
}

.nova-tabs__panel {
	padding: var(--nova-space-md) 0;
}

.nova-tabs__panel:not(.is-active) {
	display: none;
}

.nova-accordion__item {
	border: 1px solid var(--nova-color-border);
	border-radius: var(--nova-radius);
	margin-bottom: 0.5rem;
	padding: 0.75rem 1rem;
}

.nova-accordion__title {
	cursor: pointer;
	font-weight: 600;
}

.nova-accordion__content {
	padding-top: 0.75rem;
}

/* ---------- Media ---------- */
.nova-gallery {
	display: grid;
	gap: var(--nova-space-sm);
}

.nova-gallery--cols-2 { grid-template-columns: repeat(2, 1fr); }
.nova-gallery--cols-3 { grid-template-columns: repeat(3, 1fr); }
.nova-gallery--cols-4 { grid-template-columns: repeat(4, 1fr); }

.nova-gallery__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: var(--nova-radius);
}

.nova-slider {
	position: relative;
	overflow: hidden;
	min-height: var(--nova-slider-height, 20rem);
	border-radius: var(--nova-radius);
}

/* Full-bleed: breaks the slider out of its column/section's width
   regardless of nesting depth (standard 100vw negative-margin technique —
   see .nova-section--full-width above for the section-level equivalent,
   which only needs to counter its own known padding rather than an
   arbitrary ancestor chain, hence the different technique here). */
.nova-slider--full-width,
.nova-slider--full-screen {
	width: 100vw;
	position: relative;
	left: 50%;
	right: 50%;
	margin-left: -50vw;
	margin-right: -50vw;
	border-radius: 0;
}

.nova-slider--full-screen {
	min-height: 100vh;
}

.nova-slider__viewport {
	position: absolute;
	inset: 0;
}

.nova-slider__slide {
	position: absolute;
	inset: 0;
	opacity: 0;
	pointer-events: none;
	background-size: cover;
	background-position: center;
	transition: opacity 0.6s ease;
}

.nova-slider__slide.is-active {
	opacity: 1;
	pointer-events: auto;
	z-index: 2;
}

/* The slide transition drives position via transform instead of opacity.
   Every non-active slide parks on one of two sides: the default (no
   modifier class) rule below parks it right, .is-prev parks it left —
   slider.js picks between them based on which way the visitor navigated,
   since a static rule alone can't know that. */
.nova-slider--transition-slide .nova-slider__slide {
	opacity: 1;
	transform: translateX(100%);
	transition: transform 0.6s ease;
}

.nova-slider--transition-slide .nova-slider__slide.is-active {
	transform: translateX(0);
}

.nova-slider--transition-slide .nova-slider__slide.is-prev {
	transform: translateX(-100%);
}

.nova-slider__overlay {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	padding: var(--nova-space-lg);
	background: linear-gradient(0deg, rgba(0, 0, 0, 0.55), transparent 60%);
	color: #fff;
}

.nova-slider__overlay--align-left { align-items: flex-start; text-align: left; }
.nova-slider__overlay--align-center { align-items: center; text-align: center; }
.nova-slider__overlay--align-right { align-items: flex-end; text-align: right; }

.nova-slider__overlay--valign-top { justify-content: flex-start; }
.nova-slider__overlay--valign-center { justify-content: center; }
.nova-slider__overlay--valign-bottom { justify-content: flex-end; }

.nova-slider__heading,
.nova-slider__text {
	margin: 0 0 var(--nova-space-sm);
	max-width: 40rem;
}

.nova-slider__button {
	margin-top: var(--nova-space-sm);
}

.nova-slider__arrow {
	position: absolute;
	top: 50%;
	z-index: 3;
	width: 2.75rem;
	height: 2.75rem;
	display: flex;
	align-items: center;
	justify-content: center;
	border: none;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.35);
	color: #fff;
	font-size: 1.75rem;
	line-height: 1;
	cursor: pointer;
	transform: translateY(-50%);
}

.nova-slider__arrow:hover {
	background: rgba(0, 0, 0, 0.55);
}

.nova-slider__arrow--prev { left: var(--nova-space-md); }
.nova-slider__arrow--next { right: var(--nova-space-md); }

.nova-slider__dots {
	position: absolute;
	bottom: var(--nova-space-md);
	left: 50%;
	z-index: 3;
	display: flex;
	gap: 0.5rem;
	transform: translateX(-50%);
}

.nova-slider__dot {
	width: 0.6rem;
	height: 0.6rem;
	padding: 0;
	border: none;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.5);
	cursor: pointer;
}

.nova-slider__dot.is-active {
	background: #fff;
}

.nova-video,
.nova-google-map {
	position: relative;
	width: 100%;
}

.nova-video--ratio-16-9 { aspect-ratio: 16 / 9; }
.nova-video--ratio-4-3 { aspect-ratio: 4 / 3; }
.nova-video--ratio-1-1 { aspect-ratio: 1 / 1; }

.nova-video iframe,
.nova-video video {
	width: 100%;
	height: 100%;
}

.nova-spacer {
	width: 100%;
}

/* ---------- Social proof ---------- */
.nova-testimonial {
	text-align: center;
	max-width: 36rem;
	margin-inline: auto;
}

/* A Full Width section (.nova-section--full-width) promises edge-to-edge
   content, which this cap defeated regardless of the section's own
   setting. Scoped so the narrower centered look stays exactly as-is in
   Container Width/Background Only Full Width. */
.nova-section--full-width .nova-testimonial {
	max-width: none;
}

.nova-testimonial__avatar {
	width: 4rem;
	height: 4rem;
	border-radius: 50%;
	object-fit: cover;
	margin: 0 auto var(--nova-space-sm);
}

.nova-testimonial__quote {
	font-size: 1.25rem;
	font-style: italic;
	margin: 0 0 var(--nova-space-sm);
}

.nova-testimonial__role {
	color: var(--nova-color-text-muted);
}

/* ---------- Testimonials (grid/slider list, see TestimonialElement) ---------- */
.nova-testimonials__heading {
	text-align: center;
	margin: 0 0 var(--nova-space-lg);
}

/* A grid cell or slider-row item reuses .nova-testimonial's own box
   exactly as-is, but that class's own max-width/margin-inline (a plain
   single-item quote's own centering) would otherwise collapse each cell
   to a fixed 36rem instead of filling its grid track / row segment -- two
   classes on this selector (0,2,0 specificity) safely beats the
   single-class rule above regardless of stylesheet order. */
.nova-testimonials__grid > .nova-testimonial,
.nova-testimonials-slider__row > .nova-testimonial {
	max-width: none;
	margin-inline: 0;
}

.nova-testimonials__grid {
	display: grid;
	gap: var(--nova-space-lg);
}

.nova-testimonials__grid--cols-1 { grid-template-columns: 1fr; }
.nova-testimonials__grid--cols-2 { grid-template-columns: repeat(2, 1fr); }
.nova-testimonials__grid--cols-3 { grid-template-columns: repeat(3, 1fr); }
.nova-testimonials__grid--cols-4 { grid-template-columns: repeat(4, 1fr); }

/* Same collapse breakpoint .nova-columns-layout uses above, regardless of
   the Columns setting chosen. */
@media (max-width: 48rem) {
	.nova-testimonials__grid {
		grid-template-columns: 1fr;
	}
}

.nova-testimonials-slider {
	position: relative;
}

.nova-testimonials-slider__viewport {
	overflow: hidden;
}

.nova-testimonials-slider__track {
	display: flex;
	transition: transform 0.5s ease;
}

.nova-testimonials-slider__slide {
	flex: 1 0 100%;
	min-width: 0;
}

.nova-testimonials-slider__row {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: var(--nova-space-lg);
	padding: 0 var(--nova-space-sm);
}

.nova-testimonials-slider__row > .nova-testimonial {
	flex: 1 1 0;
	min-width: 14rem;
}

.nova-testimonials-slider__arrow {
	position: absolute;
	top: 50%;
	z-index: 3;
	width: 2.5rem;
	height: 2.5rem;
	display: flex;
	align-items: center;
	justify-content: center;
	border: none;
	border-radius: 50%;
	background: var(--nova-color-surface-alt, #f4f4f4);
	color: var(--nova-color-text);
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
	transform: translateY(-50%);
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

.nova-testimonials-slider__arrow--prev { left: -1.25rem; }
.nova-testimonials-slider__arrow--next { right: -1.25rem; }

.nova-testimonials-slider__dots {
	display: flex;
	justify-content: center;
	gap: 0.5rem;
	margin-top: var(--nova-space-md);
}

.nova-testimonials-slider__dot {
	width: 0.6rem;
	height: 0.6rem;
	padding: 0;
	border: none;
	border-radius: 50%;
	background: var(--nova-color-border, #ccc);
	cursor: pointer;
}

.nova-testimonials-slider__dot.is-active {
	background: var(--nova-color-primary, #2563eb);
}

.nova-pricing-table {
	border: 1px solid var(--nova-color-border);
	border-radius: var(--nova-radius);
	padding: var(--nova-space-lg);
	text-align: center;
}

.nova-pricing-table--featured {
	border-color: var(--nova-color-primary);
	box-shadow: 0 0 0 2px var(--nova-color-primary);
}

.nova-pricing-table__price {
	font-size: 2rem;
	font-weight: 700;
	margin: 0.5rem 0 var(--nova-space-md);
}

.nova-pricing-table__features {
	list-style: none;
	margin: 0 0 var(--nova-space-md);
	padding: 0;
}

.nova-team-member {
	text-align: center;
}

.nova-team-member__photo {
	width: 8rem;
	height: 8rem;
	border-radius: 50%;
	object-fit: cover;
	margin: 0 auto var(--nova-space-sm);
}

.nova-team-member__role {
	color: var(--nova-color-text-muted);
	margin: 0 0 0.5rem;
}

.nova-social-icons {
	display: flex;
	gap: 0.75rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.nova-social-icons a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.25rem;
	height: 2.25rem;
	border-radius: 50%;
	background: var(--nova-color-surface-alt);
	color: var(--nova-color-text);
}

/* ---------- Utility ---------- */
.nova-posts-grid {
	display: grid;
	gap: var(--nova-space-lg);
}

.nova-posts-grid--cols-2 { grid-template-columns: repeat(2, 1fr); }
.nova-posts-grid--cols-3 { grid-template-columns: repeat(3, 1fr); }
.nova-posts-grid--cols-4 { grid-template-columns: repeat(4, 1fr); }

.nova-posts-grid__thumbnail img {
	width: 100%;
	border-radius: var(--nova-radius);
}

.nova-posts-grid__excerpt {
	color: var(--nova-color-text-muted);
}

.nova-form {
	display: flex;
	flex-direction: column;
	gap: var(--nova-space-sm);
	max-width: 32rem;
}

/* See .nova-testimonial's identical comment just above -- a Full Width
   section promises edge-to-edge content; scoped override only, so a form
   dropped into a normal-width section still gets its usual comfortable
   line length instead of stretching full width by default. */
.nova-section--full-width .nova-form {
	max-width: none;
}

.nova-form__field {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	margin: 0;
}

.nova-form__field label {
	font-weight: 600;
	font-size: 0.85rem;
	color: var(--nova-color-text);
}

.nova-form__field input,
.nova-form__field textarea {
	padding: 0.6rem 0.8rem;
	border: 1px solid var(--nova-color-border);
	border-radius: var(--nova-radius);
	font: inherit;
	background: var(--nova-color-surface);
	color: var(--nova-color-text);
}

.nova-form__field textarea {
	min-height: 8rem;
	resize: vertical;
}

/* Hidden from real visitors (not display:none, which some bots skip when
   deciding which fields to fill) -- see FormHandler for how this is used. */
.nova-form__hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.nova-form__submit {
	align-self: flex-start;
}

.nova-form__notice {
	padding: 0.85rem 1rem;
	border-radius: var(--nova-radius);
	font-weight: 600;
	margin: 0 0 var(--nova-space-sm);
}

.nova-form__notice--success {
	background: color-mix(in srgb, #2e7d32 15%, transparent);
	color: #2e7d32;
	border: 1px solid color-mix(in srgb, #2e7d32 35%, transparent);
}

.nova-form__notice--error {
	background: color-mix(in srgb, #c62828 15%, transparent);
	color: #c62828;
	border: 1px solid color-mix(in srgb, #c62828 35%, transparent);
}

/* ---------- FAQ ---------- */
.nova-faq__item {
	border: 1px solid var(--nova-color-border);
	border-radius: var(--nova-radius);
	margin-bottom: 0.5rem;
	padding: 0.75rem 1rem;
}

.nova-faq__question {
	cursor: pointer;
	font-weight: 600;
}

.nova-faq__answer {
	padding-top: 0.75rem;
	color: var(--nova-color-text-muted);
}

/* ---------- Before / After ---------- */
.nova-before-after {
	position: relative;
	overflow: hidden;
	border-radius: var(--nova-radius);
	user-select: none;
	touch-action: none;
}

.nova-before-after__after,
.nova-before-after__before {
	display: block;
}

.nova-before-after__after img,
.nova-before-after__before img {
	display: block;
	width: 100%;
	height: auto;
}

.nova-before-after__before {
	position: absolute;
	inset: 0;
	clip-path: inset(0 50% 0 0);
}

.nova-before-after__handle {
	position: absolute;
	top: 0;
	bottom: 0;
	left: 50%;
	width: 2.5rem;
	margin-left: -1.25rem;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: ew-resize;
}

.nova-before-after__handle::before {
	content: '';
	position: absolute;
	top: 0;
	bottom: 0;
	left: 50%;
	width: 2px;
	background: #fff;
	transform: translateX(-50%);
}

.nova-before-after__handle-icon {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 2rem;
	height: 2rem;
	border-radius: 50%;
	background: #fff;
	color: #1a1a1a;
	font-size: 0.9rem;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.nova-before-after__label {
	position: absolute;
	top: 0.75rem;
	padding: 0.25rem 0.6rem;
	background: rgba(0, 0, 0, 0.6);
	color: #fff;
	font-size: 0.75rem;
	border-radius: var(--nova-radius);
}

.nova-before-after__label--before { left: 0.75rem; }
.nova-before-after__label--after { right: 0.75rem; }

/* ---------- Countdown ---------- */
.nova-countdown {
	display: flex;
	gap: var(--nova-space-md);
	flex-wrap: wrap;
}

.nova-countdown__unit {
	display: flex;
	flex-direction: column;
	align-items: center;
	min-width: 4.5rem;
	padding: 0.75rem 0.5rem;
	background: var(--nova-color-surface-alt);
	border-radius: var(--nova-radius);
}

.nova-countdown__value {
	font-size: 1.75rem;
	font-weight: 700;
	line-height: 1;
	color: var(--nova-color-primary);
}

.nova-countdown__label {
	margin-top: 0.35rem;
	font-size: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--nova-color-text-muted);
}

/* ---------- Star Rating ---------- */
.nova-star-rating {
	display: inline-flex;
	align-items: center;
	gap: 0.15rem;
	color: #f5b301;
}

.nova-star-rating .dashicons {
	width: 1.25rem;
	height: 1.25rem;
	font-size: 1.25rem;
}

.nova-star-rating .dashicons-star-empty {
	color: var(--nova-color-border);
}

.nova-star-rating__label {
	margin-left: 0.5rem;
	color: var(--nova-color-text-muted);
	font-size: 0.9rem;
}

/* ---------- Flip Box ---------- */
.nova-flip-box {
	perspective: 1200px;
	min-height: 14rem;
}

.nova-flip-box__inner {
	position: relative;
	width: 100%;
	height: 100%;
	min-height: 14rem;
	transition: transform 0.6s;
	transform-style: preserve-3d;
}

.nova-flip-box:hover .nova-flip-box__inner {
	transform: rotateY(180deg);
}

.nova-flip-box__front,
.nova-flip-box__back {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: var(--nova-space-lg);
	border-radius: var(--nova-radius);
	backface-visibility: hidden;
}

.nova-flip-box__front {
	background: var(--nova-color-surface-alt);
}

.nova-flip-box__back {
	background: var(--nova-color-primary);
	color: var(--nova-color-primary-contrast);
	transform: rotateY(180deg);
}

.nova-flip-box__icon {
	font-size: 2.5rem;
	width: 2.5rem;
	height: 2.5rem;
	margin-bottom: 0.75rem;
}

.nova-flip-box__front-title,
.nova-flip-box__back-title {
	font-weight: 700;
	margin: 0 0 0.5rem;
}

.nova-flip-box__back-text {
	margin: 0 0 1rem;
}

@media (max-width: 48rem) {
	.nova-gallery--cols-2,
	.nova-gallery--cols-3,
	.nova-gallery--cols-4,
	.nova-posts-grid--cols-2,
	.nova-posts-grid--cols-3,
	.nova-posts-grid--cols-4,
	.nova-icon-list--cols-2,
	.nova-icon-list--cols-3,
	.nova-icon-list--cols-4 {
		grid-template-columns: 1fr;
	}
}

/* ---------- Contact Form (ContactFormElement) ---------- */
/* Deliberately its own class root rather than reusing .nova-form (still
   used by the older, fixed-3-field SimpleFormElement) -- this element's
   fields are dynamic (any type/width combination the editor configures),
   so the layout rules below have nothing in common with that element's
   fixed one-column stack. The success/error banners DO reuse
   .nova-form__notice -- that styling has nothing fixed-field-specific
   about it, and both elements should look like the same "kind of thing"
   when telling a visitor their message was sent. */
.nova-contact-form-wrap {
	display: flex;
	flex-direction: column;
	gap: var(--nova-space-sm);
}

.nova-contact-form {
	display: flex;
	flex-direction: column;
	gap: var(--nova-space-md);
}

.nova-section--full-width .nova-contact-form-wrap {
	max-width: none;
}

.nova-contact-form__hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.nova-contact-form__grid {
	display: flex;
	flex-wrap: wrap;
	gap: var(--nova-space-md);
}

.nova-contact-form__field {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	flex: 1 1 100%;
	min-width: 0;
}

.nova-contact-form__field--half {
	flex-basis: calc( 50% - ( var(--nova-space-md) / 2 ) );
}

.nova-contact-form__field--third {
	flex-basis: calc( 33.333% - ( var(--nova-space-md) * 2 / 3 ) );
}

@media (max-width: 36rem) {
	.nova-contact-form__field--half,
	.nova-contact-form__field--third {
		flex-basis: 100%;
	}
}

.nova-contact-form__label {
	font-weight: 600;
	font-size: 0.85rem;
	color: var(--nova-color-text);
}

.nova-contact-form__required {
	color: #c62828;
}

.nova-contact-form__input {
	padding: 0.6rem 0.8rem;
	border: 1px solid var(--nova-color-border);
	border-radius: var(--nova-radius);
	background: var(--nova-contact-field-bg, var(--nova-color-surface));
	color: var(--nova-contact-field-color, var(--nova-color-text));
	font-size: var(--nova-contact-field-font-size, 1rem);
	font-family: inherit;
	width: 100%;
	box-sizing: border-box;
}

textarea.nova-contact-form__input {
	min-height: 8rem;
	resize: vertical;
}

.nova-contact-form__field--checkbox,
.nova-contact-form__checkbox-label {
	flex-direction: row;
	align-items: center;
}

.nova-contact-form__checkbox-label {
	display: flex;
	gap: 0.5rem;
	font-size: 0.9rem;
	color: var(--nova-color-text);
	cursor: pointer;
}

.nova-contact-form__radio-group {
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
}

.nova-contact-form__radio-option {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 0.9rem;
	color: var(--nova-color-text);
	cursor: pointer;
	font-weight: 400;
}

.nova-contact-form__recaptcha {
	margin-top: 0.25rem;
}

.nova-contact-form__recaptcha-note {
	margin: 0.25rem 0 0;
	font-size: 0.75rem;
	color: var(--nova-color-text-muted, var(--nova-color-text));
}

.nova-contact-form__submit {
	align-self: flex-start;
	border: none;
	background: var(--nova-contact-btn-bg, var(--nova-color-primary));
	color: var(--nova-contact-btn-color, var(--nova-color-primary-contrast));
	font-size: var(--nova-contact-btn-font-size, 1rem);
	font-family: inherit;
}

.nova-contact-form__submit:disabled {
	opacity: 0.65;
	cursor: not-allowed;
}

/* ---------- Scroll Story (ScrollStoryElement) ---------- */
/* Base state is deliberately a plain, fully-visible stacked layout -- every
   rule that dims a step or pins the media pane is scoped under
   .nova-scroll-story--js (added by scroll-story.js only when
   IntersectionObserver is supported and prefers-reduced-motion isn't set),
   so the section always degrades to fully readable content, never a
   half-animated one. */
.nova-scroll-story {
	display: flex;
	flex-wrap: wrap;
	gap: var(--nova-space-lg);
	background: var(--nova-scroll-story-bg, transparent);
	color: var(--nova-scroll-story-color, inherit);
}

.nova-scroll-story__media {
	flex: 1 1 20rem;
	order: 2;
}

.nova-scroll-story--media-left .nova-scroll-story__media {
	order: -1;
}

.nova-scroll-story__media-inner {
	position: relative;
	width: 100%;
	height: 60vh;
	border-radius: var(--nova-radius);
	overflow: hidden;
	background: var(--nova-color-surface-alt);
}

.nova-scroll-story__frame {
	position: absolute;
	inset: 0;
	background-size: cover;
	background-position: center;
	opacity: 1;
}

.nova-scroll-story__progress {
	position: absolute;
	right: 1rem;
	top: 50%;
	transform: translateY(-50%);
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	z-index: 1;
}

.nova-scroll-story__progress-dot {
	width: 0.5rem;
	height: 0.5rem;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.5);
	transition: background 0.3s ease, transform 0.3s ease;
}

.nova-scroll-story__progress-dot.is-active {
	background: var(--nova-scroll-story-accent, var(--nova-color-primary));
	transform: scale(1.3);
}

.nova-scroll-story__steps {
	flex: 1 1 20rem;
	display: flex;
	flex-direction: column;
}

.nova-scroll-story__step {
	display: flex;
	align-items: center;
	padding: var(--nova-space-lg) 0;
}

.nova-scroll-story__step-inner {
	max-width: 32rem;
}

.nova-scroll-story__eyebrow {
	display: block;
	margin-bottom: 0.5rem;
	font-size: 0.8rem;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--nova-scroll-story-accent, var(--nova-color-primary));
}

.nova-scroll-story__heading {
	margin: 0 0 0.75rem;
}

.nova-scroll-story__text {
	margin: 0;
	color: var(--nova-scroll-story-color, var(--nova-color-text-muted, inherit));
}

/* Enhanced (JS-driven, desktop-only -- see the mobile override below)
   pinned/crossfade/dim behaviour. */
@media (min-width: 48.0625rem) {
	.nova-scroll-story--js .nova-scroll-story__media-inner {
		position: sticky;
		top: 10vh;
		height: 80vh;
	}

	.nova-scroll-story--js .nova-scroll-story__frame {
		opacity: 0;
		transition: opacity 0.6s ease, transform 0.6s ease;
	}

	.nova-scroll-story--js .nova-scroll-story__frame.is-active {
		opacity: 1;
	}

	.nova-scroll-story--js.nova-scroll-story--transition-zoom .nova-scroll-story__frame {
		transform: scale(1.08);
	}

	.nova-scroll-story--js.nova-scroll-story--transition-zoom .nova-scroll-story__frame.is-active {
		transform: scale(1);
	}

	.nova-scroll-story--js.nova-scroll-story--transition-slide-up .nova-scroll-story__frame {
		transform: translateY(1.5rem);
	}

	.nova-scroll-story--js.nova-scroll-story--transition-slide-up .nova-scroll-story__frame.is-active {
		transform: translateY(0);
	}

	.nova-scroll-story--js .nova-scroll-story__step {
		min-height: var(--nova-scroll-story-step-height, 90vh);
	}

	.nova-scroll-story--js .nova-scroll-story__step-inner {
		opacity: 0.35;
		transform: translateY(1.5rem);
		transition: opacity 0.5s ease, transform 0.5s ease;
	}

	.nova-scroll-story--js .nova-scroll-story__step.is-active .nova-scroll-story__step-inner {
		opacity: 1;
		transform: translateY(0);
	}
}

/* Below the breakpoint, sticky pinning is skipped entirely (jittery with
   mobile browser toolbars, and side-by-side pinning has no room on a
   narrow screen anyway) -- steps still crossfade the image pane, just
   without pinning it or dimming inactive steps, since a plain stacked
   article read is the better mobile experience here. */
@media (max-width: 48rem) {
	.nova-scroll-story__media {
		order: -1;
	}

	.nova-scroll-story__media-inner {
		height: 50vh;
	}

	.nova-scroll-story--js .nova-scroll-story__step {
		min-height: 0;
	}
}
