/* Tobol Menü – Desktop-Leiste + Mega-Panel + Mobil-Overlay aus einem WordPress-Menü.
   Sichtbare Animationen laufen über @keyframes (Elementor nullt bei „Bewegung reduzieren“
   alle transition-durations, Keyframes laufen weiter). Regler = CSS-Variablen --tm-* auf .tobol-menu. */

.tobol-menu, .tobol-menu * { box-sizing: border-box; }
.tobol-menu { position: relative; }
.tobol-menu ul { list-style: none; margin: 0; padding: 0; }
/* Buttons: Reset gegen Theme-Kit-Regeln (.elementor-kit-N button, :hover, :focus); Farben kommen von den Klassen unten (Spezifität 0,3,0). */
.tobol-menu .tobol-menu__bar button, .tobol-menu .tobol-menu__overlay button { font: inherit; background: none; border: 0; border-radius: 0; box-shadow: none; padding: 0; margin: 0; cursor: pointer; text-align: left; line-height: inherit; white-space: normal; }
.tobol-menu .tobol-menu__bar button:hover, .tobol-menu .tobol-menu__bar button:focus, .tobol-menu .tobol-menu__bar button:active, .tobol-menu .tobol-menu__overlay button:hover, .tobol-menu .tobol-menu__overlay button:focus, .tobol-menu .tobol-menu__overlay button:active { background: none; border-color: transparent; box-shadow: none; }
.tobol-menu .tobol-menu__bar button:focus, .tobol-menu .tobol-menu__overlay button:focus { outline: none; }
.tobol-menu button:focus-visible, .tobol-menu a:focus-visible { outline: 2px solid var(--tm-hover, #69FFEB); outline-offset: 3px; }

/* ---------- Leiste ---------- */
.tobol-menu__bar { display: flex; align-items: center; justify-content: var(--tm-justify, flex-end); padding: var(--tm-bar-pt, 0) var(--tm-bar-pr, 16px) var(--tm-bar-pb, 0) var(--tm-bar-pl, 0); }
.tobol-menu .tobol-menu__row { display: flex; align-items: center; gap: var(--tm-gap, 40px); }
.tobol-menu__item { position: relative; min-width: 0; }
.tobol-menu .tobol-menu__bar .tobol-menu__link { display: inline-flex; align-items: center; gap: 0.45em; color: var(--tm-color, #FFF); text-decoration: none; white-space: nowrap; padding: 8px 0;
	font-weight: 500; font-size: 16px; text-transform: uppercase; line-height: 1.5;
	animation: tm-color-out var(--tm-dur, 350ms) ease both; }
.tobol-menu .tobol-menu__item:hover > .tobol-menu__link, .tobol-menu .tobol-menu__item.is-open > .tobol-menu__link, .tobol-menu .tobol-menu__bar .tobol-menu__link:focus-visible { color: var(--tm-hover, #69FFEB); animation: tm-color-in var(--tm-dur, 350ms) ease both; }
.tobol-menu .tobol-menu__item.is-active > .tobol-menu__link { color: var(--tm-active, #69FFEB); }
@keyframes tm-color-in  { from { opacity: .75; } to { opacity: 1; } }
@keyframes tm-color-out { from { opacity: .9; } to { opacity: 1; } }
.tobol-menu__caret { width: var(--tm-caret, 10px); height: auto; flex: none; transform: rotate(0); }
.tobol-menu__item.is-open > .tobol-menu__link .tobol-menu__caret { animation: tm-rot-in var(--tm-dur, 350ms) ease forwards; }
.tobol-menu__item.is-closing > .tobol-menu__link .tobol-menu__caret { animation: tm-rot-out var(--tm-dur, 350ms) ease forwards; }
@keyframes tm-rot-in  { from { transform: rotate(0); } to { transform: rotate(180deg); } }
@keyframes tm-rot-out { from { transform: rotate(180deg); } to { transform: rotate(0); } }

/* ---------- Burger ---------- */
.tobol-menu .tobol-menu__bar .tobol-menu__burger { display: none; align-items: center; justify-content: center; width: var(--tm-burger-w, 40px); height: var(--tm-burger-w, 40px); color: var(--tm-burger-color, #FFF); flex: none; }
.tobol-menu__burger-icon { display: flex; flex-direction: column; justify-content: center; gap: calc(var(--tm-burger-w, 40px) * 0.2); width: calc(var(--tm-burger-w, 40px) * 0.75); }
.tobol-menu__burger-icon span { display: block; height: var(--tm-burger-line, 2px); border-radius: 2px; background: currentColor; }

/* ---------- Mega-Panel (Desktop) ---------- */
.tobol-menu__panel { display: none; position: fixed; left: 0; top: 0; width: 100vw; z-index: 1001; pointer-events: none; }
.tobol-menu__panel.is-open, .tobol-menu__panel.is-closing { display: block; }
.tobol-menu__panel.is-open { pointer-events: auto; }
.tobol-menu__panel-inner { display: grid; grid-template-rows: 0fr; background: var(--tm-panel-bg, rgba(3,22,38,0.94)); -webkit-backdrop-filter: blur(var(--tm-panel-blur, 10px)); backdrop-filter: blur(var(--tm-panel-blur, 10px)); box-shadow: 0 50px 50px 0 rgba(0,0,0,0.3); }
.tobol-menu__panel.is-open .tobol-menu__panel-inner { animation: tm-panel-open var(--tm-dur, 350ms) ease forwards; }
.tobol-menu__panel.is-closing .tobol-menu__panel-inner { animation: tm-panel-close var(--tm-dur, 350ms) ease forwards; }
@keyframes tm-panel-open  { from { grid-template-rows: 0fr; } to { grid-template-rows: 1fr; } }
@keyframes tm-panel-close { from { grid-template-rows: 1fr; } to { grid-template-rows: 0fr; } }
.tobol-menu__panel-box { min-height: 0; overflow: hidden; }
.tobol-menu__panel-content { max-width: var(--tm-panel-maxw, 1440px); margin: 0 auto; padding: var(--tm-panel-pt, 0) var(--tm-panel-pr, 0) var(--tm-panel-pb, 0) var(--tm-panel-pl, 0); }
.tobol-menu__sub { display: none; grid-template-columns: var(--tm-media-w, 48%) minmax(0, 1fr); min-height: var(--tm-panel-minh, 350px); }
.tobol-menu__sub.is-current { display: grid; }
.tobol-menu__sub--no-media { grid-template-columns: minmax(0, 1fr); }
.tobol-menu__media { background-size: cover; background-position: center; border-radius: var(--tm-media-radius, 0 0 50px 50px); min-height: var(--tm-panel-minh, 350px); animation: tm-media-in calc(var(--tm-dur, 350ms) * 1.4) ease both; }
@keyframes tm-media-in { from { opacity: 0; transform: translateX(-16px); } to { opacity: 1; transform: none; } }
.tobol-menu .tobol-menu__sublist { display: flex; flex-direction: column; gap: var(--tm-sub-gap, 20px); padding: var(--tm-sub-pt, 40px) var(--tm-sub-pr, 50px) var(--tm-sub-pb, 40px) var(--tm-sub-pl, 100px); align-self: start; }
.tobol-menu .tobol-menu__sublist--nested { padding: 8px 0 0 20px; gap: calc(var(--tm-sub-gap, 20px) * 0.6); }
.tobol-menu__subitem { min-width: 0; }
.tobol-menu__sub.is-current > .tobol-menu__sublist > .tobol-menu__subitem { animation: tm-item-in calc(var(--tm-dur, 350ms) * 1.2) cubic-bezier(.2,.7,.2,1) both; animation-delay: calc(var(--i, 0) * var(--tm-stagger, 50ms) + var(--tm-dur, 350ms) * 0.3); }
@keyframes tm-item-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.tobol-menu .tobol-menu__sublink { color: var(--tm-sub-color, #FFF); text-decoration: none; font-weight: 400; font-size: 16px; line-height: 1.25; display: inline-block; overflow-wrap: anywhere; }
.tobol-menu .tobol-menu__sublink:hover, .tobol-menu .tobol-menu__sublink:focus-visible, .tobol-menu__subitem.is-active > .tobol-menu__sublink { color: var(--tm-sub-hover, #69FFEB); }

/* ---------- Overlay (Mobil) ---------- */
.tobol-menu__overlay { display: none; position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; height: 100dvh; z-index: 1002; overscroll-behavior: contain;
	background: var(--tm-ov-bg, rgba(14,41,62,0.93)); -webkit-backdrop-filter: blur(var(--tm-ov-blur, 12px)); backdrop-filter: blur(var(--tm-ov-blur, 12px)); }
.tobol-menu__overlay.is-open, .tobol-menu__overlay.is-closing { display: block; }
.tobol-menu__overlay.is-open { animation: tm-ov-in var(--tm-ov-dur, 400ms) cubic-bezier(.2,.7,.2,1) both; }
.tobol-menu__overlay.is-closing { animation: tm-ov-out calc(var(--tm-ov-dur, 400ms) * 0.7) ease-in both; pointer-events: none; }
@keyframes tm-ov-in  { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: none; } }
@keyframes tm-ov-out { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateX(40px); } }
.tobol-menu__overlay-scroll { height: 100%; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: var(--tm-ov-pt, 20px) var(--tm-ov-pr, 20px) var(--tm-ov-pb, 30px) var(--tm-ov-pl, 20px); display: flex; flex-direction: column; }
.tobol-menu__overlay-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
.tobol-menu__overlay-logo { display: inline-block; line-height: 0; }
.tobol-menu .tobol-menu__overlay-logo-img { width: var(--tm-ov-logo-w, 250px); max-width: 70vw; height: auto; max-height: none; }
.tobol-menu .tobol-menu__overlay .tobol-menu__close { width: var(--tm-ov-close-w, 40px); height: var(--tm-ov-close-w, 40px); color: var(--tm-ov-close-color, #FFF); flex: none; display: inline-flex; align-items: center; justify-content: center; }
.tobol-menu__close svg { width: 100%; height: 100%; }
.tobol-menu__overlay.is-open .tobol-menu__close svg { animation: tm-close-in calc(var(--tm-ov-dur, 400ms) * 1.2) ease both; animation-delay: calc(var(--tm-ov-dur, 400ms) * 0.4); }
@keyframes tm-close-in { from { opacity: 0; transform: rotate(-90deg) scale(.6); } to { opacity: 1; transform: none; } }

.tobol-menu .tobol-menu__mlist { display: flex; flex-direction: column; gap: var(--tm-ov-gap, 14px); }
.tobol-menu__mitem { min-width: 0; }
.tobol-menu__overlay.is-open .tobol-menu__mitem, .tobol-menu__overlay.is-open .tobol-menu__lang { animation: tm-mitem-in calc(var(--tm-ov-dur, 400ms) * 1.1) cubic-bezier(.2,.7,.2,1) both; animation-delay: calc(var(--i, 0) * var(--tm-ov-stagger, 60ms) + var(--tm-ov-dur, 400ms) * 0.35); }
@keyframes tm-mitem-in { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
.tobol-menu__mrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tobol-menu .tobol-menu__overlay .tobol-menu__mlink { flex: 1 1 auto; min-width: 0; color: var(--tm-ov-color, #FFF); text-decoration: none; font-weight: 600; font-size: 1rem; text-transform: uppercase; line-height: 1.3; padding: 10px 0 10px 10px; overflow-wrap: anywhere; }
.tobol-menu .tobol-menu__mitem.is-open > .tobol-menu__mrow > .tobol-menu__mlink, .tobol-menu .tobol-menu__mitem.is-active > .tobol-menu__mrow > .tobol-menu__mlink, .tobol-menu .tobol-menu__overlay .tobol-menu__mlink:hover { color: var(--tm-ov-hover, #69FFEB); }
.tobol-menu .tobol-menu__overlay .tobol-menu__mchev { flex: none; display: inline-flex; align-items: center; justify-content: center; color: var(--tm-ov-chev-color, #FFF);
	width: calc(var(--tm-ov-chev, 14px) + 24px); height: calc(var(--tm-ov-chev, 14px) + 10px); border: var(--tm-ov-chev-border, 1px) solid currentColor; border-radius: 999px; margin-right: 10px; }
.tobol-menu__mchev .tobol-menu__chev { width: var(--tm-ov-chev, 14px); height: auto; transform: rotate(0); }
.tobol-menu .tobol-menu__mitem.is-open > .tobol-menu__mrow > .tobol-menu__mchev { color: var(--tm-ov-hover, #69FFEB); }
.tobol-menu__mitem.is-open > .tobol-menu__mrow .tobol-menu__chev { animation: tm-rot-in var(--tm-acc-dur, 350ms) ease forwards; }
.tobol-menu__mitem.is-closing > .tobol-menu__mrow .tobol-menu__chev { animation: tm-rot-out var(--tm-acc-dur, 350ms) ease forwards; }
/* Akkordeon: grid-template-rows per Keyframe, keine Höhenmessung nötig */
.tobol-menu__msub { display: grid; grid-template-rows: 0fr; }
.tobol-menu__msub-inner { min-height: 0; overflow: hidden; }
.tobol-menu__mitem.is-open > .tobol-menu__msub { animation: tm-acc-open var(--tm-acc-dur, 350ms) ease forwards; }
.tobol-menu__mitem.is-closing > .tobol-menu__msub { animation: tm-acc-close var(--tm-acc-dur, 350ms) ease forwards; }
@keyframes tm-acc-open  { from { grid-template-rows: 0fr; } to { grid-template-rows: 1fr; } }
@keyframes tm-acc-close { from { grid-template-rows: 1fr; } to { grid-template-rows: 0fr; } }
.tobol-menu .tobol-menu__msublist { display: flex; flex-direction: column; gap: var(--tm-ov-sub-gap, 8px); padding: 10px 0 12px var(--tm-ov-sub-indent, 30px); }
.tobol-menu .tobol-menu__msublist--nested { padding: 6px 0 0 16px; }
.tobol-menu__mitem.is-open > .tobol-menu__msub .tobol-menu__msubitem { animation: tm-item-in calc(var(--tm-acc-dur, 350ms) * 1.2) cubic-bezier(.2,.7,.2,1) both; }
.tobol-menu .tobol-menu__msublink { display: inline-block; color: var(--tm-ov-sub-color, #FFF); text-decoration: none; font-weight: 600; font-size: 14px; line-height: 1.5; padding: 6px 0; overflow-wrap: anywhere; }
.tobol-menu .tobol-menu__msublink:hover, .tobol-menu__msubitem.is-active > .tobol-menu__msublink { color: var(--tm-ov-sub-hover, #69FFEB); }
.tobol-menu .tobol-menu__lang { display: flex; gap: 18px; margin-top: auto; padding: 28px 10px 0; font-size: 0.9rem; font-weight: 600; letter-spacing: 0.08em; }
.tobol-menu__lang a, .tobol-menu__lang span { color: var(--tm-ov-lang-color, rgba(255,255,255,0.7)); text-decoration: none; }
.tobol-menu__lang .is-current span { color: var(--tm-ov-lang-active, #FFF); }
.tobol-menu__lang a:hover { color: var(--tm-ov-lang-active, #FFF); }

/* ---------- Scroll-Lock ---------- */
html.tobol-menu-lock, html.tobol-menu-lock body { overflow: hidden !important; }

/* ---------- Breakpoints (Modifier-Klasse aus dem Widget) ---------- */
@media (max-width: 1024px) {
	.tobol-menu--bp-1024 .tobol-menu__row, .tobol-menu--bp-1024 .tobol-menu__panel { display: none !important; }
	.tobol-menu--bp-1024 .tobol-menu__bar .tobol-menu__burger { display: inline-flex; }
}
@media (min-width: 1025px) { .tobol-menu--bp-1024 .tobol-menu__overlay { display: none !important; } }
@media (max-width: 767px) {
	.tobol-menu--bp-767 .tobol-menu__row, .tobol-menu--bp-767 .tobol-menu__panel { display: none !important; }
	.tobol-menu--bp-767 .tobol-menu__bar .tobol-menu__burger { display: inline-flex; }
}
@media (min-width: 768px) { .tobol-menu--bp-767 .tobol-menu__overlay { display: none !important; } }

/* Bewegung reduzieren: nur wenn im Widget abgeschaltet */
@media (prefers-reduced-motion: reduce) {
	.tobol-menu--rm *, .tobol-menu--rm { animation-duration: 0.01ms !important; animation-delay: 0ms !important; }
}

/* ---------- Editor ---------- */
body.elementor-editor-active .tobol-menu__panel, body.elementor-editor-active .tobol-menu__overlay { z-index: 9; }
