@import '../util';

$transition-duration: 200ms;

.arrow {
  $size: 25px;

  width: $size;
  height: $size;
  position: relative;
  margin-bottom: 0.5px;

  svg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate3d(-50%, -50%, 0);
    overflow: visible;
  }

  polygon,
  rect {
    transition: all $transition-duration ease-in-out;
  }

  rect {
    opacity: 0;
  }
}

.homeEvents {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 8em 10%;

  h3 {
    font-size: 2.4rem;
  }

  p {
    color: #615d5d;
    font-size: 1.13rem;
    letter-spacing: 0.2px;
    font-family: MaisonNeue-Light, sans-serif;
    font-weight: 700;
  }

  & .events {
    display: flex;
    justify-content: center;

    & .eventCard {
      display: flex;
      flex-direction: column;
      font-size: 0.9rem;
      height: 200px;
      width: 282px;
      transition: all $transition-duration ease-in-out;
      margin: 0 1rem;
      border-radius: 1rem;
      border: 1px solid hsl(210deg 26% 28% / 14%);
      padding: 1rem;

      & > time {
        color: hsl(0deg 0% 78%);
      }

      & > h4 {
        flex-shrink: 0;
        flex-grow: 1;
        color: hsl(0deg 0% 30%);
      }

      & > div {
        color: hsl(0deg 0% 60%);
        display: flex;
        align-items: center;
      }

      &:hover {
        transform: scale3d(1.03, 1.03, 1);

        polygon {
          transform: translateX(100px) !important;
        }

        rect {
          transform: translateX(240px) !important;
          opacity: 1 !important;
        }
      }
    }
  }

  .newsletter {
    display: flex;
    font-family: MaisonNeue-Light, sans-serif;
    font-size: 0.95rem;
    color: #615d5d;
    letter-spacing: 0.2px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    margin: 25px 0;

    p {
      margin: 2rem 0 1rem;
    }
  }

  .newsButton {
    border: none;
    padding: 5px 30px;
    border-style: solid;
    border-radius: 20px;
    background: #030c16;
    color: white;
    margin: 0;
    text-decoration: none;
    transition: all 0.3s;

    &:hover {
      background: #9b9b9b;
      color: white;
      text-decoration: none;
    }
  }

  @include respond-below(sm) {
    margin: 4rem 1rem;
    align-items: flex-start;

    & .events {
      overflow-x: scroll;
      width: 100%;
      display: flex;
      justify-content: flex-start;
      padding-bottom: 1rem;

      & .eventCard {
        flex-shrink: 0;
      }
    }
  }
}
