// =============================================================================
// _POSTS-AND-PAGES.SCSS
// -----------------------------------------------------------------------------
// Site styles.
// =============================================================================

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

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

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

  .widget {
    margin-top: 3em;

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



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

.hentry,
.search-results .x-container > .product {
  .entry-wrap {
    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 {
    .entry-wrap {
      border-top: 0;
    }
  }

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

.single .hentry .entry-wrap {
  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;
    @include font-size(4.2);
    line-height: 72px;
    text-align: center;
    vertical-align: middle;
    color: $textColor;
    border-radius: 100em;
    @include opacity(0);
    @include transition(#{opacity 0.75s ease});
    @include font-awesome();
  }
}

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

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

.entry-title {
  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-size: 0.85em;
    line-height: 1;
    vertical-align: middle;
    @include opacity(0.5);
    @include font-awesome();
  }
}

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

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

  > span {
    display: inline-block;
    margin: 0 1.75%;
  }
}

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

  embed,
  iframe,
  object {
    width: 100%;
    max-width: 100%;
  }

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

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

.entry-content.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%;
  }
}



// Posts
// =============================================================================

.x-iso-container-posts {
  &.cols-2 {
    .entry-title {
      font-size: 200%;
      @include break(baby-bear) {
        font-size: 145%;
      }
    }

    .p-meta {
      margin-top: 2.25%;
    }

    .meta-comments {
      width: 42px;
      height: 42px;
      @include font-size(1.6);
      line-height: 40px;
      @include break(cubs) {
        top: 8px;
        right: 8px;
        width: 30px;
        height: 30px;
        @include font-size(1.1);
        line-height: 28px;
      }
    }

    .entry-wrap {
      padding: 7.5% 0;
    }

    .entry-featured {
      margin-top: 4.5%;
    }
  }

  &.cols-3 {
    .entry-title {
      font-size: 175%;
      @include break(old-bear) {
        font-size: 145%;
      }
      @include break(baby-bear) {
        font-size: 145%;
      }
    }

    .p-meta {
      margin-top: 3%;
      font-size: 100%;
    }

    .meta-comments {
      width: 35px;
      height: 35px;
      @include font-size(1.3);
      line-height: 35px;
      @include break(cubs) {
        top: 8px;
        right: 8px;
        width: 30px;
        height: 30px;
        @include font-size(1.1);
        line-height: 28px;
      }
    }

    .entry-wrap {
      padding: 7.5% 0;
    }

    .entry-featured {
      margin-top: 4.5%;
    }
  }

  > .hentry {
    padding: 10px;

    .entry-wrap {
      border: 1px solid $baseBorderSolid;
      border: 1px solid $baseBorderRgba;
      background-color: $baseModBackground;
    }
  }
}

.x-post-meta-disabled {
  .post {
    .entry-featured {
      margin-top: 5%;
    }
  }
}



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

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

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

  &.has-post-thumbnail {
    .entry-featured {
      .x-audio {
        position: absolute;
        left: 20px;
        right: 20px;
        bottom: 20px;
        margin: 0 auto;

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



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

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



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

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



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

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

  .entry-title-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%; }
  }
}

.x-blog-masonry-active {
  .format-quote {
    .entry-title-sub {
      font-size: 145%;
    }
  }
}



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

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



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

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

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



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

.format-standard {
  .entry-title: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;
    }
  }
}

.page-template-template-layout-portfolio-php {
  .site {
    background-color: #f5f5f5;
  }
}

.x-iso-container-portfolio {
  .x-portfolio {
    background-color: transparent;

    .entry-wrap {
      border: 0;
      padding: 10px;
    }

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

    .entry-featured {
      margin: 0;
    }

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

.x-portfolio-meta-disabled {
  .single-x-portfolio {
    .entry-featured {
      margin-top: 5%;
    }
  }
}



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

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

  .entry-content {
    padding: 0;
  }
}



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

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

.x-page-title-disabled .no-post-thumbnail .entry-content,
.x-page-title-disabled .has-post-thumbnail .entry-featured {
  margin-top: 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,
.page-template-template-blank-7-php.x-navbar-fixed-left-active,
.page-template-template-blank-7-php.x-navbar-fixed-right-active,
.page-template-template-blank-7-php.x-content-sidebar-active,
.page-template-template-blank-7-php.x-sidebar-content-active,
.page-template-template-blank-8-php.x-navbar-fixed-left-active,
.page-template-template-blank-8-php.x-navbar-fixed-right-active,
.page-template-template-blank-8-php.x-content-sidebar-active,
.page-template-template-blank-8-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,
.page-template-template-blank-8-php {
  .hentry .entry-wrap {
    padding: 0;
  }
}

[class*="page-template-template-blank"] {
  &.x-sidebar-content-active .x-widgetbar,
  &.x-sidebar-content-active .x-navbar-fixed-top {
    left: 0;
  }

  &.x-content-sidebar-active .x-widgetbar,
  &.x-content-sidebar-active .x-navbar-fixed-top {
    right: 0;
  }
}

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

  .site {
    width: 100%;
    max-width: none;
    border: 0;
  }

  .hentry .entry-wrap {
    border: 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;
    }
  }
}