/* Quartier Offcanvas-Navigation */

/* Burger-Button */
.qf-nav-toggle {
	display: inline-flex;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 46px;
	height: 46px;
	padding: 11px;
	background: transparent;
	border: 0;
	cursor: pointer;
}

.qf-nav-toggle span {
	display: block;
	height: 3px;
	width: 100%;
	background: currentColor;
	border-radius: 3px;
}

/* Offcanvas-Container */
.qf-offcanvas {
	position: fixed;
	inset: 0;
	z-index: 100000;
	visibility: hidden;
	pointer-events: none;
}

.qf-offcanvas.is-open {
	visibility: visible;
	pointer-events: auto;
}

.qf-offcanvas__overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.45);
	opacity: 0;
	transition: opacity 0.25s ease;
}

.qf-offcanvas.is-open .qf-offcanvas__overlay {
	opacity: 1;
}

.qf-offcanvas__panel {
	position: absolute;
	top: 0;
	right: 0;
	height: 100%;
	width: min(420px, 92vw);
	background: #fff;
	box-shadow: -12px 0 40px rgba(0, 0, 0, 0.18);
	transform: translateX(100%);
	transition: transform 0.28s ease;
	display: flex;
	flex-direction: column;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
}

.qf-offcanvas.is-open .qf-offcanvas__panel {
	transform: translateX(0);
}

.qf-offcanvas__topbar {
	display: flex;
	justify-content: flex-end;
	padding: 14px 18px 0;
}

.qf-offcanvas__close {
	background: transparent;
	border: 0;
	font-size: 34px;
	line-height: 1;
	cursor: pointer;
	color: #111;
	padding: 4px 8px;
}

.qf-offcanvas__body {
	padding: 8px 26px 40px;
}

/* Quartier-Kacheln */
.qf-nav-cards {
	display: flex;
	flex-direction: column;
	gap: 14px;
	margin-bottom: 26px;
}

.qf-nav-card {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 16px 20px;
	border-radius: 10px;
	text-decoration: none;
	font-size: 20px;
	font-weight: 700;
	line-height: 1.2;
	background: var(--qf-card-bg, #eee);
	color: var(--qf-card-fg, #111);
	transition: background 0.15s ease, color 0.15s ease;
}

.qf-nav-card:hover,
.qf-nav-card:focus {
	background: var(--qf-card-hbg, var(--qf-card-bg, #eee));
	color: var(--qf-card-hfg, var(--qf-card-fg, #111));
}

/* Erste Kachel (Basel-West) mit Abstand + Trennlinie von den Quartieren abheben. */
.qf-nav-cards .qf-nav-card--primary {
	position: relative;
	margin-bottom: 18px;
}

.qf-nav-cards .qf-nav-card--primary::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: -16px;
	height: 2px;
	background: #e2ddd1;
	border-radius: 2px;
}

.qf-nav-card__label {
	flex: 1 1 auto;
}

.qf-nav-card__arrow {
	font-size: 22px;
	opacity: 0.9;
}

.qf-nav-card__icon {
	display: inline-flex;
	flex: none;
}

.qf-nav-card__icon-img {
	width: 26px;
	height: 26px;
	object-fit: contain;
	display: block;
}

/* Inhalte-Liste */
.qf-nav-section-title {
	margin: 6px 0 6px;
	font-size: 24px;
	font-weight: 800;
}

.qf-nav-list {
	display: flex;
	flex-direction: column;
}

.qf-nav-list a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 18px 2px;
	border-bottom: 1px solid #e7e4dc;
	text-decoration: none;
	color: #111;
	font-size: 19px;
	font-weight: 700;
}

.qf-nav-list a:hover {
	color: #555;
}

/* „Über uns" mit aufklappbarem Untermenü (WP-Menü-Standort). */
.qf-nav-item-has-children {
	border-bottom: 1px solid #e7e4dc;
}

.qf-nav-parent {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	width: 100%;
	padding: 18px 2px;
	border: 0;
	cursor: pointer;
	font-size: 19px;
	font-weight: 700;
	text-align: left;
	font-family: inherit;
}

/* Kein Theme-Button-Hover (rosa/rot): Hintergrund + Farbe in allen Zuständen fix. */
.qf-nav-parent,
.qf-nav-parent:hover,
.qf-nav-parent:focus,
.qf-nav-parent:active {
	background: none !important;
	background-color: transparent !important;
	color: #111 !important;
	box-shadow: none !important;
}

.qf-nav-caret {
	transition: transform 0.2s ease;
}

.qf-nav-parent[aria-expanded="true"] .qf-nav-caret {
	transform: rotate(90deg);
}

.qf-nav-submenu-wrap[hidden] {
	display: none;
}

.qf-nav-submenu {
	list-style: none;
	margin: 0;
	padding: 0 0 10px;
}

.qf-nav-submenu li {
	margin: 0;
}

.qf-nav-submenu a {
	display: block;
	padding: 12px 2px 12px 18px;
	text-decoration: none;
	font-size: 17px;
	font-weight: 600;
}

/* Feste, neutrale Farbe für ALLE Zustände – Theme-Hover/Active/Current (z. B.
   rot) wird überschrieben, kein Farbwechsel. */
.qf-nav-submenu a,
.qf-nav-submenu a:link,
.qf-nav-submenu a:visited,
.qf-nav-submenu a:hover,
.qf-nav-submenu a:focus,
.qf-nav-submenu a:active,
.qf-nav-submenu li.current-menu-item > a,
.qf-nav-submenu li.current_page_item > a,
.qf-nav-submenu li.current-menu-parent > a,
.qf-nav-submenu li.current-menu-ancestor > a {
	color: #333 !important;
}

/* Verschachtelte Ebenen etwas weiter einrücken. */
.qf-nav-submenu .sub-menu {
	list-style: none;
	margin: 0;
	padding: 0;
}

.qf-nav-submenu .sub-menu a {
	padding-left: 34px;
	font-weight: 500;
}

/* Menü offen: Seite nicht scrollen */
body.qf-nav-open {
	overflow: hidden;
}

/* --- Header --------------------------------------------------------------- */
/* Elementor-Flex-Container schrumpfen Widgets teils auf Inhaltsbreite. Das
   Widget, das den Header enthält, auf volle Breite zwingen – sonst fällt auf
   Mobile die Logo-Spalte zusammen und alles klebt links. */
.e-con.e-child:has(.qf-header),
.elementor-widget:has(.qf-header),
.elementor-element:has(> .elementor-widget-container > .qf-header) {
	width: 100% !important;
	max-width: 100% !important;
	flex: 1 1 100% !important;
}

.qf-header {
	display: grid;
	grid-template-columns: 1fr auto auto;
	grid-template-areas: "logo icons menu";
	align-items: center;
	column-gap: 24px;
	width: 100%;
	padding: 14px 0;
	/* WordPress/Global-Styles geben Elementen mit „border-*" im style-Attribut
	   ein border-style:solid – hier explizit unterbinden. */
	border: 0 !important;
}

.qf-header__logo {
	grid-area: logo;
	justify-self: start;
	display: inline-flex;
	align-items: center;
	text-decoration: none;
	color: inherit;
	min-width: 0;
}

.qf-header__icons {
	grid-area: icons;
	display: flex;
	align-items: center;
	gap: 14px;
}

.qf-hbtn--menu {
	grid-area: menu;
}

.qf-header__logo a,
.qf-header__logo .custom-logo-link {
	display: inline-flex;
	align-items: center;
	max-width: 100%;
}

.qf-header__logo img,
.qf-header__logo .custom-logo {
	display: block !important;
	height: 52px !important;
	width: auto !important;
	max-width: 100%;
	object-fit: contain;
}

.qf-header__logo-part {
	display: inline-flex;
	align-items: center;
	max-width: 100%;
}

/* Mobile-Logo (optional) standardmässig ausblenden */
.qf-header__logo-img--mobile {
	display: none;
}

.qf-header__logotext {
	font-weight: 800;
	font-size: 22px;
	line-height: 1.05;
	color: #111;
	overflow-wrap: anywhere;
}

.qf-hbtn {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	border-radius: 999px;
	padding: 12px 24px;
	font-size: 16px;
	font-weight: 700;
	line-height: 1;
	text-decoration: none;
	cursor: pointer;
	background: #fff;
	color: #111;
	border: 1px solid transparent;
	transition: background 0.15s ease, color 0.15s ease;
}

.qf-hbtn__icon {
	display: inline-flex;
}

.qf-hbtn--outline {
	background: #fff;
	color: #111;
	border: var(--qf-hbtn-bwid, 3px) solid var(--qf-hbtn-bcol, #ade4f8);
}

.qf-hbtn--outline:hover {
	background: var(--qf-hbtn-bcol, #ade4f8);
}

.qf-hbtn--menu {
	background: #111;
	color: #fff;
	border: 0;
}

.qf-hbtn--menu:hover {
	background: #333;
}

.qf-hbtn__burger {
	display: inline-flex;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 22px;
}

.qf-hbtn__burger span {
	display: block;
	height: 2.5px;
	width: 100%;
	background: currentColor;
	border-radius: 3px;
}

/* Lupe im Header rund mit Rahmen */
.qf-header__icons .qf-search-toggle {
	width: 52px;
	height: 52px;
	border-radius: 50%;
	border: 1px solid #e2ddd1;
	background: #fff;
	color: #111;
}

/* Mobile: zweizeilig – oben Logo links + Menü rechts, darunter Icons zentriert */
@media (max-width: 880px) {
	.qf-header {
		grid-template-columns: minmax(0, 1fr) auto;
		grid-template-areas:
			"logo menu"
			"icons icons";
		row-gap: 12px;
		column-gap: 16px;
	}

	/* Menü sicher nach rechts, Logo nach links – auch wenn Elementor den
	   Container auf Inhaltsbreite schrumpft. */
	.qf-hbtn--menu {
		justify-self: end;
		flex: none;
	}

	.qf-header__logo {
		justify-self: start;
		min-width: 0;
		max-width: 100%;
	}

	.qf-header__logo img,
	.qf-header__logo .custom-logo {
		max-width: 100%;
	}

	/* Text-Logo (Website-Name) darf nie unter das Menü laufen. */
	.qf-header__logotext {
		font-size: 17px;
		line-height: 1.15;
	}

	.qf-header__icons {
		grid-area: icons;
		justify-content: center;
		gap: 12px;
	}

	.qf-header__logo img,
	.qf-header__logo .custom-logo {
		height: 52px !important;
	}

	/* Optionales Mobile-Logo einblenden, Desktop-Logo ausblenden */
	.qf-header--has-mobile-logo .qf-header__logo-img--desktop {
		display: none;
	}

	.qf-header--has-mobile-logo .qf-header__logo-img--mobile {
		display: inline-flex;
	}

	/* Alle Button-Labels auf Mobile ausblenden (inkl. „Menü"). */
	.qf-hbtn__label {
		display: none;
	}

	.qf-header__icons .qf-hbtn,
	.qf-header__icons .qf-search-toggle {
		width: 50px;
		height: 50px;
		padding: 0;
		justify-content: center;
		border-radius: 50%;
		flex: none;
	}

	/* Menü ohne Label = kompakter Button, nur Burger. */
	.qf-hbtn--menu {
		width: 50px;
		height: 50px;
		padding: 0;
		justify-content: center;
		border-radius: 50%;
	}

	.qf-hbtn--menu .qf-hbtn__burger {
		width: 24px;
	}
}

@media (max-width: 480px) {
	.qf-header__icons {
		gap: 10px;
	}

	.qf-header__icons .qf-hbtn,
	.qf-header__icons .qf-search-toggle {
		width: 46px;
		height: 46px;
	}

	.qf-header__icons .qf-hbtn__icon svg {
		width: 18px;
		height: 18px;
	}

	.qf-header__logo img,
	.qf-header__logo .custom-logo {
		height: 46px !important;
	}
}

/* --- Suche (Lupe + Overlay) ---------------------------------------------- */
.qf-search-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 46px;
	padding: 0;
	background: transparent;
	border: 0;
	cursor: pointer;
	color: inherit;
}

.qf-search-overlay {
	position: fixed;
	inset: 0;
	z-index: 100001;
	display: flex;
	align-items: flex-start;
	justify-content: center;
	visibility: hidden;
	opacity: 0;
	transition: opacity 0.2s ease, visibility 0.2s ease;
}

.qf-search-overlay.is-open {
	visibility: visible;
	opacity: 1;
}

.qf-search-overlay__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(255, 255, 255, 0.97);
}

.qf-search-overlay__close {
	position: absolute;
	top: 18px;
	right: 26px;
	z-index: 1;
	background: transparent;
	border: 0;
	font-size: 40px;
	line-height: 1;
	cursor: pointer;
	color: #111;
}

.qf-search-form {
	position: relative;
	z-index: 1;
	width: min(760px, 90vw);
	margin-top: 16vh;
	display: flex;
	align-items: center;
	gap: 12px;
	border-bottom: 3px solid #111;
	padding-bottom: 10px;
}

.qf-search-input {
	flex: 1 1 auto;
	min-width: 0;
	border: 0;
	background: transparent;
	outline: none;
	font-size: clamp(24px, 4vw, 40px);
	font-weight: 700;
	color: #111;
	padding: 6px 0;
}

.qf-search-input::placeholder {
	color: #bdbdbd;
}

.qf-search-submit {
	flex: none;
	background: transparent;
	border: 0;
	cursor: pointer;
	color: #111;
	padding: 6px;
}

.qf-search-submit svg {
	width: 30px;
	height: 30px;
}

.qf-search-overlay .screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
	border: 0;
	padding: 0;
	margin: -1px;
}

/* --- Quartier-Buttons (inline) ------------------------------------------- */
.qf-qbuttons {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
}

/* Basel-West (erste Kachel) allein in Zeile 1, übrige Pills brechen darunter um. */
.qf-qbuttons-break {
	flex-basis: 100%;
	width: 100%;
	height: 0;
	margin: 0;
	padding: 0;
}

.qf-qbutton {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 14px 24px;
	border-radius: 999px;
	text-decoration: none;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.15;
	background: var(--qf-btn-bg, #eee);
	color: var(--qf-btn-fg, #111);
	transition: background 0.15s ease, color 0.15s ease, transform 0.12s ease;
}

.qf-qbutton:hover,
.qf-qbutton:focus {
	background: var(--qf-btn-hbg, var(--qf-btn-bg, #eee));
	color: var(--qf-btn-hfg, var(--qf-btn-fg, #111));
	transform: translateY(-1px);
}

.qf-qbutton__arrow {
	font-weight: 700;
}

/* --- Sprechstunde -------------------------------------------------------- */
.qf-sprechstunde__inner {
	display: flex;
	align-items: flex-start;
	gap: 14px;
	background: #e9f1fb;
	border-radius: 16px;
	padding: 18px 24px;
}

.qf-sprechstunde__dot {
	flex: none;
	width: 12px;
	height: 12px;
	border-radius: 50%;
	background: #2f6fdc;
	margin-top: 8px;
}

.qf-sprechstunde__text {
	margin: 0;
	font-size: 17px;
	line-height: 1.5;
	color: #1a1a1a;
}

/* Dreizeilige Ausgabe: Label / Tag+Zeit / Ort jeweils eigene Zeile. */
.qf-sprechstunde__label,
.qf-sprechstunde__when,
.qf-sprechstunde__where,
.qf-sprechstunde__more {
	display: block;
}

.qf-sprechstunde__more {
	font-weight: 700;
	color: inherit;
	text-decoration: underline;
	white-space: nowrap;
}

.qf-sprechstunde__more:hover {
	opacity: 0.7;
}
