@import "parts/flex-mixins";
@import "parts/filter-decorations-base";
@import "parts/decorations/filter";
@import "parts/decorations/pagination";

.base-transition(@type) {
  transition: @type 0.3s;
}

.elementor-element.elementor-widget {
  .entry-title a,
  .entry-meta a,
  .entry-meta > span,
  .portfolio-categories a,
  .portfolio-categories > span {
    text-decoration: inherit;

    &:hover {
      text-decoration: inherit;
    }
  }
}

.elementor-widget.elementor-widget-the7_elements {

  .filter {
    flex-wrap: wrap;
  }

  article {
    .flex-display(@display: flex);
    .align-items(@align: flex-start);
  }

  .mode-masonry:not(.bottom-overlap-layout-list) article,
  .mode-grid:not(.bottom-overlap-layout-list) article {
    .flex-flow(column nowrap);
    .align-items(@align: stretch);
  }

  .bottom-overlap-layout-list article {
    .flex-flow(column nowrap);
    .align-items(@align: center);
  }

  .gradient-overlay-layout-list.mode-grid article,
  .content-rollover-layout-list.mode-grid article {
    height: auto;
  }

  .hover-grid article,
  .hover-grid-reverse article {
    position: relative;
    overflow: hidden;
  }

  .gradient-overlay-layout-list article {
    overflow: hidden;
    transform: translateZ(0);
  }

  .scale-img .post-thumbnail-rollover,
  .quick-scale-img .post-thumbnail-rollover {
    transform: translateZ(0);
  }

  .post-thumbnail-wrap {
    position: relative;
    width: 100%;
    .box-sizing (border-box);
    -ms-flex: 0 0 auto;
  }

  .post-thumbnail {
    position: relative;
    display: block;
  }

  .post-thumbnail:not(.overlay-placeholder) > .post-thumbnail-rollover img {
    width: 100%;
  }

  .mobile-false & .quick-scale-img {
    &.gradient-overlay-layout-list,
    &.content-rollover-layout-list,
    &.gradient-overlap-layout-list {
      article:hover .post-thumbnail:not(.overlay-placeholder) > .post-thumbnail-rollover img {
        transform: scale(1.2);
        transition: transform 0.25s ease-out;
      }
    }
  }

  .mobile-true & .quick-scale-img {
    &.gradient-overlay-layout-list,
    &.content-rollover-layout-list {
      article.is-clicked .post-thumbnail:not(.overlay-placeholder) > .post-thumbnail-rollover img {
        transform: scale(1.2);
        transition: transform 0.25s ease-out;
      }
    }
  }

  .mobile-false & .gradient-overlap-layout-list.scale-img article:hover,
  .mobile-true & .gradient-overlap-layout-list.scale-img .is-clicked {
    .post-thumbnail > .post-thumbnail-rollover img {
      transform: scale(1.2);
      transition: transform 4s ease-out;
    }
  }

  .post-entry-wrapper {
    display: flex;
    flex-flow: column nowrap;
  }

  .post-entry-content {
    line-height: 0;
    position: relative;
    z-index: 10;

    @keyframes fadeInFromNone {
      0% {
        visibility: hidden;
        opacity: 0;
      }

      1% {
        visibility: visible;
        opacity: 0;
      }

      100% {
        visibility: visible;
        opacity: 1;
      }
    }
    @keyframes fadeToNone {
      0% {
        opacity: 1;
      }

      1% {
        opacity: 0;
      }

      100% {
        opacity: 0;
        visibility: hidden;
      }
    }
  }

  .gradient-overlap-layout-list .post-entry-content {
    position: relative;
    margin-top: -125px;
    z-index: 1;
    padding-top: 90px;

    &:before {
      position: absolute;
      top: 0;
      left: 0;
      z-index: -1;
      width: 100%;
      height: 150px;
      content: "";
    }
  }

  .gradient-overlay-layout-list .post-entry-content {
    position: absolute;
    .flex-display(@display: flex);
    .justify-content(@justify: center);
    .flex-flow(column nowrap);
    background: none;
    width: 100%;
    min-height: 100%;
    left: 0;
    top: 0;
    overflow: hidden;
    transition: opacity 0.35s;
  }

  .mobile-true & .hover-scale.gradient-overlay-layout-list .post-entry-conten {
    opacity: 0;
  }

  .mobile-false & .hover-scale .post-entry-content {
    transform: scale(0);
    transition: transform 0.25s cubic-bezier(.4, 0, .2, 1), opacity 0.25s;
  }

  .mobile-false & .hover-scale article:hover .post-entry-content {
    opacity: 1;
    transform: scale(1);
  }

  .mobile-false & .hover-scale .rollover-project:hover:after,
  .mobile-false & .hover-scale article:hover:after,
  .mobile-true & .hover-scale article.is-clicked:after {
    opacity: 1;
    transform: scale(2.0);
  }

  .hover-grid .post-entry-content,
  .hover-grid-reverse .post-entry-content {
    opacity: 0;
  }

  .mobile-false & .hover-grid article:hover,
  .mobile-false & .hover-grid-reverse article:hover,
  .mobile-true & .hover-grid .is-clicked,
  .mobile-true & .hover-grid-reverse .is-clicked {
    .post-entry-content {
      opacity: 1;
    }
  }

  .mobile-true & .hover-scale.gradient-overlay-layout-list .is-clicked,
  .mobile-true & .hover-scale article.is-clicked {
    .post-entry-content {
      opacity: 1;
    }
  }

  .content-rollover-layout-list .post-entry-content {
    height: auto;
    position: absolute;
  }

  .gradient-overlay-layout-list.hover-fade article .post-entry-content {
    opacity: 0;
    visibility: hidden;
  }

  .mobile-false & .gradient-overlay-layout-list.hover-fade article:hover,
  .mobile-true & .gradient-overlay-layout-list.hover-fade article.is-clicked {
    .post-entry-content {
      opacity: 1;
      visibility: visible;
    }
  }


  .mobile-false & .hover-scale .post-thumbnail-rollover:after {
    display: none;
  }

  .entry-excerpt {
    overflow: hidden;
  }

  .entry-meta * {
    color: inherit;
  }

  .entry-meta {
    padding: 0;

    & > span a {
      display: inline-block;
    }
  }

  #page & .the7-elementor-widget:not(.keep-custom-css) .entry-title a {
    .base-transition(color);

    &:hover {
      background: inherit;
      color: inherit;
    }
  }

  .post-thumbnail > .post-thumbnail-rollover:after {
    opacity: 1;
    .base-transition(background-color);
  }

  .enable-bg-rollover .post-thumbnail > .post-thumbnail-rollover:after {
    opacity: 0;
    .base-transition(opacity);
  }

  .post-thumbnail:hover > .post-thumbnail-rollover:after,
  .mobile-true & .is-clicked .post-thumbnail > .post-thumbnail-rollover:after,
  .gradient-overlap-layout-list article:hover .post-thumbnail-rollover:after,
  .mobile-true & .gradient-overlap-layout-list .is-clicked .post-thumbnail-rollover:after {
    opacity: 1;
  }

  .description-under-image .post-thumbnail-wrap {
      text-align: center;
      line-height: 0;
  }

  .project-links-container {
    & a {
      display: flex;
      justify-content: center;
      position: relative;
      font-size: 0;
      line-height: 0;
      opacity: 0;
      text-align: center;
      -webkit-backface-visibility: hidden;
      .base-transition(opacity);
      border-radius: var(--the7-base-border-radius);

      &:before,
      &:after {
        position: absolute;
        background: none;
        border-style: solid;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        content: "";
        box-sizing: border-box;
        border-radius: inherit;
        transition: none;
        -webkit-backface-visibility: hidden;
      }

      &:before,
      &:hover:after {
        opacity: 1;
      }

      &:after,
      &:hover:before {
        opacity: 0;
      }

      &:hover:before,
      &:not(:hover):after {
        transition-delay: 0.100s;
      }

      & > span {
        position: relative;
        z-index: 2;
        transition: color 0.250s;
        vertical-align: middle;
      }
    }
  }

  .post-entry-content:hover .project-links-container a,
  .post-thumbnail:hover .project-links-container a,
  .gradient-overlap-layout-list article:hover .project-links-container a {
    opacity: 1;
  }

  .post-thumbnail-wrap .project-links-container {
    .flex-display(@display: flex);
    .align-items(@align: center);
    .justify-content(@justify: center);

    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
  }

  .gradient-overlap-layout-list .project-links-container {
    height: calc(100% ~'-' 125px);
  }

  .entry-meta .meta-item {
    padding: 0;
    margin: 0;

    &:not(:last-child) {
      margin: 0 5px 0 0;
    }

    &:not(:first-child):before {
      position: relative;
      box-shadow: none;
      margin: 0 5px 0 0;
      height: auto;
      width: auto;
      content: '';
    }

    &:after {
      right: inherit;
      width: inherit;
      height: inherit;
      top: inherit;
      transform: inherit;
      content: "";
      background: none;
    }
  }

  .entry-meta > .data-link:hover {
    text-decoration: none;
  }

  .paginator {
    a.button-load-more {
      width: auto;
      height: auto;

      i {
        line-height: inherit;
        font-size: inherit;
      }
    }

    .disabled {
      display: none;
    }
  }

  .hidden {
    display: none;
    opacity: 0;
  }

  @import "the7-masonry/defaults";
  @import "the7-masonry/hovers";
  @import "the7-masonry/read-more-button";
}