// =============================================================================
// SCSS/SITE/STACKS/ICON/_POSTS-AND-PAGES.SCSS
// -----------------------------------------------------------------------------
// Styles for the site's posts and pages.
// =============================================================================

// =============================================================================
// TABLE OF CONTENTS
// -----------------------------------------------------------------------------
//   01. Main Containing Element
//   02. All Posts and Pages
//   03. Audio Posts
//   04. Image Posts
//   05. Gallery Posts
//   06. Quote Posts
//   07. Video Posts
//   08. Link Posts
//   09. Standard Posts
//   10. Portfolio Posts
//   11. Pages
//   12. Page Templates
//   13. 404 Page
// =============================================================================

// Main Containing Element
// =============================================================================

.x-main {
  position: relative;
  @include clearfix();
}



// All Posts and Pages
// =============================================================================

.hentry {
  position: relative;
  border-top: 1px solid $baseBorderSolid;
  border-top: 1px solid $baseBorderRgba;
  padding: 50px 0;
  @include clearfix();
  @include break(middle-bear) {
    padding: 35px 0;
  }

  &:first-child {
    border-top: 0;
  }


  &:last-child {
    border-bottom: 1px solid $baseBorderSolid;
    border-bottom: 1px solid $baseBorderRgba;
  }

  p,
  ul,
  ol {
    &:last-child {
      margin-bottom: 0;
    }
  }
}

.single .hentry {
  border-bottom: 1px solid $baseBorderSolid;
  border-bottom: 1px solid $baseBorderRgba;
}

.meta-comments {
  position: absolute;
  top: 10px;
  right: 10px;
  display: inline-block;
  width: 50px;
  height: 50px;
  margin: 0 auto;
  border: 1px solid $baseBorderSolid;
  border: 1px solid $baseBorderRgba;
  font-family: $altFontFamily;
  @include font-size(1.8);
  font-weight: 400;
  letter-spacing: 0;
  line-height: 48px;
  text-align: center;
  color: $black;
  color: rgba(0, 0, 0, 0.55);
  background-color: $white;
  border-radius: 100em;
  @include break(middle-bear) {
    width: 38px;
    height: 38px;
    @include font-size(1.4);
    line-height: 36px;
  }

  &:hover {
    color: rgba(0, 0, 0, 0.55);
  }
}

.entry-featured {
  position: relative;
  margin-top: 3%;
  border: 1px solid $baseBorderSolid;
  border: 1px solid $baseBorderRgba;
  padding: 7px;
  background-color: $baseModBackground;
}

.entry-thumb {
  display: block;
  position: relative;
  background-color: $baseModBackground;
  @include translate3d(0, 0, 0);

  img {
    min-width: 100%;
    @include transition(#{opacity 0.75s ease});
  }

  &:before {
    content: "\f0c1";
    display: block;
    position: absolute;
    margin: -36px 0 0 -35px;
    top: 50%;
    left: 50%;
    width: 70px;
    height: 70px;
    font-family: "fontawesome";
    @include font-size(4.2);
    font-style: normal;
    font-weight: normal;
    line-height: 72px;
    text-align: center;
    speak: none;
    vertical-align: middle;
    -webkit-font-smoothing: antialiased;
    color: $textColor;
    border-radius: 100em;
    @include opacity(0);
    @include transition(#{opacity 0.75s ease});
  }
}

a.entry-thumb:hover {
  img {
    @include opacity(0.35);
  }

  &:before {
    @include opacity(1);
  }
}

.h-entry {
  position: relative;
  width: 88%;
  margin: 0 auto;
  padding: 0 20px;
  font-size: 314%;
  line-height: 1;
  text-align: center;
  word-wrap: break-word;
  @include break(cubs)        { font-size: 257%; }
  @include break(middle-bear) { font-size: 200%; }
  @include break(baby-bear)   { font-size: 156%; }

  a {
    border: 0;
    @include opacity(1);

    &:hover {
      color: $headingsColor;
      @include opacity(0.65);
    }
  }

  &:before {
    position: relative;
    top: -0.125em;
    margin-right: 0.35em;
    font-family: "fontawesome";
    font-size: 0.85em;
    font-style: normal;
    font-weight: normal;
    line-height: 1;
    speak: none;
    vertical-align: middle;
    -webkit-font-smoothing: antialiased;
    @include opacity(0.5);
  }
}

.h-entry-sub {
  margin: 0.725em 0 0;
  font-size: 150%;
  font-weight: 300;
  color: $textColor;
  line-height: 1.05;
}

.p-meta {
  margin-top: 1%;
  font-size: 125%;
  line-height: 1;
  text-align: center;
  color: $headingsColor;
  @include opacity(0.35);
  @include break(middle-bear) {
    font-size: 112%;
  }

  span {
    margin: 0 1.75%;

    a {
      white-space: nowrap;
    }
  }
}

.entry-content,
.entry-excerpt {
  margin-top: 3%;
  padding: 0 10%;
  @include break(middle-bear) {
    padding: 0;
  }
}

.entry-content {
  .more-link {
    line-height: 1.4;
  }
}

.entry-excerpt {
  p {
    margin-bottom: 0;
  }
}

.more-link {
  font-size: 135%;
  text-transform: uppercase;
}

.entry-footer {
  margin-top: 0.615em;

  a {
    @include btn_simple();
  }
}

.entry-sharing {
  @include font-size(1.6);
  line-height: 1;

  .entry-share {
    margin: 0 1.25%;
  }
}



// Audio Posts
// =============================================================================

.format-audio {
  .h-entry:before {
    content: "\f001";
  }

  &.no-post-thumbnail {
    .entry-featured {
      margin-bottom: 1.5em;
      padding: 0;
      background-color: transparent;
    }
  }

  &.has-post-thumbnail {
    .entry-featured {
      .x-responsive-audio-embed,
      .jp-controls-container-audio {
        position: absolute;
        left: 20px;
        right: 20px;
        bottom: 20px;
        margin: 0 auto;

        iframe {
          position: absolute;
          bottom: 0;
        }
      }
    }
  }
}



// Image Posts
// =============================================================================

.format-image {
  .h-entry:before {
    content: "\f083";
  }
}



// Gallery Posts
// =============================================================================

.format-gallery {
  .h-entry:before {
    content: "\f03e";
  }
}



// Quote Posts
// =============================================================================

.format-quote {
  .h-entry:before {
    content: "\f10d";
  }

  .h-entry-sub {
    font-size: 171.4%;
    line-height: 1.4;
    text-align: center;
    @include break(cubs)        { font-size: 156%; }
    @include break(middle-bear) { font-size: 132%; }
    @include break(baby-bear)   { font-size: 121%; }
  }
}



// Video Posts
// =============================================================================

.format-video {
  .h-entry:before {
    content: "\f008";
  }
}



// Link Posts
// =============================================================================

.format-link {
  .h-entry .entry-external-link {
    @include opacity(0.5);
    color: $headingsColor;

    &:hover {
      @include opacity(1);
      color: $headingsColor;
    }
  }
}



// Standard Posts
// =============================================================================

.format-standard {
  .h-entry:before {
    content: "\f0f6";
  }
}



// Portfolio Posts
// =============================================================================

.x-portfolio {
  background-color: #f5f5f5;

  .entry-featured {
    background-color: $white;
  }

  .entry-extra {
    margin-top: 45px;
    padding: 0 10%;
    text-align: center;
    @include break(middle-bear) {
      padding: 0;
    }

    .h-extra {
      margin-top: 0;
    }

    ul {
      margin: 0 0 35px;

      li {
        margin: 0.25em;
        padding: 0.75em 1.15em 0.85em 1.05em;
        line-height: 1;
        background-color: $baseModBackground;

        &:first-child {
          margin-left: 0;
        }

        &:last-child {
          margin-right: 0;
        }

        i {
          position: relative;
          top: 0.115em;
        }
      }
    }

    .x-btn {
      margin-bottom: 48px;
    }
  }
}

.post-type-archive-x-portfolio {
  .site {
    background-color: #f5f5f5;
  }

  .x-portfolio {
    padding: 10px;
    border: 0;
    background-color: transparent;

    .x-container-fluid.max.width {
      width: 100%;
      max-width: none;
    }

    .entry-featured {
      margin: 0;
    }

    .entry-thumb {
      border: 0;
    }
  }
}



// Pages
// =============================================================================

.page .hentry {
  &:last-child {
    border-bottom: 0;
  }

  .entry-content {
    padding: 0;
  }
}



// Page Templates
// =============================================================================

[class*="page-template-template-blank"] {
  .entry-content {
    margin: 0;
  }
}

.page-template-template-blank-1-php.x-content-sidebar-active,
.page-template-template-blank-2-php.x-content-sidebar-active,
.page-template-template-blank-4-php.x-content-sidebar-active,
.page-template-template-blank-5-php.x-content-sidebar-active {
  padding-right: 0;
}

.page-template-template-blank-1-php.x-sidebar-content-active,
.page-template-template-blank-2-php.x-sidebar-content-active,
.page-template-template-blank-4-php.x-sidebar-content-active,
.page-template-template-blank-5-php.x-sidebar-content-active {
  padding-left: 0;
}

.page-template-template-blank-3-php.x-navbar-fixed-left-active,
.page-template-template-blank-3-php.x-navbar-fixed-right-active,
.page-template-template-blank-3-php.x-content-sidebar-active,
.page-template-template-blank-3-php.x-sidebar-content-active,
.page-template-template-blank-6-php.x-navbar-fixed-left-active,
.page-template-template-blank-6-php.x-navbar-fixed-right-active,
.page-template-template-blank-6-php.x-content-sidebar-active,
.page-template-template-blank-6-php.x-sidebar-content-active {
  padding: 0;
}

.page-template-template-blank-4-php,
.page-template-template-blank-5-php,
.page-template-template-blank-6-php {
  .hentry {
    padding: 0;
  }
}

.page-template-template-layout-full-width-php {
  &.x-sidebar-content-active {
    padding-left: 0;
  }

  &.x-content-sidebar-active {
    padding-right: 0;
  }
}

.page-template-template-layout-content-sidebar-php,
.page-template-template-layout-sidebar-content-php {
  padding: 0 !important;
}

[class*="page-template-template-blank"],
.page-template-template-layout-full-width-php {
  &.x-sidebar-content-active .x-widgetbar {
    left: 0;
  }

  &.x-content-sidebar-active .x-widgetbar {
    right: 0;
  }
}



// 404 Page
// =============================================================================

.error404 {
  .entry-404 {
    margin: 8.5% 0;

    p {
      max-width: 750px;
      margin: 0 auto 1.313em;
      font-size: 1.5em;
      @include break(middle-bear) {
        font-size: 1.25em;
      }
      @include break(baby-bear) {
        font-size: 1em;
      }
    }

    .form-search {
      max-width: 500px;
      margin: 0 auto;
    }
  }
}