/*
 * AG Media Property – frontend.
 * Colours and radii are custom properties on .agmp; override them in the theme to match the brand.
 * Typography is inherited from the theme (no web fonts loaded by the plugin).
 */

.agmp {
	--agmp-ink: #1b2a3a;
	--agmp-muted: #586574;
	--agmp-paper: #fff;
	--agmp-surface: #f2f4f6;
	--agmp-line: #d8dde3;
	--agmp-field-border: #aeb7c2;
	--agmp-navy: #1f3f6b;
	--agmp-navy-hover: #172f51;
	--agmp-red: #c8102e;
	--agmp-radius-photo: 6px;
	--agmp-radius-ui: 4px;
	--agmp-radius-plate: 2px;
	--agmp-gap: clamp(16px, 2.5vw, 28px);
	color: var(--agmp-ink);
}

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

.agmp-wrap {
	max-width: 1240px;
	margin-inline: auto;
	padding-inline: clamp(16px, 4vw, 32px);
}

main.agmp {
	padding-block: clamp(24px, 4vw, 48px) clamp(56px, 8vw, 104px);
}

.agmp-sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.agmp a:focus-visible,
.agmp button:focus-visible {
	outline: 2px solid var(--agmp-navy);
	outline-offset: 2px;
}

/* ---------------------------------------------------------------------------
 * Street-sign plate: Viennese district number in red, name on navy.
 * ------------------------------------------------------------------------- */

.agmp-plate {
	display: inline-flex;
	align-items: stretch;
	max-width: 100%;
	padding: 3px;
	background: var(--agmp-navy);
	border-radius: var(--agmp-radius-plate);
	box-shadow: inset 0 0 0 1.5px var(--agmp-navy), inset 0 0 0 2.5px rgba(255, 255, 255, 0.9);
	color: #fff;
	font-size: 0.8125rem;
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: 0.01em;
}

.agmp-plate__num {
	flex: none;
	padding: 0.25em 0.45em;
	background: #fff;
	border-radius: 1px;
	color: var(--agmp-red);
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}

.agmp-plate__name {
	padding: 0.25em 0.6em;
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
}

.agmp-plate--large {
	font-size: 0.9375rem;
	padding: 4px;
}

/* ---------------------------------------------------------------------------
 * Buttons and form controls
 * ------------------------------------------------------------------------- */

.agmp-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 44px;
	padding: 10px 20px;
	background: var(--agmp-navy);
	border: 1px solid var(--agmp-navy);
	border-radius: var(--agmp-radius-ui);
	color: #fff;
	font: inherit;
	font-size: 0.9375rem;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
}

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

.agmp-button--quiet {
	background: transparent;
	color: var(--agmp-navy);
}

.agmp-button--quiet:hover {
	background: rgba(31, 63, 107, 0.07);
	color: var(--agmp-navy);
}

.agmp-button--block {
	width: 100%;
}

.agmp-button[disabled] {
	opacity: 0.65;
	cursor: progress;
}

.agmp input[type="text"],
.agmp input[type="email"],
.agmp input[type="tel"],
.agmp select,
.agmp textarea {
	width: 100%;
	min-height: 44px;
	margin: 0;
	padding: 10px 12px;
	background: #fff;
	border: 1px solid var(--agmp-field-border);
	border-radius: var(--agmp-radius-ui);
	color: var(--agmp-ink);
	font: inherit;
	font-size: 1rem;
	line-height: 1.3;
}

.agmp select {
	appearance: none;
	padding-right: 36px;
	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 d='M1 1.5l5 5 5-5' fill='none' stroke='%231f3f6b' stroke-width='1.8'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 12px center;
	text-overflow: ellipsis;
}

.agmp textarea {
	min-height: 120px;
	resize: vertical;
}

.agmp input:focus-visible,
.agmp select:focus-visible,
.agmp textarea:focus-visible {
	outline: 2px solid var(--agmp-navy);
	outline-offset: 0;
	border-color: var(--agmp-navy);
}

.agmp-field {
	display: flex;
	flex-direction: column;
	gap: 6px;
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
}

.agmp-field__label {
	padding: 0;
	font-size: 0.8125rem;
	font-weight: 600;
}

.agmp-field__hint {
	font-weight: 400;
	color: var(--agmp-muted);
}

.agmp-field__error {
	font-size: 0.8125rem;
	color: var(--agmp-red);
}

.agmp-field__error:empty {
	display: none;
}

.agmp-field.has-error input,
.agmp-field.has-error select,
.agmp-field.has-error textarea {
	border-color: var(--agmp-red);
}

/* ---------------------------------------------------------------------------
 * Filter form
 * ------------------------------------------------------------------------- */

.agmp-search {
	display: grid;
	gap: 18px;
	margin: 0 0 28px;
	padding: clamp(16px, 2.5vw, 24px);
	background: var(--agmp-surface);
	border-radius: var(--agmp-radius-photo);
}

.agmp-search fieldset {
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
}

.agmp-search__top {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.agmp-search__mode {
	display: inline-flex;
	padding: 3px;
	background: #fff;
	border: 1px solid var(--agmp-line);
	border-radius: var(--agmp-radius-ui);
}

.agmp-seg,
.agmp-chip {
	position: relative;
}

.agmp-seg input,
.agmp-chip input {
	position: absolute;
	opacity: 0;
	inset: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	cursor: pointer;
}

.agmp-seg span {
	display: block;
	padding: 8px 18px;
	border-radius: 3px;
	font-size: 0.9375rem;
	font-weight: 600;
	color: var(--agmp-muted);
}

.agmp-seg input:checked + span {
	background: var(--agmp-navy);
	color: #fff;
}

.agmp-seg input:focus-visible + span,
.agmp-chip input:focus-visible + span {
	outline: 2px solid var(--agmp-navy);
	outline-offset: 2px;
}

@media (max-width: 420px) {
	.agmp-seg span {
		padding-inline: 13px;
	}
}

.agmp-search__toggle {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 40px;
	padding-inline: 14px;
	background: #fff;
}

.agmp-search__toggle[hidden] {
	display: none;
}

.agmp-search.is-collapsed .agmp-search__fields {
	display: none;
}

.agmp-search__fields {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 18px 20px;
	align-items: start;
}

.agmp-field__label {
	display: flex;
	justify-content: space-between;
	gap: 8px;
	width: 100%;
}

.agmp-field__value {
	font-weight: 400;
	color: var(--agmp-muted);
	font-variant-numeric: tabular-nums;
}

/* Chips: Zimmer and Freifläche */

.agmp-chips {
	display: grid;
	grid-template-columns: repeat(6, minmax(0, 1fr));
	gap: 0;
	background: #fff;
	border: 1px solid var(--agmp-field-border);
	border-radius: var(--agmp-radius-ui);
	overflow: hidden;
}

.agmp-chips .agmp-chip + .agmp-chip {
	border-left: 1px solid var(--agmp-line);
}

.agmp-chip span {
	display: grid;
	place-items: center;
	min-height: 42px;
	padding: 0 6px;
	font-size: 0.9375rem;
	font-weight: 600;
	color: var(--agmp-ink);
	white-space: nowrap;
}

.agmp-chip input:checked + span {
	background: var(--agmp-navy);
	color: #fff;
}

.agmp-chip--check span {
	display: flex;
	justify-content: flex-start;
	gap: 10px;
	padding: 0 14px;
	background: #fff;
	border: 1px solid var(--agmp-field-border);
	border-radius: var(--agmp-radius-ui);
	font-weight: 400;
	min-height: 44px;
}

.agmp-chip--check span::before {
	content: "";
	flex: none;
	width: 18px;
	height: 18px;
	border: 1.5px solid var(--agmp-field-border);
	border-radius: 3px;
	background: #fff center / 12px no-repeat;
}

.agmp-chip--check input:checked + span {
	background: #fff;
	color: var(--agmp-ink);
	border-color: var(--agmp-navy);
	box-shadow: inset 0 0 0 1px var(--agmp-navy);
}

.agmp-chip--check input:checked + span::before {
	background-color: var(--agmp-navy);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 6.3l2.6 2.5L10 3.4' fill='none' stroke='%23fff' stroke-width='2'/%3E%3C/svg%3E");
	border-color: var(--agmp-navy);
}

/* Range: slider (added by JavaScript) above two text fields */

.agmp-range {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
	align-items: center;
	gap: 8px;
}

.agmp-range label {
	position: relative;
	display: block;
}

.agmp .agmp-range input {
	font-variant-numeric: tabular-nums;
}

.agmp .agmp-range label:has(.agmp-range__prefix) input {
	padding-left: 28px;
}

.agmp .agmp-range label:has(.agmp-range__suffix) input {
	padding-right: 34px;
}

.agmp-range__prefix,
.agmp-range__suffix {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	font-size: 0.9375rem;
	color: var(--agmp-muted);
	pointer-events: none;
}

.agmp-range__prefix {
	left: 12px;
}

.agmp-range__suffix {
	right: 12px;
}

.agmp-range__dash {
	color: var(--agmp-muted);
}

.agmp-slider {
	position: relative;
	height: 28px;
	margin: 0 10px 4px;
}

.agmp-slider::before,
.agmp-slider__fill {
	content: "";
	position: absolute;
	top: 12px;
	height: 4px;
	border-radius: 2px;
}

.agmp-slider::before {
	left: -10px;
	right: -10px;
	background: var(--agmp-line);
}

.agmp-slider__fill {
	background: var(--agmp-navy);
}

.agmp .agmp-slider__input {
	position: absolute;
	top: 0;
	left: -10px;
	width: calc(100% + 20px);
	height: 28px;
	min-height: 0;
	margin: 0;
	padding: 0;
	background: none;
	border: 0;
	pointer-events: none;
	appearance: none;
	-webkit-appearance: none;
}

.agmp .agmp-slider__input:focus-visible {
	outline: none;
}

.agmp-slider__input::-webkit-slider-runnable-track {
	height: 28px;
	background: none;
}

.agmp-slider__input::-moz-range-track {
	background: none;
}

.agmp-slider__input::-webkit-slider-thumb {
	width: 22px;
	height: 22px;
	margin-top: 3px;
	background: #fff;
	border: 2px solid var(--agmp-navy);
	border-radius: 50%;
	box-shadow: 0 1px 3px rgba(20, 35, 58, 0.25);
	cursor: grab;
	pointer-events: auto;
	-webkit-appearance: none;
}

.agmp-slider__input::-moz-range-thumb {
	width: 18px;
	height: 18px;
	background: #fff;
	border: 2px solid var(--agmp-navy);
	border-radius: 50%;
	box-shadow: 0 1px 3px rgba(20, 35, 58, 0.25);
	cursor: grab;
	pointer-events: auto;
}

.agmp-slider__input:focus-visible::-webkit-slider-thumb {
	box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--agmp-navy);
}

.agmp-slider__input:focus-visible::-moz-range-thumb {
	box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--agmp-navy);
}

.agmp-slider__input:active::-webkit-slider-thumb {
	cursor: grabbing;
}

/* Submit */

.agmp-search__submit {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 16px;
}

.agmp-search__submit .agmp-button {
	flex: 1 1 auto;
	min-height: 46px;
	font-variant-numeric: tabular-nums;
}

.agmp-search__submit .agmp-button.is-empty {
	background: var(--agmp-muted);
	border-color: var(--agmp-muted);
}

.agmp-search__reset {
	font-size: 0.875rem;
	color: var(--agmp-navy);
}

@media (min-width: 700px) {
	.agmp-search__fields {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

/* Desktop: Objektart | Ort | Zimmer, then Preis | Fläche | Freifläche + button. */
@media (min-width: 1000px) {
	.agmp-search__fields {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		column-gap: 28px;
	}

	.agmp-field--extra {
		grid-row: span 1;
	}

	.agmp-search__submit {
		grid-column: 3;
		margin-top: -4px;
	}

	.agmp-search__reset {
		flex-basis: 100%;
		text-align: center;
	}
}

/* Active filters as removable chips (archive). */

.agmp-active {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: -12px 0 24px;
	padding: 0;
	list-style: none;
}

.agmp-active a {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 6px 10px 6px 12px;
	background: #fff;
	border: 1px solid var(--agmp-line);
	border-radius: 999px;
	color: var(--agmp-ink);
	font-size: 0.875rem;
	text-decoration: none;
}

.agmp-active a:hover {
	border-color: var(--agmp-navy);
}

.agmp-active a::after {
	content: "";
	width: 10px;
	height: 10px;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M1 1l8 8M9 1L1 9' stroke='%23586574' stroke-width='1.6'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* ---------------------------------------------------------------------------
 * Archive
 * ------------------------------------------------------------------------- */

.agmp-archive__title {
	margin: 0 0 20px;
	font-size: clamp(2rem, 1.4rem + 2.4vw, 3rem);
	font-weight: 650;
	line-height: 1.1;
	letter-spacing: -0.02em;
}

.agmp-results__bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px 24px;
	margin: 0 0 20px;
}

.agmp-results__count {
	margin: 0 auto 0 0;
	font-weight: 650;
	font-variant-numeric: tabular-nums;
}

.agmp-sort {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0;
}

.agmp-sort__label {
	font-size: 0.875rem;
	color: var(--agmp-muted);
}

.agmp .agmp-sort select {
	width: auto;
	min-height: 40px;
	padding-block: 6px;
	font-size: 0.9375rem;
}

.agmp-results__map {
	margin: 0 0 32px;
}

.agmp-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr));
	gap: clamp(28px, 3vw, 44px) var(--agmp-gap);
}

.agmp-empty {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 16px;
	margin: 0;
	padding: clamp(20px, 4vw, 36px);
	background: var(--agmp-surface);
	border-radius: var(--agmp-radius-photo);
}

.agmp-empty p {
	max-width: 60ch;
	margin: 0;
}

/* Cards: the whole card is one link (stretched from the title). */

.agmp-card {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 12px;
	border-radius: var(--agmp-radius-photo);
}

.agmp-card__media {
	aspect-ratio: 4 / 3;
	overflow: hidden;
	background: var(--agmp-surface);
	border-radius: var(--agmp-radius-photo);
}

.agmp-card__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.agmp-card__body {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 8px;
	min-width: 0;
	max-width: 100%;
}

.agmp-card__title {
	display: -webkit-box;
	margin: 0;
	overflow: hidden;
	font-size: 1.0625rem;
	font-weight: 600;
	line-height: 1.35;
	letter-spacing: -0.005em;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}

.agmp-card__title a {
	color: inherit;
	text-decoration: none;
}

.agmp-card__title a::after {
	content: "";
	position: absolute;
	inset: 0;
}

.agmp-card:hover .agmp-card__title a {
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}

.agmp-card__title a:focus-visible {
	outline: none;
}

.agmp-card:has(.agmp-card__title a:focus-visible) {
	outline: 2px solid var(--agmp-navy);
	outline-offset: 6px;
}

.agmp-card__facts {
	display: flex;
	flex-wrap: wrap;
	gap: 2px 16px;
	margin: 0;
	font-size: 0.9375rem;
	color: var(--agmp-muted);
	font-variant-numeric: tabular-nums;
}

.agmp-card__price {
	color: var(--agmp-ink);
	font-weight: 650;
}

.agmp-card__unit {
	font-weight: 400;
	color: var(--agmp-muted);
}

.agmp-pagination {
	margin-top: 48px;
}

.agmp-pagination ul {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.agmp-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	min-height: 44px;
	padding: 0 14px;
	border: 1px solid var(--agmp-line);
	border-radius: var(--agmp-radius-ui);
	color: var(--agmp-ink);
	text-decoration: none;
	font-variant-numeric: tabular-nums;
}

.agmp-pagination a.page-numbers:hover {
	border-color: var(--agmp-navy);
	color: var(--agmp-navy);
}

.agmp-pagination .current {
	background: var(--agmp-navy);
	border-color: var(--agmp-navy);
	color: #fff;
}

.agmp-pagination .dots {
	border-color: transparent;
}

/* ---------------------------------------------------------------------------
 * Detail page
 * ------------------------------------------------------------------------- */

.agmp-single__head {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 12px;
	max-width: 62rem;
}

.agmp-back {
	margin-bottom: 4px;
	font-size: 0.875rem;
	color: var(--agmp-muted);
	text-decoration: none;
}

.agmp-back::before {
	content: "‹";
	margin-right: 6px;
}

.agmp-back:hover {
	color: var(--agmp-navy);
	text-decoration: underline;
}

.agmp-single__title {
	margin: 0;
	font-size: clamp(1.75rem, 1.2rem + 2.1vw, 2.625rem);
	font-weight: 650;
	line-height: 1.15;
	letter-spacing: -0.02em;
	text-wrap: balance;
}

.agmp-single__location {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 20px;
	margin: 0;
	color: var(--agmp-muted);
}

.agmp-single__ref {
	font-variant-numeric: tabular-nums;
}

/* Gallery: full-width swipe carousel on phones, mosaic of up to five from 700px. */

.agmp-gallery {
	position: relative;
	margin: 28px calc(-1 * clamp(16px, 4vw, 32px)) 0;
}

.agmp-gallery__track {
	display: flex;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
	overscroll-behavior-x: contain;
}

.agmp-gallery__track::-webkit-scrollbar {
	display: none;
}

.agmp-gallery__item {
	position: relative;
	flex: 0 0 100%;
	aspect-ratio: 4 / 3;
	margin: 0;
	padding: 0;
	overflow: hidden;
	background: var(--agmp-surface);
	border: 0;
	cursor: zoom-in;
	scroll-snap-align: start;
}

.agmp-gallery__item img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.agmp .agmp-gallery__item:focus-visible {
	outline: 3px solid #fff;
	outline-offset: -7px;
	box-shadow: inset 0 0 0 4px var(--agmp-navy);
}

.agmp-gallery__count {
	position: absolute;
	left: 12px;
	bottom: 12px;
	margin: 0;
	padding: 4px 10px;
	background: rgba(14, 22, 32, 0.72);
	border-radius: 999px;
	color: #fff;
	font-size: 0.8125rem;
	font-weight: 600;
	font-variant-numeric: tabular-nums;
	pointer-events: none;
}

.agmp-gallery__actions {
	position: absolute;
	right: 12px;
	bottom: 12px;
	display: flex;
	gap: 8px;
}

.agmp-gallery__action {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 38px;
	padding: 8px 14px;
	background: #fff;
	border: 0;
	border-radius: 999px;
	box-shadow: 0 2px 10px rgba(14, 22, 32, 0.22);
	color: var(--agmp-ink);
	font: inherit;
	font-size: 0.875rem;
	font-weight: 600;
	line-height: 1;
	text-decoration: none;
	cursor: pointer;
}

.agmp-gallery__action:hover {
	background: var(--agmp-surface);
	color: var(--agmp-ink);
}

.agmp-gallery__action svg {
	color: var(--agmp-navy);
}

/* Phones: only "Grundriss" next to the counter; all photos are a swipe away. */
@media (max-width: 699px) {
	.agmp-gallery__action[data-index] {
		display: none;
	}
}

@media (min-width: 700px) {
	.agmp-gallery {
		margin-inline: 0;
	}

	.agmp-gallery__track {
		display: grid;
		grid-template-columns: repeat(4, 1fr);
		grid-template-rows: repeat(2, 1fr);
		gap: 6px;
		height: clamp(380px, 42vw, 580px);
		overflow: hidden;
		border-radius: var(--agmp-radius-photo);
	}

	.agmp-gallery__item {
		width: 100%;
		height: 100%;
		aspect-ratio: auto;
	}

	.agmp-gallery__item:first-child {
		grid-column: span 2;
		grid-row: span 2;
	}

	.agmp-gallery__item:nth-child(n + 6) {
		display: none;
	}

	.agmp-gallery__item img {
		transition: filter 0.2s ease;
	}

	.agmp-gallery__item:hover img {
		filter: brightness(0.9);
	}

	.agmp-gallery__count {
		display: none;
	}

	.agmp-gallery__actions {
		right: 16px;
		bottom: 16px;
	}

	/* Fewer photos: fill the space instead of leaving holes. */
	.agmp-gallery--1 .agmp-gallery__track {
		grid-template-columns: 1fr;
	}

	.agmp-gallery--1 .agmp-gallery__item:first-child {
		grid-column: auto;
	}

	.agmp-gallery--2 .agmp-gallery__track {
		grid-template-columns: 1fr 1fr;
		grid-template-rows: 1fr;
	}

	.agmp-gallery--2 .agmp-gallery__item:first-child {
		grid-column: auto;
		grid-row: auto;
	}

	.agmp-gallery--3 .agmp-gallery__track {
		grid-template-columns: 2fr 1fr;
	}

	.agmp-gallery--3 .agmp-gallery__item:first-child {
		grid-column: auto;
	}

	.agmp-gallery--4 .agmp-gallery__item:nth-child(4) {
		grid-column: span 2;
	}
}

/* Key facts */

.agmp-facts {
	display: grid;
	grid-template-columns: 1fr 1fr;
	margin: 28px 0 0;
	border-block: 1px solid var(--agmp-line);
}

.agmp-facts__item {
	min-width: 0;
	padding: 16px 16px 16px 0;
}

.agmp-facts__item:nth-child(n + 3) {
	border-top: 1px solid var(--agmp-line);
}

.agmp-facts dt {
	margin: 0 0 4px;
	font-size: 0.8125rem;
	color: var(--agmp-muted);
}

.agmp-facts dd {
	margin: 0;
	font-size: clamp(1.1875rem, 0.95rem + 1vw, 1.625rem);
	font-weight: 650;
	line-height: 1.2;
	letter-spacing: -0.01em;
	font-variant-numeric: tabular-nums;
	overflow-wrap: anywhere;
}

@media (min-width: 800px) {
	.agmp-facts {
		grid-template-columns: none;
		grid-auto-columns: minmax(0, 1fr);
		grid-auto-flow: column;
	}

	.agmp-facts__item {
		padding: 20px 24px;
	}

	.agmp-facts__item:first-child {
		padding-left: 0;
	}

	.agmp-facts__item:nth-child(n + 3) {
		border-top: 0;
	}

	.agmp-facts__item + .agmp-facts__item {
		border-left: 1px solid var(--agmp-line);
	}
}

/* Body: content and contact column */

.agmp-single__body {
	display: grid;
	gap: 48px;
	margin-top: 40px;
}

.agmp-single__main {
	min-width: 0;
}

@media (min-width: 960px) {
	.agmp-single__body {
		grid-template-columns: minmax(0, 1fr) 360px;
		gap: clamp(48px, 5vw, 72px);
		align-items: start;
	}
}

.agmp-section {
	margin: 0 0 48px;
}

.agmp-section:last-child {
	margin-bottom: 0;
}

.agmp-section__title {
	margin: 0 0 16px;
	font-size: 1.375rem;
	font-weight: 650;
	line-height: 1.25;
	letter-spacing: -0.01em;
}

.agmp-prose {
	max-width: 68ch;
	line-height: 1.65;
}

.agmp-prose p {
	margin: 0 0 1em;
}

.agmp-prose p:last-child {
	margin-bottom: 0;
}

.agmp-prose--small {
	font-size: 0.9375rem;
	color: var(--agmp-muted);
}

/* Structured description (see AGMP_Description). */

.agmp-prose .agmp-prose__h {
	margin: 2em 0 0.6em;
	font-size: 1.125rem;
	font-weight: 650;
	line-height: 1.3;
	letter-spacing: -0.005em;
}

.agmp-prose > .agmp-prose__h:first-child {
	margin-top: 0;
}

.agmp-prose strong {
	font-weight: 650;
}

.agmp-prose a {
	color: var(--agmp-navy);
	text-decoration-thickness: 1px;
	text-underline-offset: 2px;
	overflow-wrap: anywhere;
}

.agmp-prose__list {
	display: grid;
	gap: 6px;
	margin: 0 0 1.25em;
	padding: 0;
	list-style: none;
}

.agmp-prose__list li {
	position: relative;
	padding-left: 28px;
}

/* Check mark drawn with borders: no icon font, follows the brand colour. */
.agmp-prose__list li::before {
	content: "";
	position: absolute;
	left: 3px;
	top: 0.42em;
	width: 11px;
	height: 6px;
	border: solid var(--agmp-navy);
	border-width: 0 0 2px 2px;
	transform: rotate(-45deg);
}

@media (min-width: 760px) {
	.agmp-prose__list:has(> li:nth-child(6)) {
		grid-template-columns: 1fr 1fr;
		column-gap: 28px;
	}
}

/* Cells draw their right/bottom border and overlap the frame by 1px, so empty cells stay white. */
.agmp-prose__pairs {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
	margin: 0 0 1.25em;
	overflow: hidden;
	border: 1px solid var(--agmp-line);
	border-radius: var(--agmp-radius-ui);
}

.agmp-prose__pairs > div {
	margin: 0 -1px -1px 0;
	padding: 10px 14px;
	border-right: 1px solid var(--agmp-line);
	border-bottom: 1px solid var(--agmp-line);
}

.agmp-prose__pairs dt {
	font-size: 0.8125rem;
	color: var(--agmp-muted);
}

.agmp-prose__pairs dd {
	margin: 2px 0 0;
	font-weight: 600;
	font-variant-numeric: tabular-nums;
}

.agmp-prose .agmp-prose__fine {
	font-size: 0.8125rem;
	line-height: 1.5;
	color: var(--agmp-muted);
}

.agmp-prose .agmp-prose__fine + .agmp-prose__fine {
	margin-top: -0.75em;
}

/* Infrastructure distances: one card per group. */

.agmp-distances {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
	gap: 12px;
	margin: 0 0 1em;
}

.agmp-distances__group {
	padding: 14px 16px 10px;
	background: var(--agmp-surface);
	border-radius: var(--agmp-radius-photo);
}

.agmp-prose .agmp-distances__title {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 6px;
	font-size: 0.9375rem;
	font-weight: 650;
	line-height: 1.3;
}

.agmp-distances__title svg {
	flex: none;
	color: var(--agmp-navy);
}

.agmp-distances dl {
	margin: 0;
	font-size: 0.875rem;
}

.agmp-distances dl > div {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	padding: 5px 0;
	border-top: 1px solid var(--agmp-line);
}

.agmp-distances dl > div:first-child {
	border-top: 0;
}

.agmp-distances dt {
	color: var(--agmp-ink);
}

.agmp-distances dd {
	margin: 0;
	color: var(--agmp-muted);
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

.agmp-note {
	max-width: 68ch;
	margin: 12px 0 0;
	font-size: 0.875rem;
	color: var(--agmp-muted);
}

.agmp-table {
	margin: 0;
	border-top: 1px solid var(--agmp-line);
}

.agmp-table > div {
	display: grid;
	grid-template-columns: minmax(8rem, 2fr) 3fr;
	gap: 16px;
	padding: 11px 0;
	border-bottom: 1px solid var(--agmp-line);
}

.agmp-table dt {
	color: var(--agmp-muted);
}

.agmp-table dd {
	margin: 0;
	font-variant-numeric: tabular-nums;
	overflow-wrap: anywhere;
}

.agmp-features {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 20px 0 0;
	padding: 0;
	list-style: none;
}

.agmp-features li {
	padding: 6px 12px;
	background: var(--agmp-surface);
	border-radius: var(--agmp-radius-ui);
	font-size: 0.9375rem;
}

/* Energy certificate: value plus a compact A++–G scale. */

.agmp-energy {
	display: grid;
	gap: 28px;
}

@media (min-width: 620px) {
	.agmp-energy {
		grid-template-columns: 1fr 1fr;
		gap: 40px;
	}
}

.agmp-energy__label {
	margin: 0;
	font-size: 0.875rem;
	color: var(--agmp-muted);
}

.agmp-energy__value {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 4px 12px;
	margin: 4px 0 12px;
	font-size: 1.25rem;
	font-weight: 650;
	font-variant-numeric: tabular-nums;
}

.agmp-energy__class {
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--agmp-muted);
}

.agmp-energy__scale {
	display: grid;
	grid-template-columns: repeat(9, 1fr);
	align-items: end;
	gap: 3px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.agmp-energy__scale li {
	height: 8px;
	background: hsl(calc(128 - var(--agmp-step) * 16) 62% 38%);
	border-radius: 1px;
	opacity: 0.3;
	font-size: 0;
}

.agmp-energy__scale li.is-current {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 24px;
	opacity: 1;
	color: #fff;
	font-size: 0.75rem;
	font-weight: 700;
}

/* Map */

.agmp-map {
	position: relative;
	height: var(--agmp-map-h, clamp(280px, 45vw, 440px));
	margin-top: 20px;
	overflow: hidden;
	background-color: var(--agmp-surface);
	border: 1px solid var(--agmp-line);
	border-radius: var(--agmp-radius-photo);
}

.agmp-results__map .agmp-map {
	margin-top: 0;
}

.agmp-map__consent {
	position: absolute;
	inset: 0;
	z-index: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 14px;
	padding: 24px;
	text-align: center;
	/* A faint street grid while the real map is not loaded yet. */
	background-image:
		repeating-linear-gradient(28deg, transparent 0 46px, rgba(31, 63, 107, 0.07) 46px 48px),
		repeating-linear-gradient(118deg, transparent 0 70px, rgba(31, 63, 107, 0.07) 70px 73px);
}

.agmp-map__consent p {
	max-width: 44ch;
	margin: 0;
	padding: 10px 14px;
	background: rgba(242, 244, 246, 0.92);
	border-radius: var(--agmp-radius-ui);
	font-size: 0.9375rem;
	color: var(--agmp-muted);
}

.agmp-map__consent .agmp-button {
	background: #fff;
}

.agmp-map.is-loaded .agmp-map__consent {
	display: none;
}

.agmp-map__canvas {
	position: absolute;
	inset: 0;
}

.agmp .leaflet-div-icon.agmp-pin-icon {
	background: none;
	border: 0;
}

.agmp-pin {
	display: block;
	width: 20px;
	height: 20px;
	background: var(--agmp-navy);
	border: 3px solid #fff;
	border-radius: 50%;
	box-shadow: 0 0 0 1px var(--agmp-navy), 0 1px 4px rgba(27, 42, 58, 0.4);
}

.agmp-pin--count {
	display: grid;
	place-items: center;
	width: 30px;
	height: 30px;
	color: #fff;
	font-size: 0.8125rem;
	font-weight: 700;
	line-height: 1;
	font-variant-numeric: tabular-nums;
}

.agmp .agmp-popup-list__title {
	margin: 0;
	padding: 10px 12px;
	border-bottom: 1px solid var(--agmp-line);
	font-size: 0.8125rem;
	font-weight: 650;
}

.agmp-popup-list ul {
	max-height: 260px;
	margin: 0;
	padding: 0;
	overflow-y: auto;
	list-style: none;
}

.agmp-popup-list li + li {
	border-top: 1px solid var(--agmp-line);
}

.agmp .agmp-popup-list a {
	display: block;
	padding: 9px 12px;
	color: var(--agmp-ink);
	text-decoration: none;
}

.agmp .agmp-popup-list a:hover {
	background: var(--agmp-surface);
}

.agmp .leaflet-popup-content-wrapper {
	padding: 0;
	overflow: hidden;
	border-radius: var(--agmp-radius-photo);
}

.agmp .leaflet-popup-content {
	width: 220px !important;
	margin: 0;
	font: inherit;
	line-height: 1.35;
}

.agmp a.agmp-popup {
	display: block;
	color: var(--agmp-ink);
	text-decoration: none;
}

.agmp-popup img {
	display: block;
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
}

.agmp-popup__body {
	display: block;
	padding: 10px 12px 12px;
}

.agmp-popup__title {
	display: block;
	margin-bottom: 4px;
	font-size: 0.875rem;
	font-weight: 600;
}

.agmp-popup__facts {
	display: block;
	font-size: 0.8125rem;
	color: var(--agmp-muted);
}

/* Leaflet's stylesheet loads later, so the rules above are scoped with .agmp to win. */

/* Floor plans and documents */

.agmp-plans {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 12px;
}

.agmp-plans__item {
	padding: 10px;
	background: #fff;
	border: 1px solid var(--agmp-line);
	border-radius: var(--agmp-radius-photo);
	cursor: zoom-in;
}

.agmp-plans__item img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 3;
	object-fit: contain;
}

.agmp-docs {
	margin: 0;
	padding: 0;
	list-style: none;
	border-top: 1px solid var(--agmp-line);
}

.agmp-docs li {
	display: flex;
	justify-content: space-between;
	gap: 16px;
	padding: 12px 0;
	border-bottom: 1px solid var(--agmp-line);
}

.agmp-docs a {
	color: var(--agmp-navy);
	font-weight: 600;
	text-decoration: none;
}

.agmp-docs a:hover {
	text-decoration: underline;
}

.agmp-docs__meta {
	flex: none;
	font-size: 0.875rem;
	color: var(--agmp-muted);
}

/* Contact column */

.agmp-contact {
	padding: clamp(20px, 3vw, 28px);
	background: var(--agmp-surface);
	border-radius: var(--agmp-radius-photo);
	scroll-margin-top: 24px;
}

@media (min-width: 960px) {
	.agmp-contact {
		position: sticky;
		/* --agmp-sticky-top is set by JavaScript when the box is taller than the window,
		   so it sticks by its bottom edge and the send button stays reachable. */
		top: var(--agmp-sticky-top, calc(24px + var(--wp-admin--admin-bar--height, 0px)));
	}
}

.agmp-contact__title {
	margin: 0 0 18px;
	font-size: 1.25rem;
	font-weight: 650;
	line-height: 1.25;
}

.agmp-person {
	display: flex;
	align-items: center;
	gap: 14px;
}

.agmp-person__photo {
	flex: none;
	width: 64px;
	height: 64px;
	object-fit: cover;
	border-radius: 50%;
	background: #fff;
}

.agmp-person__name {
	margin: 0;
	font-weight: 650;
}

.agmp-person__role {
	margin: 2px 0 0;
	font-size: 0.875rem;
	color: var(--agmp-muted);
}

.agmp-person__links {
	display: grid;
	gap: 6px;
	margin: 16px 0 22px;
	padding: 0;
	list-style: none;
	font-size: 0.9375rem;
}

.agmp-person__links span {
	display: inline-block;
	min-width: 4.5em;
	color: var(--agmp-muted);
}

.agmp-person__links a {
	color: var(--agmp-navy);
	text-decoration: none;
	overflow-wrap: anywhere;
	font-variant-numeric: tabular-nums;
}

.agmp-person__links a:hover {
	text-decoration: underline;
}

.agmp-form {
	display: grid;
	gap: 14px;
}

.agmp-check {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 10px;
	font-size: 0.8125rem;
	line-height: 1.45;
	color: var(--agmp-muted);
}

.agmp-check input {
	width: 18px;
	height: 18px;
	margin: 1px 0 0;
	accent-color: var(--agmp-navy);
}

.agmp-check a {
	color: var(--agmp-navy);
}

.agmp-form__error {
	margin: 0;
	padding: 10px 12px;
	background: #fbe9ec;
	border-radius: var(--agmp-radius-ui);
	color: #8a0b20;
	font-size: 0.875rem;
}

.agmp-form__done {
	margin: 0;
	padding: 14px 16px;
	background: #e6f0e8;
	border-radius: var(--agmp-radius-ui);
	color: #1d4d2c;
	font-weight: 600;
}

.agmp-hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* General contact form [agmp_kontakt] */
.agmp-kontakt .agmp-form {
	gap: 18px;
}

.agmp-kontakt .agmp-field__label {
	font-size: 0.875rem;
}

.agmp-kontakt__row {
	display: grid;
	gap: 18px;
}

@media (min-width: 640px) {
	.agmp-kontakt__row {
		grid-template-columns: 1fr 1fr;
	}

	.agmp-kontakt__row--name {
		grid-template-columns: minmax(140px, 1fr) 3fr;
	}
}

.agmp-req {
	margin-left: 2px;
	color: var(--agmp-red);
}

.agmp-kontakt__checks {
	display: grid;
	gap: 10px;
	padding-top: 4px;
}

.agmp-kontakt .agmp-check {
	font-size: 0.875rem;
}

.agmp-kontakt__submit {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 20px;
}

.agmp-kontakt__note {
	margin: 0;
	font-size: 0.8125rem;
	color: var(--agmp-muted);
}

/* Phone action bar */

.agmp-actionbar {
	position: fixed;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 50;
	display: flex;
	gap: 8px;
	padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
	background: #fff;
	border-top: 1px solid var(--agmp-line);
}

.agmp-actionbar .agmp-button {
	flex: 1;
}

.agmp-actionbar .agmp-button--quiet {
	background: #fff;
}

main.agmp-single {
	padding-bottom: 120px;
}

@media (min-width: 960px) {
	.agmp-actionbar {
		display: none;
	}

	main.agmp-single {
		padding-bottom: clamp(56px, 8vw, 104px);
	}
}

/* Lightbox: counter and close on top, photo in the middle, thumbnails below. */

.agmp-lightbox {
	width: 100vw;
	max-width: none;
	height: 100vh;
	height: 100dvh;
	max-height: none;
	margin: 0;
	padding: 0;
	overflow: hidden;
	background: #0e1620;
	border: 0;
	color: #fff;
}

.agmp-lightbox::backdrop {
	background: transparent;
}

.agmp-lightbox[open] {
	display: grid;
	grid-template-rows: 64px minmax(0, 1fr) auto;
}

.agmp-lightbox__count {
	align-self: center;
	margin: 0;
	padding-left: 20px;
	font-size: 0.9375rem;
	font-weight: 600;
	font-variant-numeric: tabular-nums;
}

.agmp-lightbox__figure {
	display: grid;
	place-items: center;
	min-height: 0;
	margin: 0;
	padding: 0 clamp(8px, 7vw, 96px);
	touch-action: pan-y;
}

.agmp-lightbox__img {
	display: block;
	width: auto;
	height: auto;
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
	user-select: none;
}

.agmp-lightbox__img.is-loading {
	opacity: 0;
}

.agmp-lightbox__thumbs {
	display: flex;
	gap: 8px;
	padding: 14px 20px 18px;
	overflow-x: auto;
	scrollbar-width: thin;
	scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}

.agmp-lightbox__thumbs:empty {
	display: none;
}

.agmp-lightbox__thumb {
	flex: none;
	width: 84px;
	height: 60px;
	padding: 0;
	overflow: hidden;
	background: rgba(255, 255, 255, 0.08);
	border: 0;
	border-radius: 4px;
	opacity: 0.5;
	cursor: pointer;
}

.agmp-lightbox__thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.agmp-lightbox__thumb:hover {
	opacity: 0.85;
}

.agmp-lightbox__thumb[aria-current="true"] {
	opacity: 1;
	box-shadow: 0 0 0 2px #fff;
}

.agmp-lightbox__btn,
.agmp-lightbox__close {
	position: absolute;
	display: grid;
	place-items: center;
	width: 48px;
	height: 48px;
	padding: 0;
	background: rgba(255, 255, 255, 0.12);
	border: 0;
	border-radius: 50%;
	color: #fff;
	cursor: pointer;
}

.agmp-lightbox__btn:hover,
.agmp-lightbox__close:hover {
	background: rgba(255, 255, 255, 0.24);
}

.agmp-lightbox button:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}

.agmp-lightbox__btn {
	top: calc(50% - 24px - 30px);
}

.agmp-lightbox__prev {
	left: 20px;
}

.agmp-lightbox__next {
	right: 20px;
}

.agmp-lightbox__btn::before {
	content: "";
	width: 12px;
	height: 12px;
	border: solid #fff;
	border-width: 0 0 2px 2px;
	transform: translateX(2px) rotate(45deg);
}

.agmp-lightbox__next::before {
	transform: translateX(-2px) rotate(-135deg);
}

.agmp-lightbox__close {
	top: 8px;
	right: 12px;
}

.agmp-lightbox__close::before,
.agmp-lightbox__close::after {
	content: "";
	grid-area: 1 / 1;
	width: 18px;
	height: 2px;
	background: #fff;
	transform: rotate(45deg);
}

.agmp-lightbox__close::after {
	transform: rotate(-45deg);
}

.agmp-lightbox[data-single] .agmp-lightbox__btn,
.agmp-lightbox[data-single] .agmp-lightbox__thumbs {
	display: none;
}

@media (max-width: 699px) {
	.agmp-lightbox__btn {
		display: none;
	}

	.agmp-lightbox__figure {
		padding: 0;
	}

	.agmp-lightbox__thumb {
		width: 64px;
		height: 46px;
	}
}

@media (prefers-reduced-motion: no-preference) {
	.agmp-lightbox[open] {
		animation: agmp-fade 0.18s ease-out;
	}

	.agmp-lightbox__img {
		transition: opacity 0.18s ease;
	}
}

@keyframes agmp-fade {
	from {
		opacity: 0;
	}
}

/* ---------------------------------------------------------------------------
 * Showcase layout ([agmp_list layout="showcase"], [agmp_latest layout="showcase"])
 * Large photo, centred text; the photo drifts slowly on hover.
 * ------------------------------------------------------------------------- */

.agmp-grid--showcase {
	gap: clamp(40px, 5vw, 64px) clamp(20px, 3vw, 40px);
}

.agmp-show {
	text-align: center;
}

.agmp-show__media {
	display: block;
	aspect-ratio: 4 / 3;
	margin: 0 0 24px;
	overflow: hidden;
	background: var(--agmp-surface);
}

.agmp .agmp-show__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transform: scale(1.04) translateX(-6px);
	transition: transform 1s cubic-bezier(0.22, 0.54, 0.04, 0.98);
	backface-visibility: hidden;
}

.agmp-show:hover .agmp-show__img,
.agmp-show:focus-within .agmp-show__img {
	transform: scale(1.04) translateX(6px);
}

.agmp-show__place {
	margin: 0 0 8px;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.3em;
	text-transform: uppercase;
	color: var(--agmp-navy);
}

.agmp-show__title {
	display: -webkit-box;
	margin: 0 auto 10px;
	max-width: 30ch;
	overflow: hidden;
	font-size: 1.25rem;
	font-weight: 500;
	line-height: 1.3;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
}

.agmp-show__title a {
	color: inherit;
	text-decoration: none;
}

.agmp-show__title a::after {
	/* Whole card is clickable through the title link. */
	content: "";
	position: absolute;
	inset: 0;
}

.agmp-show {
	position: relative;
}

.agmp-show__media {
	position: relative;
	z-index: 1;
}

.agmp-show__facts {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 4px 18px;
	margin: 0;
	font-size: 0.875rem;
	color: var(--agmp-muted);
	font-variant-numeric: tabular-nums;
}

.agmp-show__facts span + span {
	position: relative;
}

.agmp-show__facts span + span::before {
	content: "";
	position: absolute;
	left: -10px;
	top: 50%;
	width: 3px;
	height: 3px;
	border-radius: 50%;
	background: currentColor;
	opacity: 0.6;
}

/* Reveal on scroll (JavaScript adds .agmp-js and .is-visible). */
@media (prefers-reduced-motion: no-preference) {
	.agmp-js [data-agmp-reveal] > * {
		opacity: 0;
		transform: translateY(28px);
		transition: opacity 0.8s ease, transform 0.9s cubic-bezier(0.22, 0.54, 0.04, 0.98);
		transition-delay: calc(var(--agmp-i, 0) * 120ms);
	}

	.agmp-js [data-agmp-reveal] > .is-visible {
		opacity: 1;
		transform: none;
	}
}

/* ---------------------------------------------------------------------------
 * Floor plans with tabs ([agmp_grundrisse])
 * ------------------------------------------------------------------------- */

.agmp-plans-tabs {
	display: grid;
	gap: 32px;
}

.agmp-pt__nav {
	display: flex;
	gap: 8px;
	margin: 0 calc(-1 * clamp(16px, 4vw, 32px));
	padding: 0 clamp(16px, 4vw, 32px) 6px;
	overflow-x: auto;
	scrollbar-width: none;
}

.agmp-pt__nav[hidden] {
	display: none;
}

.agmp-pt__tab {
	flex: none;
	display: grid;
	gap: 3px;
	min-width: 150px;
	padding: 12px 16px;
	background: var(--agmp-surface);
	border: 0;
	border-left: 2px solid transparent;
	color: var(--agmp-ink);
	font: inherit;
	text-align: left;
	cursor: pointer;
	transition: border-color 0.3s ease, background-color 0.3s ease;
}

.agmp-pt__tab-title {
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.2em;
	text-transform: uppercase;
}

.agmp-pt__tab-meta {
	font-size: 0.8125rem;
	color: var(--agmp-muted);
}

.agmp-pt__tab[aria-selected="true"] {
	border-left-color: var(--agmp-navy);
	background: #fff;
	box-shadow: inset 0 0 0 1px var(--agmp-line);
}

.agmp-pt__tab:focus-visible {
	outline: 2px solid var(--agmp-navy);
	outline-offset: 2px;
}

.agmp-pt__panels {
	min-width: 0;
}

.agmp-pt__panel {
	display: grid;
	gap: 28px;
	padding-bottom: 40px;
}

.agmp-pt__panel[hidden] {
	display: none;
}

.agmp-pt__panel:focus-visible {
	outline: 2px solid var(--agmp-navy);
	outline-offset: 6px;
}

.agmp-pt__plan {
	display: grid;
	place-items: center;
	min-height: 260px;
	cursor: zoom-in;
}

.agmp .agmp-pt__plan img {
	display: block;
	width: auto;
	max-width: 100%;
	height: auto;
	max-height: 520px;
	object-fit: contain;
}

.agmp-pt__title {
	margin: 0 0 18px;
	font-size: 1.125rem;
	font-weight: 500;
	line-height: 1.35;
}

.agmp-pt__facts {
	margin: 0 0 22px;
}

.agmp-pt__facts > div {
	display: flex;
	justify-content: space-between;
	gap: 16px;
	padding: 10px 0;
	border-bottom: 1px solid var(--agmp-line);
}

.agmp-pt__facts dt {
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.3em;
	text-transform: uppercase;
	color: var(--agmp-navy);
}

.agmp-pt__facts dd {
	margin: 0;
	font-variant-numeric: tabular-nums;
	text-align: right;
}

.agmp-pt__teaser {
	margin: 0 0 24px;
	color: var(--agmp-muted);
	line-height: 1.6;
}

@media (min-width: 1000px) {
	.agmp-plans-tabs {
		grid-template-columns: 250px minmax(0, 1fr);
		align-items: start;
		gap: 50px;
	}

	.agmp-pt__nav {
		flex-direction: column;
		gap: 4px;
		margin: 0;
		padding: 22px 0;
		overflow: visible;
		background: var(--agmp-surface);
	}

	.agmp-pt__tab {
		min-width: 0;
		padding: 10px 26px;
		background: transparent;
		border-left-width: 3px;
	}

	.agmp-pt__tab[aria-selected="true"] {
		background: #fff;
		box-shadow: none;
	}

	.agmp-pt__panel {
		grid-template-columns: minmax(0, 1fr) 300px;
		gap: 50px;
		align-items: start;
		padding-bottom: 0;
	}
}

@media (prefers-reduced-motion: no-preference) {
	.agmp-pt__panel.is-entering .agmp-pt__plan,
	.agmp-pt__panel.is-entering .agmp-pt__info {
		animation: agmp-pt-in 0.6s cubic-bezier(0.22, 0.54, 0.04, 0.98) both;
	}

	.agmp-pt__panel.is-entering .agmp-pt__info {
		animation-delay: 0.08s;
	}
}

@keyframes agmp-pt-in {
	from {
		opacity: 0;
		transform: translateY(14px);
	}
}

/* ---------------------------------------------------------------------------
 * Hover feedback: card and gallery photos move slightly, links react.
 * ------------------------------------------------------------------------- */

.agmp-card {
	position: relative;
}

.agmp-card__media {
	overflow: hidden;
}

.agmp .agmp-card__img {
	transition: transform 0.9s cubic-bezier(0.22, 0.54, 0.04, 0.98);
}

.agmp-card:hover .agmp-card__img,
.agmp-card:focus-within .agmp-card__img {
	transform: scale(1.05);
}

.agmp-card__title a::after {
	content: "";
	position: absolute;
	inset: 0;
}

.agmp .agmp-gallery__item img {
	transition: transform 0.9s cubic-bezier(0.22, 0.54, 0.04, 0.98), filter 0.3s ease;
}

.agmp .agmp-gallery__item:hover img {
	transform: scale(1.04);
}

.agmp .agmp-contact a:hover,
.agmp .agmp-docs a:hover,
.agmp .agmp-back:hover {
	text-decoration: underline;
	text-underline-offset: 3px;
}

.agmp .agmp-button {
	transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

@media (prefers-reduced-motion: reduce) {
	.agmp .agmp-card__img,
	.agmp .agmp-gallery__item img,
	.agmp .agmp-show__img {
		transition: none;
		transform: none !important;
	}
}

/* Showcase: fixed, centred columns (3 / 2 / 1) instead of auto-fill. */
.agmp-grid.agmp-grid--showcase {
	grid-template-columns: minmax(0, 1fr);
	max-width: 1300px;
	margin-inline: auto;
}

@media (min-width: 640px) {
	.agmp-grid.agmp-grid--showcase {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 1000px) {
	.agmp-grid.agmp-grid--showcase {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

/* Floor plans: the plan sits on a white sheet with an offset backdrop; steady size between tabs. */
.agmp-pt__plan {
	position: relative;
	display: block;
	aspect-ratio: 1 / 1;
	max-height: 600px;
	min-height: 0;
	margin: 0 12px 12px 0;
	padding: clamp(14px, 2vw, 24px);
	background: #fff;
	border: 1px solid var(--agmp-line);
	/* Offset backdrop, like a sheet lying on a second one. */
	box-shadow: 12px 12px 0 0 var(--agmp-surface);
	overflow: hidden;
}

.agmp .agmp-pt__plan img {
	width: 100%;
	height: 100%;
	max-height: none;
	object-fit: contain;
	transition: transform 0.8s cubic-bezier(0.22, 0.54, 0.04, 0.98);
}

.agmp-pt__plan:hover img {
	transform: scale(1.03);
}

.agmp-pt__zoom {
	position: absolute;
	right: 14px;
	bottom: 14px;
	padding: 7px 12px;
	background: rgba(255, 255, 255, 0.92);
	border: 1px solid var(--agmp-line);
	font-size: 12px;
	color: var(--agmp-ink);
	opacity: 0;
	transform: translateY(6px);
	transition: opacity 0.3s ease, transform 0.3s ease;
}

.agmp-pt__plan:hover .agmp-pt__zoom,
.agmp-pt__plan:focus-visible .agmp-pt__zoom {
	opacity: 1;
	transform: none;
}

@media (hover: none) {
	.agmp-pt__zoom {
		opacity: 1;
		transform: none;
	}
}

.agmp-pt__tab {
	position: relative;
}

.agmp-pt__tab:hover .agmp-pt__tab-title {
	color: var(--agmp-navy);
}

.agmp-pt__tab[aria-selected="true"] .agmp-pt__tab-title {
	color: var(--agmp-navy);
}

/* ---------------------------------------------------------------------------
 * Robust against theme styles
 * ------------------------------------------------------------------------- */

/* Themes often add a bottom margin to every label; these labels are buttons. */
.agmp .agmp-seg,
.agmp .agmp-chip {
	margin: 0;
}

.agmp-search fieldset.agmp-search__mode {
	padding: 3px;
	border: 1px solid var(--agmp-line);
}

/* The € and m² sit on top of the field, also when a theme positions the inputs. */
.agmp-range__prefix,
.agmp-range__suffix {
	z-index: 1;
}

/* paginate_links() gives the list and its items the same class: only items are buttons. */
.agmp-pagination ul.page-numbers {
	display: inline-flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 6px;
	min-width: 0;
	min-height: 0;
	margin: 0;
	padding: 0;
	background: none;
	border: 0;
}

.agmp-pagination ul.page-numbers li {
	margin: 0;
	padding: 0;
	list-style: none;
}
