﻿/* ---------------------------
   ROOT
---------------------------- */

.timeline-root {
  position: relative;
  margin: 64px auto;
  display: flex;
  justify-content: center;
}

/* kontener na segmenty (label + year) */
.timeline-body {
  position: relative;
  display: flex;
  flex-direction: column;
}

  .timeline-body::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 1.5px;
    transform: translateX(-50%);
    background-color: #383838;
    pointer-events: none;
  }

/* ---------------------------
   OŚ CZASU (LINIA + STRZAŁKA)
---------------------------- */

.timeline-axis {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
}

.timeline-axis-line {
  margin-inline: auto;
  width: 1.5px;
  flex: 0 0 1.5px;
  background-color: #383838;
}

/* strzałka na samej górze */
.timeline-axis-arrow {
  margin-inline: auto;
  width: 0;
  height: 0;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-bottom: 12px solid #383838;
}

/* kropka na dole osi */
.timeline-axis-end {
  margin-inline: auto;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background-color: #383838;
}

/* ---------------------------
   ETYKIETA ROKU
---------------------------- */

/* TU zostawiasz swoją obecną definicję .timeline-year tak jak masz.
   Przykład (nie wklejaj tego, jeśli masz już inną wersję!):*/

.timeline-year {
  padding: 2px 10px 3px 10px;
  font-size: 14px;
  font-weight: 700;
  margin: 0 auto;
  background-color: #1C1C1C;
  border-radius: 999px;
  border: 1.5px solid #383838;
  color: #ffffff;
  z-index: 1;
}
/**/

/* ---------------------------
   SEGMENT ROKU (TimelineYear)
---------------------------- */

.timeline-year-section {
  position: relative;
  display: flex;
  flex-direction: column;
}

.timeline-year-inner {
  position: relative;
  display: flex;
  flex-direction: column;
}

/* ---------------------------
   WPISY (TimelineItem)
---------------------------- */

.timeline-item {
  position: relative;

}

/* Wiersz: karta + „gałąź” do osi */
.timeline-item-inner {
  display: flex;
  align-items: center;
}

/* lewa/prawa strona – odsunięcie od osi */
.timeline-item-left .timeline-item-inner {
  justify-content: flex-end;
  padding-right: 50%;
}

.timeline-item-right .timeline-item-inner {
  justify-content: flex-start;
  padding-left: 50%;
}

/* karta wydarzenia */
.timeline-item-card {
  max-width: 400px;
  position: relative;
  padding: 24px;
  border-radius: 12px;
  background-color: #ffffff09;
  border: 1px solid #00000040;
  text-align: left;
  flex: 1;
}

/* połączenie z osią */
.timeline-item-branch {
  display: flex;
  align-items: center;
  gap: 0;
}

/* kolejność: dla lewej karty ramię idzie na prawo, dla prawej – w lewo */
.timeline-item-left .timeline-item-branch {
  margin-right: -5px;
  flex-direction: row-reverse;
}

.timeline-item-right .timeline-item-branch {
  margin-left: -5px;
}

/* kropka na osi */
.timeline-item-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background-color: var(--accent-fill-rest, #0992a6);
}

/* ramię od kropki do karty */
.timeline-item-arm {
  width: 40px;
  height: 1.5px;
  background-color: var(--accent-fill-rest, #0992a6);
}

/* ---------------------------
   WĄSKI WIDOK (≤ 800px)
   Oś z lewej, wszystkie wpisy po prawej
---------------------------- */

@media (max-width: 800px) {
  .timeline-axis {
    left: 32px;
    transform: translateX(-50%);
  }

  .timeline-body {
    padding-left: 16px;
  }

  .timeline-item-left .timeline-item-inner,
  .timeline-item-right .timeline-item-inner {
    padding-left: 64px; /* miejsce na oś + gałąź */
    padding-right: 0;
    justify-content: flex-start;
  }

  .timeline-item-left .timeline-item-branch,
  .timeline-item-right .timeline-item-branch {
    flex-direction: row;
    margin-right: 16px;
    margin-left: 0;
  }

  .timeline-year {
    transform: translate(0%, -50%);
    background-color: #1C1C1C;
    border-radius: 999px;
    border: 1.5px solid #383838;
    color: #ffffff;
    z-index: 1;
  }

  .timeline-item-card {
    max-width: min(500px, 100% - 96px);
  }
}


/* ---------------------------
   ROOT
---------------------------- */

/*.timeline-root {
  position: relative;
  margin: 64px auto;
}*/

/* ---------------------------
   OŚ CZASU (LINIA + STRZAŁKA)
---------------------------- */

/*.timeline-axis {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;*/
  /* top i bottom przychodzą inline ze style="top:..; bottom:.." */
/*}

.timeline-axis-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1.5px;
  border-radius: 999px;
  background-color: #383838;
}

.timeline-axis-arrow {
  position: absolute;
  top: -10px;*/ /* strzałka lekko ponad linią */
  /*left: calc(50% + 0.5px);
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-bottom: 12px solid #383838;
}*/

/* ---------------------------
   ETYKIETY LAT
---------------------------- */

/*.timeline-year {
  position: absolute;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 2px 10px 3px 10px;
  font-size: 14px;
  font-weight: 700;
  background-color: #1C1C1C;
  border-radius: 999px;
  border: 1.5px solid #383838;
  color: #ffffff;
  z-index: 1;
}*/

/* ---------------------------
   WPISY (ODNOGI)
   TopPx = punkt styku z osią
---------------------------- */

/* Kotwica na osi (TopPx) */
/*.timeline-item {
  position: absolute;
  left: 0;
  right: 0;
  height: 0;*/ /* ważne: brak własnej wysokości */
/*}*/

/* Kontener boczny (lewa/prawa strona) */
/*.timeline-item-inner {
  position: relative;
  width: 50%;
}*/

/* Karta – wyśrodkowana względem kotwicy (TopPx) */
/*.timeline-item-card {
  position: relative;
  padding: 12px 16px;
  border-radius: 12px;
  background-color: #ffffff09;
  border: 1px solid #00000040;
  padding: 24px;*/ /*temp*/
  /* środek karty wypada dokładnie w miejscu kotwicy (TopPx) */
  /*transform: translateY(-50%);
  text-align: left;
  max-width: 400px;
}*/

/* Gałąź + kropka – kotwica dokładnie w TopPx */
/*.timeline-item-branch {
  position: absolute;
  top: 0;*/ /* TopPx */
  /*height: 2px;
  background-color: var(--accent-fill-rest);
  transform: translateY(-50%);*/ /* środek gałęzi w TopPx */
/*}

.timeline-item-dot {
  position: absolute;
  top: 0;*/ /* TopPx */
  /*width: 12px;
  height: 12px;
  border-radius: 999px;
  background-color: var(--accent-fill-rest);
  transform: translateY(-50%);*/ /* środek kropki w TopPx */
/*}*/

/* ---------------------------
   LEWA / PRAWA STRONA
---------------------------- */

/*.timeline-item-left .timeline-item-inner {
  margin-right: 50%;
}

.timeline-item-left .timeline-item-card {
  margin-left: auto;
  margin-right: 40px;*/ /* odstęp karty od osi */
/*}

.timeline-item-left .timeline-item-branch {
  right: 0;
  width: 40px;*/ /* długość ramienia */
/*}

.timeline-item-left .timeline-item-dot {
  right: -6.5px;*/ /* środek kropki na osi */
/*}

.timeline-item-right .timeline-item-inner {
  margin-left: 50%;
  text-align: left;
}

.timeline-item-right .timeline-item-card {
  margin-left: 40px;
}

.timeline-item-right .timeline-item-branch {
  left: 0;
  width: 40px;
}

.timeline-item-right .timeline-item-dot {
  left: -5.5px;
}*/

/* ---------------------------
   WĄSKI WIDOK (≤ 800px)
   Oś z lewej, wszystkie wpisy po prawej
---------------------------- */

/*@media (max-width: 800px) {
  .timeline-axis {
    left: 32px;
    transform: translateX(-50%);
  }

  .timeline-year {
    left: 32px;
    transform: translate(-50%, -50%);
  }

  .timeline-item-inner {
    width: auto;
    margin-left: 64px;
    margin-right: 0;
    text-align: left;
  }

  .timeline-item-left .timeline-item-inner,
  .timeline-item-right .timeline-item-inner {
    margin-left: 64px;
    margin-right: 0;
  }

  .timeline-item-card,
  .timeline-item-left .timeline-item-card,
  .timeline-item-right .timeline-item-card {
    margin-left: 16px;
    margin-right: 0;
  }*/

  /* Mobile: bez gałęzi, tylko kropka na osi */
  /*.timeline-item-branch {
    display: none;
  }

  .timeline-item-dot,
  .timeline-item-left .timeline-item-dot,
  .timeline-item-right .timeline-item-dot {
    left: 28px;*/ /* środek mniej więcej na osi (32px) */
    /*right: auto;
  }
}*/
