/* -------------------------------------------
    Overlay
---------------------------------------------- */

.overlay,
.overlay-visible {
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  color: var(--alpha-change-color-light-1);
  transition: padding 0.3s ease-out, background-color 0.3s, opacity 0.3s;
}

.overlay {
  padding-top: 10rem;
  background: rgba(0, 0, 0, 0.3);
  opacity: 0;

  a>& {
    cursor: pointer;
  }

  figure:hover & {
    padding-top: 0;
    opacity: 1;
  }
}

.overlay-visible {
  figure:hover & {
    background-color: var(--alpha-primary-color-op-80);
    padding-bottom: 9rem;
  }
}

.overlay-transparent {
  background: transparent;
}

// Global Overlays
.overlay-dark,
.overlay-light {

  figure,
  .banner {
    position: relative;
  }

  figure::after,
  figure>a::after,
  .slider-wrapper>figure>a::after,
  &.banner::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    background: rgba(51, 51, 51, 0.2);
    opacity: 0;
    border-radius: inherit;
    transition: opacity 0.3s, background 0.3s, transform 0.3s;
  }

  &:hover>figure::after,
  &:hover>figure>a::after,
  &:hover .slider-wrapper>figure>a::after,
  &.banner:hover::after {
    opacity: 1;
    visibility: visible;
  }

  &.banner-fixed::after,
  .post-media::after,
  .has-link::after {
    content: none;
  }

  .post-media>a::after {
    z-index: 1;
  }
}

.overlay-light {

  figure::after,
  figure>a::after,
  &.banner::after {
    background: rgba(255, 255, 255, 0.2);
  }
}

.post-media {
  overflow: hidden;
}

figure.has-link>a {
  position: absolute;
  inset: 0;
}

// Zoom
.overlay-zoom {
  figure {
    overflow: hidden;
  }

  img {
    transition: transform 1.3s, opacity .3s, filter .3s;
  }

  &:hover img {
    transform: scale(1.08);
  }
}

.alpha-img-zoom img {
  transition: transform 1.3s, opacity .3s, filter .3s;
}

// Effect
.overlay-effect {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 1;
}

.overlay-effect-1 {

  &:before,
  &:after {
    content: "";
    position: absolute;
    opacity: 1;
  }

  &:before {
    background: rgba(255, 255, 255, 0.3);
    bottom: 0;
    left: 50%;
    right: 51%;
    top: 0;
  }

  &:after {
    bottom: 50%;
    left: 0;
    right: 0;
    top: 50%;
  }

  .overlay-wrapper:hover & {

    &:before,
    &:after {
      left: 0;
      right: 0;
      opacity: 0;
      transition: 0.5s linear;
    }
  }
}

.overlay-effect-2 {
  overflow: hidden;

  &:before,
  &:after {
    content: "";
    position: absolute;
    background: rgba(255, 255, 255, 0.6);
    height: 100%;
    left: 0;
    opacity: 0.4;
    top: 0;
    transition: 0.9s;
    width: 100%;
  }

  &:before {
    transform: translate(105%, 0%);
  }

  &:after {
    transform: translate(-105%, 0%);
  }

  .overlay-wrapper:hover & {

    &:before,
    &:after {
      opacity: 0;
      transform: none;
    }
  }
}

.overlay-effect-3 {
  overflow: hidden;

  &:before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    width: 120%;
    height: 60px;
    background: rgba(255, 255, 255, 0.1);
    transform: scale3d(1.9, 1.4, 1) rotate3d(0, 0, 1, 45deg) translate3d(0, -150%, 0);
    transition: 0.5s linear;
    backface-visibility: hidden;
  }

  .overlay-wrapper:hover & {
    &::before {
      top: 100%;
      left: -100%;
      transform: scale3d(1.9, 1.4, 1) rotate3d(0, 0, 1, 45deg) translate3d(0, 200%, 0);
    }
  }
}

.overlay-effect-4 {

  &:before,
  &:after {
    content: "";
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    opacity: 1;
    transition: 0.5s;
  }

  &:before {
    bottom: 0;
    left: 50%;
    right: 51%;
    top: 0;
  }

  &:after {
    bottom: 50%;
    left: 0;
    right: 0;
    top: 50%;
  }

  .overlay-wrapper:hover & {

    &:before,
    &:after {
      left: 0;
      right: 0;
      top: 0;
      bottom: 0;
      opacity: 0.5;
    }
  }
}

.overlay-effect-5,
.overlay-effect-6,
.overlay-effect-7 {
  overflow: hidden;
}

.overlay-effect-5:after,
.overlay-effect-5:before,
.overlay-effect-6+figure:before,
.overlay-effect-6 figure:before,
.overlay-effect-7:before {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  content: "";
  opacity: 0;
  transition: all 0.3s;
}

.overlay-effect-6:after,
.overlay-effect-6:before,
.overlay-effect-7:after {
  position: absolute;
  top: 30px;
  right: 30px;
  bottom: 30px;
  left: 30px;
  content: "";
  opacity: 0;
  transition: all 0.3s;
  z-index: 1;
}

.overlay-effect-5 {
  &:after {
    border-top: 1px solid var(--alpha-white-color);
    border-bottom: 1px solid var(--alpha-white-color);
    transform: rotate3d(0, 0, 1, -45deg) scale3d(1, 0, 1);
    transform-origin: 50% 50%;
  }

  &:before {
    background-color: var(--alpha-change-color-dark-1);
    z-index: 1;
  }

  &+figure {
    overflow: hidden;

    img {
      transition: transform 0.3s, opacity .3s, filter .3s;
    }
  }
}

.overlay-effect-6 figure {
  position: relative;

  &:before {
    background-color: var(--alpha-change-color-dark-1);
  }
}

.overlay-effect-5 figure img {
  transition: transform 0.3s, opacity .3s, filter .3s;
}

.overlay-effect-6 {
  &:after {
    border-right: 1px solid var(--alpha-white-color);
    border-left: 1px solid var(--alpha-white-color);
    transform: scale(1, 0);
  }

  &:before {
    border-top: 1px solid var(--alpha-white-color);
    border-bottom: 1px solid var(--alpha-white-color);
    transform: scale(0, 1);
  }

  &+figure {
    position: relative;

    &:before {
      background-color: var(--alpha-change-color-dark-1);
    }
  }
}

.overlay-effect-7 {
  &:after {
    border: 2px solid var(--alpha-change-color-dark-1);
    box-shadow: 0 0 0 30px rgb(255 255 255 / 20%);
    transform: scale3d(1.4, 1.4, 1);
  }

  &:before {
    background-color: var(--alpha-change-color-dark-1);
  }
}

.overlay-wrapper:hover .overlay-effect-5 {
  &:after {
    opacity: 1;
    transform: rotate3d(0, 0, 1, -45deg) scale3d(1, 1, 1);
  }

  &:before {
    opacity: 0.3;
  }

  &+figure img,
  figure img {
    transform: scale(1.08);
  }
}

.overlay-wrapper:hover .overlay-effect-6 {

  &:after,
  &:before {
    opacity: 1;
    transform: scale(1);
  }

  &+figure:before,
  figure:before {
    opacity: 0.4;
  }
}

.overlay-wrapper:hover .overlay-effect-7 {
  &:after {
    opacity: 1;
    transform: scale3d(1, 1, 1);
  }

  &:before {
    opacity: 0.5;
  }
}

// Image Filter Options
.overlay-image-filter img {
  transition: filter 0.4s;
}

.overlay-blur:hover img {
  filter: blur(4px);
}

.overlay-brightness:hover img {
  filter: brightness(1.5);
}

.overlay-contrast:hover img {
  filter: contrast(1.5);
}

.overlay-grayscale:hover img {
  filter: grayscale(1);
}

.overlay-hue:hover img {
  filter: hue-rotate(270deg);
}

.overlay-opacity:hover img {
  filter: opacity(0.5);
}

.overlay-saturate:hover img {
  filter: saturate(3);
}

.overlay-sepia:hover img {
  filter: sepia(0.5);
}

// Banner Background
.background-effect-wrapper {
  overflow: hidden;
}

.background-effect-wrapper,
.background-effect {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}