/* =============================================
   TIMELINE / PROCESS SECTION
   ============================================= */

.timeline-section {
  position: relative;
  background:
    radial-gradient(circle, rgba(96, 165, 250, 0.12) 1px, transparent 1px),
    radial-gradient(ellipse 70% 45% at 50% -5%, rgba(79, 70, 229, 0.22) 0%, transparent 70%),
    radial-gradient(ellipse 60% 40% at 50% 105%, rgba(29, 78, 216, 0.18) 0%, transparent 70%),
    linear-gradient(160deg, #03060f 0%, #050c1a 55%, #030a16 100%);
  background-size: 28px 28px, 100% 100%, 100% 100%, 100% 100%;
  padding: 80px 0 100px;
  font-family: "Poppins", sans-serif;
  overflow: hidden;
}

.scroll-anchor {
  position: absolute;
  top: 0;
}

/* =============================================
   SECTION HEADING
   ============================================= */

.timeline-heading {
  text-align: center;
  padding: 0 20px 60px;
  will-change: opacity, transform;
}

.timeline-heading-eyebrow {
  font-size: 0.68rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: #60a5fa;
  font-weight: 600;
  margin: 0 0 14px;
}

.timeline-heading-title {
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 800;
  color: #fff;
  margin: 0;
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 40px rgba(96, 165, 250, 0.15);
}

/* ---- Vertical center line ---- */
.timeline-line {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 100%;
  background: rgba(96, 165, 250, 0.15);
  z-index: 0;
}

/* ---- Items container ---- */
.timeline-items {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  z-index: 1;
}

/* =============================================
   TIMELINE ITEM — steps 1-4
   ============================================= */

.timeline-item {
  position: relative;
  width: 100%;
  min-height: 260px;
  padding: 40px 0;
  will-change: opacity, transform;
}

/* Dot (hidden when icon is present) */
.timeline-dot {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #60a5fa;
  box-shadow: 0 0 10px rgba(96, 165, 250, 0.5);
  z-index: 2;
}

/* =============================================
   PROGRESS LINE
   ============================================= */

.timeline-progress-line-container {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: calc(50% + 22px);
  bottom: -40px;
  width: 2px;
  z-index: 1;
}

.timeline-progress-line-bg {
  position: absolute;
  inset: 0;
  background: rgba(96, 165, 250, 0.1);
  border-radius: 1px;
}

.timeline-progress-line {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 0;
  border-radius: 1px;
  background: linear-gradient(to bottom, #60a5fa, #1d4ed8);
  box-shadow: 0 0 6px rgba(96, 165, 250, 0.5);
  transition: height 0s linear;
}

/* Scroll-driven fill: set by JS adding .complete */
.timeline-item.complete .timeline-progress-line {
  height: calc(100% - 1.25rem + 1.5rem);
  transition: height 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Step 4 → climax: extend line container far enough to reach the climax dot */
.timeline-item[data-index="3"] .timeline-progress-line-container {
  bottom: -120px;
}

/* =============================================
   ICON
   ============================================= */

.timeline-icon-container {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
  will-change: opacity, transform;
}

.timeline-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(8, 4, 20, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(96, 165, 250, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #60a5fa;
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.timeline-item.complete .timeline-icon {
  background: rgba(29, 78, 216, 0.3);
  border-color: rgba(96, 165, 250, 0.6);
  box-shadow: 0 0 20px rgba(96, 165, 250, 0.3);
}

/* =============================================
   CARD  — position: absolute anchored from center
   ============================================= */

.timeline-card {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: calc(50% - 80px);
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 32px 28px;
  background: rgba(8, 4, 20, 0.78);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(96, 165, 250, 0.16);
  border-radius: 20px;
  box-shadow:
    0 4px 30px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.35s ease,
              border-color 0.35s ease;
  overflow: hidden;
  will-change: transform;
}

/* Left item: card anchored to right edge of left half */
.timeline-item.left .timeline-card {
  right: calc(50% + 44px);
  left: auto;
}

/* Right item: card anchored to left edge of right half */
.timeline-item.right .timeline-card {
  left: calc(50% + 44px);
  right: auto;
}

.timeline-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(96, 165, 250, 0.06) 0%, transparent 55%);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.timeline-card:hover {
  transform: translateY(calc(-50% - 8px)) scale(1.02);
  border-color: rgba(96, 165, 250, 0.32);
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.55),
    0 0 30px rgba(96, 165, 250, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.timeline-card:hover::before {
  opacity: 1;
}

/* ---- Step label ---- */
.step-label {
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #60a5fa;
  font-weight: 600;
}

/* ---- Step title ---- */
.step-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
  line-height: 1.3;
}

/* ---- Step description ---- */
.step-desc {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.58);
  line-height: 1.75;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---- Button ---- */
.timeline-btn {
  display: inline-block;
  align-self: flex-start;
  padding: 9px 22px;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-decoration: none;
  border-radius: 10px;
  border: 1px solid rgba(96, 165, 250, 0.2);
  box-shadow: 0 3px 10px rgba(37, 99, 235, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  position: relative;
  overflow: hidden;
}

.timeline-btn::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  transition: left 0.45s ease;
}

.timeline-btn:hover::before { left: 100%; }

.timeline-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.5);
  background: linear-gradient(135deg, #3b82f6 0%, #60a5fa 100%);
  color: #fff;
}

/* =============================================
   IMAGE CARD — appears on hover, opposite side
   ============================================= */

.timeline-image-card {
  position: absolute;
  top: 50%;
  width: calc(50% - 80px);
  height: 220px;
  border-radius: 20px;
  overflow: hidden;
  background: rgba(8, 4, 20, 0.82);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(96, 165, 250, 0.28);
  box-shadow:
    0 8px 40px rgba(0, 0, 0, 0.55),
    0 0 24px rgba(96, 165, 250, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  /* Hidden by default */
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 2;
  will-change: opacity, transform;
  transition:
    opacity 0.4s ease,
    visibility 0.4s ease,
    transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 0.4s ease;
}

/* Left item: image card sits in the right half, slides in from right */
.timeline-item.left .timeline-image-card {
  left: calc(50% + 44px);
  transform: translateY(-50%) translateX(50px);
}

/* Right item: image card sits in the left half, slides in from left */
.timeline-item.right .timeline-image-card {
  right: calc(50% + 44px);
  transform: translateY(-50%) translateX(-50px);
}

/* Reveal on hover — trigger is the whole .timeline-item */
.timeline-item.left:hover .timeline-image-card {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(-50%) translateX(0);
  box-shadow:
    0 12px 50px rgba(0, 0, 0, 0.6),
    0 0 32px rgba(96, 165, 250, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.timeline-item.right:hover .timeline-image-card {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(-50%) translateX(0);
  box-shadow:
    0 12px 50px rgba(0, 0, 0, 0.6),
    0 0 32px rgba(96, 165, 250, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

/* Image fills the card — parallax applied via JS transform */
.timeline-image-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1.04);
  transition: transform 0.1s linear;
  will-change: transform;
}

/* Blue glow overlay — pulses on hover */
.timeline-image-card-glow {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(96, 165, 250, 0.18) 0%, transparent 55%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.timeline-item:hover .timeline-image-card-glow {
  opacity: 1;
  animation: imageCardGlowPulse 2.5s ease-in-out infinite;
}

@keyframes imageCardGlowPulse {
  0%, 100% { opacity: 0.6; }
  50%       { opacity: 1; }
}

/* =============================================
   CLIMAX PANEL — step 5
   ============================================= */

.timeline-item.climax {
  min-height: auto;
  padding: 60px 60px 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.climax-dot {
  position: relative;
  left: auto;
  top: auto;
  transform: none;
  margin-bottom: 48px;
  flex-shrink: 0;
  box-shadow: 0 0 16px rgba(96, 165, 250, 0.5);
}

.climax-panel {
  position: relative;
  width: 100%;
  max-width: 1100px;
  height: 520px;
  border-radius: 24px;
  overflow: hidden;
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(96, 165, 250, 0.12);
  cursor: pointer;
}

/* Featured image */
.climax-featured-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  transition: transform 0.7s ease;
  z-index: 0;
}

.climax-panel:hover .climax-featured-image {
  transform: scale(1.05);
}

/* Glass overlay */
.climax-glass-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    135deg,
    rgba(6, 3, 15, 0.75) 0%,
    rgba(6, 3, 15, 0.45) 50%,
    rgba(6, 3, 15, 0.65) 100%
  );
  transition: background 0.5s ease;
}

.climax-panel:hover .climax-glass-overlay {
  background: linear-gradient(
    135deg,
    rgba(6, 3, 15, 0.5) 0%,
    rgba(6, 3, 15, 0.25) 50%,
    rgba(6, 3, 15, 0.45) 100%
  );
}

/* Center content (always visible, fades out on hover) */
.climax-content {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 40px;
  gap: 14px;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.climax-panel:hover .climax-content {
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
}

.climax-eyebrow {
  font-size: 0.68rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: #60a5fa;
  margin: 0;
  font-weight: 600;
}

.climax-title {
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 800;
  color: #fff;
  margin: 0;
  line-height: 1.1;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.6);
}

.climax-subtitle {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.62);
  max-width: 480px;
  margin: 0;
  line-height: 1.7;
}

/* Text block — slides in from left on hover */
.climax-text-block {
  position: absolute;
  left: 36px;
  top: 50%;
  transform: translateY(-50%) translateX(-16px);
  width: 260px;
  padding: 24px;
  background: rgba(6, 3, 15, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(96, 165, 250, 0.18);
  border-radius: 16px;
  z-index: 3;
  opacity: 0;
  transition: opacity 0.4s ease 0.08s, transform 0.4s ease 0.08s;
}

.climax-text-block p {
  font-size: 0.86rem;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.7;
  margin: 0 0 10px;
}

.climax-text-block p:last-child { margin-bottom: 0; }

.climax-panel:hover .climax-text-block {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

/* Logo — slides in from right on hover */
.climax-logo {
  position: absolute;
  right: 36px;
  top: 50%;
  transform: translateY(-50%) translateX(16px);
  z-index: 3;
  opacity: 0;
  transition: opacity 0.4s ease 0.15s, transform 0.4s ease 0.15s;
}

.climax-logo-inner {
  width: 200px;
  padding: 20px 24px;
  border-radius: 16px;
  background: rgba(6, 3, 15, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(96, 165, 250, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
}

.climax-logo-img {
  width: 100%;
  max-height: 80px;
  object-fit: contain;
  filter: brightness(1.1);
}

.climax-panel:hover .climax-logo {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

/* =============================================
   SIDEBAR SCROLL LOCK (desktop only)
   ============================================= */

@media (min-width: 1281px) {
  #wrapper.expand-wrapper {
    margin-left: 0 !important;
    width: 100% !important;
  }
}

/* =============================================
   REDUCED MOTION — skip translate, just fade
   ============================================= */

@media (prefers-reduced-motion: reduce) {
  .timeline-item.left .timeline-image-card,
  .timeline-item.right .timeline-image-card {
    transform: translateY(-50%) !important;
    transition: opacity 0.3s ease, visibility 0.3s ease;
  }

  .timeline-image-card-glow {
    animation: none !important;
  }

  .timeline-card {
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
  }

  .timeline-card:hover {
    transform: translateY(-50%);
  }
}

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

@media (max-width: 1100px) {
  .timeline-card,
  .timeline-image-card {
    width: calc(50% - 60px);
  }
  .timeline-item.left .timeline-card   { right: calc(50% + 32px); }
  .timeline-item.right .timeline-card  { left: calc(50% + 32px); }
  .timeline-item.left .timeline-image-card  { left: calc(50% + 32px); }
  .timeline-item.right .timeline-image-card { right: calc(50% + 32px); }
}

@media (max-width: 768px) {
  .timeline-section {
    padding: 60px 0 60px;
  }

  .timeline-heading {
    padding: 0 20px 40px;
  }

  .timeline-heading-title {
    font-size: 2rem;
  }

  /* Move line to left rail */
  .timeline-line {
    left: 28px;
    transform: none;
  }

  .timeline-item {
    min-height: auto;
    padding: 20px 20px 20px 64px;
  }

  /* Cards become full-width block elements */
  .timeline-card {
    position: relative;
    top: auto;
    left: auto !important;
    right: auto !important;
    transform: none;
    width: 100%;
  }

  .timeline-card:hover {
    transform: none;
  }

  /* Icons on left rail */
  .timeline-icon-container {
    left: 28px;
    top: 32px;
    transform: translateX(-50%);
  }

  .timeline-dot {
    left: 28px;
    top: 32px;
    transform: translateX(-50%);
  }

  .timeline-progress-line-container {
    left: 28px;
    transform: none;
    top: 56px;
    bottom: 0;
  }

  .step-title { font-size: 1.1rem; }

  .step-desc {
    font-size: 0.86rem;
    /* Remove clamp — on mobile cards don't hover so the full text must be visible */
    display: block;
    -webkit-line-clamp: unset;
    -webkit-box-orient: unset;
    overflow: visible;
  }

  /* Image card: stacked above card, always visible, no hover required */
  .timeline-image-card {
    position: relative;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    transform: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    width: 100%;
    height: 160px;
    margin-bottom: 14px;
    border-radius: 14px;
    box-shadow:
      0 4px 20px rgba(0, 0, 0, 0.4),
      0 0 16px rgba(96, 165, 250, 0.1);
  }

  .timeline-image-card-glow {
    opacity: 0.5;
    animation: none;
  }

  /* Climax on mobile — stacked card layout */
  .timeline-item.climax {
    padding: 40px 16px 60px;
  }

  /* Panel becomes a flex column — no fixed height, no overflow clip */
  .climax-panel {
    height: auto;
    overflow: hidden;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    background: rgba(6, 3, 15, 0.92);
    cursor: default;
  }

  /* Featured image: pull into normal flow at the top */
  .climax-featured-image {
    position: relative !important;
    height: 200px;
    width: 100%;
    object-fit: cover;
    object-position: center 40%;
    flex-shrink: 0;
    transform: none !important;
    transition: none;
  }

  /* Hide the glass overlay — content is below the image now */
  .climax-glass-overlay {
    display: none;
  }

  /* Content block: pulled out of absolute overlay into normal flow */
  .climax-content {
    position: relative;
    inset: auto;
    opacity: 1 !important;
    transform: none !important;
    pointer-events: auto;
    padding: 24px 20px 12px;
    gap: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: none;
  }

  .climax-title { font-size: 1.5rem; }
  .climax-subtitle { font-size: 0.88rem; }

  /* Text block: stacked below content */
  .climax-text-block {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    opacity: 1;
    width: auto;
    padding: 12px 20px 16px;
    margin-top: 0;
    border-radius: 0;
    border-top: 1px solid rgba(96, 165, 250, 0.1);
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    transition: none;
  }

  /* Logo: stacked below text block */
  .climax-logo {
    position: relative;
    top: auto;
    right: auto;
    transform: none;
    opacity: 1;
    display: flex;
    justify-content: center;
    padding: 16px 20px 20px;
    transition: none;
  }

  .climax-logo-inner {
    width: 140px;
  }

  /* Disable all hover effects on climax panel — they don't make sense on touch */
  .climax-panel:hover .climax-featured-image { transform: none !important; }
  .climax-panel:hover .climax-glass-overlay  { display: none; }
  .climax-panel:hover .climax-content        { opacity: 1 !important; transform: none !important; }
  .climax-panel:hover .climax-text-block     { opacity: 1; transform: none; }
  .climax-panel:hover .climax-logo           { opacity: 1; transform: none; }
}


/* =============================================
   MID-PAGE CTA STRIP
   ============================================= */

.process-cta-strip {
  padding: 5rem 2rem;
  text-align: center;
  background: linear-gradient(to bottom, transparent, rgba(30, 58, 138, 0.06));
}

.process-cta-strip__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  flex-wrap: wrap;
}

.process-cta-strip__text {
  color: rgba(255, 255, 255, 0.5);
  font-family: 'Poppins', sans-serif;
  font-size: 0.72rem;
  font-weight: 300;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  margin: 0;
}

.process-cta-strip__btn {
  display: inline-flex;
  align-items: center;
  padding: 0.88em 2.3em;
  border: 1px solid rgba(96, 165, 250, 0.5);
  border-radius: 2px;
  font-family: 'Poppins', sans-serif;
  font-size: 0.72rem;
  font-weight: 300;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  text-decoration: none;
  color: #fff;
  background: linear-gradient(135deg, rgba(30, 58, 138, 0.7), rgba(14, 165, 233, 0.6));
  transition: background 0.35s ease, border-color 0.35s ease;
}

.process-cta-strip__btn:hover {
  background: linear-gradient(135deg, rgba(30, 58, 138, 0.92), rgba(14, 165, 233, 0.82));
  border-color: rgba(96, 165, 250, 0.85);
}

@media (max-width: 600px) {
  .process-cta-strip {
    padding: 3.5rem 1.5rem;
  }

  .process-cta-strip__inner {
    flex-direction: column;
    gap: 1.5rem;
    text-align: center;
  }
}
