/* ==========================================================================
   Sección: Análisis del Negocio (Timeline)
   ========================================================================== */

.analysis {
  padding: 5rem 1.5rem;
  background-color: var(--color-bg-dark);
  color: var(--color-text-light);
}

.analysis__container {
  max-width: var(--container-max-width);
  /* 1100px */
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Encabezados y Textos Comunes */
.analysis__header,
.analysis__footer {
  text-align: center;
  max-width: 48rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.analysis__header {
  margin-bottom: 4rem;
}

.analysis__footer {
  margin-top: 4rem;
}



/* ==========================================================================
   Componente: Timeline Vertical
   ========================================================================== */

.timeline {
  list-style: none;
  /* reset necesario ahora que es <ol> */
  margin: 0;
  padding: 2rem 0;
  /* antes: padding: 2rem 0; (se mantiene, solo se agrega el reset) */
  position: relative;
  width: 100%;
  max-width: 50rem;
  /* 800px */
  margin: 0 auto;
}

/* Línea central vertical */
.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 1px;
  background-color: var(--color-border-subtle);
}

/* Contenedor de cada ítem de la línea de tiempo */
.timeline__item {
  position: relative;
  width: 50%;
  margin-bottom: 2rem;
}

.timeline__item:last-child {
  margin-bottom: 0;
}

/* Modificadores de posición */
.timeline__item--left {
  left: 0;
  padding-right: 3.5rem;
  /* Espacio para la línea horizontal */
}

.timeline__item--right {
  left: 50%;
  padding-left: 3.5rem;
  /* Espacio para la línea horizontal */
}

/* Líneas horizontales conectoras */
.timeline__item--left::before,
.timeline__item--right::before {
  content: '';
  position: absolute;
  top: 50%;
  width: 3.5rem;
  height: 1px;
  background-color: var(--color-border-subtle);
}

.timeline__item--left::before {
  right: 0;
}

.timeline__item--right::before {
  left: 0;
}

/* Puntos indicadores centrales */
.timeline__item--left::after,
.timeline__item--right::after {
  content: '';
  position: absolute;
  top: calc(50% - 4px);
  /* Centrado vertical compensando la altura (8px) */
  width: 8px;
  height: 8px;
  background-color: var(--color-accent);
  border-radius: 50%;
  box-shadow: 0 0 0 4px var(--color-bg-dark);
  /* Borde para separarlo visualmente */
  z-index: 2;
}

.timeline__item--left::after {
  right: -4px;
  /* Centrado exacto sobre la línea vertical (50%) */
}

.timeline__item--right::after {
  left: -4px;
  /* Centrado exacto sobre la línea vertical (50%) */
}

/* Tarjeta interna */
.timeline__card {
  background-color: var(--color-border-subtle);
  /* Tono de tarjeta reutilizado de secciones previas */
  padding: 1.75rem 1.5rem;
  border-radius: 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease;
}

.timeline__card:hover {
  transform: translateY(-3px);
}

.timeline__icon {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 0.75rem;
}

.timeline__card-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--color-text-white);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.timeline__card-desc {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-text-soft);
  line-height: 1.6;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */

@media (max-width: 48rem) {

  /* 768px - Móviles y Tablets */
  .analysis__header {
    margin-bottom: 3rem;
  }

  .timeline::before {
    left: 1rem;
    transform: none;
  }

  .timeline__item--left,
  .timeline__item--right {
    left: 0;
    width: 100%;
    padding-left: 3rem;
    padding-right: 0;
    margin-bottom: 2rem;
  }

  .timeline__item--left::before,
  .timeline__item--right::before {
    left: 1rem;
    right: auto;
    width: 2rem;
  }

  .timeline__item--left::after,
  .timeline__item--right::after {
    left: calc(1rem - 3px);
    right: auto;
  }

  .timeline__card {
    padding: 1.5rem;
  }
}