/* assets/css/header.css */

/* HEADER */
.site-header {
  position: fixed;
  top: 20px; /* 20px Steg darüber */
  left: 0;
  right: 0;
  height: 65px; /* Header-Höhe auf 55px */
  background-color: transparent; /* Weiß mit 100% Deckkraft */
  z-index: 1000; /* Stellt sicher, dass er über den Boxen liegt */

}

.header-inner {
  max-width: 1496px; /* Maximale Breite des Inhalts */
  height: 100%;    /* Nimmt volle Höhe des Headers ein */
  margin: 0 auto;  /* Zentriert den Inhalt */
  padding: 0 27px 0px 20px; /* Seitenabstand im Header angepasst */
  display: flex;   /* Flexbox für Ausrichtung */
  align-items: center; /* Vertikal zentrieren */
  width: 100%;
  justify-content: space-between; /* Haupt-Elemente verteilen */
  box-sizing: border-box;
}

.header-content {
  display: flex;
  justify-content: space-between; /* Elemente verteilen */
  align-items: center;           /* Vertikal zentrieren */
  width: 100%;
  height: 100%; /* Volle Header-Höhe, damit Logo-Backing lückenlos anschließt */
}

/* Header Left: Logo + Creovate */
.header-left {
  display: flex;
  align-items: center;
  padding: 0;
  flex-shrink: 0;
  position: relative;
  align-self: stretch;
  margin-left: -2px;
}

/* Steg: 20px volle Breite über dem Header */
.header-left::before {
  content: "";
  position: absolute;
  top: -20px;
  left: -200vw;
  width: 500vw;
  height: 20px;
  background: var(--page-bg, #fff);
  pointer-events: none;
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  height: 100%;
  background: var(--page-bg, #fff);
  border-radius: 0 0 30px 0;
  padding-right: 0;
}

/* Konkave SVG-Kurven als organische Übergänge */
.logo-backing-curve {
  position: absolute;
  width: 30px;
  height: 30px;
  display: block;
  transform: scale(1.01);
  pointer-events: none;
}
.logo-backing-curve path {
  fill: var(--page-bg, #fff);
}
/* Erste SVG (vor <a>): unten-links */
.header-left > svg.logo-backing-curve:first-of-type {
  top: 100%;
  left: 0;
}
/* Letzte SVG (nach </a>): oben-rechts */
.header-left > svg.logo-backing-curve:last-of-type {
  top: 0;
  left: 100%;
  transform: scale(1.01);
}
.logo svg {
  /* transform: translateX(-9px); Entfernt, Feinabstimmung nach Bedarf */
  height: 50px;
  width: auto;
  padding: 0;
  margin: 10px 0 0 5px;
  fill: #000000;
  transition: fill 0.3s;
}
.logo:hover svg path,
.logo:hover svg circle {
  fill: #444444;
}
.logo-text {
  font-size: 3.0em; /* Leicht angepasst */
  font-weight: 500; /* Medium */
  color: #000000;
  transition: color 0.3s;
  margin-top: 0px;
  line-height: 1; /* Verhindert extra Höhe */
}
.logo:hover .logo-text {
  color: #444444;
}

/* Header Middle: Navigation-Chip (Desktop) / Menübutton (Mobile) */
.header-middle {
  flex-grow: 1; /* Nimmt verfügbaren Platz, zentriert Inhalt */
  display: flex;
  justify-content: center; /* Zentriert die Navi oder den Button */
  align-items: center;
}
.nav-chip {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.6);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  padding: 0 25px;    /* Mehr Padding */
  height: 50px;       /* Höhe leicht angepasst */
  border-radius: 30px;
  font-size: 0.98em;
  box-shadow: 0 0 15px rgba(0,0,0,.1); /* NEU: Leichter Schatten */
}
.nav-chip a {
  text-decoration: none;
  color: #222;
  margin: 0 12px; /* Abstand zwischen Links */
  font-weight: 400; /* Standard */
  transition: color 0.2s ease;
}
.nav-chip a:hover {
  color: #215142; /* Akzentfarbe bei Hover */
}
.nav-chip ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: inline-flex;
  align-items: center;
}
.nav-chip li {
  margin: 0;
  padding: 0;
  position: relative;
  /* stretch li to full nav-chip height so top:100% == nav-chip bottom */
  align-self: stretch;
  display: flex;
  align-items: center;
}

/* Bridge: invisible pseudo-element covers the gap so li:hover stays active
   while the mouse travels from the nav-chip to the dropdown */
.nav-chip > ul > li.menu-item-has-children::after {
  content: '';
  position: absolute;
  top: 100%;
  left: -10px;
  right: -10px;
  height: 14px; /* matches gap below */
}

/* ---- Dropdown Sub-Menü (Desktop) ---- */
.nav-chip ul.sub-menu {
  display: block; /* override inline-flex from .nav-chip ul */
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  position: absolute;
  top: calc(100% + 15px);
  left: 50%;
  transform: translateX(-50%);
  background: #ffffff;
  border-radius: 15px;
  border: 1px solid rgba(42, 44, 45, 0.25);
  padding: 10px;
  min-width: 170px;
  list-style: none;
  margin: 0;
  z-index: 1100;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.10);
  transition: opacity 0.2s ease, visibility 0.2s ease;
  transition-delay: 0.35s;
}

.nav-chip li:hover > ul.sub-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition-delay: 0s;
}

.nav-chip ul.sub-menu li {
  margin: 0;
  padding: 0;
  position: static;
}

.nav-chip ul.sub-menu li a {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 8px 10px;
  margin: 0;
  color: #333;
  font-weight: 300;
  border-radius: 10px;
  white-space: nowrap;
  border: none;
  transition: background-color 0.15s ease;
}

.nav-chip ul.sub-menu li a:hover {
  background-color: rgba(217, 219, 77, 0.50);
  color: #222;
}

.nav-chip ul.sub-menu li.current-menu-item > a {
  font-weight: 700;
}

/* ---- Chevron-Icon ---- */
.nav-chevron {
  display: inline-block;
  vertical-align: middle;
  margin-left: 4px;
  flex-shrink: 0;
  width: 15px;
  height: 15px;
}
.menu-btn {
  display: none;
  background: #d9db65; /* grüner Hintergrund für Button */
  border: none;
  cursor: pointer;
  padding: 0; /* Padding entfernen, da feste Größe */
  width: 70px;  /* Kleinere quadratische Größe */
  height: 38px;
  border-radius: 30px; /* Rund */
  align-items: center;
  justify-content: center;
  /* margin-top: -15px; */ /* Entfernt */
  transition: background-color 0.2s ease;
}
.menu-btn:hover {
    background-color: #c8ca5a; /* Etwas dunkler bei Hover */
}
.menu-btn .hamburger-icon {
  width: 20px; /* Kleinere Icons */
  height: 20px;
  fill: #333; /* Dunklere Farbe */
}

/* Header Right: Social Icons-Chip */
.header-right {
  display: flex;
  align-items: center;
  flex-shrink: 0; /* Verhindert Schrumpfen */
}
.social-icons {
  display: inline-flex;
  align-items: center;
  padding: 0 12px; /* Weniger Padding */
  height: 34px;
  border-radius: 30px;
  gap: 15px; /* Abstand zwischen Icons */
  border: 2px solid #444444;
  background: rgba(255, 255, 255, 0.6);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.social-icons svg {
  width: 24px; /* Kleinere Icons */
  height:24px;
  fill: #000; /* Etwas helleres Grau */
  vertical-align: middle;
  transition: fill 0.2s ease;
}
.social-icons a:hover svg {
  fill: #444444; /* Akzentfarbe bei Hover */
}
.social-icons a {
  line-height: 0; /* Verhindert extra Höhe durch Link */
}

/* Mobile-Navigation-Overlay */
.mobile-nav-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #d9db65;
  z-index: 1500;
  padding: 20px;
  padding-top: 70px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease-in-out, display 0.3s allow-discrete;
  box-sizing: border-box;
}
.mobile-nav-overlay.is-active {
  display: block;
  opacity: 1;
  pointer-events: auto;
}
@starting-style {
  .mobile-nav-overlay.is-active {
    opacity: 0;
  }
}
.mobile-nav-overlay .nav-list {
  list-style: none;
  padding: 0; /* Kein Padding */
  margin: 0;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center; /* Vertikal zentrieren */
  height: calc(100% - 50px); /* Höhe abzüglich Padding oben/unten */
}
.mobile-nav-overlay .nav-list li {
  margin: 15px 0; /* Vertikaler Abstand */
}
.mobile-nav-overlay .nav-list li a {
  color: rgba(255, 255, 255, 0.95); /* Helle Schrift */
  font-size: 1.8em; /* Größere Schrift */
  font-weight: 300; /* Medium */
  text-decoration: none;
  padding: 10px;
  display: block;
}
.mobile-nav-overlay .nav-list li a:hover {
   color: #ffffff; /* Akzentfarbe */
}

/* ---- Mobile Overlay: Sub-Menü ---- */
.mobile-nav-overlay ul.sub-menu {
  display: none;
  list-style: none;
  padding: 0;
  margin: 4px 0 8px;
}

.mobile-nav-overlay ul.sub-menu.is-open {
  display: block;
}

.mobile-nav-overlay ul.sub-menu li {
  margin: 4px 0;
}

.mobile-nav-overlay ul.sub-menu li a {
  font-size: 1.2em;
  padding: 6px 10px;
  opacity: 0.80;
}

.mobile-nav-overlay ul.sub-menu li a:hover {
  opacity: 1;
}

.mobile-nav-overlay .menu-item-has-children.has-open-submenu > a .nav-chevron {
  transform: rotate(180deg);
}

/* Close Button im Overlay */
.mobile-nav-close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  background-color: rgba(0, 0, 0, 0.3);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  cursor: pointer;
  transition: background-color 0.2s ease;
}
.mobile-nav-close-btn:hover { 
  background-color: rgba(0, 0, 0, 0.5); 
}
.mobile-nav-close-btn svg {
  width: 24px;
  height: 24px;
  fill: #ffffff;
}


/* Dynamic nav breakpoint (toggled by JS) */
.nav-collapsed .header-middle .nav-chip {
  display: none;
}
.nav-collapsed .menu-btn {
  display: flex;
}

/* Responsive */
@media (max-width: 768px) {
  .header-inner {
      padding: 0 10px; /* Weniger Padding auf Mobile */
  }
 .social-icons {
   display:flex;
  }
  .logo svg { height: 40px; margin-top: 0; } /* Logo ggf. kleiner */
  .logo-text { font-size: 1.6em; }
}