.item-image {
  box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;
  background: #fff;
  width: 100%;
  padding: 16px;
  height: 100%;
  border-radius: 15px;
  overflow: hidden;

  @media (width>=992px) {
    border-radius: 27px;
  }

  img {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: .4s;
  }

  &:hover img {
    transform: scale(1.1);
  }
}

.banner-cert-desktop {
  overflow: visible;
  gap: 20px;
  min-width: 0;
}

.banner-cert-track {
  position: relative;
  overflow: visible;
  width: 100%;
  min-height: 172px;
}

.banner-cert-page {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  display: flex;
  align-items: stretch;
  gap: 12px;
  width: 100%;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 0;
  transition: opacity 0.45s ease;
}

.banner-cert-page:not(.is-active) {
  opacity: 0 !important;
  visibility: hidden !important;
}

.banner-cert-page.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  position: relative;
  z-index: 2;
}

.banner-cert-card.item-image {
  flex: 1 1 0;
  box-sizing: border-box;
  width: auto;
  min-width: 0;
  height: 148px;
  max-height: 148px;
}

.banner-cert-card.item-image.is-wide {
  flex: 2 1 0;
  width: auto;
  height: 148px;
  max-height: 148px;
}

.banner-cert-mobile {
  overflow: visible;
  margin-top: 8px;
  padding: 0 16px;
}

.banner-cert-mobile .banner-cert-track {
  min-height: 164px;
}

.banner-cert-mobile .banner-cert-card.item-image {
  height: 140px;
  max-height: 140px;
}

.container-carousel-top {
  z-index: 3;
}

@media (min-width: 768px) {
  /* fila de arriba: hacia la izquierda (encima del texto) */
  .container-carousel-top.banner-cert-track {
    width: calc(100% + 36%);
    margin-left: -36%;
    padding-left: 0;
    box-sizing: border-box;
  }

  /* fila de abajo: hacia la derecha, sin salirse de la columna */
  .container-carousel-bottom.banner-cert-track {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    padding-left: 12%;
    box-sizing: border-box;
  }
}

.banner-carousel,
.banner-carousel .page-width,
.banner-carousel .row {
  overflow: visible;
}

.banner-carousel {

  h2 {
    position: relative;

    &::after {
      content: "";
      width: 500%;
      bottom: -1.5px;
      height: 3px;
      background: var(--color-primary);
      position: absolute;
      z-index: -1;
      left: -425%;

      @media (width>=1200px) {
        left: -350%;
      }
    }
  }

  .rectangle-left,
  .rectangle-right {
    height: 3px;
    background: var(--color-primary);
    position: absolute;
  }

  .rectangle-left {
    top: 64%;
    z-index: -1;
    width: 45%;
    left: 0;
  }

  .rectangle-right {
    top: 30%;
    z-index: -1;
    width: 25%;
    right: 0;
  }

  @media (width<520px) {
    .rectangle-right {
      top: auto;
      bottom: 20%;
    }
  }
}
