/* =========================================================
   Simple Timeline – Alternierend links / rechts (klassisch)
   LINKS (odd): Text rechtsbündig IN der Box
   RECHTS (even): Text linksbündig IN der Box
   Mobile: kompakt + Marker exakt auf der Linie
   Print/PDF: Desktop-Layout erzwingen + größere Schrift
   Print/PDF: grauen Theme-Hintergrund entfernen
   Farben via CSS-Variablen (Backend) + Fallbacks
   ========================================================= */

/* ---------- Root Container ---------- */
.stl-timeline{
  position: relative;
  margin: 2.5rem 0;
  padding: 0;
}

/* Zentrale Linie (Desktop) */
.stl-timeline:before{
  content:"";
  position:absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--line, #d6d6d6);
  transform: translateX(-50%);
}

/* ---------- Items ---------- */
.stl-item{
  position: relative;
  width: 100%;
  margin-bottom: 1.5rem;
}

/* Marker (Desktop) */
.stl-marker{
  position:absolute;
  left: 50%;
  top: 1.25rem;
  width: .7rem;
  height: .7rem;
  border-radius: 999px;
  background: var(--marker, #111);
  box-shadow: 0 0 0 4px var(--marker_halo, rgba(17,17,17,.12));
  transform: translateX(-50%);
  z-index: 2;
}

/* ---------- Card ---------- */
.stl-card{
  position: relative;
  width: calc(50% - 2.5rem);
  background: var(--card, #fff);
  border: 1px solid var(--border, rgba(0,0,0,.06));
  border-radius: 14px;
  padding: 1.25rem 1.4rem;
  box-shadow: 0 8px 24px var(--shadow, rgba(0,0,0,.08));
  color: var(--text, #111);
  text-align: left; /* default */
}

/* Links / Rechts alternierend (Box-Position) */
.stl-item:nth-child(odd) .stl-card{ margin-right: auto; }
.stl-item:nth-child(even) .stl-card{ margin-left: auto; }

/* Textausrichtung Desktop:
   Links (odd) = rechtsbündig
   Rechts (even) = linksbündig
*/
.stl-item:nth-child(odd) .stl-card{ text-align: right; }
.stl-item:nth-child(even) .stl-card{ text-align: left; }

/* Pfeil zur Linie */
.stl-card:before{
  content:"";
  position:absolute;
  top: 1.3rem;
  width: 0;
  height: 0;
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
}
.stl-item:nth-child(odd) .stl-card:before{
  right: -9px;
  border-left: 9px solid var(--border, rgba(0,0,0,.06));
}
.stl-item:nth-child(even) .stl-card:before{
  left: -9px;
  border-right: 9px solid var(--border, rgba(0,0,0,.06));
}

/* ---------- Inhalt ---------- */
.stl-meta{
  font-size: .95rem;
  font-weight: 600;
  opacity: .9;
  margin-bottom: .4rem;
}

/* Uhrzeit: Farbe + Größe per Settings */
.stl-time{
  letter-spacing: .02em;
  color: var(--time_color, #666666);
  font-size: var(--time_size, 16px);
}

.stl-title{
  margin: 0 0 .45rem 0;
  font-size: 1.25rem;
  line-height: 1.25;
}
.stl-title a{
  color: inherit;
  text-decoration: none;
}
.stl-title a:hover{
  text-decoration: underline;
}
.stl-excerpt p{
  margin: 0;
  line-height: 1.55;
}

/* ---------- Leerzustand ---------- */
.stl-empty{ opacity: .7; }

/* =========================================================
   Mobile Ansicht – KOMPAKT, einspaltig, Marker auf Linie
   ========================================================= */
@media (max-width: 768px){

  /* kompakter Gutter für Linie + Marker */
  .stl-timeline{ padding-left: 2.4rem; }

  /* Linie links im Gutter */
  .stl-timeline:before{
    left: .9rem;
    transform: none;
  }

  /* Marker: in den Gutter zurückholen + auf Linie zentrieren */
  .stl-marker{
    left: calc(-2.4rem + .9rem); /* -padding-left + line-left */
    transform: translateX(-50%);
    top: 1.15rem;
  }

  /* Card volle Breite im Contentbereich */
  .stl-card{
    width: 100%;
    text-align: left !important; /* mobile besser lesbar */
    padding: 1.05rem 1.15rem;    /* kompakter */
    border-radius: 12px;
  }

  /* Pfeil ausblenden auf Mobile */
  .stl-card:before{ display: none; }

  /* weniger Abstand zwischen Items */
  .stl-item{ margin-bottom: 1.1rem; }
}

/* =========================================================
   PRINT / PDF – Desktop-Layout erzwingen + größere Schrift
   + Theme-Hintergrund entfernen (grau -> weiß)
   ========================================================= */

/* Optional: schon in der geöffneten Druckansicht (nicht nur beim Drucken) Hintergrund weiß */
body.stl-print,
body.stl-print #page,
body.stl-print #content,
body.stl-print #main,
body.stl-print .site,
body.stl-print .site-content,
body.stl-print .content-area,
body.stl-print .container,
body.stl-print .wrapper{
  background: #fff !important;
}

@media print {

  /* Farben & Hintergründe im PDF erlauben (zusätzlich im Druckdialog "Hintergrundgrafiken" aktivieren) */
  *{
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  /* Grauen Theme-Hintergrund im PDF killen */
  html, body{
    background: #fff !important;
  }
  .site, .site-content, .content-area, .container, .wrapper,
  #page, #content, #primary, #main{
    background: #fff !important;
  }

  /* Mehr Blattbreite nutzen: die Timeline selbst bleibt Desktop */
  .stl-timeline{
    padding-left: 0 !important;
    margin: 0 !important;
  }

  /* Linie wieder in die Mitte (Desktop) */
  .stl-timeline:before{
    left: 50% !important;
    transform: translateX(-50%) !important;
  }

  /* Marker wieder mittig auf der Linie (Desktop) */
  .st