/* File: custom-elements/cgm-journey-map/cgm-journey-map.css */

.cgm-journey-section {
  padding: 100px 0;
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  background-color: var(--cgm-map-bg, #ffffff);
  position: relative;
  overflow: hidden;
}

/* Header */
.cgm-journey-header {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 80px;
  padding: 0 20px;
}
.cgm-journey-eyebrow {
  font-weight: 600;
  letter-spacing: 1px;
  margin-bottom: 15px;
  color: #ffad4d;
}
.cgm-journey-headline {
  margin-bottom: 20px;
  font-weight: 700;
  line-height: 1.2;
}
.cgm-journey-intro {
  font-size: 1.1rem;
  line-height: 1.6;
  color: #555;
}

/* Map Container */
.cgm-map-container {
  position: relative;
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 20px;
}

/* --- THE LINE --- */
.cgm-map-line-track {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 4px;
  background-color: var(--cgm-line-off, #eee);
  transform: translateX(-50%);
  border-radius: 4px;
  z-index: 0;
}

.cgm-map-line-fill {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 0%; /* JS will animate this */
  background: linear-gradient(
    to bottom,
    var(--cgm-line-on-1),
    var(--cgm-line-on-2)
  );
  border-radius: 4px;
  transition: height 0.1s linear;
}

/* --- STEPS --- */
.cgm-map-step {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 100px;
  opacity: 0.3; /* Inactive state */
  transform: translateY(20px);
  transition: all 0.6s ease;
}

.cgm-map-step:last-child {
  margin-bottom: 0;
}

/* Active State (Added by JS) */
.cgm-map-step.active {
  opacity: 1;
  transform: translateY(0);
}

/* The Central Marker */
.cgm-step-marker {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 40px;
  background-color: var(--cgm-map-bg);
  border: 2px solid var(--cgm-line-off);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: all 0.4s ease;
}

.cgm-map-step.active .cgm-step-marker {
  border-color: var(--cgm-line-on-2);
  box-shadow: 0 0 20px rgba(255, 173, 77, 0.4);
  transform: translateX(-50%) scale(1.2);
}

.cgm-marker-inner {
  font-size: 12px;
  font-weight: 700;
  color: #aaa;
}
.cgm-map-step.active .cgm-marker-inner {
  color: var(--cgm-line-on-2);
}

/* Content Card */
.cgm-step-card {
  width: 42%;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(0, 0, 0, 0.05);
  padding: 30px;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  position: relative;
  z-index: 1;
}

.cgm-step-icon {
  width: 50px;
  height: auto;
  margin-bottom: 15px;
  display: block;
}

.cgm-step-title {
  margin: 0 0 10px 0;
  font-weight: 700;
  line-height: 1.2;
  color: #6271a3; /* Updated Default Color */
}

.cgm-step-desc {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #666;
}

/* --- ALTERNATING LAYOUT --- */
/* Odd Steps: Card on Left */
.cgm-map-step:nth-child(odd) .cgm-step-card {
  margin-right: auto; /* Pushes to left */
  margin-left: 0;
  text-align: right;
}
.cgm-map-step:nth-child(odd) .cgm-step-icon {
  margin-left: auto; /* Align icon right */
}

/* Even Steps: Card on Right */
.cgm-map-step:nth-child(even) .cgm-step-card {
  margin-left: auto; /* Pushes to right */
  margin-right: 0;
  text-align: left;
}

/* --- MOBILE --- */
@media (max-width: 768px) {
  .cgm-map-line-track {
    left: 20px; /* Move line to left edge */
  }

  .cgm-step-marker {
    left: 20px;
  }

  .cgm-step-card {
    width: 100%;
    margin-left: 60px !important; /* Push past the line */
    margin-right: 0 !important;
    text-align: left !important;
  }

  .cgm-map-step:nth-child(odd) .cgm-step-icon {
    margin-left: 0;
  }
}
