/* ===== Basis & Layout ===== */
html {
  scroll-behavior: smooth;
}

article[id] {
  scroll-margin-top: 84px;
}

/* Sticky Top-Nav (Glass-Effekt) */
.topnav {
  transition: opacity .35s ease, transform .35s ease;
  backdrop-filter: saturate(1.2) blur(8px);
  background: color-mix(in oklab, var(--background-color), transparent 15%);
  border-bottom: 1px solid color-mix(in oklab, var(--muted-border-color), transparent 40%);
  border-radius: 0 0 12px 12px;
  margin-bottom: .1rem;
  display: block;

  z-index: 2000;
  /* <— HINZUFÜGEN: Topbar über dem Backdrop (1500) */
}


/* versteckt beim Scrollen */
.topnav.is-hidden {
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  /* ok nur wenn Menü zu ist */
}

/* wenn das Mobile-Menü offen ist, immer sichtbar & klickbar */
.topnav.menu-open {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

/* Wenn das Menü offen ist: Topbar NICHT abdunkeln (Glass aus) */
body:has(#menuBackdrop:not([hidden])) .topnav {
  background: var(--card-background-color, var(--background-color));
  backdrop-filter: none;
}

/* Brand-Zeile */
.brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  position: relative;
  /* Bezugspunkt fürs Dropdown */
}

.brand {
  display: flex;
  align-items: center;
  gap: .4em;
  text-decoration: none;
  /* Unterstreichung weg */
  color: inherit;
  /* übernimmt normale Textfarbe */
  font-weight: bold;
  /* bleibt fett */
}


/* Rechts-inline: Theme + Burger */
.nav-inline {
  display: flex;
  gap: .5rem;
  margin-left: auto;
}

.nav-inline li {
  list-style: none;
}

/* Desktop-Linkleiste */
.nav-links-desktop {
  display: flex;
  gap: 1rem;
  margin: 0;
  padding: 0;
}

.nav-links-desktop li {
  list-style: none;
}

/* Burger-Button (fixe Breite, damit nichts springt) */
.menu-toggle {
  background: none;
  border: 1px solid var(--muted-border-color);
  border-radius: 10px;
  padding: .35rem .6rem;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  inline-size: 2.25rem;
  text-align: center;
}

/* Burger-Farbe je nach Theme */
:root[data-theme="light"] .menu-toggle {
  color: #000;
  border-color: rgba(0, 0, 0, .35);
}

:root[data-theme="dark"] .menu-toggle {
  color: #fff;
  border-color: rgba(255, 255, 255, .35);
}

:root[data-theme="light"] .menu-toggle:hover,
:root[data-theme="light"] .menu-toggle:focus {
  border-color: rgba(0, 0, 0, .55);
}

:root[data-theme="dark"] .menu-toggle:hover,
:root[data-theme="dark"] .menu-toggle:focus {
  border-color: rgba(255, 255, 255, .55);
}

/* Theme-Button kompakt/quadratisch wie Icon */
#themeToggle {
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  text-align: center;
}

/* ===== Mobiles Dropdown-Panel rechts unter dem ☰ ===== */
.nav-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(80vw, 320px);
  min-height: 6rem;
  /* oder z. B. 10rem, je nach gewünschter Mindestgröße */
  max-height: 90vh;
  /* Sicherheit: falls Inhalt irgendwann doch länger wird */
  overflow: visible;
  /* keine Scrollbar */
  padding: 1rem;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  background: var(--card-background-color, #fff);
  border-left: 1px solid color-mix(in oklab, var(--muted-border-color), transparent 25%);
  box-shadow: -8px 0 24px rgba(0, 0, 0, .35);
  z-index: 2100;
  border-radius: 0;
}

:root[data-theme="light"] .nav-drawer {
  background: var(--card-background-color, #fff);
  border: 1px solid color-mix(in oklab, var(--muted-border-color), transparent 20%);
}

:root[data-theme="dark"] .nav-drawer {
  background: var(--card-background-color, #111315);
  border: 1px solid color-mix(in oklab, var(--muted-border-color), transparent 35%);
}

.nav-drawer li {
  list-style: none;
}

.nav-drawer[hidden] {
  display: none !important;
}

.nav-drawer a {
  display: block;
  padding: .4rem .6rem;
  border-radius: 8px;
}

.nav-drawer a:hover {
  background: color-mix(in oklab, var(--muted-border-color), transparent 80%);
}

/* ===== Backdrop hinter dem Menü ===== */
#menuBackdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .35);
  backdrop-filter: blur(1px);
  z-index: 1500;
  /* unter Topbar, über Inhalt */
}

#menuBackdrop[hidden] {
  display: none !important;
}

/* Seite nicht scrollen, wenn Menü offen */
body:has(#menuBackdrop:not([hidden])) {
  position: fixed;
  /* verhindert Scrollen */
  overflow-y: scroll;
  /* Scrollbar bleibt sichtbar */
  touch-action: none;
  /* verhindert Touchscroll auf Mobilgeräten */
}

/* Responsive: unter 700px Desktop-Leiste ausblenden */
@media (max-width:700px) {
  .nav-links-desktop {
    display: none;
  }
}

/* Über 700px: Burger & Drawer ausblenden */
@media (min-width:701px) {

  .menu-toggle,
  #mobileMenu {
    display: none !important;
  }
}

/* Header-Logo oben (falls verwendet) */
header>img {
  max-width: 180px;
  height: auto;
  display: block;
  margin: 0 auto 1rem;
}

header h1,
header p {
  text-align: center;
}

/* Utilities */
.center {
  text-align: center
}

.qr {
  max-width: 220px;
  height: auto;
  border-radius: 12px
}

figure {
  margin: 0
}

footer {
  margin-top: 2rem
}

.hidden {
  display: none !important
}

.badge {
  display: inline-block;
  padding: .15rem .5rem;
  border-radius: .5rem;
  font-size: .8rem
}

.badge.ok {
  background: var(--primary-focus);
  color: var(--primary-inverse);
}

@media (max-width:600px) {
  .mobile-break {
    display: block;
    margin-top: .25rem;
  }
}

/* TUHH-Farbe + kleines Ball-Icon inline */
.tuhh {
  color: #00778A;
  font-weight: bold;
}

.logo-ball {
  display: inline-block;
  height: 1em;
  width: auto;
  margin: 0 .4em 0 0;
  vertical-align: -0.15em;
}

/* Footer mit großem AStA-Logo */
.footer {
  margin-top: 2rem;
  color: var(--muted-color);
}

.footer a {
  color: inherit;
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}

.asta-logo {
  height: 80px;
  width: auto;
  margin-top: .5rem;
}

/* ===== Navigation Oben: Linkfarben ===== */
:root[data-theme="light"] #mobileMenu a,
:root[data-theme="light"] .nav-links-desktop a {
  color: #000 !important;
  font-weight: bold;
}

:root[data-theme="dark"] #mobileMenu a,
:root[data-theme="dark"] .nav-links-desktop a {
  color: #fff !important;
  font-weight: bold;
}

/* Aktive Seite visuell markieren */
[aria-current="page"] {
  text-decoration: underline;
  text-underline-offset: .2em;
}


/* Container sorgt für Responsive Verhalten */
.form-wrapper {
  position: relative;
  width: 100%;
  height: 1200px;
  padding-top: 1100px;
  /* Höhe anpassen (z. B. 1200–1800px je nach Formular-Länge) */
}

.form-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* Handy-Anpassung */
@media (max-width: 600px) {
  .form-wrapper {
    padding-top: 1350px;
    /* auf Handy oft etwas mehr Platz nötig */
  }
}

.notice {
  border-radius: 8px;
  padding: 1rem;
  text-align: center;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.notice.free {
  background-color: #e9ffe9;
  border: 2px solid #39b54a;
  color: #084d14;
}

.notice.waitlist {
  background-color: #fff9e6;
  border: 2px solid #f0c94d;
  color: #7a5a00;
}

.notice.full {
  background-color: #ffeaea;
  border: 2px solid #ff4a4a;
  color: #7a0000;
}

.notice.none {
  display: none;
}

.notice.almost {
  background-color: #fff6d5;
  border: 2px solid #f1b400;
  color: #6a4c00;
}
