/* ============================================================================
   EuroPilot Connect, gemeinsame Top-Bar (Markenauftritt 2026-09)
   ----------------------------------------------------------------------------
   DIE EINZIGE QUELLE für das Aussehen der Kopfzeile. Jede Seite bindet diese
   Datei ein und benutzt dasselbe Markup (siehe assets/topbar.html).

   Seit dem Neuauftritt ist die Bar immer dunkel:
     ohne Attribut          → nachtblauer Balken im Fluss (sticky)
     data-topbar="hero"     → liegt über dem Kopfbild, oben mit leichtem
                              Schatten-Verlauf, beim Scrollen nachtblau
   Höhe, Schrift, Abstände und Logo sind in beiden Fällen identisch.
   ========================================================================== */

.epc-topbar{
  --epc-tb-nacht:#06101f;
  --epc-tb-blau:#4e7cd9;
  --epc-tb-pad:clamp(20px,5vw,80px);
  --epc-tb-font:'Manrope',-apple-system,BlinkMacSystemFont,'Segoe UI',Helvetica,Arial,sans-serif;

  position:sticky;top:0;z-index:60;
  display:flex;align-items:center;justify-content:space-between;gap:24px;
  padding:0 var(--epc-tb-pad);
  height:76px;
  font-family:var(--epc-tb-font);
  color:#fff;
  background:rgba(6,16,31,.94);
  -webkit-backdrop-filter:saturate(1.4) blur(14px);
  backdrop-filter:saturate(1.4) blur(14px);
  box-shadow:0 1px 0 rgba(255,255,255,.1);
  transition:background-color .35s ease,box-shadow .35s ease;
}

/* Über einem Kopfbild: durchsichtig mit weichem Verlauf, damit Logo und
   Punkte auf jedem Foto lesbar bleiben. */
.epc-topbar[data-topbar="hero"]{
  position:fixed;left:0;right:0;
  background:transparent;box-shadow:none;
  -webkit-backdrop-filter:none;backdrop-filter:none;
}
.epc-topbar[data-topbar="hero"]::before{
  content:"";position:absolute;inset:0 0 -40px 0;pointer-events:none;z-index:-1;
  background:linear-gradient(to bottom,rgba(6,16,31,.45),rgba(6,16,31,0));
  transition:opacity .35s ease;
}
.epc-topbar[data-topbar="hero"].is-scrolled,
.epc-topbar[data-topbar="hero"].is-offen{
  background:rgba(6,16,31,.94);box-shadow:0 1px 0 rgba(255,255,255,.1);
  -webkit-backdrop-filter:saturate(1.4) blur(14px);backdrop-filter:saturate(1.4) blur(14px);
}
.epc-topbar[data-topbar="hero"].is-scrolled::before,
.epc-topbar[data-topbar="hero"].is-offen::before{opacity:0}

/* ---------- Logo (Querformat: Flugzeug und Schriftzug) ---------- */
.epc-topbar .epc-tb-brand{display:inline-flex;align-items:center;flex:0 0 auto}
.epc-topbar .epc-tb-logo{height:30px;width:auto;display:block}

/* ---------- Links ---------- */
.epc-topbar .epc-tb-nav{display:flex;align-items:center;gap:clamp(18px,2.4vw,34px)}
.epc-topbar .epc-tb-link{
  font-weight:600;font-size:14px;line-height:1;letter-spacing:.02em;white-space:nowrap;
  color:rgba(255,255,255,.86);text-decoration:none;transition:color .2s ease;
}
.epc-topbar .epc-tb-link:hover,
.epc-topbar .epc-tb-link[aria-current="page"]{color:#fff}

/* ---------- Knopf "Loslegen!" in Tims Blau ---------- */
.epc-topbar .epc-tb-cta{
  display:inline-flex;align-items:center;justify-content:center;white-space:nowrap;
  min-height:42px;padding:0 20px;border-radius:999px;border:0;
  background:var(--epc-tb-blau);color:#fff;text-decoration:none;
  font-weight:700;font-size:14px;line-height:1;letter-spacing:.01em;
  transition:background-color .25s ease,transform .15s ease;
}
.epc-topbar .epc-tb-cta:hover{background:#3f6dca}
.epc-topbar .epc-tb-cta:active{transform:scale(.98)}

/* ---------- Sprachwahl ----------
   Auf den handgepflegten Seiten füllt lang.js #lang-mount, die erzeugten Seiten
   bringen ein <details class="epc-language-menu"> mit. Beides sitzt an derselben
   Stelle und sieht gleich aus. */
.epc-topbar .epc-tb-lang{display:inline-flex;align-items:center}
.epc-topbar .epc-tb-lang > *{margin:0}
.epc-topbar .epc-language-menu{position:relative}
.epc-topbar .epc-language-menu > summary,
.epc-topbar #lang-btn{
  list-style:none;cursor:pointer;display:inline-flex;align-items:center;gap:6px;
  background:transparent;border:0;box-shadow:inset 0 0 0 1px rgba(255,255,255,.35);
  color:#fff;border-radius:999px;padding:8px 13px;
  font-family:inherit;font-weight:700;font-size:12px;letter-spacing:.06em;
  transition:box-shadow .2s ease;
}
.epc-topbar .epc-language-menu > summary:hover,
.epc-topbar #lang-btn:hover{box-shadow:inset 0 0 0 1px rgba(255,255,255,.8)}
.epc-topbar .epc-language-menu > summary::-webkit-details-marker{display:none}
.epc-topbar #lang-btn svg{width:14px;height:14px;display:block}
.epc-topbar .epc-language-menu > nav,
.epc-topbar #lang-list{
  position:absolute;top:calc(100% + 12px);right:0;z-index:70;
  display:grid;gap:0;min-width:210px;max-height:64vh;overflow:auto;
  background:#06101f;border:1px solid rgba(255,255,255,.14);border-radius:0;padding:6px 0;
  box-shadow:0 28px 60px -24px rgba(0,0,0,.6);
}
.epc-topbar .epc-language-menu > nav a,
.epc-topbar #lang-list [data-lang]{
  color:rgba(255,255,255,.82);font-size:14px;font-weight:500;text-decoration:none;
  padding:10px 16px;border-radius:0;background:none;cursor:pointer;text-align:left;
}
.epc-topbar .epc-language-menu > nav a:hover,
.epc-topbar #lang-list [data-lang]:hover{background:rgba(255,255,255,.07);color:#fff}
.epc-topbar .epc-language-menu > nav a[aria-current="true"],
.epc-topbar #lang-list [data-lang].on{color:#fff;font-weight:700}

/* lang.js-Menü: Liste erst sichtbar, wenn #lang-menu die Klasse "open" trägt. */
.epc-topbar #lang-menu{position:relative;display:inline-block}
.epc-topbar #lang-list{display:none}
.epc-topbar #lang-menu.open #lang-list{display:grid}
.epc-topbar #lang-list [data-lang]{display:flex;align-items:center;gap:10px;border:0;font-family:inherit;width:100%}
.epc-topbar #lang-list [data-lang] b{min-width:24px;font-size:11.5px;font-weight:700;letter-spacing:.06em;color:rgba(255,255,255,.5)}
.epc-topbar #lang-list [data-lang].on b{color:#fff}

/* Flagge im Sprachknopf: Emoji, unter Windows bleibt der Ländercode lesbar. */
.epc-topbar .lang-flag{
  font-size:1.05em;line-height:1;
  font-family:"Apple Color Emoji","Segoe UI Emoji","Noto Color Emoji",sans-serif;
}
.epc-topbar #lang-btn .lang-flag:empty{display:none}
.epc-topbar .epc-language-menu > summary .lang-flag{margin-right:2px}
.epc-topbar .epc-language-menu > nav a .lang-flag{margin-right:8px}

/* ---------- Klappmenü auf schmalen Fenstern ----------
   Knopf und Klapplage erzeugt topbar.js. Die Lage ist nachtblau wie die Bar,
   die Punkte stehen gross und dünn untereinander, getrennt durch Haarlinien. */
.epc-topbar .epc-tb-burger{
  display:none;width:44px;height:44px;padding:0;border:0;background:transparent;cursor:pointer;
  flex-direction:column;align-items:center;justify-content:center;gap:7px;
}
.epc-topbar .epc-tb-burger-strich{
  display:block;width:22px;height:1.5px;background:#fff;
  transition:transform .25s cubic-bezier(.2,.7,.2,1),opacity .18s ease;
}
.epc-topbar.is-offen .epc-tb-burger-strich:first-child{transform:translateY(4.25px) rotate(45deg)}
.epc-topbar.is-offen .epc-tb-burger-strich:last-child{transform:translateY(-4.25px) rotate(-45deg)}

/* WICHTIG: eine eigene display-Regel schlägt das eingebaute [hidden] des
   Browsers. Ohne diese Zeile stünde das Klappmenü dauerhaft offen. */
.epc-topbar .epc-tb-klapp[hidden]{display:none}
.epc-topbar .epc-tb-klapp{
  position:absolute;top:100%;left:0;right:0;
  display:flex;flex-direction:column;
  padding:8px var(--epc-tb-pad) 28px;
  background:#06101f;
  border-top:1px solid rgba(255,255,255,.1);
  box-shadow:0 30px 60px -30px rgba(0,0,0,.7);
  max-height:calc(100vh - 76px);overflow:auto;
}
.epc-topbar .epc-tb-klapp .epc-tb-link{
  color:#fff;font-size:30px;font-weight:300;letter-spacing:-.01em;line-height:1.15;
  padding:16px 0;border-bottom:1px solid rgba(255,255,255,.14);
}
.epc-topbar .epc-tb-klapp .epc-tb-lang{padding:20px 0 0}

@media (max-width:859px){
  .epc-topbar{height:64px;gap:12px}
  .epc-topbar .epc-tb-logo{height:26px}
  .epc-topbar .epc-tb-burger{display:flex}
  .epc-topbar .epc-tb-nav > .epc-tb-link,
  .epc-topbar .epc-tb-nav > .epc-tb-lang{display:none}
  .epc-topbar .epc-tb-nav{flex:1;min-width:0;justify-content:flex-end;gap:6px}
  .epc-topbar .epc-tb-cta{min-height:38px;padding:0 16px;font-size:13px}
  .epc-topbar .epc-tb-klapp{max-height:calc(100vh - 64px)}
  /* Die Sprachliste hängt im Klappmenü links am Knopf, nicht rechts. */
  .epc-topbar .epc-tb-klapp #lang-list,
  .epc-topbar .epc-tb-klapp .epc-language-menu > nav{
    left:0;right:auto;min-width:0;width:max-content;max-width:calc(100vw - 40px);
    position:static;margin-top:10px;box-shadow:none;
  }
}
@media (min-width:860px){
  /* Auf breiten Fenstern gibt es keinen Burger: die Klapplage liegt zwar im
     Markup, wird hier aber in die Zeile aufgelöst. */
  .epc-topbar .epc-tb-klapp,
  .epc-topbar .epc-tb-klapp[hidden]{
    position:static;display:flex;flex-direction:row;align-items:center;gap:clamp(18px,2.4vw,34px);
    padding:0;background:none;border:0;box-shadow:none;max-height:none;overflow:visible;
  }
  .epc-topbar .epc-tb-klapp .epc-tb-link{
    font-size:14px;font-weight:600;letter-spacing:.02em;line-height:1;
    color:rgba(255,255,255,.86);padding:0;border:0;
  }
  .epc-topbar .epc-tb-klapp .epc-tb-link:hover{color:#fff}
  .epc-topbar .epc-tb-klapp .epc-tb-lang{padding:0}
}

/* marketing-language.css (erzeugte Sprachseiten) setzt dem Menü eine
   Systemschrift. In der Bar gilt überall Manrope. */
.epc-topbar .epc-language-menu{font:inherit;color:#fff}
