@import url('https://fonts.googleapis.com/css2?family=Funnel+Display:wght@300..800&family=Funnel+Sans:ital,wght@0,300..800;1,300..800&display=swap');

html, body {
  font-size: 100%;
  overflow-x: hidden;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ===== DESKTOP TIMELINE (UNCHANGED) ===== */
.container {
  width: 80%;
  margin: 0 auto;
  position: relative;
  padding: 50px 0;
}

.container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 100%;
  background: #EF4136;
  z-index: 0;
}

.timeline-row {
  display: grid;
  grid-template-columns: 1fr 40px 1fr;
  align-items: start;
  margin-bottom: 50px;
}

.timeline-col {
  padding: 0 10px;
}

.marker-col {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  position: relative;
  z-index: 1;
}

.marker {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #EF4136;
  margin-top: 35px;
  z-index: 2;
}

.timeline-content {
  background: none;
  color: #413f4c;
  max-width: 400px;
}

.timeline-content h3 {
  font-size: 24px;
  margin-bottom: 5px;
  position: sticky;
  top: 0;
  padding: 5px 0;
  z-index: 3;
}

.timeline-content p {
  font-size: 14px;
  color: #413f4c;
  line-height: 1.5;
}

.timeline-image {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  overflow: hidden;
  background: white;
  margin-top: 5px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.timeline-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.align-left {
  display: flex;
  justify-content: flex-start;
  text-align: left;
}

.align-right {
  display: flex;
  justify-content: flex-end;
  text-align: right;
}

/* ===== MOBILE TIMELINE (REWORKED FROM SCRATCH) ===== */
@media (max-width: 768px) {
  .container {
    width: 95%;
    padding: 20px 0 20px 40px; /* Increased left padding */
	  overflow: hidden; /* Prevent container scrolling */
  }

  .container::before {
    left: 28px; /* Align with new marker position */
    height: calc(100% - 40px);
  }

  .timeline-row {
    display: flex;
    flex-direction: column;
    margin-bottom: 30px; /* Increased space between sections */
    position: relative;
    padding-left: 20px;
  }

  .marker-col {
    display: none;
  }

  /* PERFECTLY ALIGNED MARKER */
  .timeline-row::before {
  display: none;
  }
	
.dynamic-marker {
  position: absolute;
  left: -1px;
  width: 18px;
  height: 18px;
  background: #fff;
  border: 2px solid #EF4136;
  border-radius: 50%;
  z-index: 2;
}

  .image-col {
    order: 1;
    margin-bottom: 20px;
	  padding-left: 20px; /* Space after image */
  }

  .content-col {
    order: 2;
    padding-bottom: 30px;
	  padding-left: 20px; /* Space after text */
  }

  .timeline-image {
    width: 100%;
    max-width: 300px;
    height: auto;
    aspect-ratio: 1/1;
    margin: 0;
  }

  .timeline-content {
    padding: 0;
    max-width: 100%;
  }

  .timeline-content h3 {
    font-size: 30px;
    margin: 0 0 5px 0; /* Space below heading */
    position: relative;
  }
	

  .align-left,
  .align-right {
    justify-content: flex-start;
    text-align: left;
  }
}