/* === Timeline Slider - Fixed, Responsive Layout === */

.timeline-slider-container {
  width: 100%;
  margin: 40px auto;
  font-family: Arial, sans-serif;
}

/* Timeline bar */
.timeline-bar {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
}

.timeline-start,
.timeline-end {
  width: 100px;
  text-align: center;
  font-size: 40px;
  font-weight: bold;
  color: #1a2f72;
}

.timeline-track {
  position: relative;
  flex: 1;
  height: 1px;
  background: #C73F5E;
  margin: 0 10px;
}

.timeline-marker-line {
  position: absolute;
  height: 14px;
  top: -7px;
  width: 1px;
  background: #C73F5E;
  transition: left 0.3s ease;
  z-index: 1;
}

.timeline-marker-circle {
  position: absolute;
  top: 15px;
  width: 50px;
  height: 50px;
  transform: translateX(-50%);
  background: #C73F5E;
  border-radius: 50%;
  padding: 5px;
  transition: left 0.3s ease;
  z-index: 2;
}

.timeline-marker-date {
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 38px;
  height: 38px;
  display: block;
  border: 1px solid #fff;
  border-radius: 50%;
  background: #C73F5E;
  font-size: 14px;
  line-height: 2.7;
  color: #fff;
  text-align: center;
}

/* === Slides + Navigation === */

.slides-wrapper {
  position: relative;
  display: flex;
  touch-action: pan-y;
  justify-content: center;
  align-items: center;
  margin-top: 75px;
  height: 600px;
  overflow: hidden;
  width: 100%;
  box-sizing: border-box;
}

/* Navigation Arrows */
.slide-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 50px;
  height: 50px;
  display: grid;
  border-radius: 50%;
  background: #c73f5e;
  color: white;
  font-size: 40px;
  cursor: pointer;
  padding: 0px;
}

.slide-nav.prev {
  left: 260px;
}

.slide-nav.next {
  right: 260px;
}

/* Slide Track */
.slides {
  position: relative;
  width: 100%;
  height: 100%;
}

/* Individual Slide */
.slide {
  position: absolute;
  top: 0;
  left: 50%;
  width: 354px;
  height: 600px;
  transform: translateX(-50%) scale(0.5);
  background: #e7e7e7;
  border-radius: 8px;
  overflow: hidden;
  padding: 10px;
  transform-origin: center center;
  transition: transform 0.5s ease, opacity 0.5s ease;
  opacity: 0;
  z-index: 0;
}

/* Slide Inner Content */
.slide-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 1px solid #c73f5e;
  border-radius: 8px;
  padding: 10px;
}

.slide-inner img {
  width: 100%;
  height: 260px !important;
  object-fit: cover;
  display: block;
}

.slide-date {
  text-align: left;
  margin: 20px 0;
  color: #1a2f72;
  font-weight: bold;
  font-size: 50px;
}

/* Slide Description */
.slide-desc {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 10px 15px;
  font-size: 13px;
  color: #555;
  line-height: 1.4;
  white-space: pre-line; /* honor line/paragraph breaks typed in the description */
  overscroll-behavior: contain;
  touch-action: pan-y;
  scrollbar-width: thin;
  scrollbar-color: rgba(199, 63, 94,0.5) transparent;
}

.slide-desc::-webkit-scrollbar {
  width: 3px;
}

.slide-desc::-webkit-scrollbar-track {
  background: transparent;
}

.slide-desc::-webkit-scrollbar-thumb {
  background-color: rgba(199, 63, 94, 0.5);
  border-radius: 3px;
}

/* === Layering Roles === */
.slide.prev2 {
  transform: translateX(-160%) scale(0.6);
  opacity: 1;
  z-index: 1;
}

.slide.prev {
  transform: translateX(-80%) scale(0.75);
  opacity: 1;
  z-index: 2;
}

.slide.active {
  transform: translateX(0%) scale(1);
  opacity: 1;
  z-index: 3;
}

.slide.next {
  transform: translateX(80%) scale(0.75);
  opacity: 1;
  z-index: 2;
}

.slide.next2 {
  transform: translateX(160%) scale(0.6);
  opacity: 1; 
  z-index: 1;
}

/* ——————————— Mobile (<=600px) ——————————— */
@media (max-width: 600px) {
  .timeline-slider-container {
    margin: 0px auto;
  }
  .timeline-start, .timeline-end {
    width: 20%;
    font-size: 25px;
  }
  .slide-nav {
    top: 30%;
  }
  .slide {
    width: 75vw;               /* 70% of viewport */
    left: 50%;                 /* centered; JS translateX(-50%) handles the rest */
    height: 450px;
    margin: 0;
  }

  /* Arrows mirror each other about the centered card: same distance from
     center on each side, so they're equally spaced from the edges too. */
  .slide-nav.prev {
    left: calc(50% - 40vw);
    right: auto;
  }
  .slide-nav.next {
    left: auto;
    right: calc(50% - 40vw);
  }
  .slide-date {
  margin: 10px 0;
  color: #333;
  font-size: calc(3.6vw + 1vh + 1vmin);
}
}

