.madesa-banner-media-texto {
  display: block;
  width: 100%;
  --mbmt-top-bg: #f2f1eb;
  --mbmt-bottom-bg: #ffffff;
  --mbmt-eyebrow: #1c201e;
  --mbmt-headline: #1c201e;
  --mbmt-subtext: #73827a;
  --mbmt-mission: #000000;

  &[data-video-playing] .madesa-banner-media-texto__iframe,
  &[data-video-playing] .madesa-banner-media-texto__hosted-video {
    display: block;
  }

  &[data-video-playing] .madesa-banner-media-texto__media::after,
  &[data-video-playing] .madesa-banner-media-texto__cover {
    opacity: 0;
  }

  &[data-video-playing] .madesa-banner-media-texto__play-fab {
    opacity: 0;
    pointer-events: none;
  }
}

.madesa-banner-media-texto__inner {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding-left: 16px;
  padding-right: 16px;

  @media screen and (min-width: 720px) {
    padding-left: 32px;
    padding-right: 32px;
  }

  @media screen and (min-width: 1440px) {
    padding-left: 48px;
    padding-right: 48px;
  }

  @media screen and (min-width: 1440px) {
    padding-left: 128px;
    padding-right: 128px;
  }
}

.madesa-banner-media-texto__bottom .madesa-banner-media-texto__inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding-left: 0;
  padding-right: 0;

  @media screen and (min-width: 720px) {
    align-items: center;
  }

  @media screen and (min-width: 1024px) {
    align-items: flex-start;
  }

}

.madesa-banner-media-texto__top {
  background-color: var(--mbmt-top-bg);
  padding-top: var(--mbmt-pad-top-mobile, 40px);
  padding-bottom: var(--mbmt-pad-bottom-top-mobile, 48px);

  @media screen and (min-width: 720px) and (max-width: 1023px) {
    padding-top: var(--mbmt-pad-top-tablet, 52px);
    padding-bottom: var(--mbmt-pad-bottom-top-tablet, 64px);
  }

  @media screen and (min-width: 1024px) {
    padding-top: var(--mbmt-pad-top-desktop, 64px);
    padding-bottom: var(--mbmt-pad-bottom-top-desktop, 80px);
  }

  & .madesa-banner-media-texto__inner {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: stretch;

    @media screen and (min-width: 720px){
      gap: 40px;
      flex-direction: row;
    }

    @media screen and (min-width: 1440px) {
      gap: 120px;
    }
  }

  & .madesa-banner-media-texto__inner > .madesa-banner-media-texto__media {
    @media screen and (min-width: 720px) {
      min-width: 344px;
    }

    @media screen and (min-width: 1024px) {
      flex: 1 1 56%;
      min-width: 560px;
    }
  }
}

.madesa-banner-media-texto__copy {
  @media screen and (min-width: 1024px) {
    flex: 1 1 44%;
    max-width: 360px;
    padding-top: 56px;
  }
}

.madesa-banner-media-texto__eyebrow {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
  color: var(--mbmt-eyebrow);
}

.madesa-banner-media-texto__headline {
  margin: 0 0 8px;
  font-size: 24px;
  font-weight: 600;
  line-height: 28px;
  color: var(--mbmt-headline);

  @media screen and (min-width: 1024px) {
    font-size: 48px;
    line-height: 45px;
    margin: 0 0 16px;
  }
}

.madesa-banner-media-texto__subtext {
  margin: 0;
  font-size: 16px;
  line-height: 24px;
  color: var(--mbmt-subtext);
  @media screen and (min-width: 1024px) {
    max-width: 360px;
  }
}

.madesa-banner-media-texto__media {
  position: relative;
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: #e8e6e0;

  @media screen and (min-width: 720px) {
    aspect-ratio: 16 / 9;
  }
}

.madesa-banner-media-texto__media::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: rgba(0, 0, 0, 0.45);
  border-radius: inherit;
}

.madesa-banner-media-texto__media > .madesa-banner-media-texto__cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  z-index: 0;
}

.madesa-banner-media-texto__media > svg.madesa-banner-media-texto__cover {
  object-fit: cover;
}

.madesa-banner-media-texto__iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: none;
  z-index: 2;
}

.madesa-banner-media-texto__hosted-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
  z-index: 2;
}

.madesa-banner-media-texto__play-fab {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 60px;
  background-color: transparent;
  border: 6px solid #ffffff;
  border-radius: 50%;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  padding: 0;

  @media screen and (min-width: 1024px) {
    width: 72px;
    height: 72px;
  }
  
  &:hover {
    transform: translate(-50%, -50%) scale(1.05);
    box-shadow: 0 6px 28px rgba(0, 0, 0, 0.18);
  }

  & svg {
    width: 56px;
    height: 56px;
    margin-left: 4px;

  }

}

.madesa-banner-media-texto__bottom {
  background-color: var(--mbmt-bottom-bg);
  padding-top: 0;
  padding-bottom: var(--mbmt-pad-bottom-bottom-mobile, 56px);
  position: relative;

  @media screen and (min-width: 720px) and (max-width: 1023px) {
    padding-bottom: var(--mbmt-pad-bottom-bottom-tablet, 68px);
  }

  @media screen and (min-width: 1024px) {
    padding-bottom: var(--mbmt-pad-bottom-bottom-desktop, 80px);
  }

  @media screen and (max-width: 719px) {
    &.in-view .madesa-banner-media-texto__figure-a,
    &:hover .madesa-banner-media-texto__figure-a {
      left: calc(50% - 85px);
    }

    &.in-view .madesa-banner-media-texto__figure-b,
    &:hover .madesa-banner-media-texto__figure-b {
      right: calc(50% - 48px);
      top: 16px;
    }
  }

  @media screen and (min-width: 720px) and (max-width: 1023px) {
    &:hover .madesa-banner-media-texto__figure-a {
      left: calc(50% - 182px);
      width: 160px;
      height: 160px;
      top: -24px;
    }

    &:hover .madesa-banner-media-texto__figure-b {
      left: calc(50% - 88px);
      top: calc(50% - 74px);
    }
  }

  @media screen and (min-width: 1024px) and (max-width: 1439px) {
    &:hover .madesa-banner-media-texto__figure-a {
      left: 86px;
      top: -24px;
      width: 120px;
      height: 120px;
    }

    &:hover .madesa-banner-media-texto__figure-b {
      left: 146px;
      top: 24px;
      width: 200px;
      height: 200px;
    }
  }

  @media screen and (min-width: 1440px) {
    &:hover .madesa-banner-media-texto__figure-a {
      left: 156px;
      top: -24px;
      width: 180px;
      height: 180px;
    }

    &:hover .madesa-banner-media-texto__figure-b {
      top: 24px;
      left: 270px;
      width: 270px;
      height: 270px;
    }
  }
}

.madesa-banner-media-texto__decor {
  position: relative;
  width: 100%;
  margin-top: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;

  @media screen and (min-width: 720px) {
    height: 275px;
  }

  @media screen and (min-width: 1024px) {
    height: 72px;
  }

}

.madesa-banner-media-texto__figure-a {
  width: 62px;
  height: 62px;
  display: block;
  transition: left 0.6s ease-out, transform 0.6s ease-out, width 0.6s ease-out, height 0.6s ease-out, top 0.6s ease-out;
  z-index: 2;

  @media screen and (max-width: 719px) {
    position: relative;
    left: 0;
  }

  @media screen and (min-width: 720px) {
    width: 94px;
    height: 94px;
    position: absolute;
    top: -40px;
    left: 48px;
  }
  
  @media screen and (min-width: 1024px) {
    top: -94px;
    left: 32px;
  }

  @media screen and (min-width: 1440px) {
    top: -110px;
    left: 112px;
    width: 134px;
    height: 134px;
  }

}

.madesa-banner-media-texto__figure-b {
  width: 96px;
  height: 96px;
  object-fit: cover;
  border-radius: 50%;
  margin-top: -8px;
  transition: transform 0.6s ease-out, right 0.6s ease-out, top 0.6s ease-out, margin-top 0.6s ease-out, left 0.6s ease-out, width 0.6s ease-out, height 0.6s ease-out;
  z-index: 1;

  @media screen and (max-width: 719px) {
    position: relative;
    right: 0;
    top: 0;
  }

  @media screen and (min-width: 720px) {
    width: 176px;
    height: 176px;
    position: absolute;
    top: -24px;
    left: 146px;
  }

  @media screen and (min-width: 1024px) {
    top: -56px;
    left: 120px;
  }

  @media screen and (min-width: 1440px) {
    top: -52px;
    left: 280px;
    width: 241px;
    height: 241px;
  }

}

.madesa-banner-media-texto__mission {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  line-height: 24px;
  color: var(--mbmt-mission);
  max-width: 640px;
  text-align: center;
  padding: 32px;

  @media screen and (min-width: 720px) {
    padding: 0 40px;
    font-size: 28px;
    line-height: 32px;
    max-width: 604px;
  }

  @media screen and (min-width: 1024px) {
    padding: 0;
    text-align: left;
    margin-left: 39%;
    max-width: 50%;
  }

  @media screen and (min-width: 1440px) {
    margin-left: 42%;
    max-width: 39%;
    font-size: 40px;
    line-height: 44px;
  }

}
