@import url('https://fonts.googleapis.com/css2?family=Fira+Sans:wght@300;400;600&display=swap');

$firaSans: 'Fira Sans', sans-serif;

html {
  box-sizing: border-box;
  font-size: 100%;
}

html,
main {
  height: 100%;
  
}

*, *:before, *:after {
  box-sizing: inherit;
}

img {
  max-width: 100%;
  height: auto;
}

main {
  -webkit-text-size-adjust: 100%;
  font-variant-ligatures: none;
  text-rendering: optimizeLegibility;
  -moz-osx-font-smoothing: grayscale;
  -webkit-font-smoothing: antialiased;
  font-size: 100%;
  font-family: $firaSans;
}

h1,
h2,
h3,
h4,
h5 {
  font-weight: 800;
  margin-top: 0;
  margin-bottom: 0;
}


main {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin: 0;
  padding: 0;
  height: 100vh;
  color: #1F1D42;
  background-color: #F0F8E1;
}

.flex{

    display: flex;
    max-width: 93%;
    margin: 0 auto;
}
.margin{
    margin:0 53px;
}

.card-hover {

  $root: &;
  width: 360px;
  height: 500px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 32px -10px rgba(0,0,0,0.08);
  border-radius: 16px;

  &:has(#{$root}__link:hover) {

    #{$root}__extra {
      transform: translateY(0);
      transition: transform 0.35s;
    }
  }

  &:hover {
   
    #{$root} {

      &__content {
        background-color: #DEE8C2;
        bottom: 100%;
        transform: translateY(100%);
        padding: 50px 60px;
        transition: all 0.35s cubic-bezier(.1,.72,.4,.97);
      }

      &__link {
        opacity: 1;
        transform: translate(-50%, 0);
        transition: all 0.3s 0.35s cubic-bezier(.1,.72,.4,.97);
      }
    }

    img {
      transform: scale(1);
      transition: 0.35s 0.1s transform cubic-bezier(.1,.72,.4,.97);
    }
  }

  &__content {
    width: 100%;
    text-align: center;
    background-color: #86B971;
    padding: 0 60px 50px;
    position: absolute;
    bottom: 0;
    left: 0;
    transform: translateY(0);
    transition: all 0.35s 0.35s cubic-bezier(.1,.72,.4,.97);
    will-change: bottom, background-color, transform, padding;
    z-index: 1;

    &::before,
    &::after {
      content: '';
      width: 100%;
      height: 120px;
      background-color: inherit;
      position: absolute;
      left: 0;
      z-index: -1;
    }

    &::before {
      top: -80px;
      clip-path: ellipse(60% 80px at bottom center);
    }

    &::after {
      bottom: -80px;
      clip-path: ellipse(60% 80px at top center);
    }
  }

  &__title {
    font-size: 1.5rem;
    margin-bottom: 1em;

    span {
      color: #2d7f0b;
    }
  }

  &__text {
    font-size: 0.75rem;
  }

  &__link {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translate(-50%, 10%);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    text-decoration: none;
    color: #2d7f0b;
    opacity: 0;
    padding: 10px;
    transition: all 0.35s;

    &:hover {
      
      svg {
        transform: translateX(4px);
      }
    }

    svg {
      width: 18px;
      margin-left: 4px;
      transition: transform 0.3s;
    }
  }

  &__extra {
    height: 30%;
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    width: 100%;
    font-size: 1.5rem;
    text-align: center;
    background-color: #86b971;
    padding: 80px;
    bottom: 0;
    z-index: 1;
    color: #dee8c2;
    transform: translateY(100%);
    will-change: transform;
    transition: transform 0.35s;

    span {
      color: #2d7f0b;
    }
  }

  img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;

    transform: scale(1.2);
    transition: 0.35s 0.35s transform cubic-bezier(.1,.72,.4,.97);
  }
}
@media screen and (max-width: 950px) {
    .flex{
        display: flex;
        flex-direction: column;
    }
    main{
        margin-top: 110%;
    }
    .card-hover{
        margin:10% 10% 0 0;
    }
    .res-pt-150 {
        padding-top: 569px;
    }
    main {
        
        background-color: #ffffff;
      }

}
@media screen and (max-width: 770px){

    .res-visibility{
        visibility: hidden;
    }
}