/* Property cards, photo slider, region filter, popup and map (Figma "Portfolio", "Separate Property Page Template"). */

.sp-props,
.sp-dialog {
	--sp-navy: #12233b;
	--sp-red: #c8102e;
	--sp-text: rgba(0, 0, 0, 0.8);
	--sp-muted: rgba(0, 0, 0, 0.41);
	--sp-line: rgba(0, 0, 0, 0.12);
	font-family: "Source Sans 3", sans-serif;
}

/* Hello Elementor paints every button pink on hover and focus; our buttons set their own states below. */
.sp-props button:focus,
.sp-dialog button:focus {
	outline: none;
}

.sp-props button:focus-visible,
.sp-dialog button:focus-visible {
	outline: 2px solid var(--sp-navy, #12233b);
	outline-offset: 2px;
}

.sp-prop__open:hover,
.sp-prop__open:focus,
.sp-dialog__close:hover,
.sp-dialog__close:focus {
	background: none;
}

.sp-slider__btn:focus {
	background: transparent;
}

.sp-props__filter button:focus {
	background: #fff;
	color: var(--sp-text);
}

.sp-props__filter button.is-active:focus {
	background: var(--sp-navy);
	color: #fff;
}

/* Region filter */
.sp-props__filter {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 12px;
	margin: 0 0 50px;
}

.sp-props__filter button {
	padding: 11px 21px;
	border: 1px solid rgba(0, 0, 0, 0.2);
	border-radius: 0;
	background: #fff;
	color: var(--sp-text);
	font: 400 18px/26px "Source Sans 3", sans-serif;
	letter-spacing: -0.18px;
	cursor: pointer;
	transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.sp-props__filter button:hover {
	border-color: var(--sp-navy);
	background: #fff;
	color: var(--sp-navy);
}

.sp-props__filter button.is-active {
	border-color: var(--sp-navy);
	background: var(--sp-navy);
	color: #fff;
}

/* Grid of cards */
.sp-props__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 50px 20px;
}

.sp-prop {
	display: flex;
	flex-direction: column;
	gap: 15px;
	cursor: pointer;
}

.sp-prop[hidden] {
	display: none;
}

.sp-prop__body {
	display: flex;
	flex-direction: column;
	gap: 15px;
	margin-top: 4px;
	padding: 0 10px;
}

.sp-prop__title {
	margin: 0;
	font: 500 28px/1.2 "Source Sans 3", sans-serif;
	letter-spacing: -0.28px;
}

.sp-prop__open {
	padding: 0;
	border: 0;
	background: none;
	color: #000;
	font: inherit;
	letter-spacing: inherit;
	text-align: left;
	cursor: pointer;
}

.sp-prop:hover .sp-prop__open {
	color: var(--sp-red);
}

.sp-prop__meta {
	margin: -9px 0 0;
	color: var(--sp-text);
	font-size: 16px;
	letter-spacing: -0.16px;
}

.sp-prop__stats {
	display: flex;
	justify-content: space-between;
	max-width: 326px;
	margin: 0;
}

.sp-prop__stat {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0;
}

.sp-prop__stat img {
	width: 16px;
	height: 16px;
	margin-bottom: 6px;
}

.sp-prop__stat dt {
	color: var(--sp-muted);
	font-size: 14px;
	line-height: 19px;
	font-weight: 400;
	letter-spacing: -0.14px;
}

.sp-prop__stat dd {
	margin: 0;
	color: var(--sp-text);
	font-size: 16px;
	font-weight: 500;
	letter-spacing: -0.16px;
}

.sp-prop__pv {
	display: flex;
	align-items: center;
	gap: 6px;
	margin: -4px 0 0;
	padding-top: 11px;
	border-top: 1px solid var(--sp-line);
	color: var(--sp-text);
	font-size: 16px;
	font-weight: 500;
	letter-spacing: -0.16px;
}

/* Photo slider (cards and popup) */
.sp-slider {
	position: relative;
	overflow: hidden;
	background: #eee;
}

.sp-prop__media {
	height: 350px;
}

.sp-slider__track {
	display: flex;
	height: 100%;
	transition: transform 0.35s ease;
}

.sp-slider__img {
	flex: 0 0 100%;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.sp-slider__count {
	display: none;
}

.sp-slider__btn {
	position: absolute;
	top: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	padding: 0;
	border: 0;
	border-radius: 0;
	/* The Figma chevron icon carries its own 24px translucent square, so the button adds no box of its own. */
	background: transparent;
	cursor: pointer;
	transform: translateY(-50%);
}

.sp-slider__btn img {
	display: block;
	width: 24px;
	height: 24px;
}

/* Hover darkens only the square behind the white arrow. */
.sp-slider__btn {
	transition: background-color 0.2s;
}

.sp-slider__btn:hover {
	background: rgba(0, 0, 0, 0.35);
}

.sp-slider__btn--prev {
	left: 14px;
}

.sp-slider__btn--prev img {
	transform: scaleX(-1);
}

.sp-slider__btn--next {
	right: 14px;
}

/* Home page: arrows under the card on phones */
.sp-props__nav {
	display: none;
}

.sp-props__more {
	display: none;
}

@media (max-width: 1024px) {
	.sp-props__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

/* Home shows three properties: one row of three on tablet instead of two plus one. */
@media (min-width: 768px) and (max-width: 1024px) {
	.sp-props--home .sp-props__grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (max-width: 767px) {
	/* Figma mobile: filter buttons keep their own width, centred, 42px tall */
	.sp-props__filter {
		gap: 13px 12px;
		margin-bottom: 25px;
	}

	.sp-props__filter button {
		min-width: 82px;
		height: 42px;
		padding: 0 23.5px;
		font-size: 16px;
		line-height: 40px;
		letter-spacing: 0;
	}

	.sp-props__grid {
		grid-template-columns: minmax(0, 1fr);
		gap: 20px;
	}

	.sp-prop__media {
		height: 350px;
	}

	.sp-prop__body {
		margin-top: 2px;
	}

	.sp-prop__title {
		font-size: 22px;
	}

	.sp-prop__meta {
		margin-top: -10px;
	}

	.sp-prop__stats {
		margin-top: -2px;
	}

	/* Home: one property at a time, switched with the arrows below */
	.sp-props--home .sp-props__grid {
		display: flex;
		gap: 0;
		overflow: hidden;
	}

	.sp-props--home .sp-prop {
		flex: 0 0 100%;
		transition: transform 0.35s ease;
	}

	.sp-props--home .sp-props__nav {
		display: flex;
		justify-content: center;
		gap: 20px;
		margin-top: 19px;
	}

	/* Home phone frame (Figma "Main page" mobile): 350px photo with a "1/4" counter, text flush left. */
	.sp-props--home .sp-prop {
		gap: 18px;
	}

	.sp-props--home .sp-prop__media {
		height: 350px;
	}

	.sp-props--home .sp-prop__body {
		padding: 0;
	}

	.sp-props--home .sp-props__nav img,
	.sp-props--home .sp-props__nav svg {
		width: 30px;
		height: 30px;
	}

	.sp-props--home .sp-slider__count {
		display: block;
		position: absolute;
		top: 19px;
		right: 21px;
		color: #000;
		font: 500 14px/16px "Source Sans 3", sans-serif;
	}

	.sp-props__nav button {
		display: flex;
		align-items: center;
		justify-content: center;
		width: 45px;
		height: 45px;
		padding: 0;
		border: 0;
		border-radius: 0;
		background: var(--sp-navy);
		cursor: pointer;
	}

	/* Red only while pressed (a touch screen keeps :hover and :focus after the tap), no focus ring box. */
	.sp-props__nav button:hover,
	.sp-props__nav button:focus {
		background: var(--sp-navy);
		outline: none;
		box-shadow: none;
	}

	.sp-props__nav button:active {
		background: var(--sp-red);
	}

	.sp-props__prev img,
	.sp-props__prev svg {
		transform: scaleX(-1);
	}

	/* Portfolio: first four, then "Load more" */
	.sp-props--all:not(.is-expanded) .sp-prop.is-extra {
		display: none;
	}

	.sp-props--all:not(.is-expanded) .sp-props__more.is-needed {
		display: block;
		width: 254px;
		height: 64px;
		margin: 26px auto 0;
		padding: 0;
		border: 1px solid var(--sp-red);
		border-radius: 0;
		background: transparent;
		color: #000;
		font: 500 15px/1 "Poppins", sans-serif;
		letter-spacing: -0.16px;
		cursor: pointer;
	}

	.sp-props__more:hover {
		background: var(--sp-red);
		color: #fff;
	}
}

/* Popup */
.sp-dialog {
	width: min(1168px, calc(100% - 32px));
	max-width: none;
	max-height: calc(100% - 64px);
	padding: 0;
	border: 0;
	border-radius: 8px;
	background: #fff;
	color: #000;
	font-family: "Source Sans 3", sans-serif;
}

.sp-dialog::backdrop {
	background: rgba(18, 35, 59, 0.55);
	opacity: 0;
	transition: opacity 0.25s;
}

/* Same fade in and out as the newsletter and cookie popups. */
.sp-dialog {
	opacity: 0;
	transform: translateY(16px);
	transition: opacity 0.25s, transform 0.25s;
}

.sp-dialog.is-open {
	opacity: 1;
	transform: none;
}

.sp-dialog.is-open::backdrop {
	opacity: 1;
}

.sp-dialog__inner {
	position: relative;
	display: grid;
	grid-template-columns: 492px minmax(0, 1fr);
	gap: 40px;
	padding: 30px 30px 32px;
}

.sp-dialog__media {
	height: 393px;
}

.sp-dialog__region {
	margin: 2px 0 0;
	color: var(--sp-red, #c8102e);
	font-size: 14px;
	font-weight: 500;
	text-transform: uppercase;
}

.sp-dialog__title {
	margin: 10px 0 0;
	font-size: 48px;
	font-weight: 500;
	line-height: 1.1;
	letter-spacing: -0.48px;
}

.sp-dialog__meta {
	margin: 16px 0 0;
	color: rgba(0, 0, 0, 0.8);
	font-size: 18px;
}

.sp-dialog__stats {
	margin-top: 22px;
	padding-bottom: 24px;
	border-bottom: 1px solid rgba(0, 0, 0, 0.12);
}

.sp-dialog__stats .sp-prop__stats {
	max-width: none;
}

.sp-dialog__stats dd {
	font-weight: 400;
}

.sp-dialog__about {
	margin: 24px 0 0;
	font-size: 28px;
	font-weight: 500;
	letter-spacing: -0.28px;
}

.sp-dialog__content {
	margin-top: 22px;
	color: rgba(0, 0, 0, 0.8);
	font-size: 18px;
	line-height: 23px;
}

.sp-dialog__content p {
	margin: 0 0 23px;
}

.sp-dialog__content p:last-child {
	margin-bottom: 0;
}

.sp-dialog__close {
	position: absolute;
	top: 30px;
	right: 30px;
	display: flex;
	padding: 4px;
	border: 0;
	border-radius: 0;
	background: none;
	cursor: pointer;
}

.sp-dialog__close {
	transition: opacity 0.2s;
}

.sp-dialog__close:hover {
	opacity: 0.6;
}

@media (max-width: 1024px) {
	.sp-dialog__inner {
		grid-template-columns: minmax(0, 1fr);
		gap: 24px;
	}

	.sp-dialog__title {
		padding-right: 40px;
	}
}

/* Phone (Figma "Seperate Property Page Template" phone frame): region, name and address first, then the photos,
   the figures and the text; the close cross sits bare next to the region line. */
@media (max-width: 767px) {
	.sp-dialog__inner {
		gap: 0;
		padding: 24px 16px 24px;
	}

	.sp-dialog__text {
		display: contents;
	}

	.sp-dialog__region { order: 1; }
	.sp-dialog__title { order: 2; }
	.sp-dialog__meta { order: 3; }
	.sp-dialog__slot-media { order: 4; margin-top: 20px; }
	.sp-dialog__stats { order: 5; }
	.sp-dialog__about { order: 6; }
	.sp-dialog__content { order: 7; }

	.sp-dialog__media {
		height: 300px;
	}

	.sp-dialog__close {
		top: 16px;
		right: 12px;
		background: none;
	}

	.sp-dialog__title {
		font-size: 32px;
	}

	.sp-dialog__about {
		font-size: 22px;
	}

	.sp-dialog__content,
	.sp-dialog__meta {
		font-size: 16px;
	}
}

/* Portfolio hero (Figma mobile 2292:6832): centred intro, figures as three centred columns, area in the middle */
@media (min-width: 768px) and (max-width: 1024px) {
	.sp-map {
		max-width: 560px;
		margin: 0 auto;
	}
}

@media (max-width: 767px) {
	.sp-pf-intro {
		text-align: center;
	}

	.sp-pf-intro .elementor-widget-text-editor,
	.sp-pf-intro .elementor-heading-title {
		text-align: center;
	}

	/* Figures sit side by side at their own width, each label broken into two lines, with rules between. */
	.sp-figures > .e-con {
		--width: auto !important;
		flex: 0 0 auto;
		align-items: center;
		padding: 0 20px !important;
		border-width: 0 !important;
		text-align: center;
	}

	/* Fixed column widths (Figma: lines at 112 and 270 of 390) across the full row, so the row does not
	   shift while the numbers count up. */
	.sp-figures > .e-con:first-child {
		flex: 0 0 26.8%;
		padding-left: 0 !important;
	}

	.sp-figures > .e-con:nth-child(2) {
		flex: 1 1 0;
		order: 3;
		padding-right: 0 !important;
	}

	.sp-figures > .e-con:nth-child(3) {
		flex: 0 0 44.1%;
		border-style: solid !important;
		border-color: rgba(0, 0, 0, 0.15) !important;
		border-width: 0 1px !important;
	}

	.sp-figures .elementor-heading-title {
		white-space: nowrap;
	}

	.sp-figures .elementor-widget-text-editor {
		width: min-content;
	}
}

/* Map of Switzerland */
.sp-map {
	display: block;
	width: 100%;
	height: auto;
	overflow: visible;
}

.sp-map__canton {
	fill: #fff;
	stroke: #d9dce1;
	stroke-width: 1.2;
	stroke-linejoin: round;
	transition: fill 0.2s;
}

.sp-map__canton.is-active {
	fill: #12233b;
	stroke: #12233b;
}

.sp-map__canton.is-active {
	cursor: pointer;
}

.sp-map__canton.is-active:hover,
.sp-map__canton.is-active.is-hover {
	fill: #2a5ea8;
	stroke: #2a5ea8;
}

.sp-map-wrap {
	position: relative;
}

.sp-map__tip {
	position: absolute;
	z-index: 5;
	display: flex;
	flex-direction: column;
	gap: 2px;
	max-width: 260px;
	padding: 10px 14px;
	background: #fff;
	box-shadow: 0 8px 24px rgba(18, 35, 59, 0.18);
	color: rgba(0, 0, 0, 0.8);
	font: 400 14px/1.35 "Source Sans 3", sans-serif;
	pointer-events: none;
	transform: translate(-50%, calc(-100% - 10px));
	white-space: normal;
}

.sp-map__tip[hidden] {
	display: none;
}

.sp-map__tip strong {
	color: #000;
	font-size: 16px;
	font-weight: 500;
}

.sp-map__tip::after {
	content: "";
	position: absolute;
	top: 100%;
	left: 50%;
	border: 7px solid transparent;
	border-top-color: #fff;
	transform: translateX(-50%);
}

.sp-map__tip.is-below {
	transform: translate(-50%, 10px);
}

.sp-map__tip.is-below::after {
	top: auto;
	bottom: 100%;
	border-top-color: transparent;
	border-bottom-color: #fff;
}

.sp-map__pin path {
	fill: #c8102e;
	stroke: #fff;
	stroke-width: 0.8;
	transition: fill 0.2s;
}

.sp-map__pin:hover path,
.sp-map__pin:focus path {
	fill: #fff;
	stroke: #c8102e;
}

/* Home desktop (Figma "Main page", Frame 377): text flush with the photo, 15px below it, title 28/40, place 6px under it. */
@media (min-width: 768px) {
	.sp-props--home .sp-prop__body {
		gap: 6px;
		margin-top: 0;
		padding: 0;
	}

	.sp-props--home .sp-prop__title {
		line-height: 40px;
	}

	.sp-props--home .sp-prop__meta {
		margin: 0;
		line-height: 23px;
	}
}

/* Phones paint a blue flash over a tapped card or arrow; the arrows give their own feedback instead. */
.sp-props,
.sp-props button,
.sp-props a,
.sp-slider,
.sp-map-wrap a {
	-webkit-tap-highlight-color: transparent;
}

@media (hover: hover) {
	.sp-props__nav button:hover {
		background: var(--sp-red);
	}
}

/* Counting figures keep a steady width while the digits change. */
.sp-count .elementor-heading-title {
	font-variant-numeric: tabular-nums;
}

/* Map: show that it can be explored (client, 2026-10-28). */
.sp-map__canton.is-active,
.sp-map__pin {
	cursor: pointer;
}

.sp-map__pulse {
	fill: #e8213f;
	stroke: #ff6b80;
	stroke-width: 1;
	opacity: 0;
	transform-box: fill-box;
	transform-origin: center;
	animation: sp-map-pulse 2s ease-out infinite;
	pointer-events: none;
}

.sp-map__pin:nth-of-type(3n+2) .sp-map__pulse {
	animation-delay: 0.7s;
}

.sp-map__pin:nth-of-type(3n) .sp-map__pulse {
	animation-delay: 1.4s;
}

/* Pins keep pulsing so visitors see they can be clicked; a soft red ring grows out of each pin. */
@keyframes sp-map-pulse {
	0% {
		opacity: 0.7;
		transform: scale(0.8);
	}

	100% {
		opacity: 0;
		transform: scale(3.2);
	}
}

/* The pin under the cursor stops pulsing while its tooltip is open. */
.sp-map__pin:hover .sp-map__pulse,
.sp-map__pin:focus .sp-map__pulse {
	animation: none;
}

@media (prefers-reduced-motion: reduce) {
	.sp-map__pulse {
		display: none;
	}
}

.sp-map__hint {
	display: flex;
	align-items: center;
	gap: 6px;
	margin: 0 0 6px;
	color: rgba(18, 35, 59, 0.6);
	font: 400 14px/20px "Source Sans 3", sans-serif;
}

.sp-map__hint svg {
	flex: none;
}

.sp-map__hint-touch {
	display: none;
}

@media (hover: none) {
	.sp-map__hint-hover {
		display: none;
	}

	.sp-map__hint-touch {
		display: inline;
	}
}
