@use "sass:math";

@import '~styles/config';

.item {
  @include reset-anchor;
  @include grid-col();

  margin-bottom: $gutter * 2;

  @media (min-width: $min-540) {
    @include reset-anchor;
    @include grid-col(percentage(math.div(6, 12)));
  }

  &__container {
    position: relative;
    z-index: 4;

    height: 100%;

    &::after {
      content: '';

      position: absolute;
      top: 40px;
      right: -$gutter * 0.5;
      bottom: -20px;
      left: $gutter * 0.5;
      z-index: 1;

      width: 100%;

      pointer-events: none;

      opacity: 0.2;
      background: url('/assets/black-dot-opaque.svg') repeat;
      background-size: 10px;
    }
  }

  &__shadow {
    position: relative;
    height: 100%;

    border-width: 1px;
    border-style: solid;
    border-color: $color-grey100;

    overflow: hidden;

    &::after {
      content: '';

      position: absolute;
      bottom: 0;
      left: 0;
      right: 0;
      z-index: 1;

      height: 60px;

      box-shadow: 0 3px 65px 0 rgba(32, 32, 32, 0.125);

      @media (min-width: $min-tablet) {
        box-shadow: 0 5px 65px 0 rgba(32, 32, 32, 0.125);
      }
    }
  }

  &__wrapper {
    @include colorify('color');

    display: flex;
    align-content: space-between;
    flex-wrap: wrap;
    position: relative;
    z-index: 5;

    height: 100%;
    text-decoration: none;
    background-color: #fff;

    transition: box-shadow 220ms ease-in-out;
    box-shadow: inset 0 0 0 0 transparent;
  }

  &__content {
    padding: $gutter;

    width: 100%;
  }

  &__title {
    @include reset-heading;
    @include responsive-font(24, 32);

    z-index: 5;

    width: 55%;

    margin-bottom: 5px;

    font-family: $font-heading;
    font-weight: 700;
    line-height: math.div(32, 24);
    text-transform: capitalize;

    color: $color-dark;
    transition: color 120ms ease-in;
    hyphens: auto;
  }

  &__info {
    @include responsive-font(12, 14);

    margin-bottom: 20px;

    font-family: $font-heading;
    font-weight: 600;
    text-transform: uppercase;
    color: $color-grey700;
  }

  &__counter {
    display: flex;
    align-items: center;
    flex-direction: row;

    width: 50%;

    padding: 10px 20px;
    margin-bottom: 20px;

    background: $color-white;
    box-shadow: 0px 16px 100px rgba(0, 0, 0, 0.1);
    border-radius: 4px;

    &Value {
      @include responsive-font(28, 32);
      @include reset-all;

      font-family: $font-heading;
      font-weight: 700;

      color: $color-pink;
    }

    &Description {
      @include responsive-font(13, 14);
      @include reset-all;

      margin-left: 20px;

      text-transform: uppercase;
      font-family: $font-heading;
      font-weight: 700;

      color: $color-grey500;
    }
  }

  &__more {
    @include responsive-font(14, 16);

    font-weight: 700;

    svg {
      margin-right: 15px;

      fill: $color-pink;
    }
  }

  &__image {
    position: absolute;
    right: -20%;
    top: 50%;

    height: 80%;

    box-shadow: 0px 15px 65px rgba(0, 0, 0, 0.2);
    border-radius: 14px;
    transform: translateY(-50%);

    & > img {
      height: 100%;

      border-radius: 14px;
    }
  }
}
