body,
#smooth-wrapper {
  background-color: #ffffff !important;
}

#smooth-content {
  max-width: 1920px;
  margin: 0 auto;
  position: relative;
  background-color: #ffffff;
}

.banner-titulo {
  position: relative;
  height: 100vh;
  padding: 0;
  overflow: hidden;
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(-50vw + 50%);
  background-color: #ffffff;
}

.banner-titulo > .row {
  width: 100%;
  max-width: 1920px;
  margin: 0 auto;
  height: 100vh;
  position: relative;
  overflow: hidden;
}

.banner-titulo > .row > .col-12 {
  padding-left: 0;
  padding-right: 0;
}

@media (min-width: 1921px) {
  .banner-titulo > .row {
    -webkit-mask-image: linear-gradient(
      to right,
      transparent 0%,
      black 35%,
      black 65%,
      transparent 100%
    );
    mask-image: linear-gradient(
      to right,
      transparent 0%,
      black 35%,
      black 65%,
      transparent 100%
    );
  }

  .slide-dos .foto-uno {
    width: 80% !important;
  }

  .slide-tres .foto-dos {
    width: 45% !important;
  }

  .slide-tres .foto-tres {
    width: 55% !important;
  }

  .linea-blanca-sobre-roja {
    top: 55% !important;
  }
}

.banner-fondo {
  height: 100vh;
  position: relative;
  width: 100%;
}
.banner-fondo img {
  width: 100%;
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  z-index: 1;
}

.banner-texto {
  position: absolute;
  left: 50%;
  top: 36%;
  transform: translate(-50%, -50%);
  opacity: 0;
  z-index: 5;
}

.banner-texto h1 {
  color: #e50013;
  font-weight: bold;
  font-size: 9rem;
  line-height: 1;
  text-align: center;
}

.banner-texto h1 span {
  font-size: 1.3em;
}
.banner-camiones {
  height: 100%;
}
.banner-camiones img {
  width: 100%;
  position: absolute;
  bottom: 0;
  opacity: 0;
  transform-origin: bottom center;
  z-index: 10;
}

@media screen and (max-height: 799px) {
  .banner-camiones img {
    bottom: -7%;
  }
}

@media screen and (min-aspect-ratio: 2/1) {
  .banner-camiones img {
    width: 100%;
    scale: 1 !important;
    bottom: -10%;
  }
}

.banner-wave {
  position: relative;
  display: block;
  bottom: 0;
  left: 0;
  width: 100%;
  height: auto;
  z-index: 15;
  margin-top: -26.2%;
  pointer-events: none;
  transform: translateY(26.2%);
  clip-path: inset(0 100% 0 0);
  animation: waveRevealBanner 3s cubic-bezier(0.25, 1, 0.5, 1) 0.5s forwards;
}

@keyframes waveRevealBanner {
  0% {
    clip-path: inset(0 100% 0 0);
  }
  100% {
    clip-path: inset(0 0 0 0);
  }
}

.seccion-historia {
  position: relative;
  height: 100vh;
  padding: 0;
  overflow: hidden;
  background-color: #ffffff;
}

.seccion-historia > .row {
  width: 100%;
}

.historia-fondo {
  height: 100vh;
}

.historia-fondo > .fondo-opacidad {
  width: 100%;
  position: absolute;
  height: 100%;
  left: 0;
  top: 5%;
}

.historia-fondo > .circulo-vacio {
  position: absolute;
  width: 20%;
  /*width: 35%;*/
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
.seccion-historia .contenedor-texto-uno {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #ffffff;
  font-weight: 800;
  font-family: Arial;
  letter-spacing: 3px;
}
.texto-anio {
  opacity: 0;
}

.texto-historia {
  opacity: 0;
}
.contenedor-texto-uno p {
  transform: scaleY(1.4);
  font-size: 11em;
  padding-right: 18px;
}

.seccion-historia .contenedor-texto-dos {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #ffffff;
  font-weight: 600;
  font-family: Arial;
  letter-spacing: 2px;
  width: 31%;
  text-align: center;
}

.contenedor-texto-dos p {
  transform: scaleY(1.2);
  -webkit-font-smoothing: antialiased;
  font-size: 1.3rem;
}

.contenedor-mision-vision {
  height: 100vh;
  /*margin-top: 2%;*/
  position: relative;
  padding: 0;
  width: 100%;
}

.contenedor-mision-vision .row {
  align-items: center;
  align-content: center;
  height: 100%;
  justify-content: center;
  width: 100%;
  margin: 0;
}

.video-fondo {
  position: absolute;
  z-index: -1;
  padding: 0;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.vision-animacion,
.mision-animacion {
  opacity: 0;
}

.vision-texto {
  transform: translateY(-35%);
  margin: auto;
  width: 80%;
}

.mision-texto {
  transform: translateY(35%);
  margin: auto;
  width: 80%;
}

.contenedor-mision-vision h3 {
  font-family: Arial;
  font-weight: 800;
  -webkit-font-smoothing: antialiased;
  transform: scaleY(1.18);
  color: #ffffff;
  letter-spacing: 1px;
  padding-bottom: 25px;
  font-size: 3rem;
}

.contenedor-mision-vision p {
  font-family: Arial;
  font-weight: 100;
  -webkit-font-smoothing: antialiased;
  color: #ffffff;
  letter-spacing: 1.5px;
  font-size: 0.85rem;
}

.contenedor-mision-vision .linea-media {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -47%);
  height: 50%;
}

.contenedor-informativo {
  height: 100vh;
  position: relative;
  overflow: hidden;
  background-color: #ffffff;
}

.contenedor-informativo .row {
  align-items: center;
  align-content: center;
  justify-content: center;
  height: 100%;
}

.contenedor-informativo {
  font-family: Arial;
  -webkit-font-smoothing: antialiased;
  font-weight: 100;
}

.contenedor-informativo h4 {
  color: #e50013;
}

.contenedor-informativo h4 span,
.contenedor-informativo p {
  color: #131314;
  font-size: 1.4rem;
}

.contenedor-informativo .premio-aftersales {
  width: 50%;
}

.fill-rate-contenedor {
  position: absolute !important;
  bottom: 0 !important;
  left: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  width: auto !important;
}

.contenedor-informativo .fill-rate {
  width: 40vw; /* Tamaño adaptable */
  max-width: 600px;
  display: block;
  margin: 0;
  padding: 0;
  /* Eliminamos los transform manuales ya que los controlaremos con GSAP */
}

.premio-animacion,
.premio-imagen-animacion,
.fill-animacion,
.fill-imagen-animacion {
  opacity: 0;
}

.premio-animacion,
.fill-imagen-animacion {
  transform: translateX(-40%);
}

.premio-imagen-animacion,
.fill-animacion {
  transform: translateX(40%);
}

.contenedor-carrusel {
  height: 100vh;
  max-width: 100%;
  background-color: #131314;
  width: 100%;
  padding: 0;
  position: relative;
  overflow: hidden; /* Added to hide horizontal overflow */
}

.contenedor-carrusel .row {
  width: 100%;
  height: 100%;
  margin: 0;
}

.contenedor-slider {
  display: flex;
  flex-wrap: nowrap;
  width: max-content;
  height: 100%;
  padding: 0;
}

.contenedor-slider > div {
  width: 90vw; /* Simulates centerPadding by leaving 10vw for the next slide */
  height: 100%;
  flex-shrink: 0;
}

.contenedor-carrusel .row .slide-uno {
  width: 90%;
  height: 100%;
  object-fit: cover;
}

.barra-progreso {
  display: block;
  width: 100%;
  height: 2px !important;
  border-radius: 10px;
  overflow: hidden;
  background-color: #fff;
  background-image: linear-gradient(to right, #e50013, #e50013);
  background-repeat: no-repeat;
  background-size: 0 100%;
  transition: background-size 0.02s ease-in-out;
  position: absolute;
  bottom: 10%;
  width: 80%;
  left: 10%;
}
.slide-dos {
  position: relative;
  border-right: 1px solid #fff;
}

.slide-dos .placa-uno {
  width: 80%;
  transform: translateX(-30%);
}

.slide-dos .titulo-linea {
  font-family: Arial;
  font-weight: 600;
  font-size: 2.8rem;
  color: #fff;
  transform: translate(20%, 40%);
  white-space: nowrap;
  width: max-content;
}
.slide-dos .foto-uno {
  width: 140%;
  transform: translateX(-30%);
}

.slide-dos .anio-uno {
  font-family: Arial;
  font-weight: 800;
  font-size: 14rem;
  color: #2b2b2b;
  transform: scale(1.5) translateX(25%);
}

.slide-dos .descripcion-uno {
  width: 55%;
  color: #ffffff;
  font-family: Arial;
  font-weight: 100;
  font-size: 0.9rem;
  transform: translate(25%, 0%);
  -webkit-font-smoothing: antialiased;
  letter-spacing: 1.1px;
}

.slide-dos .linea-roja {
  width: 45%;
  position: absolute;
  top: 68%;
  right: -1px;
}

.slide-dos .texto-linea-roja {
  color: #ffffff;
  position: absolute;
  width: 25%;
  right: 15%;
  top: 69%;
  margin: 0;
}

.slide-tres .linea-blanca-sobre-roja {
  position: absolute;
  left: -15%;
  width: 31%;
  top: 48%;
  z-index: 10;
}
.slide-tres .bamboo-svg {
  right: 40%;
  position: absolute;
  bottom: 5%;
  width: 20%;
}
.slide-tres {
  background-color: #e62e2d;
  position: relative;
  z-index: 10;
}

.slide-tres::before,
.slide-cuatro::before,
.slider-cinco-flex::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url("../images/historia/historia-background-red.png");
  background-size: cover;
  background-position: center;
  opacity: 0.7;
  pointer-events: none;
}

.slide-tres .foto-dos {
  width: 85%;
  transform: translate(-20%, 0%);
}

.slide-tres .foto-tres {
  width: 85%;
  transform: translate(0%, -35%);
  position: relative;
  z-index: 20;
}

.slide-tres .titulo-dos-linea {
  font-family: Arial;
  font-weight: 600;
  letter-spacing: 1.1px;
  color: #ffffff;
  font-size: 2.8rem;
  width: max-content;
  position: absolute;
  top: 10%;
  left: 50%;
  transform: translate(-60%, -10%);
}

.slide-tres .placa-flores {
  position: absolute;
  bottom: 0;
  width: 2.5%;
  left: 50%;
  transform: translateX(-50%);
}

.slide-tres .anio-dos {
  color: #0d0d0d;
  font-family: Arial;
  font-weight: 600;
  font-size: 10rem;
  transform: scale(1.2) translate(45%, 35%);
  opacity: 0.4;
}

.slide-tres .descripcion-dos {
  color: #ffffff;
  font-family: Arial;
  font-weight: 100;
  margin: 0;
  transform: translate(55%, 40%);
  width: 65%;
  font-size: 0.85rem;
}

.slide-tres .union-linea {
  position: absolute;
  top: 35%;
  width: 3%;
  left: 51%;
  transform: translate(-51%, -35%);
}

.slide-tres .union-linea-dos {
  position: absolute;
}

.slide-tres .anio-tres {
  color: #0d0d0d;
  font-family: Arial;
  font-weight: 600;
  font-size: 10rem;
  transform: scale(1.2) translate(65%, 25%);
  opacity: 0.4;
}

.slide-tres .descripcion-tres {
  color: #ffffff;
  font-family: Arial;
  font-weight: 100;
  margin: 0;
  transform: translate(70%, 10%);
  width: 65%;
  font-size: 0.85rem;
}

.slide-cuatro {
  background-color: #e62e2d;
  height: 100%;
  position: relative;
}

.slide-cuatro .imagen-clic {
  width: 180%;
  max-width: none;
}

.slide-cuatro .slide-cuatro-contenedor {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.slide-cuatro .slider-imegen-cuatro {
  width: 80%;
}

.slide-cuatro .slide-cuatro-texto {
  font-family: Arial;
  font-weight: 100;
  color: #ffffff;
  -webkit-font-smoothing: antialiased;
  font-size: 1.3rem !important;
}

.slide-cuatro .placa-flor {
  position: absolute;
  top: 0;
  right: 10%;
  width: 28%;
}

.slider-cinco .placa-flor-dos {
  position: absolute;
  width: 10%;
  left: -3%;
  z-index: 10;
}

.slider-cinco {
  position: relative;
  background-color: #e62e2d;
  height: 100%;
}

.slider-cinco-fondo {
  position: absolute;
  width: 100%;
  height: 100%;
}

.slider-cinco-flex {
  display: inline-flex;
  align-items: center;
  align-content: center;
  justify-content: center;
  position: relative;
  width: 100vw !important;
}

.slide-cinco-texto {
  align-items: center;
  align-content: center;
  justify-content: center;
  position: relative;
}

.titulo-serie-bus,
.titulo-motores-industrias {
  font-family: Arial;
  font-weight: 800;
  font-size: 2.8rem;
}

.texto-serie-bus,
.texto-motores-industrias {
  font-family: Arial;
  font-weight: 100;
  font-size: 1.1rem;
  -webkit-font-smoothing: antialiased;
}

.contenedor-series-bus {
  transform: translate(-20%, -10%);
}

.contenedor-motores-industrias {
  transform: translateY(15%);
}

.contenedor-carrusel p,
.contenedor-carrusel .descripcion-uno,
.contenedor-carrusel .descripcion-dos,
.contenedor-carrusel .descripcion-tres,
.contenedor-carrusel .slide-cuatro-texto p,
.contenedor-carrusel .texto-linea-roja,
.contenedor-mision-vision p {
  font-size: 1.3rem !important;
}

@media screen and (max-width: 768px) {
  .banner-texto h1 {
    font-size: 3rem;
  }

  .banner-camiones img {
    bottom: 0;
    left: -30%;
    width: 170%;
  }

  .historia-fondo > .circulo-vacio {
    width: 30%;
  }

  .contenedor-texto-uno p {
    font-size: 5rem;
  }

  .contenedor-carrusel {
    display: none !important;
  }

  /* NUEVA SECCIÓN MÓVIL (Reemplazo del carrusel) */
  .seccion-carrusel-mobile {
    height: 100vh;
    width: 100%;
    overflow: hidden; /* Ocultamos overflow para que GSAP haga su magia */
  }

  .slider-mobile-wrapper {
    display: flex;
    height: 100%;
    width: max-content;
    will-change: transform;
  }

  .slider-mobile-wrapper > div {
    width: 150vw;
    height: 100vh;
    flex-shrink: 0;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2rem;
  }

  /* Slide 1 */
  .slide-uno-m {
    padding: 0 !important;
    background-color: #141414;
    position: relative;
  }
  .slide-uno-m img {
    position: relative;
    z-index: 20;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: right;
  }

  /* Slide 2 */
  .slide-dos-m {
    background-color: #141414;
  }
  .linea-roja-m {
    position: absolute;
    bottom: 14%;
    width: 50%;
    height: 60px;
    z-index: 15;
    left: 0;
    object-fit: cover;
    object-position: left;
  }
  .texto-linea-roja-m {
    position: absolute;
    bottom: calc(13% + 15px);
    left: 5%;
    width: 40%;
    color: #fff;
    font-size: 0.8rem;
    z-index: 15;
    margin: 0;
  }
  .foto-uno-m {
    position: absolute;
    top: 35%;
    transform: translateY(-50%);
    left: -15%;
    width: 60%;
    z-index: 10;
  }
  .titulo-linea-m {
    position: absolute;
    top: 15%;
    left: 0;
    width: 100%;
    color: #fff;
    text-align: center;
    font-size: 2rem;
    font-weight: bold;
    text-transform: uppercase;
    z-index: 20;
  }
  .bloque-texto-m {
    position: absolute;
    top: 20%;
    bottom: 0;
    margin-top: auto;
    margin-bottom: auto;
    height: fit-content;
    transform: translateX(50%);
    width: 70vw;
    z-index: 20;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
  }
  .anio-uno-m {
    color: #2b2b2b;
    font-size: 8rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 0;
    text-align: center;
  }
  .descripcion-uno-m {
    color: #fff;
    font-size: 0.9rem;
    line-height: 1.6;
    margin-top: 10px;
    text-align: center;
  }

  /* Slide 3 y 4 */
  .slide-tres-m {
    background-color: #e62e2d;
    position: relative;
    z-index: 25;
  }
  .slide-cuatro-m {
    background-image: url("../images/historia/historia-background-red.png");
    background-size: cover;
    background-position: center;
    position: relative;
    z-index: 20;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0 10%;
  }
  .imagen-clic-m {
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    z-index: 10;
  }
  .contenedor-camion-cuatro-m {
    width: 35%;
    position: relative;
    margin-bottom: 20px;
    z-index: 10;
  }
  .slider-imegen-cuatro-m {
    width: 100%;
    height: auto;
    display: block;
  }
  .contenedor-texto-flores-m {
    position: relative;
    max-width: 80vw;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 10;
  }
  .slide-cuatro-texto-m {
    color: #fff;
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0;
  }
  .flores-row-m {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 10%;
    width: 100%;
  }
  .placa-flor-m {
    width: 25%;
    transform: rotate(-10deg);
  }
  .placa-flor-dos-m {
    width: 35%;
    transform: rotate(15deg);
  }
  /* Slide 5 */
  .slide-cinco-m {
    background-image: url("../images/historia/historia-background-red.png");
    background-size: cover;
    background-position: center;
    position: relative;
    z-index: 20;
    width: 200vw !important;
    padding: 0 !important;
    display: flex;
    align-items: center;
  }
  .slider-cinco-fondo-m {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100vh;
    object-fit: cover;
    object-position: left center;
    z-index: 1;
  }
  .columnas-cinco-m {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: row;
    width: 100%;
    height: 100%;
    align-items: center;
  }
  .columna-vacia-m {
    width: 20%;
    flex-shrink: 0;
  }
  .columna-texto-m {
    width: 40%;
    flex-shrink: 0;
    padding: 0 3%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
  }
  .titulo-cinco-m {
    font-family: Arial, sans-serif;
    font-weight: 800;
    font-size: 2rem;
    color: #000;
    margin-bottom: 20px;
  }
  .texto-cinco-m {
    color: #000;
    font-size: 0.9rem;
    line-height: 1.6;
  }
  .bamboo-svg-m {
    position: absolute;
    bottom: -30%;
    right: -15%;
    z-index: 30;
    width: 30%;
    height: auto;
  }
  .slide-tres-m::before,
  .slide-cuatro-m::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("../images/historia/historia-background-red.png");
    background-size: cover;
    background-position: center;
    opacity: 0.7;
    pointer-events: none;
    z-index: 0;
  }
  .foto-dos-m,
  .foto-tres-m {
    position: absolute;
    transform: translateY(-50%);
    width: 65%;
    z-index: 10;
  }
  .foto-dos-m {
    top: 40%;
    left: -30%;
  }
  .foto-tres-m {
    top: 66%;
    left: -5%;
  }

  .bloque-texto-tres-m {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    right: 0;
    height: fit-content;
    width: 80vw;
    z-index: 20;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
  }
  .titulo-dos-linea-m {
    position: absolute;
    top: 10%;
    right: 0;
    width: 80vw;
    color: #fff;
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1.2;
    text-align: center;
    text-transform: uppercase;
    z-index: 20;
  }
  .anio-dos-m,
  .anio-tres-m {
    color: #2b2b2b;
    font-size: 4rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 0;
    text-align: center;
    opacity: 0.6;
  }
  .descripcion-dos-m,
  .descripcion-tres-m {
    color: #fff;
    font-size: 0.9rem;
    line-height: 1.6;
    margin-top: 10px;
    margin-bottom: 30px;
    text-align: center;
  }

  .seccion-historia .contenedor-texto-dos {
    width: 40%;
  }

  .contenedor-texto-dos p {
    font-size: 0.8rem;
  }

  .contenedor-mision-vision .linea-media {
    left: 0;
    transform: translateY(-50%) rotate(270deg);
    height: 35%;
  }
  .premio-animacion {
    order: 2;
  }
  .premio-imagen-animacion {
    order: 1;
  }
}

.carrusel-historia-mx {
  width: 100%;
  height: 100vh;
  position: relative;
  overflow: hidden;
  background-color: #000;
  z-index: 1;
}

.titulo-historia-mx {
  position: absolute;
  top: 3%;
  left: 50%;
  transform: translateX(-50%);
  font-size: 4.3rem;
  color: #fff;
  text-align: center;
  z-index: 15;
  pointer-events: none;
  opacity: 0;
}

.texto-historia-mx {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  text-align: center;
  font-size: 1.2rem;
  width: 80%;
  z-index: 25;
  pointer-events: none;
  opacity: 0; /* starts hidden */
}

.texto-historia-mx span {
  background-color: #fff;
  color: #d80516;
  padding: 0 5px;
  font-weight: bold;
}

#canvas-historia-mx {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}


#year-historia-mx {
  position: absolute;
  top: 5%;
  left: 50%;
  transform: translateX(-50%) scale3d(1.9, 1.9, 1.9);
  font-size: 15rem;
  font-weight: 900;
  color: rgba(0, 0, 0, 0.3);
  margin: 0;
  z-index: 10;
  pointer-events: none;
}

#first-layer-mx {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 20;
  pointer-events: none;
}

.paper-corner {
  position: absolute;
  z-index: 999;
  pointer-events: none;
  width: 30vw; /* Tamaño sugerido, ajustable si es necesario */
  max-width: 400px;
}

.paper-corner.top-right {
  top: -40%;
  right: -15%;
}

.paper-corner.bottom-left {
  bottom: -30%;
  left: -15%;
  transform: rotate(-20deg);
}

.historia-mx-slide {
  position: absolute;
  top: 100%; /* Empieza escondido abajo */
  left: 0;
  width: 100%;
  height: 100vh;
  display: flex;
  overflow: hidden;
  background-color: #000;
  z-index: 30; /* Por encima del canvas y los textos */
}

.slide-col-left {
  width: 50%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  z-index: 1; /* Para que la columna derecha pase por encima */
}

.slide-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.slide-img.next-img,
.slide-img.next-img-2 {
  top: 100%; /* Empieza fuera por abajo */
}

.slide-col-right {
  width: 50%;
  height: 100%;
  background-color: #161616;
  position: relative;
  /* overflow: hidden; -> Eliminado para que los puntos puedan sobresalir hacia la izquierda */
  z-index: 5;
}

.timeline-static-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  z-index: 10;
  pointer-events: none;
}

.timeline-content-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden; /* Agregado aquí para que los slides no se salgan, pero los puntos sí */
}

.timeline-content-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.timeline-content-slide.slide-white,
.timeline-content-slide.slide-step-3 {
  top: 100%; /* Empieza fuera por abajo */
}

.timeline-content-slide.slide-white {
  background-color: #ffffff;
}

.timeline-content-slide.slide-white .timeline-bg-year {
  color: rgba(0, 0, 0, 0.05); /* Año en fondo blanco debe ser gris oscuro */
}

.timeline-content-slide.slide-white .timeline-text {
  color: #161616; /* Texto negro en fondo blanco */
}

.highlight-red {
  background-color: #e4051e;
  color: #ffffff;
  padding: 0 4px; /* Un poco de respiro al fondo */
}

.timeline-row {
  display: flex;
  align-items: center;
  position: relative;
  flex: 1; /* Distribuye el espacio de las 3 filas por igual */
  padding-left: 80px; /* Espacio para la línea y el punto */
  padding-right: 40px;
}

.timeline-dot {
  position: absolute;
  left: -10px; /* 10px hacia afuera para que la mitad quede sobre la imagen izquierda */
  top: 40%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: #161616;
  border: 4px solid #d80516; /* Rojo Isuzu */
  z-index: 5;
}

.timeline-line {
  position: absolute;
  left: 10px; /* Sale desde el borde derecho del punto */
  top: 40%;
  transform: translateY(-50%);
  width: 60px; /* Largo de la línea horizontal */
  height: 2px;
  background-color: #d80516;
  z-index: 4;
}

.timeline-bg-year {
  position: absolute;
  left: 60px; /* Detrás del texto */
  top: 35%;
  transform: translateY(-50%);
  font-size: 10vw; /* Texto gigante */
  font-weight: 900;
  color: rgba(255, 255, 255, 0.05); /* Muy translúcido */
  z-index: 1;
  pointer-events: none;
}

.timeline-text {
  position: relative;
  z-index: 2;
  color: #fff;
  font-size: 0.9rem;
  line-height: 1.1;
  margin: 0;
  top: 10%;
  max-width: 400px;
}

/* Anchos personalizados para las líneas rojas de la línea de tiempo */
.timeline-row:nth-child(1) .timeline-line,
.timeline-row:nth-child(3) .timeline-line {
  width: 40px;
}

.timeline-row:nth-child(2) .timeline-line {
  width: 30%;
}

.timeline-row:nth-child(2) .timeline-bg-year {
  left: 35%;
}

.timeline-row:nth-child(2) .timeline-text {
  left: 15%;
}

/* --- MOBILE SMALL --- */
@media screen and (max-width: 376px) {
  .bloque-texto-m {
    top: auto;
    bottom: 5%;
    margin-top: 0;
    margin-bottom: 0;
  }
}

@media screen and (max-width: 768px) {
  .historia-fondo > .fondo-opacidad {
    object-fit: cover !important;
  }
  .linea-media {
    display: none !important;
  }
  .contenedor-mision-vision {
    height: 100vh !important;
    padding: 10% 0 !important;
    overflow: hidden;
  }
  .vision-texto,
  .mision-texto {
    transform: none !important;
    margin-bottom: 8%;
    width: 95%;
    text-align: center;
  }
  .contenedor-mision-vision h3 {
    font-size: 2rem !important;
    padding-bottom: 10px !important;
    margin-bottom: 5px;
  }
  .contenedor-mision-vision p {
    font-size: 0.95rem !important;
    line-height: 1.4 !important;
  }
  .fill-animacion {
    order: 4;
  }
  .fill-imagen-animacion {
    display: none !important;
  }
  .contenedor-informativo p,
  .contenedor-informativo span {
    font-size: 0.9rem !important;
  }
  .premio-animacion,
  .fill-imagen-animacion,
  .premio-imagen-animacion,
  .fill-animacion {
    transform: translateX(0) !important;
  }
  .premio-imagen-animacion {
    text-align: center;
  }
  height: 100%;
  display: flex;
  flex-direction: column;
  z-index: 10;
  pointer-events: none;
}

.timeline-content-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden; /* Agregado aquí para que los slides no se salgan, pero los puntos sí */
}

.timeline-content-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.timeline-content-slide.slide-white,
.timeline-content-slide.slide-step-3 {
  top: 100%; /* Empieza fuera por abajo */
}

.timeline-content-slide.slide-white {
  background-color: #ffffff;
}

.timeline-content-slide.slide-white .timeline-bg-year {
  color: rgba(0, 0, 0, 0.05); /* Año en fondo blanco debe ser gris oscuro */
}

.timeline-content-slide.slide-white .timeline-text {
  color: #161616; /* Texto negro en fondo blanco */
}

.highlight-red {
  background-color: #e4051e;
  color: #ffffff;
  padding: 0 4px; /* Un poco de respiro al fondo */
}

.timeline-row {
  display: flex;
  align-items: center;
  position: relative;
  flex: 1; /* Distribuye el espacio de las 3 filas por igual */
  padding-left: 80px; /* Espacio para la línea y el punto */
  padding-right: 40px;
}

.timeline-dot {
  position: absolute;
  left: -10px; /* 10px hacia afuera para que la mitad quede sobre la imagen izquierda */
  top: 40%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: #161616;
  border: 4px solid #d80516; /* Rojo Isuzu */
  z-index: 5;
}

.timeline-line {
  position: absolute;
  left: 10px; /* Sale desde el borde derecho del punto */
  top: 40%;
  transform: translateY(-50%);
  width: 60px; /* Largo de la línea horizontal */
  height: 2px;
  background-color: #d80516;
  z-index: 4;
}

.timeline-bg-year {
  position: absolute;
  left: 60px; /* Detrás del texto */
  top: 35%;
  transform: translateY(-50%);
  font-size: 10vw; /* Texto gigante */
  font-weight: 900;
  color: rgba(255, 255, 255, 0.05); /* Muy translúcido */
  z-index: 1;
  pointer-events: none;
}

.timeline-text {
  position: relative;
  z-index: 2;
  color: #fff;
  font-size: 0.9rem;
  line-height: 1.1;
  margin: 0;
  top: 10%;
  max-width: 400px;
}

/* Anchos personalizados para las líneas rojas de la línea de tiempo */
.timeline-row:nth-child(1) .timeline-line,
.timeline-row:nth-child(3) .timeline-line {
  width: 40px;
}

.timeline-row:nth-child(2) .timeline-line {
  width: 30%;
}

.timeline-row:nth-child(2) .timeline-bg-year {
  left: 35%;
}

.timeline-row:nth-child(2) .timeline-text {
  left: 15%;
}

/* --- MOBILE SMALL --- */
@media screen and (max-width: 376px) {
  .bloque-texto-m {
    top: auto;
    bottom: 5%;
    margin-top: 0;
    margin-bottom: 0;
  }
}

@media screen and (max-width: 768px) {
  .historia-fondo > .fondo-opacidad {
    object-fit: cover !important;
  }
  .linea-media {
    display: none !important;
  }
  .contenedor-mision-vision {
    height: 100vh !important;
    padding: 10% 0 !important;
    overflow: hidden;
  }
  .vision-texto,
  .mision-texto {
    transform: none !important;
    margin-bottom: 8%;
    width: 95%;
    text-align: center;
  }
  .contenedor-mision-vision h3 {
    font-size: 2rem !important;
    padding-bottom: 10px !important;
    margin-bottom: 5px;
  }
  .contenedor-mision-vision p {
    font-size: 0.95rem !important;
    line-height: 1.4 !important;
  }
  .fill-animacion {
    order: 4;
  }
  .fill-imagen-animacion {
    display: none !important;
  }
  .contenedor-informativo p,
  .contenedor-informativo span {
    font-size: 0.9rem !important;
  }
  .premio-animacion,
  .fill-imagen-animacion,
  .premio-imagen-animacion,
  .fill-animacion {
    transform: translateX(0) !important;
  }
  .premio-imagen-animacion {
    text-align: center;
  }
  .premio-imagen-animacion,
  .fill-imagen-animacion {
    width: 80%;
  }

  .premio-aftersales,
  .fill-rate {
    width: 60%;
  }

  .contenedor-informativo .fill-rate {
    transform: translateX(0%) scaleX(1);
  }

  .premio-animacion,
  .fill-animacion {
    width: 80%;
    margin-top: 30px;
    margin-bottom: 30px;
  }

  .premio-animacion p {
    font-size: 1.1rem;
  }
}

@media screen and (min-width: 1480px) {
  .slide-dos .titulo-linea,
  .slide-tres .titulo-dos-linea {
    font-size: 3.5rem;
  }

  .anio-dos,
  .anio-tres {
    font-size: 14rem !important;
  }

  .descripcion-dos,
  .descripcion-tres {
    font-size: 1.5rem !important;
  }
}

/* ----------------------------------------------------
   CORRECCIONES MÓVILES (AL FINAL PARA PRIORIDAD MÁXIMA)
   ---------------------------------------------------- */
@media (max-width: 768px) {
  .carrusel-historia-mx {
    height: 100dvh !important;
  }
  #canvas-historia-mx {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
  }
  #first-layer-mx {
    display: none !important; /* Oculta la imagen de 2005 original */
  }
  #year-historia-mx {
    font-size: 4rem !important;
    top: 15% !important;
    transform: translateX(-50%) scale3d(1, 1, 1) !important; /* Fuerza a reiniciar el zoom 1.9 de escritorio */
  }
  .titulo-historia-mx {
    top: 10% !important;
    font-size: 2.3rem !important;
    width: 100% !important;
  }
  .texto-historia-mx {
    font-size: 0.9rem !important;
  }
  
  /* Layout de Slides en Móvil (Apilados Horizontalmente) */
  .historia-mx-slide {
    flex-direction: column !important;
    height: 100% !important;
  }
  .slide-col-left {
    width: 100% !important;
    height: 20% !important;
  }
  .slide-col-right {
    width: 100% !important;
    height: 80% !important;
  }
  .timeline-text {
    font-size: 0.8rem !important; /* Reduce el texto de la línea de tiempo */
    top: 2% !important;
  }
  .timeline-bg-year {
    top: 25% !important;
  }
  .slide-step-2 .timeline-row:nth-child(3) .timeline-bg-year {
    top: 2% !important; /* Ajuste específico para el año 2023 */
  }
}
