@charset "UTF-8";

/* =========================
   TIMELINE – robust für WebYep
   ========================= */

.timeline{
  padding: 70px 0 90px;
}

.timeline__wrap{
  position: relative;
}

/* Mittige rote Linie */
.timeline__line{
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 4px;
  transform: translateX(-50%);
  background: var(--logorot, #e30613);
  pointer-events: none;
}

/* Jede Zeile: links | Mitte | rechts (symmetrisch!) */
.timelineItem{
  display: grid;
  grid-template-columns: 1fr 80px 1fr;
  align-items: start;
  margin: 0 0 70px;
  position: relative;
}

/* Box ist IMMER gleich groß */
.timelineBox{
  width: 640px;
  max-width: 92%;
  background: #e7e7df;
  padding: 26px;
  box-sizing: border-box;
  min-width: 0;
  display: grid;
  gap: 18px;
  align-items: start;
}

/* ========== Alternierung erzwingen (wichtig: nth-of-type) ========== */

/* 1,3,5… links, rechtsbündig zur Linie */
.timelineItem:nth-of-type(odd) .timelineBox{
  grid-column: 1;
  justify-self: end;

  /* Layout IN DER BOX: Text | Bild */
  grid-template-columns: 1.15fr 220px;
  grid-template-areas: "content media";
}

/* 2,4,6… rechts, linksbündig zur Linie */
.timelineItem:nth-of-type(even) .timelineBox{
  grid-column: 3;
  justify-self: start;

  /* Layout IN DER BOX: Bild | Text */
  grid-template-columns: 220px 1.15fr;
  grid-template-areas: "media content";
}

/* Bereiche (kein order-Gedöns mehr) */
.timelineBox__media{ grid-area: media; min-width: 0; }
.timelineBox__content{
  min-width: 0;          /* ?? super wichtig bei Grid */
  overflow-wrap: break-word;
  word-break: break-word;
}

/* ========== Bild: scharf, sauber, ohne Verzerrung ========== */
.timelineBox__media{
  width: 220px;
  max-width: 100%;
}

.timelineBox__media a{ display: block; } /* WebYep packt gern <a> drum */

.timelineBox__media img,
.timelineImg{
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  aspect-ratio: 1 / 1;
  image-rendering: auto;
}

/* ========== Text ========== */
.timelineBox__title{
  margin: 0 0 10px;
  font-weight: 900;
  line-height: 1.1;
}

.timelineBox__text{
  line-height: 1.55;
}

.timelineBox__text p{
  margin: 0 0 12px;
}
.timelineBox__text p:last-child{
  margin-bottom: 0;
}





/* ==========================================================
   Mobile
   ========================================================== */

@media (max-width: 900px){

  .timeline__line{
    left: 18px;
    transform: none;
  }

  .timelineItem{
    grid-template-columns: 1fr;
    padding-left: 34px;
    margin-bottom: 26px;
  }

  .timelineItem .timelineBox{
    grid-column: 1;
    justify-self: stretch;
    width: 100%;
    max-width: 100%;

    grid-template-columns: 1fr;
    grid-template-areas:
      "media"
      "content";
  }

  .timelineBox__media{
    width: 100%;
  }

  .timelineBox__media img,
  .timelineImg{
    aspect-ratio: 4 / 3; /* auf Mobile angenehmer */
  }
}