/*
Theme Name: Baudorf WP Theme
Template: generatepress
Version: 1.0
*/

/* =============================================================================
   IMMOBILIEN SINGLE TEMPLATE
   ============================================================================= */

/* ── Layout ── */

.immobilie-single .inside-article {
	padding: 0 0 4rem;
}

.immobilie-single .inside-article > section,
.immobilie-single .immobilie-header {
	max-width: 900px;
	margin-left: auto;
	margin-right: auto;
	padding-left: 2rem;
	padding-right: 2rem;
}

/* ── 1. Hero Image ── */

.immobilie-hero {
	width: 100%;
	max-height: 560px;
	overflow: hidden;
	margin-bottom: 2.5rem;
}

.immobilie-hero__img {
	width: 100%;
	height: 100%;
	max-height: 560px;
	object-fit: cover;
	display: block;
}

/* ── 2. Title + Subtitle ── */

.immobilie-header {
	margin-bottom: 2.5rem;
}

.immobilie-title {
	font-size: 2rem;
	font-weight: 700;
	line-height: 1.2;
	margin-bottom: 0.6rem;
	color: #1a1a1a;
}

.immobilie-subtitle {
	font-size: 1.1rem;
	color: #5a5a5a;
	line-height: 1.6;
	margin: 0;
}

/* ── 3. Key Facts ── */

.immobilie-keyfacts {
	border-top: 1px solid #e0e0e0;
	border-bottom: 1px solid #e0e0e0;
	padding-top: 2rem;
	padding-bottom: 2rem;
	margin-bottom: 2.5rem;
	display: flex;
	flex-direction: column;
	gap: 2rem;
}

/* Block 1: Stats (4-column grid) */

.keyfacts-block--meta {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 1rem;
}

.keyfacts-block--stats {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 1rem;
}

.keyfact {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	padding: 1.25rem 0.75rem;
	background: #f7f7f7;
	border-radius: 4px;
}

.keyfact__value {
	font-size: 1.5rem;
	font-weight: 700;
	color: #1a1a1a;
	line-height: 1;
	margin-bottom: 0.4rem;
}

.keyfact__unit {
	font-size: 0.85rem;
	font-weight: 400;
	color: #5a5a5a;
}

.keyfact__label {
	font-size: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: #888;
}

/* Block 2: Stadt + Bundesland */

.keyfacts-block--cities {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1rem;
}

/* Blocks 3–4: Makrolage + Mikrolage */

.keyfacts-block--lage {
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
	padding-top: 1rem;
	border-top: 1px solid #ebebeb;
}

.lage-label {
	font-size: 1rem;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: #999;
}

.lage-value {
	font-size: 1rem;
	color: #1a1a1a;
	line-height: 1.6;
	margin: 0;
}

/* ── 4. Gallery ── */

.immobilie-gallery {
	margin-bottom: 2.5rem;
}

.immobilie-gallery__inner .wp-block-gallery {
	margin: 0;
}

.immobilie-gallery__inner figure {
	margin: 0;
}

/* Swiper slider */
.immobilie-gallery__slider {
	width: 100%;
	aspect-ratio: 16 / 10;
	background: #1a1a1a;
}

.immobilie-gallery__slider .swiper-slide {
	overflow: hidden;
}

.immobilie-gallery__slider .swiper-slide a {
	display: block;
	width: 100%;
	height: 100%;
	cursor: zoom-in;
}

.immobilie-gallery__slider .swiper-slide img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.immobilie-gallery__slider .swiper-button-prev,
.immobilie-gallery__slider .swiper-button-next {
	background: none;
	color: #fff;
	transition: color 0.15s ease;
}

.immobilie-gallery__slider .swiper-button-prev:hover,
.immobilie-gallery__slider .swiper-button-next:hover {
	color: rgba(255, 255, 255, 0.5);
}

/* ── 5. Description ── */

.immobilie-description {
	margin-bottom: 2.5rem;
}

.immobilie-description__content {
	font-size: 1rem;
	line-height: 1.8;
	color: #333;
}

.immobilie-description__content p {
	margin-bottom: 1.2em;
}

/* ── 6. Kaufpreis ── */

.immobilie-price {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.3rem;
	padding: 1.75rem 2rem;
	background: #1a1a1a;
	color: #fff;
	border-radius: 4px;
	margin-bottom: 2rem;
}

.immobilie-price__label {
	font-size: 0.7rem;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: #aaa;
}

.immobilie-price__value {
	font-size: 2rem;
	font-weight: 700;
	color: #fff;
	line-height: 1;
}

/* ── 7. Courtage ── */

.immobilie-courtage {
	padding: 1.25rem 1.5rem;
	background: #f7f7f7;
	border-left: 3px solid #d0d0d0;
	border-radius: 0 4px 4px 0;
	margin-bottom: 2.5rem;
}

.immobilie-courtage__provision {
	font-size: 1rem;
	font-weight: 600;
	color: #1a1a1a;
	margin-bottom: 0.5rem;
}

.immobilie-courtage__message {
	font-size: 1rem;
	color: #5a5a5a;
	line-height: 1.7;
}

/* ── 8. Energieinformationen ── */

.immobilie-energie {
	border: 1px solid #e0e0e0;
	border-radius: 4px;
	padding: 1.75rem 2rem;
	margin-bottom: 2.5rem;
	background: #fafafa;
}

.immobilie-energie__heading {
	font-size: 0.7rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: #999;
	margin-bottom: 1.5rem;
	padding-bottom: 0.75rem;
	border-bottom: 1px solid #e8e8e8;
}

.immobilie-energie__grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1.25rem 2rem;
}

.energie-item {
	display: flex;
	flex-direction: column;
	gap: 0.3rem;
}

.energie-item__label {
	font-size: 0.7rem;
	text-transform: uppercase;
	letter-spacing: 0.07em;
	color: #999;
}

.energie-item__value {
	font-size: 0.95rem;
	font-weight: 600;
	color: #1a1a1a;
	display: flex;
	align-items: baseline;
	gap: 0.3em;
}

.energie-item__unit {
	font-size: 0.75rem;
	font-weight: 400;
	color: #666;
}

/* Energy efficiency class badge */

.energie-badge {
	display: inline-block;
	padding: 0.15em 0.6em;
	border-radius: 3px;
	font-size: 0.9rem;
	font-weight: 700;
	color: #fff;
	letter-spacing: 0.03em;
	background: #aaa; /* fallback */
}

.energie-badge--aplus { background: #00a650; }
.energie-badge--a     { background: #50b848; }
.energie-badge--b     { background: #c8d400; color: #333; }
.energie-badge--c     { background: #ffd200; color: #333; }
.energie-badge--d     { background: #efb700; color: #333; }
.energie-badge--e     { background: #ef7d00; }
.energie-badge--f     { background: #e83f1a; }
.energie-badge--g     { background: #e01c22; }
.energie-badge--h     { background: #b4232a; }

/* ── 9. Exposé CTA ── */

.immobilie-expose {
	margin-bottom: 1rem;
	text-align: center;
}

.immobilie-expose__btn {
	display: inline-block;
	padding: 0.9rem 2.5rem;
	background: #1a1a1a;
	color: #fff;
	font-size: 0.95rem;
	font-weight: 600;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	border: 2px solid #1a1a1a;
	border-radius: 3px;
	cursor: pointer;
	transition: background 0.2s ease, color 0.2s ease;
}

.immobilie-expose__btn:hover,
.immobilie-expose__btn:focus {
	background: #fff;
	color: #1a1a1a;
}

/* ── Exposé Modal ── */

.expose-modal {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 9999;
	display: flex;
	align-items: center;
	justify-content: center;
}

.expose-modal[hidden] {
	display: none;
}

.expose-modal__overlay {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	background: rgba(0, 0, 0, 0.55);
	cursor: pointer;
}

.expose-modal__box {
	position: relative;
	z-index: 1;
	background: #fff;
	border-radius: 6px;
	padding: 2.5rem 2rem 2rem;
	width: 90vw;
	max-height: calc(100dvh - 2rem);
	overflow-y: auto;
	box-shadow: 0 8px 40px rgba(0, 0, 0, 0.2);
}

.expose-modal__close {
	position: absolute;
	top: 0.75rem;
	right: 0.75rem;
	width: 2rem;
	height: 2rem;
	background: none;
	border: none;
	font-size: 1.4rem;
	line-height: 1;
	cursor: pointer;
	color: #888;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 3px;
	padding: 0;
	transition: color 0.15s ease, background 0.15s ease;
}

.expose-modal__close:hover,
.expose-modal__close:focus {
	color: #1a1a1a;
	background: #f0f0f0;
}

.expose-modal__title {
	font-size: 1.25rem;
	font-weight: 700;
	color: #1a1a1a;
	margin-bottom: 1.5rem;
}

.expose-modal__thanks {
	text-align: center;
	padding: 2rem 1rem;
	font-size: 1.1rem;
	color: #1a1a1a;
	margin: 0;
}

/* CF7 form inside modal — 2×2 field grid for the first four inputs */
.expose-modal__box .wpcf7-form {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.75rem 1rem;
}

.expose-modal__box .wpcf7-form p {
	margin: 0;
}

/* Checkbox rows, nachricht, submit row break out of the 2-column grid */
.expose-modal__box .wpcf7-form p:has(input[type="checkbox"]),
.expose-modal__box .wpcf7-form p:has(input[type="submit"]),
.expose-modal__box .wpcf7-form p:has(span[data-name="kunde_nachricht"]),
.expose-modal__box .wpcf7-response-output {
	grid-column: 1 / -1;
}

.expose-modal__box .wpcf7-spinner {
	display: none;
}

/* Submit button fills the full modal width */
.expose-modal__box .wpcf7-form input[type="submit"] {
	width: 100%;
	box-sizing: border-box;
}

/* Text/email/tel inputs fill their grid cell */
.expose-modal__box .wpcf7-form input:not([type="submit"]):not([type="checkbox"]),
.expose-modal__box .wpcf7-form textarea {
	width: 100%;
	box-sizing: border-box;
}

/* ── Responsive ── */

@media (max-width: 768px) {
	.keyfacts-block--stats {
		grid-template-columns: repeat(2, 1fr);
	}

	.keyfacts-block--cities {
		grid-template-columns: 1fr 1fr;
	}

	.immobilie-energie__grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.immobilie-title {
		font-size: 1.5rem;
	}

	.immobilie-price__value {
		font-size: 1.5rem;
	}
}

@media (max-width: 480px) {
	.keyfacts-block--stats {
		grid-template-columns: repeat(2, 1fr);
	}

	.keyfacts-block--cities {
		grid-template-columns: 1fr;
	}

	.immobilie-energie__grid {
		grid-template-columns: 1fr;
	}

	.immobilie-single .inside-article > section,
	.immobilie-single .immobilie-header {
		padding-left: 1rem;
		padding-right: 1rem;
	}
}

/* =============================================================================
   FOOTER
   ============================================================================= */

.site-footer,
.site-footer .site-info {
	background-color: #f5f5f5;
}

.site-footer {
	border-top: 1px solid #e0e0e0;
}


.inside-site-info {
	justify-content: space-between;
}

/* Nav renders first in DOM — push it visually to the right */
.footer-navigation {
	order: 1;
}

/* Horizontal list, no bullets */
#footer-menu {
	display: flex;
	gap: 1.5em;
	list-style: none;
	margin: 0;
	padding: 0;
}

#footer-menu a {
	text-decoration: none;
}

@media (max-width: 600px) {
	.inside-site-info {
		flex-direction: column;
		gap: 0.75em;
		text-align: center;
	}

	.footer-navigation {
		order: 0;
	}
}

/* =============================================================================
   EXPOSÉ MODAL
   ============================================================================= */

.expose-modal {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
}

.expose-modal[hidden] {
	display: none;
}

.expose-modal__overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.55);
	cursor: pointer;
}

.expose-modal__box {
	position: relative;
	z-index: 1;
	background: #fff;
	border-radius: 6px;
	padding: 2.5rem 2rem 2rem;
	width: min(540px, calc(100vw - 2rem));
	max-height: calc(100dvh - 2rem);
	overflow-y: auto;
	box-shadow: 0 8px 40px rgba(0, 0, 0, 0.22);
}

.expose-modal__close {
	position: absolute;
	top: 0.75rem;
	right: 0.75rem;
	width: 2rem;
	height: 2rem;
	padding: 0;
	background: none;
	border: none;
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
	color: #888;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 4px;
	transition: color 0.15s, background-color 0.15s;
}

.expose-modal__close:hover,
.expose-modal__close:focus-visible {
	color: #1a1a1a;
	background-color: #f0f0f0;
	outline: none;
}

.expose-modal__title {
	font-size: 1.25rem;
	font-weight: 700;
	margin-top: 0;
	margin-bottom: 1.5rem;
	color: #1a1a1a;
}

@media (max-width: 480px) {
	.expose-modal__box {
		padding: 2rem 1.25rem 1.25rem;
		border-radius: 0;
		width: 100vw;
		max-height: 100dvh;
		align-self: flex-end;
	}
}

/* =============================================================================
   IMMOBILIEN LISTING GRID
   ============================================================================= */

/* Page header shared by archive, taxonomy, and offmarket pages */

.page-header {
	margin-bottom: 2.5rem;
}

.page-title {
	font-size: 2rem;
	font-weight: 700;
	color: #1a1a1a;
	margin: 0;
}

/* Grid layout */

.immo-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1.75rem;
	margin-bottom: 3rem;
}

/* Empty state */

.immo-grid__empty {
	color: #5a5a5a;
	font-size: 1rem;
	margin: 2rem 0;
}

/* ── Card ── */

.immo-card {
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid #e8e8e8;
	border-radius: 6px;
	overflow: hidden;
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.immo-card:hover {
	box-shadow: 0 6px 24px rgba(0, 0, 0, 0.1);
	transform: translateY(-2px);
}

/* Card image */

.immo-card__image-link {
	display: block;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	background: #f0f0f0;
}

.immo-card__image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.3s ease;
}

.immo-card:hover .immo-card__image {
	transform: scale(1.03);
}

.immo-card__image--placeholder {
	width: 100%;
	height: 100%;
	background: #e8e8e8;
}

/* Card body */

.immo-card__body {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	padding: 1.25rem;
	flex: 1;
}

/* Meta row: Objektart left, status badge right */

.immo-card__meta {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 0.5rem;
	min-height: 1.6em;
}

/* Status badge */

.immo-card__badge {
	display: inline-block;
	flex-shrink: 0;
	padding: 0.2em 0.65em;
	border-radius: 3px;
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0.07em;
	text-transform: uppercase;
}

.immo-card__badge--offmarket  { background: #931818; color: #fff; }
.immo-card__badge--verfuegbar { background: #1a6e35; color: #fff; }
.immo-card__badge--verkauft   { background: #1a4a8a; color: #fff; }
.immo-card__badge--neu        { background: #6b1a8a; color: #fff; }
.immo-card__badge--reserviert { background: #8a5e1a; color: #fff; }

/* Objektart terms */

.immo-card__terms {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem;
}

.immo-card__term {
	font-size: 0.7rem;
	color: #888;
	text-transform: uppercase;
	letter-spacing: 0.07em;
}

/* Title */

.immo-card__title {
	font-size: 1.05rem;
	font-weight: 700;
	line-height: 1.3;
	margin: 0;
	color: #1a1a1a;
}

.immo-card__title-link {
	color: inherit;
	text-decoration: none;
}

.immo-card__title-link:hover {
	text-decoration: underline;
}

/* Location */

.immo-card__location {
	font-size: 0.875rem;
	color: #5a5a5a;
	margin: 0;
}

/* Stats row */

.immo-card__stats {
	display: flex;
	gap: 1.25rem;
	margin-top: 0.25rem;
}

.immo-card__stat {
	display: flex;
	flex-direction: column;
	gap: 0.1rem;
}

.immo-card__stat-value {
	font-size: 0.9rem;
	font-weight: 600;
	color: #1a1a1a;
}

.immo-card__stat-label {
	font-size: 0.7rem;
	text-transform: uppercase;
	letter-spacing: 0.07em;
	color: #999;
}

/* Price */

.immo-card__price {
	margin-top: auto;
	padding-top: 0.75rem;
	border-top: 1px solid #ebebeb;
	font-size: 1.15rem;
	font-weight: 700;
	color: #1a1a1a;
}

/* Responsive */

@media (max-width: 900px) {
	.immo-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 540px) {
	.immo-grid {
		grid-template-columns: 1fr;
	}

	.page-title {
		font-size: 1.5rem;
	}
}

/* =============================================================================
   HEADER
   ============================================================================= */
.site-header {
	position: sticky;
	top: 0;
	z-index: 999;
	transition: box-shadow 0.2s ease;
}

.site-header.is-scrolled {
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
.inside-header {
    padding-top: 20px;
    padding-bottom: 0px;
}

.home .site-content {
    padding-top: 20px;
}
