@font-face {
  font-family: "Bandeins Sans & Strange Variable";
  src: url("https://res.cloudinary.com/dldmpwpcp/raw/upload/v1566406079/BandeinsStrangeVariable_esetvq.ttf");
}

.container-content-sostenibilidad {
  width: 91%;
  margin-top: var(--spacing-60);
  max-width: 1920px;

  .content-sostenibilidad-title {
    color: var(--primary-blue);
    font-family: var(--font-secondary);
    font-size: clamp(56px, 13vw, 84px);
    font-style: normal;
    font-weight: 700;
    line-height: 1.1;
    text-transform: uppercase;
  }

  .content-sostenibilidad-subtitle {
    margin-top: 35px;
    color: var(--primary-red);
    font-family: var(--font-secondary);
    font-size: clamp(34px, 3vw, 40px);
    font-style: normal;
    font-weight: 700;
    line-height: clamp(33px, 3vw, 39px);

    @media (max-width: 950px) {
      margin-top: 30px;
    }

    @media (max-width: 768px) {
      margin-top: 25px;
    }
  }

  .content-sostenibilidad-text1 {
    margin-top: 35px;
    color: var(--primary-blue);
    font-family: var(--font-primary);
    font-size: clamp(34px, 3vw, 40px);
    font-style: normal;
    font-weight: 400;
    line-height: clamp(33px, 3vw, 39px);

    @media (max-width: 950px) {
      margin-top: 30px;
    }

    @media (max-width: 768px) {
      margin-top: 20px;
    }
  }

  .content-sostenibilidad-text2 {
    margin-top: 48px;
    color: var(--primary-blue);
    font-family: var(--font-secondary);
    font-size: clamp(34px, 3vw, 40px);
    font-style: normal;
    font-weight: 700;
    line-height: clamp(33px, 3vw, 39px);

    @media (max-width: 950px) {
      margin-top: 42px;
    }

    @media (max-width: 768px) {
      margin-top: 20px;
    }
  }
}

.overlay__box-content {
  position: absolute;
  bottom: 3%;
  left: 0;
  width: 29vw;
  width: 450px;
  height: 28vh;
  z-index: 15;
  pointer-events: none;
  background-color: var(--primary-red);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.8s ease;

  @media (max-width: 1000px) {
    width: 36vw;
  }
}

.overlay__box-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  height: 100%;
  width: 100%;
  color: var(--color-white);
  padding: 3vh 4vh;

  .overlay__box-title {
    max-width: 340px;
  }

  .overlay__box-subtitle {
    font-family: var(--font-roboto);
    font-size: 17px;
    font-style: normal;
    font-weight: 500;
    line-height: normal;
  }
}

/* Carousel headings encima de la imagen y overlay */
.carousel-headings {
  position: relative;
  width: 100%;
  min-height: var(--carousel-font-size1);
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  pointer-events: none;
  justify-content: flex-end;
  overflow: hidden;

  p {
    font-size: var(--carousel-font-size1);
    font-style: normal;
    font-weight: 700;
    line-height: var(--carousel-line-height1) !important;
  }
}

.carousel-headings .slide__heading {
  --width: 200;
  left: 0;
  width: 100%;
  color: var(--primary-blue);
  /* font-family: "Bandeins Sans & Strange Variable"; */
  font-weight: 900;
  line-height: 1;
  will-change: opacity, transform;
  pointer-events: none;
  margin: 0;
  padding: 0;
  z-index: 10;
  mix-blend-mode: difference;
  overflow-wrap: break-word;
  word-break: break-word;
  white-space: normal;
  max-width: 100%;
  overflow: hidden;
  transition: color 0.8s ease;
  font-variation-settings: "wdth" var(--width);
}

.slide-heading__outer,
.slide-heading-bottom__outer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: #fff;
}

.slide-heading__inner,
.slide-heading-bottom__inner {
  width: 100%;
  height: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.carousel-headings-bottom {
  position: relative;
  width: 100%;
  min-height: var(--carousel-font-size1);
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  pointer-events: none;
  justify-content: flex-start;
  margin-top: 1vh;
  overflow: hidden;

  p {
    font-size: var(--carousel-font-size1);
    font-style: normal;
    font-weight: 700;
    line-height: var(--carousel-line-height1);
  }
}

.carousel-headings-bottom .slide__heading-bottom {
  --width: 200;
  right: 0;
  width: 100%;
  color: var(--primary-blue);
  /* font-family: "Bandeins Sans & Strange Variable"; */
  will-change: opacity, transform;
  pointer-events: none;
  margin: 0;
  padding: 0;
  z-index: 10;
  text-align: right;
  mix-blend-mode: difference;
  overflow-wrap: break-word;
  word-break: break-word;
  white-space: normal;
  max-width: 100%;
  overflow: hidden;
  transition: color 0.8s ease;
  font-variation-settings: "wdth" var(--width);
}

/* Estilos base para el overlay del carrusel */
.overlay {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  height: auto;
  min-height: unset;
  max-height: unset;
  padding: 0;
}

.overlay__content {
  width: 100vw;
  margin: 0 auto;
  padding: 0;
  height: auto;
  min-height: unset;
  max-height: unset;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  box-sizing: border-box;
}

.overlay__img-cont {
  position: relative;
  overflow: hidden;
  margin: 0;
  width: 96%;
  height: 42vh;
  min-height: 28vh;
  max-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.overlay__img-cont img {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
}

.overlay__count {
  position: absolute;
  bottom: 20px;
  right: 20px;
  display: flex;
  flex-direction: row;
  gap: 13px;
  z-index: 3;
}

.count-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 10px; /* Igual al ancho de .count-line por defecto */
  transition: width 0.3s ease;

  &:hover {
    cursor: pointer;
  }
}

.count-item.active {
  width: 20px; /* Igual al ancho de .count-line activa */
}

.count-number {
  font-size: 37px;
  font-weight: 600;
  color: white;
  transition: all 0.3s ease;
  font-family: var(--font-bud-bold);
  opacity: 0;
  visibility: hidden;
  transform: translateY(15px);
}

.count-item.active .count-number {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.count-item:hover .count-number {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.count-line {
  width: 10px;
  height: 3px;
  /* background-color: rgba(255, 255, 255, 0.3); */
  background-color: #ffffff;
  transition: all 0.3s ease;
  border-radius: 1px;
}

.count-item.active .count-line {
  width: 20px;
  background-color: white;
}

/* .count-item:hover .count-line {
  width: 20px;
  background-color: white;
} */

.container-ppal-carousel {
  width: 91%;
  max-width: 1920px;
  margin: 0 auto;
  height: auto;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  margin-block: var(--spacing-90);
}

@media (max-width: 768px) {
  .container-ppal-carousel {
    height: calc(100vh - 95px);
    min-height: calc(100vh - 95px);
    margin-block: 0;
    justify-content: space-between;
  }

  .overlay__box-content {
    bottom: 25vh;
    width: 85vw;
    height: 35vh;
  }

  .carousel-headings {
    flex: 0 0 auto;
  }

  .overlay {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    height: auto;
  }

  .overlay__content {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-end;
  }

  .carousel-headings {
    .slide__heading {
      /* font-family: "Bandeins Sans & Strange Variable"; */
      font-size: var(--carousel-font-size1-mobile);
      font-style: normal;
      font-weight: 700;
      line-height: var(--carousel-line-height1-mobile);
    }
  }

  .carousel-headings-bottom {
    flex: 0 0 auto;

    .slide__heading-bottom {
      /* font-family: "Bandeins Sans & Strange Variable"; */
      font-size: var(--carousel-font-size1-mobile);
      font-style: normal;
      font-weight: 700;
      line-height: var(--carousel-line-height1-mobile);
    }
  }

  .overlay__img-cont {
    width: 95%;
    height: 100%;
    min-height: 100%;
    max-height: 100%;
  }
}
