/***********************************
	menu
************************************/

a#mobilemenu {
    display:  none;  
	position: sticky;
  top: -1px;
z-index: 1000;
}
  a#mobilemenu span {display:block; padding: 6.5px 6px 6px 5px; font-weight: bold; font-size: 17px; 
}

.topmenubar {	
	background:#C15070;
	margin-bottom:20px;
	position: sticky;
    top: -1px;
	z-index: 1000;
	margin-top: -5px;
}

.topmenubar a {
	font-size: 17px ! important; 
}

/* position und z-index ergänzt, .mobile_search Zeile neu dazu */
.search_box {
    float: right;
    width: 130px;
    text-align: right;
    margin-top: 12px;
    position: relative;
    z-index: 1001;
}

.mobile_search { display: none; }  

.search_box .searchstring {	
	width:80px;	
	font-size:12px;
	padding:2px;
	background:#fff;
}
.search_box .submitbutton {
	vertical-align: top; margin:0 0 0 0;  background: none; border: none;
}

/* Link Formatting */
ul.nav, ul.extramenu { 
	list-style-type: none;
	margin: 0; padding: 0;
	position: relative; 
}

ul.nav li {
	float: left; 
	list-style-type: none;
	list-style-image: none;
	position: relative;  
	font-weight: normal; 	
	margin: 0; padding: 0;
	border-right: 1px solid #fff;
}

.nav li a {
	display: block; 	
	text-decoration: none; 
	font-weight: bold;
	line-height:140%;
	font-size:14px;
	padding: 10px 10px;
    color:#fff;
	text-transform: uppercase;
}

/* Hover Formatting */

.nav  li a:hover, .nav li a:focus, .nav li a:active, .nav li a.active, .nav a.menu-current, .nav a.menu-parent {
	background-color: #a4133c;  color: #fff; font-weight: bold;
}

/* 2 level */
.nav li ul {
    display: none;
    width: 15em; 
    margin: 0; padding:0;
    position: absolute;
}

.nav li ul li {
	width: 15em; 
	text-align: left; 
	margin: 0; 
	padding: 0;
	border-top: 1px solid #fff;
	border-right: none;
	background-color:#C15070;
}
.nav li ul li a {
    color: #fff;
    font-weight: normal;
	padding: 6px 10px;
	font-weight: bold;
}

/* 2 level hover */
.nav li ul a:hover,  .nav li ul a.menu-current { background-color: #A4133C;  color: #fff;}

/* Show and hide */
.nav li:hover ul, .nav li a:focus ul {display: block; }
.nav li ul ul { display: none;}
.nav li:hover ul ul {display: none;}
.nav li:hover>ul, .nav  li li:hover>ul {display: block;  z-index: 1000;}

/* 3 Ebene  */
.nav li ul li ul	{ 
	margin: -20px 0 0 70%;
	padding:0;
	z-index: 9999;  
	display: none;
	width: 11em; 
}
.nav li ul li ul li	{width: 11em;}

/* Positioning hover */
.nav li {position: relative;}

.nav li:hover {
	z-index: 10000;	
	white-space: normal;
}

/* Hide submenu toggle on desktop */
.submenu-toggle { display: none; }
@media screen and (max-width: 800px) {
	.mobiles_only { display: block; }
	.desktops_only { display: none; }

	.desktop_search { display: none; }
	.mobile_search {
		display: block;
		position: sticky;
		top: 13px;
		float: right;
		margin-top: -35px;
		z-index: 1002;
	}

	/* ---- Hamburger Toggle Button ---- */
	a#mobilemenu {
		display: flex;
		align-items: center;
		justify-content: space-between;
		background: #C15070;
		color: #fff;
		width: 100%;
		clear: both;
		margin-top: -5px;
		margin-bottom: 0;
		padding: 0 14px;
		box-sizing: border-box;
		text-decoration: none;
		height: 48px;
		min-height: 48px;
		line-height: 48px;
		cursor: pointer;
		transition: background 0.2s ease;
		will-change: transform;
		transform: translateZ(0);
		position: sticky;
		top: 0;
		z-index: 1001;
		font-weight: bold;
	}

	a#mobilemenu:hover,
	a#mobilemenu:focus {
		background: #A4133C;
		outline: none;
		font-weight: bold;
	}

	a#mobilemenu span {
		display: flex;
		align-items: center;
		gap: 10px;
		font-size: 16px;
		font-weight: bold;
		letter-spacing: 0.03em;
		padding: 0;
		height: 48px;
		line-height: 48px;
	}

	/* SVG Hamburger Icon (inline, no image dependency) */
	a#mobilemenu span::before {
		content: "";
		display: flex;
		align-self: center;
		width: 22px;
		height: 16px;
		background-image: url("../images/hamburger.svg");
		background-repeat: no-repeat;
		background-size: contain;
		flex-shrink: 0;
		transition: opacity 0.2s ease;
		font-weight: bold;
	}

	/* ---- Mobile Navigation List ---- */
	ul#mobile,
	ul#mobile ul,
	ul#mobile ul ul {
		width: 100% !important;
		position: static !important;
		margin: 0 !important;
		padding: 0;
		display: none;
		list-style: none;
		font-weight: bold;
		background: #A4133C; 
	}

	ul#mobile {
		display: none;
		background: #f5f2ef; 
		border-top: 1px #fff ; 
		margin-top: 0 !important;
		padding-top: 6px !important;
	}

	/* Top-level items */
	ul#mobile li,
	ul#mobile li li,
	ul#mobile li li li {
		width: 100% !important;
		float: none;
		display: block;
		border-right: none;
		border-bottom: 1px solid #fff;
		background-color: #C15070;
		transition: background 0.15s ease;
		font-weight: bold !important;
	}

	/* Sub-menu items — slightly indented with a left accent */
	ul#mobile li li {
	    background-color: #c15070;
		border-left: 1px solid #cdc2b6;
	}

	ul#mobile li li li {
	    background-color: #A4133C;
		border-left: 1px solid #fff;
	}

	/* Links */
	ul#mobile a {
		display: block;
		padding: 14px 18px;
		color: #fff;
		font-size: 16px;
		font-weight: bold !important;
		text-decoration: none;
		transition: background 0.15s ease, color 0.15s ease;
	}

	ul#mobile li li a { padding: 12px 18px 12px 24px; font-size: 15px; font-weight: bold !important; }
	ul#mobile li li li a { padding: 10px 18px 10px 34px; font-size: 14px; }

	ul#mobile a:hover,
	ul#mobile a:focus {
		background-color: #A4133C; 
		color: #fff !important;
		outline: none;
		font-weight: bold !important;
	}

	/* Current / active states */
	ul#mobile a.menu-current {
		color: #fff;
		font-weight: bold !important;
		border-left: 3px solid #9e8d7b;
	}

	ul#mobile a.menu-current:hover,
	ul#mobile a.menu-current:focus {
		background: #9e8d7b;
		color: #fff;
		font-weight: bold !important;
	}

	/* Expand arrow */
	ul#mobile a.menu-expand,
	ul#mobile a.menu-parent {
		background-image: none !important;
		display: block;
		pointer-events: auto;
	}

	ul#mobile a.menu-expand::after,
	ul#mobile a.menu-parent::after {
		content: none;
	}

	ul#mobile .submenu-toggle {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		width: 48px;
		height: 48px;
		position: absolute;
		right: 0;
		top: 0;
		flex-shrink: 0;
		cursor: pointer;
		font-size: 50px;
		color: #fff;
		transform: rotate(90deg);
		transition: transform 0.2s ease;
		z-index: 2;
	}

	ul#mobile li:hover .submenu-toggle,
	ul#mobile .submenu-toggle:hover {
		color: #fff;
	}

	ul#mobile .submenu-toggle.open {
		transform: rotate(270deg);
	}

	/* Open sub-menus */
	ul#mobile li.menu-parent > ul,
	ul#mobile li.menu-current > ul {
		display: block;
	}
}
