/* Design tokens (site-wide, taken from the /verkaufen landing page) */
:root {
	--lp-dark: #121212;
	--lp-gold: #f2be5a;
	--lp-gold-dark: #8b6a2e;
	--lp-beige: #f4f2ee;
	--lp-text: #222;
	--lp-muted: #666;
	--lp-line: #dcd9d2;
}

/* Landingpage /verkaufen (page cssClass lp-verkaufen, content: sql/verkaufen-landingpage.sql) */

.lp-verkaufen .mod_article.lp {
	scroll-margin-top: 80px;
	background: #fff;
	color: var(--lp-text);
	font-size: 17px;
	line-height: 1.6;

	&.lp-dark { background: var(--lp-dark); color: #fff; }
	&.lp-beige { background: var(--lp-beige); }
	&.lp-cols-2 { --cols: 2; }
	&.lp-cols-3, &.lp-benefits { --cols: 3; }

	> .container {
		max-width: 1280px;
		padding: 96px 24px;

		@media (max-width: 767px) { padding: 56px 16px; }
	}

	:is(h1, h2, h3) { margin: 0 0 .5em; color: inherit; font-weight: 700; letter-spacing: 0; line-height: 1.15; text-transform: none; }
	h1 { font-size: clamp(38px, 5vw, 64px); line-height: 1.08; }
	h2 { font-size: clamp(30px, 4vw, 50px); }
	h3 { font-size: 22px; line-height: 1.3; }
	p { margin: 0 0 1em; color: inherit; font-size: inherit; font-weight: 400; line-height: inherit; }
	:is(p, li, h1, h2, h3, summary) { hyphens: manual; }
	a { color: inherit; }
	img { display: block; width: 100%; height: auto; }

	:is(ul, ol) { margin: 0; padding: 0; list-style: none; }
	li { margin: 0; padding: 0; color: inherit; list-style: none; }
	li::before { content: none; }
	li p, .lp-intro { color: var(--lp-muted); }
	&.lp-dark .ce_text p { color: rgba(255, 255, 255, .85); }

	.lp-eyebrow { margin-bottom: 1.25rem; color: var(--lp-gold-dark); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
	.lp-lead { font-size: 22px; font-weight: 700; line-height: 1.35; }
	&.lp-dark .ce_text :is(.lp-eyebrow, .lp-lead) { color: var(--lp-gold); }
	.lp-small { font-size: 13px; opacity: .75; }
	.lp-link { text-decoration: underline; text-underline-offset: 4px; }

	/* Head: eyebrow + h2 left, intro right */
	.ce_text:has(> .lp-intro) {
		display: grid;
		grid-template-columns: 3fr 2fr;
		column-gap: 64px;

		> * { grid-column: 1 / -1; }
		> .lp-eyebrow { grid-area: 1 / 1; }
		> h2 { grid-area: 2 / 1; }
		> .lp-intro { grid-area: 2 / 2; padding-top: .5em; }

		@media (max-width: 767px) { display: block; }
	}

	/* Repeated items: one text element with a list, columns via --cols */
	.ce_text > :is(ul, ol) {
		display: grid;
		grid-template-columns: repeat(var(--cols, 1), minmax(0, 1fr));
		gap: 48px;

		&:not(:first-child) { margin-top: 56px; }
		@media (max-width: 767px) { grid-template-columns: minmax(0, 1fr); gap: 40px; }
	}

	.lp-cta-row {
		display: flex;
		flex-wrap: wrap;
		align-items: center;
		justify-content: space-between;
		gap: 24px;
		margin-top: 56px;

		p { margin: 0; }
	}

	/* Gold short line */
	&.lp-lines li::before, .lp-sign::before, .lp-role::after { content: ""; display: block; width: 56px; height: 2px; margin: 0 0 24px; background: var(--lp-gold); }
	.lp-role::after { margin: 20px 0 0; }

	&.lp-split > .container {
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: 0 80px;
		align-items: start;

		> :first-child { grid-row: span 2; }
		@media (max-width: 900px) { grid-template-columns: minmax(0, 1fr); gap: 48px; > :first-child { grid-row: auto; } }
	}

	&.lp-hero {
		> .container { align-items: center; padding-top: 72px; }
		.ce_image img { aspect-ratio: 3 / 4; object-fit: cover; }
		@media (max-width: 900px) { .ce_image img { aspect-ratio: 4 / 3; } }
	}

	&.lp-benefits {
		> .container { padding-bottom: 64px; }
		ul { gap: 0; }
		li { display: grid; grid-template-columns: 32px 1fr; align-content: start; column-gap: 20px; padding: 0 32px; }
		li:first-child { padding-left: 0; }
		li + li { border-left: 1px solid var(--lp-line); }
		li::before { grid-row: 1 / 3; color: var(--lp-gold-dark); font: 28px/1 FontAwesome; }
		li:nth-child(1)::before { content: "\f080"; }
		li:nth-child(2)::before { content: "\f0f6"; }
		li:nth-child(3)::before { content: "\f0c0"; }
		.lp-cta-row { padding-top: 32px; border-top: 1px solid var(--lp-line); font-size: 20px; }

		@media (max-width: 767px) {
			li { padding: 28px 0 0; }
			li + li { border-left: 0; border-top: 1px solid var(--lp-line); }
		}
	}

	&.lp-numbered {
		ol { counter-reset: lp; }
		li { counter-increment: lp; }
		li::before { content: counter(lp, decimal-leading-zero); display: block; margin-bottom: 20px; color: var(--lp-gold-dark); font-size: 18px; font-weight: 700; }
	}

	&.lp-numbered.lp-cols-2 {
		ol { gap: 48px 64px; }
		li { display: grid; grid-template-columns: 64px 1fr; align-content: start; padding-top: 28px; border-top: 1px solid var(--lp-line); }
		li::before { grid-row: 1 / 3; margin: 0; line-height: 1.3; }
	}

	&.lp-cards {
		ul { gap: 32px; }
		img { aspect-ratio: 3 / 2; margin-bottom: 20px; object-fit: cover; background: #e8e6df; }
		.lp-eyebrow { margin-bottom: .5rem; }
		li a { color: var(--lp-muted); font-size: 14px; }
	}

	&.lp-team {
		li { display: flex; align-items: center; gap: 28px; }
		li img { flex: none; width: 220px; aspect-ratio: 4 / 5; object-fit: cover; }
		@media (max-width: 767px) { li img { width: 130px; } li h3 { font-size: 20px; } }
		li h3 { font-size: 24px; }
		li p { margin-bottom: .5rem; }
		li a { color: var(--lp-text); font-size: 18px; text-decoration: none; }
		.lp-mail { margin-top: 48px; font-size: 18px; }
	}

	&.lp-faq {
		> .container > :first-child { position: sticky; top: 120px; }
		@media (max-width: 900px) { > .container > :first-child { position: static; } }
		.mod_faqpage { margin-bottom: 40px; border-top: 1px solid var(--lp-line); }
		details { border-bottom: 1px solid var(--lp-line); }
		summary { display: flex; justify-content: space-between; gap: 24px; padding: 24px 0; font-size: 19px; cursor: pointer; list-style: none; }
		summary::-webkit-details-marker { display: none; }
		summary::after { content: "+"; color: var(--lp-gold-dark); font-size: 24px; line-height: 1; }
		details[open] summary { font-weight: 700; }
		details[open] summary::after { content: "–"; }
		details p { color: var(--lp-muted); }
	}
}

/* Sell form (2 steps) */
.lp-verkaufen .ce_form {
	padding: 40px;
	background: #fff;
	color: var(--lp-text);

	@media (max-width: 767px) { padding: 24px; }
}

.lp-verkaufen .mod_article.lp .ldi-steps {
	display: grid;
	grid-template-columns: 1fr 1fr;
	margin: 0;

	li { margin: 0; padding: 0 0 14px; border-bottom: 2px solid var(--lp-line); color: var(--lp-muted); font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
	[aria-current] { border-color: var(--lp-gold); color: var(--lp-text); }
}

.lp-verkaufen .mod_article.lp .ldi-sell-form {
	[hidden] { display: none !important; }
	fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
	span.mandatory { display: none; }

	.widget-text:has(> input:not(:required)) > label::after { content: " (freiwillig)"; font-weight: 400; }

	.ldi-note { margin: 12px 0 0; color: var(--lp-muted); font-size: 13px; }
	.ldi-step > .ldi-note:first-child { margin: 0 0 20px; }
	a { text-decoration: underline; }

	.ldi-back { margin: 0 0 16px; padding: 0; border: 0; background: none; color: var(--lp-muted); font-size: 14px; text-decoration: underline; cursor: pointer; }

	fieldset.ldi-segments {
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: 12px;

		span { position: relative; }
		input { position: absolute; opacity: 0; }
		label { display: flex; align-items: center; height: 50px; margin: 0; padding: 0 14px; border: 1px solid var(--lp-line); font-weight: 400; cursor: pointer; }
		input:checked + label { border-color: var(--lp-gold); background: #fdf8ec; font-weight: 700; }
		input:focus-visible + label { outline: 2px solid var(--lp-text); }
	}
}

.ldi-sell-success h3 { margin: 0 0 .5em; }

/* ==========================================================================
 * Site-wide look (all pages): buttons, form fields, type, backgrounds.
 * #main/#slider prefix outranks the theme; !important only where the theme
 * or files/ldi/scss/styles.scss uses it.
 * ========================================================================== */

/* Buttons: square, gold, arrow right */
:is(#main, #slider) :is(a.lp-btn, a.hyperlink_txt, .btn-action-call, button.submit, .ldi-next, button.reset) {
	display: inline-flex;
	align-items: center;
	justify-content: space-between;
	gap: 40px;
	width: auto;
	max-width: none;
	height: auto;
	margin: 0;
	padding: 15px 20px;
	border: 0 !important;
	border-radius: 0;
	background: var(--lp-gold) !important;
	color: var(--lp-dark);
	font-size: 17px;
	font-weight: 700;
	letter-spacing: 0;
	line-height: 1.4;
	text-align: left;
	text-decoration: none;
	text-transform: none;
	opacity: 1;
	cursor: pointer;
	transition: background-color .15s, transform .1s ease-out;

	&::after { content: "→"; }
	&:hover { background: #e5a93a !important; color: var(--lp-dark); }
	&:active { transform: scale(.96); }

	@media (prefers-reduced-motion: reduce) { transition: none; &:active { transform: none; } }
}

#main .ldi-sell-form :is(button.submit, .ldi-next) { width: 100%; margin-top: 8px; }
#main .lp-hero a.lp-btn { margin-top: 1rem; }
#main .ce_form form.ldi-sell-form { .ldi-step { padding-top: 24px; } .widget { margin: 0 0 20px; } }
:is(#main, #slider) :is(a, div).btn-action-call { display: flex; width: max-content; margin-inline: auto; }
#main .ldi-search-form-btn { margin-right: 16px; }
/* Secondary button (Kaufen filter "Zurücksetzen"): the gold button outlined, no arrow */
#main button.reset {
	margin-right: 16px;
	padding: 14px 20px;
	border: 1px solid var(--lp-gold) !important;
	background: transparent !important;
	color: #fff;

	&::after { content: none; }
	&:hover { background: rgba(242, 190, 90, .12) !important; color: #fff; }
}
#main a.expose-link { color: var(--lp-gold-dark); font-weight: 700; text-transform: none; }

/* Form fields: square, 1px line, gold focus */
:is(#main, #slider) {
	:is(input.text, input.captcha, select, textarea) {
		width: 100%;
		height: 50px;
		padding: 0 14px;
		border: 1px solid var(--lp-line);
		border-radius: 0;
		background-color: #fff;
		color: var(--lp-text);
		font-size: 16px;

		&:focus { border-color: var(--lp-gold); outline: 2px solid var(--lp-gold); outline-offset: -2px; }
		&:user-invalid { border-color: #c0392b; }
	}

	textarea.textarea { height: 180px; padding: 12px 14px; }
	select:has(option[value=""]:checked), input::placeholder, textarea::placeholder { color: #8a8a8a; opacity: 1; }
	input[type="checkbox"], input[type="radio"] { accent-color: var(--lp-gold-dark); }
	p.error { margin: 0 0 6px; color: #c0392b; font-size: 14px; }

	:is(.ce_form, .ce_filter) {
		:is(label, legend) { display: block; width: 100%; margin: 0 0 8px; padding: 0; border: 0; background: none; color: inherit; font-size: 15px; font-weight: 700; text-transform: none; }
		.checkbox_container label { display: inline; font-weight: 400; }
		fieldset { padding: 0; border: 0; }
		fieldset:not(.ldi-step, .radio_container, .checkbox_container) { margin: 0 0 32px; }
		fieldset:not(.radio_container, .checkbox_container) > legend { color: var(--lp-gold-dark); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
		.widget { margin-bottom: 16px; }
	}
}

/* Type: bold headings, no wide spacing; theme serif off; eyebrow style */
body:not(.lp-verkaufen) :is(#main, #slider) {
	:is(h1, h2, h3, h4, h5, h6) { color: var(--lp-text); font-weight: 700; letter-spacing: 0; line-height: 1.2; }
	:is(h1, h2, h3, h4, h5, h6) :is(.color-accent, span) { color: inherit; }
	.background-text { display: none; }
	.ce_text_extented.color-lightgray.font_serif p { color: var(--lp-gold-dark); font-size: 13px; font-weight: 700; letter-spacing: .06em; }
	:is(.font-style-letter-sp5, .font-style-letter-sp5 *) { letter-spacing: 0; }
}

:is(#main, #slider, #footer) :is(.font_serif, .font_serif_2) { font-family: "Open Sans", sans-serif; }
:is(#main, #slider) .ce_list li { font-family: "Open Sans", sans-serif !important; &::before { font-family: FontAwesome !important; } }

/* Backgrounds: near-black instead of greys/black, beige instead of light grey */
body:not(.lp-verkaufen) {
	:is(.bg-darkgrey, .bg-darkgray, .bg-black, .mod_article.bg-styles:is([style*="0,0,0,1"], [style*="64,64,64,1"])) { background-color: var(--lp-dark) !important; }
	#slider .ce_bgimage:has(> .ce_bgimage-image[style*="url("]:not([style*="10Prozent"])) { background-color: var(--lp-dark) !important; }
	#slider .ce_bgimage-image[style*="url("]:not([style*="10Prozent"]) { background-image: none !important; }
	.bg-lightgray { background-color: var(--lp-beige) !important; }

	:is(#slider, .bg-darkgrey, .bg-darkgray, .bg-black, .bg-styles, .bg_dark) {
		:is(h1, h2, h3, h4, h5, h6, label) { color: #fff; }
		:is(h1, h2, h3, h4, h5, h6) .color-accent, :is(.font-style-letter-sp5, .txt-color-second) * { color: var(--lp-gold); }
		fieldset > legend { color: var(--lp-gold) !important; }
	}

	#slider .bg-lightgray :is(h1, h2, h3, h4, h5, h6) { color: var(--lp-text); .color-accent { color: inherit; } }

	.ce_teambox {
		.name { color: #fff; }
		.function { color: var(--lp-gold); }
		.phone { color: rgba(255, 255, 255, .85); }
	}
}

/* Footer: near-black, gold accents */
#footer {
	background: var(--lp-dark);
	color: rgba(255, 255, 255, .75);

	:is(h1, h2, h3, h4, h5, h6) { color: #fff; font-weight: 700; }
	a:hover { color: var(--lp-gold); }
}

.body_bottom, #bottom { background: #000; }

/* Flat: no shadows or 3D text anywhere (Google Maps controls excepted); cards keep their edge as a 1px line */
:not(.gm-style *), :not(.gm-style *)::before, :not(.gm-style *)::after { text-shadow: none !important; box-shadow: none !important; }
:is(.real_estate_item_default, .mod_realEstateExpose.detail-top) { border: 1px solid var(--lp-line); }
.swiper-pagination-bullet { border: 1px solid currentColor; }

/* Form fields on dark backgrounds (Home/Kaufen filter, 10 % form): dark fill, soft line, white text */
:is(#main, #slider) :is(.ce_filter, #vermittlungsform) :is(input.text, select, textarea) {
	border-color: rgba(255, 255, 255, .22);
	background-color: rgba(255, 255, 255, .06);
	color: #fff;

	&::placeholder { color: rgba(255, 255, 255, .5); }
	option { color: var(--lp-text); }
}

/* Home "Top Immobilien" slider: long descriptions end with "…" so every card keeps the same height */
.ldi-top-imo-slider .main-description {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 5;
	overflow: hidden;
}

/* Same slider: every photo in a 4:3 frame (portrait photos are cropped), so no photo stretches its card */
.ldi-top-imo-slider .main-image img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }

/* Same slider: hide the black info strip when a listing has no m²/Zimmer/Badezimmer (e.g. plots) */
.ldi-top-imo-slider .main-image-info:not(:has(span)) { display: none; }

/* Main navigation: regular weight instead of bold (matches the mobile menu) */
.header .mod_navigation.mainmenu :is(a, span) { font-weight: 400; }

/* Sticky header logo: use the PNG like the normal header. The theme's SVG sets "IMMOBILIEN" as live text in
   a font the site doesn't load (Lato Light), so the fallback font is wider and gets cut off. */
@media (min-width: 768px) {
	.header.cloned .logo a { background-image: url("/files/ldi/images/LD_Logo_Web.png"); }
}
