/* ============================================================
   LCE – Lopes e Caldas Engenharia
   Interactive Scroll Timeline Overrides – timeline.css
   ============================================================ */

/* Hero styling custom to the prototype */
.timeline-hero {
  padding: 140px 0 60px 0;
  background: radial-gradient(circle at 50% 30%, #ffffff 0%, var(--light) 100%);
  text-align: center;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}

.timeline-hero-title {
  font-family: 'Outfit', sans-serif;
  font-size: 42px;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 15px;
  letter-spacing: -0.5px;
}

.timeline-hero-subtitle {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  color: var(--gray-light);
  max-width: 650px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ===== DYNAMIC TIMELINE OVERRIDES ===== */

/* 1. Disable the static background line from style.css */
.timeline::before {
  content: none !important;
  display: none !important;
}

/* 2. Position the new dynamic track exactly in the middle */
.timeline .timeline-track {
  position: absolute;
  top: 0;
  bottom: auto;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  background: rgba(0, 0, 0, 0.06);
  z-index: 1;
}

/* 3. Style the glowing drawing progress line */
.timeline .timeline-progress-bar {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 0%; /* Adjusted by JS */
  background: linear-gradient(180deg, 
    rgba(237, 110, 4, 0.2) 0%, 
    var(--primary) 15%, 
    var(--primary) 100%);
  box-shadow: 0 0 10px var(--primary), 0 0 20px rgba(237, 110, 4, 0.4);
  border-radius: 2px;
  transition: height 0.08s ease-out; /* Keeps animation fluid and responsive */
}

/* 4. Add a hot white glow spark at the drawing tip of the line */
.timeline .timeline-progress-bar::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translate(-50%, 50%);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 12px 4px var(--primary), 0 0 20px 8px rgba(237, 110, 4, 0.6);
  z-index: 2;
}

/* 5. Override default marker bullet points to look inactive initially */
.timeline .timeline-marker::before {
  background: #e2e8f0 !important;
  border-color: #ffffff !important;
  box-shadow: 0 0 0 2px #cbd5e1 !important;
  transform: scale(0.85);
  transition: background-color 0.6s ease, border-color 0.6s ease, box-shadow 0.6s ease, transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

/* 6. Overrides for the highlight final node */
.timeline .timeline-item-highlight .timeline-marker::before {
  box-shadow: 0 0 0 2px #cbd5e1 !important;
}

/* 7. Override year labels to look inactive/gray initially */
.timeline .timeline-year {
  color: #94a3b8 !important;
  border-color: rgba(148, 163, 184, 0.25) !important;
  background: var(--white) !important;
  transition: all 0.5s ease !important;
}

/* 8. Override content cards to start hidden and offset */
.timeline .timeline-item .timeline-content {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.8s cubic-bezier(0.25, 1, 0.5, 1), 
              transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Right-aligned items slide in from the right */
.timeline .timeline-item-right .timeline-content {
  transform: translateX(40px);
}

/* Centered highlight items slide in from the bottom */
.timeline .timeline-item-highlight .timeline-content {
  transform: translateY(40px);
}

/* ===== ACTIVE STATES (When JS adds .active) ===== */

/* Marker becomes active & grows with a beautiful pulse glow */
.timeline .timeline-item.active .timeline-marker::before {
  background: var(--primary) !important;
  border-color: #ffffff !important;
  box-shadow: 0 0 0 2px var(--primary), 0 0 16px rgba(237, 110, 4, 0.6) !important;
  transform: scale(1.2);
}

/* Highlight marker gets extra glow and size when active */
.timeline .timeline-item-highlight.active .timeline-marker::before {
  box-shadow: 0 0 0 3px var(--primary), 0 0 24px rgba(237, 110, 4, 0.8) !important;
  transform: scale(1.25);
}

/* Year label turns primary orange and grows slightly */
.timeline .timeline-item.active .timeline-year {
  color: var(--primary) !important;
  border-color: rgba(237, 110, 4, 0.4) !important;
  transform: scale(1.05);
}

/* Card content fades in and snaps to place */
.timeline .timeline-item.active .timeline-content {
  opacity: 1;
  transform: translate(0) !important;
}

/* ===== RESPONSIVE MEDIA QUERIES ===== */

@media (max-width: 1024px) {
  /* Shift steel track line to match left: 28px from style.css */
  .timeline .timeline-track {
    left: 28px;
    transform: none;
  }
  
  /* On tablet, all standard items have their content on the right, so they should slide in from the right */
  .timeline .timeline-item .timeline-content,
  .timeline .timeline-item-right .timeline-content {
    transform: translateX(30px);
  }
}

@media (max-width: 640px) {
  /* Shift steel track line to match left: 20px from style.css */
  .timeline .timeline-track {
    left: 20px;
    transform: none;
  }
}
