/* ---------------------------------------------------------------
   Grundlagen / Variablen (angelehnt an das Layout von
   app.sb-teilerhebung.de)
--------------------------------------------------------------- */
:root {
  --theme-color: #d80107;
  --body-bg-color: #efefef;
  --bg-color: #ffffff;
  --text-color: #221f1f;
  --text-minor-color: #757575;
  --text-color-light: #ffffff;
  --default-margin: 20px;
  --small-margin: calc(var(--default-margin) / 2);
  --max-width: 1240px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--body-bg-color);
  font-family: system-ui, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', Helvetica, Arial, sans-serif;
  color: var(--text-color);
  hyphens: none;
  word-break: normal;
}

.wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: auto;
  color: var(--text-color);
}

/* ---------------------------------------------------------------
   Header
--------------------------------------------------------------- */
header {
  border-top: 20px solid var(--theme-color);
  background-color: var(--bg-color);
  box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.26);
  position: sticky;
  top: 0;
  z-index: 100;
}

header .header-content {
  max-width: var(--max-width);
  padding: 15px;
  margin: auto;
  display: flex;
  align-items: center;
  gap: calc(2 * var(--default-margin));
  justify-content: space-evenly;
}

header .header-left {
  width: 220px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 5px;
}

header .header-left .from {
  font-size: 0.95em;
}

header .ba-logo {
  display: block;
  padding: 15px 0;
}

header .ba-logo svg {
  display: block;
  width: 100%;
  height: auto;
}

/* Farben des eingebetteten BA-Logos (kein <style> im SVG selbst,
   da inline <style> von der CSP der Domain blockiert wird) */
.ba-logo-primary {
  fill: #221f1f;
}

.ba-logo-accent {
  fill: #ec1c23;
}

header .header-right {
  display: flex;
  flex-grow: 2;
  flex-direction: column;
}

header .header-right h1 {
  font-size: 2.5rem;
  font-weight: 900;
  padding: 0;
  margin: 0;
}

header .header-right p {
  font-size: 2rem;
  margin: 5px 0;
}

/* ---------------------------------------------------------------
   Inhalt
--------------------------------------------------------------- */
#content {
  display: flex;
  flex-grow: 2;
  align-items: center;
  justify-content: center;
  margin: auto;
  width: clamp(0px, 100% - calc(2 * var(--default-margin)), var(--max-width));
  padding: calc(3 * var(--default-margin)) 0;
}

.abschluss-box {
  background-color: var(--bg-color);
  border: 1px solid var(--theme-color);
  border-radius: 4px;
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(1.75rem, 5vw, 3rem);
  text-align: center;
}

.abschluss-box .icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1.25rem;
  border-radius: 50%;
  background-color: var(--theme-color);
  display: flex;
  align-items: center;
  justify-content: center;
}

.abschluss-box .icon svg {
  width: 32px;
  height: 32px;
}

.abschluss-box h2 {
  font-size: 1.75rem;
  font-weight: 900;
  margin: 0 0 1rem;
}

.abschluss-box p {
  font-size: 1.05rem;
  line-height: 1.6;
  margin: 0 0 1rem;
  text-align: left;
}

.abschluss-box p:last-of-type {
  margin-bottom: 0;
}

.abschluss-box .hinweis {
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px dashed var(--theme-color);
  font-size: 0.95rem;
  color: var(--text-minor-color);
  text-align: left;
}

.abschluss-box .hinweis a {
  color: var(--theme-color);
  text-decoration: none;
}

.abschluss-box .hinweis a:hover {
  text-decoration: underline;
}

/* ---------------------------------------------------------------
   Footer
--------------------------------------------------------------- */
footer {
  border-top: 5px solid #999;
  background-color: var(--bg-color);
  align-content: flex-end;
}

footer .three-cols {
  padding: 10px 0;
  min-width: 300px;
  max-width: var(--max-width);
  margin: auto;
  gap: 10px;
  height: 100%;
  display: flex;
  justify-content: space-around;
  align-items: start;
  line-height: 1.5;
}

footer a {
  text-decoration: none;
  color: var(--text-color);
}

footer a:hover {
  text-decoration: underline;
  color: var(--theme-color);
}

.bottom-line {
  background-color: #999;
  padding: 5px 10px;
  font-size: 0.8rem;
  color: var(--text-color-light);
}

.bottom-line .right {
  display: flex;
  justify-content: right;
  max-width: var(--max-width);
  margin: auto;
}

/* ---------------------------------------------------------------
   Rechtliche Hinweise (Impressum / Datenschutz)
--------------------------------------------------------------- */
#rechtliches {
  background-color: var(--bg-color);
  border-top: 1px dashed #999;
}

#rechtliches .inner {
  max-width: var(--max-width);
  margin: auto;
  padding: var(--default-margin);
  display: flex;
  flex-wrap: wrap;
  gap: calc(2 * var(--default-margin));
}

#rechtliches section {
  flex: 1 1 320px;
}

#rechtliches h3 {
  font-size: 1.1rem;
  margin: 0 0 0.5rem;
}

#rechtliches p {
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--text-minor-color);
}

#rechtliches a {
  color: var(--theme-color);
}

#top-link {
  font-size: 0.8rem;
}

/* ---------------------------------------------------------------
   Mobile
--------------------------------------------------------------- */
@media screen and (max-width: 600px) {
  body {
    font-size: 1.1em;
  }

  header {
    border: none;
  }

  header .header-content {
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
    gap: 8px;
    border-bottom: 3px solid var(--theme-color);
  }

  header .header-left {
    color: var(--text-color-light);
    font-size: 0.85em;
    background-color: var(--theme-color);
    justify-content: space-around;
    padding: 8px 0;
    flex-direction: row;
    height: 40px;
    gap: 20px;
    width: 100%;
    align-items: center;
  }

  header .header-left .ba-logo svg {
    height: 36px;
    width: auto;
  }

  header .header-left .ba-logo-primary,
  header .header-left .ba-logo-accent {
    fill: var(--text-color-light);
  }

  header .header-right {
    align-items: center;
    padding-bottom: 10px;
  }

  header .header-right h1 {
    font-size: 1.3rem;
    text-align: center;
  }

  header .header-right p {
    font-size: 1rem;
  }

  #content {
    padding: var(--default-margin) 0;
  }

  footer .three-cols {
    flex-direction: column;
    width: calc(100vw - 2 * var(--default-margin));
  }

  footer .three-cols > * {
    width: 100%;
  }

  footer .three-cols > *:not(:last-child) {
    padding-bottom: 10px;
    border-bottom: 1px dashed #999;
  }

  #rechtliches .inner {
    flex-direction: column;
  }
}
