.ce_youtube {
  margin-bottom: 2rem;

  .video_container {
    position: relative;
    padding-bottom: 56.25%;
    width: 100%;
    height: auto;
  }

  img,
  iframe {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100% !important;
    height: 100% !important;
  }

  &.spwn-youtube {
    position: relative;
    display: flex;
    justify-content: flex-end;
    min-height: 300px;
    margin-bottom: 6rem;
    @media (max-width: 1004px) {
      margin-top: 4rem;
    }
    @media (max-width: 575px) {
      margin-bottom: 3rem;
    }

    &:before {
      content: "";
      position: absolute;
      left: 0;
      top: 50%;
      z-index: -1;
      transform: translate(0, -50%);
      width: 100%;
      height: 268px;
      background: $secondary;
      border-radius: 30px;
      @media (max-width: 1280px) {
        height: 230px;
      }
      @media (max-width: 1004px) {
        width: 70%;
        height: 168px;
        transform: translate(0, -130%);
      }
      @media (max-width: 575px) {
        height: 120px;
        transform: translate(0, -170%);
      }
    }

    h2 {
      color: $white;
      position: absolute;
      left: 50px;
      top: 50%;
      transform: translate(0, -50%);
      padding: 0 800px 0 0;
      @media (max-width: 1280px) {
        padding-right: calc(50vw + 90px);
        font-size: size(48);
        line-height: size(56);
      }
      @media (max-width: 1004px) {
        top: 0;
        transform: translate(0, -50%);
        padding-right: 0;
        margin-right: 27vw;
        font-size: size(40);
        line-height: size(48);
      }
      @media (max-width: 768px) {
        font-size: size(32);
        line-height: size(38);
      }
      @media (max-width: 575px) {
        font-size: size(26);
        line-height: size(32);
      }
    }

    .video_container {
      width: 717px;
      padding-bottom: 0;
      margin-right: 85px;
      @media (max-width: 1280px) {
        width: 50vw;
      }
      @media (max-width: 1004px) {
        width: 60vw;
        margin-top: 2rem;
      }
      @media (max-width: 768px) {
        width: 85%;
        margin-right: 0;
      }
      @media (max-width: 575px) {
        height: 52vw;
      }

      .responsive {
        position: relative;
        padding-bottom: 56.25%;
        width: 100%;
        height: auto;
      }

      a {
        display: block;

        &:after {
          content: "";
          position: absolute;
          left: 50%;
          top: 50%;
          transform: translate(-50%, -50%);
          width: 77px;
          height: 78px;
          mask-image: url("../images/elements/youtube-play-icon.svg");
          mask-repeat: no-repeat;
          mask-position: left top;
          mask-size: 100% auto;
          background-color: $white;
          @media (max-width: 575px) {
            transform: translate(-50%, -50%) scale(50%);
          }
        }

        &:hover {
          &:after {
            background-color: $youtube-red;
          }
        }
      }

      img,
      iframe {
        border-radius: 20px;
      }
    }

    .caption {
      position: absolute;
      left: 30px;
      bottom: 30px;
      padding-right: 30px;
      font-size: size(24);
      line-height: size(30);
      color: $white;
      @media (max-width: 575px) {
        bottom: 50px;
        font-size: size(18);
        line-height: size(24);
      }
    }
  }
}