/* ===== Top Header (sticky, glassy, hide-on-scroll, ratio via --hide-ratio) ===== */
top-header {
  /* Layout */
  display: flex;
  justify-content: space-between;
  align-items: center;

  /* Visual */
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  padding: 1rem;
  border-radius: 16px;
  box-shadow: 0 4px 30px rgba(0,0,0,0.1);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  border: 1px solid rgba(255, 255, 255, 1);

  /* Positioning */
  position: sticky;
  top: 1rem;
  z-index: 1000;
  width: 90%;
  margin: 0 auto;

  /* Animation / Variablen */
  --topbar-height: 64px;   /* Fallback, wird per JS korrekt gesetzt */
  --hide-ratio: 0.666;     /* Desktop/Tablet: 2/3 */
  transition: transform .35s ease;
  will-change: transform;
}

/* Versteckt sich um (ratio * Höhe) nach oben */
top-header.is-hidden-2-3 {
  transform: translateY(calc(-1 * var(--hide-ratio) * var(--topbar-height)));
}

.logo-container { display: flex; align-items: center; }

.logo-text h1 {
  margin: 0;
  font-size: 1.5rem;
}

/* --- Menü --- */
.menu {
  display: none; /* Standard: zu */
  flex-direction: column;
  gap: 0.5rem;
  background-color: #34495e;
  position: absolute;
  top: calc(100% + 8px);
  right: 10px;
  padding: 1rem;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}
.menu.active { display: flex; }

.menu a {
  color: #fff;
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 5px;
  text-align: center;
  background-color: #2c3e50;
}
.menu a:hover { background-color: #1abc9c; }

.menu-toggle {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
}
.menu-toggle:focus { outline: none; }

/* Hauptabschnitte (Seitenstil – falls genutzt) */
section {
  padding: 2rem;
  max-width: 800px;
  margin: 0 auto;
  background-color: #fff;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  margin-top: 2rem;
}

h2 { color: #2c3e50; }

/* Footer (Seitenstil) */
footer {
  text-align: center;
  background-color: #2c3e50;
  color: #fff;
  padding: 1rem 0;
  margin-top: 2rem;
  width: 95%;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
  margin: 0 auto;
}
footer p { margin: 0; }

/* ===== Desktop-Layout ===== */
@media (min-width: 768px) {
  header { flex-wrap: nowrap; }

  .menu {
    display: flex;
    flex-direction: row;
    position: static;
    background: none;
    padding: 0;
    box-shadow: none;
  }
  .menu a { background: none; padding: 0.5rem 1rem; }

  .menu-toggle { display: none; }

  .logo { height: 50px; width: auto; margin-right: 1rem; }
  .logo-text p { margin: 0; font-size: 0.9rem; }

  pc-out-shower { display: none; }
}

/* ===== Mobile-Layout (≤ 767px): 9/10 verstecken ===== */
@media (max-width: 767px) {
  top-header { --hide-ratio: 0.9; } /* <- Hier wird auf 90% gestellt */
  .logo { display: none; }
  .logo-text_p { display: none; }
  handy-out-shower { display: none; }
}
