/* portfolio-page */

.portfolio-page .span4 .page-header {
  border: none;
  min-height: 36px;
  display: inline-block;
  margin: 0 0 10px;
}

.portfolio-page h2 {
  font-size: 15px;
  font-weight: 500;
  vertical-align: top;
  margin: 0 5px;
}

.portfolio-page .span4 {
  width: 290px;
  display: inline-block;
  vertical-align: top;
  padding: 5px 10px 20px;
}

.portfolio-page .portfolio-single .vk-news-pic-slider .slide {
  width: 270px;
}

.portfolio-page .portfolio-single p {
  font-size: 14px;
  padding: 3px 8px 20px;
  max-height: 150px;
  overflow: hidden;
  position: relative;
}

.portfolio-page .portfolio-single p:before {
  content: '';
  position: absolute;
  width: 1px;
  background: #ddd;
  left: 0px;
  bottom: 15px;
  top: 0;
}

.portfolio-page .portfolio-single p:after {
  content: '';
  position: absolute;
  left: 0px;
  bottom: 0;
  width: 100%;
  height: 20px;
  background: linear-gradient(to top, var(--color-grey-extra-light), rgba(249, 249, 249, 0));
}

.portfolio-page .items-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;

  @media (width < 980px) {
    justify-content: space-around;
  }
}

.portfolio-inner.moduletable .newsflash-vert {
  max-width: var(--container-width);
  margin: 0 auto;
  line-height: 0;

  @media (width < 980px) {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
  }
}

.portfolio-inner.moduletable .newsflash-item {
  display: inline-block;
  position: relative;
  margin-right: 1px;

  @media (width < 980px) {
    margin: 0 5px 10px;
  }
}

.portfolio-inner.moduletable .newsflash-item .newsflash-title a {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 100%;
  z-index: 1;
  background: rgba(0, 0, 0, 0.8);
  padding: 10px;
  color: var(--color-white);
  opacity: 0;
  transition: opacity .2s ease;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
}

.portfolio-inner.moduletable .newsflash-item:hover .newsflash-title a {
  opacity: 1;
}

.portfolio-inner.moduletable .newsflash-item,
.portfolio-inner.moduletable .vk-news-pic-slider .slide {
  position: relative;
  width: 225px;
  height: 160px;

  @media (width < 980px) {
    width: 250px;
    height: 200px;
  }

  @media (width <= 510px) {
    width: 300px;
    height: 200px;
  }
}

.portfolio-inner.moduletable .vk-news-pic-slider .slide img {
  position: absolute;
  left: 0;
  top: 50%;
  min-height: 100%;
  transform: translateY(-50%);
}

.portfolio-inner.moduletable .portfolio-single > p {
  display: none;
}

.portfolio-inner.moduletable .article-separator {
  display: none;
}

.portfolio-inner.moduletable .newsflash-item:nth-child(4) {
  @media (980px <= width <= 1220px) {
    display: none;
  }
}

.portfolio-inner.moduletable .newsflash-item:nth-child(4),
.portfolio-inner.moduletable .newsflash-item:nth-child(3) {
  @media (width <= 510px) {
    display: none;
  }
}

/* В списке работ галерея статьи (ul.gallery) работает как у старого сайта (sige): карусель по одному кадру 270 px,
   точки добавляет slider.js. */
.portfolio-page .vk-news-pic-slider > .gallery {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.portfolio-page .vk-news-pic-slider > .gallery > .gallery__item {
  flex: none;
  width: 270px;
  margin: 0;
  scroll-snap-align: start;
}

.portfolio-page .vk-news-pic-slider > .gallery img {
  display: block;
  width: 270px;
  height: 310px;
  object-fit: cover;
}
