/* timeline.css - estilos completos */

/* Reseteos mínimos */

/* Wrapper (posición relativa para las flechas fijas) */

.timeline-wrapper {
  position: relative;
  max-width: 1100px;
  margin: 0px auto;
}

/* Contenedor que "muestra" y oculta overflow */

.timeline-container {
  overflow: hidden;
  white-space: nowrap;
  border: 1px solid #ddd;
  height: 800px;
  padding: 315px 0;
  position: relative;
  background: #fff;
}

/* Timeline (el contenido que se desplaza con container.scrollLeft) */

.timeline {
  display: inline-flex;
  position: relative;
  padding: 60px 0;
}

/* Línea gris (dibujo) */

.timeline::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: calc((180px + 60px) * 20.5 + 160px);
  height: 4px;
  background: #a98b5b;
  transform: translateY(-50%);
  z-index: 0;
}

/* Barra azul de progreso */

.scroll-progress {
  position: absolute;
  top: 50%;
  left: 0;
  height: 4px;
  background: #007bff;
  transform: translateY(-50%);
  z-index: 2;
  width: 0;
  transition: width 0.12s linear;
  pointer-events: none;
}

/* Paso (step) */

.timeline-step {
  position: relative;
  flex: 0 0 180px;
  margin: 0 30px;
  text-align: center;
  z-index: 3;
  transition: transform 0.25s ease, z-index 0s;
}

/* Hover - zoom */

.timeline-step:hover {
  transform: scale(1.07);
  z-index: 50;
}

/* Dot (círculo) */

.timeline-step .dot {
  width: 24px;
  height: 24px;
  background: #29306e;
  border: 4px solid #a98b5b;
  border-radius: 50%;
  margin: 0 auto;
  transition: all 0.25s ease;
}

.timeline-step.active .dot {
  border-color: #007bff;
  box-shadow: 0 0 0 6px rgba(0,123,255,0.15);
  background: #fff;
}

/* Contenido (imagen + texto) */

.timeline-step .content {
  width: 140px;
  font-size: 0.9rem;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

/* Imágenes */

.timeline-step .content img {
  max-width: 100%;
  height: auto;
  display: block;
  cursor: zoom-in;
  border-radius: 4px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

/* Alternar arriba/abajo */

.timeline-step:nth-child(odd) .content {
  top: 50%;
  transform: translate(-50%, -120%);
}

.timeline-step:nth-child(even) .content {
  top: 50%;
  transform: translate(-50%, 20%);
}

/* MODAL / LIGHTBOX */

.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.75);
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal[aria-hidden="false"] {
  display: flex;
}

.modal-content-wrap {
  max-width: 95%;
  max-height: 95%;
  display: flex;
  gap: 20px;
  justify-content: center;
  align-items: center;
}

.modal img {
  width: 800px;
  height: auto;
  max-height: 80vh;
  border-radius: 4px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.6);
}

.modal-caption {
  margin-top: 12px;
  color: #fff;
  font-size: 0.95rem;
}

/* Botón cerrar modal */

.modal-close {
  position: absolute;
  top: -10px;
  right: -10px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  color: #fff;
  border: none;
  font-size: 28px;
  cursor: pointer;
  z-index: 2100;
}

/* Párrafo dentro de la tarjeta */

.timeline-step .content p {
  width: 330px;
  padding: 15px;
  background-color: #ffffff;
  border: 1px solid #ddd;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  white-space: normal;
  word-wrap: break-word;
  overflow-wrap: break-word;
  line-height: 1.5;
  overflow-y: auto;
  margin: 0;
}

/* Flechas fijas */

.scroll-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 28px;
  line-height: 1;
  color: #222;
  background: rgba(255,255,255,0.95);
  border: 1px solid rgba(0,0,0,0.06);
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  z-index: 999;
  box-shadow: 0 6px 18px rgba(0,0,0,0.06);
  user-select: none;
}

.scroll-arrow.left {
  left: -60px;
}

.scroll-arrow.right {
  right: -60px;
}

/* Mobile adjustments */

@media (max-width: 700px) {
  .timeline-wrapper {
    padding: 0 20px;
  }
}

@media (max-width: 700px) {
  .scroll-arrow.left {
    left: 8px;
    top: calc(50% - 10px);
    transform: none;
  }
}

@media (max-width: 700px) {
  .scroll-arrow.right {
    right: 8px;
    top: calc(50% - 10px);
    transform: none;
  }
}

@media (max-width: 700px) {
  .timeline-step .content img {
    width: 100px;
    height: 60px;
  }
}

.timeline-step .content h4 {
  margin: 0 0 5px 0;
  font-weight: bold;
  font-size: 1rem;
}

.timeline-step .content img {
  width: 150px;
  height: 110px;
  object-fit: cover;
  display: block;
  border-radius: 4px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  cursor: zoom-in;
}

.modal-content-wrap.fullsize img {
  width: auto;
  height: auto;
  max-width: 95%;
  max-height: 95vh;
  display: block;
  margin: 0 auto;
}

/* Ajuste de modal para 1 o 2 imágenes sin scroll */

.modal-content-wrap.fullsize {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  max-width: 100%;
  max-height: 100%;
}

.modal-content-wrap.fullsize img {
  width: auto;
  height: auto;
  max-width: 95vw;    /* ocupa hasta el 95 % del ancho visible */
  max-height: 90vh;   /* un poco más alta que antes */
  object-fit: contain;
  display: block;
  border-radius: 4px;
  box-shadow: none;   /* elimina la sombra que puede parecer borde gris */
  background-color: #fff; /* opcional: da fondo blanco al logo */
}


/* Imágenes verticales o logos con fondo limpio */
.timeline-step .content img[style*="object-fit: contain"] {
  background-color: #fff;   /* fondo blanco sólido */
  border: none;             /* sin borde */
  box-shadow: none !important; /* elimina sombra gris */
  padding: 0;
}
