/* Terminseite (0.5.36) */

/* Zentrierung: ersetzt den left/transform-Trick aus termine.css */
.lsvd-archive-termine {
  position: static !important;
  left: auto !important;
  transform: none !important;
  width: 100% !important;
  max-width: 1120px !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

/* ---------- Nächste Veranstaltungen ---------- */
.lsvd-featured { margin: clamp(3rem, 6vw, 4.5rem) 0 0; }
.lsvd-featured > h2,
.lsvd-agenda__header h2 { margin: 0 0 1.25rem; font-size: clamp(1.8rem, 3vw, 2.6rem); }
.lsvd-featured__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.lsvd-featured__card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #ddd6cc;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(26, 26, 26, .06);
  transition: transform .2s ease, box-shadow .2s ease;
}
.lsvd-featured__card:hover { transform: translateY(-4px); box-shadow: 0 14px 34px rgba(26, 26, 26, .1); }
.lsvd-featured__media { display: block; aspect-ratio: 16 / 9; background: var(--lsvd-sand); overflow: hidden; }
.lsvd-featured__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lsvd-featured__body { display: flex; flex-direction: column; flex: 1; padding: 20px 22px 22px; }
.lsvd-featured__date {
  margin: 0 0 6px;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--lsvd-rot);
}
.lsvd-featured__body h3 { margin: 0 0 8px; font-size: 1.45rem; line-height: 1.2; }
.lsvd-featured__body h3 a { color: var(--lsvd-tinte); text-decoration: none; }
.lsvd-featured__body h3 a:hover { text-decoration: underline; text-underline-offset: 4px; }
.lsvd-featured__meta { margin: 0; color: var(--lsvd-stumm); font-size: .95rem; }
.lsvd-featured__status {
  width: fit-content;
  margin: 10px 0 0;
  padding: 2px 8px;
  background: var(--lsvd-rot);
  color: #fff;
  font-size: .72rem;
  font-weight: 800;
  text-transform: uppercase;
}
.lsvd-featured__actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: auto 0 0;
  padding-top: 18px;
}
.lsvd-featured__actions > a:first-child { color: var(--lsvd-rot); font-weight: 700; text-decoration: none; }
.lsvd-featured__card.is-cancelled h3 a { text-decoration: line-through; }

/* Kalender-Link */
.lsvd-ics {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  border: 1px solid var(--lsvd-linie);
  border-radius: 999px;
  background: #fff;
  color: var(--lsvd-tinte) !important;
  font-size: .78rem;
  font-weight: 600;
  text-decoration: none !important;
  white-space: nowrap;
  transition: background .2s ease, border-color .2s ease;
}
.lsvd-ics:hover, .lsvd-ics:focus-visible { background: var(--lsvd-tinte); border-color: var(--lsvd-tinte); color: #fff !important; }

/* ---------- Agenda ---------- */
.lsvd-agenda { margin: clamp(3.5rem, 7vw, 5rem) 0 0; }
.lsvd-agenda__header {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.lsvd-agenda__header h2 { margin-bottom: 0; }
.lsvd-agenda__filter { display: flex; flex-wrap: wrap; gap: 8px; }
.lsvd-agenda__filter button {
  padding: 8px 16px;
  border: 1.5px solid var(--lsvd-tinte);
  border-radius: 999px;
  background: #fff;
  color: var(--lsvd-tinte);
  font: inherit;
  font-size: .9rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s ease, color .2s ease;
}
.lsvd-agenda__filter button.is-veranstaltung::before,
.lsvd-agenda__filter button.is-gruppe::before {
  content: "";
  display: inline-block;
  width: .6rem;
  height: .6rem;
  margin-right: .45rem;
  border-radius: 50%;
  background: var(--lsvd-rot);
}
.lsvd-agenda__filter button.is-gruppe::before { background: #4d9564; }
.lsvd-agenda__filter button[aria-pressed="true"] { background: var(--lsvd-tinte); color: #fff; }
.lsvd-agenda__filter button:focus-visible { outline: 3px solid var(--lsvd-rot); outline-offset: 2px; }

.lsvd-agenda__month { margin-top: 32px; }
.lsvd-agenda__month[hidden], .lsvd-agenda__item[hidden] { display: none !important; }
.lsvd-agenda__month-title {
  margin: 0;
  padding: 12px 0 10px;
  background: #fff;
  border-bottom: 3px solid transparent;
  border-image: linear-gradient(90deg, #e40303, #ff8c00, #ffed00, #008026, #004dff, #750787) 1;
  font-size: 1.35rem;
}
.lsvd-agenda__list { list-style: none; margin: 0; padding: 0; }
.lsvd-agenda__item {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 14px 12px 14px 0;
  border-bottom: 1px solid #e4ded5;
  transition: background .18s ease;
}
.lsvd-agenda__item:hover { background: #faf8f5; }
.lsvd-agenda__date {
  display: grid;
  justify-items: center;
  align-content: center;
  padding-right: 14px;
  border-right: 3px solid var(--lsvd-rot);
  min-height: 52px;
}
.lsvd-agenda__item.is-gruppe .lsvd-agenda__date { border-right-color: #4d9564; }
.lsvd-agenda__date strong { font-family: "Noto Serif", Georgia, serif; font-size: 1.45rem; font-weight: 600; line-height: 1; }
.lsvd-agenda__date span { margin-top: 3px; color: var(--lsvd-stumm); font-size: .72rem; font-weight: 750; text-transform: uppercase; }
.lsvd-agenda__copy { display: grid; gap: 3px; min-width: 0; }
.lsvd-agenda__copy small {
  width: fit-content;
  padding: 1px 7px;
  background: var(--lsvd-rot);
  color: #fff;
  font-size: .64rem;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.lsvd-agenda__item.is-gruppe .lsvd-agenda__copy small { background: #4d9564; }
.lsvd-agenda__title { color: var(--lsvd-tinte) !important; font-size: 1.08rem; font-weight: 650; text-decoration: none !important; overflow-wrap: anywhere; }
.lsvd-agenda__title:hover { text-decoration: underline !important; text-underline-offset: 4px; }
.lsvd-agenda__meta { color: var(--lsvd-stumm); font-size: .88rem; }
.lsvd-agenda__copy em {
  width: fit-content;
  padding: 1px 7px;
  background: var(--lsvd-tinte);
  color: #fff;
  font-size: .68rem;
  font-style: normal;
  font-weight: 800;
  text-transform: uppercase;
}
.lsvd-agenda__item.is-cancelled .lsvd-agenda__title { text-decoration: line-through !important; color: var(--lsvd-stumm) !important; }
.lsvd-agenda__none, .lsvd-agenda__empty { margin: 24px 0 0; color: var(--lsvd-stumm); }

/* ---------- Vergangene Termine ---------- */
.lsvd-past { margin: clamp(3.5rem, 7vw, 5rem) 0 clamp(3rem, 6vw, 5rem); border-top: 1px solid var(--lsvd-linie); border-bottom: 1px solid var(--lsvd-linie); }
.lsvd-past summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  cursor: pointer;
  list-style: none;
}
.lsvd-past summary::-webkit-details-marker { display: none; }
.lsvd-past summary span { font-size: clamp(1.4rem, 2.4vw, 1.8rem); }
.lsvd-past summary::after { content: "+"; font-size: 1.8rem; line-height: 1; color: var(--lsvd-rot); transition: transform .2s ease; }
.lsvd-past[open] summary::after { transform: rotate(45deg); }
.lsvd-past__list { list-style: none; margin: 0 0 20px; padding: 0; }
.lsvd-past__list li {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) auto;
  gap: 16px;
  padding: 12px 0;
  border-top: 1px solid #eee8df;
  font-size: .95rem;
}
.lsvd-past__list time, .lsvd-past__list span { color: var(--lsvd-stumm); }
.lsvd-past__list a { color: var(--lsvd-tinte); font-weight: 600; }

@media (max-width: 900px) {
  .lsvd-featured__grid { grid-template-columns: 1fr; }
  .lsvd-featured__card { display: grid; grid-template-columns: 38% minmax(0, 1fr); }
  .lsvd-featured__media { aspect-ratio: auto; height: 100%; }
}
@media (max-width: 640px) {
  .lsvd-featured__card { display: flex; }
  .lsvd-featured__media { aspect-ratio: 16 / 9; }
  .lsvd-agenda__item { grid-template-columns: 52px minmax(0, 1fr); }
  .lsvd-agenda__item .lsvd-ics { grid-column: 2; justify-self: start; }
  .lsvd-past__list li { grid-template-columns: 1fr; gap: 2px; }
}

/* 0.5.39: Termine mit nicht veröffentlichtem Datum */
.lsvd-agenda__date--on-request strong { font-size: .95rem; }
