@import "https://unpkg.com/open-props";
.tiles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.tile {
  position: relative;
  max-width: -webkit-fill-available;
  height: -webkit-fill-available;
}

.photo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease-out;
}

.txt {
  position: absolute;
  z-index: 2;
  right: 0;
  bottom: 10%;
  left: 0;
  font-family: 'Roboto Slab', serif;
  font-size: 9px;
  line-height: 12px;
  text-align: center;
  cursor: pointer;
}

.x {
  font-size: 32px;
  line-height: 32px;
}

.catgallery_col img {
  width: 100%;
  display: block;
}

.cat_page {
  display: grid;
  grid-template-rows: auto 1fr;
  grid-template-areas: "header" "main";
  color: black;
  background-color: white;
  min-height: 100vh;
}
.catpage_title{
  color: #000000;
  text-align: center;
  margin-top: 63px;
  font-size: 48px;
  padding: 36px 0px;
  font-weight: 400;
  margin-bottom: 0px;
}
.cat_main {
  display: grid;
  grid-template-areas: "gallery";
}
.catmain_gallery {
  grid-area: gallery;
  display: flex;
  gap: 5px;
  justify-content: center;
  flex-wrap: wrap;
  padding: 0px;
  padding-bottom: 32px;
  background: #FFFFFF;
}

.catgallery_col {
  flex: calc(33.33% - var(--size-2));
  max-width: calc(33.33% - var(--size-2));
}

.all_imgcaption{
  position: absolute;
  bottom: 2%;
  z-index: 2000;
  font-family: lato-light, lato, sans-serif;
  color: gray;
  margin: 0px;
  left: 50%;
  transform: translate(-50%, -50%);
}


/* CSS for modal */
.cat_modal {
  display: none; /* Hidden by default */
  position: fixed; /* Stay in place */
  z-index: 9999; /* Sit on top */
  padding: 30px 8px 80px !important;
  left: 0;
  top: 0;
  flex-direction: column;
  width: 100%; /* Full width */
  height: 100%; /* Full height */
  overflow: auto; /* Enable scroll if needed */
  background-color: #FFFFFF;
}
.cat_modal.active{
  display: flex !important;
}
.catmodal_content {
  margin: auto;
	border: none;
  display: block;
  width: max-content !important;
  max-width: -webkit-fill-available !important;
  max-height: 100% !important;
}

.cat_close {
  position: absolute;
  top: 15px;
  right: 35px;
  transition: 0.3s;
  z-index: 1000;
}

.cat_close:hover,
.cat_close:focus {
  color: #bbb;
  text-decoration: none;
  cursor: pointer;
}

.cat_prev,
.cat_next {
  position: absolute;
  top: 50%;
  padding: 0px;
  margin-top: -50px;
  color: white;
  font-weight: bold;
  font-size: 20px;
  cursor: pointer;
  transition: 0.6s ease;
  border-radius: 0 3px 3px 0;
  user-select: none;
  -webkit-user-select: none;
}

.cat_prev {
  left: 5%;
  text-decoration: none;
}

.cat_next {
  right: 5%;
  text-decoration: none;
}

/* On hover, add a black background color with a little bit see-through */
.cat_prev:hover,
.cat_next:hover {
  background-color: transparent;
}

@media screen and (max-width: 768px) {
  .catgallery_col {
    flex: calc(50% - var(--size-2));
    max-width: calc(50% - var(--size-2));
  }
  .catpage_title{
    font-size: 24px;
    margin-top: 41px;
    padding: 12px 0px;
  }
}
@media screen and (max-width: 576px) {
  .catgallery_col {
    flex: calc(100% - var(--size-2));
    max-width: calc(100% - var(--size-2));
  }
}

/* Cat Overlay*/
    .gallery_img_container {
      position: relative;
      display: inline-block;
  	  cursor: pointer;
      background: none;
      position: relative;
      display: flex;
      flex: 1 1 30%;
      margin: 0px;
      margin-bottom: 6px !important;
      align-items: center;
      justify-content: center;
    }

    .gallery_img_overlay {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      color: white;
      background: rgba(0, 0, 0, 0.5);
      text-align: center;
      display: flex;
      align-items: center;
      justify-content: center;
      opacity: 0;
      transition: opacity 0.3s;
    }
    
    .gallery_img_overlay {
      align-items: flex-end;
      justify-content: flex-end;
      padding: 5px 10px;

    }

    .gallery_img_container:hover .gallery_img_overlay {
      opacity: 1;
    }
    
    .content {
      flex: 1;
      text-align: center;
    }

    .gallery_img_container {
      overflow: hidden;
    }
    /*Animate overlay and move it 'above'*/
    .gallery_img_container .gallery_img_overlay {
      transform: translate3d(-100%, 0, 0);
      animation-duration: 0.5s;
      animation-fill-mode: forwards;
      animation-timing-function: cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }
    
    
    /* Mouse enter event */
    .hover.mouseenter.top .overlay {
      animation-name: slide--enter-top;
    }
    .hover.mouseenter.right .overlay {
      animation-name: slide--enter-right;
    }
    .hover.mouseenter.bottom .overlay {
      animation-name: slide--enter-bottom;
    }
    .hover.mouseenter.left .overlay {
      animation-name: slide--enter-left;
    }
    
    /* Mouse leave event */
    .hover.mouseleave.top .overlay {
      animation-name: slide--leave-top;
    }
    .hover.mouseleave.right .overlay {
      animation-name: slide--leave-right;
    }
    .hover.mouseleave.bottom .overlay {
      animation-name: slide--leave-bottom;
    }
    .hover.mouseleave.left .overlay {
      animation-name: slide--leave-left;
    }
    
    /* Sliding animations ! */
    @keyframes slide--enter-top {
      0% { transform: translate3d(0, -100%, 0); }
      100% { transform: none; }
    }
    @keyframes slide--enter-right {
      0% { transform: translate3d(100%, 0, 0); }
      100% { transform: none; }
    }
    @keyframes slide--enter-bottom {
      0% { transform: translate3d(0, 100%, 0); }
      100% { transform: none; }
    }
    @keyframes slide--enter-left {
      0% { transform: translate3d(-100%, 0, 0); }
      100% { transform: none; }
    }
    @keyframes slide--leave-top {
      0% { transform: none; }
      100% { transform: translate3d(0, -100%, 0); }
    }
    @keyframes slide--leave-right {
      0% { transform: none; }
      100% { transform: translate3d(100%, 0, 0); }
    }
    @keyframes slide--leave-bottom {
      0% { transform: none; }
      100% { transform: translate3d(0, 100%, 0); }
    }
    @keyframes slide--leave-left {
      0% { transform: none; }
      100% { transform: translate3d(-100%, 0, 0); }
    }
    
    .
@media screen and (max-width: 768px) {
    .cat_modal .tile{
        object-fit: contain;
    }
}


@media screen and (max-width: 768px) {
    .cat_modal{
        padding: 30px 8px 60px !important;
    }
}
