/* Farben der bisherigen Seite */
:root {
  --lila: #543686;
  --orange: #ff6600;
  --grau: #7B7D8E;
  --hell: #eeeeee;
  --text: #333333;
  --radius: 12px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Verdana, "Segoe UI", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: url("gitter.jpg");
}

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

a { color: var(--lila); }
a:hover, a:focus { color: var(--orange); }

h1 { color: var(--lila); font-size: 1.9rem; line-height: 1.25; margin: 0 0 1rem; }
h2 { color: var(--lila); font-size: 1.2rem; margin: 1.8rem 0 .5rem; }

.wrap { max-width: 1100px; margin: 0 auto; padding: 0 1rem; }

/* Kopf */
.kopf { background: #fff; border-bottom: 4px solid var(--orange); }
/* Logo + Name: Logo-Datei liegt in img/logo.* */
.marke { display: flex; align-items: center; gap: 1.2rem; padding: 1rem 0; text-decoration: none; }
.logo { display: block; flex-shrink: 0; height: 100px; width: auto; max-width: 260px; object-fit: contain; }
.marke-text { color: var(--lila); font-size: 2rem; line-height: 1.15; }
.marke-text strong { color: var(--lila); }
.marke-text small { display: block; color: var(--orange); font-size: 1rem; font-weight: bold; margin-top: .3rem; }
@media (max-width: 800px) {
  .logo { height: 64px; }
  .marke-text { font-size: 1.4rem; }
  .marke-text small { font-size: .85rem; }
}

.hauptmenu { background: var(--lila); }
.hauptmenu ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; }
.hauptmenu a {
  display: block;
  padding: .9rem 1rem;
  color: #fff;
  text-decoration: none;
  font-weight: bold;
  font-size: .95rem;
  border-bottom: 3px solid transparent;
}
.hauptmenu a:hover, .hauptmenu a:focus, .hauptmenu a.aktiv { color: var(--orange); border-bottom-color: var(--orange); }

/* Seite: Inhalt + Seitenleiste */
.seite {
  display: grid;
  grid-template-columns: 1fr 240px;
  gap: 1.5rem;
  padding-top: 1.5rem;
  padding-bottom: 2rem;
}
.inhalt { grid-column: 1; grid-row: 1; min-width: 0; }
.seitenleiste { grid-column: 2; grid-row: 1; display: flex; flex-direction: column; gap: 1rem; }

.karte {
  background: #fff;
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: 0 2px 12px rgba(0, 0, 0, .08);
}

.termin-box {
  padding: 1.2rem;
  border-top: 6px solid var(--orange);
  display: flex;
  flex-direction: column;
}
.termin-box strong { color: var(--lila); font-size: 1.1rem; }

.vorschau img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius); }

.gross { font-size: 1.2rem; font-weight: bold; color: var(--lila); }

/* Knöpfe */
.knopf {
  display: inline-block;
  background: var(--orange);
  color: #fff;
  border: 0;
  border-radius: 999px;
  padding: .7rem 1.4rem;
  font: inherit;
  font-weight: bold;
  text-decoration: none;
  cursor: pointer;
  margin: .2rem .4rem .2rem 0;
}
.knopf:hover, .knopf:focus { background: var(--lila); color: #fff; }
.knopf-hell { background: var(--hell); color: var(--lila); }

/* Listen */
.liste li { margin-bottom: .6rem; }

.hinweis-orange { color: var(--orange); }

.warnung {
  background: #fff3e8;
  border-left: 5px solid var(--orange);
  padding: 1rem 1.2rem;
  border-radius: 6px;
  margin-top: 1.5rem;
}

.adresse {
  background: var(--hell);
  border-radius: var(--radius);
  padding: 1.2rem 1.5rem;
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

/* Termine */
.terminliste { list-style: none; padding: 0; }
.terminliste li {
  padding: .7rem 1rem;
  margin-bottom: .4rem;
  background: var(--hell);
  border-radius: 8px;
  font-weight: bold;
}
.terminliste li.vorbei { color: #999; font-weight: normal; text-decoration: line-through; }
.terminliste li.naechster { background: var(--lila); color: #fff; }
.terminliste em { color: var(--orange); font-style: normal; margin-left: .5rem; }

/* Öffnungs-Zeitbalken */
.oeffnung {
  background: var(--hell);
  border-radius: var(--radius);
  padding: 1rem 1.2rem 1.4rem;
  margin-bottom: 1.5rem;
}
.oe-status { margin: 0 0 .7rem; font-weight: bold; font-size: 1.1rem; color: var(--lila); }
.oe-balken {
  position: relative;
  display: flex;
  height: 22px;
  border-radius: 6px;
  overflow: visible;
}
/* Breiten in Minuten: Grün 120, Gelb 30, Orange 30, Rot 60 (gesamt 240 = 11–15 Uhr) */
.oe-balken span { height: 100%; opacity: .45; }
.oe-gruen  { flex: 120; background: #2e9e44; border-radius: 6px 0 0 6px; }
.oe-gelb   { flex: 30;  background: #ffc400; }
.oe-orange { flex: 30;  background: var(--orange); }
.oe-rot    { flex: 60;  background: #e3001b; border-radius: 0 6px 6px 0; }
.phase-gruen .oe-gruen, .phase-gelb .oe-gelb, .phase-orange .oe-orange, .phase-rot .oe-rot { opacity: 1; }
.phase-gruen .oe-status  { color: #2e9e44; }
.phase-gelb .oe-status   { color: #9a7b00; }
.phase-orange .oe-status { color: var(--orange); }
.phase-rot .oe-status    { color: #e3001b; }
.phase-ende .oe-status   { color: #e3001b; }
.phase-ende .oe-balken span { opacity: .25; filter: grayscale(1); }

.oe-zeiger {
  position: absolute;
  top: -6px;
  width: 4px;
  height: 34px;
  margin-left: -2px;
  background: var(--lila);
  border-radius: 2px;
}
.oe-skala {
  position: relative;
  height: 1.2rem;
  font-size: .8rem;
  color: var(--grau);
  margin-bottom: .2rem;
}
.oe-skala span { position: absolute; transform: translateX(-50%); }
.oe-skala span:nth-child(1) { left: 0; transform: none; }
.oe-skala span:nth-child(2) { left: 50%; }
.oe-skala span:nth-child(3) { left: 62.5%; }
.oe-skala span:nth-child(4) { left: 75%; }
.oe-skala span:nth-child(5) { right: 0; transform: none; }

/* Karte (Zwei-Klick) */
.kartenfeld {
  background: var(--hell) url("gitter.jpg");
  border: 2px dashed var(--grau);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  margin: 1.5rem 0;
}
.kartenfeld.geladen { padding: 0; border: 0; }
.kartenfeld iframe { display: block; width: 100%; height: 450px; border: 0; border-radius: var(--radius); }

/* Galerie */
.galerie { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: .8rem; }
.galerie img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; }

.presse img { border-radius: 6px; }

/* Lightbox */
.lightbox { border: 0; padding: 0; background: transparent; max-width: 95vw; max-height: 95vh; }
.lightbox::backdrop { background: rgba(0, 0, 0, .85); }
.lightbox img { display: block; max-width: 90vw; max-height: 85vh; margin: 0 auto; border-radius: 6px; }
.lightbox button {
  position: fixed;
  background: rgba(0, 0, 0, .5);
  color: #fff;
  border: 0;
  font-size: 2.5rem;
  line-height: 1;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  cursor: pointer;
}
.lb-zu { top: 1rem; right: 1rem; }
.lb-zurueck { left: 1rem; top: 50%; }
.lb-vor { right: 1rem; top: 50%; }

/* Fuß */
.fuss { background: var(--lila); color: #fff; padding: 1.5rem 0 5rem; font-size: .9rem; }
.fuss p { margin: .2rem 0; }
.fuss a { color: #fff; font-weight: bold; }
.fuss a:hover { color: var(--orange); }

/* Hinweis-Banner (nur Information, keine Einwilligung) */
.hinweis-banner {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  max-width: 700px;
  margin: 0 auto;
  background: #fff;
  border-top: 5px solid var(--orange);
  border-radius: var(--radius);
  box-shadow: 0 4px 20px rgba(0, 0, 0, .25);
  padding: 1rem 1.2rem;
  display: flex;
  gap: 1rem;
  align-items: center;
  font-size: .95rem;
  z-index: 10;
}
.hinweis-banner[hidden] { display: none; }
.hinweis-banner p { margin: 0; flex: 1; }
.hinweis-banner button {
  background: var(--lila);
  color: #fff;
  border: 0;
  border-radius: 999px;
  padding: .5rem 1.4rem;
  font: inherit;
  font-weight: bold;
  cursor: pointer;
}

/* Handy */
@media (max-width: 800px) {
  .seite { grid-template-columns: 1fr; }
  .seitenleiste { grid-column: 1; grid-row: 2; }
  .seitenleiste .vorschau { display: none; }
  .karte { padding: 1.2rem; }
  h1 { font-size: 1.5rem; }
  .hauptmenu a { padding: .6rem .7rem; font-size: .9rem; }
  .oe-skala span:nth-child(2), .oe-skala span:nth-child(3) { display: none; }
}

.oeffnung[hidden] { display: none; }
.oe-balken { height: 34px; margin-top: .2rem; }
.oe-zeiger { top: -5px; height: 44px; }
.oe-rest {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  font-size: .95rem;
}
.oe-status { margin: .7rem 0 0; }

/* DEMO-Anzeige (nur Testversion) */
.oe-status[data-demo]::after { content: attr(data-demo); display: block; margin-top: .3rem; font-size: .85rem; font-weight: normal; color: var(--grau); }

/* Hinweis über dem Balken, Resttage */
.oe-titel { margin: 0 0 .6rem; font-size: 1.25rem; font-weight: bold; color: var(--lila); }
.resttage { margin-top: .4rem; color: var(--orange); font-weight: bold; }
/* Restzeit gut lesbar auf jeder Farbe */
.oe-rest { inset: auto; left: 50%; top: 50%; transform: translate(-50%, -50%); background: rgba(255, 255, 255, .9); padding: .05rem .6rem; border-radius: 4px; white-space: nowrap; font-size: .85rem; }
/* Gelb, Orange, Rot auch vor ihrer Phase kräftig zeigen (Grün bleibt) */
.oe-balken .oe-gelb, .oe-balken .oe-orange, .oe-balken .oe-rot { opacity: .8; }
.phase-ende .oe-balken span { opacity: .3; }

/* Abgesagte Termine, versteckter Verwaltungszugang, Formulare */
.terminliste li.abgesagt { color: #999; text-decoration: line-through; font-weight: normal; }
.terminliste li.abgesagt em { color: #e3001b; text-decoration: none; display: inline-block; }
.terminliste.admin li { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.terminliste.admin li.abgesagt { text-decoration: none; }
.terminliste.admin li.abgesagt span { text-decoration: line-through; }
.terminliste.admin form { margin: 0; }
.fuss a.versteckt { color: inherit; font-weight: normal; text-decoration: none; }
.formular label { display: block; margin-bottom: 1rem; font-weight: bold; }
.formular input { display: block; margin-top: .3rem; padding: .6rem; font: inherit; width: 100%; max-width: 320px; border: 1px solid #ccc; border-radius: 6px; }
.hash { background: var(--hell); padding: 1rem; border-radius: 6px; white-space: pre-wrap; word-break: break-all; }
.abgesagt-box { border-top-color: #e3001b; }
.abgesagt-box strong, .abgesagt-box .resttage { color: #e3001b; }
.durch { text-decoration: line-through; color: #999; }

/* Anfrageformular */
.anfrage fieldset { border: 1px solid #ddd; border-radius: var(--radius); padding: 1rem 1.2rem; margin: 0 0 1.2rem; }
.anfrage legend { font-weight: bold; color: var(--lila); padding: 0 .4rem; }
.anfrage input, .anfrage textarea { max-width: 100%; }
.formular textarea { display: block; margin-top: .3rem; padding: .6rem; font: inherit; width: 100%; border: 1px solid #ccc; border-radius: 6px; resize: vertical; }
.formular input:focus, .formular textarea:focus { outline: 2px solid var(--orange); border-color: var(--orange); }
.formular .checkbox { display: flex; gap: .6rem; align-items: flex-start; font-weight: normal; }
.formular .checkbox input { display: inline; width: auto; margin-top: .35rem; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.erfolg { background: #e9f7ec; border-left: 5px solid #2e9e44; padding: 1rem 1.2rem; border-radius: 6px; }
.warnung ul { margin: 0; padding-left: 1.2rem; }
.hinweis-klein { font-size: .9rem; color: #555; }

/* Sanduhr */
.oe-inhalt { display: flex; align-items: center; gap: 1.5rem; }
.sanduhr { width: 130px; height: auto; flex-shrink: 0; }
.su-glas { fill: rgba(255, 255, 255, .6); stroke: var(--lila); stroke-width: 3; fill-opacity: .15; }
.su-rahmen { fill: var(--lila); }
.su-sand { fill: #2e9e44; }
.phase-gelb .su-sand { fill: #ffc400; }
.phase-orange .su-sand { fill: var(--orange); }
.phase-rot .su-sand { fill: #e3001b; }
.phase-ende .su-sand { fill: #999; }
.su-strahl { stroke: #2e9e44; stroke-width: 3; stroke-dasharray: 4 6; animation: rieseln .6s linear infinite; }
.phase-gelb .su-strahl { stroke: #ffc400; }
.phase-orange .su-strahl { stroke: var(--orange); }
.phase-rot .su-strahl { stroke: #e3001b; }
.phase-ende .su-strahl { display: none; }
@keyframes rieseln { to { stroke-dashoffset: -10; } }
@media (prefers-reduced-motion: reduce) { .su-strahl { animation: none; } }
.su-textbg { fill: #fff; fill-opacity: .9; }
.su-text { font: bold 13px Verdana, sans-serif; text-anchor: middle; fill: #222; paint-order: stroke; stroke: #fff; stroke-width: 3px; }
@media (max-width: 800px) {
  .oe-inhalt { flex-direction: column; text-align: center; gap: .8rem; }
  .sanduhr { width: 110px; }
}
.art-wahl { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; }
.art-wahl legend { width: 100%; }
.formular .radio { display: flex; align-items: center; gap: .5rem; margin: 0; font-weight: bold; cursor: pointer; }
.formular .radio input { display: inline; width: auto; margin: 0; }
.mit-js .nur-ohne-js { display: none; }
.anfrage fieldset[hidden] { display: none; }
.feldfehler { display: block; color: #c00018; font-weight: normal; font-size: .9rem; margin-top: .3rem; }
.formular [aria-invalid="true"] { border-color: #c00018; background: #fff5f6; }
/* Nach Annahmeschluss (14–15 Uhr) rieselt nur noch halb so viel Sand; Schluss-Text neutral */
.phase-rot .su-strahl { stroke-dasharray: 4 16; animation: rieseln-wenig 1.2s linear infinite; } /* gleiche Körner und gleiches Tempo, halb so viele */
@keyframes rieseln-wenig { to { stroke-dashoffset: -20; } }
.phase-ende .oe-status { color: var(--lila); }
