.history-list-component .timeline-card {
  background-color: #fff;
  border-radius: 32px;
  width: 100%;
  padding: 48px;
  box-shadow: 0px 24px 48px -12px rgba(16, 24, 40, 0.18);
}

/* Navigation and Timeline */
.history-list-component .timeline-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 48px;
}

.history-list-component .nav-button {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid #e0e0e0;
  background-color: white;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s;
}

.history-list-component .nav-button svg path {
  transition: stroke 0.2s;
}

/* Active button - orange color */
.history-list-component .nav-button.active svg path {
  stroke: #e76127;
}

.history-list-component .nav-button.active:hover {
  background-color: #f5f5f5;
  border-color: #e76127;
}

/* Inactive button - should stay gray */
.history-list-component .nav-button:not(.active) {
  cursor: default;
}

.history-list-component .nav-button:not(.active):hover {
  background-color: white;
  border-color: #e0e0e0;
}

.history-list-component .nav-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.history-list-component .timeline {
  display: flex;
  align-items: center;
  position: relative;
  width: 90%;
  margin-left: auto;
  margin-right: auto;
  justify-content: center;
}

/* Base line across entire timeline */
.history-list-component .timeline::before {
  display: none;
}

/* Container for points and labels */
.history-list-component .timeline-point {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 2;
  flex: 1;
  max-width: 100px;
}

/* Dots in timeline */
.history-list-component .timeline-dot {
  width: 12px;
  height: 12px;
  margin-top: 6px;
  border-radius: 50%;
  background-color: #666666;
  position: relative;
  z-index: 3;
}

/* Active dot state */
.history-list-component .timeline-point.active .timeline-dot {
  background-color: #e76127;
}

/* Year/label under dot */
.history-list-component .timeline-year {
  font-size: 14px;
  margin-top: 6px;
  font-weight: 800;
  color: #666666;
}

/* Active label state */
.history-list-component .timeline-point.active .timeline-year {
  color: #e76127;
}

/* Connecting lines between dots */
.history-list-component .timeline-point::before,
.history-list-component .timeline-point::after {
  content: '';
  position: absolute;
  top: 11px;
  height: 2px;
  background-color: #666666;
  z-index: 1;
}

.history-list-component .timeline-point::before {
  right: calc(50% + 6px);
  left: -50%;
  @media (min-width: 1200px) {
    left: -33.5%;
    max-width: 65px;
    border-radius: 2px;

  }
}

.history-list-component .timeline-point::after {
  left: calc(50% + 6px);
  right: -50%;

  @media (min-width: 1200px) {
    display: none;
  }
}

/* First point has no left line */
.history-list-component .timeline-point:first-child::before {
  display: none;
}

/* Last point has no right line */
.history-list-component .timeline-point:last-child::after {
  display: none;
}

/* Active point styling */
.history-list-component .timeline-point.active {
  z-index: 4;
}

.history-list-component .timeline-point.active::before {
  @media (max-width: 1199px) {
    background: linear-gradient(to right, #666, #e76127);
  }
}

.history-list-component .timeline-point.active::after {
  background: linear-gradient(to right, #e76127, #666666);
}

/* Mobile Timeline Dots */
.history-list-component .mobile-timeline {
  display: none;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 48px;
  position: relative;
  width: 100%;
  overflow: hidden;
}

.history-list-component .mobile-timeline-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  width: 80%;
  padding: 0 20px;
}

.history-list-component .mobile-dot {
  display: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: #e76127;
  position: relative;
  z-index: 3;
  margin-top: 6px;
}

.history-list-component .mobile-dot.active {
  display: block;
}

/* Tails extending from the mobile dot */
.history-list-component .mobile-dot.active::before,
.history-list-component .mobile-dot.active::after {
  content: '';
  position: absolute;
  top: 50%;
  height: 2px;
  z-index: 1;
  transform: translateY(-50%);
}

/* Left tail */
.history-list-component .mobile-dot.active::before {
  right: 12px;
  left: -30vw;
  width: 30vw;
  background: linear-gradient(to left, #e76127, rgba(231, 97, 39, 0) 90%);
}

/* Right tail */
.history-list-component .mobile-dot.active::after {
  left: 12px;
  right: -65vw;
  width: 30vw;
  background: linear-gradient(to right, #e76127, rgba(231, 97, 39, 0) 90%);
}

/* Show the current year above the timeline on mobile */
.history-list-component .mobile-year {
  display: none;
  font-size: 14px;
  font-weight: 800;
  color: #666666;
  text-align: center;
  line-height: 16px;
  margin-top: 8px;
}

.history-list-component .mobile-year.active {
  display: block;
  /* color: #e76127; */
}

/* Content Area */
.history-list-component .content-area {
  position: relative;
  overflow: hidden;
  /* Prevent content flicker during animations */
  min-height: 300px;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  -webkit-perspective: 1000px;
  perspective: 1000px;
  touch-action: pan-y; /* Enable vertical scrolling but use custom horizontal swipe handling */
  cursor: grab; /* Indicates swipeable content */
}

.history-list-component .content-area:active {
  cursor: grabbing; /* Visual feedback during swipe */
}

.history-list-component .timeline-content {
  display: none;
  grid-template-columns: 1fr;
  gap: 32px;
  position: absolute;
  width: 100%;
  opacity: 0;
  transform: translateX(0);
  transition: none;
  left: 0;
  right: 0;
  will-change: transform, opacity;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  top: 0;
  height: 100%;
}

.history-list-component .timeline-content.active {
  display: grid;
  position: relative;
  opacity: 1;
  transform: translateX(0);
  z-index: 2;
}

.history-list-component .timeline-content.slide-right {
  display: grid;
  transform: translateX(100%);
}

.history-list-component .timeline-content.slide-left {
  display: grid;
  transform: translateX(-100%);
}

.history-list-component .timeline-content.slide-in-left {
  animation: slideInLeft 0.4s cubic-bezier(0.215, 0.610, 0.355, 1.000) forwards;
}

.history-list-component .timeline-content.slide-in-right {
  animation: slideInRight 0.4s cubic-bezier(0.215, 0.610, 0.355, 1.000) forwards;
}

.history-list-component .timeline-content.slide-out-left {
  animation: slideOutLeft 0.4s cubic-bezier(0.215, 0.610, 0.355, 1.000) forwards;
  z-index: 1;
}

.history-list-component .timeline-content.slide-out-right {
  animation: slideOutRight 0.4s cubic-bezier(0.215, 0.610, 0.355, 1.000) forwards;
  z-index: 1;
}

@keyframes slideInLeft {
  0% { transform: translateX(-100%); opacity: 0; }
  100% { transform: translateX(0); opacity: 1; }
}

@keyframes slideInRight {
  0% { transform: translateX(100%); opacity: 0; }
  100% { transform: translateX(0); opacity: 1; }
}

@keyframes slideOutLeft {
  0% { transform: translateX(0); opacity: 1; }
  100% { transform: translateX(-100%); opacity: 0; }
}

@keyframes slideOutRight {
  0% { transform: translateX(0); opacity: 1; }
  100% { transform: translateX(100%); opacity: 0; }
}

/* Add Safari-specific prefixes */
@-webkit-keyframes slideInLeft {
  0% { -webkit-transform: translateX(-100%); opacity: 0; }
  100% { -webkit-transform: translateX(0); opacity: 1; }
}

@-webkit-keyframes slideInRight {
  0% { -webkit-transform: translateX(100%); opacity: 0; }
  100% { -webkit-transform: translateX(0); opacity: 1; }
}

@-webkit-keyframes slideOutLeft {
  0% { -webkit-transform: translateX(0); opacity: 1; }
  100% { -webkit-transform: translateX(-100%); opacity: 0; }
}

@-webkit-keyframes slideOutRight {
  0% { -webkit-transform: translateX(0); opacity: 1; }
  100% { -webkit-transform: translateX(100%); opacity: 0; }
}

.history-list-component .image-container {
  border-radius: 12px;
  overflow: hidden;
  background-color: #f5f5f5;
}

.history-list-component .item-image img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 16px;
  object-fit: cover;
  aspect-ratio: 3 / 2 !important;
}

.history-list-component .item-content .item-title {
  color: #006680;
  font-size: 32px;
  font-style: normal;
  font-weight: 400;
  line-height: 120%;
  margin-bottom: 8px;
}

.history-list-component .item-content .item-description {
  color: #666666;
  font-style: normal;
  font-weight: 400;
  line-height: 150%;
  font-size: 16px;
}

.history-list-component .item-content .item-description p {
  margin-bottom: 16px;
}

.history-list-component .item-content .item-description p:last-child {
  margin-bottom: 0;
}

/* Responsive Styles */
@media (min-width: 1200px) {
  .history-list-component .timeline-content {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 1199px) {
  .history-list-component .timeline-card {
    padding: 32px;
    border-radius: 24px;
  }

  .history-list-component .item-content .item-title {
    font-size: 24px;
  }

  .history-list-component .item-image img {
    border-radius: 12px;
  }

  .history-list-component .nav-button {
    width: 40px;
    height: 40px;
  }

  .history-list-component .timeline-nav button img {
    width: 22px;
    height: 22px;
  }

  .history-list-component .timeline-nav .timeline {
    width: 90%;
  }
}

@media (max-width: 767px) {
  .history-list-component .timeline {
    display: none;
  }

  .history-list-component .mobile-timeline {
    display: flex;
    align-items: flex-start;
  }

  .history-list-component .item-content .item-title {
    font-size: 20px;
  }

  .history-list-component .timeline-card {
    padding: 24px;
    box-shadow: 0px 24px 48px -12px rgba(16, 24, 40, 0.18);
    border-radius: 16px;
  }

  .history-list-component .item-image img {
    border-radius: 10px;
  }

  .history-list-component .content-title {
    font-size: 28px;
    margin-bottom: 16px;
  }

  .history-list-component .mobile-timeline .nav-button {
    width: 24px;
    height: 24px;
  }

  .history-list-component .mobile-timeline button img {
    width: 12px;
    height: 12px;
  }

  .history-list-component .timeline-nav {
    display: none;
  }

  .history-list-component .timeline-content {
    gap: 16px;
  }
}

@keyframes swipeHint {
  0% { transform: translateX(0); opacity: 0.5; }
  50% { transform: translateX(-10px); opacity: 0.8; }
  100% { transform: translateX(0); opacity: 0.5; }
}
