:root {
  --background: #f8fafc;
  --surface: #ffffff;
  --text: #1e293b;
  --muted: #64748b;
  --primary: #570df8;
  --line: #e2e8f0;
  --radius: 1rem;
  --container: 1200px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--background); color: var(--text); font-family: Arial, Helvetica, sans-serif; line-height: 1.6; }
a { color: inherit; }
.container { width: min(calc(100% - 2rem), var(--container)); margin-inline: auto; }

.site-header { position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,.94); border-bottom: 1px solid var(--line); backdrop-filter: blur(12px); }
.site-header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 72px; gap: 2rem; }
.site-logo { font-size: 1.25rem; font-weight: 800; text-decoration: none; }
.site-navigation { display: flex; gap: 1.5rem; }
.site-navigation a { color: var(--muted); font-weight: 600; text-decoration: none; }
.site-navigation a:hover { color: var(--primary); }

.hero { padding: 5rem 0 4rem; background: linear-gradient(135deg,#fff,#f1f5f9); border-bottom: 1px solid var(--line); }
.hero-content { max-width: 760px; }
.hero-label { color: var(--primary); font-size: .75rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.hero h1 { margin: .6rem 0 1.25rem; font-size: clamp(2.6rem,7vw,5.2rem); line-height: 1; letter-spacing: -.04em; }
.hero p { margin: 0; color: var(--muted); font-size: 1.15rem; }

.event-type-default { --event-color: #64748b; }
.event-type-sca { --event-color: #e11d48; }
.event-type-rcoa { --event-color: #2563eb; }

.timeline-section { padding: 4rem 0 6rem; }
.timeline-section-header { margin-bottom: 2rem; }
.timeline-section-header h2 { margin: 0; font-size: clamp(2rem,4vw,3rem); }
.timeline { width: 100%; }
.timeline-item { display: grid; grid-template-columns: 22% 72px minmax(0,1fr); min-height: 104px; }
.timeline-date { padding: 1.65rem 1.5rem 0 0; text-align: right; font-weight: 700; white-space: nowrap; }
.timeline-track { position: relative; display: flex; justify-content: center; }
.timeline-track::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; transform: translateX(-50%); background: var(--line); }
.timeline-item:first-child .timeline-track::before { top: 1.7rem; }
.timeline-item:last-child .timeline-track::before { bottom: calc(100% - 1.7rem); }
.timeline-dot { position: relative; z-index: 2; display: block; width: 18px; height: 18px; margin-top: 1.45rem; border-radius: 999px; background: var(--event-color,var(--primary)); box-shadow: 0 0 0 6px var(--background); }
.timeline-content { min-width: 0; padding: .85rem 0 .85rem 1rem; }
.event-card { display: block; padding: 1.25rem 1.5rem; background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--event-color,var(--primary)); border-radius: var(--radius); color: var(--text); font-size: 1.15rem; font-weight: 700; text-decoration: none; box-shadow: 0 4px 18px rgba(15,23,42,.06); transition: transform .2s ease,box-shadow .2s ease; }
.event-card:hover { transform: translateX(4px); box-shadow: 0 8px 24px rgba(15,23,42,.10); }
.timeline-empty { padding: 1.25rem 1.5rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); color: var(--muted); }

.calendar-page,.page,.event-single { padding: 4rem 0 6rem; }
.calendar-header { display: flex; justify-content: space-between; align-items: flex-end; gap: 2rem; margin-bottom: 2rem; }
.calendar-header h1 { margin: .25rem 0 0; font-size: clamp(2.5rem,6vw,4rem); }
.calendar-navigation { display: flex; gap: .5rem; }
.calendar-navigation button { padding: .65rem 1rem; border: 1px solid var(--line); border-radius: .5rem; background: var(--surface); color: var(--text); font: inherit; cursor: pointer; }
.calendar-navigation button:hover { border-color: var(--primary); }
.month-calendar { width: 100%; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.calendar-title { padding: 1.3rem; border-bottom: 1px solid var(--line); text-align: center; font-size: 1.45rem; font-weight: 800; }
.calendar-weekdays,.calendar-days { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); width: 100%; }
.calendar-weekday { min-width: 0; padding: .75rem .25rem; border-bottom: 1px solid var(--line); text-align: center; color: var(--muted); font-size: .78rem; font-weight: 800; }
.calendar-day { min-width: 0; min-height: 125px; padding: .55rem; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.calendar-day:nth-child(7n) { border-right: 0; }
.calendar-day-empty { background: rgba(15,23,42,.025); }
.calendar-day-number { margin-bottom: .45rem; color: var(--muted); font-size: .82rem; font-weight: 700; }
.calendar-day-today { background: rgba(87,13,248,.055); }
.calendar-day-today .calendar-day-number { color: var(--primary); }
.calendar-events { display: flex; flex-direction: column; gap: .32rem; }
.calendar-event { display: block; overflow: hidden; padding: .35rem .45rem; border-left: 4px solid var(--event-color,var(--primary)); border-radius: .3rem; background: color-mix(in srgb,var(--event-color,var(--primary)) 12%,transparent); color: var(--text); font-size: .73rem; font-weight: 700; line-height: 1.25; text-decoration: none; text-overflow: ellipsis; }
.calendar-event:hover { background: color-mix(in srgb,var(--event-color,var(--primary)) 20%,transparent); }
.calendar-error { padding: 1rem; color: #b91c1c; }

.event-list { display: grid; gap: 1rem; }
.event-list-item { display: flex; justify-content: space-between; gap: 1rem; padding: 1rem 1.25rem; background: var(--surface); border: 1px solid var(--line); border-radius: .7rem; text-decoration: none; }
.event-details { display: grid; grid-template-columns: max-content 1fr; gap: .5rem 1.5rem; max-width: 700px; }
.event-details dt { font-weight: 700; }
.event-details dd { margin: 0; }
.event-single-content { max-width: 800px; margin-top: 2rem; }
.site-footer { padding: 2rem 0; border-top: 1px solid var(--line); color: var(--muted); }

@media (max-width: 800px) {
  .timeline-item { grid-template-columns: 42px minmax(0,1fr); }
  .timeline-date { grid-column: 2; padding: .8rem 0 0; text-align: left; }
  .timeline-track { grid-column: 1; grid-row: 1 / span 2; }
  .timeline-dot { margin-top: 1.05rem; }
  .timeline-content { grid-column: 2; padding: .55rem 0 1.6rem; }
  .calendar-header { flex-direction: column; align-items: flex-start; }
  .calendar-navigation { width: 100%; }
  .calendar-navigation button { flex: 1; }
  .calendar-weekday { font-size: .62rem; }
  .calendar-day { min-height: 82px; padding: .3rem; }
  .calendar-event { padding: .24rem .28rem; border-left-width: 3px; font-size: .6rem; white-space: nowrap; }
}

/* =========================================
   DARK MODE
   ========================================= */
:root {
  --background: #0f172a;
  --surface: #111827;
  --text: #e5e7eb;
  --muted: #94a3b8;
  --primary: #a78bfa;
  --line: #334155;
}

body { background: var(--background); color: var(--text); }
.site-header { background: rgba(15,23,42,.94); }
.hero { background: linear-gradient(135deg,#111827,#0f172a); }
.event-type-default { --event-color: #94a3b8; }
.event-type-sca { --event-color: #fb7185; }
.event-type-rcoa { --event-color: #60a5fa; }
.event-card { box-shadow: 0 4px 18px rgba(0,0,0,.28); }
.event-card:hover { box-shadow: 0 8px 26px rgba(0,0,0,.42); }
.calendar-day { background: var(--surface); }
.calendar-day-empty { background: #0b1220; }
.calendar-day-today { background: rgba(167,139,250,.12); }
.calendar-navigation button { background: var(--surface); }
.calendar-navigation button:hover { background: rgba(167,139,250,.10); }

.event-status-confirmed { --event-status: #08db1a; }
.event-status-planned { --event-status: #f1fc55; }

/* =========================================
   ABOUT / KONTAKT
   ========================================= */
.info-page { padding: 5rem 0 7rem; }
.info-page-inner { max-width: 900px; }
.info-page-header { margin-bottom: 2rem; }
.info-page-header h1 { margin: .4rem 0 0; font-size: clamp(2.8rem,7vw,5rem); line-height: 1; letter-spacing: -.04em; }
.info-card { padding: clamp(1.4rem,4vw,2.5rem); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 12px 35px rgba(0,0,0,.20); }
.prose { font-size: 1.08rem; }
.prose p { margin: 0 0 1.2rem; }
.prose p:last-child { margin-bottom: 0; }
.prose a:not(.contact-button) { color: var(--primary); }
.contact-action { margin-top: 2rem !important; }
.contact-button { display: inline-flex; align-items: center; justify-content: center; padding: .8rem 1.15rem; border-radius: .65rem; background: var(--primary); color: #0f172a; font-weight: 800; text-decoration: none; transition: transform .2s ease, opacity .2s ease; }
.contact-button:hover { transform: translateY(-2px); opacity: .92; }
.contact-email { color: var(--muted); font-size: .95rem; }
.contact-note { padding: 1rem; border: 1px dashed var(--line); border-radius: .6rem; color: var(--muted); }

@media (max-width: 700px) {
  .site-header-inner { align-items: flex-start; flex-direction: column; padding: .8rem 0; gap: .65rem; }
  .site-navigation { width: 100%; gap: .9rem; overflow-x: auto; padding-bottom: .2rem; }
  .site-navigation a { white-space: nowrap; }
  .info-page { padding: 3rem 0 5rem; }
}

/* =========================================
   MONATLICH GRUPPIERTE TIMELINE
   ========================================= */
.timeline { width: 100%; }
.timeline-month {
  display: grid;
  grid-template-columns: 20% 70px minmax(0, 1fr);
  position: relative;
}
.timeline-month-label {
  padding: 1.4rem 1.5rem 0 0;
  text-align: right;
  color: var(--text);
  font-size: 1rem;
  font-weight: 800;
  white-space: nowrap;
}
.timeline-month-track { position: relative; display: flex; justify-content: center; }
.timeline-month-track::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--line);
}
.timeline-month-dot {
  position: relative;
  z-index: 2;
  width: 16px;
  height: 16px;
  margin-top: 1.45rem;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 6px var(--background);
}
.timeline-month-group {
  margin: 0 0 2rem;
  padding: .7rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 8px 30px rgba(0,0,0,.16);
}
.timeline-month-events { display: flex; flex-direction: column; }
.timeline-event {
  --event-color: #94a3b8;
  display: grid;
  grid-template-columns: 10px 90px minmax(0, 1fr);
  align-items: center;
  gap: .8rem;
  min-height: 50px;
  padding: .65rem .8rem;
  border-radius: .55rem;
  color: var(--text);
  text-decoration: none;
  transition: background .2s ease, transform .2s ease;
}
.timeline-event + .timeline-event { border-top: 1px solid var(--line); }
.timeline-event:hover { background: rgba(255,255,255,.045); transform: translateX(3px); }
.timeline-event-marker { width: 8px; height: 8px; border-radius: 50%; background: var(--event-color); }
.timeline-event-status { width: 12px; height: 12px; border-radius: 50%; background: var(--event-status); }
.timeline-event-date { color: var(--muted); font-size: .85rem; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.timeline-event-title { min-width: 0; color: var(--text); font-size: 1rem; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.event-type-default { --event-color: #94a3b8; }
.event-type-sca { --event-color: #fb7185; }
.event-type-rcoa { --event-color: #60a5fa; }
.event-actions { margin-top: 1.5rem; }
.ical-link { display: inline-block; padding: .75rem 1.1rem; border: 1px solid var(--line); border-radius: .6rem; background: var(--surface); color: var(--text); font-weight: 700; text-decoration: none; }
.ical-link:hover { border-color: var(--primary); }
.event-single-location { margin-top: 1rem; color: var(--muted); font-size: 1.3rem; font-weight: 600; }
@media (max-width: 700px) {
  .timeline-month { grid-template-columns: 36px minmax(0,1fr); }
  .timeline-month-label { grid-column: 2; padding: 1rem 0 .6rem; text-align: left; }
  .timeline-month-track { grid-column: 1; grid-row: 1 / span 2; }
  .timeline-month-dot { margin-top: 1.2rem; }
  .timeline-month-group { grid-column: 2; margin-bottom: 1.5rem; padding: .4rem; }
  .timeline-event { grid-template-columns: 8px 74px minmax(0,1fr); gap: .5rem; padding: .6rem .4rem; }
  .timeline-event-date { font-size: .78rem; }
  .timeline-event-title { font-size: .9rem; }
}

/* =========================================
   GLOBALER EVENT-FILTER
   ========================================= */

.event-filter-bar {
    position: sticky;
    top: 72px;
    z-index: 90;

    border-bottom: 1px solid var(--line);

    background: rgba(15, 23, 42, 0.94);
    backdrop-filter: blur(12px);
}

.event-filter-inner {
    display: flex;
    align-items: center;
    gap: 1rem;

    min-height: 58px;
}

.event-filter-label {
    flex: 0 0 auto;

    color: var(--muted);

    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.event-filter-options {
    display: flex;
    align-items: center;
    gap: 0.5rem;

    min-width: 0;

    overflow-x: auto;
    scrollbar-width: thin;
}

.event-filter-button {
    flex: 0 0 auto;

    padding: 0.45rem 0.85rem;

    border: 1px solid var(--line);
    border-radius: 999px;

    background: var(--surface);
    color: var(--muted);

    font: inherit;
    font-size: 0.82rem;
    font-weight: 750;

    cursor: pointer;

    transition:
        border-color 0.2s ease,
        background 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease;
}

.event-filter-button:hover {
    border-color: var(--primary);
    color: var(--text);
    transform: translateY(-1px);
}

.event-filter-button.is-active {
    border-color: var(--primary);
    background: var(--primary);
    color: #ffffff;
}

.timeline-event[hidden],
.timeline-month[hidden] {
    display: none !important;
}

@media (max-width: 800px) {
    .event-filter-bar {
        top: 64px;
    }

    .event-filter-inner {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.45rem;

        padding-top: 0.55rem;
        padding-bottom: 0.55rem;
    }

    .event-filter-options {
        width: 100%;
    }
}

/* Filter v2: explizites Ausblenden, unabhängig vom hidden-Attribut */
.filter-hidden {
    display: none !important;
}

/* Timeline category logos */
.timeline-event {
  /*grid-template-columns: 10px 86px 36px minmax(0, 1fr);*/
  grid-template-columns: 6px 36px 66px minmax(0, 1fr) 36px;
}
.timeline-event-logo {
  display: flex;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
}
.timeline-event-logo img {
  display: block;
  width: 30px;
  height: 30px;
  object-fit: contain;
}
@media (max-width: 700px) {
/*  .timeline-event { grid-template-columns: 8px 64px 28px minmax(0, 1fr); }*/
  .timeline-event { grid-template-columns: 6px 36px 64px minmax(0, 1fr) 36px; }
  .timeline-event-logo { width: 26px; height: 26px; }
  .timeline-event-logo img { width: 24px; height: 24px; }
}
