/**
 * Jorato WordPress Templates — case catalog, list, and case detail.
 *
 * Typography + colors follow the shared design system (Poppins, blue / gold / green palette).
 * Tokens are scoped to plugin roots so the active theme is not affected.
 */

/* —— Design tokens (scoped) —— */

.jorato-case-catalog,
.jorato-case-detail {
	/* Palette */
	--jorato-color-blue: #2c3a60;
	--jorato-color-blue-hover: #243052;
	--jorato-color-gold: #baa558;
	--jorato-color-green: #b9c8b9;
	--jorato-color-grey: #4c4c4c;
	--jorato-color-white: #ffffff;
	--jorato-color-white-90: rgba(255, 255, 255, 0.9);
	--jorato-color-overlay: rgba(44, 58, 96, 0.35);
	--jorato-color-text: #242424;

	/* Layout */
	--jorato-radius: 10px;
	--jorato-shadow: 0 4px 20px rgba(44, 58, 96, 0.08);

	/* Typography: mobile-first (< 1280px); desktop overrides below. */
	--jorato-font-family: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--jorato-heading-lh: 1.2;
	--jorato-heading-weight: 600;
	--jorato-heading-ls: 0;
	--jorato-h1: 41px;
	--jorato-h2: 34px;
	--jorato-h3: 29px;
	--jorato-h4: 24px;
	--jorato-h5: 20px;
	--jorato-h6: 16px;

	/* Body */
	--jorato-body-lh: 1.4;
	--jorato-body-ls: 0;
	--jorato-p-size: 14px;
	--jorato-p-weight: 300;
	--jorato-p-bold-weight: 600;
	--jorato-p-small-size-mobile: 12px;
	--jorato-p-small2-size-mobile: 10px;
	--jorato-p-small-size: var(--jorato-p-small-size-mobile);
	--jorato-p-small2-size: var(--jorato-p-small2-size-mobile);

	font-family: var(--jorato-font-family);
	color: var(--jorato-color-text);
	line-height: var(--jorato-body-lh);
	letter-spacing: var(--jorato-body-ls);
	-webkit-font-smoothing: antialiased;
}

/* —— Case catalog (list + filters) —— */

.jorato-screen-reader-text {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

@keyframes jorato-catalog-spin {
	to {
		transform: rotate(360deg);
	}
}

.jorato-case-catalog {
	/* Mobile-first: docs/responsive-layout-guidelines.md — 884px rail, 1.5rem gutters. */
	--jorato-content-rail-max: 884px;
	--jorato-list-max: 100%;
	--jorato-list-pad-x: 1.5rem;
	--jorato-filters-panel-bg: #b9c8b966;
	--jorato-card-w: 444px;
	--jorato-card-h: 444px;
	--jorato-card-img-h: 230px;
	--jorato-grid-gap-x: 40px;
	--jorato-grid-gap-y: 60px;

	box-sizing: border-box;
	position: relative;
	width: 100%;
	max-width: var(--jorato-content-rail-max);
	margin: 0 auto 2.5rem;
}

.jorato-case-catalog.jorato-case-catalog--loading::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 20;
	background: rgba(255, 255, 255, 0.72);
	pointer-events: none;
}

.jorato-case-catalog.jorato-case-catalog--loading::before {
	content: "";
	position: absolute;
	left: 50%;
	top: 45%;
	width: 2.25rem;
	height: 2.25rem;
	margin: -1.125rem 0 0 -1.125rem;
	z-index: 21;
	border: 3px solid rgba(44, 58, 96, 0.22);
	border-top-color: var(--jorato-color-blue);
	border-radius: 50%;
	animation: jorato-catalog-spin 0.65s linear infinite;
	pointer-events: none;
}

.jorato-case-filters {
	box-sizing: border-box;
	width: 100%;
}

.jorato-case-filters__panel {
	box-sizing: border-box;
	background: var(--jorato-filters-panel-bg);
	padding: 40px 1.5rem;
	margin-bottom: 1.5rem;
}

.jorato-case-filters__toolbar-inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0;
	min-height: 52px;
	max-width: var(--jorato-list-max, 1512px);
	margin: 0 auto;
}

.jorato-case-filters__select {
	appearance: none;
	box-sizing: border-box;
	height: 52px;
	background: var(--jorato-color-white);
	border: 1px solid rgba(76, 76, 76, 0.2);
	border-radius: var(--jorato-radius);
	padding: 0 2.25rem 0 0.85rem;
	font-family: var(--jorato-font-family);
	font-size: var(--jorato-p-size);
	font-weight: var(--jorato-p-weight);
	line-height: var(--jorato-body-lh);
	color: var(--jorato-color-text);
	min-width: 12rem;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%234c4c4c' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 0.75rem center;
	cursor: pointer;
}

.jorato-case-filters__select--location {
	flex: 0 1 auto;
	width: min(350px, 100%);
	max-width: 100%;
	min-width: 0;
}

.jorato-case-filters__select--wide {
	flex: 1 1 14rem;
	max-width: 22rem;
}

.jorato-case-filters__toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	height: 52px;
	margin-left: 20px;
	padding: 0 30px;
	background: var(--jorato-color-blue);
	color: var(--jorato-color-white);
	border: none;
	border-radius: var(--jorato-radius);
	font-family: var(--jorato-font-family);
	font-size: var(--jorato-p-size);
	font-weight: var(--jorato-p-bold-weight);
	line-height: var(--jorato-heading-lh);
	letter-spacing: var(--jorato-heading-ls);
	cursor: pointer;
	transition: background 0.15s ease;
}

.jorato-case-filters__toggle:hover,
.jorato-case-filters__toggle:focus-visible {
	background: var(--jorato-color-blue-hover);
}

.jorato-case-filters__count {
	/* Desktop Paragraph Bold + blue (design system). */
	margin: 0;
	margin-left: 30px;
	flex: 0 0 auto;
	align-self: center;
	font-family: var(--jorato-font-family);
	font-size: var(--jorato-p-size);
	font-weight: var(--jorato-p-bold-weight);
	line-height: var(--jorato-body-lh);
	letter-spacing: var(--jorato-body-ls);
	color: var(--jorato-color-blue);
}

.jorato-case-filters__advanced {
	display: none;
	margin-top: 1.5rem;
	padding-top: 0;
	border-top: none;
}

.jorato-case-filters__advanced--open {
	display: block;
}

.jorato-case-filters__advanced-inner {
	max-width: var(--jorato-list-max, 1512px);
	margin: 0 auto;
	width: 100%;
}

.jorato-case-filters__ranges {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	box-sizing: border-box;
	width: 100%;
	gap: 40px;
	margin-bottom: 0;
}

.jorato-case-filters__ranges > .jorato-case-filters__field {
	flex: 1 1 0;
	min-width: 0;
	box-sizing: border-box;
}

.jorato-case-filters__ranges .jorato-case-filters__select--wide {
	flex: none;
	width: 100%;
	max-width: none;
}

.jorato-case-filters__label {
	display: block;
	font-family: var(--jorato-font-family);
	font-size: var(--jorato-p-small-size);
	font-weight: var(--jorato-p-bold-weight);
	line-height: var(--jorato-body-lh);
	letter-spacing: var(--jorato-body-ls);
	margin-bottom: 0.5rem;
	color: var(--jorato-color-blue);
}

.jorato-dual-range {
	position: relative;
	height: 40px;
	margin-bottom: 0;
}

.jorato-dual-range__track {
	display: none;
}

.jorato-dual-range__input {
	/* Thumb art as data URI + on input for WebKit pseudo inheritance. */
	--jorato-dual-range-thumb-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'%3E%3Ccircle cx='20' cy='20' r='20' fill='%232C3A60'/%3E%3Cpath fill='%23ffffff' d='M18.5057 14.6868L17.9414 15.2511L22.3157 19.6254L17.9414 23.9997L18.5057 24.564L23.4443 19.6254L18.5057 14.6868Z'/%3E%3C/svg%3E");
	position: absolute;
	left: 0;
	right: 0;
	top: 0;
	width: 100%;
	height: 40px;
	margin: 0;
	background: transparent;
	pointer-events: auto;
	-webkit-appearance: none;
	appearance: none;
	z-index: 1;
}

.jorato-dual-range__input::-webkit-slider-runnable-track {
	height: 1px;
	background: rgba(44, 58, 96, 0.2);
	border: none;
	border-radius: 0;
}

.jorato-dual-range__input--max {
	z-index: 2;
}

.jorato-dual-range__input::-webkit-slider-thumb {
	-webkit-appearance: none;
	appearance: none;
	pointer-events: auto;
	box-sizing: border-box;
	width: 40px;
	height: 40px;
	margin-top: -19.5px;
	border-radius: 50%;
	border: none;
	background-color: var(--jorato-color-blue);
	background-image: var(--jorato-dual-range-thumb-image);
	background-repeat: no-repeat;
	background-position: center;
	background-size: 40px 40px;
	box-shadow: 0 2px 8px rgba(44, 58, 96, 0.18);
	cursor: pointer;
}

.jorato-dual-range__input--min::-webkit-slider-thumb {
	transform: scaleX(-1);
}

.jorato-dual-range__input::-moz-range-track {
	height: 1px;
	background: rgba(44, 58, 96, 0.2);
	border: none;
	border-radius: 0;
}

.jorato-dual-range__input::-moz-range-thumb {
	box-sizing: border-box;
	pointer-events: auto;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	border: none;
	background-color: var(--jorato-color-blue);
	background-image: var(--jorato-dual-range-thumb-image);
	background-repeat: no-repeat;
	background-position: center;
	background-size: 40px 40px;
	box-shadow: 0 2px 8px rgba(44, 58, 96, 0.18);
	cursor: pointer;
}

.jorato-dual-range__input--min::-moz-range-thumb {
	transform: scaleX(-1);
}

.jorato-dual-range__values {
	display: flex;
	justify-content: space-between;
	padding-top: 10px;
	font-family: var(--jorato-font-family);
	font-size: var(--jorato-p-small-size);
	font-weight: var(--jorato-p-bold-weight);
	line-height: var(--jorato-body-lh);
	color: var(--jorato-color-blue);
}

/* Desktop-first filter chrome: stack below 1280px (see responsive-layout-guidelines.md). */
@media (max-width: 1279px) {
	.jorato-case-catalog {
		overflow-x: hidden;
	}

	.jorato-case-filters {
		width: 100vw;
		position: relative;
		left: 50%;
		transform: translateX(-50%);
	}

	.jorato-case-filters__toolbar-inner {
		flex-direction: column;
		align-items: stretch;
		gap: 1rem;
		min-height: 0;
	}

	.jorato-case-filters__select--location {
		width: 100%;
		max-width: none;
		flex: 1 1 auto;
	}

	.jorato-case-filters__toggle {
		margin-left: 0;
		width: 100%;
		max-width: none;
	}

	.jorato-case-filters__count {
		margin-left: 0;
		width: 100%;
		flex: none;
		text-align: left;
	}

	.jorato-case-filters__ranges {
		flex-direction: column;
		align-items: stretch;
		gap: 1.5rem;
	}

	.jorato-case-filters__ranges > .jorato-case-filters__field {
		flex: 1 1 auto;
		width: 100%;
		min-width: 0;
	}
}

.jorato-case-results {
	box-sizing: border-box;
	width: 100%;
	max-width: 100%;
	padding-left: var(--jorato-list-pad-x);
	padding-right: var(--jorato-list-pad-x);
	margin-left: auto;
	margin-right: auto;
}

.jorato-case-results__heading {
	font-family: var(--jorato-font-family);
	font-size: var(--jorato-h2);
	font-weight: var(--jorato-heading-weight);
	line-height: var(--jorato-heading-lh);
	letter-spacing: var(--jorato-heading-ls);
	color: var(--jorato-color-blue);
	margin: 0 0 1.25rem;
}

.jorato-case-grid {
	display: grid;
	grid-template-columns: 1fr;
	column-gap: var(--jorato-grid-gap-x, 40px);
	row-gap: var(--jorato-grid-gap-y, 60px);
	justify-content: center;
	width: 100%;
	max-width: 100%;
	margin: 0 auto;
}

@media (min-width: 768px) {
	.jorato-case-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 1280px) {
	.jorato-case-catalog,
	.jorato-case-detail {
		--jorato-h1: 53px;
		--jorato-h2: 42px;
		--jorato-h3: 34px;
		--jorato-h4: 27px;
		--jorato-h5: 21px;
		--jorato-h6: 17px;
		--jorato-p-small-size: 11px;
		--jorato-p-small2-size: 8px;
	}

	.jorato-case-catalog {
		--jorato-list-max: 1512px;
		--jorato-list-pad-x: 50px;
		max-width: calc(var(--jorato-list-max) + 2 * var(--jorato-list-pad-x));
	}

	.jorato-case-filters {
		width: 100%;
		left: auto;
		transform: none;
	}

	.jorato-case-filters__panel {
		padding: 40px 50px;
	}

	.jorato-case-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		max-width: var(--jorato-list-max, 1512px);
	}

	.jorato-case-card__avail {
		font-size: var(--jorato-p-small-size);
	}
}

.jorato-case-grid__empty {
	grid-column: 1 / -1;
	text-align: center;
	font-family: var(--jorato-font-family);
	font-size: var(--jorato-p-size);
	font-weight: var(--jorato-p-weight);
	color: var(--jorato-color-grey);
	margin: 2rem 0;
}

.jorato-case-card {
	background: var(--jorato-color-white);
	border-radius: var(--jorato-radius) var(--jorato-radius) 0 0;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	box-sizing: border-box;
	width: 100%;
	max-width: var(--jorato-card-w, 444px);
	height: auto;
	min-height: var(--jorato-card-h, 444px);
	justify-self: center;
}

.jorato-case-card__media {
	position: relative;
	width: 100%;
	height: var(--jorato-card-img-h, 230px);
	flex-shrink: 0;
	overflow: hidden;
	background: var(--jorato-color-green);
	border-radius: var(--jorato-radius) var(--jorato-radius) 0 0;
}

.jorato-case-card__imglink {
	display: block;
	width: 100%;
	height: 100%;
	line-height: 0;
	text-decoration: none;
	overflow: hidden;
}

.jorato-case-card__slider {
	position: relative;
	width: 100%;
	height: 100%;
	min-height: 100%;
	overflow: hidden;
}

.jorato-case-card__slide {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	min-width: 100%;
	min-height: 100%;
	object-fit: cover;
	object-position: center;
	opacity: 0;
	transition: opacity 0.25s ease;
	z-index: 0;
}

.jorato-case-card__slide.is-active {
	opacity: 1;
	z-index: 1;
}

.jorato-case-card__slide--placeholder {
	background: linear-gradient(135deg, #d4e0d4, #a8b8a8);
}

.jorato-case-card__nav {
	position: absolute;
	top: 50%;
	z-index: 3;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	border: none;
	padding: 0;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 1px 6px rgba(0, 0, 0, 0.12);
	background-color: var(--jorato-color-white-90);
	background-image: url("../images/chevron-arrow.svg");
	background-repeat: no-repeat;
	background-position: center;
	background-size: 12px 12px;
}

.jorato-case-card__nav--prev {
	left: 0.5rem;
	transform: translateY(-50%) scaleX(-1);
}

.jorato-case-card__nav--next {
	right: 0.5rem;
	transform: translateY(-50%);
}

.jorato-case-card__nav:focus-visible {
	outline: 2px solid var(--jorato-color-blue);
	outline-offset: 2px;
}

.jorato-case-card__badge {
	position: absolute;
	top: 0;
	left: 0;
	z-index: 2;
	box-sizing: border-box;
	display: flex;
	align-items: center;
	padding: 10px;
	max-width: calc(100% - 3rem);
	background: var(--jorato-color-blue);
	border-bottom-right-radius: 8px;
	border-top-left-radius: 0;
	border-top-right-radius: 0;
	border-bottom-left-radius: 0;
	color: #fff;
	font-family: var(--jorato-font-family);
	font-size: 12px;
	font-style: normal;
	font-weight: 600;
	line-height: 18px;
	overflow: hidden;
	overflow-wrap: anywhere;
}

.jorato-case-card__overlay {
	position: absolute;
	left: 0;
	right: auto;
	bottom: 0;
	z-index: 2;
	box-sizing: border-box;
	display: flex;
	align-items: center;
	width: max-content;
	max-width: calc(100% - 0.5rem);
	height: 34px;
	padding: 10px;
	background: #baa558;
	border-top-right-radius: 8px;
	border-top-left-radius: 0;
	border-bottom-left-radius: 0;
	border-bottom-right-radius: 0;
}

.jorato-case-card__overlay-text {
	margin: 0;
	max-width: 100%;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	font-family: var(--jorato-font-family);
	font-size: 10px;
	font-style: normal;
	font-weight: 600;
	line-height: 1.4;
	color: #fff;
}

.jorato-case-card__body {
	box-sizing: border-box;
	flex: 1 1 auto;
	min-height: 0;
	height: auto;
	width: 100%;
	min-width: 100%;
	align-self: stretch;
	padding: 20px 0 40px;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0;
	min-height: 0;
	border-bottom: 1px solid #c8c8c8;
}

/* “Ledig fra” row: Figma Desktop = Paragraph Small; Mobile = Paragraph SMALL 2. */
.jorato-case-card__avail {
	margin: 0 0 0.35rem;
	max-width: 100%;
	min-width: 0;
	font-family: var(--jorato-font-family);
	font-size: var(--jorato-p-small2-size);
	font-weight: var(--jorato-p-weight);
	line-height: var(--jorato-body-lh);
	color: var(--jorato-color-grey);
}

.jorato-case-card__avail-label,
.jorato-case-card__avail-date {
	white-space: normal;
}

.jorato-case-card__title {
	margin: 0;
	width: 100%;
	max-width: 100%;
	min-width: 0;
	font-family: var(--jorato-font-family);
	font-size: var(--jorato-h4);
	font-weight: var(--jorato-heading-weight);
	line-height: var(--jorato-heading-lh);
	letter-spacing: var(--jorato-heading-ls);
}

.jorato-case-card__title-link {
	display: -webkit-box;
	width: 100%;
	min-width: 0;
	overflow: hidden;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	word-break: break-word;
	overflow-wrap: anywhere;
	color: var(--jorato-color-blue);
	text-decoration: none;
}

.jorato-case-card__title-link:hover,
.jorato-case-card__title-link:focus-visible {
	text-decoration: underline;
}

.jorato-case-card--accent .jorato-case-card__title-link {
	color: var(--jorato-color-gold);
}

.jorato-case-card__address {
	margin: 10px 0 30px;
	max-width: 100%;
	min-width: 0;
	display: flex;
	align-items: flex-start;
	gap: 0.4rem;
	font-family: var(--jorato-font-family);
	font-size: var(--jorato-p-size);
	font-weight: var(--jorato-p-weight);
	line-height: var(--jorato-body-lh);
	color: var(--jorato-color-grey);
}

.jorato-case-card__address-icon {
	flex-shrink: 0;
	width: 14px;
	height: auto;
	margin-top: 0.1em;
	display: block;
}

.jorato-case-card__address-text {
	min-width: 0;
}

.jorato-case-card__stats {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem 1.25rem;
	width: 100%;
	max-width: 100%;
	min-width: 0;
	margin-top: auto;
	font-family: var(--jorato-font-family);
	font-size: var(--jorato-p-size);
	font-weight: var(--jorato-p-weight);
	line-height: var(--jorato-body-lh);
	color: var(--jorato-color-grey);
}

.jorato-case-card__stat {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	min-width: 0;
	color: inherit;
}

.jorato-case-card__stat-icon {
	flex-shrink: 0;
	display: block;
}

.jorato-case-card__stat--rent .jorato-case-card__stat-text {
	color: var(--jorato-color-blue);
}

.jorato-case-card--accent .jorato-case-card__stat--rent .jorato-case-card__stat-text {
	color: var(--jorato-color-gold);
}

/* —— Case detail (mobile-first) —— */

.jorato-case-detail {
	--jorato-detail-split-gap: 40px;
	--jorato-detail-col-main: 800px;
	--jorato-detail-col-aside: 552px;
	box-sizing: border-box;
	max-width: 48rem;
	margin: 0 auto;
	padding: 0 0 2.5rem;
	width: 100%;
}

.jorato-case-detail__body {
	box-sizing: border-box;
	width: 100%;
}

/* Two-column layout (≥1280px): 800px main + gap + 552px contact / prospectus. Mobile: single column. */
.jorato-case-detail__split {
	box-sizing: border-box;
	width: 100%;
}

.jorato-case-detail__split-lead,
.jorato-case-detail__split-lead-secondary {
	box-sizing: border-box;
	min-width: 0;
}

.jorato-case-detail__split-aside {
	box-sizing: border-box;
	padding-top: 2rem;
	padding-left: 1.5rem;
	padding-right: 1.5rem;
}

.jorato-case-detail__aside-card {
	box-sizing: border-box;
	width: 100%;
}

.jorato-case-detail__aside-prospectus {
	margin-top: 1rem;
}

.jorato-case-detail__cta--aside-full {
	width: 100%;
}

@media (min-width: 1280px) {
	.jorato-case-detail {
		max-width: min(
			100%,
			calc(var(--jorato-detail-col-main) + var(--jorato-detail-split-gap) + var(--jorato-detail-col-aside))
		);
	}

	.jorato-case-detail__split--has-aside {
		display: grid;
		grid-template-columns: var(--jorato-detail-col-main) var(--jorato-detail-col-aside);
		column-gap: var(--jorato-detail-split-gap);
		align-items: start;
		justify-content: center;
	}

	.jorato-case-detail__split--has-aside .jorato-case-detail__split-lead {
		grid-column: 1;
		grid-row: 1;
	}

	.jorato-case-detail__split--has-aside .jorato-case-detail__split-aside {
		grid-column: 2;
		grid-row: 1 / span 2;
		padding-top: 1.5rem;
		padding-left: 0;
		padding-right: 0;
	}

	.jorato-case-detail__split--has-aside .jorato-case-detail__split-lead-secondary {
		grid-column: 1;
		grid-row: 2;
	}

	.jorato-case-detail__split:not(.jorato-case-detail__split--has-aside) {
		max-width: var(--jorato-detail-col-main);
		margin-left: auto;
		margin-right: auto;
	}

	.jorato-case-detail__split-aside .jorato-case-detail__agent-photo {
		width: 552px;
		max-width: 100%;
		height: 347px;
		object-fit: cover;
	}

	.jorato-case-detail__split {
		margin-top: 100px;
	}
}

.jorato-case-detail__section {
	box-sizing: border-box;
	margin: 0;
}

.jorato-case-detail__section--gallery {
	width: 100%;
}

.jorato-case-detail__section--intro,
.jorato-case-detail__section--location-map,
.jorato-case-detail__section--descriptions,
.jorato-case-detail__section--facts,
.jorato-case-detail__section--agent,
.jorato-case-detail__section--post-agent,
.jorato-case-detail__section--facilities {
	padding-left: 1.5rem;
	padding-right: 1.5rem;
}

.jorato-case-detail__section--location-map {
	padding-top: 1.5rem;
	padding-bottom: 2rem;
}

.jorato-case-detail__map-heading {
	margin: 0 0 0.75rem;
	font-size: 1.25rem;
	font-weight: 600;
}

.jorato-case-detail__map-shell {
	position: relative;
	width: 100%;
	min-height: 280px;
	height: 42vmin;
	max-height: 420px;
	border-radius: 8px;
	overflow: hidden;
	box-sizing: border-box;
	background: rgba(0, 0, 0, 0.06);
}

.jorato-case-detail__map {
	width: 100%;
	height: 100%;
	min-height: 280px;
	box-sizing: border-box;
}

@media (max-width: 767px) {
	.jorato-case-detail__map-shell {
		height: 620px;
		min-height: 620px;
		max-height: 620px;
	}
}

.jorato-case-detail__map-toolbar {
	position: absolute;
	top: 10px;
	left: 10px;
	right: auto;
	z-index: 2;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: flex-start;
	align-items: flex-start;
	max-width: calc(100% - 20px);
	pointer-events: none;
}

.jorato-case-detail__map-filter {
	appearance: none;
	margin: 0;
	padding: 0.5rem 1rem;
	border-radius: 12px;
	border: 1px solid var(--jorato-color-blue);
	background: var(--jorato-color-white);
	color: var(--jorato-color-blue);
	font-family: inherit;
	font-size: 12px;
	font-weight: 700;
	line-height: 1.2;
	cursor: pointer;
	pointer-events: auto;
	transition:
		background-color 0.15s ease,
		color 0.15s ease,
		border-color 0.15s ease;
}

.jorato-case-detail__map-filter:hover {
	background: rgba(44, 58, 96, 0.06);
}

.jorato-case-detail__map-filter.is-active {
	background: var(--jorato-color-blue);
	color: var(--jorato-color-white);
	border-color: var(--jorato-color-blue);
}

.jorato-case-detail__map-filter.is-active:hover {
	background: var(--jorato-color-blue-hover);
	border-color: var(--jorato-color-blue-hover);
	color: var(--jorato-color-white);
}

.jorato-case-detail__map .mapboxgl-canvas {
	outline: none;
}

.jorato-case-detail__map-marker {
	display: flex;
	align-items: flex-end;
	justify-content: center;
	line-height: 0;
}

.jorato-case-detail__map-marker img {
	display: block;
	width: 36px;
	height: 36px;
	object-fit: contain;
	pointer-events: none;
}

.jorato-case-detail__map-marker--case img {
	width: 32px;
	height: 40px;
}

.jorato-case-detail__map-popup {
	padding: 2px 0;
	font-size: 0.875rem;
	line-height: 1.35;
}

.jorato-case-detail__map-popup-title {
	display: block;
	margin-bottom: 0.25rem;
}

.jorato-case-detail__map-popup-line,
.jorato-case-detail__map-popup-distance {
	margin: 0.15rem 0 0;
	color: rgba(0, 0, 0, 0.72);
}

.jorato-case-detail__gallery {
	position: relative;
	width: 100%;
	background: var(--jorato-color-green);
}

.jorato-case-detail__gallery-viewport {
	position: relative;
	width: 100%;
	overflow: hidden;
	aspect-ratio: 4 / 3;
	max-height: 70vh;
	touch-action: pan-y;
}

.jorato-case-detail__gallery-track {
	display: flex;
	height: 100%;
	transition: transform 0.28s ease;
	will-change: transform;
}

.jorato-case-detail__gallery-slide {
	flex-shrink: 0;
	height: 100%;
	position: relative;
}

.jorato-case-detail__gallery-img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	cursor: zoom-in;
}

.jorato-case-detail__gallery-slide--empty {
	background: linear-gradient(135deg, #d4e0d4, #a8b8a8);
	cursor: default;
}

.jorato-case-detail__section--gallery-empty .jorato-case-detail__gallery-nav {
	visibility: hidden;
	pointer-events: none;
}

.jorato-case-detail__gallery-nav {
	position: absolute;
	top: 50%;
	z-index: 3;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	border: none;
	padding: 0;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 1px 6px rgba(0, 0, 0, 0.12);
	background-color: var(--jorato-color-white-90);
	background-image: url("../images/chevron-arrow.svg");
	background-repeat: no-repeat;
	background-position: center;
	background-size: 12px 12px;
}

.jorato-case-detail__gallery-nav--prev {
	left: 0.5rem;
	transform: translateY(-50%) scaleX(-1);
}

.jorato-case-detail__gallery-nav--next {
	right: 0.5rem;
	transform: translateY(-50%);
}

.jorato-case-detail__gallery-nav:focus-visible {
	outline: 2px solid var(--jorato-color-blue);
	outline-offset: 2px;
}

.jorato-case-detail__gallery-tabs {
	position: absolute;
	left: 1.25rem;
	right: 1.25rem;
	bottom: 20px;
	z-index: 4;
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	justify-content: center;
	align-items: center;
	pointer-events: none;
}

.jorato-case-detail__gallery-tab {
	pointer-events: auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	margin: 0;
	padding: 15px 20px;
	border: none;
	border-radius: var(--jorato-radius);
	font-family: var(--jorato-font-family);
	font-size: 12px;
	font-weight: var(--jorato-p-bold-weight);
	line-height: 1.2;
	color: #fff;
	background: rgba(44, 58, 96, 0.55);
	cursor: pointer;
	transition:
		background-color 0.15s ease,
		opacity 0.15s ease;
}

.jorato-case-detail__gallery-tab:hover {
	background: rgba(44, 58, 96, 0.72);
}

.jorato-case-detail__gallery-tab.is-active {
	background: var(--jorato-color-blue);
}

.jorato-case-detail__gallery-tab.is-active:hover {
	background: var(--jorato-color-blue-hover);
}

.jorato-case-detail__gallery-tab-icon {
	display: flex;
	flex-shrink: 0;
	align-items: center;
	justify-content: center;
	line-height: 0;
	color: #fff;
}

.jorato-case-detail__gallery-tab-icon svg {
	display: block;
	width: 18px;
	height: 18px;
}

.jorato-case-detail__gallery-tab-label {
	white-space: nowrap;
}

.jorato-case-detail__gallery-tab:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}

.jorato-case-detail__section--intro {
	padding-top: 1.5rem;
	padding-bottom: 0.25rem;
}

.jorato-case-detail__avail {
	margin: 0 0 0.5rem;
	font-family: var(--jorato-font-family);
	font-size: var(--jorato-p-small-size);
	font-weight: var(--jorato-p-weight);
	line-height: var(--jorato-body-lh);
	color: var(--jorato-color-grey);
}

.jorato-case-detail__title {
	margin: 0 0 0.75rem;
	font-family: var(--jorato-font-family);
	font-size: var(--jorato-h4);
	font-weight: var(--jorato-heading-weight);
	line-height: var(--jorato-heading-lh);
	letter-spacing: var(--jorato-heading-ls);
	color: var(--jorato-color-blue);
}

.jorato-case-detail__address {
	margin: 0 0 1rem;
	display: flex;
	align-items: flex-start;
	gap: 0.4rem;
	font-family: var(--jorato-font-family);
	font-size: var(--jorato-p-size);
	font-weight: var(--jorato-p-weight);
	line-height: var(--jorato-body-lh);
	color: var(--jorato-color-grey);
}

.jorato-case-detail__address-icon {
	flex-shrink: 0;
	width: 14px;
	height: auto;
	margin-top: 0.1em;
	display: block;
}

.jorato-case-detail__desc-block {
	margin: 0 0 1.25rem;
}

.jorato-case-detail__desc {
	margin: 0;
	font-family: var(--jorato-font-family);
	font-size: var(--jorato-p-size);
	font-weight: var(--jorato-p-weight);
	line-height: var(--jorato-body-lh);
	color: var(--jorato-color-text);
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 4;
	overflow: hidden;
}

.jorato-case-detail__readmore {
	display: inline-block;
	margin-top: 0.35rem;
	font-family: var(--jorato-font-family);
	font-size: var(--jorato-p-small-size);
	font-weight: var(--jorato-p-bold-weight);
	color: var(--jorato-color-blue);
	cursor: pointer;
	text-decoration: none;
}

.jorato-case-detail__readmore:hover,
.jorato-case-detail__readmore:focus-visible {
	text-decoration: underline;
}

.jorato-case-detail__readmore.is-hidden {
	display: none;
}

.jorato-case-detail__cta {
	box-sizing: border-box;
	width: 100%;
	margin: 0;
	padding: 0.85rem 1rem;
	border: none;
	border-radius: var(--jorato-radius);
	font-family: var(--jorato-font-family);
	font-size: var(--jorato-p-size);
	font-weight: var(--jorato-p-bold-weight);
	line-height: var(--jorato-body-lh);
	color: #fff;
	background: var(--jorato-color-blue);
	cursor: pointer;
	transition: background 0.15s ease;
}

.jorato-case-detail__cta:hover,
.jorato-case-detail__cta:focus-visible {
	background: var(--jorato-color-blue-hover);
}

.jorato-case-detail__cta:focus-visible {
	outline: 2px solid var(--jorato-color-blue);
	outline-offset: 2px;
}

@media (min-width: 1280px) {
	.jorato-case-detail__section--intro > .jorato-case-detail__cta {
		width: auto;
		display: inline-block;
		padding: 15px 30px 17px;
	}
}

a.jorato-case-detail__cta--link {
	display: block;
	text-align: center;
	text-decoration: none;
}

a.jorato-case-detail__cta--link:hover,
a.jorato-case-detail__cta--link:focus-visible {
	color: #fff;
}

.jorato-case-detail__section--post-agent {
	padding-top: 1.25rem;
}

.jorato-case-detail__section--facilities {
	padding-top: 2rem;
	padding-bottom: 2.5rem;
}

.jorato-case-detail__facilities-heading {
	margin: 0 0 1rem;
	font-family: var(--jorato-font-family);
	font-size: var(--jorato-h5);
	font-weight: var(--jorato-heading-weight);
	line-height: var(--jorato-heading-lh);
	color: var(--jorato-color-blue);
}

.jorato-case-detail__facilities-list {
	margin: 0;
	padding: 0;
	list-style: none;
}

@media (min-width: 1280px) {
	/*
	 * Fill the left column first so an odd count puts the extra row on the left
	 * (not balanced “short-left / long-right” from column-count).
	 */
	.jorato-case-detail__facilities-list {
		display: grid;
		grid-template-columns: 1fr 1fr;
		grid-template-rows: repeat(var(--jorato-fac-rows, 1), auto);
		grid-auto-flow: column;
		column-gap: 2.5rem;
	}
}

.jorato-case-detail__facilities-item {
	margin: 0;
	padding: 0;
	border-bottom: 1px solid #e0e0e0;
}

.jorato-case-detail__facilities-item:first-of-type {
	border-top: 1px solid #e0e0e0;
}

.jorato-case-detail__facility {
	margin: 0;
}

.jorato-case-detail__facility-summary {
	list-style: none;
	cursor: pointer;
	box-sizing: border-box;
	padding: 24px 0 20px;
	font-family: var(--jorato-font-family);
	display: flex;
	align-items: center;
	gap: 0;
}

.jorato-case-detail__facility-summary::-webkit-details-marker {
	display: none;
}

.jorato-case-detail__facility-summary:focus {
	outline: none;
}

.jorato-case-detail__facility-summary:focus-visible {
	outline: 2px solid var(--jorato-color-blue);
	outline-offset: 2px;
}

.jorato-case-detail__facility-summary-inner {
	display: flex;
	align-items: center;
	gap: 10px;
	flex: 1;
	min-width: 0;
}

/* Figma: Smart animate — 300ms ease-out (toggle + panel). */
.jorato-case-detail__facility-toggle {
	position: relative;
	flex-shrink: 0;
	width: 1.5rem;
	height: 1.25em;
	margin-left: 0.75rem;
	display: flex;
	align-items: center;
	justify-content: center;
}

.jorato-case-detail__facility-toggle-char {
	position: absolute;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	font-family: var(--jorato-font-family);
	font-size: var(--jorato-h6);
	font-weight: var(--jorato-heading-weight);
	line-height: 1;
	color: var(--jorato-color-blue);
	transition: opacity 300ms ease-out;
}

.jorato-case-detail__facility-toggle-char--minus {
	opacity: 0;
	pointer-events: none;
}

.jorato-case-detail__facility[open] .jorato-case-detail__facility-toggle-char--plus {
	opacity: 0;
	pointer-events: none;
}

.jorato-case-detail__facility[open] .jorato-case-detail__facility-toggle-char--minus {
	opacity: 1;
	pointer-events: auto;
}

/* Height animation is driven in JS (native closed <details> skips layout of body). */
.jorato-case-detail__facility-body-outer {
	overflow: hidden;
	transition: height 300ms ease-out;
}

.jorato-case-detail__facility:not([open]) > .jorato-case-detail__facility-body-outer {
	height: 0;
}

.jorato-case-detail__facility[open] > .jorato-case-detail__facility-body-outer {
	height: auto;
}

.jorato-case-detail__facility-icon-wrap {
	flex-shrink: 0;
	box-sizing: border-box;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: 6px;
	background-color: var(--jorato-color-blue);
	padding: 5px;
}

.jorato-case-detail__facility-icon,
.jorato-case-detail__facility-icon-wrap img {
	box-sizing: border-box;
	width: 22px;
	height: 22px;
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
	display: block;
	/* White glyph on blue tile (works best with dark / full-color icons). */
	filter: brightness(0) invert(1);
}

.jorato-case-detail__facility-title {
	margin: 0;
	font-size: var(--jorato-h6);
	font-weight: var(--jorato-heading-weight);
	line-height: var(--jorato-heading-lh);
	letter-spacing: var(--jorato-heading-ls);
	color: var(--jorato-color-blue);
}

.jorato-case-detail__facility-body {
	box-sizing: border-box;
	overflow: hidden;
	min-height: 0;
	padding: 0 0 20px calc(32px + 10px);
}

@media (prefers-reduced-motion: reduce) {
	.jorato-case-detail__facility-toggle-char,
	.jorato-case-detail__facility-body-outer {
		transition-duration: 0.01ms;
	}
}

.jorato-case-detail__facility-desc {
	margin: 0 0 0.5rem;
	font-family: var(--jorato-font-family);
	font-size: var(--jorato-p-size);
	font-weight: var(--jorato-p-weight);
	line-height: var(--jorato-body-lh);
	color: var(--jorato-color-grey);
	white-space: pre-line;
}

.jorato-case-detail__facility-desc--empty {
	font-style: italic;
	color: var(--jorato-color-grey);
}

.jorato-case-detail__facility-sizes {
	margin: 0;
	font-family: var(--jorato-font-family);
	font-size: var(--jorato-p-small-size);
	color: var(--jorato-color-grey);
}

.jorato-case-detail__post-agent-actions {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.jorato-case-detail__section--facts {
	padding-top: 1.75rem;
}

.jorato-case-detail__section--descriptions {
	padding-top: 1.75rem;
}

.jorato-case-detail__description-item + .jorato-case-detail__description-item {
	margin-top: 2.25rem;
}

.jorato-case-detail__description-title {
	margin: 0 0 0.75rem;
	font-family: var(--jorato-font-family);
	font-size: var(--jorato-h4);
	font-weight: var(--jorato-heading-weight);
	line-height: var(--jorato-heading-lh);
	letter-spacing: var(--jorato-heading-ls);
	color: var(--jorato-color-blue);
}

.jorato-case-detail__description-body {
	margin: 0;
	font-family: var(--jorato-font-family);
	font-size: var(--jorato-p-size);
	font-weight: var(--jorato-p-weight);
	line-height: var(--jorato-body-lh);
	color: var(--jorato-color-blue);
	white-space: pre-line;
}

.jorato-case-detail__facts {
	margin: 0;
	padding: 0;
	font-family: var(--jorato-font-family);
	font-size: var(--jorato-p-size);
	line-height: var(--jorato-body-lh);
}

.jorato-case-detail__fact-row {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 1rem;
	padding: 0.65rem 0;
	border-bottom: 1px solid #e0e0e0;
}

.jorato-case-detail__fact-row:first-child {
	border-top: 1px solid #e0e0e0;
}

.jorato-case-detail__fact-label {
	margin: 0;
	font-weight: var(--jorato-p-bold-weight);
	color: var(--jorato-color-text);
	flex-shrink: 0;
}

.jorato-case-detail__fact-value {
	margin: 0;
	font-weight: var(--jorato-p-weight);
	color: var(--jorato-color-grey);
	text-align: right;
}

.jorato-case-detail__section--agent {
	padding-top: 2rem;
}

.jorato-case-detail__agent-heading {
	margin: 0 0 1rem;
	font-family: var(--jorato-font-family);
	font-size: var(--jorato-h5);
	font-weight: var(--jorato-heading-weight);
	line-height: var(--jorato-heading-lh);
	color: var(--jorato-color-blue);
}

.jorato-case-detail__agent-photo {
	display: block;
	width: 100%;
	max-width: 100%;
	height: auto;
	border-radius: var(--jorato-radius);
	margin-bottom: 1rem;
	object-fit: cover;
}

.jorato-case-detail__agent-name {
	margin: 0 0 0.35rem;
	font-family: var(--jorato-font-family);
	font-size: var(--jorato-h6);
	font-weight: var(--jorato-heading-weight);
	line-height: var(--jorato-heading-lh);
	letter-spacing: var(--jorato-heading-ls);
	color: var(--jorato-color-blue);
}

.jorato-case-detail__agent-title {
	margin: 0 0 0.75rem;
	font-family: var(--jorato-font-family);
	font-size: var(--jorato-p-size);
	font-weight: var(--jorato-p-bold-weight);
	line-height: var(--jorato-body-lh);
	color: var(--jorato-color-blue);
}

.jorato-case-detail__agent-phone {
	margin: 0 0 0.35rem;
	font-family: var(--jorato-font-family);
	font-size: var(--jorato-p-size);
	font-weight: var(--jorato-p-weight);
	line-height: var(--jorato-body-lh);
	color: var(--jorato-color-text);
}

.jorato-case-detail__agent-phone-label {
	margin-right: 0.25rem;
	color: var(--jorato-color-blue);
}

.jorato-case-detail__agent-phone-link {
	color: var(--jorato-color-gold);
	text-decoration: none;
	font-weight: var(--jorato-p-bold-weight);
}

.jorato-case-detail__agent-phone-link:hover,
.jorato-case-detail__agent-phone-link:focus-visible {
	text-decoration: underline;
}

.jorato-case-detail__agent-email {
	margin: 0;
	font-family: var(--jorato-font-family);
	font-size: var(--jorato-p-size);
	font-weight: var(--jorato-p-weight);
	line-height: var(--jorato-body-lh);
	color: var(--jorato-color-text);
}

.jorato-case-detail__agent-email-label {
	margin-right: 0.25rem;
	color: var(--jorato-color-blue);
}

.jorato-case-detail__agent-email-link {
	color: var(--jorato-color-gold);
	text-decoration: none;
	font-weight: var(--jorato-p-bold-weight);
	word-break: break-all;
}

.jorato-case-detail__agent-email-link:hover,
.jorato-case-detail__agent-email-link:focus-visible {
	text-decoration: underline;
}

.jorato-case-detail__agent-actions {
	margin-top: 1.25rem;
}

/* Lightbox */
.jorato-case-detail__lightbox {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 3rem 0.75rem 0.75rem;
	box-sizing: border-box;
}

.jorato-case-detail__lightbox[hidden] {
	display: none !important;
}

.jorato-case-detail__lightbox-backdrop {
	position: absolute;
	inset: 0;
	z-index: 0;
	background: rgba(0, 0, 0, 0.88);
}

.jorato-case-detail__lightbox-stage {
	position: relative;
	z-index: 1;
	max-width: 100%;
	max-height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	touch-action: pan-y;
}

.jorato-case-detail__lightbox-img {
	max-width: 100%;
	max-height: min(85vh, 100%);
	width: auto;
	height: auto;
	object-fit: contain;
	cursor: default;
}

.jorato-case-detail__lightbox-close {
	position: absolute;
	top: 0.75rem;
	right: 0.75rem;
	z-index: 3;
	width: 44px;
	height: 44px;
	border: none;
	border-radius: 50%;
	padding: 0;
	cursor: pointer;
	background: var(--jorato-color-white-90);
	box-shadow: 0 1px 6px rgba(0, 0, 0, 0.2);
	font-size: 1.5rem;
	line-height: 1;
	color: var(--jorato-color-text);
}

.jorato-case-detail__lightbox-close::before {
	content: "×";
}

.jorato-case-detail__lightbox-close:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}

.jorato-case-detail__lightbox-nav {
	position: absolute;
	top: 50%;
	z-index: 3;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	border: none;
	padding: 0;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 1px 6px rgba(0, 0, 0, 0.2);
	background-color: var(--jorato-color-white-90);
	background-image: url("../images/chevron-arrow.svg");
	background-repeat: no-repeat;
	background-position: center;
	background-size: 12px 12px;
}

.jorato-case-detail__lightbox-nav--prev {
	left: 0.5rem;
	transform: translateY(-50%) scaleX(-1);
}

.jorato-case-detail__lightbox-nav--next {
	right: 0.5rem;
	transform: translateY(-50%);
}

.jorato-case-detail__lightbox-nav:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}

.jorato-case-detail__media-json {
	display: none !important;
}
