 
#timelineLayout{
  width:100%;
  height:100vh;
  display:flex;
  flex-direction:column;
  margin-top: 240px;
}

/* SVG arriba */
#svgWrapper{
  position:absolute;
  top:-230px;
  left:0;
  width:100%;
  z-index:3;
  overflow-x:auto;
  overflow-y:hidden;
  scrollbar-width:none; /* Firefox */
}

#svgWrapper::-webkit-scrollbar{
  display:none;
}

/* escala el svg dentro */

#svgWrapper svg{
  height:100%;
  width:auto;
  min-width:4400px;  /* o 4600 si tu viewBox es 4600 */
}

/* slider abajo */

#eventSlider{
  height:80%;
  margin-bottom: 1rem;
}

.st0 {
  fill: none;
  stroke: url(#longPath_1_);
  stroke-width: 2.7079;
}

.st1 {
  fill: none;
  stroke: #fba440;
  stroke-width: 3;
  stroke-linecap: round;
}

.st2 {
  fill: #76C04F;
}

.st3 {
  fill: #f6fbff;
  stroke: #fba440;
  stroke-width: 1.8052;
}

.st4 {
  fill: url(#SVGID_1_);
}

.st5 {
  fill: #ffffff;
}

.st6 {
  fill: #847c7c;
}

.st7 {
  fill: #f85e3a;
}

.st8 {
  fill: #f6fbff;
  stroke: #f85e3a;
  stroke-width: 1.8052;
}

.st9 {
  fill: url(#SVGID_2_);
}

.st10 {
  fill: none;
  stroke: #f85e3a;
  stroke-width: 3;
  stroke-linecap: round;
}

.st11 {
  fill: #ea2f64;
}

.st12 {
  fill: #f6fbff;
  stroke: #ea2f64;
  stroke-width: 1.8052;
}

.st13 {
  fill: url(#SVGID_3_);
}

.st14 {
  fill: none;
  stroke: #ea2f64;
  stroke-width: 3;
  stroke-linecap: round;
}

.st15 {
  fill: #2d81c0;
}

.st15b {
  background: #2d81c0 !important;
}

.st16 {
  fill: #f6fbff;
  stroke: #2d81c0;
  stroke-width: 1.8052;
}

.st17 {
  fill: url(#SVGID_4_);
}

.st18 {
  fill-rule: evenodd;
  clip-rule: evenodd;
  fill: #847c7c;
}

.st19 {
  fill: none;
  stroke: #2d81c0;
  stroke-width: 3;
  stroke-linecap: round;
}

.st20 {
  fill: #76c04f;
}

.st21 {
  fill: #f6fbff;
  stroke: #76c04f;
  stroke-width: 1.8052;
}

.st22 {
  fill: url(#SVGID_5_);
}

.st23 {
  fill: none;
  stroke: #76c04f;
  stroke-width: 3;
  stroke-linecap: round;
}

.st24 {
  fill: #21cdc2;
}

.st25 {
  fill: #f6fbff;
  stroke: #21cdc2;
  stroke-width: 1.8052;
}

.st26 {
  fill: url(#SVGID_6_);
}

.st27 {
  fill: none;
  stroke: #847c7c;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.st28 {
  fill: none;
  stroke: #847c7c;
  stroke-width: 3;
  stroke-linecap: round;
}

.st29 {
  fill: none;
  stroke: #21cdc2;
  stroke-width: 3;
  stroke-linecap: round;
}

.st30 {
  fill: url(#SVGID_7_);
}

.st31 {
  fill: #b92fea;
}

.st32 {
  fill: #f6fbff;
  stroke: #b92fea;
  stroke-width: 2;
}

.st33 {
  fill: url(#SVGID_8_);
}

.st34 {
  fill: none;
  stroke: #b92fea;
  stroke-width: 3;
  stroke-linecap: round;
}

.st35 {
  fill: none;
  stroke: url(#dottedPath_1_);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 6, 6;
}
g[id^="group"] {
  -webkit-transition: all 1.3s ease-in-out;
  -moz-transition: all 1.3s ease-in-out;
  -o-transition: all 1.3s ease-in-out;
  transition: all 1.3s ease-in-out;
  opacity: 0;
  transform: translate(-20px, -100px) rotate(100deg);
  transform-box: fill-box;
  transform-origin: center;
}
g[id^="point"]:hover {
  cursor: pointer;
  transition: all 0.3s ease-in-out;
}
g[id^="point"]:hover g[id^="no"] * {
  cursor: pointer;
  transform: scale(1.7) !important;
  transform-origin: center;
}
g[id^="no"] {
  transition: all 0.3s ease-in-out;
  transform-box: fill-box;
  transform-origin: center;
  animation: zoomIn 0.6s ease-in forwards;
  transform: scale(0);
  animation-delay: 1.5s;
}

@keyframes zoomIn {
  70% {
    transform: scale(1.5);
  }
  100% {
    transform: scale(1);
  }
}

g[id^="point"] {
  transition: all 0.3s ease-in-out !important;
  transform-box: fill-box;
  transform-origin: center;
}

g[id^="point"]:hover g[id^="group"] * {
  transform: translateY(-15px) !important;
  transform-origin: center;
}

#group1 {
  animation: fadeDown 0.3s ease-in forwards;
  animation-delay: 0.3s;
}
#group2 {
  animation: fadeDown 0.5s ease-in forwards;
  animation-delay: 0.6s;
}
#group3 {
  animation: fadeDown 0.5s ease-in forwards;
  animation-delay: 0.7s;
}

#group4 {
  animation: fadeDown 0.5s ease-in forwards;
  animation-delay: 0.8s;
}
#group5 {
  animation: fadeDown 0.5s ease-in forwards;
  animation-delay: 0.9s;
}
#group6 {
  animation: fadeDown 0.5s ease-in forwards;
  animation-delay: 1s;
}
#group7 {
  animation: fadeDown 0.5s ease-in forwards;
  animation-delay: 1.1s;
}
#group8 {
  animation: fadeDown 0.5s ease-in forwards;
  animation-delay: 1.2s;
}

#group9 {
  animation: fadeDown 0.5s ease-in forwards;
  animation-delay: 1.3s;
}

#group10 {
  animation: fadeDown 0.5s ease-in forwards;
  animation-delay: 1.3s;
}

#group11 {
  animation: fadeDown 0.5s ease-in forwards;
  animation-delay: 1.3s;
}

#group12 {
  animation: fadeDown 0.5s ease-in forwards;
  animation-delay: 1.3s;
}

#group13 {
  animation: fadeDown 0.5s ease-in forwards;
  animation-delay: 1.3s;
}

#group14 {
  animation: fadeDown 0.5s ease-in forwards;
  animation-delay: 1.3s;
}

#group15 {
  animation: fadeDown 0.5s ease-in forwards;
  animation-delay: 1.3s;
}

@keyframes fadeDown {
  60% {
    opacity: 1;
    transform: translateY(-10px);
  }
  80% {
    opacity: 1;
    transform: translateY(-15px);
  }
  100% {
    opacity: 1;
    transform: translateY(0px);
  }
}

path#longPath {
  stroke-width: 3px;
  stroke-dasharray: 90;
  animation: DrawLine 2s ease-in-out forwards;
}
@keyframes DrawLine {
  100% {
    stroke-dasharray: 5000px;
    stroke-width: 10px;
    transform: translateY(0px);
  }
}

g[id^="group"] + path[class^="st"] {
  animation: DrawLineV 3s linear forwards;
  stroke-width: 0px;
  stroke-dasharray: 10px;
  animation-delay: 0.5s;
}
@keyframes DrawLineV {
  100% {
    stroke-dasharray: 120px;
    stroke-width: 5px;
    stroke-dasharray: 100px !important;
  }
}

[id^="text"] {
  transform: translateY(20px);
  transition: all 0.3s ease-in-out;
  opacity: 0;
}

@keyframes showText {
  50% {
    opacity: 1;
    transform: translateY(-10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0px);
  }
}
svg * {
  transform-box: fill-box;
  transition: all 0.3s ease-in-out;
}

#dottedPath {
  animation: otherTasks 2s linear forwards;
  animation-delay: 2s;
  opacity: 0;

  stroke-width: 7px;
  stroke-dasharray: 10px;
  stroke-dashoffset: 100;
}
@keyframes otherTasks {
  100% {
    opacity: 1;
    stroke-dashoffset: 40px;
    stroke-dasharray: 20px;
  }
}


.slide {
  display: none;
  text-align: center;
}

.slide.active {
  display: block;
}

.slide img {
  width: 200px;
  height: 200px;
  object-fit: cover;
  border-radius: 12px;
}

.slide h3 {
  margin: 10px 0 5px;
}

.slide p {
  color: #555;
}

#prevBtn,
#nextBtn {
  font-size: 40px;
  background: none;
  border: none;
  cursor: pointer;
}

#Layer_1 circle {
  pointer-events: none;
}

/*timeline*/

#miniTimeline{
  position:relative;
  width:50%;
  height:100%;
  z-index:2;
  display:flex;
  align-items:center;
  justify-content:center;
  pointer-events:auto;
}

#miniTimeline, #timelineContent{
  margin-top:180px;
}

#timelineBarWrapper {
  width: 90%;
}

#timelineBar {
  display: flex;
  justify-content: space-between;
  position: relative;
  padding: 20px 0 30px;
  border-bottom: 3px solid #ddd;
}

.tl-item {
  cursor: pointer;
  position: relative;
  color: #666;
  font-size: 14px;
}

.tl-item.active {
  color: #000;
  font-weight: bold;
}

.tl-dot {
  width: 12px;
  height: 12px;
  background: #f85e3a;
  border-radius: 50%;
  margin: 8px auto 0;
  opacity: .4;
}

.tl-item.active .tl-dot {
  opacity: 1;
}

/* Barra de progreso */

#timelineProgress {
  position: absolute;
  left: 0;
  bottom: -3px;
  height: 3px;
  background: #f85e3a;
  width: 0%;
  transition: width .5s ease;
}


#yearTracks{
  position: relative;
  height:120px;
  margin-top:20px;
}

.year-line{
  position:absolute;
  height:6px;
  background:#f85e3a;
  border-radius:4px;
}

#eventSlider{
  position:relative;     /* 👈 CRÍTICO */
  width:100%;
  height:480px;
  
  transform:none;
  display:flex;

}

/* imagen full */
#eventImage{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover;
}

/* degradado blanco → negro */
#eventGradient{
  position:absolute;
  inset:0;
  background:linear-gradient(
    to right,
    #ffffff 0%,
    rgba(255,255,255,.9) 30%,
    rgba(255,255,255,.6) 40%,
    rgba(0,0,0,.4) 60%,
    rgba(0,0,0,.75) 75%,
    #000 100%
  );
  z-index:1;
}

#timelineContent{
  position:relative;
  width:50%;
  padding:60px;
  color:#fff;
  z-index:2;
  display:flex;
  flex-direction:column;
  justify-content:center;
  pointer-events:none;
}

/* año */
#tlDate{
  color:#d4a024;
  font-size:26px;
  margin-bottom:12px;
}

/* titulo grande */
#tlTitle{
  font-size:48px;
  font-weight:800;
  line-height:1.05;
  margin-bottom:18px;
}

/* descripcion */
#tlDesc{
  opacity:.85;
  line-height:1.5;
  max-width:420px;
}

/* ================= ACTIVADOR DE ANIMACION ================= */

/* estado inicial: animaciones apagadas */
.timeline-paused g[id^="group"],
.timeline-paused g[id^="no"],
.timeline-paused #longPath,
.timeline-paused #dottedPath{
  animation:none !important;
  opacity:0;
}

#group16, #group17, #group18, #group19, #group20, #group21, #group22  {
  animation: fadeDown 0.5s ease-in forwards;
  animation-delay: 1.3s; /* o escalonado si quieres */
}

#group16 { animation: fadeDown .5s ease-in forwards; animation-delay: 1.35s; }
#group17 { animation: fadeDown .5s ease-in forwards; animation-delay: 1.45s; }
#group18 { animation: fadeDown .5s ease-in forwards; animation-delay: 1.55s; }
#group19 { animation: fadeDown .5s ease-in forwards; animation-delay: 1.65s; }
#group20 { animation: fadeDown .5s ease-in forwards; animation-delay: 1.75s; }
#group21 { animation: fadeDown .5s ease-in forwards; animation-delay: 1.85s; }
#group22 { animation: fadeDown .5s ease-in forwards; animation-delay: 1.95s; }

/* ===========================
   timelineContent RESPONSIVO
   Desktop: igual
   Móvil: baja tipografía/padding
=========================== */

/* Desktop / base (se queda como lo tienes) */
/* NO CAMBIES tus reglas actuales de #timelineContent, #tlDate, #tlTitle, #tlDesc */

/* Tablet */
@media (max-width: 992px){
  #timelineContent{
    padding: 40px;          /* antes 60px */
  }

  #tlDate{
    font-size: 20px;        /* antes 26px */
    margin-bottom: 10px;
  }

  #tlTitle{
    font-size: 34px;        /* antes 48px */
    line-height: 1.1;
    margin-bottom: 14px;
  }

  #tlDesc{
    font-size: 14px;        /* agrega tamaño explícito */
    line-height: 1.45;
    max-width: 100%;        /* en móvil no limites a 420 */
  }
}

/* Móvil */
@media (max-width: 576px){
  #timelineContent{
    padding: 18px;          /* reduce espacio */
  }

  #tlDate{
    font-size: 16px;
  }

  #tlTitle{
    font-size: 26px;
    line-height: 1.05;
  }

  #tlDesc{
    font-size: 13px;
  }
}

/* Móvil chico (muy angosto) */
@media (max-width: 400px){
  #tlTitle{ font-size: 22px; }
  #tlDesc{ font-size: 12px; }
}

/* ======================================
   Mini timeline - Mejor separación móvil
====================================== */
@media (max-width: 768px){

  #timelineBarWrapper{
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  #timelineBar{
    justify-content: flex-start; /* quitamos space-between */
    gap: 28px;                   /* espacio entre años */
    min-width: max-content;      /* que no se comprima */
  }

  .tl-item{
    flex: 0 0 auto;              /* no permitir que se encojan */
    min-width: 50px;             /* ancho mínimo por año */
    text-align: center;
    font-size: 9px;             /* opcional: un poco más pequeño */
  }

  .tl-dot{
    margin-top: 6px;
  }
}



@media (max-width: 1600px){

  #timelineBarWrapper{
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  #timelineBar{
    justify-content: flex-start; /* quitamos space-between */
    gap: 5px;                   /* espacio entre años */
    min-width: max-content;      /* que no se comprima */
  }

  .tl-item{
    flex: 0 0 auto;              /* no permitir que se encojan */
    min-width: 20px;             /* ancho mínimo por año */
    text-align: center;
    font-size: 11px;             /* opcional: un poco más pequeño */
  }

  .tl-dot{
    margin-top: 6px;
  }
}