/*
 * Devders Timelines — Preset Style 1 "Classic Line"
 * Ported from the original design prototype.
 *
 * All colors, fonts and effect switches are CSS custom properties printed
 * on the .devders-timeline wrapper by the PHP renderer, so every value can
 * be customized from Settings (or per shortcode instance) without extra CSS.
 */

.dt-s1-timeline-wrapper {
  --dt-s1-primary: #1664c0;
  --dt-s1-secondary: #b69324;
  --dt-s1-primary-tint: #d6e8fb;
  --dt-s1-secondary-tint: #faebd7;
  --dt-s1-primary-glow: rgba(22, 100, 192, 0.28);
  --dt-s1-secondary-glow: rgba(182, 147, 36, 0.28);
  --dt-s1-transition-smooth: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);

  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  position: relative;
  box-sizing: border-box;
  font-family: var(--dt-s1-font, inherit);
}

.dt-s1-timeline-wrapper *,
.dt-s1-timeline-wrapper *::before,
.dt-s1-timeline-wrapper *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.dt-s1-timeline-list {
  display: flex;
  flex-direction: column;
  position: relative;
}

/* ==========================================================================
   Timeline Item & Entrance Animation
   Stagger timing is set per item by style-1.js, so any item count works.
   ========================================================================== */
.dt-s1-timeline-item {
  display: flex;
  position: relative;
  min-height: 130px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.dt-s1-timeline-item.dt-s1-is-visible {
  opacity: 1;
  transform: translateY(0);
}

.dt-s1-timeline-item:last-child {
  min-height: auto;
  padding-bottom: 20px;
}

/* ==========================================================================
   Track (Marker + Connecting Line)
   ========================================================================== */
.dt-s1-timeline-track {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  width: 44px;
  flex-shrink: 0;
  margin-right: 28px;
}

.dt-s1-marker-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin-top: 2px;
  z-index: 2;
}

.dt-s1-timeline-marker {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background-color: #ffffff;
  border: 4px solid var(--dt-s1-primary);
  box-shadow: 0 0 0 3px var(--dt-s1-primary-tint);
  position: relative;
  z-index: 2;
  transition: var(--dt-s1-transition-smooth);
}

/* Continuous pulse wave */
.dt-s1-marker-pulse {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background-color: var(--dt-s1-primary-glow);
  z-index: 1;
  opacity: 0;
  animation: dt-s1-pulse 2.6s infinite cubic-bezier(0.24, 0, 0.38, 1);
}

@keyframes dt-s1-pulse {
  0% {
    transform: translate(-50%, -50%) scale(0.6);
    opacity: 0.8;
  }

  60% {
    transform: translate(-50%, -50%) scale(1.6);
    opacity: 0;
  }

  100% {
    transform: translate(-50%, -50%) scale(1.6);
    opacity: 0;
  }
}

/* ==========================================================================
   Connecting Lines
   ========================================================================== */
.dt-s1-timeline-line {
  width: 3px;
  position: absolute;
  top: 30px;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  border-radius: 4px;
  overflow: hidden;
}

/* Shimmer light particle moving down the line */
.dt-s1-timeline-line::after {
  content: '';
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 50%;
  background: linear-gradient(to bottom, transparent, #ffffff, transparent);
  opacity: 0.7;
  animation: dt-s1-line-flow 3.5s infinite linear;
}

@keyframes dt-s1-line-flow {
  /* translateY is relative to the particle's own height (50% of the line),
     so 600% covers the same -100% -> 200% travel animating "top" would,
     but runs entirely on the compositor (no per-frame layout). */
  0% {
    transform: translateY(0);
  }

  100% {
    transform: translateY(600%);
  }
}

/* Solid primary segment */
.dt-s1-line-solid {
  background-color: var(--dt-s1-primary);
}

/* Gradient segment: colors supplied per item by the renderer */
.dt-s1-line-blend {
  background: linear-gradient(to bottom, var(--dt-s1-seg-from, var(--dt-s1-primary)), var(--dt-s1-seg-to, var(--dt-s1-secondary)));
}

/* Short accent stub under the final marker */
.dt-s1-line-accent {
  background-color: var(--dt-s1-secondary);
  height: 60px;
  bottom: auto;
}

/* Single-item timeline: no connector needed */
.dt-s1-single .dt-s1-timeline-line {
  display: none;
}

/* ==========================================================================
   Content Area
   ========================================================================== */
.dt-s1-timeline-content {
  padding: 2px 0 44px 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: var(--dt-s1-transition-smooth);
}

.dt-s1-timeline-item:last-child .dt-s1-timeline-content {
  padding-bottom: 4px;
}

.dt-s1-timeline-year {
  font-size: 17px;
  font-weight: 700;
  color: var(--dt-s1-primary);
  line-height: 1.3;
  letter-spacing: -0.01em;
  transition: var(--dt-s1-transition-smooth);
}

.dt-s1-timeline-title {
  font-size: 19px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.35;
  letter-spacing: -0.015em;
  transition: var(--dt-s1-transition-smooth);
}

.dt-s1-timeline-description {
  font-size: 15px;
  font-weight: 400;
  color: #64748b;
  line-height: 1.6;
  max-width: 100%;
  transition: var(--dt-s1-transition-smooth);
}

/* ==========================================================================
   Accent (highlight) items — recolor marker, pulse and year with the
   secondary color, like the gold milestone in the original design.
   ========================================================================== */
.dt-s1-item-accent .dt-s1-timeline-marker {
  border-color: var(--dt-s1-secondary);
  box-shadow: 0 0 0 3px var(--dt-s1-secondary-tint);
}

.dt-s1-item-accent .dt-s1-marker-pulse {
  background-color: var(--dt-s1-secondary-glow);
}

.dt-s1-item-accent .dt-s1-timeline-year {
  color: var(--dt-s1-secondary);
}

/* ==========================================================================
   Interactive Hover Effects
   ========================================================================== */
.dt-s1-timeline-item:hover .dt-s1-timeline-marker {
  transform: scale(1.22);
  box-shadow: 0 0 0 6px var(--dt-s1-primary-tint);
}

.dt-s1-item-accent:hover .dt-s1-timeline-marker {
  box-shadow: 0 0 0 6px var(--dt-s1-secondary-tint);
}

.dt-s1-timeline-item:hover .dt-s1-timeline-title {
  color: var(--dt-s1-primary);
}

.dt-s1-item-accent:hover .dt-s1-timeline-title {
  color: var(--dt-s1-secondary);
}

.dt-s1-timeline-item:hover .dt-s1-timeline-description {
  color: #334155;
}

/* ==========================================================================
   Effect switches (set by Settings → Effects & Layout)
   ========================================================================== */
.dt-s1-no-pulse .dt-s1-marker-pulse {
  animation: none;
  display: none;
}

.dt-s1-no-flow .dt-s1-timeline-line::after {
  animation: none;
  display: none;
}

.dt-s1-no-reveal .dt-s1-timeline-item {
  opacity: 1;
  transform: none;
  transition: none;
}

/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  .dt-s1-timeline-item {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .dt-s1-marker-pulse {
    animation: none;
    display: none;
  }

  .dt-s1-timeline-line::after {
    animation: none;
    display: none;
  }

  .dt-s1-timeline-marker,
  .dt-s1-timeline-content,
  .dt-s1-timeline-year,
  .dt-s1-timeline-title,
  .dt-s1-timeline-description {
    transition: none;
  }
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 640px) {
  .dt-s1-timeline-wrapper {
    padding: 24px 12px;
  }

  .dt-s1-timeline-track {
    margin-right: 16px;
    width: 32px;
  }

  .dt-s1-marker-container {
    width: 26px;
    height: 26px;
  }

  .dt-s1-timeline-marker {
    width: 18px;
    height: 18px;
    border-width: 3.5px;
    box-shadow: 0 0 0 2.5px var(--dt-s1-primary-tint);
  }

  .dt-s1-item-accent .dt-s1-timeline-marker {
    box-shadow: 0 0 0 2.5px var(--dt-s1-secondary-tint);
  }

  .dt-s1-timeline-content {
    padding-bottom: 36px;
  }

  .dt-s1-timeline-year {
    font-size: 15px;
  }

  .dt-s1-timeline-title {
    font-size: 17px;
  }

  .dt-s1-timeline-description {
    font-size: 14px;
  }
}
