/* Publication path timeline — scoped to .pub-path */

.pub-path {
  --pp-navy: #0c2340;
  --pp-teal: #1a6b7a;
  --pp-teal-light: #2d8f9e;
  --pp-muted: #5b6b7d;
  position: relative;
  overflow: hidden;
  padding: 4rem 0 3.5rem;
  background: linear-gradient(180deg, #f8fafc 0%, #f2f7fb 100%);
}

.pub-path__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.pub-path__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.3;
}

.pub-path__orb--1 {
  width: 280px;
  height: 280px;
  top: -60px;
  right: 5%;
  background: radial-gradient(circle, rgba(59, 130, 196, 0.25) 0%, transparent 70%);
}

.pub-path__orb--2 {
  width: 240px;
  height: 240px;
  bottom: -40px;
  left: 3%;
  background: radial-gradient(circle, rgba(45, 143, 158, 0.22) 0%, transparent 70%);
}

.pub-path .container {
  position: relative;
  z-index: 1;
}

/* Header */
.pub-path__header {
  max-width: 680px;
  margin: 0 auto 2.5rem;
  text-align: center;
}

.pub-path__label {
  display: inline-block;
  padding: 0.35rem 0.9rem;
  margin-bottom: 1rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--pp-teal);
  background: rgba(26, 107, 122, 0.08);
  border: 1px solid rgba(26, 107, 122, 0.16);
  border-radius: 100px;
}

.pub-path__title {
  font-family: 'Outfit', 'Poppins', sans-serif;
  font-size: clamp(1.65rem, 3vw, 2.25rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--pp-navy);
  margin-bottom: 1rem;
}

.pub-path__subtitle {
  font-family: 'Inter', sans-serif;
  font-size: clamp(0.9375rem, 1.2vw, 1.0625rem);
  line-height: 1.72;
  color: var(--pp-muted);
  margin: 0;
}

/* Timeline wrapper */
.pub-path__timeline {
  position: relative;
  margin-bottom: 2.5rem;
  max-width: 780px;
  margin-left: auto;
  margin-right: auto;
}

/* Vertical center line */
.pub-path__line {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 3px;
  transform: translateX(-50%);
  background: rgba(12, 35, 64, 0.08);
  border-radius: 3px;
  z-index: 0;
}

.pub-path__line-fill {
  display: block;
  width: 100%;
  height: 0;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--pp-teal-light) 0%, var(--pp-navy) 100%);
  transition: height 1.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.pub-path__timeline.is-line-visible .pub-path__line-fill {
  height: 100%;
}

/* Steps layout — alternating zigzag */
.pub-path__steps {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* Step — base */
.pub-path__step {
  position: relative;
  display: flex;
  align-items: flex-start;
  width: 50%;
}

/* Odd steps: left side */
.pub-path__step:nth-child(odd) {
  align-self: flex-start;
  padding-right: 2.5rem;
  justify-content: flex-end;
}

/* Even steps: right side */
.pub-path__step:nth-child(even) {
  align-self: flex-end;
  padding-left: 2.5rem;
}

/* Node on the center line */
.pub-path__step-node {
  position: absolute;
  top: 0.5rem;
  z-index: 3;
}

.pub-path__step:nth-child(odd) .pub-path__step-node {
  right: -22px;
}

.pub-path__step:nth-child(even) .pub-path__step-node {
  left: -22px;
}

.pub-path__step-num {
  position: relative;
  z-index: 2;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Outfit', 'Poppins', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--pp-teal-light) 0%, var(--pp-navy) 100%);
  border-radius: 50%;
  box-shadow: 0 4px 16px rgba(12, 35, 64, 0.22);
}

.pub-path__step-pulse {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid var(--pp-teal-light);
  opacity: 0;
  animation: ppPulse 2.5s ease-out infinite;
}

.pub-path__step:nth-child(2) .pub-path__step-pulse { animation-delay: 0.5s; }
.pub-path__step:nth-child(3) .pub-path__step-pulse { animation-delay: 1s; }
.pub-path__step:nth-child(4) .pub-path__step-pulse { animation-delay: 1.5s; }

@keyframes ppPulse {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(1.8); opacity: 0; }
}

/* Step card */
.pub-path__step-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.35rem 1.5rem;
  background: #fff;
  border: 1px solid rgba(12, 35, 64, 0.07);
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(12, 35, 64, 0.05);
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
  width: 100%;
}

.pub-path__step-card:hover {
  transform: translateY(-4px);
  border-color: rgba(45, 143, 158, 0.3);
  box-shadow: 0 14px 40px rgba(12, 35, 64, 0.09);
}

/* Odd cards: text right-aligned */
.pub-path__step:nth-child(odd) .pub-path__step-card {
  text-align: right;
  flex-direction: row-reverse;
}

.pub-path__step-icon {
  width: 44px;
  height: 44px;
  min-width: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--pp-teal);
  background: rgba(26, 107, 122, 0.08);
  border-radius: 12px;
  transition: background 0.35s ease, color 0.35s ease;
}

.pub-path__step-card:hover .pub-path__step-icon {
  color: #fff;
  background: linear-gradient(135deg, var(--pp-teal-light) 0%, var(--pp-navy) 100%);
}

.pub-path__step-title {
  font-family: 'Outfit', 'Poppins', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--pp-navy);
  margin-bottom: 0.35rem;
  line-height: 1.3;
}

.pub-path__step-desc {
  font-family: 'Inter', sans-serif;
  font-size: 0.84rem;
  line-height: 1.65;
  color: var(--pp-muted);
  margin: 0;
}

/* ---- Responsive: tablet & mobile — vertical list ---- */
@media (max-width: 767.98px) {
  .pub-path__line {
    left: 22px;
    transform: none;
  }

  .pub-path__steps {
    gap: 1.5rem;
  }

  .pub-path__step,
  .pub-path__step:nth-child(odd),
  .pub-path__step:nth-child(even) {
    width: 100%;
    align-self: stretch;
    padding-left: 3.5rem;
    padding-right: 0;
    justify-content: flex-start;
  }

  .pub-path__step-node,
  .pub-path__step:nth-child(odd) .pub-path__step-node,
  .pub-path__step:nth-child(even) .pub-path__step-node {
    left: -22px;
    right: auto;
  }

  .pub-path__step-num {
    width: 40px;
    height: 40px;
    font-size: 0.9rem;
  }

  .pub-path__step-card,
  .pub-path__step:nth-child(odd) .pub-path__step-card {
    flex-direction: row;
    text-align: left;
  }
}

/* CTA */
.pub-path__cta {
  position: relative;
  padding: 1.75rem 2.5rem;
  border-radius: 22px;
  overflow: hidden;
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 40%, #e0e7ff 100%);
  border: 1px solid rgba(99, 102, 241, 0.15);
  box-shadow:
    0 6px 28px rgba(49, 46, 129, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.pub-path__cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 40% 80% at 0% 50%, rgba(99, 102, 241, 0.06) 0%, transparent 60%);
  z-index: 0;
  pointer-events: none;
}

.pub-path__cta::after {
  content: none;
}

.pub-path__cta-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.pub-path__cta-icon {
  flex-shrink: 0;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #4338ca, #6366f1);
  border-radius: 14px;
  color: #fff;
  font-size: 1.15rem;
  box-shadow: 0 4px 16px rgba(67, 56, 202, 0.25);
}

.pub-path__cta-content {
  flex: 1;
  text-align: left;
}

.pub-path__cta-title {
  font-family: 'Outfit', 'Poppins', sans-serif;
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 0.2rem;
  line-height: 1.35;
}

.pub-path__cta-text {
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  line-height: 1.5;
  color: #64748b;
  margin-bottom: 0;
}

.pub-path__cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.85rem 1.75rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff !important;
  background: linear-gradient(135deg, #4338ca 0%, #6366f1 100%);
  border: none;
  border-radius: 12px;
  text-decoration: none;
  box-shadow: 0 4px 20px rgba(67, 56, 202, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.pub-path__cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(67, 56, 202, 0.4);
  color: #fff !important;
}

.pub-path__cta-btn i {
  font-size: 0.75rem;
  transition: transform 0.3s ease;
}

.pub-path__cta-btn:hover i {
  transform: translateX(4px);
}

/* Scroll reveal */
.pub-path-reveal {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}

.pub-path-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.pub-path-reveal[data-delay="1"] { transition-delay: 0.1s; }
.pub-path-reveal[data-delay="2"] { transition-delay: 0.22s; }
.pub-path-reveal[data-delay="3"] { transition-delay: 0.34s; }
.pub-path-reveal[data-delay="4"] { transition-delay: 0.46s; }
.pub-path-reveal[data-delay="5"] { transition-delay: 0.15s; }

@media (max-width: 767.98px) {
  .pub-path {
    padding: 2.5rem 0;
  }

  .pub-path__header {
    margin-bottom: 1.75rem;
  }

  .pub-path__cta {
    padding: 1.5rem 1.25rem;
  }
  .pub-path__cta-inner {
    flex-direction: column;
    text-align: center;
  }
  .pub-path__cta-content {
    text-align: center;
  }
  .pub-path__cta-text {
    margin-bottom: 0.75rem;
  }
  .pub-path__cta-btn {
    width: 100%;
    max-width: 280px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pub-path-reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .pub-path__line-fill {
    transition: none;
    height: 100% !important;
  }

  .pub-path__step-pulse {
    animation: none;
    display: none;
  }

  .pub-path__step-card,
  .pub-path__cta-btn {
    transition: none;
  }

  .pub-path__step-card:hover {
    transform: none;
  }
}
