/* =========================================================================
   Blindenfussball-Ausstellung - Stylesheet
   1:1 uebernommen aus den HTML-Referenzen (03-klingelball.html / uebersicht.html),
   zu einem gemeinsamen Stylesheet zusammengefuehrt.
   ========================================================================= */

/* ---------- Schriftart: FC Sans Pauli (Copy) ---------- */
@font-face{
  font-family: "FC Sans Pauli";
  src: url("../fonts/FC_SANS_PAULI_COPY-Regular.woff2") format("woff2"),
       url("../fonts/FC_SANS_PAULI_COPY-Regular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face{
  font-family: "FC Sans Pauli";
  src: url("../fonts/FC_SANS_PAULI_COPY-Bold.woff2") format("woff2"),
       url("../fonts/FC_SANS_PAULI_COPY-Bold.woff") format("woff");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root{
  --bg:          #FAF6F0;
  --text:        #221810;
  --accent:      #6B2A14;
  --accent-soft: #F1E4D8;
  --link:        #E30613;
  --line:        #DDCFC2;
  --focus:       #FFC83D;
  --max-w:       38rem; /* angenehme Lesebreite, primaer fuers Smartphone */
}

/* Auf groesseren Bildschirmen die Inhaltsspalte etwas weiter machen. */
@media (min-width: 48rem){
  :root{ --max-w: 48rem; }
}

*{ box-sizing: border-box; }

html{
  /* respektiert Nutzer-/Browser-Schriftgroesse (Zoom, grosse Schrift) */
  font-size: 100%;
}

body{
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "FC Sans Pauli", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.7;
}

.entry-content a {
color: var(--link);
}

/* ---------- Skip-Link ---------- */
.skip-link{
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: 0.75rem 1.25rem;
  z-index: 100;
  font-weight: 700;
  border-radius: 0 0 0.5rem 0;
}
.skip-link:focus{
  left: 0;
}
/* Sprungziele: etwas Abstand zum oberen Rand, kein stoerender Fokusrahmen
   auf den grossen Bereichen selbst (Fokus wird nur programmatisch gesetzt). */
#inhalt,
#audio,
#station-nav{
  scroll-margin-top: 1rem;
}
#inhalt:focus,
#audio:focus,
#station-nav:focus{
  outline: none;
}

/* ---------- Sichtbarer Fokus ueberall ---------- */
a:focus-visible,
button:focus-visible,
audio:focus-visible{
  outline: 0.2rem solid var(--focus);
  outline-offset: 0.15rem;
}

/* ---------- Layout ---------- */
.wrap{
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 1.25rem 1.25rem 3rem;
}

header.site-header{
  display: flex;
  align-items: center;
  gap: 1rem;
  border-bottom: 0.2rem solid var(--accent);
  padding: 1rem 0 0.75rem;
  margin-bottom: 1.5rem;
}
.header-logo{
  flex: 0 0 auto;
}
.header-logo img{
  display: block;
  width: auto;
  height: 3.5rem; /* Hoehe als Bezug; Breite proportional */
  mix-blend-mode: multiply;
}
.site-header__text{
  min-width: 0;
}
.site-header p{
  margin: 0;
  font-size: 1rem;
  letter-spacing: 0.02em;
}
.exhibition-name{
  font-weight: 700;
  color: var(--accent);
}
.station-counter{
  margin-top: 0.15rem;
  color: #6b5a4d;
}

/* ---------- Sprachauswahl (Polylang) ---------- */
.lang-switcher{
  display: flex;
  justify-content: flex-start;
  margin-bottom: 1.5rem;   /* Abstand zur Ueberschrift (h1) darunter */
}
.lang-switcher__list{
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.lang-switcher__list a{
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;      /* angenehme Touch-/Klickgroesse */
  padding: 0.35rem 0.8rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  color: var(--accent);
  background: var(--bg);
  border: 0.125rem solid var(--accent);
  border-radius: 0.6rem;
}
.lang-switcher__list a:hover,
.lang-switcher__list a:focus-visible{
  color: #fff;
  background: var(--accent);
}
/* Aktive Sprache: gefuellt und nicht anklickbar wirkend. */
.lang-switcher__list .is-current a{
  color: #fff;
  background: var(--accent);
}
.lang-switcher__list .is-current a[aria-current="page"]{
  cursor: default;
}

/* Signatur-Element: einfacher gefuellter Kreis als "Klingel"-Marker.
   Rein dekorativ -> aria-hidden im Markup. */
.marker{
  display: inline-block;
  width: 0.7em;
  height: 0.7em;
  border-radius: 50%;
  background: var(--accent);
  margin-right: 0.5rem;
  vertical-align: middle;
}

h1{
  font-size: 1.5rem;
  line-height: 1.25;
  margin: 0 0 1.25rem;
}

h2,
h3,
h4,
h5 {
  font-size: 1.2rem;
  line-height: 1.25;
}

.intro{
  margin: 0 0 1.75rem;
}

/* ---------- Audio-Box ---------- */
/* Audio-Player stehen unterhalb des Lesetextes. Eine Station kann mehrere
   Player enthalten (Reiter "Audiodateien", audio_1 .. audio_10). */
.audio-list{
  margin-top: 2rem;
}
.audio-box{
  background: var(--accent-soft);
  border: 0.0625rem solid var(--line);
  border-radius: 0.75rem;
  padding: 1.25rem;
  margin: 0 0 1.25rem;
}
.audio-box:last-child{
  margin-bottom: 0;
}
.audio-box h2{
  font-size: 1.1rem;
  margin: 0 0 0.75rem;
}
.audio-box__desc{
  margin: 0 0 0.9rem;
}
audio{
  width: 100%;
}
.speed-controls{
  margin-top: 1rem;
}
.speed-controls p{
  margin: 0 0 0.5rem;
  font-size: 1rem;
}
.speed-buttons{
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.speed-buttons button{
  font: inherit;
  font-size: 1rem;
  padding: 0.5rem 0.9rem;
  border: 0.125rem solid var(--accent);
  background: #fff;
  color: var(--accent);
  border-radius: 0.5rem;
  cursor: pointer;
}
.speed-buttons button[aria-pressed="true"]{
  background: var(--accent);
  color: #fff;
}

/* ---------- Lesetext ---------- */
.station-text p{
  margin: 0 0 1.1rem;
}
/* Optionale Bildbeschreibung (Alt-Text fuer ggf. gezeigte Bilder) */
.bildbeschreibung{
  background: var(--accent-soft);
  border-left: 0.25rem solid var(--accent);
  padding: 0.75rem 1rem;
  margin: 0 0 1.5rem;
  font-size: 1.1rem;
}

/* Naechster Schritt: Wegbeschreibung zur naechsten Station fuer blinde Besucher*innen */
.naechster-schritt{
  background: #fff;
  border: 0.125rem solid var(--accent);
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  margin: 0 0 1.5rem;
  font-size: 1rem;
}

/* ---------- Navigation (Stationsseite) ---------- */
nav.station-nav{
  margin-top: 2.5rem;
  border-top: 0.0625rem solid var(--line);
  padding-top: 1.25rem;
}
nav.station-nav ul{
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
nav.station-nav a{
  display: block;
  padding: 0.9rem 1.1rem;
  border: 0.125rem solid var(--accent);
  border-radius: 0.6rem;
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}
nav.station-nav a:hover,
nav.station-nav a:focus-visible{
  background: var(--accent);
  color: #fff;
}
nav.station-nav .current-list a{
  border-style: dashed;
}

/* ---------- Inhaltsbaum (Uebersichtsseite) ---------- */
.tree{
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: item;   /* fuer automatische, hierarchische Nummerierung */
}
.tree li{
  margin: 0 0 0.6rem;
}
.tree a{
  display: block;
  padding: 0.85rem 1.1rem;
  border: 0.125rem solid var(--accent);
  border-radius: 0.6rem;
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}
.tree a:hover,
.tree a:focus-visible{
  background: var(--accent);
  color: #fff;
}
/* Automatische Nummer ("1.", "2.1." ...) - rein visuell, aus der Hierarchie.
   counters() summiert ueber alle Ebenen -> "2.1.", "2.3." usw. */
.tree li > a::before{
  counter-increment: item;
  content: counters(item, ".") ".\00a0\00a0";
  font-weight: 700;
  display: none;
}
/* Unterebenen leicht eingerueckt und schmaler markiert */
.tree .tree{
  margin: 0.6rem 0 0.6rem 1.25rem;
  padding-left: 0.75rem;
  border-left: 0.125rem solid var(--line);
}
.tree .tree a{
  border-style: dashed;
  font-weight: 500;
  font-size: 1.1rem;
}

/* ---------- Footer ---------- */
footer.site-footer{
  margin-top: 2.5rem;
  font-size: 0.95rem;
  color: #6b5a4d;
  border-top: 0.0625rem solid var(--line);
  padding-top: 1rem;
}

/* Footer-Navigation */
.footer-nav{
  margin-bottom: 0.85rem;
}
.footer-nav__list{
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.25rem;
}
.footer-nav__list a{
  display: inline-block;
  padding: 0.15rem 0.4rem;
  border-radius: 0.35rem;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.2em;
  font-weight: 600;
}
/* Fokus/Hover: Farben umkehren (Akzent-Hintergrund, heller Text). */
.footer-nav__list a:hover,
.footer-nav__list a:focus-visible{
  background: var(--accent);
  color: #fff;
  text-decoration: none;
}
.footer-nav__list .current-menu-item > a{
  text-decoration: none; /* aktuelle Seite nicht unterstrichen */
}

/* ---------- Barrierefreiheits-Widget (sticky, ausklappbar) ---------- */
.a11y-widget{
  position: fixed;
  bottom: 0.75rem;
  left: 0.75rem;
  z-index: 90;
}
.a11y-toggle{
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font: inherit;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  min-height: 2.75rem;
  padding: 0.5rem 0.85rem;
  color: #fff;
  background: var(--accent);
  border: 0.125rem solid var(--accent);
  border-radius: 0.6rem;
  box-shadow: 0 0.15rem 0.5rem rgba(0, 0, 0, 0.22);
}
.a11y-toggle__icon{
  flex: 0 0 auto;
}
.a11y-panel{
  position: absolute;
  bottom: calc(100% + 0.5rem);
  left: 0;
  width: min(18rem, calc(100vw - 1.5rem));
  background: var(--bg);
  border: 0.125rem solid var(--accent);
  border-radius: 0.6rem;
  padding: 0.85rem;
  box-shadow: 0 0.3rem 0.8rem rgba(0, 0, 0, 0.2);
}
.a11y-panel[hidden]{
  display: none;
}
.a11y-panel__title{
  margin: 0 0 0.6rem;
  font-weight: 700;
  color: var(--accent);
}
.a11y-panel__group{
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.a11y-btn{
  font: inherit;
  font-size: 1rem;       /* etwas kleiner als Fliesstext */
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;   /* Label nicht umbrechen ("Hoher Kontrast") */
  cursor: pointer;
  min-height: 2.75rem; /* angenehme Touch-/Klickgroesse */
  min-width: 2.75rem;
  padding: 0.4rem 0.75rem;
  color: var(--accent);
  background: var(--bg);
  border: 0.125rem solid var(--accent);
  border-radius: 0.5rem;
}
.a11y-btn:hover,
.a11y-btn[aria-pressed="true"]{
  background: var(--accent);
  color: #fff;
}
.a11y-btn:disabled{
  opacity: 0.4;
  cursor: not-allowed;
}

/* Modus: Hoher Kontrast (maximales Schwarz auf Weiss) */
.a11y-contrast{
  --bg:          #fff;
  --text:        #000;
  --accent:      #000;
  --accent-soft: #fff;
  --line:        #000;
  --focus:       #ffd400;
}
.a11y-contrast body{
  background: #fff;
  color: #000;
}
.a11y-contrast .station-counter,
.a11y-contrast footer.site-footer{
  color: #000;
}
.a11y-contrast .header-logo img{
  mix-blend-mode: normal;
}

/* Modus: Links betonen */
.a11y-links a{
  text-decoration: underline;
  text-underline-offset: 0.2em;
  text-decoration-thickness: 0.12em;
}

/* System-Kontrastmodus (Windows-Kontrast / forced-colors) unterstuetzen */
@media (forced-colors: active){
  .a11y-toggle,
  .a11y-btn,
  .a11y-panel{
    border: 0.125rem solid ButtonText;
  }
  .header-logo img{
    mix-blend-mode: normal; /* sonst evtl. unsichtbar */
  }
  a:focus-visible,
  button:focus-visible,
  audio:focus-visible{
    outline: 0.2rem solid Highlight;
  }
}

/* Nutzer wuenscht mehr Kontrast -> Sekundaertexte voll ausreizen */
@media (prefers-contrast: more){
  .station-counter,
  footer.site-footer{
    color: var(--text);
  }
}

/* Schmale Screens: Toggle nur als Icon, Platz im Header freihalten. */
@media (max-width: 34rem){
  .a11y-toggle{
    padding: 0.5rem;
    min-width: 2.75rem;
    justify-content: center;
  }
  .a11y-toggle__label{
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
  }
}

/* Bewegungsreduktion respektieren */
@media (prefers-reduced-motion: reduce){
  *{ scroll-behavior: auto !important; }
}
