/* Timeline Styles */
:root {
  --timeline-primary: #ee3238;
  --timeline-secondary: #565656;
  --timeline-bg: #fff;
  --timeline-text: #333;
  --timeline-date: #ee3238;
  --timeline-dot: #ee3238;
  --timeline-line: #ddd;
  --timeline-card-bg: #fff;
  --timeline-card-shadow: rgba(0, 0, 0, 0.1);
  --timeline-gradient: #fff 0%, rgba(255, 255, 255, 0) 100%;
}

/* Horizontal Timeline Styles */
.slider-section-about {
  padding: 60px 0;
  background-color: #f9f9f9;
  margin-bottom: 40px;
}

.section-title {
  font-size: 32px;
  font-weight: 600;
  color: var(--timeline-text);
  margin-bottom: 15px;
}

.section-subtitle {
  font-size: 18px;
  color: var(--timeline-secondary);
  margin-bottom: 30px;
}

/* TIMELINE
–––––––––––––––––––––––––––––––––––––––––––––––––– */
.timeline {
  position: relative;
  white-space: nowrap;
  max-width: 1400px;
  padding: 0 10px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 320px auto;
  grid-gap: 20px;
}

.timeline::before,
.timeline::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 30px;
  width: 100px;
  z-index: 2;
}

.timeline::after {
  right: 0;
  background: linear-gradient(270deg, var(--timeline-gradient));
}

.timeline::before {
  left: 340px;
  background: linear-gradient(90deg, var(--timeline-gradient));
}

.timeline .info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 30px 40px;
  color: #fff;
  background: var(--timeline-primary);
  white-space: normal;
  border-radius: 10px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.timeline .info:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.timeline .info img {
  margin-bottom: 20px;
  border-radius: 50%;
  background-color: #fff;
  padding: 5px;
}

.timeline .info h2 {
  font-size: 24px;
  margin-bottom: 10px;
  font-weight: 600;
}

.timeline .info p {
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 16px;
  line-height: 1.5;
}

.timeline .info a {
  text-decoration: none;
  color: #fff;
  font-weight: 600;
  margin-top: 10px;
  display: inline-block;
  transition: all 0.3s ease;
}

.timeline .info a:hover {
  text-decoration: underline;
}

.timeline ol::-webkit-scrollbar {
  height: 12px;
}

.timeline ol::-webkit-scrollbar-thumb,
.timeline ol::-webkit-scrollbar-track {
  border-radius: 92px;
}

.timeline ol::-webkit-scrollbar-thumb {
  background: var(--timeline-primary);
}

.timeline ol::-webkit-scrollbar-track {
  background: #f1f1f1;
}

.timeline ol {
  font-size: 0;
  padding: 250px 0;
  transition: all 1s;
  overflow-x: scroll;
  scroll-snap-type: x mandatory;
  scrollbar-color: #f1f1f1 var(--timeline-primary);
}

.timeline ol li {
  position: relative;
  display: inline-block;
  list-style-type: none;
  width: 160px;
  height: 5px;
  background: var(--timeline-line);
  scroll-snap-align: start;
}

.timeline ol li:last-child {
  width: 280px;
}

.timeline ol li:not(:first-child) {
  margin-left: 14px;
}

.timeline ol li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 50%;
  left: calc(100% + 1px);
  bottom: 0;
  width: 16px;
  height: 16px;
  transform: translateY(-50%);
  border-radius: 50%;
  background: var(--timeline-dot);
  z-index: 1;
  transition: all 0.3s ease;
  box-shadow: 0 0 0 4px rgba(238, 50, 56, 0.2);
}

.timeline ol li:not(:last-child):hover::after {
  transform: translateY(-50%) scale(1.2);
  background: var(--timeline-primary);
  box-shadow: 0 0 0 6px rgba(238, 50, 56, 0.3);
}

.timeline ol li div {
  position: absolute;
  left: 0;
  width: 280px;
  padding: 15px;
  font-size: 1rem;
  white-space: normal;
  color: var(--timeline-text);
  background: var(--timeline-card-bg);
  border-radius: 8px;
  box-shadow: 0 10px 20px var(--timeline-card-shadow);
  transition: all 0.3s ease;
}

.timeline ol li div:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.timeline ol li div::before {
  content: "";
  position: absolute;
  top: 100%;
  left: 15px;
  width: 0;
  height: 0;
  border-style: solid;
}

.timeline ol li:nth-child(odd) div {
  top: -16px;
  transform: translateY(-100%);
}

.timeline ol li:nth-child(odd) div::before {
  top: 100%;
  border-width: 8px 8px 0 0;
  border-color: var(--timeline-card-bg) transparent transparent transparent;
}

.timeline ol li:nth-child(even) div {
  top: calc(100% + 16px);
}

.timeline ol li:nth-child(even) div::before {
  top: -8px;
  border-width: 8px 0 0 8px;
  border-color: transparent transparent transparent var(--timeline-card-bg);
}

.timeline time {
  display: block;
  font-size: 1.4rem;
  font-weight: bold;
  margin-bottom: 8px;
  color: var(--timeline-date);
}

/* Vertical Timeline Styles */
#timeline {
  position: relative;
  padding: 40px 0;
}

#timeline ul.line {
  min-height: 1000px;
  border-top: 0;
  border-left: 4px solid var(--timeline-line);
  list-style: none;
  position: relative;
  top: 5%;
  left: 50%;
  perspective: 2000px;
  margin: 0;
  padding: 0;
}

#timeline ul li {
  position: relative;
  margin-bottom: 20px;
}

#timeline ul li:after {
  content: "\2713";
  font-family: fontawesome;
  display: block;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-weight: 100;
  font-size: 90%;
  line-height: 40px;
  text-align: center;
  background-color: var(--timeline-primary);
  color: #fff;
  position: absolute;
  left: -22px;
  top: 50%;
  transform: translateY(-50%);
  transition: all 0.5s ease;
  box-shadow: 0 0 0 4px rgba(238, 50, 56, 0.2);
  z-index: 2;
}

#timeline ul li:hover:after {
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 0 0 6px rgba(238, 50, 56, 0.3);
}

#timeline ul li .cont {
  width: 500px;
  padding: 20px;
  background-color: var(--timeline-card-bg);
  border-radius: 8px;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
  transition: all 0.5s ease;
}

#timeline ul li .cont:hover {
  transform: translateY(-50%) translateX(5px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

#timeline ul li:nth-child(odd) .cont {
  left: 30px;
}

#timeline ul li:nth-child(odd) .cont:before {
  content: "";
  position: absolute;
  top: 50%;
  left: -10px;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 10px 10px 10px 0;
  border-color: transparent var(--timeline-card-bg) transparent transparent;
  transform: translateY(-50%);
}

#timeline ul li:nth-child(even) .cont {
  left: -530px;
}

#timeline ul li:nth-child(even) .cont:before {
  content: "";
  position: absolute;
  top: 50%;
  right: -10px;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 10px 0 10px 10px;
  border-color: transparent transparent transparent var(--timeline-card-bg);
  transform: translateY(-50%);
}

#timeline ul li .cont h3 {
  color: var(--timeline-primary);
  font-size: 22px;
  margin-bottom: 10px;
  font-weight: 600;
}

#timeline ul li .cont p {
  color: var(--timeline-secondary);
  font-size: 16px;
  line-height: 1.5;
  margin: 0;
}

/* Animation for timeline items */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translate3d(0, 30px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

.fadeInUp {
  animation: fadeInUp 0.6s ease forwards;
}

/* Responsive styles */
@media screen and (max-width: 1200px) {
  #timeline ul li .cont {
    width: 400px;
  }
  
  #timeline ul li:nth-child(even) .cont {
    left: -430px;
  }
}

@media screen and (max-width: 991px) {
  .timeline {
    display: block;
  }

  .timeline::before,
  .timeline::after {
    width: 50px;
  }

  .timeline::before {
    left: 0;
  }

  .timeline .info {
    margin-bottom: 30px;
  }
  
  #timeline ul.line {
    left: 30px;
  }
  
  #timeline ul li .cont {
    width: calc(100% - 80px);
    max-width: 500px;
  }
  
  #timeline ul li:nth-child(even) .cont {
    left: 30px;
  }
  
  #timeline ul li:nth-child(even) .cont:before {
    left: -10px;
    right: auto;
    border-width: 10px 10px 10px 0;
    border-color: transparent var(--timeline-card-bg) transparent transparent;
  }
}

@media screen and (max-width: 576px) {
  .timeline ol {
    padding: 150px 0;
  }
  
  .timeline ol li div {
    width: 200px;
  }
  
  .timeline time {
    font-size: 1.2rem;
  }
  
  #timeline ul li:after {
    width: 30px;
    height: 30px;
    line-height: 30px;
    left: -17px;
  }
  
  #timeline ul li .cont {
    padding: 15px;
  }
  
  #timeline ul li .cont h3 {
    font-size: 18px;
  }
  
  #timeline ul li .cont p {
    font-size: 14px;
  }
}
