/* Paust Referenzen — grid, filters, map, slider, single.
   Clean / Swiss-minimal, mobile-first. Colors are CSS variables (overridable). */
.pref,
.pref-slider,
.pref-single {
	--pref-accent: #e30613;          /* Paust red */
	--pref-accent-ink: #fff;
	--pref-ink: #1a1a1a;
	--pref-muted: #6b7280;
	--pref-line: #e5e7eb;
	--pref-surface: #fff;
	--pref-bg-soft: #f4f5f7;
	--pref-radius: 12px;
	--pref-gap: 22px;
	--pref-shadow: 0 1px 2px rgba(16,24,40,.06), 0 1px 3px rgba(16,24,40,.10);
	--pref-shadow-h: 0 10px 24px rgba(16,24,40,.12);
}

.pref *,
.pref-slider *,
.pref-single * { box-sizing: border-box; }

/* ---------- Toolbar / filters ---------- */
.pref-toolbar { margin-bottom: calc(var(--pref-gap) + 4px); }
.pref-filters {
	display: grid; gap: 14px;
	grid-template-columns: 1fr;
}
@media (min-width: 680px) { .pref-filters { grid-template-columns: repeat(3, 1fr); } }
.pref-filter { display: flex; flex-direction: column; gap: 6px; }
.pref-filter__label {
	font-size: 12px; font-weight: 700; letter-spacing: .05em;
	text-transform: uppercase; color: var(--pref-muted);
}
.pref-select { position: relative; }
.pref-select::after {
	content: ""; position: absolute; right: 14px; top: 50%; width: 9px; height: 9px;
	border-right: 2px solid var(--pref-muted); border-bottom: 2px solid var(--pref-muted);
	transform: translateY(-70%) rotate(45deg); pointer-events: none;
}
.pref-filter__select {
	-webkit-appearance: none; appearance: none; width: 100%;
	font-size: 15px; color: var(--pref-ink); background: var(--pref-surface);
	border: 1px solid var(--pref-line); border-radius: 10px;
	padding: 11px 38px 11px 14px; line-height: 1.2; cursor: pointer;
	transition: border-color .2s ease, box-shadow .2s ease;
}
.pref-filter__select:hover { border-color: #cfd3da; }
.pref-filter__select:focus-visible {
	outline: none; border-color: var(--pref-accent);
	box-shadow: 0 0 0 3px rgba(227,6,19,.15);
}

.pref-controls {
	display: flex; align-items: center; flex-wrap: wrap; gap: 12px;
	padding-bottom: 14px; border-bottom: 1px solid var(--pref-line);
}
.pref-count { font-size: 14px; color: var(--pref-muted); white-space: nowrap; }
/* Inline filter dropdowns inside the toolbar row */
.pref-filter--inline { display: flex; }
.pref-filter--inline .pref-select { width: auto; }
.pref-filter--inline .pref-filter__select {
	width: auto; min-width: 158px; padding: 8px 34px 8px 12px; font-size: 14px; border-radius: 9px;
}
@media (max-width: 600px) {
	.pref-filter--inline { flex: 1 1 160px; }
	.pref-filter--inline .pref-filter__select { width: 100%; min-width: 0; }
}
.pref-count__n { font-weight: 700; color: var(--pref-ink); }
.pref-reset {
	background: none; border: none; color: var(--pref-accent); padding: 0;
	font-size: 14px; cursor: pointer; text-decoration: underline;
}
.pref-viewtoggle { margin-left: auto; display: inline-flex; border: 1px solid var(--pref-line); border-radius: 999px; overflow: hidden; }
.pref-view {
	background: var(--pref-surface); border: none; padding: 8px 18px; font-size: 14px;
	cursor: pointer; color: var(--pref-muted); transition: background .2s ease, color .2s ease;
}
.pref-view:hover { color: var(--pref-ink); }
.pref-view.is-active { background: var(--pref-accent); color: var(--pref-accent-ink); }

/* ---------- Grid ---------- */
.pref-grid {
	display: grid; gap: var(--pref-gap); align-items: start;
	grid-template-columns: 1fr;
}
@media (min-width: 560px) { .pref-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 992px) { .pref-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1320px) { .pref-grid { grid-template-columns: repeat(4, 1fr); } }

/* ---------- Card ---------- */
.pref-card {
	position: relative; cursor: pointer;
	display: flex; flex-direction: column;
	background: var(--pref-surface); border: 1px solid var(--pref-line);
	border-radius: var(--pref-radius); overflow: hidden; box-shadow: var(--pref-shadow);
	transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
/* Stretched link: the whole card links to the single page. The overlay is
   anchored to the title link, whose containing block is the (relative) card,
   so it covers the entire card — image, badges and body. */
.pref-card__title a::after { content: ""; position: absolute; inset: 0; z-index: 3; }
.pref-card:hover .pref-card__title a { color: var(--pref-accent) !important; }
.pref-card.is-hidden { display: none; }
.pref-card:hover { transform: translateY(-3px); box-shadow: var(--pref-shadow-h); border-color: #dcdfe5; }

.pref-card__media {
	position: relative; display: block; aspect-ratio: 4 / 3;
	background: var(--pref-bg-soft); overflow: hidden;
}
.pref-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s ease; }
.pref-card:hover .pref-card__media img { transform: scale(1.05); }
.pref-card__noimg { position: absolute; inset: 0; background: linear-gradient(135deg, #d3d7dd, #aab0b8); }

/* Badges overlaid on the image */
.pref-badges { position: absolute; left: 10px; display: flex; flex-wrap: wrap; gap: 6px; max-width: calc(100% - 20px); z-index: 2; }
.pref-badges--objekt { top: 10px; }
.pref-badges--leistung { bottom: 10px; }
.pref-badge {
	font-size: 11px; font-weight: 700; letter-spacing: .03em;
	padding: 4px 9px; border-radius: 6px; line-height: 1.25; white-space: nowrap;
}
.pref-badge--objekt {
	background: var(--pref-accent); color: var(--pref-accent-ink);
	text-transform: uppercase;
}
.pref-badge--leistung {
	background: rgba(255,255,255,.92); color: #222; font-weight: 600;
	backdrop-filter: saturate(140%) blur(2px); box-shadow: 0 1px 2px rgba(0,0,0,.12);
}

.pref-card__body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 9px; }
/* Title ~20px, bold. High specificity + !important to override Avada's
   "responsive typography" (which forces h3 to ~26px / weight 400). */
.pref .pref-card__title,
.pref-slider .pref-card__title { margin: 0; }
.pref .pref-card__title,
.pref .pref-card__title a,
.pref-slider .pref-card__title,
.pref-slider .pref-card__title a {
	font-size: 18px !important;
	font-weight: 700 !important;
	line-height: 1.25 !important;
}
.pref .pref-card__title a,
.pref-slider .pref-card__title a { color: var(--pref-ink) !important; text-decoration: none; }
.pref .pref-card__title a:hover,
.pref-slider .pref-card__title a:hover { color: var(--pref-accent) !important; }

.pref-card__facts { margin: 0; display: flex; flex-direction: column; gap: 5px; }
.pref-card__facts .pref-fact { display: grid; grid-template-columns: 7em 1fr; gap: 10px; font-size: 12px; line-height: 1.4; }
.pref-card__facts dt { margin: 0; color: var(--pref-muted); font-weight: 600; }
.pref-card__facts dd { margin: 0; color: var(--pref-ink); }
@media (max-width: 420px) {
	.pref-card__facts .pref-fact { grid-template-columns: 1fr; gap: 0; }
	.pref-card__facts dt { font-size: 12px; }
}

.pref-empty { text-align: center; color: var(--pref-muted); padding: 48px 0; }

/* ---------- Map ---------- */
.pref-map { margin-top: 4px; }
/* Custom brand-colored pins + clusters (#1C2B36) */
.pref-pin { background: transparent !important; border: 0 !important; }
.pref-pin svg { display: block; filter: drop-shadow(0 1px 2px rgba(0,0,0,.35)); }
.marker-cluster { background: rgba(28, 43, 54, .35) !important; }
.marker-cluster div { background: #1C2B36 !important; color: #fff !important; }
.marker-cluster span { color: #fff !important; font-weight: 700; }
.pref-map__canvas { width: 100%; height: 560px; border-radius: var(--pref-radius); border: 1px solid var(--pref-line); }
.pref-popup { display: block; width: 210px; text-decoration: none; color: var(--pref-ink); }
.pref-popup img { width: 100%; height: 116px; object-fit: cover; border-radius: 6px; display: block; }
.pref-popup b { display: block; margin-top: 6px; font-size: 14px; line-height: 1.3; }

/* ---------- Slider ---------- */
.pref-slider { padding-bottom: 0; }
.pref-slider .swiper-slide { height: auto; }
.pref-slider .swiper-slide .pref-card { height: 100%; }

/* Pagination row below the cards (static, centered) — not overlapping. */
.pref-slider-pagination.swiper-pagination {
	position: static; margin-top: 18px; text-align: center; line-height: 1;
}
.pref-slider-pagination .swiper-pagination-bullet-active { background: var(--pref-accent); }

/* Nav row ABOVE the slider — buttons sit outside the cards, never overlap. */
.pref-slider-nav { display: flex; justify-content: flex-end; gap: 8px; margin-bottom: 14px; }
.pref-slider-btn {
	width: 42px; height: 42px; border-radius: 999px; border: 1px solid var(--pref-line);
	background: var(--pref-surface); color: var(--pref-ink); font-size: 22px; line-height: 1;
	display: flex; align-items: center; justify-content: center; cursor: pointer;
	transition: border-color .2s ease, color .2s ease, background .2s ease;
}
.pref-slider-btn:hover { border-color: var(--pref-accent); color: var(--pref-accent); }
.pref-slider-btn.swiper-button-disabled { opacity: .35; cursor: default; }
.pref-slider-btn.swiper-button-disabled:hover { border-color: var(--pref-line); color: var(--pref-ink); }

/* ---------- Single ---------- */
.pref-single__inner { max-width: 1100px; margin: 0 auto; padding: 100px 16px 56px; }
/* Two columns on desktop: info left, image right (image is first in the DOM,
   row-reverse moves it to the right; on mobile it stacks image-first on top). */
.pref-single__main { display: flex; flex-direction: column; gap: 24px; }
@media (min-width: 900px) {
	/* Info 33% (left), image 66% (right). Media is first in the DOM (so it
	   shows on top on mobile); grid-column placement puts it right on desktop. */
	.pref-single__main { display: grid; grid-template-columns: 2fr 3fr; gap: 40px; align-items: start; }
	/* Both pinned to row 1 so the left column is top-aligned next to the image
	   (media is first in the DOM, so without this the info would wrap to row 2). */
	.pref-single__info { grid-column: 1; grid-row: 1; min-width: 0; }
	.pref-single__media { grid-column: 2; grid-row: 1; position: sticky; top: 110px; }
}
.pref-single__media { margin: 0; }
.pref-single__img { width: 100%; height: auto; border-radius: var(--pref-radius); display: block; }
.pref-single__title { font-size: clamp(24px, 4vw, 32px); line-height: 1.15; margin: 0 0 12px; }
.pref-single__terms { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.pref-tag {
	display: inline-block; font-size: 13px; padding: 5px 12px; border-radius: 999px;
	background: var(--pref-bg-soft); color: var(--pref-ink); border: 1px solid var(--pref-line);
}
.pref-tag--objekt { background: var(--pref-accent); color: var(--pref-accent-ink); border-color: var(--pref-accent); }
/* Data list in the left column: borderless, compact, single column. */
.pref-single__facts { margin: 22px 0 0; border: 0; display: flex; flex-direction: column; gap: 4px; }
.pref-single__facts .pref-fact { display: grid; grid-template-columns: 120px 1fr; gap: 12px; padding: 3px 0; border: 0; }
.pref-single__facts dt { font-weight: 700; color: var(--pref-muted); margin: 0; padding: 0; }
.pref-single__facts dd { margin: 0; padding: 0; }
@media (max-width: 560px) { .pref-single__facts .pref-fact { grid-template-columns: 1fr; gap: 0; } }
.pref-single__map { margin-top: 36px; }
.pref-single__map .pref-map__canvas { height: 380px; cursor: pointer; }
.pref-single__back { margin-top: 26px; }
.pref-single__back a { color: var(--pref-accent); text-decoration: none; font-weight: 600; }

/* ---------- Motion preference ---------- */
@media (prefers-reduced-motion: reduce) {
	.pref-card, .pref-card__media img, .pref-view, .pref-filter__select, .pref-tag { transition: none; }
	.pref-card:hover { transform: none; }
	.pref-card:hover .pref-card__media img { transform: none; }
}
