@font-face {
  font-family: 'Cerost';
  src: url('../../fonts/cerost.otf') format('truetype');
  /* update path if needed */
  font-weight: 400;
  font-style: normal;
}

.collection {
  background: url('../../Images/1842/measures.bg.png');
  width: 100%;
  height: 626px;
  opacity: 1;
  position: relative;
  display: flex;
  justify-content: center;
  padding-top: 40px;
  max-width:1400px; margin-left: auto; margin-right: auto;
}

.collection-bg {
  /* right: 200px; */
  position: relative;
  /* create positioning context */
  width: 100%;
  height: 390px;
  top: 60px;
  opacity: 1;
  margin: 0 auto;
  /* centers horizontally if needed */
  z-index: 0;
  padding-right: 130px;
}

.collection-desc {
  position: absolute;
  top: 30%;
  left: 3%;
  transform: translate(-50%, -50%);
  /* center exactly */
  /* width: 600px;   width limit for readability */
  text-align: center;
  color: white;
  /* assume light text on bg */
  /* padding: 20px; */
  box-sizing: border-box;
  opacity: 1;
  /* visible */
  font-family: 'DM Sans', sans-serif;

  /* Slide in from top animation */
  animation-name: slideInFromTop;
  animation-duration: 1s;
  animation-fill-mode: forwards;
  animation-timing-function: ease-out;
  opacity: 0;
  /* start hidden */
  padding: 20px;
  box-sizing: border-box;
   animation-play-state: paused;
}

@keyframes slideInFromTop {
  0% {
    transform: translateY(-100%);
    opacity: 0;
  }

  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

.collection-desc h2 {
  /* margin-top: 10px; */
  font-family: 'Cerost', sans-serif;
  font-weight: 400;
  font-style: normal;
  font-size: 45px;
  line-height: 100%;
  letter-spacing: 0%;
  text-align: center;
  vertical-align: middle;
  text-transform: capitalize;
  width: 500px;
  margin-left: 50px;
}

.collection-desc p {
  padding-top: 30px;
  font-family: 'DM Sans',sans-serif;
  font-weight: 400;
  font-style: normal;
  font-size: 18px;
  line-height: 33px;
  letter-spacing: 0%;
  text-align: center;
  vertical-align: middle;
  width: 604px;
  height: 220px;
  opacity: 1;
}

.collection-photos {
  /* left:700px; */
  position: absolute;
  height: 626px;
  overflow: hidden;
  width: auto;
  z-index: 2;
   right: 0;
 width:500px;
}

.collection-photos img {
  position: absolute;
  width: 249px;
  height: 249px;
  opacity: 1;


  /* animation-fill-mode: forwards; */
  /* animation-timing-function: fallToCenter 2s ease-out forwards;
  ; */
  /* animation-duration: 1.5s; */

  animation-name: fallToCenter;
  animation-duration: 2s;
    transform: scale(0.6);
  /* animation-iteration-count: infinite; */
  animation-fill-mode: forwards;
  /* animation-timing-function: ease-out; */
  /* border: 5px solid #FFFFFF; stronger white border */
  box-sizing: border-box;
  animation-timing-function: ease-out;
  /* include border in size */
opacity: 0;
 animation-play-state: paused;
}

.collection-photos img.leaf1 {
  top: -200px;
  left: -200px;
  animation-name: flyToTopLeftEdge;
  animation-delay: 0s;
}

/* Leaf 2 - top-right corner to top-right edge of center */
.collection-photos img.leaf2 {
  top: -200px;
  left: calc(100% + 200px);
  animation-name: flyToTopRightEdge;
  animation-delay: 0.2s;
}

/* Leaf 3 - bottom-left corner to bottom-left edge of center */
.collection-photos img.leaf3 {
  top: calc(100% + 200px);
  left: -200px;
  animation-name: flyToBottomLeftEdge;
  animation-delay: 0.4s;
}

/* Leaf 4 - bottom-right corner to bottom-right edge of center */
.collection-photos img.leaf4 {
  top: calc(100% + 200px);
  left: calc(100% + 200px);
  animation-name: flyToBottomRightEdge;
  animation-delay: 0.6s;
}

/* Keyframes: converge edges around center without overlap */
@keyframes flyToTopLeftEdge {
  0% {
    top: -200px;
    left: -200px;
    transform: scale(0.6);
  }

  100% {
    top: 50%;
    left: 50%;
    transform: translate(-100%, -100%) scale(1);
  }
}

@keyframes flyToTopRightEdge {
  0% {
    top: -200px;
    left: calc(100% + 200px);
    transform: scale(0.6);
  }

  100% {
    top: 50%;
    left: 50%;
    transform: translate(0%, -100%) scale(1);
  }
}

@keyframes flyToBottomLeftEdge {
  0% {
    top: calc(100% + 200px);
    left: -200px;
    transform: scale(0.6);
  }

  100% {
    top: 50%;
    left: 50%;
    transform: translate(-100%, 0%) scale(1);
  }
}

@keyframes flyToBottomRightEdge {
  0% {
    top: calc(100% + 200px);
    left: calc(100% + 200px);
    transform: scale(0.6);
  }

  100% {
    top: 50%;
    left: 50%;
    transform: translate(0%, 0%) scale(1);
  }
}

.collection.active-scroll .collection-desc,
.collection.active-scroll .collection-photos img {
  animation-play-state: running;
  opacity: 1;
}

@media(max-width:1220px){
  .collection-photos { width:400px; }
  .collection-photos img { width:200px; height:200px; }
}
@media(max-width:1120px){
  .collection-photos { width:296px; }
  .collection-photos img { width:148px; height:148px; }
  .collection-bg { right:0px; }
}

@media screen and (max-width: 1024px) {
 .collection {
  display: flex;
  flex-direction: column;
  height: auto;
  /* width: 100%; */
  /* position: relative;
  align-items: center;
   height: auto; */
  /* desktop: height as needed, mobile: height auto */
}

.collection-photos {
top: -150px;
  width: 100%;
  display: flex;
  justify-content: center;
  position: relative;
  z-index: 2;
    flex-wrap: wrap;
  min-height: 120px;
   /* top: auto; */
    left: auto;
    right: auto;

}

.collection-photos img {
  width: 140px;
  height: 140px;
  margin: 6px;
  opacity: 1;
  animation: fallToCenter 1.2s ease-out forwards;
  align-items: flex-start;
}

 
.collection-bg {
  top:20%; padding-right:0px;
  /* object-fit: cover; */
  width: 100%;
  height: 100%;
  position: absolute;
  /* top: 10%; */
  left: 0;
  z-index: 0;
  background: url('../../Images/1842/measures.bg.png') center/cover no-repeat;
}

/* desc sits above background */
.collection-desc {
  top:350px;
  position: absolute;
  justify-content: center;
  z-index: 1;
  color: white;
  /* width: 90%;
  margin-top: 200px; */
  text-align: center;
  /* padding: 20px; */
  animation: slideInFromTop 1s ease-out forwards;
}

  .collection-desc h2 {
    font-size: 32px;
    width: 100%;
    margin-left: 0;
    line-height: 1.4;
  }

  .collection-desc p {
    font-size: 18px;
    width: 100%;
    height: auto;
    padding-top: 10px;
    word-break: break-word;
  }

}


@media screen and (max-width: 768px) {
 .collection {
  display: flex;
  flex-direction: column;
  height: auto; padding-top:0px;
  /* width: 100%; */
  /* position: relative;
  align-items: center;
   height: auto; */
  /* desktop: height as needed, mobile: height auto */
}

.collection-photos {
top: -180px;
  width: 100%;
  display: flex;
  justify-content: center;
  position: relative;
  z-index: 2;
    flex-wrap: wrap;
  min-height: 120px;
   /* top: auto; */
    left: auto;
    right: auto;

}

.collection-photos img {
  width: 100px;
  height: 100px;
  margin: 5px;
  opacity: 1;
  animation: fallToCenter 1.2s ease-out forwards;
  align-items: flex-start;
}

 
.collection-bg {
  top:15%;
  /* object-fit: cover; */
  width: 100%;
  height: 100%;
  position: absolute;
  /* top: 10%; */
  left: 0;
  z-index: 0;
  background: url('../../Images/1842/measures.bg.png') center/cover no-repeat;
}

/* desc sits above background */
.collection-desc {
  top:350px;
  position: absolute;
  justify-content: center;
  z-index: 1;
  color: white;
  /* width: 90%;
  margin-top: 200px; */
  text-align: center;
  /* padding: 20px; */
  animation: slideInFromTop 1s ease-out forwards;
}

  .collection-desc h2 {
    font-size: 28px;
    width: 100%;
    margin-left: 0;
    line-height: 1.4;
  }

  .collection-desc p {
    font-size: 16px;
    width: 100%;
    height: auto;
    padding-top: 10px;
    word-break: break-word;
  }

}
