/*
 * Restyled single service pages: mobile-first layer.
 *
 * Loaded after landing.css, only on pages using a "UBW Restyle" Page Template.
 * Base rules are written for phones; min-width queries add tablet and desktop
 * layouts. Blocks in the page copy that the Customizer CSS styles (.ubw-refurbishment,
 * .ubw-package, .ubw-quote …) keep their own design: the copy rules below skip
 * anything inside them and style the rest as plain editor content.
 */

/* ---------- Sections ---------- */
.ubw-lp-page .ubw-lp-restyle .ubw-lp-rs-section {
	padding: 48px 0;
	overflow-x: clip; /* The phone gallery strip bleeds to the screen edge. */
}

/* ---------- Hero ---------- */
.ubw-lp-page .ubw-lp-restyle .ubw-lp-rs-hero {
	padding-bottom: 40px;
}

.ubw-lp-page .ubw-lp-restyle .ubw-lp-rs-hero h1 {
	font-size: 28px;
}

.ubw-lp-page .ubw-lp-restyle .ubw-lp-rs-hero h1.is-long {
	font-size: 26px;
}

/* Phones: the survey button comes straight after the title and tagline, so it is on the
   first screen even on a 320×568 phone; the trust ticks follow it. */
.ubw-lp-page .ubw-lp-restyle .ubw-lp-rs-hero .ubw-lp-hero__copy {
	display: flex;
	flex-direction: column;
}

.ubw-lp-page .ubw-lp-restyle .ubw-lp-rs-hero .ubw-lp-rs-tagline {
	margin-bottom: 20px;
}

.ubw-lp-page .ubw-lp-restyle .ubw-lp-rs-hero .ubw-lp-hero__copy > .ubw-lp-actions {
	order: 1;
	margin: 0 0 24px;
}

.ubw-lp-page .ubw-lp-restyle .ubw-lp-rs-hero .ubw-lp-hero__copy > .ubw-lp-rs-checks {
	order: 2;
	margin: 0;
}

/* Breadcrumb links: a 44px tap height without moving the text. */
.ubw-lp-page .ubw-lp-restyle .ubw-lp-crumbs a {
	margin: -13px 0;
	padding: 13px 0;
}

/* ---------- Designed blocks (Customizer CSS) ---------- */
/* Full container width, as on the original page: their cards were designed for it. */
.ubw-lp-page .ubw-lp-restyle .ubw-lp-rs-flow > .ubw-lp-rs-designed {
	max-width: none;
}

/* ---------- Long-form copy ---------- */
/* Regular weight and a darker grey: Poppins Light at 16px is too faint for long reading on a phone. */
.ubw-lp-page .ubw-lp-restyle .ubw-lp-rs-text p:not(:is(.ubw-refurbishment, .ubw-package, .ubw-quote, .ubw-benefit-grid, .ubw-service-grid, .ubw-room-types) *),
.ubw-lp-page .ubw-lp-restyle .ubw-lp-rs-text ul > li:not(:is(.ubw-refurbishment, .ubw-package, .ubw-quote, .ubw-benefit-grid, .ubw-service-grid, .ubw-room-types) *),
.ubw-lp-page .ubw-lp-restyle .ubw-lp-rs-text ol > li:not(:is(.ubw-refurbishment, .ubw-package, .ubw-quote, .ubw-benefit-grid, .ubw-service-grid, .ubw-room-types) *),
.ubw-lp-page .ubw-lp-restyle .ubw-lp-rs-text blockquote:not(:is(.ubw-refurbishment, .ubw-package, .ubw-quote, .ubw-benefit-grid, .ubw-service-grid, .ubw-room-types) *) {
	color: #34465c;
	font-size: 16px;
	font-weight: 400;
	line-height: 1.7;
}

.ubw-lp-page .ubw-lp-restyle .ubw-lp-rs-text p:not(:is(.ubw-refurbishment, .ubw-package, .ubw-quote, .ubw-benefit-grid, .ubw-service-grid, .ubw-room-types) *) {
	margin-bottom: 16px;
}

.ubw-lp-page .ubw-lp-restyle .ubw-lp-rs-text h2:not(:is(.ubw-refurbishment, .ubw-package, .ubw-quote, .ubw-benefit-grid, .ubw-service-grid, .ubw-room-types) *),
.ubw-lp-page .ubw-lp-restyle .ubw-lp-rs-text h3:not(:is(.ubw-refurbishment, .ubw-package, .ubw-quote, .ubw-benefit-grid, .ubw-service-grid, .ubw-room-types) *),
.ubw-lp-page .ubw-lp-restyle .ubw-lp-rs-text h4:not(:is(.ubw-refurbishment, .ubw-package, .ubw-quote, .ubw-benefit-grid, .ubw-service-grid, .ubw-room-types) *) {
	color: var(--lp-navy);
	line-height: 1.25;
	letter-spacing: -0.01em;
	text-wrap: balance;
}

/* An accent bar on section headings gives long pages something to scan by. */
.ubw-lp-page .ubw-lp-restyle .ubw-lp-rs-text h2:not(:is(.ubw-refurbishment, .ubw-package, .ubw-quote, .ubw-benefit-grid, .ubw-service-grid, .ubw-room-types) *),
.ubw-lp-page .ubw-lp-restyle .ubw-lp-rs-text h3:not(:is(.ubw-refurbishment, .ubw-package, .ubw-quote, .ubw-benefit-grid, .ubw-service-grid, .ubw-room-types) *) {
	padding-left: 14px;
	border-left: 4px solid var(--lp-accent);
}

/* Old markup on Waterproofing Systems puts the diagrams inside the headings: no bar there. */
.ubw-lp-page .ubw-lp-restyle .ubw-lp-rs-text.ubw-lp-prose :is(h2, h3):has(img) {
	padding-left: 0;
	border-left: 0;
}

.ubw-lp-page .ubw-lp-restyle .ubw-lp-rs-text h2:not(:is(.ubw-refurbishment, .ubw-package, .ubw-quote, .ubw-benefit-grid, .ubw-service-grid, .ubw-room-types) *) {
	margin: 36px 0 12px;
	font-size: 22px;
}

.ubw-lp-page .ubw-lp-restyle .ubw-lp-rs-text h3:not(:is(.ubw-refurbishment, .ubw-package, .ubw-quote, .ubw-benefit-grid, .ubw-service-grid, .ubw-room-types) *) {
	margin: 30px 0 10px;
	font-size: 19px;
}

.ubw-lp-page .ubw-lp-restyle .ubw-lp-rs-text h4:not(:is(.ubw-refurbishment, .ubw-package, .ubw-quote, .ubw-benefit-grid, .ubw-service-grid, .ubw-room-types) *) {
	margin: 24px 0 8px;
	font-size: 17px;
}

.ubw-lp-page .ubw-lp-restyle .ubw-lp-rs-text > :first-child,
.ubw-lp-page .ubw-lp-restyle .ubw-lp-rs-text > hr + * {
	margin-top: 0;
}

.ubw-lp-page .ubw-lp-restyle .ubw-lp-rs-text hr:not(:is(.ubw-refurbishment, .ubw-package, .ubw-quote, .ubw-benefit-grid, .ubw-service-grid, .ubw-room-types) *) {
	margin: 32px 0;
}

.ubw-lp-page .ubw-lp-restyle .ubw-lp-rs-heading {
	font-size: 25px;
}

.ubw-lp-page .ubw-lp-restyle .ubw-lp-rs-text ul > li:not(:is(.ubw-refurbishment, .ubw-package, .ubw-quote, .ubw-benefit-grid, .ubw-service-grid, .ubw-room-types) *) {
	margin-bottom: 8px;
}

.ubw-lp-page .ubw-lp-restyle .ubw-lp-rs-text ul > li:not(:is(.ubw-refurbishment, .ubw-package, .ubw-quote, .ubw-benefit-grid, .ubw-service-grid, .ubw-room-types) *)::before {
	top: 3px;
}

/* Paragraphs that are only a link ("👉 Book your free Camden survey"): a full-width tap target. */
.ubw-lp-page .ubw-lp-restyle .ubw-lp-rs-text p.ubw-lp-rs-linkrow:not(:is(.ubw-refurbishment, .ubw-package, .ubw-quote, .ubw-benefit-grid, .ubw-service-grid, .ubw-room-types) *) {
	position: relative;
	display: flex;
	align-items: center;
	gap: 8px;
	min-height: 56px;
	margin: 24px 0;
	padding: 14px 52px 14px 16px;
	border: 1px solid #cfe3ee;
	border-radius: 12px;
	background: var(--lp-blue-soft);
	line-height: 1.4;
	transition: background-color 0.2s ease, border-color 0.2s ease;
}

.ubw-lp-page .ubw-lp-restyle .ubw-lp-rs-text p.ubw-lp-rs-linkrow:not(:is(.ubw-refurbishment, .ubw-package, .ubw-quote, .ubw-benefit-grid, .ubw-service-grid, .ubw-room-types) *) a {
	color: var(--lp-navy);
	font-weight: 700;
	text-decoration: none;
}

/* The whole row is the link. */
.ubw-lp-page .ubw-lp-restyle .ubw-lp-rs-text p.ubw-lp-rs-linkrow:not(:is(.ubw-refurbishment, .ubw-package, .ubw-quote, .ubw-benefit-grid, .ubw-service-grid, .ubw-room-types) *) a::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
}

.ubw-lp-page .ubw-lp-restyle .ubw-lp-rs-text p.ubw-lp-rs-linkrow:not(:is(.ubw-refurbishment, .ubw-package, .ubw-quote, .ubw-benefit-grid, .ubw-service-grid, .ubw-room-types) *)::after {
	content: "";
	position: absolute;
	top: 50%;
	right: 16px;
	width: 22px;
	height: 22px;
	transform: translateY(-50%);
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23072434' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
	transition: transform 0.2s ease;
}

.ubw-lp-page .ubw-lp-restyle .ubw-lp-rs-text p.ubw-lp-rs-linkrow:not(:is(.ubw-refurbishment, .ubw-package, .ubw-quote, .ubw-benefit-grid, .ubw-service-grid, .ubw-room-types) *):hover,
.ubw-lp-page .ubw-lp-restyle .ubw-lp-rs-text p.ubw-lp-rs-linkrow:not(:is(.ubw-refurbishment, .ubw-package, .ubw-quote, .ubw-benefit-grid, .ubw-service-grid, .ubw-room-types) *):focus-within {
	border-color: var(--lp-navy);
	background: var(--lp-white);
}

.ubw-lp-page .ubw-lp-restyle .ubw-lp-rs-text p.ubw-lp-rs-linkrow:not(:is(.ubw-refurbishment, .ubw-package, .ubw-quote, .ubw-benefit-grid, .ubw-service-grid, .ubw-room-types) *):hover::after {
	transform: translate(3px, -50%);
}

.ubw-lp-page .ubw-lp-restyle .ubw-lp-rs-text p.ubw-lp-rs-linkrow:not(:is(.ubw-refurbishment, .ubw-package, .ubw-quote, .ubw-benefit-grid, .ubw-service-grid, .ubw-room-types) *) a:focus-visible {
	outline: none;
}

.ubw-lp-page .ubw-lp-restyle .ubw-lp-rs-text p.ubw-lp-rs-linkrow:not(:is(.ubw-refurbishment, .ubw-package, .ubw-quote, .ubw-benefit-grid, .ubw-service-grid, .ubw-room-types) *):focus-within {
	outline: 3px solid var(--lp-blue);
	outline-offset: 2px;
}

/* ---------- Survey call-to-action boxes ---------- */
.ubw-lp-page .ubw-lp-restyle .ubw-lp-rs-cta {
	flex-direction: column;
	align-items: stretch;
	gap: 20px;
	padding: 26px 20px;
}

.ubw-lp-page .ubw-lp-restyle .ubw-lp-rs-cta__text {
	flex: 0 0 auto;
}

.ubw-lp-page .ubw-lp-restyle .ubw-lp-rs-cta .ubw-lp-actions,
.ubw-lp-page .ubw-lp-restyle .ubw-lp-rs-cta .ubw-lp-btn {
	width: 100%;
}

.ubw-lp-page .ubw-lp-restyle .ubw-lp-rs-cta .ubw-lp-btn {
	justify-content: center;
	min-height: 52px;
}

/* ---------- Gallery ---------- */
/* Phones: a swipeable strip that bleeds to the screen edge, so no photo count leaves a gap. */
.ubw-lp-page .ubw-lp-restyle .ubw-lp-rs-gallery.ubw-lp-cs-gallery {
	display: flex;
	gap: 10px;
	margin-right: -16px;
	padding: 0 16px 4px 0;
	overflow-x: auto;
	overscroll-behavior-x: contain;
	scroll-snap-type: x mandatory;
	scroll-padding-left: 0;
	scrollbar-width: none;
}

.ubw-lp-page .ubw-lp-restyle .ubw-lp-rs-gallery::-webkit-scrollbar {
	display: none;
}

.ubw-lp-page .ubw-lp-restyle .ubw-lp-rs-gallery > .ubw-lp-cs-gallery__item {
	flex: 0 0 82%;
	height: auto;
	aspect-ratio: 4 / 3;
	scroll-snap-align: start;
}

.ubw-lp-page .ubw-lp-restyle .ubw-lp-rs-gallery .ubw-lp-cs-gallery__link {
	height: 100%;
}

/* ---------- Case study slider ---------- */
.ubw-lp-page .ubw-lp-restyle .ubw-lp-rs-slider__btn {
	width: 48px;
	height: 48px;
}

/* ---------- FAQs ---------- */
.ubw-lp-page .ubw-lp-restyle .ubw-lp-rs-faq .ubw-lp-faq__answer p {
	font-weight: 400;
}

@media (min-width: 360px) {
	.ubw-lp-page .ubw-lp-restyle .ubw-lp-rs-hero h1 {
		font-size: 32px;
	}

	.ubw-lp-page .ubw-lp-restyle .ubw-lp-rs-hero h1.is-long {
		font-size: 28px;
	}
}

@media (min-width: 401px) {
	.ubw-lp-page .ubw-lp-restyle .ubw-lp-rs-hero h1 {
		font-size: clamp(34px, 4.8vw, 60px);
	}

	.ubw-lp-page .ubw-lp-restyle .ubw-lp-rs-hero h1.is-long {
		font-size: clamp(30px, 3.6vw, 48px);
	}
}

/* ---------- Large phones and small tablets ---------- */
@media (min-width: 600px) {
	.ubw-lp-page .ubw-lp-restyle .ubw-lp-rs-section {
		overflow-x: visible;
	}

	/* Original order again: trust ticks, then the button. */
	.ubw-lp-page .ubw-lp-restyle .ubw-lp-rs-hero .ubw-lp-hero__copy {
		display: block;
	}

	.ubw-lp-page .ubw-lp-restyle .ubw-lp-rs-hero .ubw-lp-rs-tagline {
		margin-bottom: 26px;
	}

	.ubw-lp-page .ubw-lp-restyle .ubw-lp-rs-hero .ubw-lp-hero__copy > .ubw-lp-actions {
		margin: 4px 0 0;
	}

	.ubw-lp-page .ubw-lp-restyle .ubw-lp-rs-hero .ubw-lp-hero__copy > .ubw-lp-rs-checks {
		margin: 0 0 32px;
	}

	.ubw-lp-page .ubw-lp-restyle .ubw-lp-rs-gallery.ubw-lp-cs-gallery {
		display: grid;
		grid-template-columns: repeat(4, minmax(0, 1fr));
		grid-auto-rows: clamp(120px, 16vw, 200px);
		grid-auto-flow: dense;
		gap: 12px;
		margin-right: 0;
		padding: 0;
		overflow: visible;
	}

	.ubw-lp-page .ubw-lp-restyle .ubw-lp-rs-gallery > .ubw-lp-cs-gallery__item {
		aspect-ratio: auto;
	}

	.ubw-lp-page .ubw-lp-restyle .ubw-lp-rs-gallery > .ubw-lp-cs-gallery__item:first-child {
		grid-column: span 2;
		grid-row: span 2;
	}

	/* Set in PHP so the last row of the 4-column grid has no gap. */
	.ubw-lp-page .ubw-lp-restyle .ubw-lp-rs-gallery > .ubw-lp-cs-gallery__item.is-wide {
		grid-column: span 2;
	}

	/* 2–3 photos: equal columns. */
	.ubw-lp-page .ubw-lp-restyle .ubw-lp-rs-gallery.ubw-lp-cs-gallery--few {
		grid-template-columns: none;
		grid-auto-columns: minmax(0, 1fr);
		grid-auto-flow: column;
		grid-auto-rows: clamp(200px, 28vw, 300px);
	}

	.ubw-lp-page .ubw-lp-restyle .ubw-lp-rs-gallery.ubw-lp-cs-gallery--few > .ubw-lp-cs-gallery__item:first-child {
		grid-column: auto;
		grid-row: auto;
	}
}

/* ---------- Tablets ---------- */
@media (min-width: 768px) {
	.ubw-lp-page .ubw-lp-restyle .ubw-lp-rs-section {
		padding: 72px 0;
	}

	.ubw-lp-page .ubw-lp-restyle .ubw-lp-rs-text p:not(:is(.ubw-refurbishment, .ubw-package, .ubw-quote, .ubw-benefit-grid, .ubw-service-grid, .ubw-room-types) *),
	.ubw-lp-page .ubw-lp-restyle .ubw-lp-rs-text ul > li:not(:is(.ubw-refurbishment, .ubw-package, .ubw-quote, .ubw-benefit-grid, .ubw-service-grid, .ubw-room-types) *),
	.ubw-lp-page .ubw-lp-restyle .ubw-lp-rs-text ol > li:not(:is(.ubw-refurbishment, .ubw-package, .ubw-quote, .ubw-benefit-grid, .ubw-service-grid, .ubw-room-types) *),
	.ubw-lp-page .ubw-lp-restyle .ubw-lp-rs-text blockquote:not(:is(.ubw-refurbishment, .ubw-package, .ubw-quote, .ubw-benefit-grid, .ubw-service-grid, .ubw-room-types) *) {
		font-size: 17px;
		line-height: 1.75;
	}

	.ubw-lp-page .ubw-lp-restyle .ubw-lp-rs-text p:not(:is(.ubw-refurbishment, .ubw-package, .ubw-quote, .ubw-benefit-grid, .ubw-service-grid, .ubw-room-types) *) {
		margin-bottom: 18px;
	}

	.ubw-lp-page .ubw-lp-restyle .ubw-lp-rs-text h2:not(:is(.ubw-refurbishment, .ubw-package, .ubw-quote, .ubw-benefit-grid, .ubw-service-grid, .ubw-room-types) *) {
		margin-top: 44px;
		font-size: 26px;
	}

	.ubw-lp-page .ubw-lp-restyle .ubw-lp-rs-text h3:not(:is(.ubw-refurbishment, .ubw-package, .ubw-quote, .ubw-benefit-grid, .ubw-service-grid, .ubw-room-types) *) {
		margin-top: 34px;
		font-size: 21px;
	}

	.ubw-lp-page .ubw-lp-restyle .ubw-lp-rs-text h4:not(:is(.ubw-refurbishment, .ubw-package, .ubw-quote, .ubw-benefit-grid, .ubw-service-grid, .ubw-room-types) *) {
		font-size: 18px;
	}

	.ubw-lp-page .ubw-lp-restyle .ubw-lp-rs-text hr:not(:is(.ubw-refurbishment, .ubw-package, .ubw-quote, .ubw-benefit-grid, .ubw-service-grid, .ubw-room-types) *) {
		margin: 40px 0;
	}

	.ubw-lp-page .ubw-lp-restyle .ubw-lp-rs-heading {
		font-size: 30px;
	}

	.ubw-lp-page .ubw-lp-restyle .ubw-lp-rs-text p.ubw-lp-rs-linkrow:not(:is(.ubw-refurbishment, .ubw-package, .ubw-quote, .ubw-benefit-grid, .ubw-service-grid, .ubw-room-types) *) {
		display: inline-flex;
		min-width: min(100%, 420px);
		max-width: 100%;
	}

	.ubw-lp-page .ubw-lp-restyle .ubw-lp-rs-cta {
		align-items: flex-start;
		padding: 32px 36px;
	}

	.ubw-lp-page .ubw-lp-restyle .ubw-lp-rs-cta .ubw-lp-actions,
	.ubw-lp-page .ubw-lp-restyle .ubw-lp-rs-cta .ubw-lp-btn {
		width: auto;
	}
}

/* ---------- Desktop ---------- */
@media (min-width: 1024px) {
	.ubw-lp-page .ubw-lp-restyle .ubw-lp-rs-section {
		padding: 96px 0;
	}

	.ubw-lp-page .ubw-lp-restyle .ubw-lp-rs-hero {
		padding-bottom: clamp(56px, 6vw, 88px);
	}

	/* Text beside the button; long button labels need this width before it fits. */
	.ubw-lp-page .ubw-lp-restyle .ubw-lp-rs-cta {
		flex-direction: row;
		flex-wrap: nowrap;
		align-items: center;
		gap: 40px;
	}

	.ubw-lp-page .ubw-lp-restyle .ubw-lp-rs-cta__text {
		flex: 1 1 0;
		min-width: 0;
	}

	.ubw-lp-page .ubw-lp-restyle .ubw-lp-rs-cta .ubw-lp-actions {
		flex: 0 0 auto;
	}

	.ubw-lp-page .ubw-lp-restyle .ubw-lp-rs-text h2:not(:is(.ubw-refurbishment, .ubw-package, .ubw-quote, .ubw-benefit-grid, .ubw-service-grid, .ubw-room-types) *) {
		font-size: 30px;
	}

	.ubw-lp-page .ubw-lp-restyle .ubw-lp-rs-text h3:not(:is(.ubw-refurbishment, .ubw-package, .ubw-quote, .ubw-benefit-grid, .ubw-service-grid, .ubw-room-types) *) {
		font-size: 22px;
	}

	.ubw-lp-page .ubw-lp-restyle .ubw-lp-rs-heading {
		font-size: 32px;
	}
}
