/* ==========================================================================
   Timeline Component Styles - Consolidated
   ========================================================================== */

:root {
  --timeline-primary: #0a2d5c;
  --timeline-secondary: #0f77a7;
  --timeline-accent: #e05c34;
  --timeline-quaternary: #004A87;
  --timeline-white: #ffffff;
  --timeline-shadow: rgba(0, 0, 0, 0.2);
}

/* ==========================================================================
   Timeline Container
   ========================================================================== */

.timeline {
  position: relative;
  margin: 30px auto;
  max-width: 1200px;
}

/* Timeline vertical line */
.timeline::before {
  content: '';
  position: absolute;
  height: 100%;
  width: 10px;
  background: linear-gradient(
    to bottom, 
    var(--timeline-primary) 25%, 
    var(--timeline-secondary) 25%, 
    var(--timeline-secondary) 50%, 
    var(--timeline-accent) 50%, 
    var(--timeline-accent) 75%, 
    var(--timeline-quaternary) 75%
  );
  left: 50%;
  transform: translateX(-50%);
  z-index: 0;
  border-radius: 5px;
}

/* ==========================================================================
   Timeline Steps
   ========================================================================== */

.step {
  position: relative;
  padding: 30px 0;
  width: 100%;
  display: flex;
  align-items: center;
  min-height: 120px;
}

/* Step Numbers */
.step-number {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background-color: var(--timeline-white);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 42px;
  font-weight: bold;
  color: #333;
  box-shadow: 0 5px 15px var(--timeline-shadow);
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  transition: all 0.3s ease;
}

.step-number:hover {
  transform: translateX(-50%) scale(1.1);
  box-shadow: 0 8px 25px var(--timeline-shadow);
}

/* Step number borders for each step */
.step-1 .step-number {
  border: 8px solid var(--timeline-primary);
}

.step-2 .step-number {
  border: 8px solid var(--timeline-secondary);
}

.step-3 .step-number {
  border: 8px solid var(--timeline-accent);
}

.step-4 .step-number {
  border: 8px solid var(--timeline-quaternary);
}

/* ==========================================================================
   Step Content
   ========================================================================== */

.step-content {
  width: calc(50% - 60px);
  padding: 25px;
  border-radius: 15px;
  box-shadow: 0 5px 15px var(--timeline-shadow);
  color: var(--timeline-white);
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.step-content:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px var(--timeline-shadow);
}

/* Content positioning - alternating left/right */
.step-1 .step-content,
.step-3 .step-content {
  background-color: var(--timeline-primary);
  margin-left: auto;
}

.step-2 .step-content,
.step-4 .step-content {
  margin-right: auto;
}

.step-1 .step-content {
  background-color: var(--timeline-primary);
}

.step-2 .step-content {
  background-color: var(--timeline-secondary);
}

.step-3 .step-content {
  background-color: var(--timeline-accent);
}

.step-4 .step-content {
  background-color: var(--timeline-quaternary);
}

/* ==========================================================================
   Step Content Typography
   ========================================================================== */

.step-title {
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 15px;
  text-transform: uppercase;
  letter-spacing: 1px;
  line-height: 1.3;
}

.step-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.step-list li {
  margin-bottom: 10px;
  position: relative;
  font-size: 14px;
  line-height: 1.4;
  padding-left: 20px;
  opacity: 0.95;
}

.step-list li:before {
  content: "•";
  position: absolute;
  left: 0;
  color: rgba(255, 255, 255, 0.7);
  font-weight: bold;
  font-size: 16px;
}

.step-list li:last-child {
  margin-bottom: 0;
}

/* ==========================================================================
   Connectors
   ========================================================================== */

.connector {
  position: absolute;
  height: 3px;
  width: 60px;
  z-index: 1;
  top: 50%;
  border-radius: 2px;
  opacity: 0.8;
}

.step-1 .connector,
.step-3 .connector {
  left: 50%;
  background: linear-gradient(to right, transparent, var(--timeline-primary));
}

.step-2 .connector,
.step-4 .connector {
  right: 50%;
  background: linear-gradient(to left, transparent, var(--timeline-secondary));
}

.step-2 .connector {
  background: linear-gradient(to left, transparent, var(--timeline-secondary));
}

.step-4 .connector {
  background: linear-gradient(to left, transparent, var(--timeline-quaternary));
}

/* ==========================================================================
   Three-Step Timeline Variant
   ========================================================================== */

.timeline.three-step::before {
  background: linear-gradient(
    to bottom, 
    var(--timeline-primary) 33%, 
    var(--timeline-secondary) 33%, 
    var(--timeline-secondary) 66%, 
    var(--timeline-accent) 66%
  );
}

/* ==========================================================================
   Animation Effects
   ========================================================================== */

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-100px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(100px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: translateX(-50%) scale(0.8);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) scale(1);
  }
}

/* Apply animations when elements are in view */
.timeline.animate .step-1 .step-content,
.timeline.animate .step-3 .step-content {
  animation: slideInLeft 0.6s ease-out;
}

.timeline.animate .step-2 .step-content,
.timeline.animate .step-4 .step-content {
  animation: slideInRight 0.6s ease-out;
}

.timeline.animate .step-number {
  animation: fadeInScale 0.4s ease-out;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

/* Large tablets and small desktops */
@media (max-width: 992px) {
  .timeline::before {
    left: 60px;
    width: 8px;
  }
  
  .step {
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 0;
  }
  
  .step-number {
    left: 60px;
    width: 60px;
    height: 60px;
    font-size: 32px;
  }
  
  .step-content {
    width: calc(100% - 120px);
    margin-left: 120px !important;
    margin-right: 0 !important;
  }
  
  .connector {
    display: none;
  }
  
  .step-title {
    font-size: 18px;
  }
}

/* Mobile phones */
@media (max-width: 576px) {
  .timeline {
    margin: 20px auto;
  }
  
  .timeline::before {
    left: 40px;
    width: 6px;
  }
  
  .step {
    padding: 15px 0;
  }
  
  .step-number {
    width: 50px;
    height: 50px;
    font-size: 24px;
    left: 40px;
    border-width: 4px !important;
  }
  
  .step-content {
    width: calc(100% - 80px);
    margin-left: 80px !important;
    padding: 20px 15px;
  }
  
  .step-title {
    font-size: 16px;
    margin-bottom: 10px;
  }
  
  .step-list li {
    font-size: 13px;
    margin-bottom: 8px;
    padding-left: 15px;
  }
  
  .step-list li:before {
    font-size: 14px;
  }
}

/* Very small screens */
@media (max-width: 375px) {
  .step-content {
    width: calc(100% - 70px);
    margin-left: 70px !important;
    padding: 15px 12px;
  }
  
  .step-title {
    font-size: 15px;
  }
  
  .step-list li {
    font-size: 12px;
  }
}

/* ==========================================================================
   Accessibility
   ========================================================================== */

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  .step-content,
  .step-number,
  .connector {
    transition: none;
  }
}
