/*
 * Turun Huoneistomarkkinat – brand layer on top of Louhosteema.
 *
 * Pages are built with Elementor. Brand-specific shapes and components are
 * CSS classes that editors add in Elementor (Advanced → CSS Classes):
 *
 *   hm-section--sand / --paper / --dark   section backgrounds
 *   hm-roof / hm-roof--left / hm-roof--center   house-roof clip on an image or container
 *   hm-eyebrow                            small uppercase label above a heading
 *   hm-btn--sky / --light / --outline     Elementor button variants (default = dark)
 *   hm-display                            128px hero heading
 *   hm-accent                             sky-blue <strong>/<em> inside text
 *   hm-card                               white card with padding
 *   hm-badge                              round sky badge with the Hm symbol
 *   hm-stats                              big Staatliches numbers
 */

/* --------------------------------------------------------------------------
 * Tokens
 * ----------------------------------------------------------------------- */
:root {
	--hm-navy: #111d44;
	--hm-navy-rgb: 17, 29, 68;
	--hm-sky: #3d85fb;
	--hm-sky-light: #81b1ff;
	--hm-sky-text: #2a6fe0; /* sky blue as small text on light bg (AA) */
	--hm-paper: #f8f6ec;
	--hm-sand: #e9e1d4;
	--hm-grey: #d7d7d7;
	--hm-white: #fff;

	--hm-font-display: "Staatliches", "Bebas Neue", "Arial Narrow", sans-serif;
	--hm-font-body: "Rethink Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

	--hm-content: 1300px;
	--hm-wide: 1720px;
	--hm-gutter: clamp(1rem, 4vw, 2rem);

	/* Louhosteema tokens */
	--louhos-primary: var(--hm-navy);
	--louhos-primary-rgb: var(--hm-navy-rgb);
	--louhos-primary-dark: #0a1230;
	--louhos-accent: var(--hm-sky);
	--louhos-link-color: var(--hm-navy);
	--louhos-headings: var(--hm-navy);
	--louhos-body-color: var(--hm-navy);
	--louhos-grey: var(--hm-sand);
	--louhos-border: var(--hm-grey);
	--louhos-border-rgb: 215, 215, 215;
	--louhos-dark-1: var(--hm-navy);
	--louhos-dark-1-rgb: var(--hm-navy-rgb);
	--louhos-dark-2: #0a1230;
	--louhos-dark-2-rgb: 10, 18, 48;
	--louhos-radius: 0;
	--louhos-radius-lg: 0;
	--louhos-font-family: var(--hm-font-body);
	--louhos-header-height: 72px;
}

/* --------------------------------------------------------------------------
 * Base typography
 * ----------------------------------------------------------------------- */
body {
	background: var(--hm-paper);
	color: var(--hm-navy);
	font-family: var(--hm-font-body);
	font-size: 1.125rem;
	line-height: 1.55;
	letter-spacing: -0.01em;
}

h1,
h2,
h3,
.hm-display {
	font-family: var(--hm-font-display);
	font-weight: 400;
	line-height: 1;
	text-transform: uppercase;
	color: var(--hm-navy);
}

h1,
.hm-display,
.elementor-widget-heading .hm-display {
	font-size: clamp(3.25rem, 1.6rem + 6vw, 8rem);
	letter-spacing: -0.025em;
}

h2 {
	font-size: clamp(2.75rem, 1.5rem + 4vw, 5.5rem);
	letter-spacing: -0.028em;
}

h3 {
	font-size: clamp(2.125rem, 1.5rem + 2vw, 3.25rem);
	letter-spacing: -0.038em;
}

h4 {
	font-family: var(--hm-font-body);
	font-size: 1.5rem;
	font-weight: 800;
	line-height: 1.25;
	letter-spacing: -0.04em;
	color: var(--hm-navy);
}

a {
	color: var(--hm-navy);
}

/* Elementor headings inherit the theme scale (kit typography left empty). */
.elementor-widget-heading .elementor-heading-title {
	font-family: inherit;
	color: inherit;
}

.elementor-widget-heading h1.elementor-heading-title,
.elementor-widget-heading h2.elementor-heading-title,
.elementor-widget-heading h3.elementor-heading-title {
	font-family: var(--hm-font-display);
	line-height: 1;
}

.hm-eyebrow,
.hm-eyebrow .elementor-heading-title {
	font-family: var(--hm-font-body);
	font-size: 0.9375rem;
	font-weight: 500;
	line-height: 1.2;
	letter-spacing: 0.25em;
	text-transform: uppercase;
	color: var(--hm-sky-text);
}

.hm-section--dark .hm-eyebrow,
.hm-section--dark .hm-eyebrow .elementor-heading-title,
.hm-cta .hm-eyebrow .elementor-heading-title {
	color: var(--hm-sky-light);
}

.hm-lead {
	font-size: clamp(1.375rem, 1rem + 1.2vw, 2rem);
	line-height: 1.3;
	letter-spacing: -0.03em;
}

.hm-accent strong,
.hm-accent b,
strong.hm-accent {
	color: var(--hm-sky);
	font-weight: 800;
}

.hm-small,
.hm-small p {
	font-size: 1rem;
	line-height: 1.5;
}

/* Text links with an arrow ("Lue lisää meistä →") */
.hm-link,
.hm-link a,
.hm-links a {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	font-weight: 700;
	font-size: 1rem;
	text-decoration: none;
	color: var(--hm-navy);
}

.hm-link a::after,
.hm-links a::after,
a.hm-link::after {
	content: "";
	width: 18px;
	height: 18px;
	background: url("../img/nuoli-tumma-pohja.svg") center / contain no-repeat;
	transition: transform 0.2s ease;
}

.hm-link a:hover::after,
.hm-links a:hover::after,
a.hm-link:hover::after {
	transform: translateX(4px);
}

.hm-links ul {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1.5rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

/* --------------------------------------------------------------------------
 * Elementor canvas inside the Louhosteema page template
 * ----------------------------------------------------------------------- */
.entry-content > .elementor,
.entry-content > :where(.elementor) {
	max-width: none;
	margin-inline: 0;
}

.hm-section--paper {
	background-color: var(--hm-paper);
}

.hm-section--sand {
	background-color: var(--hm-sand);
}

.hm-section--dark {
	background-color: var(--hm-navy);
	color: var(--hm-paper);
}

.hm-section--dark :is(h1, h2, h3, h4, a, .elementor-heading-title) {
	color: var(--hm-paper);
}

.hm-card {
	background: var(--hm-white);
	padding: clamp(1.5rem, 3vw, 2rem);
}

/* --------------------------------------------------------------------------
 * Buttons: Figma "Painike" – label + 58px arrow box.
 * Elementor Button widget gets the same look; variants via CSS class.
 * ----------------------------------------------------------------------- */
.hm-btn,
.elementor-widget-button .elementor-button {
	--hm-btn-bg: var(--hm-navy);
	--hm-btn-fg: var(--hm-paper);
	--hm-btn-box: var(--hm-sky);
	--hm-btn-arrow: url("../img/nuoli-tumma-pohja.svg");

	display: inline-flex;
	align-items: stretch;
	min-height: 58px;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: var(--hm-btn-bg);
	color: var(--hm-btn-fg);
	font-family: var(--hm-font-body);
	font-size: 1.0625rem;
	font-weight: 700;
	line-height: 1;
	letter-spacing: -0.005em;
	text-decoration: none;
	fill: currentColor;
}

.hm-btn > span:first-child,
.elementor-widget-button .elementor-button-content-wrapper {
	display: flex;
	align-items: center;
	padding: 0.75rem 1.5rem 0.75rem 1.75rem;
}

.hm-btn__arrow,
.elementor-widget-button .elementor-button::after {
	content: "";
	flex: 0 0 58px;
	min-height: 58px;
	background: var(--hm-btn-box) var(--hm-btn-arrow) center / 18px no-repeat;
	transition: background-position 0.2s ease;
}

.hm-btn:hover .hm-btn__arrow,
.hm-btn:focus-visible .hm-btn__arrow,
.elementor-widget-button .elementor-button:hover::after,
.elementor-widget-button .elementor-button:focus-visible::after {
	background-position: calc(50% + 4px) center;
}

.hm-btn:hover,
.hm-btn:focus-visible,
.elementor-widget-button .elementor-button:hover,
.elementor-widget-button .elementor-button:focus-visible {
	color: var(--hm-btn-fg);
	background: var(--hm-btn-bg);
}

.hm-btn--sky,
.hm-btn--sky .elementor-button,
.hm-btn--light,
.hm-btn--light .elementor-button,
.hm-btn--outline,
.hm-btn--outline .elementor-button {
	--hm-btn-fg: var(--hm-navy);
	--hm-btn-box: var(--hm-navy);
	--hm-btn-arrow: url("../img/nuoli-vaalea-pohja.svg");
}

.hm-btn--sky,
.hm-btn--sky .elementor-button {
	--hm-btn-bg: var(--hm-sky);
}

.hm-btn--light,
.hm-btn--light .elementor-button {
	--hm-btn-bg: var(--hm-paper);
}

.hm-btn--outline .elementor-button,
.hm-btn--outline.hm-btn {
	--hm-btn-bg: transparent;

	box-shadow: inset 0 0 0 2px var(--hm-navy);
}

.hm-btn--no-arrow .elementor-button::after {
	content: none;
}

/* --------------------------------------------------------------------------
 * Shapes
 * ----------------------------------------------------------------------- */

/* Asymmetric house roof (hero, CTA): peak at ~60 %, eaves ~12 % down. */
.hm-roof,
.hm-roof img {
	clip-path: polygon(0 var(--hm-roof-left, 12.5%), var(--hm-roof-peak, 59.5%) 0, 100% var(--hm-roof-right, 11.2%), 100% 100%, 0 100%);
}

.hm-roof--center {
	--hm-roof-peak: 50%;
	--hm-roof-left: 14%;
	--hm-roof-right: 14%;
}

.hm-roof--left {
	--hm-roof-peak: 35%;
}

/* Tall portrait with a roof (Meistä): shallower relative to height. */
.hm-roof--tall {
	--hm-roof-left: 7%;
	--hm-roof-right: 3%;
	--hm-roof-peak: 70%;
}

.hm-roof img,
.hm-cover img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.hm-cover,
.hm-cover .elementor-widget-container {
	height: 100%;
}

/* Hm badge */
.hm-badge {
	display: grid;
	place-items: center;
	width: clamp(96px, 9vw, 140px);
	aspect-ratio: 1;
	border-radius: 50%;
	background: var(--hm-sky);
}

.hm-badge img {
	width: 68%;
	height: auto;
}

/* Stats: Text Editor with one <p><strong>25 v</strong> <span>…</span></p> per number */
.hm-stats,
.hm-stats > .elementor-widget-container {
	display: flex;
	flex-wrap: wrap;
	gap: 1.5rem 2.75rem;
}

.hm-stats p {
	margin: 0;
}

.hm-stats strong {
	display: block;
	font-family: var(--hm-font-display);
	font-size: clamp(2.25rem, 1.8rem + 1.4vw, 3.25rem);
	font-weight: 400;
	line-height: 1;
	letter-spacing: -0.02em;
	text-transform: uppercase;
}

.hm-stats span {
	display: block;
	margin-top: 0.125rem;
	font-size: 1rem;
	line-height: 1.5;
}

/* Measures and alignment helpers for Elementor widgets */
.hm-center,
.hm-center p {
	text-align: center;
}

.hm-measure {
	max-width: 560px;
}

.hm-measure-sm {
	max-width: 640px;
	margin-inline: auto;
}

.hm-w-600 {
	max-width: 600px;
}

.hm-w-460 {
	max-width: 460px;
}

.hm-w-420 {
	max-width: 420px;
}

.hm-strong p {
	font-weight: 700;
}

.hm-hero__lead {
	max-width: 380px;
}

.hm-hero__lead p,
.elementor-widget-text-editor p:last-child {
	margin-bottom: 0;
}

.hm-hero__img img {
	width: 100%;
	aspect-ratio: 1720 / 880;
	object-fit: cover;
}

.hm-portrait img {
	width: 100%;
	aspect-ratio: 540 / 780;
	object-fit: cover;
}

.hm-ukk__img img {
	width: 100%;
	aspect-ratio: 480 / 470;
	object-fit: cover;
}

.hm-banner {
	position: relative;
}

.hm-banner__img img {
	width: 100%;
	min-height: 420px;
	aspect-ratio: 1720 / 660;
	object-fit: cover;
}

.hm-roof--cta {
	--hm-roof-left: 22%;
	--hm-roof-right: 22%;
	--hm-roof-peak: 50%;
}

.hm-cta :is(h2, p, .elementor-heading-title) {
	color: var(--hm-paper);
}

@media (max-width: 767.98px) {
	.hm-roof--cta {
		--hm-roof-left: 8%;
		--hm-roof-right: 8%;
	}
}

/* --------------------------------------------------------------------------
 * Top bar
 * ----------------------------------------------------------------------- */
.hm-topbar {
	background: var(--hm-sky);
	color: var(--hm-navy);
	font-size: 1rem;
	line-height: 1.5;
}

.hm-topbar__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.25rem 1.5rem;
	width: min(1656px, 100% - 2 * var(--hm-gutter));
	margin-inline: auto;
	padding-block: 0.5rem;
}

.hm-topbar p {
	margin: 0;
}

.hm-topbar__duty {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
}

.hm-topbar a {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	color: var(--hm-navy);
	font-weight: 700;
	text-decoration: none;
}

.hm-topbar a:hover,
.hm-topbar a:focus-visible {
	text-decoration: underline;
}

.hm-topbar__notice {
	padding: 0.25rem 0.875rem;
	background: var(--hm-navy);
	color: var(--hm-paper);
}

@media (max-width: 767.98px) {
	.hm-topbar__duty > span:first-child {
		display: none;
	}
}

/* --------------------------------------------------------------------------
 * Header: floating navy bar, sticky.
 * ----------------------------------------------------------------------- */
.hm-header {
	position: sticky;
	top: 0;
	z-index: 1000;
	padding: 1rem clamp(0.75rem, 5.2vw, 100px) 0;
	pointer-events: none;
}

.admin-bar .hm-header {
	top: 32px;
}

@media (max-width: 782px) {
	.admin-bar .hm-header {
		top: 0;
	}
}

.hm-header.is-stuck {
	padding-top: 0.5rem;
}

.hm-nav {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 0.75rem clamp(1rem, 2vw, 2rem);
	background: var(--hm-navy);
	box-shadow: 0 16px 20px rgba(var(--hm-navy-rgb), 0.28);
	pointer-events: auto;
}

.hm-nav__brand {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	flex-shrink: 0;
}

.hm-nav__symbol {
	width: 75px;
	height: 44px;
}

.hm-nav__wordmark {
	width: 82px;
	height: auto;
	margin-top: 10px;
}

.hm-nav__panel {
	display: flex;
	align-items: center;
	gap: 1rem;
}

.hm-nav__list {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.hm-nav__item {
	position: relative;
	display: flex;
	align-items: center;
}

.hm-nav__link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 12px;
	color: var(--hm-paper);
	font-size: 1rem;
	font-weight: 600;
	line-height: 1;
	text-decoration: none;
	white-space: nowrap;
}

.has-children > .hm-nav__link {
	padding-right: 4px;
}

.hm-nav__link:hover,
.hm-nav__link:focus-visible,
.hm-nav__item.is-active > .hm-nav__link {
	color: var(--hm-sky-light);
}

.hm-nav__count {
	padding: 3px 8px;
	border-radius: 11px;
	background: var(--hm-sky);
	color: var(--hm-white);
	font-size: 0.8125rem;
	font-weight: 700;
}

.hm-nav__toggle {
	display: grid;
	place-items: center;
	width: 22px;
	height: 22px;
	margin-right: 12px;
	padding: 0;
	border: 0;
	border-radius: 11px;
	background: rgba(61, 133, 251, 0.28);
	cursor: pointer;
}

.hm-nav__toggle img {
	transition: transform 0.2s ease;
}

.hm-nav__toggle[aria-expanded="true"] img {
	transform: rotate(180deg);
}

.hm-nav__sub {
	display: none;
	margin: 0;
	padding: 0.5rem 0;
	list-style: none;
	background: var(--hm-navy);
}

.hm-nav__item.is-open > .hm-nav__sub {
	display: block;
}

.hm-nav__sub a {
	display: block;
	padding: 0.625rem 1.25rem;
	color: var(--hm-paper);
	font-size: 1rem;
	font-weight: 500;
	text-decoration: none;
}

.hm-nav__sub a:hover,
.hm-nav__sub a:focus-visible,
.hm-nav__sub a[aria-current] {
	color: var(--hm-sky-light);
	background: rgba(255, 255, 255, 0.06);
}

.hm-nav__cta.hm-btn {
	min-height: 48px;
	white-space: nowrap;
}

.hm-nav__cta.hm-btn > span:first-child {
	padding: 0 0.75rem 0 1.5rem;
}

.hm-nav__cta .hm-btn__arrow {
	flex-basis: 40px;
	min-height: 48px;
	background-color: transparent;
}

.hm-nav__burger {
	display: none;
	width: 48px;
	height: 48px;
	padding: 0;
	border: 0;
	background: transparent;
	cursor: pointer;
}

.hm-nav__burger-lines,
.hm-nav__burger-lines::before,
.hm-nav__burger-lines::after {
	display: block;
	width: 26px;
	height: 2px;
	margin-inline: auto;
	background: var(--hm-paper);
	transition: transform 0.2s ease, opacity 0.2s ease;
}

.hm-nav__burger-lines {
	position: relative;
}

.hm-nav__burger-lines::before,
.hm-nav__burger-lines::after {
	content: "";
	position: absolute;
	left: 0;
}

.hm-nav__burger-lines::before {
	top: -8px;
}

.hm-nav__burger-lines::after {
	top: 8px;
}

.hm-nav__burger[aria-expanded="true"] .hm-nav__burger-lines {
	background: transparent;
}

.hm-nav__burger[aria-expanded="true"] .hm-nav__burger-lines::before {
	transform: translateY(8px) rotate(45deg);
}

.hm-nav__burger[aria-expanded="true"] .hm-nav__burger-lines::after {
	transform: translateY(-8px) rotate(-45deg);
}

/* Desktop dropdowns */
@media (min-width: 1200px) {
	.hm-nav__sub {
		position: absolute;
		top: 100%;
		left: 0;
		min-width: 15rem;
		padding-top: 0.75rem;
		box-shadow: 0 16px 20px rgba(var(--hm-navy-rgb), 0.28);
	}

	.hm-nav__item.has-children:hover > .hm-nav__sub,
	.hm-nav__item.has-children:focus-within > .hm-nav__sub {
		display: block;
	}
}

@media (min-width: 1200px) and (max-width: 1439.98px) {
	.hm-nav__list {
		gap: 0;
	}

	.hm-nav__link {
		padding-inline: 8px;
	}
}

/* Mobile / tablet */
@media (max-width: 1199.98px) {
	.hm-nav__burger {
		display: block;
	}

	.hm-nav__panel {
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		display: none;
		flex-direction: column;
		align-items: stretch;
		max-height: calc(100vh - 120px);
		overflow-y: auto;
		padding: 0.5rem 1rem 1.5rem;
		background: var(--hm-navy);
		box-shadow: 0 16px 20px rgba(var(--hm-navy-rgb), 0.28);
	}

	.hm-nav__panel.is-open {
		display: flex;
	}

	.hm-nav__list {
		flex-direction: column;
		align-items: stretch;
		gap: 0;
	}

	.hm-nav__item {
		flex-wrap: wrap;
		justify-content: space-between;
		border-bottom: 1px solid rgba(248, 246, 236, 0.12);
	}

	.hm-nav__link {
		padding: 1rem 0.25rem;
		font-size: 1.125rem;
	}

	.hm-nav__toggle {
		width: 40px;
		height: 40px;
		margin-right: 0;
		border-radius: 20px;
	}

	.hm-nav__sub {
		flex-basis: 100%;
		padding: 0 0 0.75rem 0.75rem;
	}

	.hm-nav__cta.hm-btn {
		align-self: flex-start;
		margin-top: 1rem;
	}
}

/* --------------------------------------------------------------------------
 * Footer
 * ----------------------------------------------------------------------- */
.site-main {
	padding-bottom: clamp(3rem, 6vw, 6rem);
}

.hm-footer {
	position: relative;
	overflow: hidden;
	padding: clamp(4.5rem, 9vw, 170px) 0 0;
	border-top: 0;
	background: var(--hm-navy);
	color: var(--hm-paper);
	font-size: 1rem;
	line-height: 1.5;
}

.hm-footer__roof {
	position: absolute;
	top: -2px;
	left: -1px;
	width: calc(100% + 2px);
	max-width: none;
	height: auto;
	pointer-events: none;
}

.hm-footer__inner {
	position: relative;
	width: min(var(--hm-content), 100% - 2 * var(--hm-gutter));
	margin-inline: auto;
}

.hm-footer__cols {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 3rem 3.75rem;
}

.hm-footer__brand {
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
	max-width: 320px;
}

.hm-footer__brand p {
	margin: 0;
}

.hm-footer__tagline {
	font-size: 1.5rem;
	font-weight: 800;
	line-height: 1.25;
	letter-spacing: -0.01em;
}

.hm-footer__info {
	display: flex;
	flex-wrap: wrap;
	gap: 2.5rem 3.75rem;
}

.hm-footer__col {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.hm-footer__col > p {
	margin: 0;
}

.hm-footer__heading {
	margin: 0 0 0.5rem;
	font-family: var(--hm-font-body);
	font-size: 0.9375rem;
	font-weight: 500;
	line-height: 1.2;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--hm-sky-light);
}

.hm-footer__heading--some {
	margin-top: 0.625rem;
	margin-bottom: 0;
}

.hm-footer__list {
	display: flex;
	flex-direction: column;
	gap: 0.625rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.hm-footer__list li {
	display: flex;
	align-items: flex-start;
	gap: 0.625rem;
}

.hm-footer__list img {
	flex-shrink: 0;
	margin-top: 4px;
}

.hm-footer__list li.is-strong {
	font-size: 1.125rem;
	font-weight: 700;
}

.hm-footer__list address {
	margin: 0;
	font-style: normal;
}

.hm-footer a {
	color: var(--hm-paper);
	text-decoration: none;
}

.hm-footer a:hover,
.hm-footer a:focus-visible {
	color: var(--hm-sky-light);
	text-decoration: underline;
}

.hm-footer__menu li {
	align-items: center;
}

.hm-footer__menu img {
	margin-top: 0;
}

.hm-footer__some {
	display: flex;
	gap: 10px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.hm-footer__bottom {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1rem 2rem;
	margin-top: 3.5rem;
	padding-top: 1.375rem;
	border-top: 1px solid rgba(247, 245, 237, 0.25);
	font-size: 0.875rem;
	line-height: 1.4;
}

.hm-footer__legal {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1.75rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.hm-footer__copy,
.hm-footer__credit > span {
	opacity: 0.85;
}

.hm-footer__legal a,
.hm-footer__credit a {
	color: var(--hm-sky-light);
	font-weight: 600;
}

.hm-footer__credit {
	display: flex;
	gap: 6px;
	margin: 0;
}

.hm-footer__wordmark {
	display: flex;
	align-items: center;
	gap: clamp(0.75rem, 2vw, 40px);
	height: clamp(3rem, 7vw, 135px);
	margin-top: clamp(3rem, 6vw, 110px);
	padding-left: clamp(0.5rem, 2vw, 41px);
	overflow: hidden;
	white-space: nowrap;
}

.hm-footer__wordmark img {
	width: clamp(80px, 14vw, 272px);
	height: auto;
	align-self: flex-start;
}

.hm-footer__wordmark span {
	align-self: flex-start;
	font-family: var(--hm-font-display);
	font-size: clamp(3.5rem, 11vw, 211px);
	line-height: 0.8;
	letter-spacing: -0.02em;
	text-transform: uppercase;
	background: linear-gradient(to bottom, rgba(61, 133, 251, 0.55), rgba(61, 133, 251, 0.06));
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

/* --------------------------------------------------------------------------
 * Accessibility
 * ----------------------------------------------------------------------- */
:focus-visible {
	outline: 3px solid var(--hm-sky);
	outline-offset: 2px;
}

.hm-section--dark :focus-visible,
.hm-footer :focus-visible,
.hm-nav :focus-visible {
	outline-color: var(--hm-sky-light);
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		transition: none !important;
		animation: none !important;
	}
}

/* --------------------------------------------------------------------------
 * Layout helpers (Twig templates)
 * ----------------------------------------------------------------------- */
.hm-wrap {
	width: min(var(--hm-content), 100% - 2 * var(--hm-gutter));
	margin-inline: auto;
}

.hm-narrow {
	max-width: 48rem;
}

.hm-headrow {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 1rem 2rem;
	margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
}

.hm-headrow h2 {
	margin: 0;
}

.hm-round {
	display: inline-grid;
	place-items: center;
	width: 48px;
	height: 48px;
	padding: 0;
	border: 1.5px solid var(--hm-navy);
	border-radius: 50%;
	background: var(--hm-navy);
	cursor: pointer;
}

.hm-round--outline {
	background: transparent;
}

.hm-round:disabled {
	opacity: 0.35;
	cursor: default;
}

.hm-editor-note {
	padding: 1rem 1.25rem;
	border: 2px dashed var(--hm-sky);
	background: var(--hm-white);
	font-size: 1rem;
}

/* Breadcrumbs */
.hm-crumbs ol {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem 0.625rem;
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 0.9375rem;
}

.hm-crumbs li {
	display: inline-flex;
	align-items: center;
	gap: 0.625rem;
}

.hm-crumbs li + li::before {
	content: "";
	width: 14px;
	height: 14px;
	background: url("../img/ikoni-murupolku.svg") center / contain no-repeat;
}

.hm-crumbs a {
	opacity: 0.75;
	text-decoration: none;
}

.hm-crumbs a:hover,
.hm-crumbs a:focus-visible {
	opacity: 1;
	text-decoration: underline;
}

/* --------------------------------------------------------------------------
 * Hero search [hm_haku]
 * ----------------------------------------------------------------------- */
.hm-search {
	width: min(1120px, 100%);
	margin-inline: auto;
}

.hm-search__tabs {
	display: inline-flex;
	flex-wrap: wrap;
	gap: 4px;
	margin: 0;
	padding: 8px 8px 0;
	list-style: none;
	background: var(--hm-navy);
}

.hm-search__tab {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 16px 24px 16px 22px;
	color: var(--hm-paper);
	font-size: 1.125rem;
	font-weight: 600;
	text-decoration: none;
}

.hm-search__tab img {
	filter: brightness(0) invert(1);
}

a.hm-search__tab:hover,
a.hm-search__tab:focus-visible {
	color: var(--hm-sky-light);
}

.hm-search__tab.is-active {
	padding-bottom: 18px;
	background: var(--hm-white);
	color: var(--hm-navy);
	font-weight: 700;
	box-shadow: inset 0 3px 0 var(--hm-sky);
}

.hm-search__tab.is-active img {
	filter: none;
}

.hm-search__form {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 16px;
	padding: 28px 32px 32px;
	background: var(--hm-white);
	box-shadow: 0 18px 44px rgba(var(--hm-navy-rgb), 0.14);
}

.hm-field {
	display: flex;
	flex-direction: column;
	gap: 8px;
	min-width: 0;
}

.hm-field--grow {
	flex: 1 1 260px;
}

.hm-field--type {
	flex: 0 1 220px;
}

.hm-field--price {
	flex: 0 1 180px;
}

.hm-field label {
	font-size: 0.875rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.hm-field__control {
	position: relative;
	display: flex;
	align-items: center;
	gap: 12px;
	padding-left: 16px;
	border: 1px solid var(--hm-grey);
	background: var(--hm-paper);
}

.hm-field__control:focus-within {
	outline: 3px solid var(--hm-sky);
	outline-offset: 1px;
}

.hm-field__control input,
.hm-field__control select {
	flex: 1;
	min-width: 0;
	padding: 16px 16px 16px 0;
	border: 0;
	background: transparent;
	color: var(--hm-navy);
	font: inherit;
	font-size: 1rem;
	outline: none;
	appearance: none;
}

.hm-field__control input::placeholder {
	color: rgba(var(--hm-navy-rgb), 0.7);
}

.hm-field__control--select::after {
	content: "";
	position: absolute;
	right: 14px;
	width: 14px;
	height: 14px;
	background: url("../img/ikoni-avaa.svg") center / contain no-repeat;
	pointer-events: none;
}

.hm-field__control select {
	padding-right: 36px;
	cursor: pointer;
}

@media (max-width: 767.98px) {
	.hm-search__tabs {
		display: flex;
	}

	.hm-search__tab {
		padding: 12px 14px;
		font-size: 1rem;
	}

	.hm-search__form {
		padding: 20px;
	}

	.hm-field,
	.hm-search__form .hm-btn {
		flex: 1 1 100%;
	}

	.hm-search__form .hm-btn > span:first-child {
		flex: 1;
	}
}

/* Hero: search overlaps the bottom of the roof image.
   .elementor .e-con.x beats Elementor's own .e-con margin/position rules. */
.hm-hero-search,
.elementor .e-con.hm-hero-search {
	position: relative;
	z-index: 2;
	margin-top: clamp(-180px, -8vw, -48px);
}

/* --------------------------------------------------------------------------
 * Agents [hm_valittajat]
 * ----------------------------------------------------------------------- */
.hm-agent {
	display: flex;
	flex-direction: column;
	width: 304px;
	height: 100%;
}

.hm-agent__media {
	display: block;
	aspect-ratio: 304 / 420;
	background: #c9c9c9;
	clip-path: polygon(0 9%, 50% 0, 100% 9%, 100% 100%, 0 100%);
}

.hm-agent__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center top;
	transition: transform 0.4s ease;
}

.hm-agent:hover .hm-agent__media img {
	transform: scale(1.03);
}

.hm-agent__body {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 22px 24px 28px;
	background: var(--hm-white);
}

.hm-agent__name {
	margin: 0;
	font-family: var(--hm-font-body);
	font-size: 1.5rem;
	font-weight: 800;
	line-height: 1.25;
	letter-spacing: -0.01em;
	text-transform: none;
}

.hm-agent__name a {
	text-decoration: none;
}

.hm-agent__name a:hover,
.hm-agent__name a:focus-visible {
	text-decoration: underline;
}

.hm-agent__title {
	min-height: 3em;
	margin: 0;
	font-size: 1rem;
	line-height: 1.5;
}

.hm-agent__phone {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-top: 0.75rem;
	font-size: 1.125rem;
	font-weight: 700;
	text-decoration: none;
}

.hm-agents {
	position: relative;
}

.hm-agents__track {
	display: flex;
	gap: 28px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.hm-agents--ruudukko .hm-agents__track {
	flex-wrap: wrap;
	justify-content: center;
}

.hm-agents--karuselli .hm-agents__viewport {
	overflow: hidden;
	-webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
	mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}

.hm-agents--karuselli .hm-agents__track {
	width: max-content;
	animation: hm-marquee var(--hm-marquee-duration, 60s) linear infinite;
}

.hm-agents--karuselli:hover .hm-agents__track,
.hm-agents--karuselli:focus-within .hm-agents__track,
.hm-agents--karuselli.is-paused .hm-agents__track {
	animation-play-state: paused;
}

.hm-agents__controls {
	display: flex;
	justify-content: flex-end;
	width: min(var(--hm-content), 100% - 2 * var(--hm-gutter));
	margin: 1.25rem auto 0;
}

.hm-agents__pause {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.5rem 0.875rem;
	border: 1.5px solid var(--hm-navy);
	background: transparent;
	color: var(--hm-navy);
	font: inherit;
	font-size: 0.875rem;
	font-weight: 600;
	cursor: pointer;
}

.hm-agents__pause:hover {
	background: var(--hm-navy);
	color: var(--hm-paper);
}

.hm-agents__pause-icon {
	width: 10px;
	height: 12px;
	border-inline: 3px solid currentColor;
}

.hm-agents__pause[aria-pressed="true"] .hm-agents__pause-icon {
	border: 0;
	border-left: 10px solid currentColor;
	border-block: 6px solid transparent;
}

@keyframes hm-marquee {
	to {
		transform: translateX(calc(-50% - 14px));
	}
}

@media (prefers-reduced-motion: reduce) {
	.hm-agents--karuselli .hm-agents__viewport {
		overflow-x: auto;
		-webkit-mask-image: none;
		mask-image: none;
	}

	.hm-agents__controls {
		display: none;
	}
}

/* Elementor section that holds the carousel: full bleed */
.hm-bleed {
	--padding-left: 0;
	--padding-right: 0;
}

.hm-section--sand .hm-agents {
	margin-top: 1rem;
}

/* --------------------------------------------------------------------------
 * Agent page
 * ----------------------------------------------------------------------- */
.hm-person__hero {
	padding-block: clamp(2.5rem, 5vw, 80px) clamp(3rem, 7vw, 110px);
}

.hm-person__grid {
	display: grid;
	grid-template-columns: minmax(0, 520px) minmax(0, 1fr);
	align-items: center;
	gap: clamp(2rem, 6vw, 100px);
}

.hm-person__photo {
	aspect-ratio: 520 / 700;
	background: #c9c9c9;
}

.hm-person__photo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center top;
}

.hm-person__text {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 26px;
}

.hm-person__role {
	margin: 0;
	color: var(--hm-sky-text);
	font-weight: 700;
}

.hm-person__name {
	margin: 0;
	font-size: clamp(3.5rem, 2rem + 5vw, 6.875rem);
	letter-spacing: -0.025em;
}

.hm-person__intro p {
	margin: 0;
	font-size: 1.25rem;
}

.hm-person__contact {
	display: flex;
	flex-direction: column;
	gap: 14px;
	width: 100%;
	margin: 0;
	padding: 24px 28px;
	list-style: none;
	background: var(--hm-white);
}

.hm-person__contact li {
	display: flex;
	align-items: center;
	gap: 14px;
	min-width: 0;
}

.hm-person__contact a {
	overflow-wrap: anywhere;
	font-size: 1.25rem;
	font-weight: 700;
	text-decoration: none;
}

.hm-person__contact a:hover,
.hm-person__contact a:focus-visible {
	text-decoration: underline;
}

.hm-person__icon {
	display: grid;
	flex: 0 0 40px;
	place-items: center;
	height: 40px;
	background: var(--hm-sky);
}

.hm-person__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
}

.hm-person__more {
	padding-bottom: clamp(3rem, 6vw, 5rem);
}

.hm-person__others {
	padding-block: clamp(4rem, 8vw, 120px);
}

@media (max-width: 991.98px) {
	.hm-person__grid {
		grid-template-columns: 1fr;
	}

	.hm-person__photo {
		max-width: 420px;
	}
}

/* Testimonials slider */
.hm-quotes {
	padding-block: clamp(4rem, 8vw, 120px);
	background: var(--hm-white);
}

.hm-quotes__nav {
	display: flex;
	align-items: center;
	gap: 10px;
}

.hm-quotes__count {
	margin: 0 14px 0 0;
	font-size: 1rem;
	font-weight: 700;
}

.hm-quotes__track {
	display: grid;
	grid-auto-columns: calc((100% - 48px) / 3);
	grid-auto-flow: column;
	gap: 24px;
	margin: 0;
	padding: 0;
	overflow-x: auto;
	list-style: none;
	scroll-behavior: smooth;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
}

.hm-quotes__track::-webkit-scrollbar {
	display: none;
}

.hm-quote {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 20px;
	padding: 36px;
	background: var(--hm-paper);
	scroll-snap-align: start;
}

.hm-quote blockquote {
	margin: 0;
	font-size: 1.1875rem;
}

.hm-quote__author {
	margin: 0;
	padding-top: 20px;
	border-top: 3px solid var(--hm-sky);
	font-size: 1rem;
	font-weight: 700;
}

@media (max-width: 991.98px) {
	.hm-quotes__track {
		grid-auto-columns: calc((100% - 24px) / 2);
	}
}

@media (max-width: 575.98px) {
	.hm-quotes__track {
		grid-auto-columns: 88%;
	}
}

/* --------------------------------------------------------------------------
 * Front page sections (Elementor + CSS classes)
 * ----------------------------------------------------------------------- */

/* Steps: Text Editor with an ordered list, class hm-steps */
.hm-steps ol {
	position: relative;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
	grid-auto-flow: column;
	margin: 0;
	padding: 0;
	list-style: none;
	counter-reset: hm-step;
}

.hm-steps ol::before {
	content: "";
	position: absolute;
	top: 27px;
	left: 10%;
	right: 10%;
	height: 2px;
	background: #b2b8c7;
}

.hm-steps li {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 16px;
	padding-inline: 0.5rem;
	font-size: 1.125rem;
	font-weight: 700;
	text-align: center;
	counter-increment: hm-step;
}

.hm-steps li::before {
	content: counter(hm-step);
	display: grid;
	place-items: center;
	width: 56px;
	height: 56px;
	border: 2px solid var(--hm-navy);
	border-radius: 50%;
	background: var(--hm-paper);
	font-family: var(--hm-font-display);
	font-size: 1.75rem;
	font-weight: 400;
	line-height: 1;
}

.hm-steps li:first-child::before {
	border-color: var(--hm-sky);
	background: var(--hm-sky);
}

@media (max-width: 767.98px) {
	.hm-steps ol {
		grid-auto-flow: row;
		grid-template-columns: 1fr;
		gap: 1.25rem;
	}

	.hm-steps ol::before {
		top: 28px;
		bottom: 28px;
		left: 27px;
		right: auto;
		width: 2px;
		height: auto;
	}

	.hm-steps li {
		flex-direction: row;
		padding-inline: 0;
		text-align: left;
	}
}

/* Banner with a floating card (Kokonaispalvelu) */
.hm-valley img,
.hm-valley {
	clip-path: polygon(0 5.2%, 37.2% 15.8%, 100% 7%, 100% 100%, 0 100%);
}

.elementor .e-con.hm-floatcard {
	position: relative;
	z-index: 1;
	width: auto;
	margin: -60px var(--hm-gutter) 0;
}

@media (min-width: 992px) {
	.elementor .e-con.hm-banner > .e-con-inner {
		position: relative;
	}

	.elementor .e-con.hm-floatcard {
		position: absolute;
		top: 28%;
		right: 12%;
		width: min(500px, 40%);
		margin: 0;
	}
}

/* Path cards ("Mitä olet tekemässä?") */
.hm-pathcard .hm-pathcard__icon,
.hm-pathcard__icon {
	display: grid;
	place-items: center;
	width: 60px;
	height: 60px;
	margin-bottom: 6px;
	background: var(--hm-sky);
}

.hm-pathcard__icon img {
	width: 30px;
	height: 30px;
}

/* CTA banner: dark tint comes from the container's background overlay */

/* FAQ [hm_ukk] */
.hm-ukk {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.hm-ukk__item {
	border-left: 4px solid transparent;
	background: var(--hm-white);
}

.hm-ukk__item.is-open {
	border-left-color: var(--hm-sky);
}

.hm-ukk__q {
	margin: 0;
	font-family: var(--hm-font-body);
	font-size: clamp(1.25rem, 1.1rem + 0.5vw, 1.5rem);
	font-weight: 800;
	line-height: 1.25;
	letter-spacing: -0.01em;
	text-transform: none;
}

.hm-ukk__q button {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	width: 100%;
	padding: 26px 24px 26px 28px;
	border: 0;
	background: transparent;
	color: var(--hm-navy);
	font: inherit;
	text-align: left;
	cursor: pointer;
}

.hm-ukk__icon {
	display: grid;
	flex: 0 0 46px;
	place-items: center;
	height: 46px;
	border: 1.5px solid var(--hm-navy);
	border-radius: 50%;
}

.hm-ukk__icon::before {
	content: "";
	width: 22px;
	height: 22px;
	background: url("../img/ukk-kiinni.svg") center / contain no-repeat;
}

.hm-ukk__q button[aria-expanded="true"] .hm-ukk__icon {
	border-color: var(--hm-sky);
	background: var(--hm-sky);
}

.hm-ukk__q button[aria-expanded="true"] .hm-ukk__icon::before {
	background-image: url("../img/ukk-auki.svg");
}

.hm-ukk__a {
	padding: 0 24px 32px 28px;
	margin-top: -12px;
}

.hm-ukk__a > :last-child {
	margin-bottom: 0;
}

/* Dark contact card overlapping the FAQ image */
.hm-callcard,
.elementor .e-con.hm-callcard {
	position: relative;
	z-index: 1;
	width: auto;
	margin: -190px 0 0 80px;
	padding: 28px 32px 30px;
	background: var(--hm-navy);
	color: var(--hm-paper);
}

.hm-callcard a.hm-callcard__phone {
	display: inline-flex;
	align-items: center;
	gap: 16px;
	color: var(--hm-paper);
	font-family: var(--hm-font-display);
	font-size: clamp(2.25rem, 1.8rem + 1.4vw, 3.25rem);
	line-height: 1;
	text-decoration: none;
}

.hm-callcard p {
	margin: 0.875rem 0;
	font-size: 1rem;
}

.hm-callcard .hm-eyebrow {
	color: var(--hm-sky-light);
}

@media (max-width: 767.98px) {
	.elementor .e-con.hm-callcard {
		margin: -80px 0 0 1rem;
	}
}

/* Partner logos */
.hm-partners {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 16px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.hm-partners__item {
	display: grid;
	place-items: center;
	width: 168px;
	height: 72px;
	padding: 12px 20px;
	background: var(--hm-white);
}

.hm-partners__item img {
	max-height: 40px;
	width: auto;
}

/* Listing cards [hm_kohteet] */
.hm-listings {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
	gap: 28px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.hm-listing {
	height: 100%;
	padding: 12px 12px 20px;
	background: var(--hm-white);
}

.hm-listing__media {
	position: relative;
	display: block;
	aspect-ratio: 388 / 260;
	overflow: hidden;
}

.hm-listing__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.hm-listing__badge {
	position: absolute;
	top: 12px;
	left: 12px;
	padding: 6px 12px;
	background: var(--hm-navy);
	color: var(--hm-paper);
	font-size: 0.875rem;
}

.hm-listing__body {
	padding: 16px 8px 0;
}

.hm-listing__area {
	margin: 0;
	font-size: 0.8125rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.hm-listing__title {
	margin: 4px 0 10px;
	font-family: var(--hm-font-body);
	font-size: 1.25rem;
	font-weight: 800;
	line-height: 1.25;
	text-transform: none;
}

.hm-listing__title a {
	text-decoration: none;
}

.hm-listing__facts {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 0 0 14px;
	padding: 0;
	list-style: none;
	font-size: 0.8125rem;
}

.hm-listing__facts li {
	padding: 3px 8px;
	border: 1px solid var(--hm-grey);
}

.hm-listing__price {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	margin: 0;
	padding-top: 12px;
	border-top: 1px solid var(--hm-grey);
	font-size: 0.9375rem;
}

/* --------------------------------------------------------------------------
 * Listing search [hm_kohdehaku]
 * ----------------------------------------------------------------------- */
.hm-finder__form {
	padding: 24px;
}

.hm-field--num {
	flex: 0 1 140px;
}

.hm-field--num .hm-field__control {
	padding-left: 0;
}

.hm-field--num .hm-field__control input {
	padding-left: 16px;
}

.hm-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 24px 0 0;
	padding: 0;
	list-style: none;
}

.hm-chip {
	display: inline-block;
	padding: 8px 18px;
	border: 1.5px solid var(--hm-navy);
	border-radius: 999px;
	font-size: 0.9375rem;
	text-decoration: none;
}

.hm-chip:hover,
.hm-chip:focus-visible,
.hm-chip.is-active {
	background: var(--hm-navy);
	color: var(--hm-paper);
}

.hm-results {
	margin-top: clamp(3rem, 6vw, 5rem);
}

.hm-results__head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: 24px;
}

.hm-results__title {
	margin: 0;
	font-size: clamp(2rem, 1.6rem + 1vw, 2.5rem);
}

.hm-results__title span {
	margin-left: 0.5rem;
	color: var(--hm-sky-text);
	font-family: var(--hm-font-body);
	font-size: 1rem;
	font-weight: 700;
	text-transform: none;
}

.hm-results__tools {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 1rem 1.5rem;
}

.hm-results__tools select {
	padding: 10px 14px;
	border: 1px solid var(--hm-grey);
	background: var(--hm-paper);
	color: var(--hm-navy);
	font: inherit;
	font-size: 0.9375rem;
}

.hm-results__per {
	display: flex;
	align-items: center;
	gap: 6px;
	margin: 0;
	font-size: 0.9375rem;
}

.hm-results__per a {
	padding: 6px 10px;
	text-decoration: none;
}

.hm-results__per a.is-active {
	background: var(--hm-navy);
	color: var(--hm-paper);
}

.hm-results__empty {
	padding: 2rem;
	background: var(--hm-white);
}

.hm-pager ul {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: 8px;
	margin: 40px 0 0;
	padding: 0;
	list-style: none;
}

.hm-pager a {
	display: grid;
	place-items: center;
	min-width: 44px;
	height: 44px;
	padding: 0 8px;
	background: var(--hm-white);
	font-weight: 700;
	text-decoration: none;
}

.hm-pager a.is-active {
	background: var(--hm-navy);
	color: var(--hm-paper);
}

.hm-pager a.hm-pager__step--next {
	background: var(--hm-sky);
}

/* --------------------------------------------------------------------------
 * Single listing (/kohde/<uuid>/)
 * ----------------------------------------------------------------------- */
.hm-kohde__head {
	padding-block: clamp(2rem, 4vw, 48px) clamp(3rem, 6vw, 80px);
}

.hm-kohde__topline,
.hm-kohde__titlerow {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	justify-content: space-between;
	gap: 1rem 2rem;
}

.hm-kohde__back {
	font-size: 0.9375rem;
	font-weight: 700;
	text-decoration: none;
}

.hm-kohde__back::before {
	content: "← ";
	color: var(--hm-sky-text);
}

.hm-kohde__titlerow {
	margin: 24px 0 28px;
}

.hm-kohde__badge {
	display: inline-block;
	margin: 0 0 14px;
	padding: 6px 12px;
	background: var(--hm-sky);
	color: var(--hm-navy);
	font-size: 0.875rem;
	font-weight: 700;
}

.hm-kohde__title {
	margin: 0;
	font-size: clamp(2.25rem, 1.6rem + 2.4vw, 4rem);
}

.hm-kohde__meta {
	margin: 12px 0 0;
	font-size: 1rem;
}

.hm-kohde__pricebox {
	padding: 20px 28px;
	background: var(--hm-navy);
	color: var(--hm-paper);
	font-size: 0.875rem;
}

.hm-kohde__pricebox p {
	margin: 0;
}

.hm-kohde__price {
	font-family: var(--hm-font-display);
	font-size: clamp(2.25rem, 1.8rem + 1.4vw, 3.25rem);
	line-height: 1.1;
}

/* Gallery: big image + 2×2 thumbnails */
.hm-gallery {
	display: grid;
	grid-template-columns: 2fr 1fr 1fr;
	grid-template-rows: repeat(2, minmax(0, 1fr));
	gap: 8px;
	aspect-ratio: 1300 / 580;
}

.hm-gallery__item {
	position: relative;
	display: block;
	overflow: hidden;
	background: var(--hm-grey);
}

.hm-gallery__item--main {
	grid-row: span 2;
}

.hm-gallery__item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.4s ease;
}

.hm-gallery__item:hover img {
	transform: scale(1.03);
}

.hm-gallery__count {
	position: absolute;
	top: 12px;
	left: 12px;
	padding: 4px 10px;
	background: var(--hm-navy);
	color: var(--hm-paper);
	font-size: 0.8125rem;
}

.hm-gallery__more {
	position: absolute;
	inset: 0;
	display: grid;
	place-items: center;
	padding: 1rem;
	background: rgba(var(--hm-navy-rgb), 0.82);
	color: var(--hm-paper);
	font-weight: 700;
	text-align: center;
}

@media (max-width: 767.98px) {
	.hm-gallery {
		grid-template-columns: 1fr 1fr;
		grid-template-rows: auto;
		aspect-ratio: auto;
	}

	.hm-gallery__item--main {
		grid-column: span 2;
		grid-row: auto;
		aspect-ratio: 4 / 3;
	}

	.hm-gallery__item:not(.hm-gallery__item--main) {
		aspect-ratio: 4 / 3;
	}
}

.hm-lightbox {
	width: min(1200px, 100vw - 2rem);
	max-height: 92vh;
	padding: 0;
	border: 0;
	background: var(--hm-navy);
}

.hm-lightbox::backdrop {
	background: rgba(0, 0, 0, 0.85);
}

.hm-lightbox__close {
	position: sticky;
	top: 0;
	z-index: 1;
	display: block;
	margin-left: auto;
	padding: 12px 20px;
	border: 0;
	background: var(--hm-sky);
	color: var(--hm-navy);
	font: inherit;
	font-weight: 700;
	cursor: pointer;
}

.hm-lightbox__list {
	display: grid;
	gap: 8px;
	margin: 0;
	padding: 8px;
	list-style: none;
}

.hm-lightbox__list img {
	width: 100%;
	height: auto;
}

/* Body */
.hm-kohde__body {
	padding-block: clamp(3rem, 6vw, 80px);
	background: var(--hm-white);
}

.hm-kohde__grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 420px;
	align-items: start;
	gap: clamp(2rem, 4vw, 60px);
}

@media (max-width: 991.98px) {
	.hm-kohde__grid {
		grid-template-columns: 1fr;
	}
}

.hm-kohde__facts {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0 0 32px;
	padding: 0;
	list-style: none;
}

.hm-kohde__facts li {
	display: flex;
	flex-direction: column;
	padding: 10px 16px;
	background: var(--hm-paper);
	font-size: 0.8125rem;
}

.hm-kohde__facts strong {
	font-size: 1rem;
}

.hm-kohde__heading {
	margin: 0 0 20px;
	font-size: clamp(2rem, 1.6rem + 1vw, 2.5rem);
}

.hm-kohde__text {
	margin-bottom: 32px;
}

.hm-facts {
	margin-bottom: 16px;
}

.hm-facts summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 20px;
	background: var(--hm-navy);
	color: var(--hm-paper);
	font-family: var(--hm-font-display);
	font-size: 1.75rem;
	line-height: 1;
	text-transform: uppercase;
	cursor: pointer;
	list-style: none;
}

.hm-facts summary::-webkit-details-marker {
	display: none;
}

.hm-facts summary::after {
	content: "+";
	font-family: var(--hm-font-body);
	font-size: 1.25rem;
}

.hm-facts[open] summary::after {
	content: "–";
}

.hm-facts table,
.hm-kohde__prices {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.9375rem;
}

.hm-facts th,
.hm-facts td {
	padding: 12px 20px;
	vertical-align: top;
	text-align: left;
}

.hm-facts th {
	width: 38%;
	font-weight: 700;
}

.hm-facts tr:nth-child(odd) {
	background: var(--hm-paper);
}

.hm-kohde__side {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.hm-kohde__agent {
	padding: 24px;
	background: var(--hm-paper);
}

.hm-kohde__agenthead {
	display: flex;
	gap: 16px;
	margin-bottom: 16px;
}

.hm-kohde__agenthead img {
	width: 80px;
	height: 100px;
	object-fit: cover;
}

.hm-kohde__agenthead p {
	margin: 0;
}

.hm-kohde__agentname {
	font-family: var(--hm-font-display);
	font-size: 1.75rem;
	line-height: 1.1;
	text-transform: uppercase;
}

.hm-kohde__agent .hm-footer__list a {
	color: var(--hm-navy);
}

.hm-kohde__agent .hm-footer__list li {
	font-size: 1rem;
}

.hm-invert {
	filter: brightness(0) saturate(100%) invert(9%) sepia(39%) saturate(3000%) hue-rotate(215deg);
}

.hm-kohde__cta.hm-btn {
	display: flex;
	margin-top: 20px;
}

.hm-kohde__cta.hm-btn > span:first-child {
	flex: 1;
}

.hm-kohde__showing {
	padding: 20px 24px;
	background: var(--hm-navy);
	color: var(--hm-paper);
}

.hm-kohde__showing p {
	margin: 0;
}

.hm-kohde__showingtitle {
	font-family: var(--hm-font-display);
	font-size: 1.75rem;
	text-transform: uppercase;
}

.hm-kohde__prices {
	background: var(--hm-paper);
}

.hm-kohde__prices th,
.hm-kohde__prices td {
	padding: 12px 20px;
	border-bottom: 1px solid var(--hm-grey);
	text-align: left;
}

.hm-kohde__prices th {
	font-weight: 400;
}

.hm-kohde__prices td {
	font-weight: 700;
	text-align: right;
}

.hm-kohde__more {
	padding-block: clamp(4rem, 8vw, 120px);
}

.hm-w-760 {
	max-width: 760px;
}

.hm-lead-sm p {
	font-size: clamp(1.125rem, 1rem + 0.4vw, 1.375rem);
	line-height: 1.5;
}

.hm-h3 .elementor-heading-title,
h2.hm-h3 {
	font-size: clamp(2rem, 1.5rem + 1.6vw, 2.75rem);
}

.elementor-widget-heading h1.elementor-heading-title {
	font-size: clamp(3rem, 1.8rem + 4.6vw, 6.25rem);
	letter-spacing: -0.025em;
}

.elementor-widget-heading.hm-display h1.elementor-heading-title {
	font-size: clamp(3.25rem, 1.6rem + 6vw, 8rem);
}
