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

$tours-image-width: 19rem;
$tours-image-width-mobile: 7rem;
$tours-width-base: 52rem * 2 + $gutter;
$tours-container-width: $tours-width-base / $max-width * 100%;
$tours-width: 52rem / $tours-width-base * 100%;

/// Tours

.tours {
  @include clearfix;
  margin: 0 auto $gutter;
}

.tours__heading {
  @include h1();
}

.tours__list {
  @include clearfix;
  margin: 0 auto;
  width: $tours-container-width;

  @media (min-width: $min-1290) {
    text-align: center;
  }
}

.tours__title {
  @media (min-width: $min-1080) {
    margin-bottom: 6.5rem;
  }
}

.tours__button-container {
  @include see-more-link;
  margin-top: 0;
}

.tours__more {
  @include see-more();
}



/// Tour

.tour {
  display: block;
  margin: 0 auto ($gutter * 1);
  max-width: 50rem + ($gutter * 2);
  min-height: 10rem;
  padding-left: ($tours-image-width-mobile + $gutter);
  position: relative;
  text-align: left;
  vertical-align: top;

  @media (min-width: $min-480) {
    min-height: 14rem;
    padding-left: ($tours-image-width + $gutter);
  }

  @media (min-width: $min-960) {
    display: inline-block;
    float: left;
    margin: 0 0 ($gutter * 2);
    max-width: none;
    width: 50%;
  }

  @media (min-width: $min-1290) {
    width: $tours-width;
  }

  &:nth-child(even) {
    @media (min-width: $min-1290) {
      margin-left: 100% - ($tours-width * 2);
    }
  }
}

.tour__imagery,
.tour__description {
  font-size: $font-size;
}

.tour__imagery {
  left: 0;
  position: absolute;
  top: 0;
  width: $tours-image-width-mobile;

  @media (min-width: $min-480) {
    width: $tours-image-width;
  }

  @media (min-width: $min-960) {
    left: $gutter;
  }
}

.tour__description {
  font-weight: $font-weight-medium;

  @media (min-width: $min-960) {
    margin-left: $gutter;
  }
}

.tour__caption {
  margin-top: -.3rem;
  overflow: hidden;
  padding-bottom: .3rem;
  text-overflow: ellipsis;
  white-space: nowrap;

  @media (max-width: $max-480) {
    position: absolute;
  }

  @media (min-width: $min-480) {
    border-bottom: .1rem solid rgba($color-light-slate, .5);
    color: rgba($light-text-color, .5);
    margin-top: .3rem;
  }
}

.tour__image {
  background-position: center center;
  background-size: cover;
  height: $tours-image-width-mobile + .7rem;
  width: $tours-image-width-mobile;

  @media (min-width: $min-480) {
    height: 10rem;
    width: 19rem;
  }
}

.tour__price {
  background-color: $color-red;
  color: $color-white;
  display: inline-block;
  font-size: 1.2rem;
  font-weight: $font-weight-semibold;
  line-height: 1;
  margin-right: $gutter - .5rem;
  min-width: $tours-image-width-mobile;
  padding: .5rem .8rem .4rem;
  text-align: center;
  vertical-align: middle;

  @media (min-width: $min-480) {
    margin-right: .5rem;
    min-width: 5rem;
  }
}

.tour__type {
  color: $titlegray;
  display: inline;
  font-size: 1.1rem;
  font-weight: $font-weight-semibold;
  overflow: hidden;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;

  @media (min-width: $min-480) {
    color: $light-text-color;
  }
}

.tour__title {
  color: $titlegray;
  font-size: 1.7rem;
  line-height: 1.1;
  margin-bottom: .5rem;
  margin-top: -.2rem;

  @media (min-width: $min-480) {
    font-size: 1.8rem;
    line-height: (24 / 18);
  }
}

.tour__blurb {
  color: $light-text-color;
  font-size: 1.3rem;
  line-height: 1.4;

  @media (min-width: $min-480) {
    font-size: 1.4rem;
    line-height: (24 / 16);
  }
}

// IE9 can't use Clamp.js, so we have to force it to hide the paragraph at a specific height
.ie9 .tour__blurb {
  height: 5.5rem;
  overflow: hidden;

  @media (min-width: $min-480) {
    height: 7.4rem;
  }
}
