/* =========================================================
   LGA — Timeline Express Overwrite (Light/Dark aware)
   ========================================================= */

/* --- Grundlayout / Linie -------------------------------------------------- */

#cd-timeline {
  padding: 20px 0;
}

#cd-timeline::before {
  /* senkrechte Linie */
  background: color-mix(in srgb, var(--border) 80%, transparent) !important;
  width: 3px !important;
}

/* --- Timeline-Icon (Knoten) ---------------------------------------------- */

.cd-timeline-img {
  width: 60px;
  height: 60px;
  margin-left: -30px;                 /* mittig auf der Linie (Desktop) */
  background:
    radial-gradient(80% 80% at 30% 30%,
      color-mix(in srgb, var(--fdp-yellow) 85%, var(--bg)) 0%,
      color-mix(in srgb, var(--fdp-cyan)   85%, var(--bg)) 60%,
      color-mix(in srgb, var(--fdp-magenta)85%, var(--bg)) 100%);
  box-shadow:
    0 0 0 4px var(--bg) !important,   /* „Ring“ in Theme-Hintergrundfarbe */
    0 8px 24px rgba(0,0,0,.25) !important;
  border-radius: 50%;
}

.cd-timeline-img span.year,
#cd-timeline span.fa {
  color: #fff !important;
  line-height: 60px !important;
  font-weight: 700;
}

/* --- Karten / Content ----------------------------------------------------- */

.cd-timeline-content {
  background: var(--card) !important;
  color: var(--text) !important;
  border: 1px solid var(--border) !important;
  border-radius: 14px !important;
  padding: 18px 20px !important;
  box-shadow: var(--shadow-soft, 0 6px 24px rgba(0,0,0,.2)) !important;
  transition: transform .16s ease, box-shadow .18s ease, border-color .18s ease;
}

.cd-timeline-content h1,
.cd-timeline-content h2,
.cd-timeline-content h3 { color: var(--text) !important; margin-top: 0; }

.cd-timeline-content .cd-date,
.cd-timeline-content .timeline-date {
  color: var(--muted) !important;
  opacity: 1 !important;
  font-size: .9rem !important;
}

.cd-timeline-content .the-excerpt,
.cd-timeline-content .the-excerpt p {
  color: color-mix(in srgb, var(--text) 80%, transparent) !important;
}

/* kleiner Hover-Bounce */
.cd-timeline-content:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--fdp-cyan) 40%, var(--border));
  box-shadow: var(--shadow-strong, 0 12px 36px rgba(0,0,0,.30)) !important;
}

/* Pfeilchen an der Karte – gleiche Farbe wie die Karte */
.cd-timeline-content::before {
  border-width: 12px !important;
  top: 18px !important;
  border-color: transparent transparent transparent var(--card) !important;
}

/* „Gerade“ Blöcke (rechte Seite) – Pfeil seitenrichtig einfärben */
@media (min-width: 822px) {
  .cd-timeline-block:nth-child(even) .cd-timeline-content::before {
    left: auto !important;
    right: 100% !important;
    border-color: transparent var(--card) transparent transparent !important;
  }
}

/* Bannerbilder in Beiträgen */
.cd-timeline-title-container + img {
  border-radius: 10px;
  box-shadow: var(--shadow-soft, 0 6px 24px rgba(0,0,0,.2));
}

/* --- „Weiterlesen“-Link als Button --------------------------------------- */

.cd-timeline-content .timeline-express-read-more-link {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: linear-gradient(90deg,
              color-mix(in srgb, var(--fdp-yellow) 75%, var(--bg)) 0%,
              color-mix(in srgb, var(--fdp-cyan)   75%, var(--bg)) 50%,
              color-mix(in srgb, var(--fdp-magenta)75%, var(--bg)) 100%);
  color: color-mix(in srgb, var(--bg) 90%, #000) !important;
  font-weight: 700;
  text-decoration: none !important;
  box-shadow: var(--shadow-soft, 0 6px 24px rgba(0,0,0,.2));
  transition: transform .1s ease, box-shadow .18s ease, filter .18s ease;
}
.cd-timeline-content .timeline-express-read-more-link:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-strong, 0 12px 36px rgba(0,0,0,.3));
  filter: saturate(1.05);
}

/* --- Responsive Feinschliff ---------------------------------------------- */

@media (max-width: 821.98px) {
  #cd-timeline::before { left: 28px !important; }  /* etwas mehr Abstand */
  .cd-timeline-img { left: 28px; margin-left: -30px; }
  .cd-timeline-content { margin-left: 86px !important; }
  .cd-timeline-content::before {
    right: 100% !important;
    left: auto !important;
  }
}

/* --- Single Announcement Page ------------------------------------------- */

body.single-te_announcements .timeline-express-main { max-width: 960px; }
body.single-te_announcements .timeline-express-content-area { width: 100%; }
body.single-te_announcements .timeline-express-single-page-content {
  color: var(--text);
}
body.single-te_announcements .timeline-express-single-page-announcement-date {
  color: var(--muted);
}

/* --- Saubere Linkfarben innerhalb der Cards ------------------------------ */

.cd-timeline-content a { color: inherit; }
.cd-timeline-content a:hover {
  color: color-mix(in srgb, var(--fdp-cyan) 70%, var(--text));
}

/* Optional: dezent gefärbte Jahres-Kreise anhand eures Farbverlaufs */
.cd-timeline-img--alt {
  background:
    linear-gradient(135deg,
      color-mix(in srgb, var(--fdp-yellow) 70%, var(--bg)) 0%,
      color-mix(in srgb, var(--fdp-cyan)   70%, var(--bg)) 50%,
      color-mix(in srgb, var(--fdp-magenta)70%, var(--bg)) 100%) !important;
}
