/* === TOPBAR === */
.global-header-topbar {
  background: #000;
  color: #fff;
  font-size: 15px;
  padding: 0.3rem 0;
}
.global-header-topbar .gh-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
}
.global-header-topbar a {
  color: #fff;
  margin-left: 0rem;
  text-decoration: none;
}
.global-header-topbar a:hover { color: #d00000; }

/* === MAINBAR === */
.global-header-mainbar {
  position: relative; /* Bezug fürs Megamenü */
  background: #fff;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(221,221,221,0.6);
  z-index: 200;
}
.global-header-mainbar .gh-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.gh-logo img { max-height: 50px; }
.gh-phone   { padding-right: 15px; }

/* === NAVIGATION === */
.gh-mainnav {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 19px;
}
.gh-mainnav > a {
  font-weight: 500;
  color: #000;
  text-decoration: none;
  padding: 0.4rem 0.2rem;
}
.gh-mainnav > a:hover,
.gh-mainnav a.active,
.gh-mainnav a:focus,
.gh-mainnav a:active,
.gh-mainnav .current-menu-item > a,
.gh-mainnav .current_page_item > a,
.gh-mainnav .current_page_ancestor > a {
  color: #d00000 !important;
}

/* === MEGAMENÜ – Trigger === */
.gh-menu-item.has-mega > a {
  font-weight: 500;
  color: #000;
  text-decoration: none;
  padding: 0.4rem 0.2rem;
}
.gh-menu-item.has-mega > a::after {
  content: "▾";
  margin-left: 0.4em;
  font-size: 0.75em;
}

/* === MEGAMENÜ – Panel === */
.gh-megamenu {
  display: none;
  position: absolute;
  top: calc(100% - 6px); /* leichte Überlappung */
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 0;
  background: transparent;

  max-height: calc(100vh - 150px); /* macht Menü scrollbar */
  overflow-y: auto;
  overscroll-behavior: contain;
}
.gh-mega-inner {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: calc(1.5rem + 6px) 1rem 1.5rem;
  background: #fff;
  border: 1px solid #eee;
  box-shadow: 0 6px 20px rgba(0,0,0,.1);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}
.gh-mega-column h4 {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
  color: #444;
}
.gh-mega-column ul {
  list-style: circle;
  margin: 0;
  padding-left: 1.5rem;
}
.gh-mega-column li   { line-height: 1.5; }
.gh-mega-column a    { text-decoration: none; color: #000; font-size: 0.9rem; }
.gh-mega-column a:hover { color: #d00000; }

/* Bild + Überschrift als Blocklink */
.gh-mega-headlink {
  display: block;
  text-decoration: none;
  color: inherit;
  margin-bottom: 1rem;
}
.gh-mega-headlink h4 { margin: 0 0 0.5rem; font-size: 0.95rem; color: #000; }
.gh-mega-headlink:hover h4 { color: #d00000; }
.gh-mega-img {
  display: block;
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 10px;
  margin: 0.5rem 0 1rem;
}
.gh-mega-headlink.active h4 {
  color: #d00000; /* Active-Farbe z. B. Contelos-Blau */
}
/* === DESKTOP === */
@media (min-width: 769px) {
  .gh-menu-item.has-mega { position: static; }
  .global-header-mainbar.has-mega-open { border-bottom-color: transparent; }
}

/* === MINI-MEGAMENÜ (Topbar) === */
.gh-top-item.has-mini { position: relative; }
.gh-top-item.has-mini > a {
  color: #fff;
  font-weight: 500;
  text-decoration: none;
}

.gh-mini-megamenu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background: #fff;
  border: 1px solid #ddd;
  box-shadow: 0 6px 20px rgba(0,0,0,.15);
  padding: 1.5rem 0;
  z-index: 9999;
  min-width: 720px;
}
/* === Aktivierung per Klick === */
.gh-mini-megamenu.open {
  display: block;
}
.gh-mini-megamenu {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}
.gh-mini-megamenu.open {
  opacity: 1;
  visibility: visible;
}

.gh-mini-inner {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 2rem;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
.gh-mini-column h4 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  color: #333;
  transition: color 0.2s ease;
}
.gh-mini-column a:hover h4 { color: #d00000; }
.gh-mini-column ul {
  list-style: circle;


}
.gh-mini-column li { line-height: 1.6; }
.gh-mini-column a {
  text-decoration: none;
  color: #000;
  font-size: 0.9rem;
  white-space: nowrap;
}
.gh-mini-column a:hover { color: #d00000; }
.gh-mini-headlink {
  display: block;
  text-decoration: none;
  color: inherit;
  margin-bottom: 1rem;
}
.gh-mini-img {
  display: block;
  width: 100%;
  height: 100px;
  object-fit: cover;
  border-radius: 10px;
  margin: 0.5rem 0 1rem;
}

/* TeamViewer Icon inline */
.tv-icon {
  height: 1.5em;
  width: auto;
  vertical-align: middle;
  margin-right: 6px;
}
/* === Menü-Button (✕) === */
.menu-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  font-size: 2rem;
  color: gray;
  background: none !important;
  border: none !important;
  outline: none !important;
  padding: 0;
  line-height: 1;
  cursor: pointer;
  z-index: 300; /* Immer über Overlay */
  transition: transform 0.4s ease, color 0.3s ease;
}

.menu-toggle.open {
  transform: rotate(90deg);
  color: #000; /* beim Öffnen schwarz */
}

.menu-toggle:hover,
.menu-toggle:focus,
.menu-toggle:active {
  color: #000; /* beim Öffnen schwarz */
}

/* === Overlay Akkordeon-Menü === */
@media (max-width: 950px) {
  .menu-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    height: 0;
    background: rgba(255,255,255,0.97);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 0 1rem;
    opacity: 0;
    transition: height 0.4s ease, padding 0.3s ease, opacity 0.4s ease;
    z-index: 100;
  }

  .menu-overlay.open {
    height: 100vh;
    padding: 100px 1rem 2rem;
    opacity: 1;
  }

  .menu-accordion {
    width: 100%;
    display: flex;
    flex-direction: column;
  }

  .menu-item { width: 100%; }

  .menu-btn {
    width: 100%;
    text-align: left;
    padding: 0.6rem 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    background: none;
    border: none;
    border-bottom: 1px solid #ddd;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .menu-btn .arrow {
    transition: transform 0.3s ease;
    font-size: 0.9rem;
  }
  .menu-btn.active .arrow {
    transform: rotate(180deg);
  }

  .submenu {
    display: none;
    flex-direction: column;
    padding-left: 1rem;
  }

  .submenu a {
    padding: 0.4rem 0.5rem;
    font-size: 0.9rem;
    color: #333;
    text-decoration: none;
  }

  .submenu a:hover {
    color: #d00000;
  }

  .badge {
    color: #d00000;
    font-size: 0.75rem;
    margin-left: 0.3rem;
  }
}


/* Mobile sichtbar */
@media (max-width: 950px) {
  .gh-mainnav,
  .gh-menu-item.has-mega { display: none; }
  .menu-toggle { display: flex; }
}
@media (min-width: 951px) {
  .menu-toggle,
  .menu-overlay { display: none !important; }
}

.gh-top-right {
  display: flex;
  gap: 1rem;
  align-items: stretch;
  flex-wrap: nowrap;
}

.gh-top-item.has-mini {
  position: relative;
  display: flex;
  align-items: center;
}
.gh-mini-inner.is-2col {
  grid-template-columns: repeat(2, minmax(220px, 1fr));
}
/* Farben für Inhalte im Mini-Megamenü (Support) */
.gh-mini-megamenu,
.gh-mini-megamenu * {
  color: #000;
}
.gh-mini-megamenu a {
  color: #000;
  text-decoration: none;
}
.gh-mini-megamenu a:hover {
  color: #d00000;
}
.gh-mini-megamenu[aria-label="Support"],
.gh-mini-megamenu[aria-label="Support"] * {
  color: #000;
}
.gh-btn-red {
  display: inline-block;
  background: #d00000;
  color: #fff !important;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.3rem 0.7rem;
  border-radius: 6px;
  text-decoration: none;
  transition: background 0.2s ease, box-shadow 0.2s ease;
  margin-bottom: 10px;
}

.gh-btn-red:hover {
  background: #a90000;
  box-shadow: 0 3px 6px rgba(0,0,0,0.1);
  text-decoration: none;
}
.gh-support-headline p {
  line-height: 1.5;
}
.gh-support-headline h4 {
  font-size: 1.2rem;
  margin-bottom: 0.3rem;
  color: #000;
}
@media (min-width: 951px) {
  .gh-mainnav {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-start;
  }

  .gh-mainnav > a {
    display: inline-block;
    white-space: nowrap;
  }
}
.gh-megamenu {
  display: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
}

.gh-megamenu.open {
  display: block;
  opacity: 1;
  visibility: visible;
}

.gh-menu-item.has-mega > a.open {
  color: var(--primary-color); /* Oder gewünschte Hervorhebung */
}
/* === Globales Overlay für alle Megamenüs === */
.global-overlay,
#globalOverlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5); /* wie Modal */
  z-index: 100;               /* 🔽 niedriger als Menüs */
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .25s ease, visibility .25s ease;
}
.global-overlay.is-active,
#globalOverlay.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Menü-Z-Indizes */
.gh-megamenu       { z-index: 1000; }
.gh-mini-megamenu  { z-index: 1100; }