@import 'bourbon';
@import 'mixins/hidpi';
@import 'mixins/width-for-columns';
@import 'base/base';

.section {
  overflow: hidden;
  margin: 4rem 0;
}

.features.section {
  @include clearfix;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;

  h2 {
    flex: 0 0 100%;
  }

  .feature {
    @include width-for-columns(4);
    margin: 0 $col-spacing;
    width: 29%;
    @media screen and (max-width:$small-max-width) {
      display: block;
      clear: both;
      margin: 0 auto;
      text-align: center;
      padding: 0 0.25em;
      float: none;
      max-width: 100%;
      width:100%;
    }

    img {
      margin-left: auto;
      margin-right: auto;
      display: block;
    }

    p {
      text-align: center;
    }
  }
}

#content .users.section {
  align-items: center;
  display: flex;
  flex-direction: column;

  h2 {
    margin-bottom: 2rem;
  }

  .surround {
    background-color: #fff;
    border-radius: 3px;
    border: 1px solid #d1d1d1;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.1), 0 1px 0 #fff;
    margin: 0 2rem 2rem 2rem;
    max-width: 940px;
    padding: 1rem;

    a:hover {
      border: 0;
    }

    ul {
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
      margin: 0;

      @media screen and (min-width: 958px) {
        justify-content: space-between;
      }
    }
  }

  .user a {
    display: block;
    height: 103px;
    width: 210px;
  }

  @media screen and (max-width: 767px) {
    .desktop-only {
      display: none;
    }
  }
}

.gears.section {
  display: block;
  margin: 0 auto;

  h2 {
    margin-bottom: 2rem;
  }

  .gear {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 2rem;

    a {
      margin: 0 0.5rem;
    }
  }
}

.samples.section {
  .sample {
    float: left;
    position: relative;
    margin-left: $col-spacing;
    border: 1px solid rgba(0, 0, 0, 0.1);
    overflow: hidden;
    box-shadow: rgba(0, 0, 0, 0.1) 0 2px 3px;
    border-radius: 6px;
    @include width-for-columns(4);

    &:first-of-type {
      margin-left: 0;
    }

    .info {
      position: absolute;
      top: 0;
      right: 0;
      bottom: 0;
      left: 0;
      opacity: 0;
      background-color: rgba(0, 0, 0, 0.85);
      -webkit-font-smoothing: antialiased;
      @include transition(opacity 0.1s linear);
      border-radius: 6px;

      .name {
        text-align: center;
        color: $white;
        font-weight: normal;
        font-size: 18px;
        margin-top: 55px;
        text-transform: uppercase;
      }

      .actions {
        text-align: center;
        margin-top: 16px;

        > div {
          display: inline-block;
          margin: 0 3px;
        }
      }
    }

    img {
      border-radius: 6px;
    }

    &:hover .info {
      opacity: 1;
    }
  }
}

.anchorable-toc {
  position: relative;

  &:hover a.toc-anchor {
    display: block;
  }
}

a.toc-anchor {
  display: none;
  position: absolute;
  text-decoration: none;
  border: none;
  left: -1em;
  width: 30px;
  height: 13px;
  background: url('/images/link.png') no-repeat;
  background-size: 18px 9px;
  left: -22px;
  opacity: 0.5;
  top: 50%;
  margin-top: -5px;
}

.about__listing-button-group {
  align-content: center;
  display: flex;
  justify-content: center;
  width: 100%;

  @media screen and (max-width: 991px) {
    flex-flow: row wrap;
  }
}
.about__listing-button {
  margin: 0 10px;

  @media screen and (max-width: 991px) {
    min-width: 100%;
    margin: 10px auto;
  }
}

