/* === Header: fixed transparent über Hero === */
#main-header {
  position: fixed !important;
  top: 0;
  left: 0;
  right: 0;
  z-index: 99999;
  background-color: rgba(255,255,255,0) !important;
}

/* Body braucht Padding-Top weil Header fixed ist */
#page-container {
  padding-top: 0 !important;
}

/* Nav — Divi JS handles padding/height via body classes now */
#et-top-navigation {
  float: right;
  padding-left: 30px;
}

#top-menu {
  display: flex !important;
  list-style: none;
  margin: 0;
  padding: 0;
}

#top-menu > li {
  display: inline-block;
  padding-right: 22px;
}

#top-menu > li > a {
  font-size: 14px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #fff !important;
  text-decoration: none;
  transition: color 0.3s;
}

#top-menu > li:first-child > a {
  color: #e20006 !important;
}

#top-menu > li > a:hover {
  opacity: 0.7;
}

/* Logo: Divi JS handles position/visibility based on body classes.
   With et_hide_primary_logo + et_transparent_nav, Divi hides logo at top
   and shows it on scroll (et-fixed-header class). No manual override needed. */

/* Header wird weiss beim Scrollen (Divi fixed header) */
.et-fixed-header#main-header {
  background-color: rgba(255,255,255,0.95) !important;
  box-shadow: 0 1px 5px rgba(0,0,0,0.1);
}

.et-fixed-header #top-menu > li > a {
  color: #333 !important;
}

.et-fixed-header #top-menu > li:first-child > a {
  color: #e20006 !important;
}

/* === ANIMATIONEN: Divi-Waypoints aktivieren === */
/* NICHT mehr opacity:1 erzwingen — Divi JS soll animieren */
/* Nur Fallback für den Fall dass JS nicht lädt */
.et-waypoint.et_had_animation {
  opacity: 1;
}

/* Elemente die NOCH NICHT animiert wurden: kurz unsichtbar, dann Fade-In */
.et-waypoint:not(.et_had_animation):not(.et_pb_counters) {
  opacity: 0;
  animation: diviStaticFadeIn 0.6s ease forwards;
  animation-delay: 0.1s;
}

@keyframes diviStaticFadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Gestaffelte Delays für verschiedene Sections */
.et_pb_section:nth-child(2) .et-waypoint:not(.et_had_animation) { animation-delay: 0.2s; }
.et_pb_section:nth-child(3) .et-waypoint:not(.et_had_animation) { animation-delay: 0.3s; }
.et_pb_section:nth-child(4) .et-waypoint:not(.et_had_animation) { animation-delay: 0.4s; }
.et_pb_section:nth-child(5) .et-waypoint:not(.et_had_animation) { animation-delay: 0.5s; }
.et_pb_section:nth-child(6) .et-waypoint:not(.et_had_animation) { animation-delay: 0.6s; }
.et_pb_section:nth-child(7) .et-waypoint:not(.et_had_animation) { animation-delay: 0.7s; }

/* Mobile nav hamburger */
.mobile_menu_bar {
  display: none;
}

@media (max-width: 980px) {
  #et-top-navigation {
    display: none !important;
  }
  .mobile_menu_bar {
    display: block;
  }
  #logo {
    max-height: 60px;
  }
}
