@import 'variables';
@import 'mixins';

html,
body {
  height: 100%;
  width: 100%;
}

body {
  @include serif-font;
}

hr {
  border-color: $theme-primary;
  border-width: 3px;
  max-width: 50px;
}

hr.light {
  border-color: white;
}

a {
  @include transition-all;
  color: $theme-primary;
  &:hover,
  &:focus {
    color: darken($theme-primary, 10%);
  }

  .bg-primary &:not(.btn) {
    color: white;
    text-decoration: underline;
    &:hover {
      color: $theme-dark;
    }
  }
}

h1,
h2,
h3,
h4,
h5,
h6 {
  @include sans-serif-font;
}

p {
  font-size: 16px;
  line-height: 1.5;
  margin-bottom: 20px;
}

.small, small {
  font-size: 70%;
}

.bg-primary {
  background-color: $theme-primary;
}

.bg-dark {
  background-color: $theme-dark;
  color: white;
}

.text-faded {
  color: transparentize(white, 0.30);
}

section {
  padding: 100px 0;
}

aside {
  padding: 50px 0;
}

.no-padding {
  padding: 0;
}
.no-padding-bottom {
  padding-bottom: 0;
}

// Navigation

.navbar-default {
  background-color: white;
  border-color: transparentize($theme-dark, 0.5);
  @include sans-serif-font;
  @include transition-all;
  .navbar-header .navbar-brand {
    color: $theme-primary;
    @include sans-serif-font;
    font-weight: 700;
    text-transform: uppercase;
    &:hover,
    &:focus {
      color: darken($theme-primary, 10%);
    }
  }
  .nav {
    > li {
      > a,
      > a:focus {
        text-transform: uppercase;
        font-weight: 700;
        font-size: 13px;
        color: $theme-dark;
        &:hover {
          color: $theme-primary;
        }
      }
      &.active {
        > a,
        > a:focus {
          color: $theme-primary !important;
          background-color: transparent;
          &:hover {
            background-color: transparent;
          }
        }
      }
    }
  }
  @media (min-width: 768px) {
    background-color: transparent;
    // border-color: transparentize(white, 0.70);
    border-color: transparent;
    .navbar-header .navbar-brand {
      &:hover,
      &:focus {
        color: white;
      }
    }
    .nav > li > a,
    .nav > li > a:focus {
      color: transparentize(white, 0.20);
      &:hover {
        color: white;
      }
    }
    // &.affix-top {
    //   .navbar-header .navbar-brand {
    //     text-shadow: 0 0 10px $theme-dark;
    //   }
    //   .nav > li > a {
    //     text-shadow: 0 0 10px $theme-dark;
    //   }
    // }
    &.affix {
      background-color: white;
      // border-color: transparentize($theme-dark, 0.5);
      box-shadow: 0 0 10px $theme-dark;
      .navbar-header .navbar-brand {
        color: $theme-primary;
        font-size: 14px;
        &:hover,
        &:focus {
          color: darken($theme-primary, 10%);
        }
      }
      .nav > li > a,
      .nav > li > a:focus {
        color: $theme-dark;
        &:hover {
          color: $theme-primary;
        }
      }
    }
  }
}

// Homepage Header

header {
  position: relative;
  width: 100%;
  min-height: auto;
  @include background-cover;
  background-position: center;
  background-image: url('../img/diary-968592_1920.jpg');
  text-align: center;
  color: white;

  &:after {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: transparentize($theme-dark, 0.6);
    content: '';
  }

  .header-content {
    z-index: 1;
    position: relative;
    text-align: center;
    padding: 100px 15px 100px;
    width: 100%;
    .header-content-inner {
      h1 {
        font-weight: 700;
        text-transform: uppercase;
        margin-top: 50px;
        margin-bottom: 0;
        line-height: 1.2em;
      }
      hr {
        margin: 30px auto;
      }
      p {
        font-weight: 300;
        color: transparentize(white, 0.30);
        font-size: 16px;
        margin-bottom: 10px;
        &.subtitle {
          margin-bottom: 30px;
        }
      }

      .calltoaction {
        margin-bottom: 20px;
      }

      .urlinput {
        position: relative;
        max-width: 807px;
        margin: 20px auto;
        margin-bottom: 25px;
        input[type="text"] {
          padding: 20px;
          font-size: 16px;
          background: rgba(0, 0, 0, 0.35);
          border-radius: 50px;
          color: white;

          &::selection {
            background: $theme-primary;
            color: white;
          }
          &::-moz-selection {
            background: $theme-primary;
            color: white;
          }


        }
        .wrongurl {
          position: absolute;
          left: 20px;
          right: 20px;
          max-height: 0;
          overflow: hidden;
          @include transition-all();
          background-color: transparentize($theme-primary, 0.75);
          border-bottom-left-radius: 5px;
          border-bottom-right-radius: 5px;
          &.unrolled {
            padding: 10px;
            height: auto;
            max-height: 100px;
          }
        }
      }
      .docview {
        opacity: 0;
        @include transition-all();
        &.unrolled {
          opacity: 1;
        }
      }
    }
  }
  @media (min-width: 768px) {
    min-height: 100%;
    .header-content {
      position: absolute;
      top: 50%;
      -webkit-transform: translateY(-50%);
      -ms-transform: translateY(-50%);
      transform: translateY(-50%);
      padding: 0 50px;
      .header-content-inner {
        max-width: 1000px;
        margin-left: auto;
        margin-right: auto;
        p {
          font-size: 18px;
          max-width: 80%;
          margin: 20px auto;
        }
      }
    }
  }
}

// Sections

.section-heading {
  margin-top: 0;
}

#examples {
  p.example {
    font-style: italic;
    font-size: 12px;
    margin-top: 15px;
  }
}

.service-box {
  max-width: 400px;
  margin: 50px auto 0;
  @media (min-width: 992px) {
    margin: 20px auto 30px;
  }
  h3 {
    text-transform: uppercase;
  }
  p {
    margin-bottom: 0;
  }
}

.portfolio-box {
  position: relative;
  display: block;
  max-width: 650px;
  height: 255px;
  overflow: hidden;
  margin: 0 auto;
  margin-top: 20px;
  .portfolio-box-caption {
    color: white;
    opacity: 0;
    display: block;
    background: transparentize($theme-primary, 0.1);
    position: absolute;
    bottom: 0;
    text-align: center;
    width: 100%;
    height: 100%;
    @include transition-all;
    .portfolio-box-caption-content {
      width: 100%;
      height: 100%;
      text-align: center;
      position: absolute;
      .project-category,
      .project-name {
        @include sans-serif-font;
        padding: 0 15px;
      }
      .project-category {
        text-transform: uppercase;
        font-weight: 600;
        font-size: 14px;
        height: 40px;
        line-height: 40px;
      }
      .project-name {
        font-size: 18px;
      }

      a {
        &.before, &.after {
          position: absolute;
          width: 50%;
          top: 40px;
          bottom: 0;
          color: white;
          display: block;
          line-height: 100%;
          font-size: 1.5em;
          padding-top: 10%;
          text-align: center;
          &:hover {
            text-decoration: none;
            background-color: rgba(0, 0, 0, 0.2);
          }
          span.fa {
            display: block;
            margin: 10px;
          }  
        }
        &.before {
          left: 0;
        }
        &.after {
          right: 0;          
        }
      }

    }
  }
  &:hover {
    .portfolio-box-caption {
      opacity: 1;
    }
  }
  @media (min-width: 768px) {
    .portfolio-box-caption {
      .portfolio-box-caption-content {
        .project-category {
          font-size: 16px;
        }
        .project-name {
          font-size: 22px;
        }
      }
    }
  }
}

.call-to-action {
  h2 {
    margin: 0 auto 20px;
  }
}

// Bootstrap Overrides
.text-primary {
  color: $theme-primary;
}

.no-gutter > [class*='col-'] {
  padding-right:0;
  padding-left:0;
}

// Button Styles
.btn-default {
  @include button-variant($theme-dark, white, white);
}

.btn-primary {
  @include button-variant(white, $theme-primary, $theme-primary);
}
.btn-secondary {
  @include button-variant($theme-primary, white, $theme-primary);
}

.btn {
  @include sans-serif-font;
  border: none;
  border-radius: 300px;
  font-weight: 700;
  text-transform: uppercase;
}

.btn-xl {
  padding: 15px 30px;
}

// Extras
// -- Highlight Color Customization
::-moz-selection {
  color: white;
  text-shadow: none;
  background: $theme-dark;
}

::selection {
  color: white;
  text-shadow: none;
  background: $theme-dark;
}

img::selection {
  color: white;
  background: transparent;
}

img::-moz-selection {
  color: white;
  background: transparent;
}

body {
  -webkit-tap-highlight-color: $theme-dark;
}



#how-it-works {
  .carousel-control {
    background-image: none;
  }
  .carousel-caption {
    right: 0;
    left: 0;
    bottom: 0;
    background-color: transparentize($theme-dark, 0.4);
    padding: 20px;
  }
}

#contact {
  padding: 50px 0;
}

footer {
  text-align: center;
  padding: 10px;
  background-color: $theme-dark;
  color: white;
}

#contribute {
  .btn {
    margin-bottom: 20px;
  }
}

#how-it-works {
  a.btn-xl {
    margin: 15px auto;
  }

  div.count {
    font-size: 40px;
    border: 5px solid white;
    border-radius: 50px;
    width: 60px;
    height: 60px;
    margin: auto;
    font-weight: 700;
    line-height: 50px;
    text-align: center;
    margin-bottom: 20px;
  }
}

.vertical-align {
  display: flex;
  align-items: center;
}

img.img-center {
  margin: auto;
}

.img-loop {
  position: relative;
  .before, .after {
    display: none;
    position: absolute;
    width: 100%;
    height: 400px;
    a.img-hover {
      position: relative;
      display: block;
      &:after {
        position: absolute;
        top: 0;
        bottom: 0;
        left: 0;
        right: 0;
        background-color: transparentize($theme-primary, 0.2);
        content: '\f0c1';
        font: normal normal normal 14px/1 'FontAwesome';
        color: white;
        display: none;
        z-index: 1;
        font-size: 40px;
        line-height: 180px;
      }
      &:hover {
        &:after {
          display: block;
        }
      }
    }
    .btn {
      margin-top: 20px;
      width: 100px;      
    }
  }
}