$green-grass: #2AAC40;
$turquoise: #00A2B7;
$cornflower: #3377FF;

.updates {
  margin-top: 128px;

  @media (max-width: $desktop) {
    margin-top: 112px;
  }

  @media (max-width: $tablet) {
    margin-top: 103px;
  }

  @media (max-width: $mobile) {
    margin-top: 80px;
  }

  &__title {
    text-align: center;

    @media (max-width: $mobile) {
      font-size: 28px;
      text-align: left;
    }
  }

  &__list-wrapper {
    margin-top: 58px;
    display: grid;
    grid-template-columns: 384px 2fr;
    grid-gap: 32px;

    @media (max-width: $desktop) {
      margin-top: 42px;
      grid-template-columns: 296px 2fr;
      grid-gap: 28px;
    }

    @media (max-width: $tablet) {
      margin-top: 35px;
      grid-template-columns: 1fr;
      grid-template-rows: 220px 2fr;
      grid-gap: 32px;
    }

    @media (max-width: $mobile) {
      margin-top: 29px;
      display: flex;
      flex-direction: column;
      gap: 16px;
    }

    a:focus,
    a:hover {
      .updates__list-title,
      .updates__column-title-sm,
      .updates__datetime {
        color: #5C6D70;
      }
    }
  }

  &__column-title,
  &__column-title-sm {
    margin-top: 5px;
    margin-bottom: 0;
    font-size: 22px;
    line-height: 1.375;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: #253737;

    @media (max-width: $desktop) {
      font-size: 18px;
    }

    @media (max-width: $tablet) {
      font-size: 16px;
    }

    @media (max-width: $mobile) {
      font-size: 20px;
    }
  }

  &__column-title-sm {
    @media (max-width: $mobile) {
      font-size: 16px;
    }
  }

  &__list-title {
    font-size: 16px;
    line-height: 1.37;
    font-weight: 600;
    margin-top: 6px;
    margin-bottom: 0;
    letter-spacing: 0.02em;
    color: #253737;

    @media (max-width: $desktop) {
      font-size: 15px;
    }
  }

  &__column {
    display: flex;
    flex-direction: column;
    gap: 28px;
    margin-bottom: 0;

    @media (max-width: $desktop) {
      gap: 22px;
    }

    @media (max-width: $tablet) {
      display: grid;
      grid-template-columns: 1fr 1fr;
      align-items: center;
      gap: 3%;
    }

    @media (max-width: $mobile) {
      grid-template-columns: 1fr;
      gap: 14px;
    }

    > li:not(:first-child) {
      position: relative;

      @media (max-width: $mobile) {
        &::after {
          content: "";
          position: absolute;
          left: 0;
          bottom: -16px;
          width: 100%;
          height: 1px;
          background-color: #e0e6f0;
        }
      }
    }
  }

  &__list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 32px;
    row-gap: 38px;
    margin: 0;

    @media (max-width: $desktop) {
      column-gap: 28px;
      row-gap: 36px;
    }

    @media (max-width: $tablet) {
      column-gap: 3%;
    }

    @media (max-width: $mobile) {
      display: flex;
      flex-direction: column;
      margin-top: 18px;
    }
  }

  &__item {
    position: relative;

    &::after {
      content: "";
      position: absolute;
      left: 0;
      bottom: -19px;
      width: 100%;
      height: 1px;
      background-color: #e0e6f0;

      @media (max-width: $desktop) {
        bottom: -18px;
      }
    }

    @media (max-width: $mobile) {
      &:last-child {
        &::after {
          content: none;
        }
      }
    }
  }

  &__inner-list {
    display: flex;
  }

  &__inner-item {
    position: relative;
    text-transform: uppercase;
    padding-right: 18px;
    font-size: 12px;
    line-height: 1.125;
    font-weight: 500;
    letter-spacing: 0.02em;

    &--turquoise {
      color: $turquoise;
    }

    &--cornflower {
      color: $cornflower;
    }

    &--green-grass {
      color: $green-grass;
    }
  }

  &__datetime {
    display: block;
    margin-top: 4px;
    font-size: 14px;
    color: #5E636E;
    line-height: 1.5;

    @media (max-width: $desktop) {
      font-size: 12px;
    }
  }

  // TODO: remove it with real content
  &__hero-item {
    background-color: #151934;
    padding: 60px 28px;
    height: 244px;

    * {
      color: #fff;
    }

    @media (max-width: $desktop) {
      padding: 47px 18px;
      height: 187px;
    }

    @media (max-width: $tablet) {
      padding: 55px 58px;
      height: 214px;
    }

    @media (max-width: $mobile) {
      padding: 60px 24px;
      height: 188px;
    }
  }

  &__inner-item--decor {
    display: flex;
    align-items: center;
    color: #798486;

    &::before {
      content: "";
      display: block;
      height: 4px;
      width: 4px;
      position: absolute;
      top: 0;
      bottom: 0;
      left: -11px;
      margin: auto;
      background-color: #cccccc;
      border-radius: 3px;
    }

    &:after {
      content: "";
      display: block;
      width: 6px;
      height: 6px;
      margin-left: 4px;
      background: center center no-repeat url("data:image/svg+xml,%3Csvg width='8' height='8' viewBox='0 0 8 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7 1H7.5C7.5 0.723858 7.27614 0.5 7 0.5V1ZM0.646447 6.64645L0.292893 7L1 7.70711L1.35355 7.35355L0.646447 6.64645ZM1 1.5H7V0.5H1V1.5ZM6.5 1V7H7.5V1H6.5ZM6.64645 0.646447L0.646447 6.64645L1.35355 7.35355L7.35355 1.35355L6.64645 0.646447Z' fill='%23798486'/%3E%3C/svg%3E");
      background-size: contain;
    }
  }
}
