/*@function rem($pixels, $context: $mainFontSize) {
    @if (unitless($pixels)) {
        $pixels: $pixels * 1px;
    }

    @if (unitless($context)) {
        $context: $context * 1px;
    }

    @return $pixels / $context * 1rem;
}

@mixin size($width, $height: $width) {
    width: $width;
    height: $height;
}*/
.portfolio:not(.front-page) {
  height: 100%;
  left: 0;
  position: absolute;
  top: 0;
  width: 100%;
}
.portfolio .swiper-slide.active .portfolio__item .layer-front {
  opacity: 0;
  -webkit-transition: opacity 0.25s ease-in-out;
  -o-transition: opacity 0.25s ease-in-out;
  transition: opacity 0.25s ease-in-out;
}
.portfolio .swiper-slide.active .portfolio__item .layer-back {
  z-index: 1;
}
.portfolio__item {
  height: 100%;
  position: relative;
}
.portfolio__item .layer {
  height: 100%;
  left: 0;
  position: relative;
  top: 0;
  width: 100%;
}
.portfolio__item .layer-front {
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  background-color: #020202;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
      -ms-flex-direction: column;
          flex-direction: column;
  -webkit-box-pack: center;
      -ms-flex-pack: center;
          justify-content: center;
  opacity: 1;
  pointer-events: none;
  -webkit-transition: opacity 0.25s ease-in-out;
  -o-transition: opacity 0.25s ease-in-out;
  transition: opacity 0.25s ease-in-out;
  z-index: 2;
}
.portfolio__item .layer-front .company-logo {
  bottom: 0;
  left: 0;
  margin: auto;
  position: absolute;
  right: 0;
  top: 0;
}
.portfolio__item .layer-front .company-name {
  color: #FFFFFF;
  font-family: "BrutalType-Light";
  line-height: 1;
  margin-left: 37px;
  margin-top: auto;
  width: 100%;
}
.portfolio__item .layer-front .company-name {
  font-size: 20px;
}
@media (min-width: 320px) and (max-width: 1200px) {
  .portfolio__item .layer-front .company-name {
    font-size: calc(
                    20px +
                    12 *
                    (100vw - 320px) /
                    880
                );
  }
}
@media (min-width: 1200px) {
  .portfolio__item .layer-front .company-name {
    font-size: 32px;
  }
}
.portfolio__item .layer-front .type-work {
  color: #7A7A7A;
  font-family: "PTRootUI-Bold";
  font-size: 14px;
  line-height: 1;
  margin-bottom: 37px;
  margin-left: 37px;
  margin-top: 10px;
  text-transform: uppercase;
  width: 100%;
}
.portfolio__item .layer-back {
  background-color: #020202;
  height: 100%;
  position: absolute;
  z-index: -1;
}
.portfolio__item .layer-back .background {
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  height: 100%;
  left: 0;
  position: absolute;
  top: 0;
  width: 100%;
}
.portfolio__item .layer-back .background::after {
  background-color: rgba(0, 0, 0, 0.4);
  content: "";
  height: 100%;
  left: 0;
  position: absolute;
  top: 0;
  width: 100%;
}
.portfolio__item .layer-back .popup-youtube {
  background-image: url(../images/icons/play-video.svg);
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  border: none;
  bottom: 0;
  display: block;
  height: 100px;
  margin: auto;
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
  width: 100px;
}
.portfolio__item:hover .layer-front {
  opacity: 0;
  -webkit-transition: opacity 0.25s ease-in-out;
  -o-transition: opacity 0.25s ease-in-out;
  transition: opacity 0.25s ease-in-out;
}
.portfolio__item:hover .layer-back {
  z-index: 1;
}