* {
  box-sizing: border-box;
}

html {
  font-size: 14px;
}

body {
  background: #f6f9fc;
  font-family: "Open Sans", sans-serif;
  color: #525f7f;
  margin: 0;
  padding: 0;
}

/* Headings */
h2 {
  margin: 5% 2%;
  text-align: center;
  font-size: 4rem;
  font-weight: 100;
  color: #9251ac;
}

h1 {
  margin: 2% 5%;
  text-align: center;
  font-size: 1.5rem;
  font-weight: 400;
  color: #555ac0;
}

/* Timeline */
.timeline {
  display: flex;
  flex-direction: column;
  margin: 20px auto;
  position: relative;
}

.timeline__event {
  margin: 20px 0;
  position: relative;
  display: flex;
  border-radius: 6px;
  align-self: center;
  width: 50vw;
  opacity: 0;
  transform: translateY(50px);
  transition: all 0.6s ease-out;
}

.timeline__event.in-view {
  opacity: 1;
  transform: translateY(0);
}

.timeline__event:nth-child(2n + 1) {
  flex-direction: row-reverse;
}

.timeline__event__content {
  padding: 20px;
  background: #fff;
  width: calc(40vw - 84px);
  border-radius: 0 6px 6px 0;
  box-shadow: 0 30px 60px -12px rgba(50, 50, 93, 0.25),
              0 18px 36px -18px rgba(0, 0, 0, 0.3),
              0 -12px 36px -8px rgba(0, 0, 0, 0.025);
}

.timeline__event:nth-child(2n + 1) .timeline__event__content {
  border-radius: 6px 0 0 6px;
}

.timeline__event__title {
  font-size: 1.2rem;
  line-height: 1.4;
  text-transform: uppercase;
  font-weight: 600;
  color: #9251ac;
  letter-spacing: 1.5px;
}

.timeline__event__description {
  flex-basis: 100%;
  margin-top: 10px;
  line-height: 1.6;
}

.timeline__event__date {
  color: #f6a4ec;
  font-size: 1.5rem;
  font-weight: 600;
  background: #9251ac;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  padding: 0 20px;
  border-radius: 6px 0 0 6px;
}

.timeline__event:nth-child(2n + 1) .timeline__event__date {
  border-radius: 0 6px 6px 0;
}

.timeline__event__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9251ac;
  background: #f6a4ec;
  border-radius: 100%;
  width: 40px;
  height: 40px;
  padding: 40px;
  margin: 0 20px;
  align-self: center;
  position: relative;
  font-weight: bold;
  font-size: 18px;
  box-shadow: 0 30px 60px -12px rgba(50, 50, 93, 0.25),
              0 18px 36px -18px rgba(0, 0, 0, 0.3),
              0 -12px 36px -8px rgba(0, 0, 0, 0.025);
}

/* Event type colors */
.timeline__event--type2 .timeline__event__date {
  background: #555ac0;
  color: #87bbfe;
}
.timeline__event--type2 .timeline__event__icon {
  background: #87bbfe;
  color: #555ac0;
}
.timeline__event--type2 .timeline__event__title {
  color: #555ac0;
}

.timeline__event--type3 .timeline__event__date {
  background: #24b47e;
  color: #aff1b6;
}
.timeline__event--type3 .timeline__event__icon {
  background: #aff1b6;
  color: #24b47e;
}
.timeline__event--type3 .timeline__event__title {
  color: #24b47e;
}

/* Carousel */
.carousel {
  overflow: hidden;
  background: #fff;
  padding: 15px 0;
  margin: 60px auto 20px;
  border-top: 2px dashed #ccc;
  border-bottom: 2px dashed #ccc;
}
.carousel-track {
  display: flex;
  animation: scroll-left 25s linear infinite;
  gap: 50px;
}
.carousel-item {
  white-space: nowrap;
  font-size: 1.2rem;
  font-weight: 600;
  color: #555ac0;
}
@keyframes scroll-left {
  0% {
    transform: translateX(100%);
  }
  100% {
    transform: translateX(-100%);
  }
}

/* CTA Buttons */
.cta-buttons {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin: 60px auto 40px;
  flex-wrap: wrap;
}

.cta-btn {
  background-color: #9251ac;
  color: white;
  padding: 12px 20px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
  transition: background 0.3s;
}

.cta-btn:hover {
  background-color: #743d90;
}

/* Top Home Button */
.btn-home {
  text-decoration: none;
  font-weight: 600;
  color: #555ac0;
  padding: 8px 16px;
  border: 2px solid #555ac0;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.btn-home:hover {
  background-color: #555ac0;
  color: white;
}

/* Responsive Fixes */
@media (max-width: 768px) {
  .timeline__event {
    flex-direction: column !important;
    width: 95% !important;
  }

  .timeline__event__icon {
    width: 60px;
    height: 60px;
    padding: 0;
    font-size: 0.9rem;
    margin: 10px auto;
  }

  .timeline__event__content {
    width: 100% !important;
    padding: 15px;
    text-align: left;
  }

  .timeline__event__date {
    font-size: 1.1rem;
    padding: 10px;
    text-align: center;
    border-radius: 6px;
  }

  .timeline__event__title {
    font-size: 1rem;
  }

  .timeline__event__description p {
    font-size: 0.95rem;
    line-height: 1.5;
  }
}
