.pg-mosaic-grid {
  display: grid;
}
.pg-mosaic-item {
  background: rgba(13, 59, 84, 0.8);
  position: relative;
  overflow: hidden;
  text-align: center;
  &:hover {
    .pg-mosaic-image-wrap {
      &::before {
        background: transparent;
      }
    }
    .pg-mosaic-date {
      opacity: 1;
      transform: translateY(0);
    }
    .pg-mosaic-title {
      opacity: 0;
      transform: rotateX(90deg);
    }
    .pg-mosaic-readmore {
      opacity: 1;
      transform: rotateX(0);
    }
  }
}

.pg-mosaic-image-wrap {
  inline-size: 100%;
  block-size: 100%;
  position: relative;
  overflow: hidden;

  &::before {
    position: absolute;
    content: "";
    inline-size: 100%;
    block-size: 100%;
    inset-block-start: 0;
    inset-inline-start: 0;
    background: rgba(13, 59, 84, 0.2);
    z-index: 1;
    transition: all 0.4s cubic-bezier(0.17, 0.73, 0.66, 0.99);
  }

  .pg-mosaic-img {
    inline-size: 100%;
    block-size: 100%;
    object-fit: cover;
    vertical-align: middle;
  }
}

.pg-mosaic-content {
  position: absolute;
  inset-block-start: 0;
  inset-inline-start: 0;
  inset-inline-end: 0;
  block-size: 100%;
  display: inline-flex;
  flex-direction: column;
  justify-content: space-between;
  z-index: 1;
}

.pg-mosaic-readmore {
  margin-block-end: 40px;
  opacity: 0;
  transform: rotateX(90deg);
  transition: transform 0.3s cubic-bezier(0.17, 0.73, 0.66, 0.99) 0s,
    z-index 0s step-end, opacity 0.4s ease;
  a {
    text-decoration: none;
    color: rgba(13, 59, 84, 0.8);
    padding: 12px 30px;
    font-size: 10px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    position: relative;
    overflow: hidden;
    &:hover {
      color: #fff;
    }

    &::before,
    &::after {
      content: "";
      position: absolute;
      transition: all 300ms ease;
    }
    &::before {
      inset-inline-start: 0;
      inset-block-start: 0;
      inline-size: 0px;
      block-size: 100%;
    }

    &:hover {
      &::before {
        inline-size: 100%;
      }
      &::after {
        inline-size: 0px;
      }
      span {
        &::before {
          block-size: 100%;
        }
        &::after {
          block-size: 100%;
          transition-delay: 200ms;
        }
      }
    }

    span {
      display: inline-block;
      transition: all 300ms ease;
      position: relative;
      z-index: 99;
      text-transform: uppercase;

      &::before,
      &::after {
        content: "";
        position: absolute;
        transition: all 300ms ease;
        inline-size: 1px;
        block-size: 0px;
        background-color: #fff;
      }
      &::before {
        inset-inline-start: -10px;
        inset-block-end: 0;
      }
      &::after {
        inset-block-start: 0;
        inset-inline-end: -10px;
      }
    }
  }
}
.pg-mosaic-date {
  margin-block-start: 40px;
  display: inline-flex;
  justify-content: center;
  transform: translateY(-40px);
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.17, 0.73, 0.66, 0.99) 0s,
    z-index 0s step-end, opacity 0.4s ease;
  span {
    color: rgba(13, 59, 84, 0.8);
    font-size: 10px;
    background: #fff;
    padding: 10px;
    text-transform: uppercase;
    font-weight: 600;
  }
}
.pg-mosaic-title {
  font-size: 22px;
  font-weight: 700;
  opacity: 1;
  transform: rotateX(0);
  text-transform: uppercase;
  transition: transform 0.3s cubic-bezier(0.17, 0.73, 0.66, 0.99) 0s,
    z-index 0s step-end, opacity 0.4s ease;
  color: #fff;
  padding: 10px 15px;
  background: rgba(13, 59, 84, 0.8);
  margin: 0 auto;
}
