/*
 * HMi Megamenü — Desktop + Mobile Navigation (Phase 1 Redesign 2026-04-21)
 *
 * Struktur:
 *   [Root wrapper, sticky]
 *     [Utility-Bar (optional, klappt ein beim Scrollen)]
 *     [Header (Logo | Nav | Shop+CTA+Hamburger)]
 *     [Mega-Panels (absolute unter Header, full-width)]
 *   [Backdrop + Mobile-Overlay]
 *
 * Design-Tokens (--hmi-*) kommen aus dem Elements-Plugin; Fallback-Farben
 * hardcoded damit das Menü auch ohne Elements-Plugin nicht nackt aussieht.
 */

/* ============================================================================
   Root — sticky-Container für Utility-Bar + Header
   ============================================================================ */
.hmi-megamenu-root {
  position: sticky;
  top: 0;
  z-index: 100;
  font-family: 'Ubuntu', sans-serif;
}

/* ============================================================================
   Utility-Bar (dark-teal, klappt beim Scrollen ein)
   ============================================================================ */
.hmi-utility-bar {
  background-color: var(--hmi-teal-900, #002528);
  color: rgba(255, 255, 255, 0.7);
  font-size: 12px;
  line-height: 1.2;
  overflow: hidden;
  max-height: 40px;
  transition: max-height 0.3s ease, padding 0.3s ease, opacity 0.2s ease;
}
.hmi-utility-bar.is-collapsed {
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  opacity: 0;
}
.hmi-utility-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0.5rem 1.25rem;
}
.hmi-utility-bar-left,
.hmi-utility-bar-right {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.hmi-utility-bar-link {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  color: inherit;
  text-decoration: none;
  transition: color 0.15s ease;
}
.hmi-utility-bar-link:hover {
  color: #ffffff;
}
.hmi-utility-bar-social {
  color: rgba(255, 255, 255, 0.5);
  transition: color 0.15s ease;
  display: inline-flex;
  align-items: center;
}
.hmi-utility-bar-social:hover {
  color: #ffffff;
}
@media (max-width: 767px) {
  .hmi-utility-bar-inner { gap: 0.5rem; font-size: 11px; }
  .hmi-utility-bar-left { display: none; }
  .hmi-utility-bar-right { margin-left: auto; }
}

/* ============================================================================
   Header (Logo | Nav | CTA+Shop+Hamburger) — Glass-Look: halbtransparent +
   Backdrop-Blur, damit der Content darunter leicht durchscheint. Fallback für
   Browser ohne backdrop-filter: solid-weiß (siehe @supports unten).
   ============================================================================ */
.hmi-megamenu-header {
  background-color: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  border-bottom: 1px solid rgba(229, 231, 235, 0.6);
  transition: background-color 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.hmi-megamenu-root.is-scrolled .hmi-megamenu-header {
  background-color: rgba(255, 255, 255, 0.88);
  box-shadow: 0 4px 16px -4px rgba(0, 0, 0, 0.08);
  border-bottom-color: rgba(229, 231, 235, 0.4);
}
/* Fallback: Browser ohne backdrop-filter sehen einen soliden weißen Header. */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .hmi-megamenu-header { background-color: #ffffff; }
  .hmi-megamenu-root.is-scrolled .hmi-megamenu-header { background-color: #ffffff; }
}

.hmi-megamenu-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.25rem;
  height: 72px;
}

/* ============================================================================
   Logo
   ============================================================================ */
.hmi-megamenu-logo {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: var(--hmi-ink, #0b1a1d);
}
.hmi-megamenu-logo img {
  display: block;
  height: 36px;
  width: auto;
  max-width: 180px;
}
.hmi-megamenu-logo-text {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* ============================================================================
   Desktop-Nav (Top-Level-Buttons, mittig)
   ============================================================================ */
.hmi-megamenu-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
  flex: 1 1 auto;
  justify-content: center;
}
@media (max-width: 1023px) {
  .hmi-megamenu-nav { display: none; }
}

.hmi-megamenu-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 0;
  background: transparent;
  border: 0;
  color: var(--hmi-ink, #0b1a1d);
  font-size: 16px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  position: relative;
  transition: color 0.2s ease;
}
.hmi-megamenu-btn::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  background-color: var(--hmi-teal-500, #007078);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.2s ease;
}
.hmi-megamenu-btn:hover,
.hmi-megamenu-btn[aria-expanded="true"] {
  color: var(--hmi-teal-500, #007078);
}
.hmi-megamenu-btn[aria-expanded="true"]::after,
.hmi-megamenu-btn.is-active-parent::after {
  transform: scaleX(1);
}
.hmi-megamenu-btn-arrow {
  transition: transform 0.2s ease;
}
.hmi-megamenu-btn[aria-expanded="true"] .hmi-megamenu-btn-arrow {
  transform: rotate(180deg);
}

/* ============================================================================
   Right Side (Shop, CTA, Hamburger)
   ============================================================================ */
.hmi-megamenu-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.hmi-megamenu-shop {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 9999px;
  border: 1px solid rgba(229, 231, 235, 0.8);
  color: var(--hmi-ink-light, #4a5568);
  transition: color 0.2s ease, border-color 0.2s ease;
}
.hmi-megamenu-shop:hover,
.hmi-megamenu-shop:focus-visible {
  color: var(--hmi-teal-500, #007078);
  border-color: var(--hmi-teal-500, #007078);
  outline: none;
}
@media (max-width: 1023px) {
  .hmi-megamenu-shop { display: none; }
}

/* Trigger-Variante — nutzt <button> statt <a>, Default-Button-Styling zurücksetzen. */
.hmi-megamenu-shop-trigger {
  position: relative;
  background: transparent;
  cursor: pointer;
  padding: 0;
  font: inherit;
}
.hmi-megamenu-shop-trigger[aria-expanded="true"] {
  color: var(--hmi-teal-500, #007078);
  border-color: var(--hmi-teal-500, #007078);
}

/* Cart-Badge — violetter Kreis oben rechts am Icon (WC-Fragments-updateable). */
.hmi-cart-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 9999px;
  background-color: var(--hmi-violet-500, #4C3E80);
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  box-sizing: border-box;
  pointer-events: none;
}
.hmi-cart-badge[hidden] {
  display: none !important;
}

.hmi-megamenu-cta {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  padding: 0.625rem 1.25rem;
  background-color: var(--hmi-violet-500, #4C3E80);
  color: #ffffff !important;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none !important;
  border-radius: 10px;
  box-shadow: 0 8px 20px -8px rgba(76, 62, 128, 0.4);
  transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease;
  white-space: nowrap;
}
.hmi-megamenu-cta:hover {
  background-color: var(--hmi-violet-600, #3f3369);
  box-shadow: 0 12px 24px -8px rgba(76, 62, 128, 0.5);
}
/* Shimmer-Effekt: ::before-Schicht als diagonaler Highlight-Streifen, startet
   links außerhalb. JS togglet periodisch die Klasse `is-shining`, wodurch der
   Streifen per Transition nach rechts durch den Button gleitet. Bewusst dezent
   (B2B High-Ticket): niedrige Opacity, schmaler Streifen, weicher ease-in-out,
   langsam. Bei prefers-reduced-motion deaktiviert. */
.hmi-megamenu-cta::before {
  content: '';
  position: absolute;
  top: 0;
  left: -80%;
  width: 40%;
  height: 100%;
  background: linear-gradient(
    120deg,
    transparent 0%,
    rgba(255, 255, 255, 0) 35%,
    rgba(255, 255, 255, 0.10) 50%,
    rgba(255, 255, 255, 0) 65%,
    transparent 100%
  );
  pointer-events: none;
}
.hmi-megamenu-cta.is-shining::before {
  left: 140%;
  transition: left 1.4s ease-in-out;
}
@media (prefers-reduced-motion: reduce) {
  .hmi-megamenu-cta::before { display: none; }
}
@media (max-width: 1023px) {
  .hmi-megamenu-cta { display: none; }
}

/* Hamburger — nur mobile */
.hmi-megamenu-hamburger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: transparent;
  border: 0;
  cursor: pointer;
  gap: 5px;
  flex-direction: column;
  padding: 0;
}
@media (max-width: 1023px) {
  .hmi-megamenu-hamburger { display: flex; }
}
.hmi-megamenu-hamburger-bar {
  display: block;
  width: 22px;
  height: 2px;
  background-color: var(--hmi-ink, #0b1a1d);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.hmi-megamenu-hamburger[aria-expanded="true"] .hmi-megamenu-hamburger-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hmi-megamenu-hamburger[aria-expanded="true"] .hmi-megamenu-hamburger-bar:nth-child(2) { opacity: 0; }
.hmi-megamenu-hamburger[aria-expanded="true"] .hmi-megamenu-hamburger-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================================
   Mega-Panels (Desktop Dropdowns, absolute unter Header)
   ============================================================================ */
.hmi-megamenu-panels-wrap {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  pointer-events: none;
}
@media (max-width: 1023px) {
  .hmi-megamenu-panels-wrap { display: none; }
}

.hmi-megamenu-panel {
  position: absolute;
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  /* Breite bündig mit Header-Inner (max-width: 1280px), damit das Panel
     visuell mit Logo links und CTA-Button-Ende rechts abschließt. */
  width: min(1280px, calc(100vw - 2rem));
  max-width: 100%;
  margin-top: 0.5rem;
  background: #ffffff;
  border: 1px solid rgba(229, 231, 235, 0.8);
  border-radius: 16px;
  box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.12), 0 8px 16px -8px rgba(0, 0, 0, 0.08);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, transform 0.25s ease, visibility 0s linear 0.2s;
  pointer-events: none;
}
.hmi-megamenu-panel.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
  transition: opacity 0.2s ease, transform 0.25s ease, visibility 0s linear 0s;
}
.hmi-megamenu-panel[hidden] { display: block !important; }

.hmi-megamenu-panel-inner {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 2rem;
  padding: 2rem;
}
@media (max-width: 1100px) {
  .hmi-megamenu-panel-inner { grid-template-columns: 1fr; padding: 1.5rem; }
}

.hmi-megamenu-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.5rem 2rem;
}

.hmi-megamenu-col-head {
  margin: 0 0 0.75rem;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--hmi-ink-light, #4a5568); /* dunkelgrau statt teal für dezente Kategorie-Labels */
}
.hmi-megamenu-col-head a { color: inherit; text-decoration: none; }
.hmi-megamenu-col-head a:hover { text-decoration: underline; }
.hmi-megamenu-col-head a.is-current { color: var(--hmi-teal-500, #007078); font-weight: 800; }

.hmi-megamenu-col-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* Micro-Copy-Link: Haupttitel + optionale Description-Zeile.
   Description kommt aus dem WP-Menüpunkt (Design → Menüs → "Beschreibung"
   über Screen Options aktivieren). Nur Desktop — Mobile-Accordion ignoriert
   das Feld. */
.hmi-megamenu-col-link {
  display: block;
  padding: 0.125rem 0;
  text-decoration: none;
  color: inherit;
}
.hmi-megamenu-col-link-title {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 15px;
  font-weight: 500;
  color: var(--hmi-ink, #0b1a1d);
  transition: color 0.15s ease;
}

/* Inline-Badge hinter dem Menü-Titel. Kleine Pille mit sanftem Tint — nicht
   reißerisch, passend zum High-Ticket-B2B-Kontext. Farbe pro Variante. */
.hmi-megamenu-col-link-badge {
  display: inline-flex;
  align-items: center;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.15rem 0.45rem;
  border-radius: 9999px;
  line-height: 1.2;
  white-space: nowrap;
}
.hmi-megamenu-col-link-badge-violet {
  background-color: rgba(76, 62, 128, 0.10);
  color: var(--hmi-violet-500, #4C3E80);
}
.hmi-megamenu-col-link-badge-teal {
  background-color: rgba(0, 112, 120, 0.10);
  color: var(--hmi-teal-600, #005a60);
}
.hmi-megamenu-col-link-badge-amber {
  background-color: rgba(245, 158, 11, 0.12);
  color: #b45309;
}
.hmi-megamenu-col-link-badge-ink {
  background-color: rgba(15, 19, 31, 0.08);
  color: var(--hmi-ink, #0b1a1d);
}
.hmi-megamenu-col-link-desc {
  display: block;
  margin-top: 0.125rem;
  font-size: 13px;
  line-height: 1.4;
  color: var(--hmi-ink-light, #4a5568);
}
.hmi-megamenu-col-link:hover .hmi-megamenu-col-link-title,
.hmi-megamenu-col-link:focus-visible .hmi-megamenu-col-link-title {
  color: var(--hmi-teal-500, #007078);
}
.hmi-megamenu-col-link.is-current .hmi-megamenu-col-link-title {
  color: var(--hmi-teal-500, #007078);
  font-weight: 600;
}

/* ============================================================================
   Highlight-Card rechts im Mega-Panel
   ----------------------------------------------------------------------------
   Zwei Typen (content/contact) mit gemeinsamer Basis. BG-Modifier steuern den
   Hintergrund. Inhalt wird vom Modul gerendert (render_highlight), das Markup
   ist hier nur zu stylen.
   ============================================================================ */
.hmi-megamenu-highlight {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.25rem;
  border: 1px solid rgba(0, 112, 120, 0.10);
  border-radius: 12px;
  color: inherit;
}

/* Hintergrund-Varianten (Speicher-Slug als BEM-Modifier). */
.hmi-highlight-bg-sand-100 {
  background-color: var(--hmi-sand-100, #f7f2ea);
}
.hmi-highlight-bg-sand-50 {
  background-color: var(--hmi-sand-50, #FDFCFA);
  border-color: rgba(0, 0, 0, 0.06);
}
.hmi-highlight-bg-cool-50 {
  background-color: var(--hmi-cool-50, #F5F5F8);
  border-color: rgba(0, 0, 0, 0.06);
}
.hmi-highlight-bg-white {
  background-color: #ffffff;
  border-color: rgba(0, 0, 0, 0.08);
}
.hmi-highlight-bg-teal-gradient {
  background: linear-gradient(135deg, rgba(0, 112, 120, 0.05) 0%, rgba(0, 112, 120, 0.10) 100%);
}
.hmi-highlight-bg-violet-gradient {
  background: linear-gradient(135deg, rgba(76, 62, 128, 0.05) 0%, rgba(76, 62, 128, 0.10) 100%);
  border-color: rgba(76, 62, 128, 0.15);
}

/* Badge (nur Content-Typ, vom Modul bei Contact-Typ nicht gerendert). */
.hmi-highlight-badge {
  display: inline-flex;
  align-self: flex-start;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.2rem 0.55rem;
  border-radius: 9999px;
  line-height: 1.2;
  margin-bottom: 0.15rem;
}
.hmi-highlight-badge-violet {
  background-color: rgba(76, 62, 128, 0.10);
  color: var(--hmi-violet-500, #4C3E80);
}
.hmi-highlight-badge-teal {
  background-color: rgba(0, 112, 120, 0.10);
  color: var(--hmi-teal-600, #005a60);
}
.hmi-highlight-badge-amber {
  background-color: rgba(245, 158, 11, 0.12);
  color: #b45309;
}
.hmi-highlight-badge-ink {
  background-color: rgba(15, 19, 31, 0.08);
  color: var(--hmi-ink, #0b1a1d);
}

/* Optionales Bild (Content-Typ). */
.hmi-highlight-image {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background-color: rgba(0, 112, 120, 0.08);
  background-size: cover;
  background-position: center;
  border-radius: 8px;
  margin-bottom: 0.25rem;
}

/* Titel. */
.hmi-highlight-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--hmi-ink, #0b1a1d);
  line-height: 1.3;
  margin: 0;
}

/* Paragraphen aus Textarea-Parser. */
.hmi-highlight-paragraph {
  font-size: 13px;
  line-height: 1.5;
  color: var(--hmi-ink-light, #4a5568);
  margin: 0;
}

/* Bullet-Liste mit Check-Symbol. */
.hmi-highlight-bullets {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}
.hmi-highlight-bullets li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 13px;
  line-height: 1.45;
  color: var(--hmi-ink-light, #4a5568);
}
.hmi-highlight-bullet-icon {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  margin-top: 0.15rem;
  color: var(--hmi-violet-500, #4C3E80);
}

/* Contact-Slots. Struktureller Aufbau: Icon + Text/Link in einer Zeile. */
.hmi-highlight-contact-slots {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}
.hmi-highlight-contact-slot {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 13px;
  line-height: 1.4;
  color: var(--hmi-ink-light, #4a5568);
}
.hmi-highlight-contact-icon {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  margin-top: 0.15rem;
  color: var(--hmi-teal-500, #007078);
}
.hmi-highlight-contact-icon svg {
  width: 100%;
  height: 100%;
}
.hmi-highlight-contact-text {
  flex: 1 1 auto;
  min-width: 0;
  color: inherit;
  text-decoration: none;
  transition: color 0.15s ease;
}
a.hmi-highlight-contact-text:hover,
a.hmi-highlight-contact-text:focus-visible {
  color: var(--hmi-teal-500, #007078);
  outline: none;
}

/* CTA-Button unten im Highlight (beide Typen). */
.hmi-highlight-cta {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 0.375rem;
  margin-top: 0.5rem;
  padding: 0.5rem 1rem;
  background-color: var(--hmi-violet-500, #4C3E80);
  color: #ffffff !important;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none !important;
  border-radius: 8px;
  transition: background-color 0.2s ease, transform 0.15s ease;
}
.hmi-highlight-cta svg {
  width: 14px;
  height: 14px;
  transition: transform 0.15s ease;
}
.hmi-highlight-cta:hover,
.hmi-highlight-cta:focus-visible {
  background-color: var(--hmi-violet-600, #3f3369);
  outline: none;
}
.hmi-highlight-cta:hover svg {
  transform: translateX(2px);
}

/* Teal-Gradient-Variante nutzt Teal-CTA für optische Kohärenz. */
.hmi-highlight-bg-teal-gradient .hmi-highlight-cta {
  background-color: var(--hmi-teal-500, #007078);
}
.hmi-highlight-bg-teal-gradient .hmi-highlight-cta:hover,
.hmi-highlight-bg-teal-gradient .hmi-highlight-cta:focus-visible {
  background-color: var(--hmi-teal-600, #005a60);
}
.hmi-highlight-bg-teal-gradient .hmi-highlight-bullet-icon {
  color: var(--hmi-teal-500, #007078);
}

/* ============================================================================
   Backdrop (dunkler Layer hinter Panel)
   ============================================================================ */
.hmi-megamenu-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(11, 26, 29, 0.4);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  z-index: 50;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0s linear 0.2s;
  pointer-events: none;
}
.hmi-megamenu-backdrop.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 0.2s ease, visibility 0s linear 0s;
}

/* ============================================================================
   Mobile Overlay (Slide-in von rechts)
   ============================================================================ */
.hmi-megamenu-mobile-overlay {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  background: #ffffff;
  z-index: 110;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.hmi-megamenu-mobile-overlay.is-open { transform: translateX(0); }
.hmi-megamenu-mobile-overlay[hidden] { display: flex !important; }
@media (prefers-reduced-motion: reduce) {
  .hmi-megamenu-mobile-overlay { transition: none; }
}

.hmi-megamenu-mobile-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(229, 231, 235, 0.8);
  position: sticky;
  top: 0;
  background: #ffffff;
  z-index: 1;
}
.hmi-megamenu-mobile-title {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--hmi-ink-light, #4a5568);
}
.hmi-megamenu-mobile-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: transparent;
  border: 0;
  color: var(--hmi-ink, #0b1a1d);
  cursor: pointer;
  border-radius: 8px;
  transition: background-color 0.15s ease;
}
.hmi-megamenu-mobile-close:hover { background-color: rgba(0, 0, 0, 0.05); }

.hmi-megamenu-mobile-nav {
  flex: 1 1 auto;
  padding: 1rem 1.5rem 2rem;
}

.hmi-megamenu-mobile-section + .hmi-megamenu-mobile-section {
  border-top: 1px solid rgba(229, 231, 235, 0.8);
}
/* Accordion-Toggle-Button für jeden Bucket im mobilen Menü.
   Button-Reset, volle Breite, Chevron rotiert bei expanded. */
.hmi-megamenu-mobile-section-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 1rem 0;
  background: transparent;
  border: 0;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  color: var(--hmi-ink, #0b1a1d);
}
.hmi-megamenu-mobile-section-toggle:hover,
.hmi-megamenu-mobile-section-toggle:focus-visible {
  color: var(--hmi-teal-500, #007078);
  outline: none;
}
.hmi-megamenu-mobile-section-head {
  display: inline-block;
  font-size: 16px;
  font-weight: 600;
  color: inherit;
}
.hmi-megamenu-mobile-section-chevron {
  flex-shrink: 0;
  color: var(--hmi-ink-light, #4a5568);
  transition: transform 0.25s ease;
}
.hmi-megamenu-mobile-section-toggle[aria-expanded="true"] .hmi-megamenu-mobile-section-chevron {
  transform: rotate(180deg);
  color: var(--hmi-teal-500, #007078);
}

/* Body jedes Accordion-Buckets: smooth max-height-Animation.
   hidden-Attribut verbirgt initial; JS togglet es + setzt is-open für Transition. */
.hmi-megamenu-mobile-section-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  padding: 0 0 0 0.25rem;
}
.hmi-megamenu-mobile-section-body[hidden] {
  display: block !important;
}
.hmi-megamenu-mobile-section-body.is-open {
  max-height: 60rem; /* großzügig für viele Einträge */
  padding-bottom: 1rem;
}
@media (prefers-reduced-motion: reduce) {
  .hmi-megamenu-mobile-section-chevron,
  .hmi-megamenu-mobile-section-body { transition: none; }
}
.hmi-megamenu-mobile-cat {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 16px;
  font-weight: 600;
  color: var(--hmi-ink, #0b1a1d);
  text-decoration: none;
}
.hmi-megamenu-mobile-cat:hover { color: var(--hmi-teal-500, #007078); }
.hmi-megamenu-mobile-links {
  list-style: none;
  margin: 0 0 0.75rem 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}
.hmi-megamenu-mobile-links a {
  display: block;
  padding: 0.375rem 0;
  font-size: 14px;
  color: var(--hmi-ink-light, #4a5568);
  text-decoration: none;
}
.hmi-megamenu-mobile-links a:hover { color: var(--hmi-teal-500, #007078); }

.hmi-megamenu-mobile-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 1.5rem;
  padding: 0.875rem 1.25rem;
  background-color: var(--hmi-violet-500, #4C3E80);
  color: #ffffff !important;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none !important;
  border-radius: 10px;
  box-shadow: 0 8px 20px -8px rgba(76, 62, 128, 0.4);
}
.hmi-megamenu-mobile-cta:hover { background-color: var(--hmi-violet-600, #3f3369); }

body.hmi-megamenu-mobile-locked { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  .hmi-utility-bar,
  .hmi-megamenu-header,
  .hmi-megamenu-btn,
  .hmi-megamenu-btn::after,
  .hmi-megamenu-btn-arrow,
  .hmi-megamenu-panel,
  .hmi-megamenu-backdrop,
  .hmi-megamenu-mobile-overlay,
  .hmi-megamenu-mobile-close,
  .hmi-megamenu-hamburger-bar,
  .hmi-megamenu-cta { transition: none; }
}
