/* ==========================================================================
   VP5: Vita Timeline Section
   ========================================================================== */

.vita {
  min-height: 100vh;
  width: 100%;
  background-color: var(--color-black);
  position: relative;
  overflow: hidden;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-3xl) var(--space-xl);
}

/* Background Topology Wave */
.vita__bg {
  position: absolute;
  left: -5%;
  right: -5%;
  top: 0;
  height: 150%;
  background: url('../img/bg_topology_purple_alpha.png') no-repeat center center;
  background-size: cover;
  pointer-events: none;
  z-index: 0;
  opacity: 0.6;
}

/* ==========================================================================
   Content Container
   ========================================================================== */

.vita__content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1600px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2xl);
}

/* ==========================================================================
   Header - Logo + Title
   ========================================================================== */

.vita__header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
}

.vita__logo {
  width: clamp(60px, 8vw, 100px);
  height: auto;
}

.vita__title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 8vw, 5rem);
  color: var(--color-purple);
  -webkit-text-stroke: 2px var(--color-magenta);
  text-stroke: 2px var(--color-magenta);
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

/* ==========================================================================
   Timeline - Desktop (Horizontal with Absolute Positioning)
   ========================================================================== */

.vita__timeline {
  position: relative;
  width: 100%;
  height: 320px;
}

/* Horizontal Line with end caps */
.vita__line {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 2px;
  background: var(--color-gold);
}

/* End caps - vertical strokes at start and end */
.vita__line::before,
.vita__line::after {
  content: '';
  position: absolute;
  width: 2px;
  height: 16px;
  background: var(--color-gold);
  top: 50%;
  transform: translateY(-50%);
}

.vita__line::before {
  left: 0;
}

.vita__line::after {
  right: 0;
}

/* ==========================================================================
   Station - Individual Timeline Point
   ========================================================================== */

.vita__station {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 180px;
}

/* Station Dot - outline circle at end of connector */
.vita__station-dot {
  width: 14px;
  height: 14px;
  background: transparent;
  border: 2px solid var(--color-gold);
  border-radius: 50%;
  flex-shrink: 0;
  z-index: 2;
}

/* Station Connector - vertical line between dot and content */
.vita__station-connector {
  width: 2px;
  height: 25px;
  background: var(--color-gold);
  flex-shrink: 0;
  z-index: 2;
}

/* ==========================================================================
   Top Stations - Content ABOVE the line
   Visual order top to bottom: Content → Dot → Connector (Content am weitesten weg)
   ========================================================================== */

.vita__station--top {
  top: auto;
  bottom: 50%;
  transform: translateY(1px);
  flex-direction: column;
}

.vita__station--top > .vita__station-content {
  order: -2 !important;
}

.vita__station--top > .vita__station-dot {
  order: -1 !important;
}

.vita__station--top > .vita__station-connector {
  order: 0 !important;
}

/* ==========================================================================
   Bottom Stations - Content BELOW the line
   Visual order top to bottom: Connector → Dot → Content (Content am weitesten weg)
   ========================================================================== */

.vita__station--bottom {
  top: 50%;
  bottom: auto;
  transform: translateY(-1px);
  flex-direction: column;
}

.vita__station--bottom > .vita__station-connector {
  order: -2 !important;
}

.vita__station--bottom > .vita__station-dot {
  order: -1 !important;
}

.vita__station--bottom > .vita__station-content {
  order: 0 !important;
}

/* ==========================================================================
   Station Content - All text is GOLD
   ========================================================================== */

.vita__station-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 2px;
  width: 15rem;
  position: relative;
  z-index: 5;
}

/* ALL text is gold, same styling */
.vita__station-org,
.vita__station-date,
.vita__station-role {
  font-family: var(--font-body);
  font-size: clamp(0.9rem, 1.1vw, 1.1rem);
  color: var(--color-gold);
  line-height: 1.25;
}

/* ==========================================================================
   Station Positions (12 stations)
   nth-child(2) = first station (nth-child(1) is .vita__line)
   ========================================================================== */

.vita__station:nth-child(2)  { left: 0%; }
.vita__station:nth-child(3)  { left: 8.3%; }
.vita__station:nth-child(4)  { left: 16.6%; }
.vita__station:nth-child(5)  { left: 25%; }
.vita__station:nth-child(6)  { left: 33.3%; }
.vita__station:nth-child(7)  { left: 41.6%; }
.vita__station:nth-child(8)  { left: 50%; }
.vita__station:nth-child(9)  { left: 58.3%; }
.vita__station:nth-child(10) { left: 66.6%; }
.vita__station:nth-child(11) { left: 75%; }
.vita__station:nth-child(12) { left: 83.3%; }
.vita__station:nth-child(13) { left: 91.6%; }

/* ==========================================================================
   Footer - Barcode
   ========================================================================== */

.vita__footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
}

.vita__barcode {
  height: 40px;
  width: auto;
}

/* ==========================================================================
   Responsive - Large Desktop
   ========================================================================== */

@media (min-width: 1600px) {
  .vita__station {
    width: 140px;
  }
}

/* ==========================================================================
   Responsive - Tablet
   ========================================================================== */

@media (max-width: 1400px) {
  .vita__station {
    width: 105px;
  }

  .vita__station-org,
  .vita__station-date,
  .vita__station-role {
    font-size: 0.85rem;
  }
}

@media (max-width: 1200px) {
  .vita__station {
    width: 95px;
  }

  .vita__station-org,
  .vita__station-date,
  .vita__station-role {
    font-size: 0.8rem;
  }

  .vita__station-connector {
    height: 18px;
  }
}

/* ==========================================================================
   Responsive - Mobile (Vertical Centered Timeline)
   ========================================================================== */

@media (max-width: 1024px) {
  .vita {
    padding: var(--space-4xl) var(--space-lg);
  }

  .vita__content {
    gap: var(--space-2xl);
  }

  .vita__timeline {
    height: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
  }

  /* Linie verstecken auf Mobile */
  .vita__line {
    display: none;
  }

  /* Dots und Connectors verstecken */
  .vita__station-dot,
  .vita__station-connector {
    display: none;
  }

  /* Reset absolute positioning for mobile */
  .vita__station {
    position: relative;
    top: auto;
    left: auto !important;
    transform: none !important;
    width: 100%;
    max-width: 320px;
    padding: 0;
    flex-direction: column;
    align-items: center;
  }

  .vita__station--top,
  .vita__station--bottom {
    flex-direction: column;
  }

  /* Outline Style wie About Button */
  .vita__station-content {
    background: transparent;
    border: 2px solid var(--color-gold);
    padding: var(--space-sm) var(--space-md);
    border-radius: 0;
    width: 100%;
    transform-origin: center center;
    will-change: transform, box-shadow;
  }

  /* Gold Text */
  .vita__station-org,
  .vita__station-date,
  .vita__station-role {
    font-size: 0.95rem;
    color: var(--color-gold);
  }
}

/* ==========================================================================
   Responsive - Small Mobile
   ========================================================================== */

@media (max-width: 768px) {
  .vita {
    padding: var(--space-4xl) var(--space-md);
  }

  .vita__title {
    letter-spacing: 0.2em;
  }

  .vita__station-content {
    padding: var(--space-xs) var(--space-sm);
  }
}

@media (max-width: 480px) {
  .vita {
    padding: var(--space-4xl) var(--space-sm);
  }

  .vita__title {
    -webkit-text-stroke: 1.5px var(--color-magenta);
    text-stroke: 1.5px var(--color-magenta);
  }
}

/* ==========================================================================
   Animation States (for GSAP)
   ========================================================================== */

.vita__header,
.vita__station,
.vita__footer {
  opacity: 0;
}

/* ==========================================================================
   Expand Button - Mobile Only
   ========================================================================== */

.vita__expand-btn {
  display: none;
}

@media (max-width: 1024px) {
  .vita__expand-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: transparent;
    border: 2px solid var(--color-gold);
    border-radius: 50%;
    color: var(--color-gold);
    font-family: var(--font-display);
    font-size: 1.5rem;
    cursor: pointer;
    transition: transform 0.3s ease;
    margin: var(--space-md) 0;
  }

  .vita__expand-btn .vita__expand-icon {
    line-height: 1;
  }

  /* Hidden stations - collapsed by default on mobile */
  .vita__station--hidden {
    display: none;
  }

  /* Show when expanded */
  .vita__content.is-expanded .vita__station--hidden {
    display: flex;
  }
}
