@import "../../../sass/webpack_deps";
@import "../topic/topic";

.sights {
  counter-reset: sights-count;

  @media (max-width: $max-960) {
    padding-bottom: 3rem;
  }
}

.sights__more {
  @include more();
  display: table;
  margin-left: auto;
  margin-right: auto;
  margin-top: 4.5rem;

  @media (min-width: $min-960) {
    margin-top: 7rem;
  }
}

.sights__heading {
  &:not(.sights__heading--large) {
    color: $titlegray;
    font-size: 2rem;
    font-weight: 300;
    letter-spacing: -.01rem;
    line-height: 1;
    padding-bottom: 2.4rem;
    padding-top: 3rem;

    @media (max-width: $max-960) {
      text-align: center;
    }

    @media (min-width: $min-960) {
      font-size: 2.6rem;
    }
  }
}

.sights__heading--large {
  @include h1();
}

.sights__list {
  @media (min-width: $min-600) {
    display: flex;
  }

  .no-flexbox & {
    @include clearfix;
  }
}

.sights__column {
  @media (min-width: $min-600) {
    flex-grow: 1;
    width: span(6);
  }

  @media (min-width: $min-960) {
    width: span(4);
  }

  .no-flexbox & {
    @media (min-width: $min-600) {
      float: left;
    }
  }

  &:not(:first-child) {
    @media (min-width: $min-600) {
      margin-left: 3rem;
    }
  }

  &:nth-child(2) {
    .sights__item:first-child {
      @media (max-width: $max-600) {
        border-top: 0;
      }
    }
  }

  &:nth-child(3) {
    @media (max-width: $max-960) {
      display: none;
    }
  }
}

.sights__column--half {
  .no-flexbox & {
    @media (min-width: $min-960) {
      width: span(6);
    }
  }
}

.sights__item {
  align-items: center;
  border-bottom: .1rem solid $color-gray;
  display: flex;
  padding-bottom: .8rem;
  padding-top: .8rem;
  position: relative;

  &:first-child {
    @media (min-width: $min-600) {
      border-top: .1rem solid $color-gray;
    }
  }

  &:last-child {
    .sights__column:nth-child(2) & {
      @media (max-width: $max-600) {
        border-bottom: 0;
      }
    }
  }
}

.sights__image {
  position: static;
}

.sights__text {
  margin-left: 3rem;
  width: calc(100% - 6rem - 3rem - 2rem);
}

.sights__title {
  color: $darkgray;
  font-size: 1.6rem;
  font-weight: 600;
  line-height: 1.7;
  transition: color $animation-speed ease;

  .sights__item:hover &,
  .sights__item:active &,
  .sights__item:focus & {
    color: $lpblue;
  }
}

.sights__location {
  color: rgba($light-text-color, .5);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: .02rem;
  line-height: 1.3;
  text-transform: uppercase;
}

.sights__title,
.sights__location {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sights__marker {
  @include marker;
  @include marker-small;
  @include marker-place;

  &::before {
    content: counter(sights-count);
    counter-increment: sights-count;
  }
}
