@import url("https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap");

:root {
  /* --src: url(https://images.unsplash.com/photo-1554620121-59e7f3f6e3a4?ixlib=rb-1.2.1&q=80&fm=jpg&crop=entropy); */
  --size: 18rem;
  --space: 8vmin;
  --duration: 300ms;
  --ease-out: cubic-bezier(0.25, 1, 0.5, 1);
  --bounce-out: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* .container {
  max-width: 150rem;
  padding: 0 2.4rem;
  margin: 0 auto;
}

.grid {
  display: grid;
  column-gap: 4rem;
  row-gap: 4rem;
  align-items: center;
  justify-items: center;
} */

.section-ponuda-stanova {
  height: auto;
  background-image: url(https://zlatanovbreg.rs/stanovi-img/ponuda-staniva-background.png);
  background-attachment: fixed;
  background-position: center;
  background-size: cover;
  background-repeat: repeat-y;
}
.ponuda-stanova {
  padding-bottom: 10rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
.ponuda-stanova a {
  text-decoration: none;
}
.vrste-stanova {
  display: flex;
  justify-content: center;
  align-items: center;
  text-decoration: none;
}

.vs {
  height: 20rem;
  width: auto;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  margin: var(--space);
}
@media (max-width: 992px) {
  .vs-img {
    transform: rotate(90deg);
  }
}
.vs-desc {
  /* -webkit-clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 20% 50%);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 20% 50%); */
  background-color: #003049;
  /* background-image: url(./stanovi-img/zb.png); */
  text-decoration: none;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  color: white;
  height: 20rem;
  width: 20rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: center;
  font-family: "Roboto", sans-serif;
  transition: height 1s;
  transition-timing-function: cubic-bezier(0.165, 0.84, 0.44, 1);
}
/* .active {
} */
.vs-desc h2 {
  font-size: 1.8rem;
  padding: 1rem;
}

@media (max-width: 992px) {
  .vs-desc {
    height: 20rem;
    overflow: visible;
    color: #ffffff;
    -webkit-clip-path: polygon(51% 20%, 100% 0, 100% 100%, 0 100%, 0 0);
    clip-path: polygon(51% 20%, 100% 0, 100% 100%, 0 100%, 0 0);
    justify-content: flex-end;
    /* transition: height 1s;
    transition-timing-function: cubic-bezier(0.165, 0.84, 0.44, 1); */
  }
  .vrste-stanova {
    flex-direction: column;
  }
  /* .vs-img:hover + .vs-desc {
    height: 20rem;
  } */
  /* .active {
    height: 20rem;
 
    overflow: visible;
  } */
}

.vs-desc p {
  font-size: larger;
  padding: 1rem;
  text-decoration: none;
}

.vs-desc p span {
  font-weight: bold;
}

.vs-animation {
  display: grid;
  place-items: center;
  grid-gap: var(--space);
  margin: 0 auto;
  padding: var(--space);
  font-family: "Sura", sans-serif;
  color: #3e5b70;
  /* background-color: rgb(29, 30, 34); */
  background-size: cover;
}

.promo {
  position: relative;
  /* cursor: pointer; */
  width: var(--size);
  height: var(--size);
}

.vs-title {
  --font-size: 2.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 50%;
  font-size: var(--font-size);
  font-weight: 500;
  /* line-height: 3; */
  white-space: nowrap;
  transform: translate(0, -50%);
  transition: transform var(--duration) var(--ease-out);
  pointer-events: none;
}

.vs-title::after {
  content: attr(data-cta);
  display: inline-block;
  margin-left: 1.5vmin;
  font-size: calc(var(--font-size) / 3.25);
  font-weight: 400;
  letter-spacing: 0.125vmin;
  opacity: 0;
  transform: translateX(-25%);
  transition: transform var(--duration) var(--ease-out),
    opacity var(--duration) var(--ease-out);
}

.image-wrapper {
  width: var(--size);
  height: var(--size);
  overflow: hidden;
  clip-path: polygon(100% 0, 100% 50%, 100% 100%, 0% 100%, 0 50%, 0% 0%);

  transition: transform var(--duration) var(--ease-out),
    clip-path var(--duration) var(--ease-out);
}

.image-wrapper img {
  position: relative;
  width: 120%;
  height: 100%;
  object-fit: cover;
  transform: translateX(-10%);
  transition: transform var(--duration) var(--ease-out);
}

.image-wrapper::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--overlay-color);
  mix-blend-mode: multiply;
  opacity: 0;
  transform: translateZ(0);
  transition: opacity var(--duration) var(--ease-out);
}

.promo:hover img {
  transform: translateX(0);
}

.promo:hover .image-wrapper {
  clip-path: polygon(75% 0%, 100% 50%, 75% 100%, 0% 100%, 25% 50%, 0% 0%);
  transform: translateX(25%);
  transition-timing-function: var(--bounce-out);
}

.promo:hover .vs-title {
  transform: translate(5%, -50%);
  transition-timing-function: var(--bounce-out);
}

.promo:hover .vs-title::after {
  opacity: 1;
  transform: translateX(0);
  transition-timing-function: var(--bounce-out);
}

.promo:hover .image-wrapper::after {
  opacity: 1;
}
.vs-img-sm {
  display: none;
}

@media (max-width: 992px) {
  .image-wrapper img {
    transform: rotate(270deg);
  }
  .image-wrapper::after {
    opacity: 1;
  }
  .image-wrapper {
    clip-path: polygon(75% 0%, 100% 50%, 75% 100%, 0% 100%, 25% 50%, 0% 0%);
    /* transform: translateX(25%);
    transition-timing-function: var(--bounce-out); */
  }

  /* .vs-title {
    transform: translate(5%, -50%);
    transition-timing-function: var(--bounce-out);
  } */

  .vs-title::after {
    opacity: 1;
    /* transform: translateX(0);
    transition-timing-function: var(--bounce-out); */
  }
  .promo {
    position: relative;
  }

  .vs-title {
    --font-size: 2.2rem;
    color: #7ca6c4;
    font-weight: 500;
    position: absolute;
    top: 0;
    bottom: 0;
    left: 30px;
    transform: rotate(270deg);
  }
  /* .vs-title {
    margin-left: 3rem;
  } */
  .vs-title::after {
    content: "";
  }

  .vs-img {
    display: none;
  }
  .vrste-stanova {
    position: relative;
    margin-top: 7rem;
  }

  .vs-img-sm {
    display: block;
    width: 20rem;
    height: var(--size);
    position: absolute;
    bottom: 10rem;
  }
  .vs-img-sm img {
    width: 100%;
    height: auto;
  }
  .image-wrapper-sm {
    position: relative;
  }
  .vs-title-sm {
    position: absolute;
    top: 30px;
    text-align: center;
    color: #3e5b70;
    font-size: 2.4rem;
    font-family: "Roboto";
    font-weight: 400;
    width: 100%;
  }
}
