/**
 * Base resets and layout helpers for Loveable HTML blocks.
 */

/* Loveable design tokens — fixes circular var() in compiled Tailwind export */
:root {
	--font-serif: "Cormorant Garamond", "Playfair Display", Georgia, serif;
	--font-sans: "Inter", ui-sans-serif, system-ui, sans-serif;
}

/* Serif headings inside Loveable page content (beats GeneratePress h1–h4 rules) */
.entry-content #top .font-serif,
.entry-content #top h1,
.entry-content #top h2,
.entry-content #top h3,
.entry-content #top h4 {
	font-family: "Cormorant Garamond", "Playfair Display", Georgia, serif;
	font-weight: 500;
	letter-spacing: -0.01em;
}

.entry-content #top h1 {
	margin-bottom: 0;
}

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

body {
	font-family: var(--font-sans, "Inter", ui-sans-serif, system-ui, sans-serif);
	color: var(--hvb-gray-900);
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}

/* Container utility — matches common Loveable .container pattern */
.hvb-container {
	width: 100%;
	max-width: var(--hvb-container-max);
	margin-left: auto;
	margin-right: auto;
	padding-left: var(--hvb-container-pad);
	padding-right: var(--hvb-container-pad);
}

/* Full-width page content for HTML blocks */
.hvb-full-width-content .inside-article,
.hvb-full-width-content .entry-content {
	max-width: none;
	padding-left: 0;
	padding-right: 0;
}

.hvb-full-width-content .entry-content > *:not(.alignfull):not(.alignwide) {
	max-width: var(--hvb-container-max);
	margin-left: auto;
	margin-right: auto;
	padding-left: var(--hvb-container-pad);
	padding-right: var(--hvb-container-pad);
}

/* Hide GP default header/footer when using Loveable templates */
.site-header,
.site-info {
	display: none !important;
}

/* Remove GP content padding so Loveable sections go full width */
.hvb-full-width-content .inside-article {
	padding: 0;
}

.hvb-full-width-content .entry-content {
	padding: 0;
	margin: 0;
}

.hvb-full-width-content .entry-content > .hvb-page-content,
.hvb-full-width-content .entry-content > div[id="top"] {
	max-width: none;
	padding: 0;
}

/* Hide any GP featured image / page header that slips through */
.featured-image.page-header-image,
.page-header-image,
.page-header-image-single {
	display: none !important;
}

.hvb-full-width-content .entry-header {
	display: none !important;
}

/* Section spacing helper for pasted Loveable sections */
.hvb-section {
	padding-top: var(--hvb-section-pad-y);
	padding-bottom: var(--hvb-section-pad-y);
}

.hvb-section--gray {
	background-color: var(--hvb-gray-50);
}

.hvb-section--dark {
	background-color: var(--hvb-primary);
	color: var(--hvb-white);
}

/* Hide GP default navigation */
.main-navigation,
#site-navigation,
nav.toggled {
	display: none !important;
}

/* Hide GeneratePress default footer bar */
.site-info {
	display: none !important;
}

/* Before / after bathroom comparison */
.hvb-ba {
	position: relative;
	isolation: isolate;
	touch-action: none;
	user-select: none;
	cursor: ew-resize;
}

.hvb-ba__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	pointer-events: none;
}

.hvb-ba__img--after {
	position: absolute;
	inset: 0;
}

.hvb-ba__before {
	position: absolute;
	inset: 0;
	z-index: 2;
	overflow: hidden;
	width: 50%;
	will-change: width;
	transition: width 0.08s linear;
}

.hvb-ba.is-idle .hvb-ba__before {
	transition: width 1.4s ease-in-out;
}

.hvb-ba__img--before {
	position: absolute;
	top: 0;
	left: 0;
	height: 100%;
	max-width: none;
	object-fit: cover;
}

.hvb-ba__handle {
	position: absolute;
	top: 0;
	bottom: 0;
	left: 50%;
	z-index: 3;
	width: 2px;
	transform: translateX(-50%);
	pointer-events: none;
}

.hvb-ba__handle-line {
	position: absolute;
	inset: 0;
	background: rgba(255, 255, 255, 0.95);
	box-shadow: 0 0 12px rgba(0, 0, 0, 0.25);
}

.hvb-ba__handle-grip {
	position: absolute;
	top: 50%;
	left: 50%;
	display: flex;
	height: 2.75rem;
	width: 2.75rem;
	align-items: center;
	justify-content: center;
	border-radius: 9999px;
	background: #fff;
	box-shadow: 0 8px 24px rgba(11, 26, 38, 0.18);
	transform: translate(-50%, -50%);
}

.hvb-ba__handle-grip::before,
.hvb-ba__handle-grip::after {
	content: "";
	position: absolute;
	top: 50%;
	width: 0;
	height: 0;
	border-top: 5px solid transparent;
	border-bottom: 5px solid transparent;
	transform: translateY(-50%);
}

.hvb-ba__handle-grip::before {
	left: 0.55rem;
	border-right: 6px solid #0b1a26;
}

.hvb-ba__handle-grip::after {
	right: 0.55rem;
	border-left: 6px solid #0b1a26;
}

.hvb-ba__range {
	position: absolute;
	inset: 0;
	z-index: 4;
	width: 100%;
	height: 100%;
	margin: 0;
	opacity: 0;
	cursor: ew-resize;
}

.hvb-ba__badge {
	position: absolute;
	top: 1rem;
	z-index: 5;
	padding: 0.35rem 0.75rem;
	border-radius: 9999px;
	background: rgba(11, 26, 38, 0.72);
	color: #fff;
	font-size: 0.6875rem;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	pointer-events: none;
}

.hvb-ba__badge--before {
	left: 1rem;
}

.hvb-ba__badge--after {
	right: 1rem;
}

@media (prefers-reduced-motion: reduce) {
	.hvb-ba__before {
		transition: none;
	}
}

.hvb-ba--feature {
	aspect-ratio: 16 / 10;
	min-height: 360px;
	max-height: min(78vh, 820px);
}

@media (min-width: 768px) {
	.hvb-ba--feature {
		min-height: 420px;
	}
}

@media (min-width: 1024px) {
	.hvb-ba--feature {
		min-height: 520px;
	}
}
