/*
Theme Name: Elsbach Immobilien
Theme URI: https://www.elsbachimmo.de/
Description: Eigenes Theme der Elsbach Hausverwaltung (Relaunch 2026). Klare Struktur, Illustrationen im Mittelpunkt, Verwaltung von Mietobjekten. Lädt keine Inhalte von fremden Servern.
Version: 2.6.2
Requires at least: 6.5
Requires PHP: 8.1
Author: Elsbach Hausverwaltung
License: GNU General Public License v2 or later
Text Domain: elsbachimmo
*/

/* Schriften werden aus dem Ordner /fonts automatisch eingebunden (siehe functions.php). */

:root {
	--blue: #0058db;
	--blue-text: #0052cc;
	--blue-dark: #0042a6;
	--green: #7cbf36;
	--green-text: #3f6b14;
	--green-soft: #eef6e4;
	--slate: #3d4a57;
	--text: #4a5157;
	--muted: #6b747c;
	--line: #dde4ea;
	--tint: #eef4f8;
	--paper: #f8fafb;
	--white: #ffffff;
	--danger: #b8442f;

	--font-head: "Source Serif 4", Georgia, "Times New Roman", serif;
	--font-body: "Source Sans 3", "Source Sans Pro", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

	--radius: 10px;
	--radius-s: 6px;
	--shadow: 0 1px 2px rgba(29, 45, 60, .06), 0 6px 20px rgba(29, 45, 60, .06);
	--shadow-hover: 0 2px 4px rgba(29, 45, 60, .08), 0 14px 30px rgba(29, 45, 60, .10);
	--width: 1160px;
	--read: 720px;
	--gutter: 20px;
	--header-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
	margin: 0;
	font-family: var(--font-body);
	font-size: 18px;
	line-height: 1.65;
	color: var(--text);
	background: var(--white);
	-webkit-font-smoothing: antialiased;
}
@media (max-width: 600px) { body { font-size: 17px; } }

img, svg { max-width: 100%; height: auto; }
img { display: block; }

a { color: var(--blue-text); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--blue-dark); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 2px; }

h1, h2, h3, h4 {
	font-family: var(--font-head);
	font-weight: 600;
	color: var(--slate);
	line-height: 1.2;
	letter-spacing: -0.005em;
	margin: 1.6em 0 .55em;
	text-wrap: balance;
}
h1 { font-size: clamp(2rem, 1.4rem + 2.4vw, 2.9rem); }
h2 { font-size: clamp(1.55rem, 1.25rem + 1.2vw, 2.1rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.1rem; }
p { margin: 0 0 1em; }

.ei-icon { display: inline-block; flex: none; vertical-align: middle; }

.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px;
	overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}
.skip-link:focus {
	position: fixed; top: 8px; left: 8px; z-index: 1000; width: auto; height: auto; clip: auto;
	background: var(--white); padding: 10px 16px; border-radius: var(--radius-s); box-shadow: var(--shadow);
}

.container { width: 100%; max-width: var(--width); margin: 0 auto; padding: 0 var(--gutter); }

.eyebrow {
	font-size: .82rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
	color: var(--green-text); margin: 0 0 .8em;
}

/* ---------- Knöpfe ---------- */
.button, .wp-element-button, .wp-block-button__link {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 48px; padding: 10px 22px;
	background: var(--blue); color: var(--white);
	border: 2px solid var(--blue); border-radius: 999px;
	font: inherit; font-size: 1rem; font-weight: 600; line-height: 1.2;
	text-decoration: none; cursor: pointer;
	transition: background-color .15s, border-color .15s, color .15s;
}
.button:hover, .wp-element-button:hover, .wp-block-button__link:hover { background: var(--blue-dark); border-color: var(--blue-dark); color: var(--white); }
.button-outline { background: transparent; color: var(--blue-text); }
.button-outline:hover { background: var(--tint); color: var(--blue-dark); border-color: var(--blue-dark); }

.link-more {
	display: inline-flex; align-items: center; gap: 6px; font-weight: 600; text-decoration: none; white-space: nowrap;
}
.link-more:hover .ei-icon { transform: translateX(3px); }
.link-more .ei-icon { transition: transform .15s; }

/* ---------- Kopfbereich ---------- */
.site-header {
	position: sticky; top: 0; z-index: 50;
	background: rgba(255,255,255,.96);
	-webkit-backdrop-filter: saturate(1.4) blur(8px); backdrop-filter: saturate(1.4) blur(8px);
	border-bottom: 1px solid var(--line);
}
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
@media (max-width: 600px) { .admin-bar .site-header { top: 0; } }

.header-inner { display: flex; align-items: center; gap: 24px; min-height: var(--header-h); }
.site-header .container { max-width: 1320px; }

.site-title { margin: 0; line-height: 1.1; }
.site-title a { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.site-title-text { display: flex; flex-direction: column; }
.site-title .site-logo { width: 60px; height: 60px; object-fit: contain; flex: none; }
.site-title-name { font-family: var(--font-head); font-weight: 600; font-size: 1.45rem; color: var(--blue-text); white-space: nowrap; }
.site-title-claim { font-size: .82rem; color: var(--muted); letter-spacing: .02em; margin-top: 2px; }


.main-nav { margin-left: auto; }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px; }
.main-nav li a {
	display: block; padding: 8px 10px; border-radius: var(--radius-s); white-space: nowrap;
	color: var(--slate); text-decoration: none; font-size: 1rem; font-weight: 500;
}
.main-nav li a:hover { background: var(--tint); color: var(--blue-dark); }
.main-nav .current-menu-item > a,
.main-nav .current_page_item > a,
.main-nav .current-page-ancestor > a { color: var(--blue-text); box-shadow: inset 0 -2px 0 var(--blue); border-radius: 0; }
.nav-contact { display: none; }

.header-actions { display: flex; align-items: center; gap: 6px; }
.header-phone {
	display: inline-flex; align-items: center; gap: 8px;
	padding: 8px 14px; border-radius: 999px; background: var(--tint);
	color: var(--blue-text); font-weight: 600; text-decoration: none; white-space: nowrap; font-size: .97rem;
}
.header-phone:hover { background: #e3ecf8; }
.nav-toggle {
	display: none; width: 46px; height: 46px; place-items: center;
	background: none; border: 0; border-radius: var(--radius-s); color: var(--slate); cursor: pointer;
}
.nav-toggle-close { display: none; }
.nav-toggle[aria-expanded="true"] .nav-toggle-open { display: none; }
.nav-toggle[aria-expanded="true"] .nav-toggle-close { display: block; }

@media (max-width: 1180px) { .header-phone span { display: none; } .header-phone { padding: 10px; } }

@media (max-width: 1000px) {
	:root { --header-h: 64px; }
	/* backdrop-filter würde das fixierte Menü im Kopf einsperren */
	.site-header { -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--white); }
	.header-inner { gap: 12px; }
	.header-actions { margin-left: auto; }
	.nav-toggle { display: grid; }
	.header-phone { width: 46px; height: 46px; justify-content: center; padding: 0; }
	.site-title-name { font-size: 1.25rem; }
	.site-title-claim { display: none; }
	.site-title .site-logo { width: 48px; height: 48px; }
	.site-title a { gap: 8px; }

	.main-nav {
		position: fixed; inset: var(--header-h) 0 0 0; z-index: 49;
		background: var(--white); overflow-y: auto;
		padding: 12px var(--gutter) 32px;
		display: none;
	}
	.admin-bar .main-nav { top: calc(var(--header-h) + 46px); }
	.main-nav.is-open { display: block; }
	.main-nav ul { flex-direction: column; gap: 0; }
	.main-nav li a {
		font-family: var(--font-head); font-size: 1.35rem; font-weight: 600;
		padding: 14px 4px; border-bottom: 1px solid var(--line); border-radius: 0; box-shadow: none !important;
	}
	.main-nav li a:hover { background: none; }
	.nav-contact { display: flex; flex-direction: column; gap: 10px; margin-top: 24px; }
	.nav-contact a {
		display: flex; align-items: center; gap: 10px; padding: 14px 16px;
		background: var(--tint); border-radius: var(--radius); text-decoration: none; font-weight: 600; color: var(--blue-text);
	}
	.nav-contact a.is-notfall { background: #fbeeea; color: var(--danger); }
	body.nav-open { overflow: hidden; }
}

/* ---------- Bildbänder (Illustrationen) ---------- */
.panorama { line-height: 0; }
.panorama img { width: 100%; height: auto; max-height: 260px; object-fit: cover; object-position: center 75%; }

/* ---------- Startseite: Einstieg ---------- */
.hero { background: linear-gradient(180deg, var(--white) 0%, var(--tint) 100%); }
.hero-inner { padding-top: clamp(40px, 7vw, 84px); padding-bottom: clamp(24px, 4vw, 44px); max-width: var(--width); }
.hero-title { margin: 0 0 .35em; max-width: 16ch; font-size: clamp(2.2rem, 1.5rem + 3vw, 3.4rem); }
.hero-text { max-width: 60ch; font-size: clamp(1.05rem, 1rem + .3vw, 1.2rem); color: var(--text); margin-bottom: 1.4em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 0; }
.hero .panorama { margin-top: -1px; }

/* ---------- Kennzahlen ---------- */
.facts { background: var(--slate); color: #e7edf2; }
.facts-grid { display: grid; grid-template-columns: repeat(4, 1fr); margin: 0; }
.facts-grid > div { padding: 26px 20px; border-left: 1px solid rgba(255,255,255,.12); }
.facts-grid > div:first-child { border-left: 0; padding-left: 0; }
.facts dt { font-family: var(--font-head); font-weight: 600; font-size: 1.6rem; color: var(--white); line-height: 1.15; }
.facts dd { margin: 4px 0 0; font-size: .95rem; color: #c9d4dd; }
@media (max-width: 800px) {
	.facts-grid { grid-template-columns: 1fr 1fr; }
	.facts-grid > div { padding: 18px 14px; border-left: 0; border-top: 1px solid rgba(255,255,255,.12); }
	.facts-grid > div:nth-child(-n+2) { border-top: 0; }
	.facts-grid > div:nth-child(odd) { padding-left: 0; }
	.facts dt { font-size: 1.3rem; }
}

/* ---------- Abschnitte ---------- */
.section { padding: clamp(48px, 7vw, 88px) 0; }
.section-tint { background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-title { margin: 0 0 .9em; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 32px; flex-wrap: wrap; margin-bottom: 28px; }
.section-head .section-title { margin: 0; }
.section-lead { margin: .5em 0 0; max-width: 60ch; color: var(--muted); }

.grid { display: grid; gap: 28px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1000px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); gap: 20px; } }
@media (max-width: 640px) { .grid-3 { grid-template-columns: 1fr; } }

/* Über uns + Aktuelles */
.intro { display: grid; gap: 48px; }
.intro.has-news { grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); }
.intro-text { max-width: var(--read); }
.intro-text .entry-content h2:first-child, .intro-text .entry-content h3:first-child { margin-top: 0; }
.news {
	align-self: start; background: var(--tint); border-radius: var(--radius); padding: 24px 26px;
}
.news-title { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: 1.15rem; color: var(--blue-text); }
.news-item { padding: 14px 0; border-top: 1px solid #d5e2ec; }
.news-item:first-of-type { border-top: 0; padding-top: 4px; }
.news-item h3 { margin: 0 0 4px; font-size: 1.08rem; }
.news-item p { margin: 0; font-size: .98rem; }
.news-item a { text-decoration: none; color: var(--text); }
.news-item a:hover { color: var(--blue-text); text-decoration: underline; }
@media (max-width: 900px) { .intro.has-news { grid-template-columns: 1fr; gap: 28px; } }

/* Leistungen mit Illustrationen */
.feature {
	background: var(--white); border-radius: var(--radius); overflow: hidden;
	box-shadow: var(--shadow); display: flex; flex-direction: column;
}
.feature-image { background: var(--tint); }
.feature-image img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.feature-body { padding: 22px 24px 26px; }
.feature h3 { display: flex; align-items: center; gap: 12px; margin: 0 0 10px; }
.feature-icon {
	display: grid; place-items: center; width: 40px; height: 40px; flex: none;
	border-radius: 50%; background: var(--green-soft); color: var(--green-text);
}
.feature p { margin: 0 0 .6em; }
.feature p:last-child { margin-bottom: 0; }
.feature a { font-weight: 600; }
.feature .post-edit-link { display: none; }

/* Häuser (Zeichnungen) */
.houses { padding-bottom: clamp(48px, 7vw, 88px); }
.houses .panorama { margin-bottom: clamp(36px, 5vw, 56px); }
.houses-strip {
	display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory;
	padding: 4px max(var(--gutter), calc((100vw - var(--width)) / 2 + var(--gutter))) 18px;
	scroll-padding-inline: max(var(--gutter), calc((100vw - var(--width)) / 2 + var(--gutter)));
	scrollbar-width: thin;
}
.house { flex: 0 0 auto; width: clamp(220px, 26vw, 300px); margin: 0; scroll-snap-align: start; }
.house-button {
	display: block; width: 100%; padding: 14px; cursor: zoom-in;
	background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-s);
	transition: box-shadow .2s, transform .2s;
}
.house-button:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.house-button img { width: 100%; aspect-ratio: 1 / 1; object-fit: contain; }
.house figcaption { margin-top: 10px; font-size: .95rem; color: var(--muted); text-align: center; }

/* Team */
.team-card { background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); height: 100%; }
.team-card img { width: 100%; aspect-ratio: 457 / 400; object-fit: cover; }
.team-card-body { padding: 18px 20px 22px; }
.team-card h3 { margin: 0 0 6px; font-size: 1.15rem; }
.team-card p { margin: 0; font-size: .98rem; }
.team-card .post-edit-link { display: none; }
@media (max-width: 640px) {
	.grid-4 { gap: 14px; }
	.team-card-body { padding: 12px 14px 16px; }
	.team-card h3 { font-size: 1rem; }
	.team-card p { font-size: .9rem; }
}

/* Kontaktband */
.contact-band { background: var(--tint); }
.contact-band .panorama { background: var(--white); }
.contact-band-body { padding: clamp(40px, 6vw, 72px) 0; }
.contact-band h2 { margin: 0 0 24px; }
.contact-grid { display: grid; grid-template-columns: 1fr 1.35fr 1fr 1.1fr; gap: 16px; }
.contact-item {
	display: flex; gap: 14px; align-items: flex-start;
	background: var(--white); border-radius: var(--radius); padding: 18px;
	color: var(--text); text-decoration: none; box-shadow: var(--shadow); line-height: 1.45; font-size: .97rem;
}
a.contact-item:hover { box-shadow: var(--shadow-hover); }
.contact-item strong { display: block; color: var(--slate); font-size: 1rem; overflow-wrap: anywhere; }
.contact-label { display: block; font-size: .85rem; color: var(--muted); margin-bottom: 2px; }
.contact-icon { color: var(--blue); }
.contact-item.is-notfall .contact-icon, .contact-item.is-notfall strong { color: var(--danger); }
@media (max-width: 1000px) { .contact-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .contact-grid { grid-template-columns: 1fr; } }

/* ---------- Unterseiten ---------- */
.page-band {
	position: relative; overflow: hidden;
	background: var(--tint);
	padding: clamp(28px, 5vw, 52px) 0 clamp(24px, 4vw, 40px);
	border-bottom: 1px solid var(--line);
}
.page-band::after {
	content: ""; position: absolute; inset: 0;
	background: var(--band-bild, none) right bottom / auto 100% no-repeat;
	opacity: .35; pointer-events: none;
	-webkit-mask-image: linear-gradient(90deg, transparent 20%, #000 75%); mask-image: linear-gradient(90deg, transparent 20%, #000 75%);
}
.page-band .container { position: relative; z-index: 1; }
.page-band-title { margin: 0; max-width: 24ch; }
.page-band-text { margin: .5em 0 0; color: var(--muted); max-width: 60ch; }
.page-band-back { display: inline-block; margin-bottom: 10px; font-weight: 600; text-decoration: none; }
@media (max-width: 700px) { .page-band::after { opacity: .18; } }

.site-main { display: block; }
.page-content { max-width: var(--read); margin: 0 auto; padding: clamp(32px, 5vw, 56px) 0 clamp(48px, 7vw, 80px); }

.entry-content > *:first-child { margin-top: 0; }
.entry-content > *:last-child { margin-bottom: 0; }
.entry-content h2 { margin-top: 1.8em; }
.entry-content ul, .entry-content ol { padding-left: 1.3em; }
.entry-content li { margin-bottom: .3em; }
.entry-content figure { margin: 1.8em 0; }
.entry-content img { border-radius: var(--radius-s); }
.entry-content figcaption { font-size: .9rem; color: var(--muted); margin-top: .5em; }
.entry-content .alignwide { width: min(var(--width), 100vw - 2 * var(--gutter)); max-width: none; margin-left: 50%; transform: translateX(-50%); }
.entry-content .alignfull { width: 100vw; max-width: none; margin-left: 50%; transform: translateX(-50%); }
.entry-content .alignfull img { border-radius: 0; }
.entry-content blockquote { margin: 1.6em 0; padding: 4px 0 4px 22px; border-left: 3px solid var(--green); font-family: var(--font-head); font-size: 1.2rem; color: var(--slate); }
.entry-content table { border-collapse: collapse; width: 100%; font-size: .97rem; }
.entry-content th, .entry-content td { border-bottom: 1px solid var(--line); padding: 10px 8px; text-align: left; }
.entry-content hr { border: 0; border-top: 1px solid var(--line); margin: 2.4em 0; }
.entry-content .wp-block-gallery { margin: 1.8em 0; gap: 12px; }
.entry-content .wp-block-columns { gap: 32px; }
.entry-content .post-edit-link { display: none; }

.contact-card {
	display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 28px;
	margin-top: 48px; padding: 24px 26px; background: var(--tint); border-radius: var(--radius);
}
.contact-card-title { font-family: var(--font-head); font-weight: 600; font-size: 1.25rem; color: var(--slate); margin: 0; }
.contact-card-note { margin: 4px 0 0; color: var(--muted); font-size: .95rem; }
.contact-card-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.list-item { padding: 22px 0; border-bottom: 1px solid var(--line); }
.list-item h2 { margin: 0 0 .3em; font-size: 1.4rem; }
.list-item h2 a { text-decoration: none; color: var(--slate); }

.notice-admin { margin: 24px 0 0; padding: 12px 16px; border-radius: var(--radius-s); background: #fbeeea; color: #7a2c1d; }

/* ---------- Fußbereich ---------- */
.site-footer { background: var(--slate); color: #d6dee5; font-size: .97rem; }
.site-footer a { color: var(--white); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-widgets { padding: 48px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 28px; }
.footer-name { font-family: var(--font-head); font-weight: 600; font-size: 1.3rem; color: var(--white); margin: 0 0 4px; }
.footer-widgets .widget-title { font-family: var(--font-body); font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; color: #aebccb; margin: 0 0 10px; font-weight: 600; }
.footer-widgets ul { list-style: none; margin: 0; padding: 0; }
.footer-widgets li { margin: 0 0 6px; }
.footer-widgets .menu-title, .footer-widgets .menu-link { display: inline; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding: 16px 0; font-size: .88rem; color: #aebccb; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Mietobjekte: Übersicht ---------- */
.mo-intro { max-width: var(--read); padding-top: 32px; }
.mo-filter {
	display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end;
	background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
	padding: 18px 20px; margin: 32px 0 24px;
}
.mo-filter label { display: flex; flex-direction: column; gap: 4px; font-size: .9rem; font-weight: 600; color: var(--slate); }
.mo-filter select {
	font: inherit; font-size: 1rem; font-weight: 400; min-height: 46px; padding: 8px 12px; min-width: 150px;
	border: 1px solid #c3ccd4; border-radius: var(--radius-s); background: var(--white); color: var(--text);
}
@media (max-width: 600px) {
	.mo-filter { display: grid; grid-template-columns: 1fr 1fr; }
	.mo-filter select { min-width: 0; width: 100%; }
	.mo-filter .button { grid-column: 1 / -1; }
}
.mo-count { margin: 24px 0 16px; color: var(--muted); }
.archive .site-main > .container { padding-bottom: clamp(48px, 7vw, 80px); }
.post-type-archive-mietobjekt .site-main > .container { padding-top: clamp(32px, 5vw, 56px); }
.post-type-archive-mietobjekt .mo-intro { padding-top: 0; }

.mo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 24px; }
.mo-card {
	position: relative; display: flex; flex-direction: column;
	background: var(--white); border-radius: var(--radius); overflow: hidden;
	box-shadow: var(--shadow); transition: box-shadow .2s, transform .2s;
}
.mo-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.mo-card-image { position: relative; aspect-ratio: 3 / 2; background: var(--tint); }
.mo-card-image img { width: 100%; height: 100%; object-fit: cover; }
.mo-card-noimage { display: grid; place-items: center; height: 100%; color: var(--muted); }
.mo-badge {
	position: absolute; top: 12px; left: 12px;
	background: var(--white); color: var(--green-text);
	font-size: .8rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; box-shadow: var(--shadow);
}
.mo-card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.mo-card-title { margin: 0 0 4px; font-size: 1.2rem; }
.mo-card-title a { color: var(--slate); text-decoration: none; }
.mo-card-title a::after { content: ""; position: absolute; inset: 0; }
.mo-card-address { color: var(--muted); font-size: .95rem; margin: 0 0 16px; }
.mo-keyfacts { display: flex; margin: auto 0 0; border-top: 1px solid var(--line); padding-top: 14px; }
.mo-keyfacts div { flex: 1; }
.mo-keyfacts dt { font-size: .8rem; color: var(--muted); }
.mo-keyfacts dd { margin: 0; font-size: 1.12rem; font-weight: 700; color: var(--slate); }
.mo-empty { background: var(--paper); border: 1px dashed #c3ccd4; border-radius: var(--radius); padding: 30px; text-align: center; }
.mo-empty p:last-child { margin-bottom: 0; }

/* ---------- Mietobjekte: Detailseite ---------- */
.mo-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 40px; padding: 32px 0 clamp(48px, 7vw, 80px); }
@media (max-width: 960px) { .mo-layout { grid-template-columns: minmax(0, 1fr); gap: 24px; } }

.mo-gallery { margin-bottom: 28px; }
.mo-gallery-main {
	position: relative; display: block; width: 100%;
	aspect-ratio: 3 / 2; background: var(--tint); border-radius: var(--radius); overflow: hidden;
	border: 0; padding: 0; cursor: zoom-in;
}
.mo-gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.mo-gallery-count {
	position: absolute; right: 12px; bottom: 12px;
	background: rgba(30,40,50,.72); color: #fff; font-size: .88rem; padding: 4px 12px; border-radius: 999px;
}
.mo-thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; padding-bottom: 4px; }
.mo-thumbs button { flex: 0 0 92px; height: 66px; padding: 0; border: 2px solid transparent; border-radius: var(--radius-s); overflow: hidden; cursor: pointer; background: none; }
.mo-thumbs button[aria-current="true"] { border-color: var(--blue); }
.mo-thumbs img { width: 100%; height: 100%; object-fit: cover; }

.mo-topfacts {
	display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
	background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin: 0 0 32px;
}
.mo-topfacts div { background: var(--white); padding: 14px 16px; }
.mo-topfacts dt { font-size: .85rem; color: var(--muted); }
.mo-topfacts dd { margin: 0; font-size: 1.35rem; font-weight: 700; color: var(--slate); }
@media (max-width: 600px) { .mo-topfacts { grid-template-columns: 1fr 1fr; } .mo-topfacts dd { font-size: 1.15rem; } }

.mo-section { margin: 0 0 34px; }
.mo-section h2 { font-size: 1.35rem; margin: 0 0 14px; }
.mo-table { display: grid; grid-template-columns: 1fr 1fr; column-gap: 36px; margin: 0; }
.mo-table div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.mo-table dt { color: var(--muted); }
.mo-table dd { margin: 0; text-align: right; color: var(--slate); font-weight: 600; }
.mo-table .is-total dt, .mo-table .is-total dd { color: var(--slate); font-weight: 700; }
@media (max-width: 700px) { .mo-table { grid-template-columns: 1fr; } }

.mo-features { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.mo-features li {
	position: relative; background: var(--green-soft); color: var(--green-text);
	border-radius: 999px; padding: 5px 14px 5px 32px; font-size: .95rem; font-weight: 600;
}
.mo-features li::before {
	content: ""; position: absolute; left: 13px; top: 50%; width: 10px; height: 6px;
	border-left: 2px solid currentColor; border-bottom: 2px solid currentColor;
	transform: translateY(-70%) rotate(-45deg);
}
.mo-energy-scale { display: flex; margin: 12px 0 0; border-radius: var(--radius-s); overflow: hidden; font-size: .8rem; text-align: center; color: #fff; }
.mo-energy-scale span { flex: 1; padding: 4px 0; opacity: .4; font-weight: 600; }
.mo-energy-scale span.is-active { opacity: 1; box-shadow: inset 0 0 0 2px var(--slate); }

.mo-contact {
	position: sticky; top: calc(var(--header-h) + 20px);
	background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
	padding: 24px; box-shadow: var(--shadow);
}
.admin-bar .mo-contact { top: calc(var(--header-h) + 52px); }
.mo-price-box { font-family: var(--font-head); font-size: 2rem; font-weight: 600; color: var(--slate); margin: 0; line-height: 1.1; }
.mo-price-note { color: var(--muted); font-size: .95rem; margin: 4px 0 18px; }
.mo-contact h2 { font-size: 1.1rem; margin: 0 0 6px; padding-top: 16px; border-top: 1px solid var(--line); }
.mo-contact p { margin: 0 0 14px; }
.mo-contact .button { width: 100%; margin-bottom: 10px; }
.mo-contact small { display: block; color: var(--muted); margin-top: 4px; word-break: break-word; }

.mo-mobilebar { display: none; }
@media (max-width: 960px) {
	.mo-contact { position: static; }
	.single-mietobjekt .site-footer { padding-bottom: 76px; }
	.mo-mobilebar {
		position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
		display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
		padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom));
		background: rgba(255,255,255,.97); border-top: 1px solid var(--line);
		box-shadow: 0 -6px 18px rgba(29,45,60,.08);
	}
	.mo-mobilebar .button { width: 100%; }
}

/* ---------- Bildbetrachter ---------- */
.lightbox { position: fixed; inset: 0; z-index: 1000; background: rgba(18,24,30,.94); display: none; align-items: center; justify-content: center; }
.lightbox.is-open { display: flex; }
.lightbox img { max-width: 92vw; max-height: 84vh; object-fit: contain; background: #fff; }
.lightbox button {
	position: absolute; display: grid; place-items: center;
	width: 50px; height: 50px; border-radius: 50%; border: 0; cursor: pointer;
	background: rgba(255,255,255,.14); color: #fff; font-size: 28px; line-height: 1;
}
.lightbox button:hover { background: rgba(255,255,255,.28); }
.lightbox-close { top: 16px; right: 16px; }
.lightbox-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 16px; top: 50%; transform: translateY(-50%); }
.lightbox-caption { position: absolute; bottom: 16px; left: 70px; right: 70px; text-align: center; color: #d8dee4; font-size: .95rem; margin: 0; }
@media (max-width: 600px) { .lightbox-prev, .lightbox-next { top: auto; bottom: 56px; transform: none; } .lightbox-caption { left: 16px; right: 16px; } }

/* ---------- Diverses ---------- */
.pagination .nav-links { display: flex; gap: 6px; margin-top: 30px; flex-wrap: wrap; }
.pagination .page-numbers { display: grid; place-items: center; min-width: 44px; height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--radius-s); text-decoration: none; }
.pagination .current { background: var(--blue); border-color: var(--blue); color: var(--white); }

@media print {
	.site-header, .site-footer, .mo-gallery, .mo-mobilebar, .contact-band, .page-band::after { display: none !important; }
	.mo-layout { display: block; }
	.mo-contact { position: static; box-shadow: none; }
}
.intro-text .wp-block-spacer:last-child { display: none; }

@media (max-width: 420px) {
	.site-title-name { font-size: 1.05rem; }
	.site-title .site-logo { width: 42px; height: 42px; }
	.header-actions { gap: 0; }
	.header-inner { gap: 8px; }
}

/* ==========================================================================
   Gestaltungselemente für Seiteninhalte (im Editor über „Zusätzliche CSS-Klasse“)
   ei-lead · ei-panorama · ei-cards · ei-team · ei-box · ei-drawings · ei-role
   ========================================================================== */
.entry-content .ei-lead {
	font-size: clamp(1.12rem, 1.05rem + .35vw, 1.3rem);
	line-height: 1.55; color: var(--slate); margin-bottom: 1.4em;
}
.entry-content .ei-panorama { margin: 2em 0; }
.entry-content .ei-panorama img { width: 100%; max-height: 240px; object-fit: cover; object-position: center 75%; border-radius: var(--radius); }

.entry-content .ei-cards { gap: 18px; margin: 1.4em 0; }
.entry-content .ei-cards > .wp-block-column {
	background: var(--tint); border-radius: var(--radius); padding: 22px 24px;
	border-top: 3px solid var(--green);
}
.entry-content .ei-cards h3 { margin: 0 0 .4em; font-size: 1.15rem; }
.entry-content .ei-cards p { margin: 0; font-size: 1rem; }
.entry-content .ei-cards + .ei-cards { margin-top: -0.2em; }

.entry-content blockquote, .entry-content .wp-block-quote {
	margin: 2.2em 0; padding: 22px 26px; border: 0; border-left: 4px solid var(--green);
	background: var(--paper); border-radius: 0 var(--radius) var(--radius) 0;
	font-family: var(--font-head); font-weight: 600; font-size: clamp(1.25rem, 1.1rem + .6vw, 1.55rem); line-height: 1.35; color: var(--slate);
}
.entry-content .wp-block-quote p { margin: 0; }
.entry-content .wp-block-quote cite { display: block; margin-top: .6em; font-family: var(--font-body); font-size: .95rem; font-weight: 400; color: var(--muted); font-style: normal; }

.entry-content .ei-team { gap: 24px; margin: 1.6em 0; }
.entry-content .ei-team > .wp-block-column {
	background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
}
.entry-content .ei-team .wp-block-image { margin: 0; }
.entry-content .ei-team .wp-block-image img { width: 100%; aspect-ratio: 457 / 400; object-fit: cover; border-radius: 0; }
.entry-content .ei-team h3 { margin: 18px 22px 2px; font-size: 1.25rem; }
.entry-content .ei-team .ei-role { margin: 0 22px 10px; font-size: .9rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--green-text); }
.entry-content .ei-team p:not(.ei-role) { margin: 0 22px 22px; font-size: 1rem; }

.entry-content .ei-box {
	display: flex; flex-wrap: wrap; align-items: center; gap: 18px 28px;
	background: var(--tint); border-radius: var(--radius); padding: 24px 26px; margin: 2em 0;
}
.entry-content .ei-box > * { margin: 0; }
.entry-content .ei-box .wp-block-image img { max-width: 160px; border-radius: 0; background: var(--white); padding: 8px; }
.entry-content .ei-box p { flex: 1 1 260px; }

.entry-content .wp-block-gallery.ei-drawings { gap: 18px; margin: 1.6em 0; }
.entry-content .ei-drawings .wp-block-image {
	background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-s); padding: 12px; margin: 0;
	display: flex; flex-direction: column;
}
.entry-content .wp-block-gallery.ei-drawings .wp-block-image img { aspect-ratio: 1 / 1; object-fit: contain; border-radius: 0; height: auto; flex: none; }
.entry-content .wp-block-gallery.ei-drawings .wp-block-image figcaption {
	position: static; background: none; color: var(--muted); text-shadow: none; padding: 10px 0 0; margin: 0;
	font-size: .9rem; text-align: center; max-height: none; overflow: visible;
}
.entry-content .wp-block-gallery.ei-drawings .wp-block-image::before { display: none; }

/* Unterseiten nutzen die volle Inhaltsbreite (bündig mit dem Seitentitel) */
.page .page-content { max-width: none; }

/* Galerien als festes Raster (unabhängig von den Layout-Klassen des Editors) */
.entry-content .wp-block-gallery.ei-drawings,
.entry-content .wp-block-gallery.ei-houses { display: grid; grid-template-columns: repeat(3, 1fr); }
.entry-content .wp-block-gallery.ei-houses { grid-template-columns: repeat(2, 1fr); gap: 14px; }
.entry-content .wp-block-gallery.ei-drawings > .wp-block-image,
.entry-content .wp-block-gallery.ei-houses > .wp-block-image { width: auto !important; margin: 0 !important; }
.entry-content .wp-block-gallery.ei-houses img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
@media (max-width: 700px) { .entry-content .wp-block-gallery.ei-drawings { grid-template-columns: repeat(2, 1fr); gap: 10px; } .entry-content .ei-drawings .wp-block-image { padding: 8px; } }
.entry-content .ei-panorama.alignwide, .entry-content .ei-panorama.alignfull { width: auto; max-width: 100%; margin-left: 0; margin-right: 0; transform: none; }
.entry-content .ei-panorama img { display: block; }

/* Fußbereich: Kontakt mit Symbolen */
.footer-contact { list-style: none; margin: 0; padding: 0; }
.footer-contact li, .footer-line { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 8px; }
.footer-contact .ei-icon, .footer-line .ei-icon { margin-top: 4px; color: #aebccb; }
.footer-contact a, .footer-contact span { overflow-wrap: anywhere; }
.footer-contact .is-notfall .ei-icon { color: #f0a08f; }
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links li { margin: 0 0 8px; }
.footer-grid { grid-template-columns: 1.1fr .9fr 1.1fr 1.3fr; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }

/* Bildbänder: Einstieg +5 %, Kontaktbereich +10 % Höhe */
.hero .panorama img { max-height: 273px; object-position: center 60%; }
.contact-band .panorama img { max-height: 286px; object-position: center 60%; }

/* Kontaktbereich: mehr Platz für die E-Mail-Adresse */
.contact-grid { grid-template-columns: 1fr 1.75fr 1fr 1.15fr; }
.contact-item strong { overflow-wrap: normal; }
.contact-item.is-mail strong { white-space: nowrap; }
@media (max-width: 1180px) { .contact-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .contact-grid { grid-template-columns: 1fr; } .contact-item.is-mail strong { white-space: normal; overflow-wrap: anywhere; } }

/* Kontaktbereich mitten auf der Startseite */
.contact-band { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.contact-band .panorama { background: var(--white); }
