@import './../../../../sources/styles/include.scss';

$component: 'sections';
$template: 'template-3';
$item: 'widget-item';

.widget.c-#{$component}.c-#{$component}-#{$template} {

  .widget-header {

    &[data-link-all="true"] {

      .widget-title {

        &.align-center {
          margin-left: 150px;
        }
      }
    }
  }

  .widget-list {
    display: block;
    margin-left: 10px;
    font-size: 0;
    text-align: right;
    text-decoration: none;
  }

  .widget-list-desktop {
    display: block;
    width: 140px;
    font-size: 10px;
    line-height: 1;
    color: #808080;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    word-break: break-word;

    @include transition(0.4s, color);
  }

  .widget-list-mobile {
    display: none;
    width: 30px;
    height: 30px;

    svg {

      path {
        stroke: #B0B0B0;

        @include transition(.35s, stroke);
      }
    }
  }

  .widget-items {

    &[data-status="loading"] {

      .#{$item}-text {
        opacity: 0;
      }
    }
  }

  .#{$item} {
    position: relative;
    overflow: hidden;

    &[data-svg="true"] {
      height: 100%;
    }
    &:hover {

      .#{$item}-picture {

        &:before {
          opacity: 0;
        }

        &:after {
          opacity: 1;
        }
      }
    }
  }
  .#{$item}-picture {
    position: relative;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    z-index: 1;
    padding-top: 78%;

    &.svg {
      height: 100%;
      padding-top: 0;
    }

    &:before {
      content: "";
      position: absolute;
      left: 0;
      right: 0;
      top: 61%;
      bottom: 0;
      background: linear-gradient(180deg,rgba(0,0,0,0) 0,rgba(0,0,0,.5) 100%);

      @include transition(0.4s, opacity);
    }

    &:after {
      content: "";
      position: absolute;
      left: 0;
      right: 0;
      top: 0;
      bottom: 0;
      opacity: 0;
      background: linear-gradient(180deg, rgba(0, 0, 0, 0.5) 0, rgba(0, 0, 0, 0.5) 100%);

      @include transition(0.4s, opacity);
    }
  }
  .#{$item}-content {
    display: block;
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    text-decoration: none;
    width: 100%;
    height: 100%;
    padding: 24px;
    z-index: 10;
  }
  .#{$item}-content-container {
    width: 100%;
    height: 100%;
    overflow: hidden;

    @include flex();
    @include flex-orientation(vertical);
  }
  .#{$item}-text {
    max-height: 100%;
    overflow: hidden;
    margin: auto 0 0 0;
    opacity: 1;
    color: #FFF;
    z-index: 4;

    @include transition(0.5s, opacity);

    &.scroll-content {
      padding-right: 12px;
    }
  }
  .#{$item}-name {
    font-size: 18px;
    line-height: 22px;
    font-weight: 500;
    max-height: 78px;
  }
  .#{$item}-count-elements {
    font-size: 13px;
    line-height: 16px;
    font-weight: 500;
    opacity: 0.58;
    color: #FFFFFF;
  }
  .#{$item}-description {
    margin-top: 10px;
    max-width: 100%;
    font-size: 14px;
    line-height: 21px;
  }

  @include breakpoint-768() {
    .widget-item-description {
      height: 64px;
      opacity: 1;
    }
  }

  @include breakpoint-custom(500) {
    .widget-header {

      &[data-link-all="true"] {

        .widget-title {

          &.align-center {
            margin-left: 40px;
          }
        }
      }
    }

    .widget-list-desktop {
      display: none;
    }

    .widget-list-mobile {
      display: block;
    }
  }
}