/*InFlos: Formatgebung
erstellt 2005, überarbeitet 2022 und 2026 von Florian Neymeyer - gern kopieren :-) */

/* == CSS-VARIABLEN == */
:root {
  --color-primary: #001a80;
  --color-primary-light: #E8F0FF;
  --color-accent: #CC6600;
  --color-bg: #E6F7FF;
  --color-text: #000000;
  --color-text-light: #555555;
  --color-border: #CCCCCC;
  --color-gray: #999999;
  --color-white: #FFFFFF;
  --color-light-gray: #F7F7F7;
  --font-stack: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Verdana, Arial, sans-serif;
  --transition-fast: 150ms ease;
  --transition-normal: 250ms cubic-bezier(0.25, 0.8, 0.25, 1);
  --transition-smooth: 0.3s ease;
  --spacing-xs: 0.1em;
  --spacing-sm: 0.3em;
  --spacing-md: 0.5em;
  --spacing-lg: 0.8em;
  --spacing-xl: 1em;
  --spacing-2xl: 1.5em;
  --spacing-3xl: 2em;
}

/* == RESET & BASE == */
* {
  font-family: var(--font-stack);
  font-size: 1em;
}

html {
  scroll-behavior: smooth;
}

body {
  color: var(--color-text);
  background-color: var(--color-bg);
  margin: 0;
}

/* == HEADINGS == */
h1,
h2,
h3,
h4 {
  color: var(--color-primary);
  text-align: left;
  margin: 0;
}

h1 {
  font-size: 2em;
  font-weight: 900;
  position: absolute;
  left: 12rem;
  top: 2.5rem;
  text-align: center;
}

h2 {
  font-size: 1.5em;
  margin-bottom: 0.3em;
}

h3 {
  font-size: 1em;
  margin: 0.5em 0 0.2em;
}

h4 {
  font-size: 1em;
  margin: 0.4em 0 0.3em;
}

a

/* == LINKS == */
a {
  text-decoration: none;
  transition: var(--transition-fast);
}

a:link {
  color: var(--color-accent);
}

a:visited {
  color: var(--color-primary);
}

a:hover,
a:focus-visible,
a:visited:hover,
a:visited:focus-visible {
  color: var(--color-bg);
  background-color: var(--color-accent);
}

/* == LAYOUT ELEMENTE == */
ul {
  margin-top: var(--spacing-xs);
}

#infloslogo {
  position: absolute;
  top: 1em;
  left: 3em;
}

/* == NAVIGATION == */
#navi,
#auswahl {
  position: absolute;
  top: 8em;
  width: 8em;
  line-height: 1.15;
  border: 1px solid var(--color-primary);
  padding: var(--spacing-xl);
  background-color: var(--color-bg);
}

#navi {
  left: 1em;
}

#auswahl {
  right: 1em;
}

#navi a,
#auswahl a {
  display: block;
  padding: 0.15em 0.1em;
  margin-bottom: 0.2em;
}

#navi a:last-of-type,
#auswahl a:last-of-type {
  margin-bottom: 0;
}

#navi h4,
#auswahl h4 {
  margin-bottom: 0.5em;
  margin-top: 0.5em;
  font-size: 0.95em;
  font-weight: 600;
}

#navi h4:first-child,
#auswahl h4:first-child {
  margin-top: 0;
}

#auswahl.vielauswahl {
  line-height: 1;
}

#auswahl.vielauswahl a {
  padding: 0.08em 0.05em;
  margin-bottom: 0.08em;
}

#auswahl.vielauswahl h4 {
  margin: 0.1em 0;
}

/* == INHALTSBEREICH == */
#inhalt {
  position: absolute;
  top: 8em;
  left: 12em;
  right: 12em;
  border: 1px dashed var(--color-primary);
  padding: var(--spacing-md);
  margin-bottom: 2em;
}

#links {
  padding: var(--spacing-xs);
  width: 10.5em;
  border: 1px dotted var(--color-primary);
  margin: 0 0.8em var(--spacing-md) 0;
  float: left;
  text-align: left;
  z-index: 0;
}

#text {
  padding: var(--spacing-xs);
  display: flow-root;
}

/* == BILDER == */
#stationsbeschreibung img,
#illustration img {
  max-width: 100%;
  width: auto;
  height: auto;
  display: block;
}

/* == FOOTER == */
#copy {
  position: absolute;
  bottom: 0;
  left: 0;
  font-size: 0.8em;
  z-index: 1;
  width: auto;
  padding: var(--spacing-md);
  box-sizing: border-box;
  background-color: transparent;
}

/* == BREADCRUMB NAVIGATION == */
.breadcrumb {
  padding: 6px 0;
  margin: 0 0 8px;
  border-bottom: 1px solid var(--color-primary);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.breadcrumb-path {
  flex: 1;
  min-width: 0;
}

.breadcrumb-path ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  font-size: 12px;
  line-height: 1.5;
  align-items: center;
}

.breadcrumb-path li {
  display: inline;
}

.breadcrumb-path li:not(:last-child)::after {
  content: " > ";
  margin: 0 2px;
  color: var(--color-primary);
}

.breadcrumb-path a,
.breadcrumb-path strong,
.lang-link {
  color: var(--color-primary);
  text-decoration: none;
}

.breadcrumb-path a:hover,
.lang-link:hover {
  color: var(--color-bg);
  background-color: var(--color-accent);
}

.breadcrumb-path a:focus-visible,
.lang-link:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 0;
}

.breadcrumb-path strong {
  font-weight: bold;
}

.breadcrumb-lang {
  flex-shrink: 0;
  white-space: nowrap;
  font-size: 12px;
}

#hamburger-open,
#hamburger-close {
  display: none;
}

/* == CARD-GRID STARTSEITE == */
.cards-section {
  margin-bottom: 2em;
  padding-bottom: 1.5em;
  border-bottom: 2px solid var(--color-primary);
  position: relative;
  z-index: 1;
}

.cards-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.section-category-label {
  font-size: 0.7em;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
  margin-bottom: 0.5em;
  display: block;
}

.section-question-heading {
  font-size: 1.3em;
  font-weight: 700;
  color: var(--color-primary);
  margin: 0 0 1em;
  line-height: 1.3;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, 140px);
  gap: 1em;
  justify-content: start;
  margin-top: 1em;
  position: relative;
  z-index: 1;
}

.card-link {
  display: block;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  aspect-ratio: 5/7;
  width: 100%;
  border-radius: 8px;
  transition: var(--transition-normal);
  outline-offset: 4px;
  position: relative;
  z-index: 1;
}

.card-link:hover {
  z-index: 10;
}

.card-link:focus-visible {
  outline: 2px solid var(--color-primary);
  border-radius: 8px;
}

.card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  overflow: hidden;
  transition: var(--transition-smooth);
  box-shadow: 0 2px 5px #00000020;
  position: relative;
}

.card-link:hover .card {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 12px 20px #001a8026;
  border-color: var(--color-primary);
}

.card-header {
  height: 3.4em;
  padding: 0.5em 0.8em;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  font-weight: 700;
  font-size: 0.9em;
  line-height: 1.15;
  color: var(--color-primary);
  border-bottom: 2px solid var(--color-border);
  background: var(--color-light-gray);
  transition: var(--transition-smooth);
  hyphens: auto;
  word-wrap: break-word;
  flex-shrink: 0;
  min-height: 3.4em;
}

.card-link:hover .card-header {
  background-color: var(--color-primary-light);
}

.card-body {
  padding: 0.8em;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.card-description {
  font-size: 0.85em;
  color: var(--color-text-light);
  line-height: 1.4;
  margin: 0;
  hyphens: auto;
  -webkit-hyphens: auto;
}

/* == SECTION-SPEZIFISCHE FARBEN == */
.section-1 .card-header {
  border-bottom: 3px solid #E8944D;
  background: #FFF5E8;
  color: var(--color-primary);
}

.section-1 .card-link:hover .card-header {
  background-color: #FFEAD0;
  border-bottom-color: var(--color-accent);
}

.section-2 .card-header {
  border-bottom: 3px solid #4A7C59;
  background: #EEFAEE;
  color: var(--color-primary);
}

.section-2 .card-link:hover .card-header {
  background-color: #DFF5DF;
  border-bottom-color: var(--color-accent);
}

.section-3 .card-header {
  border-bottom: 3px solid #8B5A94;
  background: #F7EEFB;
  color: var(--color-primary);
}

.section-3 .card-link:hover .card-header {
  background-color: #EFDDF7;
  border-bottom-color: var(--color-accent);
}

.section-1 .section-category-label {
  color: #E8944D;
}

.section-2 .section-category-label {
  color: #4A7C59;
}

.section-3 .section-category-label {
  color: #8B5A94;
}

/* == TOOLTIP == */
.tooltip-wrapper {
  position: relative;
  display: inline;
  white-space: nowrap;
  overflow: visible;
}

.tooltip-icon {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  margin: 0 2px 0 4px;
  border-radius: 50%;
  background: var(--color-primary);
  color: var(--color-bg);
  font-size: 11px;
  font-weight: 800;
  cursor: help;
  flex-shrink: 0;
  transition: var(--transition-fast);
  border: 1px solid var(--color-primary);
  vertical-align: middle;
  text-decoration: none;
  transform: translateY(-8%);
}

.tooltip-wrapper:hover .tooltip-icon {
  background: var(--color-accent);
  border-color: var(--color-accent);
}

.tooltip-text {
  position: absolute;
  bottom: 130%;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: auto;
  padding: 10px 12px;
  background: var(--color-primary);
  color: var(--color-bg);
  font-size: 13px;
  line-height: 1.4;
  border-radius: 6px;
  white-space: normal;
  width: 180px;
  text-align: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-fast), visibility var(--transition-fast);
  box-shadow: 0 4px 12px #001a8040;
  border: 1px solid var(--color-accent);
  font-weight: normal;
  z-index: 100;
  overflow: visible !important;
}

.tooltip-text::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--color-primary);
}

.tooltip-wrapper:hover .tooltip-text {
  opacity: 1;
  visibility: visible;
}

/* == DRUCKFUNKTION == */
#print-section {
  clear: both;
  margin-top: 1.5em;
  padding-top: 1em;
  border-top: 1px solid var(--color-primary);
  text-align: center;
}

#print-btn {
  padding: 0.5em 1em;
  background-color: var(--color-accent);
  color: var(--color-bg);
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95em;
  transition: var(--transition-fast);
}

#print-btn:hover {
  background-color: #b35900;
}

#print-btn:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* == MOBILE (max-width: 768px) == */
@media (max-width: 768px) {
  h1 {
    position: static !important;
    font-size: 1.2em;
    text-align: center;
    margin: 0.5em 0 !important;
  }

  h2 {
    margin-bottom: 0.1em !important;
  }

  #infloslogo {
    position: static !important;
    text-align: center;
    margin-bottom: 0.5em;
  }

  #inhalt {
    position: static !important;
    width: auto !important;
    border: 1px dashed var(--color-primary) !important;
    padding: 1em !important;
    margin: 0 auto 3.5em !important;
    display: block important;
    box-sizing: border-box;
  }

  #copy {
    position: fixed !important;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100% !important;
    text-align: center;
    padding: 0.5em !important;
    background-color: var(--color-bg) !important;
    border-top: 2px solid var(--color-primary) !important;
    font-size: 0.8em;
    z-index: 1000 !important;
    box-sizing: border-box !important;
  }

  #hamburger-open,
  #hamburger-close {
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 9999;
    background: var(--color-accent);
    color: var(--color-bg);
    padding: 0.45rem 0.8rem;
    border-radius: 4px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 1px 3px #00000026;
  }

  #hamburger-open {
    display: inline-block !important;
  }

  #hamburger-close {
    display: none !important;
  }

  #navi,
  #auswahl {
    display: none !important;
    position: static !important;
    background-color: var(--color-bg) !important;
    width: 100% !important;
    z-index: 998;
    border: 1px solid var(--color-primary) !important;
    padding: 1rem !important;
    overflow: visible !important;
    margin-bottom: 1rem !important;
    box-sizing: border-box;
    line-height: 1.3 !important;
  }

  #navi a,
  #auswahl a {
    display: block !important;
    padding: 0.15em 0.1em !important;
    margin-bottom: 0.2em !important;
  }

  #navi a:last-of-type,
  #auswahl a:last-of-type {
    margin-bottom: 0 !important;
  }

  #navi h4,
  #auswahl h4 {
    margin: 0.5em 0 !important;
    font-size: 0.95em !important;
    font-weight: 600 !important;
  }

  #navi h4:first-child,
  #auswahl h4:first-child {
    margin-top: 0 !important;
  }

  #auswahl.vielauswahl {
    line-height: 1.03 !important;
  }

  #auswahl.vielauswahl a {
    padding: 0.1em 0.05em !important;
    margin-bottom: 0.1em !important;
  }

  #auswahl.vielauswahl h4 {
    margin: 0.2em 0 0.1em !important;
  }

  #menu:target~#navi,
  #menu:target~#auswahl,
  #menu-toggle:checked~#navi,
  #menu-toggle:checked~#auswahl {
    display: block !important;
    position: static !important;
    z-index: 998;
  }

  #menu:target~#hamburger-open,
  #menu-toggle:checked~#hamburger-open {
    display: none !important;
  }

  #menu:target~#hamburger-close,
  #menu-toggle:checked~#hamburger-close {
    display: inline-block !important;
  }

  #text img,
  #inhalt img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
    clear: both !important;
    margin: 0.5em 0 !important;
  }

  #links {
    width: 100% !important;
    margin: 0 auto 0.5em !important;
    float: none !important;
    clear: both !important;
  }

  #text {
    clear: both !important;
    overflow: visible !important;
    padding: var(--spacing-xs) !important;
    display: block !important;
    width: 100% !important;
  }

  #stationsbeschreibung,
  #illustration {
    order: 2 !important;
    width: 100% !important;
    display: block !important;
    margin: 0.5em 0 !important;
    clear: both !important;
  }

  .tooltip-icon {
    width: 22px;
    height: 22px;
    font-size: 12px;
  }

  .tooltip-text {
    width: 150px;
  }

  .tooltip-text::after {
    border-top-color: var(--color-primary);
  }

  .tooltip-wrapper:focus-within .tooltip-text {
    opacity: 1;
    visibility: visible;
  }

  #print-section {
    order: 3 !important;
    margin-top: 2em !important;
    padding-top: 1em !important;
    border-top: 1px solid var(--color-primary) !important;
    text-align: center !important;
  }

  #inhalt>#text,
  #inhalt>#links {
    order: 1 !important;
  }

  #menu {
    scroll-margin-top: 4rem;
  }
}

/* == PRINT == */
@media print {

  #print-btn,
  #print-section,
  #navi,
  #auswahl,
  #hamburger-open,
  #hamburger-close,
  #copy,
  #illustration,
  #illustration img,
  .tooltip-icon {
    display: none !important;
  }

  body {
    background-color: white;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  #inhalt {
    position: static !important;
    border: none;
    padding: 0;
  }

  h1 {
    position: static !important;
    margin-bottom: 1em;
  }

  #stationsbeschreibung {
    page-break-inside: avoid !important;
  }

  #infloslogo {
    position: static !important;
  }
}