* {
  box-sizing: border-box;
  font-family: "Sarabun", sans-serif;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  font-weight: 200;
  color: black;
  text-decoration: none;
}
body {
  position: relative;
  width: 100%;
  height: 100vh;
  font-size: 0.95em;
  margin: 0;
  overflow: hidden;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-template-rows: 80px auto 90px 90px;
  grid-template-areas:
    ". n n n n n n n n n n d"
    "m c c c c c c c c c c a"
    "s c c c c c c c c c c a"
    "s . . . . . . . . . . b";
}

.container {
  grid-area: c;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  grid-auto-rows: 200px;
  grid-gap: 20px;
  grid-auto-flow: dense;
  overflow: auto;
  padding-right: 20px; /*fix box-shadow on right side cutting off*/
}

/*scrollbar stuff*/
.container {
  -ms-overflow-style: none;
  overflow: -moz-scrollbars-none;
}
.container::-webkit-scrollbar {
  display: none;
}

.container > div {
  z-index: 1;
  position: relative;
  padding: 0;
  overflow: hidden;
  box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.2), 5px 5px 25px rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease-in-out;
}
.container div img {
  position: absolute;
  top: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  overflow: hidden;
  transition: all 0.2s ease-in-out;
  cursor: pointer;
}

.container > div:hover,
.container > div:hover img {
  transform: scale(1.05);
}

.card {
  padding: 0 !important;
  width: 100%;
  height: 50%;
  bottom: -50%;
  padding: 1em !important;
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.5);
  border-top-right-radius: 0 !important;
  border-top-left-radius: 0 !important;
}
.vertical {
  grid-row: span 2;
}
.horizontal {
  grid-column: span 2;
}
.big {
  grid-row: span 2;
  grid-column: span 2;
}

/* Modal styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  padding-top: 60px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgb(0, 0, 0);
  background-color: rgba(0, 0, 0, 0.9);
}

.modal-content {
  margin: auto;
  display: block;
  width: 80%;
  max-width: 700px;
}

.close {
  position: absolute;
  top: 15px;
  right: 35px;
  color: #fff;
  font-size: 40px;
  font-weight: 100;
  transition: 0.3s;
}

.close:hover,
.close:focus {
  color: #bbb;
  text-decoration: none;
  cursor: pointer;
}

/* Centering the modal image */
.modal img {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

/* Animation Stuff */
*:not(a) {
  animation: 0.3s ease-out 0s 1 fadeIn;
}
@keyframes slideInFromLeft {
  0% {
    transform: translateX(-130%);
  }
  100% {
    transform: translateX(0);
  }
}
@keyframes slideInFromRight {
  0% {
    transform: translateX(300%);
  }
  100% {
    transform: translateX(0);
  }
}
@keyframes slideInFromBottomActive {
  0% {
    padding-bottom: 300px;
  }
  100% {
  }
}
@keyframes slideInFromTop {
  0% {
    opacity: 0;
    margin-bottom: -100%;
  }
  100% {
    opacity: 1;
  }
}
@keyframes fadeIn {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}
