/* TATÜT – Theater aus der Tüte
   Portierung der GoLive/FrontPage-Seite von 2006: Optik bleibt, Technik neu.
   Alle Gestaltungswerte leben hier oben. */

/* Comic Neue (SIL Open Font License), selbst gehostet: Ersatz für Comic Sans
   auf iPhone/Android — dort gibt es kein Comic Sans, und der cursive-Fallback
   wäre eine Schnörkelschrift. Reihenfolge: echtes Comic Sans wo vorhanden,
   sonst Comic Neue, sonst normale Serifenlose. */
@font-face {
  font-family: "Comic Neue";
  src: url("../schriften/comic-neue-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Comic Neue";
  src: url("../schriften/comic-neue-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --schrift: "Comic Sans MS", "Comic Sans", "Comic Neue", sans-serif;
  --schrift-fuss: Tahoma, Verdana, sans-serif;
  --farbe-text: #000000;
  --farbe-grund: #ffffff;
  --farbe-akzent: #ff0000;      /* Rot der Stücktitel auf der Termine-Seite */
  --farbe-hinweis: #ff3366;     /* Rosarot des alten Ankündigungs-Popups */
  --farbe-linie: #dddddd;
  --breite-leiste: 210px;
  --breite-inhalt: 1000px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--farbe-grund);
  color: var(--farbe-text);
  font-family: var(--schrift);
  font-size: 15px;
  line-height: 1.55;
}

img { max-width: 100%; height: auto; }

a { color: inherit; }

/* ---------- Kopfzeile ---------- */

.kopf {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 8px 16px;
  background: var(--farbe-grund);
  border-bottom: 1px solid var(--farbe-linie);
}

.kopf .logo { flex: 0 0 auto; display: block; line-height: 0; }
.kopf .logo img { width: 215px; height: auto; }

.gruppen {
  display: flex;
  flex: 1 1 auto;
  justify-content: space-around;
  gap: 0.5rem;
}

.gruppen a {
  font-weight: bold;
  font-size: 14px;
  color: var(--farbe-text);
  text-decoration: none;
  padding: 6px 4px;
  border-bottom: 3px solid transparent;
  text-align: center;
}

.gruppen a:hover { border-bottom-color: var(--farbe-linie); }
.gruppen a[aria-current="true"] { border-bottom-color: var(--farbe-akzent); }

.burger {
  display: none;
  flex: 0 0 auto;
  font-family: var(--schrift);
  font-size: 15px;
  font-weight: bold;
  background: none;
  border: 2px solid var(--farbe-text);
  border-radius: 4px;
  padding: 6px 12px;
  cursor: pointer;
}

/* ---------- Rumpf: Seitenleiste + Inhalt ---------- */

.rumpf {
  display: flex;
  max-width: calc(var(--breite-leiste) + var(--breite-inhalt));
  margin: 0 auto;
  min-height: 60vh;
}

.seitenleiste {
  flex: 0 0 var(--breite-leiste);
  padding: 24px 8px;
  text-align: center;
}

.seitenleiste .gruppe { display: none; }
.seitenleiste .gruppe.aktiv { display: block; }

.seitenleiste h2 {
  font-size: 15px;
  margin: 1.2em 0 0.4em;
}

.seitenleiste ul {
  list-style: none;
  margin: 0 0 1em;
  padding: 0;
}

.seitenleiste li { margin: 0.9em 0; }

.seitenleiste a {
  font-size: 13px;
  color: var(--farbe-text);
  text-decoration: none;
}

.seitenleiste a:hover { text-decoration: underline; }
.seitenleiste a[aria-current="page"] { color: var(--farbe-akzent); font-weight: bold; }

.seitenleiste .neu { color: var(--farbe-akzent); font-weight: bold; }

main {
  flex: 1 1 auto;
  padding: 24px 20px 48px;
  min-width: 0;
}

body.ohne-leiste .seitenleiste { display: none; }
body.ohne-leiste main { max-width: 720px; margin: 0 auto; }

/* ---------- Inhalt ---------- */

h1 {
  font-size: 24px;
  text-align: center;
  font-weight: bold;
  margin: 0.4em 0 1em;
}

main a { text-decoration: underline; }

.zentriert { text-align: center; }

/* Stück-Seiten: Text links, Flyer rechts (altes Tabellen-Layout) */
.stueck {
  display: flex;
  gap: 28px;
  align-items: flex-start;
}

.stueck .text { flex: 1 1 55%; text-align: justify; }
.stueck .bild { flex: 1 1 45%; text-align: center; }
.stueck .bild img { max-width: 100%; height: auto; }

/* Personen (Zwei aus der Tüte) */
.person {
  display: flex;
  gap: 20px;
  margin: 1.2em 0;
  align-items: flex-start;
}
.person img { flex: 0 0 auto; width: 96px; height: auto; }

/* Termine */
.termin { margin: 0 0 2em; }
.termin h2 {
  color: var(--farbe-akzent);
  font-size: 19px;
  margin: 0 0 0.5em;
}
.termin p { margin: 0.2em 0; }

/* Ankündigungs-Box auf der Startseite (ersetzt das alte Popup) */
.ankuendigung {
  border: 3px solid var(--farbe-hinweis);
  border-radius: 8px;
  padding: 14px 18px;
  margin: 1.5em auto;
  max-width: 430px;
  text-align: center;
}
.ankuendigung strong { color: var(--farbe-hinweis); }
.ankuendigung a { color: inherit; }

/* Galerie- und Presseseiten: gestapelte Bilder */
.bildliste { text-align: center; }
.bildliste figure { margin: 0 0 1.5em; }
.bildliste img { max-width: 620px; width: 100%; height: auto; }
.bildliste .breit img { max-width: 100%; }

.zurueck { margin-top: 2em; }

/* ---------- Fußzeile ---------- */

footer {
  border-top: 1px solid var(--farbe-linie);
  padding: 14px 16px;
  font-family: var(--schrift-fuss);
  font-size: 12px;
  text-align: center;
}

footer a { color: inherit; }

/* ---------- Mobil ---------- */

@media (max-width: 860px) {
  .kopf { flex-wrap: wrap; }
  .kopf .logo img { width: 160px; }
  .gruppen { display: none; }
  .burger { display: block; margin-left: auto; }

  .rumpf { display: block; }

  .seitenleiste {
    display: none;
    padding: 8px 16px 16px;
    border-bottom: 1px solid var(--farbe-linie);
  }
  body.menue-offen .seitenleiste { display: block; }
  body.menue-offen.ohne-leiste .seitenleiste { display: block; }

  /* Im offenen Menü alle drei Gruppen zeigen, mit Überschrift */
  body.menue-offen .seitenleiste .gruppe { display: block; }
  .seitenleiste h2 { border-top: 1px solid var(--farbe-linie); padding-top: 0.8em; }
  .seitenleiste .gruppe:first-child h2 { border-top: 0; }
  .seitenleiste li { margin: 0.7em 0; }
  .seitenleiste a { font-size: 15px; }

  .stueck { display: block; }
  .stueck .bild { margin-top: 1.5em; }

  .person { display: block; }
  .person img { margin-bottom: 0.5em; }
}

/* Nur für Screenreader/Suchmaschinen, unsichtbar */
.sr-nur {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Sichtbarer Fokus für Tastaturnutzung */
a:focus-visible, button:focus-visible {
  outline: 3px solid var(--farbe-akzent);
  outline-offset: 2px;
}
