/**
 * Laureate Success Roadmap Section Styles
 *
 * @package Laureate
 * @version 1.0.0
 */

:root {
  --rm-blue: #0a2248;       
  --rm-green: #1d960c;      
  --rm-bg: #ffffff;         
  --rm-card-bg: #f8fafc;
  --rm-text: #475569;
  --rm-border: #e2e8f0;
}

.evo-roadmap-section,
.evo-roadmap-section * {
  box-sizing: border-box;
}

.evo-roadmap-section {
  padding: 30px 24px;
  background: var(--rm-bg);
  overflow: hidden;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.evo-roadmap-wrap {
  max-width: 1200px;
  margin: auto;
}

/* --- Premium Header --- */
.evo-roadmap-head {
  max-width: 700px;
  margin: 0 auto 60px;
  text-align: center;
}

.evo-rm-badge {
  display: inline-flex;
  align-items: center;
  background: rgba(29, 150, 12, 0.08);
  color: var(--rm-green);
  padding: 8px 20px;
  border-radius: 30px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  border: 1px solid rgba(29, 150, 12, 0.15);
  margin-bottom: 20px;
}

.evo-roadmap-head h2 {
  color: var(--rm-blue);
  font-size: 40px;
  line-height: 1.2;
  margin: 0 0 16px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.evo-roadmap-head p {
  color: var(--rm-text);
  font-size: 17px;
  line-height: 1.7;
  margin: 0;
}

/* --- Desktop Horizontal Timeline --- */
.evo-roadmap {
  position: relative;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 20px;
}

/* The Main Connecting Line */
.evo-roadmap::before {
  content: "";
  position: absolute;
  top: 24px; /* Centers exactly with the 48px numbers */
  left: 40px;
  right: 40px;
  height: 3px;
  background: linear-gradient(90deg, var(--rm-green), rgba(10, 34, 72, 0.1) 80%);
  z-index: 0;
  border-radius: 3px;
}

.evo-road-step {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* The Number Node */
.evo-road-step b {
  width: 48px;
  height: 48px;
  margin: 0 auto 24px;
  border-radius: 50%;
  background: #ffffff;
  border: 3px solid var(--rm-border);
  color: var(--rm-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 800;
  box-shadow: 0 0 0 6px #ffffff; /* Cutout effect over the line */
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  z-index: 2;
}

/* The Content Card */
.evo-step-card {
  background: var(--rm-card-bg);
  border: 1px solid var(--rm-border);
  border-radius: 16px;
  padding: 24px 16px;
  text-align: center;
  width: 100%;
  box-sizing: border-box;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

/* Vertical connector line from node to card */
.evo-step-card::before {
  content: '';
  position: absolute;
  top: -24px;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 24px;
  background: var(--rm-border);
  transition: all 0.4s ease;
  z-index: -1;
}

.evo-step-card h3 {
  color: var(--rm-blue);
  font-size: 16px;
  line-height: 1.3;
  margin: 0 0 8px;
  font-weight: 700;
  transition: color 0.3s;
}

.evo-step-card p {
  color: var(--rm-text);
  font-size: 13.5px;
  line-height: 1.5;
  margin: 0;
  transition: color 0.3s;
}

/* --- Hover Interactions --- */
.evo-road-step:hover b {
  background: var(--rm-green);
  border-color: var(--rm-green);
  color: #ffffff;
  transform: scale(1.15);
  box-shadow: 0 0 0 6px #ffffff, 0 8px 16px rgba(29, 150, 12, 0.3);
}

.evo-road-step:hover .evo-step-card::before {
  background: var(--rm-green);
}

.evo-road-step:hover .evo-step-card {
  background: var(--rm-blue);
  border-color: var(--rm-blue);
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(10, 34, 72, 0.15);
}

.evo-road-step:hover .evo-step-card h3,
.evo-road-step:hover .evo-step-card p {
  color: #ffffff;
}

/* --- Animations --- */
.evo-road-step {
  opacity: 0;
  animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.evo-road-step:nth-child(1) { animation-delay: 0.1s; }
.evo-road-step:nth-child(2) { animation-delay: 0.2s; }
.evo-road-step:nth-child(3) { animation-delay: 0.3s; }
.evo-road-step:nth-child(4) { animation-delay: 0.4s; }
.evo-road-step:nth-child(5) { animation-delay: 0.5s; }
.evo-road-step:nth-child(6) { animation-delay: 0.6s; }

@keyframes fadeUp {
  0% { opacity: 0; transform: translateY(30px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* --- Responsive: Smart Vertical Timeline for Tablets & Mobile --- */
@media(max-width: 991px) {
  .evo-roadmap-section {
    padding: 70px 20px;
  }
  .evo-roadmap-head h2 {
    font-size: 32px;
  }
  
  .evo-roadmap {
    grid-template-columns: 1fr;
    gap: 0;
    padding-left: 20px;
  }

  /* Vertical connecting line */
  .evo-roadmap::before {
    top: 0;
    bottom: 0;
    left: 43px; /* Centers line with the nodes */
    width: 3px;
    height: auto;
    background: linear-gradient(180deg, var(--rm-green), rgba(10, 34, 72, 0.1) 90%);
  }

  .evo-road-step {
    flex-direction: row;
    align-items: center;
    padding-bottom: 30px;
  }

  /* Remove margin from last item to prevent extra space */
  .evo-road-step:last-child {
    padding-bottom: 0;
  }

  .evo-road-step b {
    margin: 0 30px 0 0;
    box-shadow: 0 0 0 6px var(--rm-bg); /* Cutout effect for vertical line */
    flex-shrink: 0;
  }

  .evo-step-card {
    text-align: left;
    padding: 24px;
  }

  /* Remove vertical connector on mobile */
  .evo-step-card::before {
    display: none;
  }
}

@media(max-width: 480px) {
  .evo-roadmap-section {
    padding: 60px 16px;
  }
  .evo-roadmap {
    padding-left: 10px;
  }
  .evo-roadmap::before {
    left: 33px;
  }
  .evo-road-step b {
    margin: 0 20px 0 0;
  }
}
