/* BSDImmo – modernes Exposé-Design (IT-Service Börner, 2026) */
:root {
	--bsd-accent: #e07a1f;        /* Markenorange (Linien, Ränder) */
	--bsd-accent-strong: #a9520b; /* Schaltflächen/Text auf Weiß, Kontrast >= 4.5:1 */
	--bsd-accent-soft: #fcebdd;
	--bsd-ink: #1f2328;
	--bsd-muted: #5a6270;
	--bsd-line: #eceef1;
	--bsd-fill: #f4f5f7;
	--bsd-card: #ffffff;
	--bsd-radius: 14px;
	--bsd-shadow: 0 1px 3px rgba(16, 24, 40, .08), 0 0 0 1px rgba(16, 24, 40, .04);
}

/* ---------- Galerie + Preisbox ---------- */
.bsd-hero { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; margin: 8px 0 24px; color: var(--bsd-ink); }
.bsd-gal { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.bsd-gal__stage { position: relative; aspect-ratio: 3 / 2; border-radius: var(--bsd-radius); overflow: hidden; background: #e2e5ea; outline: none; touch-action: pan-y; }
.bsd-gal__stage:focus-visible { box-shadow: 0 0 0 3px var(--bsd-accent); }
.bsd-gal__slide { position: absolute; inset: 0; margin: 0; }
.bsd-gal__slide[hidden] { display: none; }
.bsd-gal__slide img, .bsd-gal__slide video { width: 100%; height: 100%; object-fit: cover; display: block; background: #e2e5ea; }
.bsd-gal__slide video { object-fit: contain; background: #111; }
.bsd-gal__nav, .bsd-gal__full {
	position: absolute; border: 0; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0;
	transition: transform .15s ease, background-color .15s ease;
}
.bsd-gal__nav { top: 50%; transform: translateY(-50%); width: 46px; height: 46px; border-radius: 50%; background: rgba(255, 255, 255, .92); color: var(--bsd-ink); box-shadow: 0 2px 8px rgba(0, 0, 0, .18); }
.bsd-gal__nav:hover { background: #fff; transform: translateY(-50%) scale(1.06); }
.bsd-gal__nav--prev { left: 14px; }
.bsd-gal__nav--next { right: 14px; }
.bsd-gal__full { right: 14px; bottom: 14px; width: 44px; height: 44px; border-radius: 10px; background: rgba(20, 22, 26, .78); color: #fff; }
.bsd-gal__full:hover { background: rgba(20, 22, 26, .92); }
.bsd-gal__meta { position: absolute; left: 14px; bottom: 14px; display: flex; gap: 8px; align-items: center; max-width: calc(100% - 90px); pointer-events: none; }
.bsd-gal__pill { background: rgba(20, 22, 26, .78); color: #fff; font-size: 14px; line-height: 1.3; font-weight: 600; padding: 5px 11px; border-radius: 999px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bsd-gal__caption { font-weight: 400; }
.bsd-gal__pill[hidden] { display: none; }
.bsd-gal__thumbs { display: flex; gap: 10px; overflow-x: auto; padding: 2px 2px 6px; scroll-snap-type: x proximity; scrollbar-width: thin; }
.bsd-gal__thumb {
	flex: 0 0 auto; width: 104px; height: 78px; padding: 3px; border-radius: 9px; border: 2.5px solid transparent;
	background: #fff; cursor: pointer; opacity: .72; scroll-snap-align: start; transition: opacity .15s ease, border-color .15s ease;
}
.bsd-gal__thumb:hover { opacity: 1; }
.bsd-gal__thumb.is-active { border-color: var(--bsd-accent); opacity: 1; }
.bsd-gal__thumb img, .bsd-gal__thumb-video { width: 100%; height: 100%; object-fit: cover; display: flex; align-items: center; justify-content: center; border-radius: 6px; background: var(--bsd-fill); color: var(--bsd-muted); }
.bsd-gal__docs { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.bsd-gal__docs a { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 999px; background: var(--bsd-fill); color: var(--bsd-accent-strong); font-weight: 600; text-decoration: none; font-size: 15px; }
.bsd-gal__docs a:hover { background: var(--bsd-accent-soft); }

/* Vollbild */
.bsd-lightbox { position: fixed; inset: 0; z-index: 10000; background: rgba(10, 11, 13, .94); display: flex; align-items: center; justify-content: center; }
.bsd-lightbox[hidden] { display: none; }
.bsd-lightbox img, .bsd-lightbox video { max-width: 94vw; max-height: 86vh; object-fit: contain; border-radius: 6px; }
.bsd-lightbox .bsd-gal__nav { position: fixed; }
.bsd-lightbox__close { position: fixed; top: 16px; right: 16px; width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .14); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.bsd-lightbox__close:hover { background: rgba(255, 255, 255, .26); }
.bsd-lightbox__info { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); color: #fff; font-size: 15px; text-align: center; max-width: 90vw; }
html.bsd-noscroll { overflow: hidden; }

/* Preisbox */
.bsd-box { flex: 1 0 340px; max-width: 100%; min-width: 0; box-sizing: border-box; background: var(--bsd-card); border-radius: var(--bsd-radius); box-shadow: var(--bsd-shadow); padding: 24px; display: flex; flex-direction: column; gap: 18px; }
.bsd-box__label { font-size: 14px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--bsd-muted); }
.bsd-box__value { font-size: 38px; font-weight: 700; line-height: 1.1; color: var(--bsd-ink); }
.bsd-box__sub { font-size: 16px; color: var(--bsd-muted); margin-top: 4px; }
.bsd-box__facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0; }
.bsd-box__facts > div { background: var(--bsd-fill); border-radius: 10px; padding: 12px 14px; }
.bsd-box__facts dt { font-size: 14px; color: var(--bsd-muted); font-weight: 400; margin: 0; }
.bsd-box__facts dd { font-size: 20px; font-weight: 700; margin: 0; color: var(--bsd-ink); }
.bsd-btn { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px; box-sizing: border-box; border-radius: 10px; font-weight: 700; font-size: 17px; text-decoration: none !important; cursor: pointer; font-family: inherit; line-height: 1.2; }
.bsd-btn[hidden] { display: none; }
.bsd-btn--primary { background: var(--bsd-accent-strong); color: #fff !important; border: 0; }
.bsd-btn--primary:hover { background: #8f4508; }
.bsd-btn--ghost { border: 1.5px solid #d7dbe1; color: var(--bsd-ink) !important; background: #fff; font-weight: 600; }
.bsd-btn--ghost:hover { border-color: var(--bsd-accent); }

/* ---------- Karte ---------- */
.bsd-map { margin: 8px 0 24px; border-radius: 12px; overflow: hidden; }
.bsd-map__consent { min-height: 340px; box-sizing: border-box; padding: 28px 20px; background: #eef0f3; border: 1px dashed #c5cbd3; border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center; color: var(--bsd-ink); }
.bsd-map__consent > svg { color: var(--bsd-accent-strong); }
.bsd-map__title { font-size: 19px; font-weight: 700; }
.bsd-map__consent p { margin: 0; max-width: 46ch; font-size: 15px; line-height: 1.5; color: var(--bsd-muted); }
.bsd-map__remember { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--bsd-muted); cursor: pointer; min-height: 44px; }
.bsd-map__canvas { height: 380px; border-radius: 12px; z-index: 0; }
.bsd-map__canvas[hidden] { display: none; }

/* ---------- Bestehende Abschnitte als Karten ---------- */
.bsdimmo-modern { color: var(--bsd-ink); }
.bsdimmo-modern .bsdimmo-preise, .bsdimmo-modern .bsdimmo-flaechen, .bsdimmo-modern .bsdimmo-ausstattung, .bsdimmo-modern .bsdimmo-objekt, .bsdimmo-modern .bsdimmo-zustand, .bsdimmo-modern .bsdimmo-infra, .bsdimmo-modern .bsdimmo-freitext, .bsdimmo-modern .bsdimmo-energie, .bsdimmo-modern .bsdimmo-makler, .bsdimmo-modern .bsdimmo-kontakt, .bsdimmo-modern .bsdimmo-kategorie, .bsdimmo-modern .bsdimmo-geo, .bsdimmo-modern .bsdimmo-anyfield, .bsdimmo-modern .bsdimmo-bieter, .bsdimmo-modern .bsdimmo-versteigerung, .bsdimmo-modern .bsdimmo-anbieter, .bsdimmo-modern .bsdimmo-weitereanhange, .bsdimmo-modern .bsdimmo-bewertung {
	background: var(--bsd-card); border-radius: var(--bsd-radius); box-shadow: var(--bsd-shadow);
	padding: 22px 24px; margin: 0 0 24px; box-sizing: border-box;
}
.bsdimmo-modern [class*="bsdimmo-"] > [class*="col-"] { width: 100%; max-width: 100%; flex: 1 1 100%; padding-left: 0; padding-right: 0; }
.bsdimmo-modern h2 { font-size: 22px; font-weight: 700; line-height: 1.25; margin: 0 0 12px; display: flex; align-items: center; gap: 10px; color: var(--bsd-ink); }
.bsdimmo-modern h2::before { content: ""; flex: 0 0 6px; height: 22px; border-radius: 3px; background: var(--bsd-accent); }
.bsdimmo-modern .bsdimmo-freitext h2 { margin-top: 20px; }
.bsdimmo-modern .bsdimmo-freitext h2:first-child { margin-top: 0; }
.bsdimmo-modern .bsdimmo-freitext > div > div { font-size: 17px; line-height: 1.6; max-width: 75ch; }
.bsdimmo-modern .bsdimmo-freitext p:empty { display: none; }

/* Wert-Zeilen (Bezeichnung links, Wert rechts) – jede Zeile mit genau zwei Spalten */
.bsdimmo-modern :is(.bsdimmo-preise, .bsdimmo-flaechen, .bsdimmo-ausstattung, .bsdimmo-objekt, .bsdimmo-zustand, .bsdimmo-infra, .bsdimmo-freitext, .bsdimmo-energie, .bsdimmo-makler, .bsdimmo-kontakt, .bsdimmo-kategorie, .bsdimmo-geo, .bsdimmo-anyfield, .bsdimmo-bieter, .bsdimmo-versteigerung, .bsdimmo-anbieter, .bsdimmo-weitereanhange, .bsdimmo-bewertung) .row:has(> div + div:last-child) {
	display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
	margin: 0; padding: 10px 0; border-bottom: 1px solid var(--bsd-line); font-size: 16px;
}
.bsdimmo-modern :is(.bsdimmo-preise, .bsdimmo-flaechen, .bsdimmo-ausstattung, .bsdimmo-objekt, .bsdimmo-zustand, .bsdimmo-infra, .bsdimmo-freitext, .bsdimmo-energie, .bsdimmo-makler, .bsdimmo-kontakt, .bsdimmo-kategorie, .bsdimmo-geo, .bsdimmo-anyfield, .bsdimmo-bieter, .bsdimmo-versteigerung, .bsdimmo-anbieter, .bsdimmo-weitereanhange, .bsdimmo-bewertung) .row:has(> div + div:last-child):last-child { border-bottom: 0; }
.bsdimmo-modern :is(.bsdimmo-preise, .bsdimmo-flaechen, .bsdimmo-ausstattung, .bsdimmo-objekt, .bsdimmo-zustand, .bsdimmo-infra, .bsdimmo-freitext, .bsdimmo-energie, .bsdimmo-makler, .bsdimmo-kontakt, .bsdimmo-kategorie, .bsdimmo-geo, .bsdimmo-anyfield, .bsdimmo-bieter, .bsdimmo-versteigerung, .bsdimmo-anbieter, .bsdimmo-weitereanhange, .bsdimmo-bewertung) .row:has(> div + div:last-child) > div { width: auto; float: none; padding: 0; }
.bsdimmo-modern :is(.bsdimmo-preise, .bsdimmo-flaechen, .bsdimmo-ausstattung, .bsdimmo-objekt, .bsdimmo-zustand, .bsdimmo-infra, .bsdimmo-freitext, .bsdimmo-energie, .bsdimmo-makler, .bsdimmo-kontakt, .bsdimmo-kategorie, .bsdimmo-geo, .bsdimmo-anyfield, .bsdimmo-bieter, .bsdimmo-versteigerung, .bsdimmo-anbieter, .bsdimmo-weitereanhange, .bsdimmo-bewertung) .row:has(> div + div:last-child) > div:first-child { flex: 1 1 auto; color: var(--bsd-muted); }
.bsdimmo-modern :is(.bsdimmo-preise, .bsdimmo-flaechen, .bsdimmo-ausstattung, .bsdimmo-objekt, .bsdimmo-zustand, .bsdimmo-infra, .bsdimmo-freitext, .bsdimmo-energie, .bsdimmo-makler, .bsdimmo-kontakt, .bsdimmo-kategorie, .bsdimmo-geo, .bsdimmo-anyfield, .bsdimmo-bieter, .bsdimmo-versteigerung, .bsdimmo-anbieter, .bsdimmo-weitereanhange, .bsdimmo-bewertung) .row:has(> div + div:last-child) > div:last-child { flex: 0 1 auto; font-weight: 600; text-align: right; }

/* Ausstattung: Merkmale als Marken */
.bsdimmo-modern .bsdimmo-ausstattung > div { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.bsdimmo-modern .bsdimmo-ausstattung > div > h2 { flex: 0 0 100%; margin-bottom: 6px; order: -2; }
.bsdimmo-modern .bsdimmo-ausstattung .row:has(> .name + .value) {
	display: inline-flex; flex-direction: row-reverse; justify-content: flex-start; align-items: center; gap: 6px;
	padding: 7px 12px; border: 0; border-radius: 999px; background: var(--bsd-fill); font-size: 15px;
}
.bsdimmo-modern .bsdimmo-ausstattung .row > .name { color: var(--bsd-ink) !important; flex: 0 1 auto !important; }
.bsdimmo-modern .bsdimmo-ausstattung .row > .value { color: var(--bsd-accent-strong); font-weight: 700; }
.bsdimmo-modern .bsdimmo-ausstattung .row:has(> .name + .value):last-child { border-bottom: 0; }
.bsdimmo-modern .bsdimmo-ausstattung .row:has(> .text-center) {
	order: -1; flex: 0 0 100%; display: flex; justify-content: flex-start; gap: 10px; margin: 0 0 8px; padding: 0; align-items: center;
}
.bsdimmo-modern .bsdimmo-ausstattung .row:has(> .text-center) > div { width: auto; padding: 0; color: var(--bsd-muted); }
.bsdimmo-modern .bsdimmo-ausstattung .row > .text-center {
	font-size: 13px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; padding: 4px 10px !important;
	border-radius: 999px; background: var(--bsd-accent-soft); color: #7e3c07 !important;
}

@media (max-width: 640px) {
	.bsd-hero { gap: 16px; }
	.bsd-gal__nav { width: 44px; height: 44px; }
	.bsd-gal__thumb { width: 84px; height: 63px; }
	.bsd-box { padding: 20px; }
	.bsd-box__value { font-size: 32px; }
	.bsdimmo-modern .bsdimmo-preise, .bsdimmo-modern .bsdimmo-ausstattung, .bsdimmo-modern .bsdimmo-freitext { padding: 18px; }
}
@media (prefers-reduced-motion: reduce) {
	.bsd-gal__nav, .bsd-gal__thumb { transition: none; }
}

/* Schutz gegen fremde Bildregeln aus Template/alten BSDImmo-Styles (max-height, height:auto, float …) */
.bsd-hero .bsd-gal .bsd-gal__stage .bsd-gal__slide {
	position: absolute !important; top: 0 !important; right: 0 !important; bottom: 0 !important; left: 0 !important;
	margin: 0 !important; padding: 0 !important; width: auto !important; height: auto !important; max-height: none !important;
}
.bsd-hero .bsd-gal .bsd-gal__stage .bsd-gal__slide > img,
.bsd-hero .bsd-gal .bsd-gal__stage .bsd-gal__slide > video {
	width: 100% !important; height: 100% !important; max-width: none !important; max-height: none !important;
	min-height: 0 !important; margin: 0 !important; padding: 0 !important; float: none !important;
	position: static !important; display: block !important;
}
.bsd-hero .bsd-gal .bsd-gal__stage .bsd-gal__slide > img { object-fit: cover !important; }
.bsd-hero .bsd-gal .bsd-gal__thumbs .bsd-gal__thumb > img {
	width: 100% !important; height: 100% !important; max-width: none !important; max-height: none !important;
	margin: 0 !important; object-fit: cover !important; display: block !important;
}
.bsd-lightbox .bsd-lightbox__media > img, .bsd-lightbox .bsd-lightbox__media > video {
	width: auto !important; height: auto !important; max-width: 94vw !important; max-height: 86vh !important; margin: 0 !important;
}

/* Leere Abschnitte ausblenden (per JS markiert) */
.bsdimmo-modern .bsd-empty { display: none !important; }
