/* ==========================================================================
   Body & Soul Stadthagen – gemeinsames Stylesheet für alle Seiten
   Mobile-first: Basis gilt für Smartphones, größere Bildschirme ergänzen.
   ========================================================================== */

:root {
  --brand: #328604;
  --brand-dark: #256303;
  --brand-tint: #eef5e8;
  --ink: #1c241a;
  --muted: #4f5a4a;
  --rule: #c5ccbd;
  --rule-soft: #e2e6dc;
  --paper: #fff;
  --focus: #0b57d0;

  --display: "Poiret One", "Century Gothic", "Avenir Next", "Trebuchet MS", sans-serif;
  --text: "Asap", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;

  --wrap: 50rem;
  --pad: clamp(1rem, 4.5vw, 2.25rem);
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-padding-top: 5.5rem;
  -webkit-text-size-adjust: 100%;
          text-size-adjust: 100%;
}

body {
  margin: 0;
  font: 1.0625rem/1.65 var(--text);
  color: var(--ink);
  background: #fff url(17.gif) repeat;
  overflow-wrap: break-word;
}

img, video, iframe { max-width: 100%; }
img { border: 0; }

a {
  color: var(--brand-dark);
  text-underline-offset: .18em;
}
@media (hover: hover) {
  a:hover {
    color: #fff;
    background: var(--brand);
    text-decoration-color: transparent;
  }
}
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.skip {
  position: absolute;
  left: .5rem;
  top: -4rem;
  z-index: 50;
  padding: .6rem 1rem;
  background: var(--paper);
  border: 2px solid var(--brand);
}
.skip:focus { top: .5rem; }

/* --------------------------------------------------------------------------
   Kopfleiste (sticky): Hauptnavigation auf der Startseite,
   Markenname + Zurück-Link auf allen anderen Seiten
   -------------------------------------------------------------------------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--paper);
  border-bottom: 2px solid var(--brand);
  padding-top: env(safe-area-inset-top);
}
.topbar--sub { position: static; }
.topbar-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0 1rem;
  padding: 0 var(--pad);
}
.brand {
  font: 400 1.35rem/1.2 var(--display);
  -webkit-text-stroke: .3px currentColor;
  color: var(--ink);
  text-decoration: none;
  padding: .7rem 0;
}
.zurueck {
  padding: .7rem 0;
  text-decoration: none;
  font-weight: 700;
  white-space: nowrap;
}

.hauptnav { max-width: var(--wrap); margin: 0 auto; }
.hauptnav ul {
  display: flex;
  margin: 0;
  padding: 0;
  list-style: none;
}
.hauptnav li { flex: 1 1 0; min-width: 0; }
.hauptnav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .2rem;
  height: 100%;
  padding: .5rem .25rem;
  color: #4a5260;
  background: var(--paper);
  text-decoration: none;
  text-align: center;
  font-size: .8125rem;
  line-height: 1.2;
  hyphens: auto;
  -webkit-hyphens: auto;
  border-bottom: 4px solid transparent;
  margin-bottom: -2px;
}
.hauptnav a img { width: 24px; height: 24px; flex: none; }
.hauptnav a[aria-current="true"] {
  background: var(--brand);
  color: #fff;
  border-bottom-color: var(--brand-dark);
}
@media (hover: hover) {
  .hauptnav a:hover {
    background: var(--brand);
    color: #fff;
    border-bottom-color: var(--brand-dark);
  }
}

/* --------------------------------------------------------------------------
   Seitenaufbau
   -------------------------------------------------------------------------- */
main {
  display: block;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 1.25rem 0 0;
}

.abschnitt {
  background: var(--paper);
  border: 1px solid var(--rule);
  margin: 0 0 1.5rem;
}

/* grünes Titelband (h2 auf der Startseite, h1 auf Unterseiten) */
.band {
  margin: 0;
  padding: .55rem var(--pad) .7rem;
  background: var(--brand);
  color: #f5f5f5;
  text-align: center;
  font: 400 clamp(1.75rem, 6.5vw, 2.4rem)/1.2 var(--display);
  -webkit-text-stroke: .5px currentColor;
  text-wrap: balance;
}

.inhalt { padding: var(--pad); }
.inhalt > :first-child { margin-top: 0; }
.inhalt > :last-child { margin-bottom: 0; }

/* --------------------------------------------------------------------------
   Startseite: Kopfbereich
   -------------------------------------------------------------------------- */
.kopf {
  background: var(--paper);
  border: 1px solid var(--rule);
  margin: 0 0 1.5rem;
  text-align: center;
}
.kopf h1 {
  margin: 0;
  padding: 1.6rem var(--pad) 1.4rem;
  font: 400 clamp(2.1rem, 8.5vw, 3.6rem)/1.12 var(--display);
  -webkit-text-stroke: .6px currentColor;
  letter-spacing: .01em;
  text-wrap: balance;
  position: relative;
}
/* Zierleiste unter dem Titel: dünne Linie mit Raute, angelehnt an das Rautenmuster im Hintergrund */
.kopf h1 { padding-bottom: 3.1rem; }
.kopf h1::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 1.2rem;
  width: min(14rem, 60%);
  height: 1px;
  background: var(--brand);
  transform: translateX(-50%);
}
.kopf h1::before {
  content: "";
  position: absolute;
  z-index: 1;
  left: 50%;
  bottom: calc(1.2rem - .32rem);
  width: .64rem;
  height: .64rem;
  background: var(--brand);
  outline: .4rem solid var(--paper);
  transform: translateX(-50%) rotate(45deg);
}
.ensemble { padding: 0 var(--pad) 1.5rem; }
.ensemble h2 {
  margin: 0 0 .25rem;
  font-size: 1.2rem;
  line-height: 1.3;
}
.ensemble p { margin: 0 0 1rem; text-wrap: balance; hyphens: manual; -webkit-hyphens: manual; }
.ensemble img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--rule);
  padding: 4px;
  background: var(--paper);
}
.willkommen {
  margin: 0;
  padding: 1.25rem var(--pad);
  background: var(--brand);
  color: #f5f5f5;
  text-wrap: balance;
}

/* --------------------------------------------------------------------------
   Beiträge, Überschriften, Fließtext
   -------------------------------------------------------------------------- */
.beitrag + .beitrag {
  margin-top: 2.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--rule);
}
h3 {
  margin: 1.5em 0 .6em;
  font-size: clamp(1.2rem, 4.6vw, 1.45rem);
  line-height: 1.3;
  text-wrap: balance;
}
.beitrag > h3:first-child { margin-top: 0; }
h4 {
  margin: 1.2em 0 .5em;
  font-size: 1.15rem;
  line-height: 1.35;
}
.inhalt h2:not(.band) {
  margin: 2rem 0 .75rem;
  font-size: clamp(1.3rem, 5vw, 1.6rem);
  line-height: 1.25;
  text-wrap: balance;
}
.inhalt > h2:first-child { margin-top: 0; }

p { margin: 0 0 1em; }
.beitrag p, .inhalt p {
  hyphens: auto;
  -webkit-hyphens: auto;
}
.vorspann { margin-bottom: .25em; color: var(--muted); }
.quelle {
  margin: -.2rem 0 1rem;
  font-weight: 700;
  color: var(--muted);
}
.kicker {
  margin: 0 0 .1rem;
  font-weight: 700;
  color: var(--brand-dark);
}
.sponsor {
  hyphens: manual;
  -webkit-hyphens: manual;
  margin: 0 0 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--rule);
  color: var(--muted);
  text-align: center;
  text-wrap: balance;
}

ul, ol { margin: 0 0 1.25em; padding-left: 1.4em; }
li { margin: 0 0 .35em; }
.beitrag ul { list-style: square; }

/* --------------------------------------------------------------------------
   Bilder, Video, YouTube
   -------------------------------------------------------------------------- */
/* Galerie: alle Bilder gleich groß (festes Seitenverhältnis).
   Der Browser reserviert den Platz sofort, deshalb springt beim
   Nachladen nichts mehr. Seitenverhältnis hier zentral ändern: */
.galerie {
  --seitenverhaeltnis: 4 / 3;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 30rem), 1fr));
  gap: .6rem;
  margin: 1.1rem 0;
}
.galerie img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: var(--seitenverhaeltnis);
  object-fit: contain;
  padding: 3px;
  background: var(--paper);
  border: 1px solid var(--rule);
}

.video {
  position: relative;
  aspect-ratio: 16 / 9;
  max-width: 40rem;
  margin: 1rem 0 1.5rem;
  background: #000;
}
.video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.film {
  display: block;
  width: 100%;
  height: auto;
  margin: .5rem 0 1.25rem;
  background: #000;
}

/* --------------------------------------------------------------------------
   Termine
   -------------------------------------------------------------------------- */
.termine { margin: 0; padding: 0; list-style: none; }
.termine li {
  margin: 0;
  padding: 1rem 0 1rem 2.9rem;
  border-bottom: 1px solid var(--rule);
  background: url(images/star32.png) no-repeat 0 .95rem / 28px 28px;
}
.termine li:last-child { border-bottom: 0; }

/* --------------------------------------------------------------------------
   Programm (Big-Band-Meeting-Seiten)
   -------------------------------------------------------------------------- */
.zeitplan { list-style: none; padding: 0; margin: 0 0 1.75rem; }
.zeitplan li {
  display: grid;
  grid-template-columns: 5.6rem 1fr;
  gap: 0 .75rem;
  margin: 0;
  padding: .55rem 0;
  border-bottom: 1px solid var(--rule-soft);
}
.zeitplan li.ohne-zeit { display: block; padding-left: 6.35rem; }
.zeit { font-weight: 700; color: var(--brand-dark); white-space: nowrap; }

.downloads {
  list-style: none;
  padding: 0;
  margin: 1.25rem 0 2rem;
  display: grid;
  gap: .5rem;
}
.downloads li { margin: 0; }
.downloads a {
  display: block;
  padding: .7rem 1rem;
  border: 1px solid var(--rule);
  border-left: 4px solid var(--brand);
  background: var(--paper);
  text-decoration: none;
}
.downloads a:active { background: var(--brand-tint); }
.downloads a:hover { border-color: var(--brand); }


.hinweis {
  margin: 1rem 0 1.75rem;
  padding: 1rem 1.1rem 0;
  background: var(--brand-tint);
  border-left: 4px solid var(--brand);
}
.teilnehmer p { margin-bottom: 1rem; }

/* Teilnehmerlisten, Grußworte */
.grusswort { margin: 0 0 1.75rem; }
.grusswort p:last-child { margin-bottom: 0; }
.grusswort p:last-child { margin-top: 1.25rem; font-weight: 700; }

/* --------------------------------------------------------------------------
   CDs mit Hörproben
   -------------------------------------------------------------------------- */
.cd {
  display: grid;
  grid-template-columns: minmax(0, 11rem) 1fr;
  gap: 1rem 1.5rem;
  padding: 1.75rem 0;
  border-top: 1px solid var(--rule);
}
.cd > img {
  width: 100%;
  height: auto;
  padding: 4px;
  background: var(--paper);
  border: 1px solid var(--rule);
}
.cd h3 { margin-top: 0; }
.tracks { list-style: none; padding: 0; margin: 0; }
.tracks li { margin: 0; padding: .8rem 0; border-bottom: 1px solid var(--rule-soft); }
.tracks li:last-child { border-bottom: 0; }
.tracks p { margin: 0 0 .4rem; }
.tracks audio { display: block; width: 100%; height: 2.6rem; }

.cover-reihe {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin: 1rem 0;
}
.cover-reihe img {
  width: 11rem;
  max-width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
  padding: 4px;
  background: var(--paper);
  border: 1px solid var(--rule);
}

/* --------------------------------------------------------------------------
   Fußbereich und „nach oben“
   -------------------------------------------------------------------------- */
.fuss {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 1rem var(--pad) 3.5rem;
  text-align: center;
}
.fuss p { margin: 0 0 .5rem; }
.fuss a { padding: .5rem .75rem; display: inline-block; }

.nach-oben {
  position: fixed;
  right: max(1rem, env(safe-area-inset-right));
  bottom: max(1rem, env(safe-area-inset-bottom));
  z-index: 30;
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  text-decoration: none;
  box-shadow: 0 2px 8px rgb(0 0 0 / .3);
}
.nach-oben:hover, .nach-oben:active { background: var(--brand-dark); color: #fff; }
.nach-oben[hidden] { display: none; }

/* --------------------------------------------------------------------------
   Größere Bildschirme
   -------------------------------------------------------------------------- */
@media (min-width: 40rem) {
  main { padding-top: 1.75rem; }
  .hauptnav a {
    flex-direction: row;
    gap: .6rem;
    padding: .65rem .5rem;
    font-size: 1rem;
    hyphens: manual;
    -webkit-hyphens: manual;
  }
}

/* Schmale Smartphones */
@media (max-width: 30rem) {
  body { font-size: 1rem; }
  main { padding-top: 0; }
  .abschnitt, .kopf { border-left: 0; border-right: 0; }
  .zeitplan li { grid-template-columns: 4.9rem 1fr; gap: 0 .5rem; }
  .zeitplan li.ohne-zeit { padding-left: 5.4rem; }
  .cd { grid-template-columns: 1fr; }
  .cd > img { max-width: 11rem; }
  .brand { font-size: 1.2rem; }
}

@media print {
  .topbar, .nach-oben, .skip { display: none; }
  body { background: #fff; }
  .abschnitt, .kopf { border: 0; }
}
