/* =========================================================================
   nl-core · Widget „NL Mega-Menü" (inc/megamenue.php)

   Die Regler des Widgets schreiben CSS-Variablen auf .nl-mm; hier stehen die
   Rückfallwerte. Das Design von Neues Leben ist kantig: nirgends Rundungen. Farben ohne Regler kommen aus nl-design.css (--nl-marke,
   --nl-auf-marke, --nl-akzent, --nl-hell, --nl-tinte, --nl-breit, --nl-rand).

   Zustände (setzt megamenue.js):
     .nl-mm--js           Skript läuft
     .nl-mm--mobil        unter dem Umbruch (Burger statt Band)
     .nl-mm--offen        Fläche offen (Desktop)
     .nl-mm--sheet        Handy-Menü offen
     .nl-mm--tief         zweite Ebene im Handy-Menü
   ====================================================================== */

.nl-mm {
	--nl-mm-punkt: var(--nl-tinte, #161616);
	--nl-mm-punkt-hover: var(--nl-akzent, #ff194e);
	--nl-mm-strich: var(--nl-akzent, #ff194e);
	--nl-mm-strich-staerke: 3px;
	--nl-mm-punkt-abstand: 36px;
	--nl-mm-band-hoehe: 56px;
	--nl-mm-ausrichtung: flex-start;
	--nl-mm-flaeche-bg: #fff;
	--nl-mm-flaeche-luft: 40px;
	--nl-mm-dim: rgba(22, 22, 22, .38);
	--nl-mm-intro: var(--nl-akzent, #ff194e);
	--nl-mm-intro-text: #4a4346;
	--nl-mm-gruppe: var(--nl-tinte, #161616);
	--nl-mm-link: #4a4346;
	--nl-mm-link-hover: var(--nl-akzent, #ff194e);
	--nl-mm-spalte-min: 150px;
	--nl-mm-kachel-radius: 0px;
	--nl-mm-burger: var(--nl-auf-marke, #fff);
	--nl-mm-burger-hebung: 15px;
	--nl-mm-burger-rechts: 20px;
	--nl-mm-sheet-bg: #fff;
	--nl-mm-cta-bg: var(--nl-marke, #ff194e);
	--nl-mm-cta-text: var(--nl-auf-marke, #fff);

	position: relative;
	color: var(--nl-tinte, #161616);
	line-height: 1.5;
}
.nl-mm *,
.nl-mm *::before,
.nl-mm *::after { box-sizing: border-box; }

/* Reset für Knöpfe – doppelte Klasse schlägt Elementors Kit-Regeln (.elementor-kit-N button) */
.nl-mm.nl-mm :where(button) {
	font: inherit;
	line-height: 1.5;
	letter-spacing: normal;
	text-transform: none;
	white-space: normal;
	color: inherit;
	background: none;
	border: 0;
	padding: 0;
	margin: 0;
	cursor: pointer;
	border-radius: 0;
	box-shadow: none;
	transition: none;
}
/* … und auch beim Überfahren, Fokus und Drücken: der Kit legt dort
   Schwarz auf Weiß (.elementor-kit-N button:hover). Drei Klassen schlagen das. */
.nl-mm.nl-mm :where(button):hover,
.nl-mm.nl-mm :where(button):focus,
.nl-mm.nl-mm :where(button):focus-visible,
.nl-mm.nl-mm :where(button):active {
	background: none;
	border: 0;
	box-shadow: none;
	transform: none;
	padding: 0;
}
.nl-mm a { text-decoration: none; color: inherit; }
.nl-mm :focus-visible { outline: 2px solid var(--nl-mm-punkt-hover); outline-offset: 3px; }
.nl-mm .screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
	overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
.nl-mm .nl-mm__innen { max-width: var(--nl-breit, 1140px); margin: 0 auto; padding: 0 var(--nl-rand, 20px); }
.nl-mm .nl-mm__winkel { flex: none; }
.nl-mm .nl-leiste__extern,
.nl-mm .nl-mm__extern { margin-left: .3em; opacity: .6; vertical-align: baseline; }
.nl-mm--leer { padding: 1rem; background: #fff3f5; color: #7a1a30; font-size: .95rem; }

/* Der Elementor-Container um das Widget soll nichts dazutun */
.elementor-widget-nl-mega-menue { width: 100%; }
.elementor-widget-nl-mega-menue > .elementor-widget-container { position: static; }

/* ---------------------------------------------------------------- Band */
.nl-mm .nl-mm__band { display: block; }
.nl-mm .nl-mm__punkte {
	list-style: none; margin: 0; padding: 0;
	display: flex; align-items: stretch; justify-content: var(--nl-mm-ausrichtung);
	gap: 0 var(--nl-mm-punkt-abstand);
	min-height: var(--nl-mm-band-hoehe);
}
.nl-mm .nl-mm__punkte li { margin: 0; padding: 0; display: flex; }
.nl-mm .nl-mm__punkt {
	display: flex; align-items: center;
	font-weight: 700; font-size: 1.08rem;
	color: var(--nl-mm-punkt);
	position: relative; white-space: nowrap;
	transition: color .15s ease;
}
.nl-mm .nl-mm__punkt::after {
	content: ""; position: absolute; left: 0; right: 0; bottom: 0;
	height: var(--nl-mm-strich-staerke); background: var(--nl-mm-strich);
	transform: scaleX(0); transform-origin: left; transition: transform .2s ease;
}
.nl-mm .nl-mm__punkt:hover,
.nl-mm .nl-mm__punkt:focus-visible,
.nl-mm .nl-mm__punkt[aria-expanded="true"] { color: var(--nl-mm-punkt-hover); }
.nl-mm .nl-mm__punkt:hover::after,
.nl-mm .nl-mm__punkt:focus-visible::after,
.nl-mm .nl-mm__punkt[aria-expanded="true"]::after { transform: scaleX(1); }

/* -------------------------------------------------------------- Fläche */
.nl-mm .nl-mm__flaeche {
	position: absolute; top: 100%; left: 50%; width: 100vw; transform: translateX(-50%) translateY(-6px);
	background: var(--nl-mm-flaeche-bg);
	box-shadow: 0 24px 40px rgba(0, 0, 0, .14);
	opacity: 0; pointer-events: none; visibility: hidden;
	transition: opacity .18s ease, transform .18s ease, visibility 0s linear .18s;
	max-height: min(70vh, 720px); overflow-y: auto;
	z-index: 5;
}
.nl-mm--offen .nl-mm__flaeche {
	opacity: 1; pointer-events: auto; visibility: visible;
	transform: translateX(-50%) translateY(0);
	transition: opacity .18s ease, transform .18s ease, visibility 0s;
}
.nl-mm .nl-mm__panel[hidden] { display: none; }
.nl-mm .nl-mm__grid {
	display: grid; gap: 2.5rem;
	padding-top: var(--nl-mm-flaeche-luft); padding-bottom: calc(var(--nl-mm-flaeche-luft) + 8px);
	grid-template-columns: 1fr;
}
.nl-mm .nl-mm__grid--intro { grid-template-columns: 3fr 9fr; }
.nl-mm .nl-mm__grid--kacheln { grid-template-columns: 9fr 3fr; }
.nl-mm .nl-mm__grid--intro.nl-mm__grid--kacheln { grid-template-columns: 3fr 6fr 3fr; }

.nl-mm .nl-mm__intro h4 {
	margin: 0 0 .5rem; font-size: 1.65rem; line-height: 1.1; font-weight: 800; letter-spacing: -.02em;
	color: var(--nl-mm-intro); font-family: inherit;
}
.nl-mm .nl-mm__intro p { margin: 0 0 1rem; font-size: .98rem; line-height: 1.5; color: var(--nl-mm-intro-text); }
.nl-mm .nl-mm__alle { font-weight: 700; color: var(--nl-mm-intro); font-size: .98rem; }
.nl-mm .nl-mm__alle::after { content: " →"; }

.nl-mm .nl-mm__gruppen {
	display: grid; grid-template-columns: repeat(auto-fit, minmax(var(--nl-mm-spalte-min), 1fr));
	gap: 1.4rem 1.75rem; align-content: start;
}
.nl-mm .nl-mm__gruppe h5 { margin: 0 0 .5rem; font-size: .98rem; font-weight: 700; color: var(--nl-mm-gruppe); font-family: inherit; line-height: 1.3; }
.nl-mm .nl-mm__gruppe h5 a:hover { color: var(--nl-mm-link-hover); }
.nl-mm .nl-mm__einzeln { font-weight: 700; color: var(--nl-mm-gruppe); font-size: .98rem; }
.nl-mm .nl-mm__einzeln:hover { color: var(--nl-mm-link-hover); }
.nl-mm .nl-mm__gruppe ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .3rem; }
.nl-mm .nl-mm__gruppe li { margin: 0; padding: 0; }
.nl-mm .nl-mm__gruppe li a { color: var(--nl-mm-link); font-size: .95rem; line-height: 1.4; font-weight: 400; transition: color .15s ease; }
.nl-mm .nl-mm__gruppe li a:hover,
.nl-mm .nl-mm__gruppe li a:focus-visible { color: var(--nl-mm-link-hover); }

.nl-mm .nl-mm__kacheln { display: grid; gap: 1rem; align-content: start; }
.nl-mm .nl-mm__kachel {
	position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden;
	border-radius: var(--nl-mm-kachel-radius); background: var(--nl-hell, #f1f1f1); color: #fff;
}
.nl-mm .nl-mm__kachel-medium { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.nl-mm .nl-mm__kachel:hover .nl-mm__kachel-medium { transform: scale(1.03); }
.nl-mm .nl-mm__kachel-titel {
	position: absolute; left: .85rem; right: .85rem; bottom: .7rem;
	font-weight: 800; font-size: 1rem; line-height: 1.15; text-transform: uppercase; letter-spacing: .02em;
	text-shadow: 0 1px 8px rgba(0, 0, 0, .5);
}
.nl-mm .nl-mm__kachel::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.45), transparent 55%); pointer-events: none; }

/* Abdunkeln der Seite */
.nl-mm .nl-mm__dim {
	position: fixed; inset: 0; background: var(--nl-mm-dim);
	opacity: 0; pointer-events: none; transition: opacity .2s ease; z-index: 1;
}
.nl-mm--offen[data-dim] .nl-mm__dim { opacity: 1; pointer-events: auto; }

/* --------------------------------------------------------- Burger, Sheet */
.nl-mm .nl-mm__burger {
	display: none; position: absolute; right: var(--nl-mm-burger-rechts); bottom: 100%;
	transform: translateY(calc(-1 * var(--nl-mm-burger-hebung)));
	width: 42px; height: 42px; z-index: 6;
	flex-direction: column; justify-content: center; align-items: center; gap: 6px;
	color: var(--nl-mm-burger);
}
.nl-mm .nl-mm__burger span { display: block; width: 26px; height: 3px; background: currentColor; transition: transform .2s ease, opacity .15s ease; }
.nl-mm--sheet .nl-mm__burger span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.nl-mm--sheet .nl-mm__burger span:nth-child(2) { opacity: 0; }
.nl-mm--sheet .nl-mm__burger span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

.nl-mm .nl-mm__sheet {
	position: fixed; left: 0; right: 0; bottom: 0; top: var(--nl-mm-sheet-top, 72px);
	background: var(--nl-mm-sheet-bg); z-index: 4; overflow: hidden;
}
.nl-mm .nl-mm__sheet[hidden] { display: none; }
.nl-mm .nl-mm__ebene {
	position: absolute; inset: 0; display: flex; flex-direction: column;
	background: var(--nl-mm-sheet-bg); transition: transform .25s ease, opacity .25s ease;
}
.nl-mm .nl-mm__ebene[hidden] { display: none; }
.nl-mm .nl-mm__ebene--2 { transform: translateX(100%); }
.nl-mm--tief .nl-mm__ebene--1 { transform: translateX(-30%); opacity: 0; pointer-events: none; }
.nl-mm--tief .nl-mm__ebene--2.ist-aktiv { transform: translateX(0); }
.nl-mm .nl-mm__scroll { flex: 1; overflow-y: auto; padding: 1rem var(--nl-rand, 20px) 1.5rem; -webkit-overflow-scrolling: touch; }

.nl-mm .nl-mm__suche {
	display: flex; align-items: center; gap: .6rem; background: var(--nl-hell, #f1f1f1);
	padding: .7rem .9rem; margin: .25rem 0 1rem; color: #5d5d5d;
}
.nl-mm .nl-mm__suche input { flex: 1; min-width: 0; font: inherit; font-size: 1rem; border: 0; background: none; outline: none; color: var(--nl-tinte, #161616); padding: 0; }
.nl-mm .nl-mm__suche input::-webkit-search-cancel-button { -webkit-appearance: none; }

.nl-mm .nl-mm__liste { list-style: none; margin: 0; padding: 0; }
.nl-mm .nl-mm__liste li { border-bottom: 1px solid #ececec; margin: 0; }
.nl-mm .nl-mm__liste > li > button,
.nl-mm .nl-mm__liste > li > a {
	width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 1rem;
	font-size: 1.25rem; font-weight: 700; color: var(--nl-tinte, #161616); padding: 1rem .1rem; text-align: left;
}
.nl-mm .nl-mm__liste .nl-mm__winkel { color: var(--nl-mm-strich); }

.nl-mm .nl-mm__fuss {
	border-top: 1px solid #ececec; padding: 1rem var(--nl-rand, 20px) calc(1.25rem + env(safe-area-inset-bottom));
	display: flex; flex-wrap: wrap; gap: .5rem .9rem; align-items: center; background: var(--nl-mm-sheet-bg);
}
.nl-mm .nl-mm__fuss a { font-weight: 600; color: #4a4346; font-size: .95rem; }
.nl-mm .nl-mm__cta {
	margin-left: auto; background: var(--nl-mm-cta-bg); color: var(--nl-mm-cta-text) !important;
	padding: .55rem 1.1rem; font-weight: 700;
}

.nl-mm .nl-mm__zurueck { display: flex; align-items: center; gap: .4rem; color: #5d5d5d; font-weight: 600; font-size: .95rem; padding: .6rem 0 .8rem; }
.nl-mm .nl-mm__zurueck .nl-mm__winkel { transform: rotate(180deg); width: 16px; height: 16px; }
.nl-mm .nl-mm__ebene--2 .nl-mm__intro h4 { font-size: 1.7rem; }
.nl-mm .nl-mm__ebene--2 .nl-mm__intro p { margin-bottom: 1.2rem; }
.nl-mm .nl-mm__ebene--2 .nl-mm__gruppen { grid-template-columns: 1fr; gap: 1.3rem; margin-top: 1.2rem; }
.nl-mm .nl-mm__ebene--2 .nl-mm__gruppe li a { font-size: 1.05rem; padding: .15rem 0; display: block; }

/* --------------------------------------------------- Handy-Modus (JS) */
.nl-mm--mobil .nl-mm__band,
.nl-mm--mobil .nl-mm__flaeche,
.nl-mm--mobil .nl-mm__dim { display: none; }
.nl-mm--mobil .nl-mm__burger { display: flex; }

/* Rückfall ohne Skript: die drei Umbrüche des Reglers */
@media (max-width: 767.98px) {
	.nl-mm-umbruch-768 .nl-mm__band { display: none; }
	.nl-mm-umbruch-768 .nl-mm__burger { display: flex; }
}
@media (max-width: 1023.98px) {
	.nl-mm-umbruch-1024 .nl-mm__band { display: none; }
	.nl-mm-umbruch-1024 .nl-mm__burger { display: flex; }
}
@media (max-width: 1199.98px) {
	.nl-mm-umbruch-1200 .nl-mm__band { display: none; }
	.nl-mm-umbruch-1200 .nl-mm__burger { display: flex; }
}

/* Seite nicht scrollen, solange das Handy-Menü offen ist */
.nl-mm-gesperrt, .nl-mm-gesperrt body { overflow: hidden; }

/* Träger (Elementor-Kopfzeile) über der Abdunkelung */
.elementor-location-header:has(.nl-mm) { position: relative; z-index: 1001; }

/* Im Editor: Band immer zeigen, nichts kleben, kein Burger */
.elementor-editor-active .nl-mm .nl-mm__burger { display: none !important; }
.elementor-editor-active .nl-mm .nl-mm__band { display: block !important; }

@media (prefers-reduced-motion: reduce) {
	.nl-mm *, .nl-mm *::before, .nl-mm *::after { transition-duration: .01ms !important; }
}
