/* =========================================================
   Lentia Verlag – Mobiles Menü (nach Figma "Frame 11")
   Aktiv bis 920px Breite, ersetzt dort die MeanMenu-Navigation
   ========================================================= */

/* Desktop: alles vom mobilen Menü ausblenden */
.mm-toggle,
.mm-panel {
	display: none;
}

@media only screen and (max-width: 920px) {

	/* Desktop-Navigation ausblenden */
	#menu_o {
		display: none;
	}

	#top_o .outer {
		position: relative;
	}

	/* ---------- Menü-Button im Header (Hamburger / X) ---------- */
	.mm-toggle {
		display: flex;
		align-items: center;
		justify-content: center;
		position: absolute;
		right: 20px;
		top: 50%;
		transform: translateY(-50%);
		width: 44px;
		height: 44px;
		padding: 0;
		border: 0;
		background: transparent;
		cursor: pointer;
		z-index: 130;
	}
	.mm-toggle img {
		display: block;
		max-width: 26px;
		height: auto;
	}

	/* ---------- Panel: klappt direkt unter #top_o auf ----------
	   Sitzt als letztes Kind in #top_o (position: relative bzw. fixed
	   im Sticky-Zustand) und wandert so mit dem Sticky-Header mit.
	   display wird per jQuery slideDown/slideUp gesteuert. */
	.mm-panel {
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		width: 100%;
		max-height: calc(100vh - 100px); /* wird per JS exakt gesetzt */
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
		background: #F5F2F0; /* rgba(235,229,225,.5) auf Weiß */
		background: #D5D3CE;
		box-shadow: 0 6px 8px rgba(50, 50, 50, 0.2);
		font-family: Arial, Helvetica, sans-serif;
		color: #000;
		text-align: left;
	}
	.mm-panel .mm-nav {
		max-width: 563px;
		margin: 0 auto;
	}

	body.mm-open {
		overflow: hidden;
	}

	/* Listen */
	.mm-nav {
		padding: 15px 23px 40px 27px;
	}
	.mm-list,
	.mm-list li {
		list-style: none;
		margin: 0;
		padding: 0;
	}
	.mm-row {
		display: flex;
		align-items: stretch;
	}
	.mm-row > a,
	.mm-row > a:link,
	.mm-row > a:visited {
		flex: 1 1 auto;
		display: flex;
		align-items: center;
		min-width: 0;
		text-decoration: none;
		color: #000;
	}
	.mm-label {
		flex: 1 1 auto;
	}

	/* Pfeil-Button: öffnet das Untermenü */
	.mm-sub-toggle {
		flex: 0 0 auto;
		display: flex;
		align-items: center;
		justify-content: flex-end;
		width: 48px;
		margin: 0;
		padding: 0 9px 0 0;
		border: 0;
		background: transparent;
		cursor: pointer;
	}
	.mm-sub-toggle .mm-arrow {
		display: block;
		width: 9px;
		height: 17px;
		transition: transform .25s ease;
	}
	.mm-sub-toggle[aria-expanded="true"] .mm-arrow {
		transform: rotate(90deg);
	}

	/* Hauptmenü */
	.mm-main > li {
		border-bottom: 1px solid #D3CFCB;
	}
	.mm-main .mm-row > a {
		min-height: 53px;
		font-size: 21px;
		line-height: 1.2;
	}
	.mm-main .mm-icon {
		flex: 0 0 auto;
		width: 30px;
		height: 30px;
		margin: 0 35px 0 8px;
	}
	.mm-main .mm-row > a.active {
		color: #832937;
		font-weight: bold;
	}
	.mm-main > li.active-item {
		border-bottom: 0;
	}
	.mm-main > li.active-item.mm-sub-open {
		border-bottom: 1px solid #D3CFCB;
	}

	/* Untermenüs (per jQuery slideToggle) */
	.mm-sub {
		display: none;
		list-style: none;
		margin: 0;
		padding: 0 0 10px 0;
	}
	.mm-sub li a,
	.mm-sub li a:link,
	.mm-sub li a:visited {
		display: block;
		padding: 8px 10px;
		font-size: 17px;
		line-height: 1.2;
		color: #333;
		text-decoration: none;
	}
	.mm-main .mm-sub {
		padding-left: 63px; /* bündig mit dem Menütext */
	}
	.mm-service .mm-sub {
		padding-left: 22px;
	}
	.mm-service .mm-sub li a {
		font-size: 16px;
	}
	.mm-sub li a:hover,
	.mm-sub li a:focus,
	.mm-sub li a.active {
		color: #832937;
	}

	/* Trenner */
	.mm-divider {
		display: flex;
		align-items: center;
		margin: 26px -4px 4px -4px;
		font-size: 13px;
		line-height: 1.2;
		letter-spacing: 1.95px;
		text-transform: uppercase;
		white-space: nowrap;
	}
	.mm-divider::before,
	.mm-divider::after {
		content: "";
		flex: 1 1 auto;
		border-top: 1px solid #ABA7A3;
	}
	.mm-divider span {
		padding: 0 10px;
	}

	/* Service & Information */
	.mm-service > li {
		border-bottom: 1px solid #D3CFCB;
	}
	.mm-service > li:last-child {
		border-bottom: 0;
	}
	.mm-service .mm-row > a {
		min-height: 46px;
		padding-left: 6px;
		font-size: 19px;
		line-height: 1.2;
	}
	.mm-service .mm-row > a.active {
		color: #832937;
		font-weight: bold;
	}

	.mm-row > a:hover .mm-label,
	.mm-row > a:focus .mm-label {
		color: #832937;
	}
	.mm-service li:nth-child(1) {
		display: none;	
	}
}

@media only screen and (max-width: 400px) {
	.mm-main .mm-icon {
		margin-right: 22px;
		margin-left: 4px;
	}
	.mm-main .mm-sub {
		padding-left: 52px;
	}
	.mm-nav {
		padding-left: 18px;
		padding-right: 16px;
	}
}
