/* Polizeimusik Salzburg – Farben aus dem Wappen */
:root {
  --blau: #1f2466;
  --blau-dunkel: #141849;
  --gold: #f2b705;
  --rot: #d22630;
  --text: #1d1f2b;
  --grau: #5b5f6e;
  --linie: #dfe1ea;
  --flaeche: #f5f6fa;
  --breite: 76rem;
  --text-breite: 64rem;
  --rund: 10px;
  --schatten: 0 1px 2px rgba(20, 24, 73, .06), 0 4px 16px rgba(20, 24, 73, .06);
  --schatten-hover: 0 2px 4px rgba(20, 24, 73, .08), 0 10px 28px rgba(20, 24, 73, .14);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  line-height: 1.6;
}

* { box-sizing: border-box; }
body { margin: 0; background: #fff; }
@media (min-width: 1200px) { :root { font-size: 106.25%; } }   /* 17 px auf großen Bildschirmen */
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blau); text-underline-offset: 2px; }
a:hover { color: var(--rot); }
h1, h2, h3 { line-height: 1.25; color: var(--blau-dunkel); }
h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); letter-spacing: -.01em; }
.seite > h1, .breit > h1 { margin-bottom: 1.5rem; padding-bottom: .6rem; background: linear-gradient(var(--gold), var(--gold)) left bottom / 4rem 4px no-repeat; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.klein { font-size: .875rem; color: var(--grau); }

.springen { position: absolute; left: -999px; }
.springen:focus { left: 1rem; top: 1rem; z-index: 10; background: #fff; padding: .5rem 1rem; }

/* Kopf mit rotem Streifen wie im Wappen */
.kopf { background: var(--blau); border-top: 4px solid var(--rot); position: sticky; top: 0; z-index: 5; }
.kopf-innen { max-width: var(--breite); margin: 0 auto; padding: .5rem 1rem; display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.marke { display: flex; align-items: center; gap: .75rem; color: #fff; text-decoration: none; line-height: 1.15; margin-right: auto; }
.marke:hover { color: var(--gold); }
.marke strong { color: var(--gold); font-size: 1.15rem; letter-spacing: .04em; }
.menue ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .25rem; }
.menue a { display: block; padding: .5rem .75rem; color: #fff; text-decoration: none; border-radius: 4px; }
.menue a:hover, .menue a[aria-current] { background: var(--blau-dunkel); color: var(--gold); }
.menue-knopf { display: none; }

@media (max-width: 860px) {
  .menue-knopf { display: block; background: none; color: #fff; border: 2px solid var(--gold); border-radius: 4px; padding: .4rem .9rem; font: inherit; cursor: pointer; }
  .menue { flex-basis: 100%; }
  .js .menue:not(.offen) { display: none; }
  .menue ul { flex-direction: column; padding-bottom: .5rem; }
}

main { min-height: 50vh; }

/* Startseite */
.held { position: relative; background: var(--blau-dunkel); }
.held img { width: 100%; max-height: 70vh; object-fit: cover; opacity: .55; }
.held-text { position: absolute; inset: auto 0 0 0; max-width: var(--breite); margin: 0 auto; padding: 1.5rem 1rem 2rem; color: #fff; }
.held-text h1 { color: #fff; margin: 0 0 .5rem; text-shadow: 0 2px 8px rgba(0,0,0,.5); }
.held-text p { max-width: 40rem; margin: 0 0 1rem; text-shadow: 0 1px 6px rgba(0,0,0,.6); }
@media (max-width: 600px) {
  .held img { opacity: 1; max-height: none; }
  .held-text { position: static; background: var(--blau-dunkel); }
}
.knopf { display: inline-block; background: var(--gold); color: var(--blau-dunkel); font-weight: 600; padding: .65rem 1.3rem; border-radius: 999px; text-decoration: none; transition: background .15s, box-shadow .15s; }
.knopf:hover { box-shadow: var(--schatten-hover); }
.knopf:hover { background: #fff; color: var(--blau-dunkel); }

.spalten { max-width: var(--breite); margin: 0 auto; padding: 2rem 1rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); gap: 2rem; }
.block h2 { border-bottom: 3px solid var(--gold); padding-bottom: .25rem; }

.termine, .berichte { list-style: none; margin: 0 0 1rem; padding: 0; }
.termine { display: grid; gap: .75rem; }
.termine li { display: flex; gap: 1rem; align-items: flex-start; padding: .9rem 1rem; background: #fff; border: 1px solid var(--linie); border-radius: var(--rund); box-shadow: var(--schatten); transition: box-shadow .15s, border-color .15s; }
.termine li:hover { border-color: var(--gold); box-shadow: var(--schatten-hover); }
.termine strong { color: var(--blau-dunkel); }
.termin-links { display: flex; flex-wrap: wrap; gap: .25rem 1rem; margin-top: .35rem; font-size: .875rem; font-weight: 600; }
@media (min-width: 900px) { .seite .termine { grid-template-columns: 1fr 1fr; } }
.kalender { flex: 0 0 4.5rem; text-align: center; background: linear-gradient(160deg, var(--blau), var(--blau-dunkel)); color: #fff; border-radius: 8px; padding: .35rem 0; align-self: flex-start; }
.kalender .tag { display: block; font-size: 1.6rem; font-weight: 700; line-height: 1.1; color: var(--gold); }
.kalender .monat { display: block; font-size: .75rem; }
.berichte { display: grid; gap: .75rem; }
.berichte li { padding: .9rem 1.1rem; background: #fff; border: 1px solid var(--linie); border-left: 4px solid var(--gold); border-radius: var(--rund); box-shadow: var(--schatten); }
.berichte a { text-decoration: none; }
.berichte a:hover { text-decoration: underline; }
.berichte h3 { margin: .1rem 0 .25rem; font-size: 1.1rem; }
.berichte p { margin: 0; color: var(--grau); }

/* Inhaltsseiten */
.seite { max-width: var(--text-breite); margin: 0 auto; padding: 2rem 1rem 3rem; }
.hinweis { background: var(--flaeche); border-left: 4px solid var(--gold); padding: 1rem 1.25rem; border-radius: 0 var(--rund) var(--rund) 0; }
.text dl { display: grid; grid-template-columns: max-content 1fr; margin: 1.25rem 0; font-size: .95rem; border: 1px solid var(--linie); border-radius: var(--rund); overflow: hidden; box-shadow: var(--schatten); }
.text dl dt, .text dl dd { margin: 0; padding: .3rem 1rem; border-top: 1px solid var(--linie); line-height: 1.45; }
.text dl dt { font-weight: 600; color: var(--blau-dunkel); background: var(--flaeche); }
.text dl dt:first-of-type, .text dl dt:first-of-type + dd { border-top: 0; }
@media (max-width: 480px) {
  .text dl { grid-template-columns: 1fr; }
  .text dl dd { border-top: 0; padding-top: 0; background: var(--flaeche); }
}

.text { overflow-wrap: break-word; }   /* lange Links und alte, mit &nbsp; verklebte Zeilen nicht über den Rand */
.text img { margin: 1rem auto; border-radius: 4px; }
/* Fotos im Text (Editor „Foto“): Position per Klasse, am Handy immer volle Breite */
.text { display: flow-root; }   /* umflossene Fotos ragen nicht aus dem Text */
.text figure { margin: 1.25rem 0; }
.text figure img { display: block; width: 100%; height: auto; margin: 0; }
.text figcaption { font-size: .9rem; color: var(--grau); margin-top: .35rem; }
.text .bild-mitte { max-width: 65%; margin-inline: auto; }
.text .bild-rechts { float: right; width: 45%; margin: .3rem 0 1rem 1.5rem; }
.text .bild-links { float: left; width: 45%; margin: .3rem 1.5rem 1rem 0; }
@media (max-width: 600px) {
  .text .bild-mitte, .text .bild-rechts, .text .bild-links { float: none; width: auto; max-width: none; margin: 1.25rem 0; }
}
.seite-souvenirs .text img { max-width: min(100%, 280px); }
.seite-musik .text img { max-width: min(100%, 320px); }
.text table { display: block; overflow-x: auto; border-collapse: separate; border-spacing: 0; max-width: 100%; margin: 1rem 0; }
.text td, .text th { padding: .4rem 1rem .4rem 0; text-align: left; vertical-align: top; }
/* Echte Datentabellen (mit Kopfzeile) als Karte; alte Layout-Tabellen ohne Kopf bleiben schlicht */
.text table:has(th) { margin: 1.5rem 0; border: 1px solid var(--linie); border-radius: var(--rund); box-shadow: var(--schatten); }
@media (min-width: 601px) { .text table:has(th) { display: table; width: 100%; } }   /* volle Breite; am Handy scrollt sie in sich */
.text table:has(th) :is(td, th) { padding: .35rem 1rem; border-top: 1px solid var(--linie); }
.text table:has(th) tr:first-child > * { border-top: 0; }
.text th { background: var(--blau); color: #fff; font-weight: 600; }
.text table:has(th) tbody tr:nth-child(even) td { background: var(--flaeche); }
.text table[hidden] { display: none; }

/* Berichte */
.breit { max-width: var(--breite); margin: 0 auto; padding: 2rem 1rem 3rem; }
.jahre { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1.5rem; }
.jahre a { padding: .3rem .85rem; border: 1px solid var(--linie); border-radius: 999px; text-decoration: none; background: #fff; transition: background .15s, color .15s; }
.jahre a:hover { background: var(--blau); color: #fff; border-color: var(--blau); }
.breit h2[id] { scroll-margin-top: 6rem; margin-top: 2.5rem; }
.jahre a[aria-current] { background: var(--blau); color: #fff; border-color: var(--blau); }
.karten { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr)); gap: 1.25rem; }
.karte a { display: flex; flex-direction: column; height: 100%; text-decoration: none; color: var(--text); background: #fff; border: 1px solid var(--linie); border-radius: var(--rund); overflow: hidden; box-shadow: var(--schatten); transition: box-shadow .2s, transform .2s, border-color .2s; }
.karte a:hover { border-color: var(--gold); box-shadow: var(--schatten-hover); transform: translateY(-2px); }
.karte img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.ohne-bild { display: grid; place-items: center; aspect-ratio: 3 / 2; background: var(--flaeche); }
.ohne-bild img { width: 80px; aspect-ratio: auto; }
.karte-text { padding: .75rem 1rem 1rem; }
.karte-text strong { display: block; color: var(--blau-dunkel); }

/* Bildergalerie mit Großansicht */
.galerie { list-style: none; margin: 1.5rem 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 10rem), 1fr)); gap: .5rem; }
.galerie img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; transition: transform .2s, box-shadow .2s; }
.galerie a:hover img { transform: scale(1.03); box-shadow: var(--schatten-hover); }
.gross { border: 0; padding: 0; background: transparent; max-width: 95vw; max-height: 95vh; }
.gross::backdrop { background: rgba(10, 12, 36, .9); }
.gross img { max-width: 95vw; max-height: 88vh; margin: 0 auto; }
.gross p { color: #fff; text-align: center; margin: .5rem; }
.gross button { position: fixed; top: .75rem; right: .75rem; font-size: 1.5rem; line-height: 1; padding: .3rem .7rem; border: 0; border-radius: 4px; background: #fff; cursor: pointer; }

/* Konzerte, Chronik, Links */
.archiv { border: 1px solid var(--linie); border-radius: var(--rund); margin-bottom: .75rem; background: #fff; box-shadow: var(--schatten); }
.archiv summary { cursor: pointer; padding: .9rem 1.25rem; font-weight: 600; color: var(--blau-dunkel); list-style: none; display: flex; align-items: center; gap: .75rem; }
.archiv summary::-webkit-details-marker { display: none; }
.archiv summary::after { content: ""; margin-left: auto; width: .55rem; height: .55rem; border: solid var(--blau); border-width: 0 2px 2px 0; transform: rotate(45deg); transition: transform .2s; }
.archiv[open] summary::after { transform: rotate(-135deg); }
.archiv summary:hover { color: var(--rot); }
.archiv .termine { padding: 0 1rem 1rem; }
.inhalt-liste { background: var(--flaeche); padding: 1rem 1.25rem; border-radius: var(--rund); }
.inhalt-liste ol { margin: 0; padding: 0; list-style: none; counter-reset: kapitel; columns: 2 20rem; column-gap: 2rem; }
.inhalt-liste li { counter-increment: kapitel; break-inside: avoid; display: flex; gap: .6rem; padding: .3rem 0; }
.inhalt-liste li::before { content: counter(kapitel); flex: 0 0 1.6rem; height: 1.6rem; border-radius: 50%; background: var(--blau); color: var(--gold); font-size: .75rem; font-weight: 700; display: grid; place-items: center; margin-top: .05rem; }
.inhalt-liste a { text-decoration: none; }
.inhalt-liste a:hover { text-decoration: underline; }
.chronik { border-top: 3px solid var(--gold); margin-top: 2.5rem; scroll-margin-top: 6rem; }
.linkliste { list-style: none; margin: 0 0 2rem; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr)); gap: .75rem; }
.linkliste a { display: flex; align-items: center; gap: .75rem; height: 100%; padding: .8rem 1rem; text-decoration: none; background: #fff; border: 1px solid var(--linie); border-left: 4px solid var(--blau); border-radius: var(--rund); box-shadow: var(--schatten); transition: box-shadow .15s, border-color .15s; }
.linkliste a:hover { border-color: var(--gold); box-shadow: var(--schatten-hover); color: var(--blau); }
.linkliste a::after { content: "↗"; margin-left: auto; color: var(--grau); }
.linkliste span { display: block; }
.linkliste .klein { overflow-wrap: anywhere; }

/* Mitglieder */
.fehler { background: #fdecec; border-left: 4px solid var(--rot); padding: .75rem 1rem; }
.kopfzeile { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.knopf.hell { background: #fff; border: 1px solid var(--blau); color: var(--blau); cursor: pointer; font: inherit; }
.anmeldung { max-width: 24rem; }
.anmeldung label { display: block; font-weight: 600; color: var(--blau-dunkel); margin-bottom: 1rem; }
.anmeldung input { display: block; width: 100%; margin-top: .25rem; padding: .5rem .6rem; font: inherit; border: 1px solid #b9bccb; border-radius: 4px; }
.anmeldung button { border: 0; cursor: pointer; font: inherit; }
.karte-text .klein { display: block; }

/* Formulare (Kontakt, Bestellung) */
.formular-block { border-top: 3px solid var(--gold); margin-top: 2rem; }
.breit-form { max-width: 36rem; }
.anmeldung select, .anmeldung textarea { display: block; width: 100%; margin-top: .25rem; padding: .5rem .6rem; font: inherit; font-weight: 400; border: 1px solid #b9bccb; border-radius: 4px; background: #fff; }
.honig { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.meldung { background: #e7f5ea; border-left: 4px solid #2e7d32; padding: .75rem 1rem; }

/* Musik im Mitgliederbereich */
.reiter { display: flex; gap: .5rem; margin: 0 0 1.5rem; }
.reiter a { padding: .4rem 1rem; border: 1px solid var(--linie); border-radius: 999px; text-decoration: none; }
.reiter a[aria-current] { background: var(--blau); color: #fff; border-color: var(--blau); }
.titelliste { list-style: none; margin: 0 0 2rem; padding: 0; }
.titelliste { border: 1px solid var(--linie); border-radius: var(--rund); overflow: hidden; box-shadow: var(--schatten); }
.titelliste li { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem 1rem; padding: .6rem 1rem; border-top: 1px solid var(--linie); }
.titelliste li:first-child { border-top: 0; }
.titelliste li:nth-child(even) { background: var(--flaeche); }
.titelliste span { flex: 1 1 14rem; }
.titelliste audio { flex: 1 1 18rem; max-width: 100%; }

/* Fußzeile */
.fuss { background: var(--blau-dunkel); color: #d8daea; margin-top: 2rem; }
.fuss-innen { max-width: var(--breite); margin: 0 auto; padding: 2rem 1rem; display: flex; flex-wrap: wrap; gap: 1.5rem 3rem; justify-content: space-between; }
.fuss a { color: #fff; }
.fuss a:hover { color: var(--gold); }
.fuss ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; }
.fuss .sozial a { display: inline-flex; align-items: center; gap: .4rem; }
.fuss .klein { color: #a9acc4; flex-basis: 100%; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
