/*
 * SMARTB4 Kopf, Fuß und Buttons – gemeinsam für Website und Portal (öffentliche Ansicht).
 * Bewusst nur Klassen-Selektoren; Gegenregeln gegen die Element-Stile des Portals (style.css.php).
 */

.wrap { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 16px; }

/* Gegen Portal-Stile (button, a, footer, * { margin:0 }) absichern */
.site-header, .site-footer { font-family: var(--font-body); }
.site-header *, .site-footer * { box-sizing: border-box; }
.site-header button.nav-toggle { margin: 0; padding: 0; min-height: 44px; background: none; border: 0; border-radius: var(--radius-s); color: inherit; }
.site-header a, .site-footer a { font-family: var(--font-body); }
.site-footer h2 { font-family: var(--font-heading); font-weight: 700; line-height: 1.2; }
.site-footer p { margin: 0 0 1em; }

.skip-link { position: absolute; left: -9999px; top: 0; z-index: 200; background: #fff; padding: 8px 12px; }
.skip-link:focus { left: 8px; top: 8px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Buttons – gleiche Form wie im Portal */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4em;
  min-height: 44px; padding: .6em 1.2em;
  border-radius: 999px; border: 2px solid transparent;
  font-family: var(--font-body); font-weight: 700; font-size: 1rem; line-height: 1.2;
  text-decoration: none; cursor: pointer; transition: background .15s, color .15s, border-color .15s;
}
.btn-primary { background: var(--color-primary); color: var(--color-on-primary); }
.btn-primary:hover { background: var(--color-primary-hover); color: #fff; }
.btn-outline { border-color: var(--color-primary); color: var(--color-primary); background: #fff; }
.btn-outline:hover { background: var(--color-bg-soft); }
.btn-danger { border-color: var(--color-danger); color: var(--color-danger); background: #fff; }
.btn-danger:hover { background: var(--color-danger); color: #fff; }
.btn-yellow { background: var(--brand-gelb); color: var(--brand-anthrazit); }
.btn-yellow:hover { background: #E2C52F; color: var(--brand-anthrazit); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.4em; }

/* Kopf */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .97);
  border-bottom: 1px solid var(--color-border);
  backdrop-filter: saturate(1.2) blur(6px);
}
.site-header .wrap { display: flex; align-items: center; gap: 12px; min-height: 72px; padding-top: 6px; padding-bottom: 6px; }
.site-logo { display: block; flex: 0 0 auto; }
.site-logo img { display: block; width: 125px; height: auto; }
.header-emergency { margin-left: auto; min-height: 40px; padding: .4em .9em; font-size: .95rem; }
.nav-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border: 0; background: none; cursor: pointer; border-radius: var(--radius-s);
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  display: block; width: 24px; height: 2px; background: var(--brand-anthrazit); position: relative; transition: transform .2s;
}
.nav-toggle span::before, .nav-toggle span::after { content: ""; position: absolute; left: 0; }
.nav-toggle span::before { top: -7px; }
.nav-toggle span::after { top: 7px; }
.nav-open .nav-toggle span { background: transparent; }
.nav-open .nav-toggle span::before { transform: translateY(7px) rotate(45deg); }
.nav-open .nav-toggle span::after { transform: translateY(-7px) rotate(-45deg); }

.site-nav { display: none; }
.nav-open .site-nav {
  display: block; position: absolute; left: 0; right: 0; top: 100%;
  background: #fff; border-bottom: 1px solid var(--color-border); box-shadow: var(--shadow-m);
  padding: 8px 16px 20px; max-height: calc(100vh - 68px); overflow-y: auto;
}
.site-nav ul { list-style: none; margin: 0; padding: 0; }
.site-nav a { display: block; padding: 12px 4px; text-decoration: none; color: var(--brand-anthrazit); font-weight: 600; }
.site-nav a[aria-current="page"] { color: var(--color-primary); }
.nav-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.nav-actions .btn { padding: .5em 1em; }
.nav-actions a.btn { display: inline-flex; padding: .5em 1em; }
.site-nav .nav-actions a.btn-primary { color: #fff; }
.site-nav .nav-actions a.btn-danger { color: var(--color-danger); }
.site-nav .nav-actions a.btn-danger:hover { color: #fff; }

@media (min-width: 1000px) {
  .nav-toggle, .header-emergency { display: none; }
  .site-nav, .nav-open .site-nav {
    display: flex; align-items: center; gap: 20px; margin-left: auto;
    position: static; padding: 0; box-shadow: none; border: 0; background: none; max-height: none; overflow: visible;
  }
  .site-nav ul { display: flex; gap: 4px; }
  .site-nav ul a { padding: 8px 10px; border-radius: var(--radius-s); font-size: .98rem; }
  .site-nav ul a:hover { background: var(--color-bg-soft); }
  .nav-actions { margin: 0; flex-wrap: nowrap; }
}

/* Fuß */
.site-footer { background: var(--brand-blau-dunkel); color: #fff; padding: 48px 0 24px; margin: 0; border-radius: 0; text-align: left; font-family: var(--font-body); font-size: var(--fs-base); line-height: var(--lh-base); }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; color: #fff; }
.footer-grid { display: grid; gap: 28px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.site-footer h2 { color: #fff; font-size: 1.05rem; margin-bottom: .8em; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .45em; }
.site-footer address { font-style: normal; line-height: 1.7; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .3); margin-top: 32px; padding-top: 16px; font-size: .92rem; display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; }
.footer-logo { width: 150px; margin-bottom: 12px; }

.btn-emergency { background: var(--color-danger); color: #fff; border-color: var(--color-danger); }
.btn-emergency:hover { background: #7F2A33; border-color: #7F2A33; color: #fff; }
