.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  /* grid-template-rows: repeat(3, 300px); */
  gap: 10px;
  border: 1px solid;
  padding: 10px;
  margin-bottom: 1rem;
}

.pic {
  /* background: #bfd0fd; */
  background: #bbe2f1;
  color: #212529;
  padding: 0.5rem;
  padding-bottom: 1rem;
  height: 350px;
 /* overflow: scroll; */
  overflow: auto;
}

.pic p {
  text-align: center;
  /* margin: 10px;
  padding: 10px;
  max-height: 100%; */
}

.pic .title {
  margin: 0.2rem auto;
  font-size: 1.1rem;
}

.pic p img {
  max-width: 90%;
  max-height: 295px;
  /* object-fit: scale-down; */
  /* padding: 10px; */
  object-fit: cover;
}

.pic .text {
  max-width: 90%;
  max-height: 300px;
  text-align: left;
  margin: 1rem auto;
  /* object-fit: scale-down; */
  /* padding: 10px; */
  object-fit: cover;
}


.v_title {
  text-align: center;
  margin: 0.2rem auto;
  font-size: 1.1rem;
}


.img_sort {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  /* padding: 0 0 30px 15px; */
  padding: 0;
  text-align: center;
  gap: 1rem;
}

.img_sort div {
    padding-bottom: 1rem;
    width: 300px;
    max-width: 90%;
  /* padding: 0 20px 10px 0; */
}

.img_sort p.title {
  padding-bottom: 5px;
}

div.img_title {
  padding-bottom: 5px;
  text-align: center;
}

div.img_caption {
  text-align: center;
  margin-top: -5px;
  padding-bottom: 1rem;
}

.img_sort p.caption {
  padding-top: 5px;
}

@media screen and (max-width: 600px) {
  .img_sort {
    /* display: block; */
    /* margin: auto; */
    /* width: 80%; */
  }
  .img_sort div {
    /* padding-bottom: 1rem; */
    /* width: 70% !important; */
    /* max-width: 100%; !important; */
  }

}


@media only screen and (max-width: 768px) {
  .gallery {
    grid-template-columns: repeat(2, 1fr);
    /* display: grid; */
    max-width: 100%;
  }
  
 .pic {
/*    height: 250px; */
    height: 270px;
  }

  .pic p img {
    max-height: 200px;
  }

  .img_sort {
  }

}

@media only screen and (max-width: 540px) {
  .gallery {
    grid-template-columns: 1fr;
    width: 100%;
    height: auto;
    margin-bottom: 10px;
  }
  
  .pic {
    height: auto;
  }

  .img_tate {
  }

}