/* ========================================
   SEÇÃO CRONOGRAMA (TIMELINE) - UFR 2026
   ======================================== */

/* Container Principal */
.timeline-section {
  padding: 80px 20px;
  background-color: #ffffff;
}

.timeline-container {
  max-width: 1200px;
  margin: 0 auto;
}

/* Cabeçalho da Seção */
.timeline-header {
  text-align: center;
  margin-bottom: 60px;
}

.timeline-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 16px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.timeline-subtitle {
  font-size: 1.125rem;
  color: #64748b;
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.7;
}

/* Timeline Wrapper */
.timeline-wrapper {
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
}

/* Linha Vertical Central */
.timeline-line {
  position: absolute;
  left: 32px;
  top: 0;
  bottom: 0;
  width: 2px;
  background-color: #e2e8f0;
}

@media (min-width: 768px) {
  .timeline-line {
    left: 50%;
    transform: translateX(-1px);
  }
}

/* Container de Eventos */
.timeline-events {
  display: flex;
  flex-direction: column;
  gap: 48px;
}

/* Evento Individual - Base */
.timeline-event {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 24px;
}

/* Mobile - Todos à esquerda */
@media (max-width: 767px) {
  .timeline-event {
    flex-direction: row;
  }
  
  .timeline-content {
    margin-left: 80px;
  }
  
  .timeline-icon-wrapper {
    position: absolute;
    left: 0;
  }
  
  .timeline-spacer {
    display: none;
  }
}

/* Desktop - Layout alternado */
@media (min-width: 768px) {
  .timeline-event {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 40px;
    align-items: center;
  }
  
  /* Evento LEFT - conteúdo na coluna 1, ícone na coluna 2, vazio na coluna 3 */
  .timeline-event-left .timeline-content {
    grid-column: 1;
    text-align: right;
  }
  
  .timeline-event-left .timeline-icon-wrapper {
    grid-column: 2;
  }
  
  .timeline-event-left .timeline-spacer {
    grid-column: 3;
  }
  
  /* Evento RIGHT - vazio na coluna 1, ícone na coluna 2, conteúdo na coluna 3 */
  .timeline-event-right .timeline-spacer {
    grid-column: 1;
  }
  
  .timeline-event-right .timeline-icon-wrapper {
    grid-column: 2;
  }
  
  .timeline-event-right .timeline-content {
    grid-column: 3;
    text-align: left;
  }
}

/* Conteúdo */
.timeline-content {
  flex: 1;
  position: relative;
  z-index: 5;
}

/* Card do Evento */
.timeline-card {
  background: #ffffff;
  border-radius: 12px;
  padding: 20px 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.timeline-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
}

/* Card Concluído (Verde) */
.timeline-card-completed {
  border-color: #10b981;
  background: linear-gradient(135deg, #ffffff 0%, #ecfdf5 100%);
}

/* Card Atual (Azul com destaque) */
.timeline-card-current {
  border-color: #0066cc;
  background: linear-gradient(135deg, #ffffff 0%, #eff6ff 100%);
  box-shadow: 0 0 20px rgba(0, 102, 204, 0.2);
}

/* Card Próximo (Neutro) */
.timeline-card-upcoming {
  border-color: #e2e8f0;
}

/* Header do Card */
.timeline-card-header {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
}

@media (min-width: 768px) {
  .timeline-event-left .timeline-card-header {
    justify-content: flex-end;
  }
  
  .timeline-event-right .timeline-card-header {
    justify-content: flex-start;
  }
}

/* Data */
.timeline-date {
  font-size: 0.875rem;
  font-weight: 600;
}

.timeline-date-completed {
  color: #10b981;
}

.timeline-date-current {
  color: #0066cc;
}

.timeline-date-upcoming {
  color: #64748b;
}

/* Título do Card */
.timeline-card-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 8px;
  line-height: 1.4;
}

/* Descrição do Card */
.timeline-card-description {
  font-size: 0.9375rem;
  color: #64748b;
  line-height: 1.6;
}

/* Wrapper do Ícone */
.timeline-icon-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

/* Ícone */
.timeline-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.timeline-icon:hover {
  transform: scale(1.1);
}

/* Ícone Concluído */
.timeline-icon-completed {
  background-color: #10b981;
  color: #ffffff;
}

/* Ícone Atual */
.timeline-icon-current {
  background-color: #0066cc;
  color: #ffffff;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3);
  }
  50% {
    box-shadow: 0 4px 20px rgba(0, 102, 204, 0.6);
  }
}

/* Ícone Próximo */
.timeline-icon-upcoming {
  background-color: #ffffff;
  border: 2px solid #e2e8f0;
  color: #64748b;
}

/* Spacer */
.timeline-spacer {
  display: none;
}

@media (min-width: 768px) {
  .timeline-spacer {
    display: block;
  }
}

/* Animação de Entrada */
@keyframes fadeInTimeline {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.timeline-event {
  animation: fadeInTimeline 0.6s ease-out;
  animation-fill-mode: both;
}

.timeline-event:nth-child(1) { animation-delay: 0.1s; }
.timeline-event:nth-child(2) { animation-delay: 0.15s; }
.timeline-event:nth-child(3) { animation-delay: 0.2s; }
.timeline-event:nth-child(4) { animation-delay: 0.25s; }
.timeline-event:nth-child(5) { animation-delay: 0.3s; }
.timeline-event:nth-child(6) { animation-delay: 0.35s; }
.timeline-event:nth-child(7) { animation-delay: 0.4s; }
.timeline-event:nth-child(8) { animation-delay: 0.45s; }

/* Responsividade para Tablets */
@media (max-width: 768px) {
  .timeline-section {
    padding: 60px 20px;
  }

  .timeline-title {
    font-size: 2rem;
  }

  .timeline-subtitle {
    font-size: 1rem;
  }

  .timeline-events {
    gap: 32px;
  }

  .timeline-icon {
    width: 56px;
    height: 56px;
  }
}

/* Responsividade para Mobile */
@media (max-width: 480px) {
  .timeline-section {
    padding: 40px 16px;
  }

  .timeline-title {
    font-size: 1.75rem;
  }

  .timeline-header {
    margin-bottom: 40px;
  }

  .timeline-icon {
    width: 48px;
    height: 48px;
  }

  .timeline-icon svg {
    width: 20px;
    height: 20px;
  }

  .timeline-card {
    padding: 16px 20px;
  }

  .timeline-card-title {
    font-size: 1rem;
  }

  .timeline-card-description {
    font-size: 0.875rem;
  }
  
  .timeline-content {
    margin-left: 68px;
  }
}