@import url('https://fonts.googleapis.com/css2?family=Kaushan+Script&display=swap');

#milestones{
  position: relative;
  padding: 60px 0;
}

#milestones .section-text-p1 {
  color: rgb(85, 85, 85);
}

#milestones .title {
  color: #000000;
}

.container-timeline {
  max-width: 1024px;
  width: 95%;
  height: 70vh;
  margin: 0 auto;
  margin-top: 50px;
  padding-left: 20px;
  overflow-y: scroll;
  overflow-x: visible;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -webkit-mask: linear-gradient(0deg,#0000,#000 3% 97%,#0000);
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.1) 0%, transparent 70%);
  border-radius: 15px;
  backdrop-filter: blur(10px);
}

.timeline-item {
  padding: 3em 2em 2em;
  margin-left: 20px;
  position: relative;
  display: flex;
  flex-direction: row;
  color: rgba(0, 0, 0, 0.9);
  border-left: 3px solid rgba(0, 0, 0, 0.6);
  gap:1rem;
  transition: all 0.3s ease;
  overflow: visible;
}

.timeline-item:hover {
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.1) 0%, transparent 50%);
  padding-left: 2.5em;
}

.milestone-details{
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.milestone-details h1{
  font-size: 1.2rem;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.95);
}

.milestone-details p {
  color: rgba(0, 0, 0, 0.8);
  line-height: 1.6;
  text-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
}
  
.timeline-upper{
  display: flex;
  align-items:center;
  gap: 1rem;
}

.first-mile{
  max-width:200px;
  height: auto;
  transform: rotate(-5deg);
  border-radius: 10px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.4), inset 0 0 10px rgba(255, 255, 255, 0.3);
  transition: all 0.3s ease;
}

.first-mile:hover {
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.6), inset 0 0 15px rgba(255, 255, 255, 0.2);
  transform: rotate(-5deg) scale(1.05);
}

.second-mile{
  margin-top: 50px;
  height: auto;
  transform: rotate(5deg);
  border-radius: 10px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.4), inset 0 0 10px rgba(255, 255, 255, 0.3);
  transition: all 0.3s ease;
}

.second-mile:hover {
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.6), inset 0 0 15px rgba(255, 255, 255, 0.2);
  transform: rotate(5deg) scale(1.05);
}

.third-mile{
  height: auto;
  transform: rotate(-7deg);
  border-radius: 10px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.4), inset 0 0 10px rgba(255, 255, 255, 0.3);
  transition: all 0.3s ease;
}

.third-mile:hover {
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.6), inset 0 0 15px rgba(255, 255, 255, 0.2);
  transform: rotate(-7deg) scale(1.05);
}

.fourth-mile{
  margin-top: 50px;
  height: auto;
  transform: rotate(5deg);
  border-radius: 10px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.4), inset 0 0 10px rgba(255, 255, 255, 0.3);
  transition: all 0.3s ease;
}

.fourth-mile:hover {
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.6), inset 0 0 15px rgba(255, 255, 255, 0.2);
  transform: rotate(5deg) scale(1.05);
}

.fifth-mile{
  height: auto;
  transform: rotate(3deg);
  border-radius: 10px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.4), inset 0 0 10px rgba(255, 255, 255, 0.3);
  transition: all 0.3s ease;
}

.fifth-mile:hover {
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.6), inset 0 0 15px rgba(255, 255, 255, 0.2);
  transform: rotate(3deg) scale(1.05);
}

.sixth-mile{
  margin-top: 40px;
  height: auto;
  transform: rotate(0deg);
  transition: all 0.3s ease;
}

.sixth-mile:hover {
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.6), inset 0 0 15px rgba(255, 255, 255, 0.2);
  transform: scale(1.05);
}

.seventh-mile{
  margin-top: 40px;
  max-width:200px;
  height: auto;
  transform: rotate(5deg);
  border-radius: 10px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.4), inset 0 0 10px rgba(255, 255, 255, 0.3);
  transition: all 0.3s ease;
}

.seventh-mile:hover {
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.6), inset 0 0 15px rgba(255, 255, 255, 0.2);
  transform: scale(1.05);
}

.timeline-item p {
  font-size: 0.85rem;
}

.timeline-item::before {
  content: attr(date-is);
  position: absolute;
  font-weight: bold;
  top: 1em;
  left: 2em;
  display: block;
  font-family: "Kaushan Script", cursive;
  font-weight: 700;
  color: #000;
  text-shadow: none;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  padding: 8px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15),
              inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 2;
}

.timeline-item:hover::before {
  left: 2.5em;
  background: rgba(255, 255, 255, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.45);
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2),
              inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.timeline-item::after {
  width: 18px;
  height: 18px;
  display: block;
  top: 1em;
  position: absolute;
  left: -10.5px;
  border-radius: 50%;
  content: "";
  background: radial-gradient(circle, #000000 0%, #1a1a1a 50%, #2d2d2d 100%);
  border: 3px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.9), 
              0 0 40px rgba(0, 0, 0, 0.5),
              inset 0 0 8px rgba(0, 0, 0, 0.8);
  animation: pulse 2s infinite;
  z-index: 100;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.9), 
                0 0 40px rgba(0, 0, 0, 0.5),
                inset 0 0 8px rgba(0, 0, 0, 0.8);
  }
  50% {
    box-shadow: 0 0 30px rgba(0, 0, 0, 1), 
                0 0 60px rgba(0, 0, 0, 0.7),
                inset 0 0 12px rgba(0, 0, 0, 0.9);
  }
  100% {
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.9), 
                0 0 40px rgba(0, 0, 0, 0.5),
                inset 0 0 8px rgba(0, 0, 0, 0.8);
  }
}

.timeline-item:last-child {
  -o-border-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.6) 60%, rgba(0, 0, 0, 0)) 1 100%;
     border-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.6) 60%, rgba(0, 0, 0, 0)) 1 100%;
}

/* Add scrollbar styling for webkit browsers */
.container-timeline::-webkit-scrollbar {
  width: 8px;
}

.container-timeline::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
  border-radius: 10px;
}

.container-timeline::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.3));
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

.container-timeline::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.5));
}