/* ===================================================================
   assets/css/story.css
   Timeline – header-safe & mobile; Marker immer über Karten
   =================================================================== */

/* --- Section-Wrapper: Standard-Offset (JS überschreibt dynamisch) --- */
.history-section{
  /* großzügiger Default-Offset, falls JS mal nicht greift */
  margin-top: 120px;
  scroll-margin-top: 136px;
}

/* Container transparent – Overlay kommt global */
.history-section .container{
  background: transparent;
  padding: 0 1rem;
  max-width: 950px;
  margin: 0 auto;
}

/* Überschrift – IMMER orange, nie unter dem Header */
.history-title{
  color: var(--white) !important;
  font-size: clamp(1.7rem, 3.5vw, 2.4rem);
  line-height: 1.2;
  text-align: center;
  margin: 0 0 1rem;
  letter-spacing: .2px;
}

/* Intro */
.intro-text{
  max-width: 850px;
  margin: 0 auto 1.5rem;
  color: var(--text-light);
  opacity: .95;
  font-size: clamp(.98rem, 1.2vw, 1.05rem);
  line-height: 1.65;
  text-align: center;
}

/* Timeline */
.timeline{
  position: relative;
  margin: 0 auto 2rem;
  padding-left: 2.75rem; /* Platz für Linie + Marker */
}

/* Vertikale Linie (hinter allem) */
.timeline::before{
  content:'';
  position:absolute;
  left:1.25rem;
  top:0; bottom:0;
  width:2px;
  background: linear-gradient(to bottom, rgba(255,255,255,.35), rgba(255,255,255,.15));
  z-index:1; /* hinter Items */
}

/* Item (eigener Stacking-Kontext > Linie) */
.timeline-item{
  position: relative;
  margin-bottom: 1rem;
  z-index: 2;
}

/* Marker (oberste Ebene) */
.timeline-item::before{
  content:'';
  position:absolute;
  left: calc(1.25rem - 7px); /* 14px/2 */
  top: 1.1rem;
  width:14px; height:14px; border-radius:50%;
  background: var(--accent);
  border:3px solid rgba(255,255,255,.9);
  box-shadow:0 0 0 3px rgba(0,0,0,.15);
  z-index: 4; /* über Karte */
}

/* Karte/Content – unter Marker, über Linie */
.timeline-item .content{
  position: relative;
  z-index: 3;
  background: rgba(0,31,48,.82);
  backdrop-filter: saturate(140%) blur(2px);
  border:1px solid rgba(255,255,255,.12);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  box-shadow: 0 6px 18px rgba(0,0,0,.28);
  transition: transform .2s ease, box-shadow .2s ease;
}
.timeline-item .content:hover{
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0,0,0,.35);
}

/* Jahr */
.timeline-item .year{
  display:inline-block;
  font-weight:700;
  letter-spacing:.2px;
  color: var(--accent);
  background: rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.12);
  border-radius:999px;
  padding:.22rem .6rem;
  font-size:.96rem;
  margin-bottom:.35rem;
}

/* Text */
.timeline-item .text{
  color: var(--text-light);
  line-height:1.6;
  font-size:.98rem;
  opacity:.96;
}

/* Tweaks für größere Screens */
@media (min-width:769px){
  .timeline{ padding-left:3.25rem; }
  .timeline::before{ left:1.5rem; }
  .timeline-item::before{ left: calc(1.5rem - 7px); top:1.1rem; }
  .timeline-item .content{ padding:1.05rem 1.25rem; }
  .timeline-item{ margin-bottom:1.1rem; }
}

/* Sehr kleine Screens */
@media (max-width:380px){
  .timeline{ padding-left:2.25rem; }
  .timeline::before{ left:1rem; }
  .timeline-item::before{ left: calc(1rem - 7px); }
  .timeline-item .year{ font-size:.9rem; }
  .timeline-item .text{ font-size:.95rem; }
}
