body {
  margin: 10px;
  background-color: black;
}

@import url("https://fonts.googleapis.com/css2?family=Mulish:ital,wght@0,200..1000;1,200..1000&family=Phetsarath:wght@400;700&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");

h1 {
  font-family: "Roboto", sans-serif; /*CHANGE TO FABRIKAT*/
  font-weight: bold;
  font-size: x-large;
  font-style: normal;
  color: white;
}

div.inline {
  display: inline-flex;
  gap: 10px;
}

.dropdown {
  border-radius: 4px;
  background-color: rgb(27, 27, 27);
  color: white;
  border-color: white;
  padding: 0.3rem;
}

div.grid {
  display: grid;
  margin-top: 10px;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  align-content: start;
  height: fit-content;
  background-color: white;
  border-radius: 6px;
  overflow: hidden;
}

@media (max-width: 640px) {
  div.grid {
    justify-content: center;
  }
}
/*CHANGE TO FABRIKAT*/

div.grid figcaption {
  top: 10px;
  font-family: "Roboto", sans-serif;
  font-weight: 500;
  font-size: medium;
}

@keyframes in-anim {
  from {
    opacity: 0%;
  }
  to {
    opacity: 100%;
  }
}

div.grid figure {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: in-anim 500ms ease 0ms 1 normal forwards;
}

.image-div-div {
  perspective: 1000px;
  cursor: pointer;
}

.image-div {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 100ms ease;
  will-change: transform;

  --parallax-position-x: 0px;
  --parallax-position-y: 0px;
}

.front-image {
  width: 100%;
  cursor: pointer;
  border-radius: 3px;
  backface-visibility: hidden;
  z-index: 2;
  transition: transform 300ms ease, box-shadow 300ms ease;
}

.image-div::after {
  content: "+";
  display: flex;
  justify-content: center;
  align-items: center;
  position: absolute;
  opacity: 0%;
  transform: scale(0%);
  transition: left 100ms ease-out, top 100ms ease-out, transform 300ms ease, opacity 300ms ease;
  top: calc(80% + var(--parallax-position-y));
  left: calc(8% + var(--parallax-position-x));
  width: 28px;
  height: 28px;
  background-color: black;
  color: white;
  border-radius: 50%;

  font-family: sans-serif;
  font-size: 16px;
  font-weight: bold;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 1);
}

.image-div:hover::after {
  transform: scale(100%);
  opacity: 100%;
}

.back-image {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
  left: 0;
  top: 0;
  background-color: black;
  opacity: 100%;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  transform: rotateY(180deg);
  z-index: 1;
  border-radius: 3px;
  transition: transform 300ms ease;
}

.back-image a {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;

  background-color: #666;
  color: #fff;

  text-decoration: none;

  margin-top: 8px;
  padding: 4%;
  width: 82%;
  height: 25px;
  border-radius: 3px;

  font-family: "Roboto", sans-serif;
  font-weight: bold;
  font-size: clamp(12px, 1vw + 1vh, 15px); /* 12px scaled */

  cursor: pointer;
  transition: all 300ms ease;
}

@media (pointer: fine) and (hover: hover) {
  .back-image a:hover {
    padding: 7%;
    background-color: rgb(238, 159, 41);
  }
}

.front-image.clicked {
  transform: rotateY(180deg);
}

.back-image.clicked {
  transform: rotateY(360deg);
}

.byline {
  /* font-family: roboto, sans-serif; */
  font-family: "Roboto", sans-serif;
  color: #555;
  font-size: 11px;
  margin-top: 6px;
}
