/* Reset and Base Styles */
.timeline-slider {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  box-sizing: border-box;
}

.timeline-slider *,
.timeline-slider *:before,
.timeline-slider *:after {
  box-sizing: inherit;
  margin: 0;
  padding: 0;
}

/* Main Container */
.timeline-slider {
  position: relative;
  /*     width: 100vw; */
  height: calc(100vh - 90px);
  overflow: hidden;
  margin-left: -15px !important;
  margin-right: -15px !important;
}

/* Slides Container */
.timeline-slides {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

/* Individual Slide */
.timeline-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease-in-out, visibility 0.5s ease-in-out;
}

.timeline-slide.active {
  opacity: 1;
  visibility: visible;
}

/* Slide Container */
.slide-container {
  position: relative;
  width: 100%;
  height: 100%;
}

/* Background */
.slide-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.background-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    rgba(0, 0, 0, 0.4) 0%,
    rgba(0, 0, 0, 0.1) 100%
  );
}

/* Content Area */
.content-wrapper {
  position: relative;
  z-index: 2;
  padding: 60px;
}

/* Purple Box */
.purple-box {
  position: relative;
  max-width: 50%;
  background: linear-gradient(135deg, #6a1b9a, #8e24aa);
  padding: 20px 25px;
  border-radius: 15px;
  color: white;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  margin: 80px 50px;
  clip-path: polygon(0 0, calc(100% - 30px) 0, 100% 30px, 100% 100%, 0% 100%);
}

/* Arrow Shape 
.purple-box::after {
    content: '';
    position: absolute;
    right: -15px;
    top: 50%;
    width: 30px;
    height: 30px;
    background-color: #680079;
    transform: translateY(-50%) rotate(45deg);
    z-index: -1;
}
*/

/* Text Styles */
.timeline-slider-name {
  position: absolute;
  top: 40px;
  left: 110px;
  color: #fff;
  font-size: 40px;
  line-height: 50px;
  z-index: 10;
}
.purple-box .year {
  font-size: 16px;
  font-weight: 400;
  margin-bottom: 0;
  line-height: 30px;
}

.purple-box .title {
  font-size: 26px;
  font-weight: 400;
  margin-bottom: 10px;
  line-height: 40px;
  color: #fff;
}

.purple-box .description {
  font-size: 16px;
  line-height: 25px;
  letter-spacing: 0.4px;
  /*max-height: 230px;
	overflow-y: scroll;
	padding-right: 10px;	*/
}

.purple-box .description a {
  color: #fff;
}

.purple-box .description::-webkit-scrollbar {
  width: 4px;
}
.purple-box .description::-webkit-scrollbar-thumb {
  background: #fff;
  height: 20px;
  border-radius: 10px;
}
.purple-box .description::-webkit-scrollbar-track {
  background: transparent;
}

/* Timeline Bottom */
.timeline-bottom {
  position: absolute;
  width: 100%;
  height: 60px;
  background: rgba(0, 0, 0, 0);
  padding: 0 60px;
  display: flex;
  align-items: center;
  bottom: 30px;
  left: 0;
  color: #fff;
  z-index: 10;
}

/* Timeline Years */
.timeline-years {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 40px;
  z-index: 2;
}

/* Timeline Line */
.timeline-line {
  position: absolute;
  top: 12px;
  left: 100px;
  right: 100px;
  height: 1px;
  background: rgba(255, 255, 255, 0.3);
}

/* Year Item */
.year-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: transform 0.3s ease;
}

/* Timeline Dot */
.dot {
  width: 50px;
  height: 4px;
  background: transparent;
  margin-bottom: 8px;
  transition: all 0.3s ease;
}

.year-item.active .dot {
  background: #f5b828;
}

/* Year Label */
.year-label {
  font-size: 14px;
  color: #fff;
  font-weight: 400;
  transition: color 0.3s ease;
}

.year-item.active .year-label {
  color: #f5b828;
  font-size: 20px;
  font-weight: 700;
}

/* Navigation Buttons */
.nav-button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  background: rgba(104, 0, 121, 0.7);
  border: none;
  border-radius: 50%;
  color: white;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.nav-button:hover {
  background: #680079;
  transform: translateY(-50%) scale(1.1);
}

.nav-button:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(104, 0, 121, 0.3);
}

.nav-button.prev {
  left: 20px;
}

.nav-button.next {
  right: 20px;
}

/* Loading State */
.slider-loader {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.8);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 20;
}

.timeline-slider.loading .slider-loader {
  display: flex;
}

.loader-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid #680079;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Keyboard Instructions */
.keyboard-instructions {
  position: absolute;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(104, 0, 121, 0.1);
  color: #680079;
  padding: 8px 16px;
  border-radius: 4px;
  font-size: 14px;
  display: none;
}

.timeline-slider:focus-within .keyboard-instructions {
  display: block;
}

/* Hover Effects */
.year-item:hover .dot {
  transform: scale(1.2);
}

.year-item:hover .year-label {
  color: #f5b828;
}

/* Focus States */
.year-item:focus {
  outline: none;
}

.year-item:focus .dot {
  /*     box-shadow: 0 0 0 3px rgba(104, 0, 121, 0.3); */
}

/* For Rohit Small Laptop */
@media (max-width: 1366px) {
  .timeline-slider {
    height: calc(100vh - 80px);
  }
  .purple-box {
    max-width: 70%;
    margin-top: 60px;
  }
  .purple-box .title {
    font-size: 22px;
  }
  .purple-box .description {
    max-height: 130px;
  }
}

/* Mobile Styles */
@media (max-width: 768px) {
  .timeline-slider {
    height: calc(100vh - 70px);
  }

  .timeline-slider-name {
    top: 30px;
    left: 20px;
  }

  .content-wrapper {
    padding: 20px;
  }

  .purple-box {
    padding: 25px;
    max-width: 100%;
    margin-top: 90px;
  }

  .purple-box::after {
    display: none;
  }

  .purple-box .year {
    font-size: 28px;
  }

  .purple-box .title {
    font-size: 20px;
  }

  .purple-box .description {
    font-size: 12px;
    line-height: 20px;
    max-height: unset;
    opacity: 1;
  }

  .timeline-bottom {
    padding: 0 20px;
    overflow-x: auto;
    display: none;
  }

  .timeline-years {
    justify-content: flex-start;
    min-width: max-content;
    padding: 0 20px;
  }

  .year-item {
    margin: 0 15px;
  }

  .nav-button {
    width: 36px;
    height: 36px;
  }
}

/* Small Mobile Styles */
@media (max-width: 480px) {
  .timeline-slider {
    height: calc(100vh - 80px);
  }

  .timeline-slider
    .timeline-slides
    .timeline-slide
    .slide-container
    .content-wrapper {
    padding: 15px 0;
  }

  .timeline-slider .slider-controls .nav-button.prev {
    left: 6px;
  }

  .timeline-slider .slider-controls .nav-button.next {
    right: 6px;
  }

  .purple-box {
    padding: 20px;
    margin-top: 70px;
  }

  .timeline-slider-name {
    top: 20px;
    left: 20px;
    font-size: 30px;
  }

  .purple-box .title {
    font-size: 18px;
    line-height: 24px;
  }

  .purple-box .year {
    font-size: 18px;
  }

  .purple-box .description {
    font-size: 12px;
    line-height: 18px;
    max-height: unset;
    opacity: 1;
  }

  .timeline-line {
    top: 12px;
  }
}

/* Old Small Mobile Styles */
@media (max-width: 380px) {
  .timeline-slider {
    height: calc(100vh - 70px);
  }

  .content-wrapper {
    padding: 15px;
  }

  .purple-box {
    padding: 20px;
    margin-top: 60px;
  }

  .timeline-slider-name {
    top: 20px;
    left: 70px;
    font-size: 30px;
  }

  .purple-box .title {
    font-size: 18px;
    line-height: 24px;
  }

  .purple-box .year {
    font-size: 14px;
    line-height: 20px;
  }

  .purple-box .description {
    font-size: 12px;
    line-height: 20px;
    max-height: 250px;
    opacity: 1;
  }

  .timeline-line {
    top: 12px;
  }
}

/* Print Styles */
@media print {
  .timeline-slider {
    height: auto;
  }

  .timeline-slide {
    position: relative;
    opacity: 1;
    visibility: visible;
    page-break-inside: avoid;
  }

  .nav-button,
  .timeline-bottom,
  .keyboard-instructions,
  .slider-loader {
    display: none;
  }

  .purple-box::after {
    display: none;
  }
}

/* Ensure the image container is positioned correctly */
.timeline-slide .slide-container {
  position: relative; /* Relative positioning to allow absolute child elements */
}
