/* =========================================
   SASP Header + Modal
   Datei: css/header.css
   ========================================= */

:root{
  /* Layout */
  --container-wide: 1520px;
  --gutter: 22px;

  /* Colors */
  --surface: #ffffff;
  --text: #0f172a;
  --muted: #475569;
  --border: #d6dbe3;

  /* Brand / CTA */
  --navy-1: #0b2b55;   /* dunkel */
  --navy-2: #0b4f8f;   /* mittel */
  --navy-3: #0b5cab;   /* primär */
  --focus: #f59e0b;

  /* UI */
  --radius: 14px;
  --shadow: 0 10px 26px rgba(2, 6, 23, 0.10);
}

/* Minimal reset for header area */
.topbar, .topbar * { box-sizing: border-box; }

.container{
  max-width: var(--container-wide);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.container--wide{
  max-width: var(--container-wide);
}

/* Topbar */
.topbar{
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.topbar__row{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0;
}

/* Brand */
.brand{
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.brand__logo{
  width: 46px;
  height: 46px;
  object-fit: contain;
  flex: 0 0 auto;
}

.brand__text{ line-height: 1.1; }

.brand__name{
  font-weight: 900;
  letter-spacing: 0.2px;
  color: var(--text);
}

.brand__tag{
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.90rem;
}

/* Placeholder (wenn Bild fehlt) */
.img-placeholder{
  display: grid;
  place-items: center;
  border: 2px dashed #cbd5e1;
  background: #f8fafc;
  color: #64748b;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-radius: 12px;
}

.img-placeholder--sm{
  width: 46px;
  height: 46px;
  font-size: 0.62rem;
  padding: 6px;
  text-align: center;
}

/* Nav */
.nav{
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.nav__link{
  color: var(--text);
  font-weight: 850;
  text-decoration: none;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid transparent;
}

.nav__link:hover{
  background: #f3f6fb;
  border-color: #e6eaf2;
  text-decoration: none;
}

/* Mobile toggle */
.navbtn{
  display: none;
  border: 1px solid var(--border);
  background: #fff;
  padding: 9px 12px;
  border-radius: 10px;
  font-weight: 900;
  cursor: pointer;
  color: var(--text);
}

/* ✅ Login CTA Button (deutlich dunkelblau) */
.nav__cta{
  appearance: none;
  border: 1px solid rgba(11, 43, 85, 0.55);
  background: linear-gradient(180deg, var(--navy-3) 0%, var(--navy-2) 55%, var(--navy-1) 100%);
  color: #ffffff;

  font-weight: 950;
  letter-spacing: 0.4px;

  padding: 9px 16px;
  border-radius: 12px;

  box-shadow:
    0 6px 14px rgba(11, 92, 171, 0.28),
    0 1px 0 rgba(255, 255, 255, 0.18) inset;

  cursor: pointer;
  transition: transform .08s ease, filter .15s ease, box-shadow .15s ease;
}

.nav__cta:hover{
  filter: brightness(1.06);
  box-shadow:
    0 10px 20px rgba(11, 92, 171, 0.34),
    0 1px 0 rgba(255, 255, 255, 0.22) inset;
  transform: translateY(-1px);
}

.nav__cta:active{
  transform: translateY(0);
  filter: brightness(0.98);
  box-shadow:
    0 6px 14px rgba(11, 92, 171, 0.22),
    0 2px 6px rgba(0,0,0,0.18) inset;
}

/* Focus */
.brand:focus-visible,
.nav__link:focus-visible,
.navbtn:focus-visible,
.nav__cta:focus-visible,
.modal__close:focus-visible,
.modal__choice:focus-visible,
.modal__cancel:focus-visible{
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 12px;
}

/* Responsive nav */
@media (max-width: 1040px){
  .navbtn{ display: inline-flex; }
  .topbar__row{ flex-wrap: wrap; }

  .nav{
    display: none;
    width: 100%;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
  }

  .nav.nav--open{
    display: flex;
  }
}

/* =========================================
   Modal
   ========================================= */

.modal[hidden]{ display: none; }

.modal{
  position: fixed;
  inset: 0;
  z-index: 1000;
}

.modal__overlay{
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.55);
}

.modal__dialog{
  position: relative;
  width: min(760px, calc(100% - 2 * var(--gutter)));
  margin: 10vh auto 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 26px 70px rgba(0,0,0,0.28);
  overflow: hidden;
}

.modal__head{
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid var(--border);
  background: #fbfdff;
}

.modal__title{
  font-weight: 950;
  font-size: 1.12rem;
  color: var(--text);
}

.modal__sub{
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.95rem;
}

.modal__close{
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 10px;
  padding: 8px 10px;
  font-weight: 950;
  cursor: pointer;
  color: var(--text);
}

.modal__close:hover{ background: #f8fafc; }

.modal__body{
  padding: 14px 16px 8px;
  display: grid;
  gap: 10px;
}

.modal__choice{
  display: grid;
  gap: 6px;
  padding: 12px 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 2px 10px rgba(2, 6, 23, 0.06);
  color: inherit;
  text-decoration: none;
}

.modal__choice:hover{
  text-decoration: none;
  border-color: #b9c3d4;
  background: #f8fbff;
}

.modal__choiceTitle{
  font-weight: 950;
  color: var(--text);
}

.modal__choicePath{
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.92rem;
  word-break: break-word;
}

.modal__foot{
  padding: 12px 16px 16px;
  display: flex;
  justify-content: flex-end;
  border-top: 1px solid var(--border);
  background: #fbfdff;
}

.modal__cancel{
  border: 1px solid var(--border);
  background: #fff;
  color: var(--navy-2);
  font-weight: 950;
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
}

.modal__cancel:hover{ background: #f8fafc; }

@media (max-width: 560px){
  .modal__dialog{ margin: 7vh auto 0; }
}
