/* ============================================================
   ADSWERK · Menüpunkt „Branchen“ mit Unterpunkten
   Auftrag Arian, 28.10.2026: In der Navigation ein Punkt „Branchen“,
   beim Drüberfahren stehen die Branchenseiten darunter.
   Gilt für Startseite und Branchenseiten. style.css bleibt unberührt,
   deshalb überschreibt diese Datei die allgemeinen Regeln für `.nav a`
   gezielt für das Untermenü. Verhalten (Klick, Tastatur, Touch): js/nav.js.
   ============================================================ */

.nav-gruppe { position: relative; }
.nav-pfeil {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  color: inherit;
  cursor: pointer;
}
.nav-pfeil svg {
  width: 10px;
  height: 10px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.nav-gruppe.offen .nav-pfeil svg { transform: rotate(180deg); }
.nav-pfeil:focus-visible { outline: 2px solid var(--koenig-hell); outline-offset: 4px; border-radius: 6px; }

/* ---------- Inhalt des Untermenüs (Desktop und Handy) ---------- */
.nav .nav-menue a,
.nav .nav-menue a:not(.btn) {
  text-transform: none;
  letter-spacing: normal;
  white-space: normal;
  opacity: 1;
  transform: none;
}
.nav .nav-menue a::after,
.nav .nav-menue a:not(.btn)::after,
.nav .nav-menue a::before,
.nav .nav-menue a:not(.btn)::before { content: none; display: none; counter-increment: none; }

.nav-menue-kicker {
  display: block;
  padding: 12px 16px 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--stahl);
}

.nav .nav-menue .nav-branche {
  display: grid;
  grid-template-columns: 46px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 12px 14px 12px 12px;
  border-radius: 16px;
  border: 1px solid transparent;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.3;
  color: var(--hell);
  text-decoration: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}
.nav .nav-menue .nav-branche:hover,
.nav .nav-menue .nav-branche:focus-visible {
  background: rgba(242, 243, 249, 0.06);
  border-color: rgba(143, 166, 230, 0.28);
  outline: none;
}
/* Ikone wie die Kacheln der Branchenliste: eigenes Feld, Silber, beim
   Drüberfahren Königsblau */
.nav-branche-ikon {
  width: 46px;
  height: 46px;
  padding: 12px;
  border-radius: 13px;
  background: rgba(242, 243, 249, 0.06);
  border: 1px solid rgba(242, 243, 249, 0.14);
  color: #D7DBE4;
  transition: color 0.3s ease, background 0.3s ease, border-color 0.3s ease;
}
.nav-branche-ikon svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.3;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.nav .nav-menue .nav-branche:hover .nav-branche-ikon,
.nav .nav-menue .nav-branche:focus-visible .nav-branche-ikon,
.nav .nav-menue .nav-branche[aria-current] .nav-branche-ikon {
  color: #FFFFFF;
  background: rgba(29, 68, 172, 0.55);
  border-color: rgba(143, 166, 230, 0.5);
}
.nav-branche-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.nav-branche-text b {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 21px;
  line-height: 1.15;
  color: var(--hell);
}
.nav-branche-text small {
  font-size: 13.5px;
  line-height: 1.35;
  color: var(--hell-70);
}
/* Pfeilkreis wie im Knopf „Erstgespräch sichern“ */
.nav-branche-pfeil {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23F2F3F9' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='9.5 6 15.5 12 9.5 18'/%3E%3C/svg%3E") no-repeat center / 13px,
    rgba(248, 248, 251, 0.10);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), background-color 0.3s ease;
}
.nav .nav-menue .nav-branche:hover .nav-branche-pfeil,
.nav .nav-menue .nav-branche:focus-visible .nav-branche-pfeil {
  transform: translateX(3px);
  background-color: var(--koenig);
}
/* Auf der eigenen Seite: leuchtender Punkt statt Pfeil, wie der aktive
   Punkt in der Kapsel. Der Text „Du bist hier“ bleibt für Vorleseprogramme. */
.nav-branche-hier {
  position: relative;
  width: 30px;
  height: 30px;
  overflow: hidden;
  color: transparent;
  font-size: 0;
}
.nav-branche-hier::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 7px;
  height: 7px;
  margin: -3.5px 0 0 -3.5px;
  border-radius: 50%;
  background: var(--koenig-hell);
  box-shadow: 0 0 10px rgba(143, 166, 230, 0.95);
}

.nav-menue-linie { height: 1px; margin: 8px 16px; background: rgba(242, 243, 249, 0.10); }
.nav .nav-menue .nav-alle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px 14px;
  border: 0;
  border-radius: 12px;
  font-size: 14.5px;
  font-weight: 500;
  line-height: 1.3;
  color: var(--hell-70);
  text-decoration: none;
  transition: color 0.25s ease;
}
.nav .nav-menue .nav-alle span { display: flex; flex-direction: column; gap: 2px; }
.nav .nav-menue .nav-alle small { font-size: 12.5px; color: var(--stahl); }
.nav .nav-menue .nav-alle svg {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.nav .nav-menue .nav-alle:hover,
.nav .nav-menue .nav-alle:focus-visible { color: var(--hell); outline: none; }
.nav .nav-menue .nav-alle:hover svg,
.nav .nav-menue .nav-alle:focus-visible svg { transform: translateX(3px); }

/* ---------- Desktop: Karte unter der Kapsel ---------- */
@media (min-width: 901px) {
  .nav-gruppe { display: flex; align-items: center; gap: 8px; }
  .nav-pfeil { width: 18px; height: 18px; color: var(--hell-70); transition: color 0.25s ease; }
  .nav-gruppe:hover .nav-pfeil,
  .nav-gruppe.offen .nav-pfeil { color: var(--hell); }
  .nav-gruppe:hover .nav-oben,
  .nav-gruppe.offen .nav-oben { color: var(--hell); }

  .nav-menue {
    position: absolute;
    top: 100%;
    left: 50%;
    width: 440px;
    padding-top: 42px;             /* 14px Luft unter der Kapsel; die Fläche ist zugleich
                                      Brücke, damit die Maus die Karte nicht verliert */
    transform: translate(-50%, 10px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition:
      opacity 0.28s ease 0.12s,
      transform 0.4s cubic-bezier(0.22, 1, 0.36, 1) 0.12s,
      visibility 0s linear 0.52s;
  }
  .nav-gruppe.offen .nav-menue,
  .nav-gruppe:not(.gesperrt):has(:focus-visible) .nav-menue {
    transform: translate(-50%, 0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition:
      opacity 0.28s ease,
      transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
      visibility 0s linear 0s;
  }
  /* Eigene Karte in den Farben der Kapsel. Ein Weichzeichner wirkt hier nicht,
     weil die Kapsel selbst einen trägt. Voll deckend: Schon bei 98 Prozent
     schien in Chrome Text der Seite durch (gemessen 28.10.2026). */
  .nav-menue-innen {
    position: relative;
    padding: 8px;
    border-radius: 24px;
    background: linear-gradient(180deg, #11224A, #081227);
    box-shadow:
      inset 0 1px 0 rgba(242, 243, 249, 0.14),
      0 0 0 1px rgba(201, 210, 226, 0.18),
      0 34px 70px -28px rgba(3, 8, 20, 0.85);
  }
  /* Silberkante oben, wie die Sichel der Kapsel */
  .nav-menue-innen::before {
    content: "";
    position: absolute;
    left: 26px;
    right: 26px;
    top: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  }
}
@media (min-width: 901px) and (prefers-reduced-motion: reduce) {
  .nav-menue, .nav-gruppe.offen .nav-menue, .nav-gruppe:not(.gesperrt):has(:focus-visible) .nav-menue { transform: translate(-50%, 0); }
}

/* ---------- Handy: aufklappbare Zeile im Burger-Menü ---------- */
@media (max-width: 900px) {
  .nav-gruppe {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    border-top: 1px solid var(--linie-hell);
    border-bottom: 1px solid var(--linie-hell);
  }
  .nav .nav-gruppe a.nav-oben:not(.btn), .nav .nav-gruppe a.nav-oben:not(.btn):first-child { border-top: 0; border-bottom: 0; }
  .nav-pfeil {
    width: 44px;
    height: 44px;
    margin-right: -10px;
    color: var(--koenig-hell);
    opacity: 0;
    transition: opacity 0.4s ease 0.08s;
  }
  .nav.offen .nav-pfeil { opacity: 1; }
  .nav-pfeil svg { width: 14px; height: 14px; }
  .nav-menue {
    grid-column: 1 / -1;
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.42s cubic-bezier(0.22, 1, 0.36, 1);
  }
  .nav-gruppe.offen .nav-menue { grid-template-rows: 1fr; }
  .nav-menue-innen { overflow: hidden; min-height: 0; padding-left: 34px; }
  .nav-gruppe.offen .nav-menue-innen { padding-bottom: 14px; }
  .nav-menue-kicker { padding: 0 0 8px; }
  .nav .nav-menue .nav-branche { grid-template-columns: 40px 1fr auto; gap: 14px; padding: 10px 10px 10px 8px; margin-left: -8px; }
  .nav-branche-ikon { width: 40px; height: 40px; padding: 10px; border-radius: 11px; }
  .nav-branche-text b { font-size: 20px; }
  .nav .nav-menue .nav-alle { padding: 12px 0 4px; font-size: 15px; }
  .nav-menue-linie { margin: 6px 0; }
}

/* ---------- Branchenliste der Startseite: Kachel mit eigener Seite ---------- */
a.branche { text-decoration: none; cursor: pointer; }
.branche-pfeil {
  margin-left: auto;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23F2F3F9' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='9.5 6 15.5 12 9.5 18'/%3E%3C/svg%3E") no-repeat center / 12px,
    rgba(248, 248, 251, 0.10);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), background-color 0.3s ease;
}
a.branche:hover .branche-pfeil,
a.branche:focus-visible .branche-pfeil { transform: translateX(3px); background-color: var(--koenig); }
a.branche:focus-visible { outline: 2px solid var(--koenig-hell); outline-offset: 3px; }
@media (max-width: 900px) {
  .branchen-spalten.baender .branche-pfeil { flex-basis: 22px; width: 22px; height: 22px; background-size: 10px, auto; margin-left: 2px; }
}
