/* =====================================================================
   Praml Bau – eigenes CSS (Child-Theme „pramlbau“)
   Stand: 26.11.2026 – zusammengeführt aus „Design → Customizer → Zusätzliches CSS“

   Inhalt
   1. Farben (Variablen)
   2. Buttons (pramlbutton, „Mehr laden“, Newsbutton)
   3. Allgemeines Layout (Beiträge, Rahmen, Slider, Scroll-to-Top)
   4. Mobiles Menü
   5. WP-ImmoMakler: Listen, Kacheln, Objektdaten
   6. WP-ImmoMakler: Formulare im Stil des Kontaktformulars (Formidable)
   7. Popups (custompopup)
   ===================================================================== */


/* =====================================================================
   1. Farben
   ===================================================================== */

:root {
	--pb-blau: #1b327b;
	--pb-rot: #9b2a0f;
	--pb-gruen: #95c11e;
	--pb-text: #344054;
	--pb-verlauf: linear-gradient(90deg, var(--pb-blau) 0%, var(--pb-rot) 25%, var(--pb-gruen) 75%, var(--pb-blau) 100%);
	--pb-schatten-hover: 0 12px 18px -6px rgba(0, 0, 0, 0.3);
}


/* =====================================================================
   2. Buttons
   ===================================================================== */

/* Gemeinsamer Verlaufs-Button: eigene Klasse „pramlbutton“ und „Mehr laden“ von ImmoMakler */
.pramlbutton,
.immomakler-load-more-btn {
	border: none !important;
	background: var(--pb-verlauf);
	background-size: 400% 100%;
	background-position: 0% 0%;
	cursor: pointer;
	font-weight: 500 !important;
	transition: background-position 0.4s ease-out;
}

.pramlbutton {
	width: 100% !important;
}

.immomakler-load-more-btn {
	padding: 1em 2em !important;
	font-size: 1em;
	text-transform: uppercase;
	color: #fff;
}

.pramlbutton:hover,
.immomakler-load-more-btn:hover {
	background-position: 100% 0%;
	box-shadow: var(--pb-schatten-hover);
}

.pramlbutton::after,
.immomakler-load-more-btn::after {
	top: .65em !important;
}

/* Newsbutton (synchronisierte Breite) */
.newsbutton.newsbutton--synced {
	display: flex !important;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	padding-left: 14px !important;
	padding-right: 14px !important;
}

/* Divi-Pfeil wieder neben den Text holen statt absolut */
.newsbutton.newsbutton--synced::after {
	position: static !important;
	transform: none !important;
}

@media (max-width: 484px) {
	.newsbutton {
		display: block !important;
		width: 100% !important;
		max-width: 100% !important;
		text-align: center;
	}
}


/* =====================================================================
   3. Allgemeines Layout
   ===================================================================== */

/* Leere Untertitel im Archiv ausblenden */
.et_pb_text:has(.archive-subtitle:empty) {
	display: none;
}

/* Abstand unter Beiträgen entfernen */
.et_pb_post {
	margin-bottom: 0 !important;
}

.single:not(.et-fb) .post {
	padding-bottom: 0 !important;
}

/* Rahmen mit Farbverlauf */
.gradientborder {
	border-style: solid;
	border-image: linear-gradient(to right, var(--pb-blau), var(--pb-gruen)) 1 !important;
}

/* Slider mit weich ausgeblendeten Rändern (nur Desktop) */
@media (min-width: 981px) {
	.fadeout-slider .et_pb_group_carousel_container {
		-webkit-mask-image: linear-gradient(to right, transparent 0%, #000 25%, #000 75%, transparent 100%);
		mask-image: linear-gradient(to right, transparent 0%, #000 25%, #000 75%, transparent 100%);
	}
}

/* Scroll-to-Top */
.et_pb_scroll_top {
	border-radius: 0 !important;
	background: var(--pb-gruen) !important;
}

.et_pb_scroll_top:hover {
	background: var(--pb-blau) !important;
}


/* =====================================================================
   4. Mobiles Menü
   ===================================================================== */

@media (max-width: 980px) {
	/* Dropdowns nicht breiter als der Bildschirm (Divi setzt max-content) */
	.et-l--header .et_pb_dropdown {
		min-width: 0 !important;
		max-width: 100% !important;
	}

	/* Modul mit der Klasse „mainmenu-haspopup“ ohne Abstand nach unten */
	.et_pb_column .et_pb_module.mainmenu-haspopup {
		margin-bottom: 0 !important;
	}
}


/* =====================================================================
   5. WP-ImmoMakler: Listen, Kacheln, Objektdaten
   ===================================================================== */

.immomakler-data-kaufpreis {
	font-weight: 600 !important;
}

.googlemaps-inaccurate-position {
	display: block !important;
	padding: .5em 0 !important;
	font-size: .85em;
}

.immomakler-projekt-daten .immomakler-icon-list-item {
	width: 100% !important;
}

/* Klasse „kachel-bild“ am Bild-Modul im Loop */
.kachel-bild img {
	aspect-ratio: 3 / 2;
	object-fit: cover;
	object-position: 50% 50%;
}

/* Leere Projekt-Badges ausblenden */
.projekt-badge .et_pb_text:has(.et_pb_text_inner:empty) {
	display: none;
}


/* =====================================================================
   6. WP-ImmoMakler: Formulare im Stil des Kontaktformulars (Formidable)
   - Kontaktformular „Immobilie direkt anfragen“ (.immomakler-contactform)
   - Propstack-Suchprofil / Suchauftrag (#immomakler-propstack-suchprofil-form)
   - Suchauftrag-Kurzform (…immomakler-create-search-agent)
   ===================================================================== */

:is(.immomakler-contactform, #immomakler-propstack-suchprofil-form, [id$="immomakler-create-search-agent"]) {
	font-family: inherit;
	color: var(--pb-text);
}

/* Abstände zwischen den Feldern */
:is(.immomakler-contactform, #immomakler-propstack-suchprofil-form) .form-group {
	margin-bottom: 12px;
}

/* Feldbeschriftungen */
:is(.immomakler-contactform, #immomakler-propstack-suchprofil-form) label {
	margin: 0;
	font-family: inherit;
	font-size: 14px;
	font-weight: 400;
	line-height: 27px;
	color: var(--pb-text);
}

/* Eingabefelder, Auswahllisten, Textbereiche */
:is(.immomakler-contactform, #immomakler-propstack-suchprofil-form, [id$="immomakler-create-search-agent"]) :is(input[type="text"], input[type="email"], input[type="tel"], input[type="number"], select, textarea).form-control,
#immomakler-propstack-suchprofil-form .bootstrap-select > .dropdown-toggle,
.immomakler-contactform .immomakler-phone-prefix-button,
[id$="immomakler-create-search-agent"] .input-group-addon {
	height: auto;
	min-height: 48px;
	padding: 12px;
	font-family: inherit;
	font-size: 17px;
	line-height: 1.3;
	color: var(--pb-blau);
	background-color: #fff;
	border: 1px solid var(--pb-blau);
	border-radius: 0;
	box-shadow: none;
	outline: none;
}

:is(.immomakler-contactform, #immomakler-propstack-suchprofil-form, [id$="immomakler-create-search-agent"]) select.form-control {
	min-height: 52px;
}

:is(.immomakler-contactform, #immomakler-propstack-suchprofil-form, [id$="immomakler-create-search-agent"]) .form-control::placeholder {
	color: #8a93a6;
	opacity: 1;
}

/* Fokus wie im Kontaktformular */
:is(.immomakler-contactform, #immomakler-propstack-suchprofil-form, [id$="immomakler-create-search-agent"]) .form-control:focus,
#immomakler-propstack-suchprofil-form .bootstrap-select > .dropdown-toggle:focus,
#immomakler-propstack-suchprofil-form .bootstrap-select.open > .dropdown-toggle {
	border-color: var(--pb-blau);
	box-shadow: 0 0 5px rgba(27, 50, 123, 0.6);
	outline: none !important;
}

/* Auswahllisten (bootstrap-select) im Suchprofil */
#immomakler-propstack-suchprofil-form .bootstrap-select {
	width: 100% !important;
}

#immomakler-propstack-suchprofil-form .bootstrap-select > .dropdown-toggle .filter-option-inner-inner,
#immomakler-propstack-suchprofil-form .bootstrap-select > .dropdown-toggle .bs-caret {
	color: var(--pb-blau);
}

/* Telefonnummer mit Ländervorwahl / Suchauftrag-Kurzform: @-Feld */
.immomakler-contactform .immomakler-phone-prefix-button,
[id$="immomakler-create-search-agent"] .input-group-addon {
	width: auto;
	border-right: 0;
}

/* Checkboxen: Kästchen links, Text mit hängendem Einzug daneben */
.immomakler-contactform .checkbox,
:is(#immomakler-propstack-suchprofil-form, [id$="immomakler-create-search-agent"]) .form-check label {
	position: relative;
	display: block;
	margin: 0;
	padding-left: 28px;
}

:is(.immomakler-contactform, #immomakler-propstack-suchprofil-form, [id$="immomakler-create-search-agent"]) input[type="checkbox"] {
	position: absolute;
	top: 3px;
	left: 0;
	width: 18px;
	height: 18px;
	margin: 0;
	accent-color: var(--pb-blau);
}

:is(.immomakler-contactform .checkbox, #immomakler-propstack-suchprofil-form .form-check, [id$="immomakler-create-search-agent"] .form-check) label {
	min-height: 0;
	font-size: 15px;
	line-height: 1.5;
	color: var(--pb-text);
}

.immomakler-contactform .checkbox label {
	padding-left: 0;
}

:is(.immomakler-contactform, #immomakler-propstack-suchprofil-form, [id$="immomakler-create-search-agent"]) .form-check a,
.immomakler-contactform .checkbox a {
	color: var(--pb-blau);
	text-decoration: underline;
}

/* Pflichtfeld-Hinweis */
.immomakler-contactform .mandatory,
#immomakler-propstack-suchprofil-form .required_field {
	display: block;
	margin: 4px 0 12px;
	font-size: 13px;
	color: var(--pb-rot);
}

/* Absende-Button wie „Nachricht senden“ */
:is(.immomakler-contactform, #immomakler-propstack-suchprofil-form, [id$="immomakler-create-search-agent"]) button[type="submit"] {
	position: relative;
	display: block;
	width: 100%;
	margin: 0;
	padding: 0.6em 2.5em 0.6em 1em;
	font-family: inherit;
	font-size: 18px;
	font-weight: 600;
	line-height: 1.4;
	text-align: left;
	text-transform: uppercase;
	color: #fff;
	border: 0;
	border-radius: 0;
	background: var(--pb-verlauf) 0 0 / 400% 100%;
	box-shadow: 0 1px 1px #eee;
	transition: background-position 0.4s ease-out, box-shadow 0.2s;
}

:is(.immomakler-contactform, #immomakler-propstack-suchprofil-form, [id$="immomakler-create-search-agent"]) button[type="submit"]:hover,
:is(.immomakler-contactform, #immomakler-propstack-suchprofil-form, [id$="immomakler-create-search-agent"]) button[type="submit"]:focus-visible {
	color: #fff;
	background-position: 100% 0;
	box-shadow: var(--pb-schatten-hover);
}

/* Pfeil-Icon (ETmodules „5“) rechts im Button */
:is(.immomakler-contactform, #immomakler-propstack-suchprofil-form, [id$="immomakler-create-search-agent"]) button[type="submit"]::after {
	content: "5";
	position: absolute;
	top: 50%;
	right: 0.5em;
	transform: translateY(-50%);
	font-family: ETmodules;
	font-size: 1.5em;
	line-height: 1;
	color: #fff;
}

/* Kontaktformular: Spam-Schutz über, Button und SSL-Hinweis unter voller Breite */
.immomakler-contactform .immomakler-contactform-send {
	display: flex;
	flex: 0 0 100%;
	width: 100%;
	flex-direction: column;
	gap: 12px;
}

.immomakler-contactform .immomakler-contactform-send > [class*="col-"] {
	float: none;
	width: 100%;
}

.immomakler-contactform .immomakler-contactform-send > .col-sm-4 {
	order: 2;
}

.immomakler-contactform .send-over-https {
	margin-top: 6px;
	font-size: 13px;
	color: var(--pb-text);
}


/* =====================================================================
   7. Popups (Abschnitte mit der Klasse „custompopup“) – Fix 10/2026
   ===================================================================== */

/* Geöffnetes Popup: vollflächig, scrollbar, über allem */
.et_pb_section.custompopup.pb-popup-active,
.et_pb_section.custompopup[style*="display"]:not([style*="display: none"]) {
	position: fixed !important;
	top: 0 !important;
	right: 0 !important;
	bottom: 0 !important;
	left: 0 !important;
	width: auto !important;
	height: auto !important;
	min-height: 0 !important;
	max-width: none !important;
	max-height: none !important;
	margin: 0 !important;
	z-index: 100000 !important;
	z-index: var(--pb-z, 100000) !important;
	box-sizing: border-box !important;
	flex-direction: column !important;
	padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) !important;
	overflow-x: hidden !important;
	overflow-y: auto !important;
	-webkit-overflow-scrolling: touch;
	overscroll-behavior: contain;
	opacity: 1 !important;
}

@media (min-width: 768px) {
	.et_pb_section.custompopup.pb-popup-active,
	.et_pb_section.custompopup[style*="display"]:not([style*="display: none"]) {
		padding: 40px !important;
	}
}

/* Inhalt des Popups vertikal zentriert */
.et_pb_section.custompopup.pb-popup-active > .et_pb_row,
.et_pb_section.custompopup[style*="display"]:not([style*="display: none"]) > .et_pb_row {
	width: 100% !important;
	margin: 0 auto !important;
	flex: 0 0 auto !important;
	box-sizing: border-box !important;
}

.et_pb_section.custompopup.pb-popup-active > .et_pb_row:first-child,
.et_pb_section.custompopup[style*="display"]:not([style*="display: none"]) > .et_pb_row:first-child {
	margin-top: auto !important;
}

.et_pb_section.custompopup.pb-popup-active > .et_pb_row:last-child,
.et_pb_section.custompopup[style*="display"]:not([style*="display: none"]) > .et_pb_row:last-child {
	margin-bottom: auto !important;
}

/* Schließen-Icon bleibt beim Scrollen oben */
.et_pb_section.custompopup.pb-popup-active .et_pb_icon[data-interaction-trigger] {
	position: -webkit-sticky;
	position: sticky;
	top: 0;
	z-index: 2;
}

.pb-popup-host {
	z-index: 100000 !important;
	z-index: var(--pb-z, 100000) !important;
}

.et_builder_inner_content:has(> .et_pb_section.custompopup[style*="display"]:not([style*="display: none"])) {
	z-index: 100000 !important;
	z-index: var(--pb-z, 100000) !important;
}

/* Seite dahinter nicht scrollen, Admin-Leiste ausblenden */
html.pb-popup-open,
html.pb-popup-open body {
	overflow: hidden !important;
}

html.pb-popup-open #wpadminbar {
	display: none !important;
}

/* Fallback für Browser ohne relative Farbsyntax */
@supports not (color: hsl(from red h s l)) {
	.et_pb_section.custompopup:not(#_) {
		background-color: rgba(27, 50, 123, 0.9) !important;
	}

	.et_pb_section.custompopup > .et_pb_row {
		box-shadow: 0 2px 18px rgba(255, 255, 255, 0.5) !important;
	}
}

/* Einblend-Animation (nur ohne „reduzierte Bewegung“) */
@media (prefers-reduced-motion: no-preference) {
	.et_pb_section.custompopup.pb-popup-active > .et_pb_row {
		animation: pbPopupIn 0.5s ease-out both;
	}
}

@keyframes pbPopupIn {
	from {
		opacity: 0;
		transform: translateY(12px);
	}

	to {
		opacity: 1;
		transform: none;
	}
}

/* Fokus und Bedienbarkeit */
.et_pb_section.custompopup:focus {
	outline: none;
}

.et_pb_section.custompopup [role="button"]:focus-visible {
	outline: 3px solid var(--pb-blau);
	outline-offset: 3px;
}

/* Mindestens 16 px in Formularfeldern – verhindert Zoom auf iOS */
.et_pb_section.custompopup input:not([type="checkbox"]):not([type="radio"]),
.et_pb_section.custompopup select,
.et_pb_section.custompopup textarea {
	font-size: 16px !important;
}
