/* ================================================
   HOW IT WORKS PAGE STYLES
   ================================================ */

/* --- General Page Styles --- */
.nav-links a.active-page[data-lang-key="navHowItWorks"] {
  color: var(--color-red);
}

/* --- Page Hero --- */
.page-hero-alt {
  padding: 4rem 0;
  text-align: center;
  background-color: var(--color-grey-dark);
}
body.light-mode .page-hero-alt {
  background-color: var(--color-grey-light);
}
.page-hero-alt h1 {
  font-size: 2.75rem;
}
body.light-mode .page-hero-alt h1 {
  color: var(--color-black);
}

/* --- Timeline Section --- */
.timeline-section {
  padding: 5rem 0;
  overflow: hidden; /* For animations */
}

.timeline-container {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
}

/* The vertical line (Track) */
.timeline-line {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 100%;
  background-color: var(--color-grey-dark);
}
body.light-mode .timeline-line {
  background-color: var(--color-grey-light);
}

/* The red progress line that animates */
.timeline-line-progress {
  width: 100%;
  height: 0%; /* Starts at 0, animated by JS */
  background-color: var(--color-red);
  transition: height 0.2s linear;
}

.timeline-item {
  position: relative;
  width: 50%;
  margin-bottom: 3rem;
  padding: 0 3rem;
}

/* The dot on the timeline */
.timeline-dot {
  position: absolute;
  top: 50%; /* <-- UPDATED from 10px */
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background-color: var(--color-red);
  border: 3px solid var(--color-black);
  z-index: 2;
  /* NOTE: We will add the vertical transform in the rules below */
}
body.light-mode .timeline-dot {
  border-color: var(--color-white);
}

/* Odd items (1, 3, 5) on the LEFT */
.timeline-item:nth-child(odd) {
  float: left;
  clear: both;
  text-align: right;
  padding-right: 3rem;
}
.timeline-item:nth-child(odd) .timeline-dot {
  right: -8px; /* (16px / 2) */
  /* UPDATED: Added translateY(-50%) to center the dot */
  transform: translateX(50%) translateY(-50%);
}

/* Even items (2, 4, 6) on the RIGHT */
.timeline-item:nth-child(even) {
  float: right;
  clear: both;
  text-align: left;
  padding-left: 3rem;
}
.timeline-item:nth-child(even) .timeline-dot {
  left: -8px; /* (16px / 2) */
  /* UPDATED: Added translateY(-50%) to center the dot */
  transform: translateX(-50%) translateY(-50%);
}

/* Clearfix for the container */
.timeline-container::after {
  content: "";
  display: table;
  clear: both;
}

.timeline-content {
  background: var(--color-grey-dark);
  padding: 2rem;
  border-radius: 8px;
  /* UPDATED: Changed border color */
  border: 1px solid var(--color-red);

  /* ADDED: Glow effect using box-shadow */
  box-shadow: 0 0 12px -2px var(--color-red);

  /* Animation: Start hidden */
  opacity: 0;
  transform: translateY(20px);
  /* UPDATED: Added transitions for the new properties */
  transition: opacity 0.5s ease, transform 0.5s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
body.light-mode .timeline-content {
  background: var(--color-white);
  /* UPDATED: Changed border color */
  border: 1px solid var(--color-red);

  /* UPDATED: Replaced original shadow with the red glow */
  box-shadow: 0 0 12px -2px var(--color-red);
}

/* Animation: When "in-view" class is added by JS */
.timeline-content.in-view {
  opacity: 1;
  transform: translateY(0);
}

.timeline-number {
  display: block;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-red);
  margin-bottom: 0.5rem;
}

.timeline-content h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}
body.light-mode .timeline-content h3 {
  color: var(--color-black);
}

.timeline-content p {
  font-size: 0.95rem;
  color: var(--color-grey-medium);
  line-height: 1.6;
}

/* ================================================
   TIMELINE RESPONSIVE
   ================================================ */

@media (max-width: 992px) {
  /* Stack timeline on tablet/mobile */
  .timeline-line {
    left: 20px;
  }

  .timeline-item {
    width: 100%;
    float: none;
    clear: both;
    text-align: left;
    padding-left: 4rem; /* Space for line */
    padding-right: 1rem;
  }

  .timeline-item:nth-child(odd) {
    float: none;
    text-align: left;
    padding-left: 4rem;
    padding-right: 1rem;
  }
  .timeline-item:nth-child(odd) .timeline-dot {
    left: 20px;
    right: auto;
    transform: translateX(-50%);
  }

  .timeline-item:nth-child(even) {
    float: none;
    padding-left: 4rem;
  }
  .timeline-item:nth-child(even) .timeline-dot {
    left: 20px;
    transform: translateX(-50%);
  }
}
/* ADDED: Hover effect for a more intense glow */
.timeline-content:hover {
  box-shadow: 0 0 20px 0px var(--color-red);
}
/* ADDED: Hover effect for light mode */
body.light-mode .timeline-content:hover {
  box-shadow: 0 0 20px 0px var(--color-red);
}
