/* =========================================================================
   Kultur in Stattegg  –  style.css
   Handgeschrieben, keine Fremd-Bibliotheken. Farben aus dem Vereinslogo.
   ========================================================================= */

:root {
  --gruen:        #4d7c1a;   /* Haupt-Grün, kontraststark auf Weiß           */
  --gruen-dunkel: #2f5e34;   /* Überschriften, Footer                        */
  --gruen-hell:   #8cc63f;   /* nur dekorativ (Chips, Linien)               */
  --gruen-blass:  #eef3e4;   /* zarte Flächen                               */
  --ink:          #1f2421;   /* Fließtext                                    */
  --muted:        #5b635e;   /* Sekundärtext                                 */
  --bg:           #ffffff;
  --bg-alt:       #f5f7f1;
  --border:       #dfe4d7;
  --focus:        #1d6fb8;   /* Fokusring, bewusst andersfarbig             */

  /* Kategorie-Farben – wie bei der bisherigen Website beibehalten.
     Die Namen der Variablen sind historisch (erste erfasste Saison);
     welche Programm-Kategorie welche Farbe bekommt, steht bei den
     .kat--…-Klassen weiter unten und kann sich von Saison zu Saison
     ändern (aktuell z. B. "Multimedial" = Blau, "Poetry" = Violett). */
  --kat-musik:      #f6863d;  /* Orange                                     */
  --kat-kabarett:   #18b26d;  /* Grün                                       */
  --kat-schauspiel: #902790;  /* Violett                                    */
  --kat-lesung:     #0089d0;  /* Blau                                       */

  --radius:       8px;
  --maxw:         68rem;
  --gap:          clamp(1rem, 3vw, 2rem);
  font-synthesis: none;
}

/* ----- Grundlagen ------------------------------------------------------- */
* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  /* Anker-Sprünge (#veranstaltungen, #kürzel …) nicht unter die
     feststehende Menüleiste rutschen lassen. */
  scroll-padding-top: 5.5rem;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
}

h1, h2, h3 { line-height: 1.2; color: var(--gruen-dunkel); font-weight: 700; }
h1 { font-size: clamp(1.9rem, 5vw, 2.8rem); margin: 0 0 .5em; }
h2 { font-size: clamp(1.4rem, 3.5vw, 1.9rem); margin: 2.5rem 0 1rem; }
h3 { font-size: 1.2rem; margin: 0 0 .4em; }

p { margin: 0 0 1rem; }

a { color: var(--gruen); }
a:hover { color: var(--gruen-dunkel); }

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

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 3px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: .5rem; top: -3rem;
  background: var(--gruen-dunkel); color: #fff;
  padding: .6rem 1rem; border-radius: var(--radius);
  transition: top .15s;
  z-index: 100;
}
.skip-link:focus { top: .5rem; color: #fff; }

.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gap); }

/* ----- Kopfbereich / Navigation -------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.95);
  backdrop-filter: saturate(1.4) blur(6px);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding-block: .7rem;
}
.brand { display: inline-flex; align-items: center; }
.brand img { height: 40px; width: auto; }
@media (min-width: 700px) { .brand img { height: 52px; } }

.nav-toggle {
  display: inline-flex; align-items: center; gap: .5rem;
  background: var(--gruen); color: #fff; border: 0;
  font: inherit; font-weight: 600;
  padding: .55rem .9rem; border-radius: var(--radius); cursor: pointer;
}
.nav-toggle:hover { background: var(--gruen-dunkel); }

.main-nav ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: .25rem 1.25rem;
}
.main-nav a {
  display: block; padding: .4rem .2rem;
  text-decoration: none; font-weight: 600; color: var(--ink);
  border-bottom: 3px solid transparent;
}
.main-nav a:hover,
.main-nav a[aria-current="page"] {
  color: var(--gruen-dunkel);
  border-bottom-color: var(--gruen-hell);
}

@media (max-width: 699px) {
  .main-nav {
    display: none;
    position: absolute; left: 0; right: 0; top: 100%;
    background: #fff; border-bottom: 1px solid var(--border);
    padding: .5rem var(--gap) 1rem;
  }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; gap: 0; }
  .main-nav a { padding: .7rem 0; border-bottom: 1px solid var(--border); }
  .main-nav a[aria-current="page"] { border-bottom-color: var(--border); }
}
@media (min-width: 700px) {
  .nav-toggle { display: none; }
  .main-nav { display: block !important; }
}

/* ----- Hero ---------------------------------------------------------- */
.hero {
  background: linear-gradient(180deg, var(--gruen-blass), #fff);
  border-bottom: 1px solid var(--border);
}
.hero .wrap { padding-block: clamp(2rem, 6vw, 3.5rem); }
.hero p.lead { font-size: 1.2rem; color: var(--muted); max-width: 46ch; }
/* Button-Reihe im Hero: bricht auf schmalen Schirmen sauber um */
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
}

/* ----- Buttons ----------------------------------------------------- */
.btn {
  display: inline-block;
  background: var(--gruen); color: #fff;
  font: inherit; font-weight: 700;
  padding: .7rem 1.3rem; border: 0; border-radius: var(--radius);
  text-decoration: none; cursor: pointer;
  transition: background .15s;
}
.btn:hover, .btn:focus-visible { background: var(--gruen-dunkel); color: #fff; }
.btn--ghost {
  background: transparent; color: var(--gruen-dunkel);
  box-shadow: inset 0 0 0 2px var(--gruen);
}
.btn--ghost:hover { background: var(--gruen-blass); color: var(--gruen-dunkel); }

/* ----- Kategorie-Kennzeichnung (Farben wie bisher) --------------- */
.kat {
  display: inline-block;
  color: #fff;
  text-shadow: 0 1px 1px rgba(0, 0, 0, .35);
  font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase;
}
.kat--musik      { background: var(--kat-musik); }
.kat--kabarett   { background: var(--kat-kabarett); }
.kat--schauspiel { background: var(--kat-schauspiel); }
.kat--lesung     { background: var(--kat-lesung); }
/* Saison 2026/27 verwendet andere Kategorie-Namen als zuvor – dieselben
   vier Farben werden weiterverwendet, nur neu beschriftet. */
.kat--multimedial { background: var(--kat-lesung); }     /* Blau */
.kat--poetry      { background: var(--kat-schauspiel); } /* Violett */

/* kleine Pille für die Detailkarten */
.chip {
  align-self: flex-start;
  font-size: .78rem;
  padding: .2rem .65rem; border-radius: 999px;
}

/* ----- Programm-Übersichtstabelle (Startseite) ------------------ */
.table-scroll { overflow-x: auto; margin: 1rem 0 2.5rem; }
table.programm {
  width: 100%; border-collapse: collapse;
  font-size: .98rem;
}
table.programm caption { text-align: left; color: var(--muted); margin-bottom: .5rem; }
table.programm th,
table.programm td {
  text-align: left; vertical-align: top;
  padding: .6rem .8rem;
  border-bottom: 1px solid var(--border);
}
table.programm thead th {
  font-size: .8rem; text-transform: uppercase; letter-spacing: .04em;
  color: var(--muted); border-bottom: 2px solid var(--border);
}
table.programm tbody tr:hover { background: var(--bg-alt); }
/* Ganze Zeile klickbar (per script.js). Ohne JS bleibt nur der Titel-Link. */
table.programm tbody tr[data-href] { cursor: pointer; }
table.programm td.prog-kat { padding: 0; width: 1%; white-space: nowrap; }
table.programm td.prog-kat .kat {
  width: 100%; padding: .55rem .8rem; font-size: .82rem;
}
table.programm .prog-title { font-weight: 700; }
table.programm .prog-title a { text-decoration: none; }
table.programm .prog-title a:hover { text-decoration: underline; }
table.programm .prog-sub { color: var(--muted); font-style: italic; font-weight: 400; }
table.programm .prog-when { white-space: nowrap; font-weight: 600; color: var(--gruen-dunkel); }
table.programm .prog-where { color: var(--muted); font-weight: 400; }

/* ----- Veranstaltungen im Detail (untereinander) ---------------- */
.events { display: flex; flex-direction: column; gap: clamp(1.5rem, 4vw, 2.25rem); }

.event {
  display: grid; grid-template-columns: 1fr;
  align-items: start;               /* Bild nicht auf die Texthöhe strecken */
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
/* Mobil bleibt alles einspaltig in Dokumentreihenfolge:
   Foto, dann Infos + Karten, dann Beschreibungstext. */
@media (min-width: 820px) {
  /* Desktop: links Foto über 50 % der Breite, rechts alle Infos inkl. Karten,
     der Detailtext darunter über die volle Breite. */
  .event { grid-template-columns: 1fr 1fr; }
  .event__media  { grid-column: 1; grid-row: 1; }
  .event__body   { grid-column: 2; grid-row: 1; }
  .event__detail { grid-column: 1 / -1; grid-row: 2; padding: .25rem 1.5rem 1.5rem; }
}
.event__media {
  display: flex; align-items: flex-start; justify-content: center;
  padding: 1.35rem 1.5rem 0;
}
@media (min-width: 820px) {
  .event__media { padding: 1.5rem 1.5rem 1.5rem; }
}
.event__detail { padding: .5rem 1.5rem 1.35rem; }
/* Foto immer vollständig zeigen: nie breiter als die Spalte,
   Höhe automatisch (kein Beschnitt), kleine Bilder nicht hochskalieren. */
.event__media img {
  max-width: 100%;
  height: auto;
  border-radius: calc(var(--radius) - 3px);
}
.event__body { padding: 1.35rem 1.5rem 1.6rem; display: flex; flex-direction: column; gap: .5rem; }

.event__when { font-weight: 700; color: var(--gruen-dunkel); }
.event__where { color: var(--muted); margin-top: -.25rem; }
.event__subtitle { color: var(--muted); font-style: italic; }
.event__text { margin: .25rem 0 .5rem; }
.event__prices {
  margin: 0; padding: .75rem 1rem;
  background: var(--bg-alt); border-radius: var(--radius);
  font-size: .95rem;
}
.event__prices dt { font-weight: 700; }
.event__prices dd { margin: 0 0 .25rem; }
.event__actions { margin-top: .5rem; padding-top: .5rem; }

/* ----- Allgemeine Inhaltsseiten ---------------------------------- */
main { padding-bottom: 4rem; }
.page-intro { color: var(--muted); font-size: 1.1rem; max-width: 60ch; }

.callout {
  border-left: 4px solid var(--gruen-hell);
  background: var(--gruen-blass);
  padding: 1rem 1.25rem; border-radius: 0 var(--radius) var(--radius) 0;
  margin: 1.5rem 0;
}

.contact-facts { list-style: none; margin: 0 0 1.5rem; padding: 0; }
.contact-facts li { margin: 0 0 .35rem; }
.contact-facts strong { display: inline-block; min-width: 6rem; }

/* ----- Formulare ------------------------------------------------- */
form.vform { max-width: 40rem; margin-top: 1.5rem; }
.vform fieldset {
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.25rem 1.35rem 1.5rem; margin: 0 0 1.5rem;
}
.vform legend { font-weight: 700; color: var(--gruen-dunkel); padding-inline: .4rem; }
.field { margin: 0 0 1rem; }
.field:last-child { margin-bottom: 0; }
.field > label { display: block; font-weight: 600; margin-bottom: .3rem; }
.req { color: #b3261e; }

/* zwei Felder nebeneinander, z. B. Name + Geburtsjahr */
.field-pair { display: grid; grid-template-columns: 2fr 1fr; gap: 0 .9rem; }
.field-pair > div > label { display: block; font-weight: 600; margin-bottom: .3rem; }
@media (max-width: 420px) {
  .field-pair { grid-template-columns: 1fr; gap: .75rem 0; }
}

.vform input[type=text],
.vform input[type=email],
.vform input[type=tel],
.vform input[type=number],
.vform select,
.vform textarea {
  width: 100%;
  font: inherit; color: var(--ink);
  padding: .6rem .7rem;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: #fff;
}
.vform textarea { min-height: 8rem; resize: vertical; }
.vform input:focus, .vform select:focus, .vform textarea:focus {
  outline: 3px solid var(--focus); outline-offset: 1px; border-color: var(--gruen);
}

.choice { display: flex; gap: .6rem; align-items: flex-start; margin: .4rem 0; }
.choice input { margin-top: .25rem; flex: 0 0 auto; }
.choice label { font-weight: 400; }

.hint { color: var(--muted); font-size: .9rem; margin: .35rem 0 0; }

.field-legend { display: block; font-weight: 600; margin-bottom: .3rem; }
.mw-40 { max-width: 40rem; }
.pad-block { padding-top: 3rem; padding-bottom: 4rem; }
.dt-space { margin-top: .75rem; }

/* Honeypot – für Menschen unsichtbar, für Bots ein Köder */
.hp { position: absolute; left: -5000px; width: 1px; height: 1px; overflow: hidden; }

/* ----- Footer -------------------------------------------------- */
.site-footer {
  background: var(--gruen-dunkel); color: #eaf1e2;
  margin-top: 4rem;
}
.site-footer a { color: #fff; text-decoration: underline; }
.site-footer .wrap {
  padding-block: 2.5rem;
  display: grid; gap: 1.5rem;
}
@media (min-width: 640px) {
  .site-footer .wrap { grid-template-columns: 1.4fr 1fr; }
}
.site-footer h2 { color: #fff; font-size: 1.1rem; margin: 0 0 .6rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 0 0 .35rem; }
.site-footer .copy {
  grid-column: 1 / -1;
  border-top: 1px solid rgba(255,255,255,.25);
  padding-top: 1.25rem; font-size: .9rem; color: #cfe0c2;
}

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

@media print {
  .site-header, .site-footer, .event__actions, .nav-toggle { display: none; }
  .event { break-inside: avoid; border: none; }
  body { font-size: 11pt; }
}
