/* ==========================================================
   TEYA Header – v1.1.0
   Farben/Abstände zentral in den Variablen anpassen
   ========================================================== */
.teya-hd,
.teya-hd-panel,
.teya-hd-spacer{
	--teya-navy:#17304d;
	--teya-navy-2:#2b5d8f;
	--teya-text:#0f1b2b;
	--teya-muted:#4a5a6e;
	--teya-bg:rgba(246,251,253,.88);
	--teya-bg-scrolled:rgba(255,255,255,.80);
	--teya-line:rgba(23,48,77,.09);
	--teya-ease:cubic-bezier(.22,.61,.36,1);
	--teya-top:16px;
	--teya-h:84px;
	--teya-h-scrolled:66px;
}

.teya-hd-spacer{height:calc(var(--teya-h) + var(--teya-top) * 2);}

.teya-lock,.teya-lock body{overflow:hidden;}

/* ---------- Header-Rahmen ---------- */
.teya-hd{
	position:fixed;
	top:var(--teya-top);
	left:0;right:0;
	z-index:9990;
	padding:0 24px;
	pointer-events:none;
	font-family:inherit;
	transition:transform .5s var(--teya-ease),top .35s var(--teya-ease);
}
.admin-bar .teya-hd{top:calc(var(--teya-top) + 32px);}
@media (max-width:782px){.admin-bar .teya-hd{top:calc(var(--teya-top) + 46px);}}

.teya-hd__bar{
	pointer-events:auto;
	position:relative;
	max-width:1760px;
	height:var(--teya-h);
	margin:0 auto;
	padding:0 28px 0 44px;
	display:flex;
	align-items:center;
	gap:28px;
	background:var(--teya-bg);
	border:1px solid var(--teya-line);
	border-radius:28px;
	box-shadow:0 10px 30px -14px rgba(15,27,43,.14);
	-webkit-backdrop-filter:saturate(170%) blur(16px);
	backdrop-filter:saturate(170%) blur(16px);
	transition:height .4s var(--teya-ease),background-color .4s,box-shadow .4s,border-radius .4s;
}

.teya-hd.is-scrolled{--teya-top:10px;}
.teya-hd.is-scrolled .teya-hd__bar{
	height:var(--teya-h-scrolled);
	background:var(--teya-bg-scrolled);
	box-shadow:0 20px 44px -18px rgba(15,27,43,.28);
}
.teya-hd.is-hidden{transform:translateY(calc(-100% - 40px));}

/* ---------- Logo ---------- */
.teya-hd__logo{
	display:inline-flex;
	flex-direction:column;
	align-items:center;
	flex-shrink:0;
	color:var(--teya-text);
	text-decoration:none;
	line-height:1;
}
.teya-hd__logo img{height:46px;width:auto;display:block;transition:height .4s var(--teya-ease);}
.teya-hd.is-scrolled .teya-hd__logo img{height:36px;}

.teya-hd__logo-main{
	font-size:30px;
	font-weight:400;
	letter-spacing:.42em;
	margin-right:-.42em;
	transition:font-size .4s var(--teya-ease);
}
.teya-hd__logo-sub{
	display:flex;
	align-items:center;
	gap:9px;
	margin-top:7px;
	font-size:8px;
	font-weight:500;
	letter-spacing:.7em;
	transition:margin .4s var(--teya-ease);
}
.teya-hd__logo-sub > span{margin-right:-.7em;}
.teya-hd__logo-sub::before,
.teya-hd__logo-sub::after{content:"";width:28px;height:1px;background:currentColor;opacity:.55;}
.teya-hd.is-scrolled .teya-hd__logo-main{font-size:25px;}
.teya-hd.is-scrolled .teya-hd__logo-sub{margin-top:5px;}

/* ---------- Desktop-Navigation ---------- */
.teya-hd__nav{margin:0 auto;}
.teya-hd__menu li::before,.teya-hd__mmenu li::before{content:none;}
.teya-hd ul,.teya-hd-panel ul{list-style:none !important;margin:0;padding:0;}
.teya-hd li,.teya-hd-panel li{list-style:none !important;}
.teya-hd__menu{display:flex;align-items:center;gap:4px;list-style:none;margin:0;padding:0;}
.teya-hd__menu > li{position:relative;margin:0;}

.teya-hd__menu > li > a{
	position:relative;
	display:flex;
	align-items:center;
	gap:9px;
	padding:10px 18px;
	border-radius:12px;
	font-size:16px;
	font-weight:600;
	color:var(--teya-text);
	text-decoration:none;
	white-space:nowrap;
	transition:color .25s,background-color .25s;
}
.teya-hd__menu > li > a:hover{background:rgba(23,48,77,.05);color:var(--teya-navy);}

/* Unterstrich: wächst von links, verschwindet nach rechts */
.teya-hd__menu > li > a::before{
	content:"";
	position:absolute;
	left:18px;right:18px;bottom:4px;
	height:2px;border-radius:2px;
	background:var(--teya-navy);
	transform:scaleX(0);
	transform-origin:right;
	transition:transform .4s var(--teya-ease);
}
.teya-hd__menu > li > a:hover::before,
.teya-hd__menu > li > a:focus-visible::before,
.teya-hd__menu > .current-menu-item > a::before,
.teya-hd__menu > .current-menu-ancestor > a::before{transform:scaleX(1);transform-origin:left;}
.teya-hd__menu > li.menu-item-has-children > a::before{right:36px;}

/* Chevron */
.teya-hd__menu > .menu-item-has-children > a::after{
	content:"";
	width:6px;height:6px;
	border-right:2px solid currentColor;
	border-bottom:2px solid currentColor;
	transform:translateY(-2px) rotate(45deg);
	transition:transform .35s var(--teya-ease);
}
.teya-hd__menu > .menu-item-has-children:hover > a::after,
.teya-hd__menu > .menu-item-has-children:focus-within > a::after{transform:translateY(2px) rotate(-135deg);}

/* Dropdown */
.teya-hd__menu .sub-menu{
	position:absolute;
	top:calc(100% + 16px);
	left:50%;
	min-width:270px;
	margin:0;
	padding:10px;
	list-style:none;
	background:#fff;
	border:1px solid var(--teya-line);
	border-radius:18px;
	box-shadow:0 28px 60px -22px rgba(15,27,43,.32);
	opacity:0;
	visibility:hidden;
	transform:translate(-50%,10px) scale(.98);
	transform-origin:top center;
	transition:opacity .25s,transform .35s var(--teya-ease),visibility 0s .35s;
}
.teya-hd__menu .sub-menu::before{content:"";position:absolute;left:0;right:0;top:-18px;height:18px;} /* Hover-Brücke */
.teya-hd__menu > li:hover > .sub-menu,
.teya-hd__menu > li:focus-within > .sub-menu{
	opacity:1;
	visibility:visible;
	transform:translate(-50%,0) scale(1);
	transition-delay:0s;
}
.teya-hd__menu .sub-menu li{margin:0;}
.teya-hd__menu .sub-menu a{
	display:flex;
	align-items:center;
	justify-content:space-between;
	gap:16px;
	padding:12px 14px;
	border-radius:12px;
	font-size:15px;
	font-weight:500;
	color:var(--teya-text);
	text-decoration:none;
	transition:background-color .2s,color .2s,padding .3s var(--teya-ease);
}
.teya-hd__menu .sub-menu a::after{
	content:"→";
	opacity:0;
	transform:translateX(-8px);
	transition:opacity .25s,transform .3s var(--teya-ease);
}
.teya-hd__menu .sub-menu a:hover,
.teya-hd__menu .sub-menu .current-menu-item > a{background:#eef5fa;color:var(--teya-navy);padding-left:18px;}
.teya-hd__menu .sub-menu a:hover::after{opacity:1;transform:none;}

/* ---------- CTA-Button ---------- */
.teya-hd__cta{
	position:relative;
	overflow:hidden;
	isolation:isolate;
	display:inline-flex;
	align-items:center;
	gap:10px;
	flex-shrink:0;
	padding:15px 30px;
	border-radius:999px;
	background:var(--teya-navy);
	color:#fff !important;
	font-size:16px;
	font-weight:600;
	text-decoration:none !important;
	transition:transform .3s var(--teya-ease),box-shadow .3s,padding .4s var(--teya-ease);
}
.teya-hd__cta::before{
	content:"";
	position:absolute;inset:0;z-index:-1;
	background:linear-gradient(120deg,var(--teya-navy-2),#3f86c9);
	transform:translateX(-101%);
	transition:transform .5s var(--teya-ease);
}
.teya-hd__cta:hover{transform:translateY(-2px);box-shadow:0 14px 30px -12px rgba(23,48,77,.65);}
.teya-hd__cta:hover::before{transform:none;}
.teya-hd__cta svg{width:17px;height:17px;transition:transform .35s var(--teya-ease);}
.teya-hd__cta:hover svg{transform:translateX(4px);}
.teya-hd.is-scrolled .teya-hd__cta{padding:12px 26px;}

/* ---------- Scroll-Fortschritt ---------- */
.teya-hd__progress{
	position:absolute;
	left:28px;right:28px;bottom:-1px;
	height:2px;border-radius:2px;
	background:linear-gradient(90deg,var(--teya-navy),#3f86c9);
	transform:scaleX(var(--teya-p,0));
	transform-origin:left;
	opacity:0;
	transition:opacity .3s;
}
.teya-hd.is-scrolled .teya-hd__progress{opacity:1;}

/* ---------- Burger (gegen Theme-/Elementor-Button-Styles abgesichert) ---------- */
.teya-hd button.teya-hd__burger{
	display:none !important;
	position:relative !important;
	flex-shrink:0;
	width:48px !important;height:48px !important;
	min-width:0 !important;min-height:0 !important;
	margin:0 0 0 auto !important;
	padding:0 !important;
	border:0 !important;
	border-radius:14px !important;
	background:rgba(23,48,77,.07) !important;
	box-shadow:none !important;
	color:var(--teya-text) !important;
	font-size:0 !important;line-height:0 !important;
	cursor:pointer;
	transition:background-color .25s;
}
.teya-hd button.teya-hd__burger:hover,
.teya-hd button.teya-hd__burger:focus{background:rgba(23,48,77,.12) !important;color:var(--teya-text) !important;}
.teya-hd button.teya-hd__burger:focus-visible{outline:2px solid var(--teya-navy-2) !important;outline-offset:2px;}
.teya-hd button.teya-hd__burger span{
	position:absolute;
	left:14px;right:14px;
	display:block;
	height:2px;border-radius:2px;
	background:var(--teya-text);
	transition:top .3s var(--teya-ease),transform .35s var(--teya-ease),opacity .2s;
}
.teya-hd button.teya-hd__burger span:nth-child(1){top:17px;}
.teya-hd button.teya-hd__burger span:nth-child(2){top:23px;}
.teya-hd button.teya-hd__burger span:nth-child(3){top:29px;}
.teya-hd.is-open button.teya-hd__burger span:nth-child(1){top:23px;transform:rotate(45deg);}
.teya-hd.is-open button.teya-hd__burger span:nth-child(2){opacity:0;transform:translateX(-6px);}
.teya-hd.is-open button.teya-hd__burger span:nth-child(3){top:23px;transform:rotate(-45deg);}

/* ---------- Mobile-Panel ---------- */
.teya-hd-panel{
	position:fixed;
	inset:0;
	z-index:9980;
	display:flex;
	flex-direction:column;
	padding:120px 24px 32px;
	overflow-y:auto;
	background:rgba(246,251,253,.97);
	-webkit-backdrop-filter:blur(12px);
	backdrop-filter:blur(12px);
	opacity:0;
	visibility:hidden;
	transform:translateY(-14px);
	transition:opacity .3s,transform .45s var(--teya-ease),visibility 0s .45s;
}
.teya-hd-panel.is-open{opacity:1;visibility:visible;transform:none;transition-delay:0s;}

.teya-hd__mmenu,.teya-hd__mmenu .sub-menu{list-style:none;margin:0;padding:0;}
.teya-hd__mmenu > li{
	position:relative;
	margin:0;
	border-bottom:1px solid var(--teya-line);
	opacity:0;
	transform:translateY(12px);
	transition:opacity .35s,transform .45s var(--teya-ease);
}
.teya-hd-panel.is-open .teya-hd__mmenu > li{
	opacity:1;
	transform:none;
	transition-delay:calc(var(--i,0) * 55ms + 80ms);
}
.teya-hd__mmenu > li > a{
	display:block;
	padding:18px 56px 18px 4px;
	font-size:22px;
	font-weight:600;
	color:var(--teya-text);
	text-decoration:none;
}
.teya-hd__mmenu .current-menu-item > a{color:var(--teya-navy-2);}

.teya-hd-panel button.teya-hd__sub-toggle{
	position:absolute !important;
	top:10px;right:0;
	width:44px !important;height:44px !important;
	min-width:0 !important;min-height:0 !important;
	margin:0 !important;padding:0 !important;
	border:0 !important;border-radius:12px !important;
	background:rgba(23,48,77,.06) !important;
	box-shadow:none !important;
	font-size:0 !important;
	cursor:pointer;
}
.teya-hd-panel button.teya-hd__sub-toggle:hover,
.teya-hd-panel button.teya-hd__sub-toggle:focus{background:rgba(23,48,77,.12) !important;}
.teya-hd-panel button.teya-hd__sub-toggle::before{
	content:"";
	position:absolute;
	left:50%;top:50%;
	width:8px;height:8px;
	border-right:2px solid var(--teya-text);
	border-bottom:2px solid var(--teya-text);
	transform:translate(-50%,-70%) rotate(45deg);
	transition:transform .35s var(--teya-ease);
}
.is-expanded > button.teya-hd__sub-toggle::before{transform:translate(-50%,-30%) rotate(-135deg);}

.teya-hd__mmenu .sub-menu{list-style:none;margin:0;padding:0;}
.teya-hd__mmenu > li{
	position:relative;
	margin:0;
	border-bottom:1px solid var(--teya-line);
	opacity:0;
	transform:translateY(12px);
	transition:opacity .35s,transform .45s var(--teya-ease);
}
.teya-hd-panel.is-open .teya-hd__mmenu > li{
	opacity:1;
	transform:none;
	transition-delay:calc(var(--i,0) * 55ms + 80ms);
}
.teya-hd__mmenu > li > a{
	display:block;
	padding:18px 56px 18px 4px;
	font-size:22px;
	font-weight:600;
	color:var(--teya-text);
	text-decoration:none;
}
.teya-hd__mmenu .current-menu-item > a{color:var(--teya-navy-2);}

.teya-hd__sub-toggle{
	position:absolute;
	top:10px;right:0;
	width:44px;height:44px;
	padding:0;border:0;border-radius:12px;
	background:rgba(23,48,77,.06);
	cursor:pointer;
}
.teya-hd__sub-toggle::before{
	content:"";
	position:absolute;
	left:50%;top:50%;
	width:8px;height:8px;
	border-right:2px solid var(--teya-text);
	border-bottom:2px solid var(--teya-text);
	transform:translate(-50%,-70%) rotate(45deg);
	transition:transform .35s var(--teya-ease);
}
.is-expanded > .teya-hd__sub-toggle::before{transform:translate(-50%,-30%) rotate(-135deg);}

.teya-hd__mmenu .teya-hd__sub-wrap{
	display:grid;
	grid-template-rows:0fr;
	transition:grid-template-rows .4s var(--teya-ease);
}
.teya-hd__mmenu .teya-hd__sub-wrap > .sub-menu{min-height:0;overflow:hidden;}
.teya-hd__mmenu .is-expanded > .teya-hd__sub-wrap{grid-template-rows:1fr;}
.teya-hd__mmenu .sub-menu > li:last-child{padding-bottom:12px;}
.teya-hd__mmenu .sub-menu li{margin:0;}
.teya-hd__mmenu .sub-menu a{
	display:block;
	padding:11px 16px;
	border-radius:10px;
	font-size:17px;
	font-weight:500;
	color:var(--teya-muted);
	text-decoration:none;
}
.teya-hd__mmenu .sub-menu a:hover{background:#eef5fa;color:var(--teya-navy);}

.teya-hd__cta--panel{justify-content:center;margin-top:32px;padding:18px 30px;font-size:17px;}

/* ---------- Menü je Gerät (Einstellungen → TEYA Header) ---------- */
.teya-hd-panel .teya-hd__mmenu{display:none;}
@media (min-width:641px) and (max-width:1180px){.teya-hd-panel .teya-hd__mmenu--tablet{display:block;}}
@media (max-width:640px){.teya-hd-panel .teya-hd__mmenu--mobile{display:block;}}

/* ---------- Breakpoints ---------- */
@media (max-width:1180px){
	.teya-hd__nav{display:none;}
	.teya-hd button.teya-hd__burger{display:block !important;}
	.teya-hd__bar > .teya-hd__cta{margin-left:auto;}
	.teya-hd__bar > .teya-hd__cta + button.teya-hd__burger{margin-left:0 !important;}
}
@media (min-width:1181px){
	.teya-hd-panel{display:none;}
}
@media (max-width:640px){
	.teya-hd,.teya-hd-panel,.teya-hd-spacer{--teya-top:10px;--teya-h:70px;--teya-h-scrolled:62px;}
	.teya-hd{padding:0 12px;}
	.teya-hd__bar{padding:0 11px 0 22px;border-radius:22px;}
	.teya-hd__bar > .teya-hd__cta{display:none;}
	.teya-hd button.teya-hd__burger,
	.teya-hd__bar > .teya-hd__cta + button.teya-hd__burger{margin-left:auto !important;}
	.teya-hd__logo-main{font-size:24px;}
	.teya-hd.is-scrolled .teya-hd__logo-main{font-size:22px;}
	.teya-hd__logo-sub{font-size:7px;margin-top:5px;}
	.teya-hd__logo-sub::before,.teya-hd__logo-sub::after{width:20px;}
	.teya-hd__progress{left:20px;right:20px;}
	.teya-hd-panel{padding-top:100px;}
}

/* ---------- Elementor-Editor: nicht fixieren ---------- */
.elementor-editor-active .teya-hd{position:relative;top:0;}
.elementor-editor-active .teya-hd-spacer{display:none;}

/* ---------- Weniger Bewegung ---------- */
@media (prefers-reduced-motion:reduce){
	.teya-hd *,.teya-hd,.teya-hd-panel,.teya-hd-panel *{transition:none !important;animation:none !important;}
	.teya-hd.is-hidden{transform:none;}
}
