/* ============================================================
   ROLLER OBJEKTSERVICE — Zentrale Navigation
   Diese Datei wird von ALLEN HTML-Seiten eingebunden.
   Aenderungen hier wirken sich automatisch ueberall aus.
   ============================================================ */

/* Falls die CSS-Variablen auf einer Seite nicht definiert sind,
   greifen diese Defaults — so funktioniert die Nav auch standalone. */
:root {
  --nav-ink:        #0B2E6F;
  --nav-ink-2:      #06204F;
  --nav-cyan:       #6BE5FF;
  --nav-mist:       #B4D3E8;
}

/* ============ SCROLLBAR-FIX ============
   Verhindert horizontalen Layout-Shift zwischen Seiten */
html {
  overflow-y: scroll;
  scrollbar-gutter: stable;
}

/* ============ NAV / GLASS HEADER ============ */
header.ro-header {
  position: fixed;
  top: 18px;
  left: 0;
  right: 0;
  z-index: 100;
  pointer-events: none;
}
header.ro-header .wrap {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 28px;
}
.nav-glass {
  pointer-events: auto;
  margin: 0 auto;
  max-width: 1280px;
  background: rgba(11, 46, 111, 0.80);
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 999px;
  padding: 12px 18px 12px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: white;
  box-shadow: 0 10px 40px rgba(11,46,111,0.18);
}
.nav-glass .brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  letter-spacing: 0.5px;
  font-size: 13px;
  text-transform: uppercase;
  color: white;
  text-decoration: none;
}
.nav-glass .brand-mark {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: white;
  color: var(--nav-ink);
  display: grid; place-items: center;
  font-style: italic;
  font-weight: 900;
  font-size: 17px;
  letter-spacing: -1px;
  box-shadow: inset 0 0 0 4px rgba(11,46,111,0.07);
}
.nav-glass .brand-mark img {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.nav-links {
  display: flex;
  gap: 4px;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  color: rgba(255,255,255,0.85);
  font-size: 13px;
  font-weight: 600;
  padding: 10px 14px;
  border-radius: 999px;
  transition: all .2s;
  text-decoration: none;
}
.nav-links a:hover { background: rgba(255,255,255,0.12); color: white; }
.nav-cta {
  background: white !important;
  color: var(--nav-ink) !important;
  padding: 10px 18px !important;
  font-weight: 800 !important;
}
.nav-cta:hover { background: var(--nav-cyan) !important; }

/* Nav Dropdown (Desktop: Hover) */
.nav-dd { position: relative; list-style: none; }
.nav-dd > a::after { content: " ▾"; font-size: 10px; opacity: 0.6; }
.nav-dd-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  min-width: 220px;
  background: rgba(11,46,111,0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 18px;
  padding: 10px;
  list-style: none;
  box-shadow: 0 20px 50px rgba(0,0,0,0.35);
  z-index: 200;
  margin: 0;
}
.nav-dd:hover .nav-dd-menu,
.nav-dd:focus-within .nav-dd-menu { display: block; }
.nav-dd-menu li { list-style: none; }
.nav-dd-menu a {
  display: block;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,0.85);
  border-radius: 12px;
  transition: background .2s;
  white-space: nowrap;
  text-decoration: none;
}
.nav-dd-menu a:hover { background: rgba(255,255,255,0.12); color: white; }

.menu-btn {
  display: none;
  background: rgba(255,255,255,0.15);
  border: none; color: white;
  width: 38px; height: 38px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
}

/* ============ MOBILE NAV (max-width: 820px) ============ */
@media (max-width: 820px) {
  /* Container — scrollbar wenn noetig */
  .nav-links {
    display: none;
    position: absolute;
    top: 110%;
    left: 0;
    right: 0;
    max-height: calc(100vh - 110px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    background: rgba(11,46,111,0.95);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 14px;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }
  .nav-links.open { display: flex; }
  .nav-links > li > a {
    display: block;
    padding: 14px 18px;
    font-size: 14px;
  }
  .menu-btn { display: block; }

  /* "Leistungen"-Link mit rotierendem Pfeil */
  .nav-dd > a {
    position: relative;
    cursor: pointer;
    padding-right: 38px;
  }
  .nav-dd > a::after {
    content: "▾";
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    opacity: 0.7;
    transition: transform .25s ease;
  }
  .nav-dd.open > a::after {
    transform: translateY(-50%) rotate(180deg);
  }

  /* Untermenue: animiert auf-/zuklappen */
  .nav-dd-menu {
    position: static;
    transform: none;
    background: rgba(255,255,255,0.06);
    border: none;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    padding: 0 8px;
    margin: 0;
    border-radius: 14px;
    transition: max-height .35s ease, opacity .25s ease, padding .25s ease, margin .25s ease;
  }
  .nav-dd.open .nav-dd-menu {
    max-height: 500px;
    opacity: 1;
    padding: 8px;
    margin-top: 6px;
  }
  .nav-dd-menu a {
    display: block;
    padding: 14px 18px;
    font-size: 13px;
  }
}

@media (max-width: 520px) {
  .nav-glass { padding: 8px 8px 8px 14px; }
  .nav-glass .brand-mark { width: 34px; height: 34px; font-size: 14px; }
  .nav-glass .brand span { display: none; }
}
