.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  grid-gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  border-top: 2px solid rgb(71, 1, 1);
  border-bottom: 2px solid rgb(71, 1, 1);
  border-radius: 1em 1em 1em 1em;
}

@media (max-width: 768px) {
  .gallery {
    grid-template-columns: repeat(2, minmax(150px, 1fr));
  }
}

@media (min-width: 768px) and (max-width: 1200px) {
  .gallery {
    grid-template-columns: repeat(3, minmax(150px, 1fr));
  }
}

@media (min-width: 1200px) {
  .gallery {
    grid-template-columns: repeat(4, minmax(150px, 1fr));
  }
}

.gallery-item {
  width: 100%;
  height: 100%;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  border-radius: 1em 1em 1em 1em;
  box-shadow: 2px 2px 5px gray;;
  display: flex;
  justify-content: center;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gallery-item:hover img {
  transform: scale(1.1);
}



/* Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 1;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(62, 49, 49, 0.85);
  justify-content: center;
}

.backmodal{
  display: none;
  position: fixed;
  z-index: 1;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(62, 49, 49, 0.85);

}

.modal-content {
  margin: auto;
  display: block;
  max-width: 70% !important;
  height: fit-content;
  width: unset !important;
  height: 50em;
}

/*ajuste modal para moviles */

@media screen and (max-width: 770px){
  .modal-content {
    margin: auto;
    display: block;
    max-width: 70%;
    height: auto;
  }
}

/*Ajuste modal para tablets*/

@media screen and (min-width: 771px) and (max-width: 1080px) {
  .modal-content {
    margin: auto;
    display: block;
    max-width: 70%;
    height: auto;
  }
}

.modal-navigation {
  display: flex;
  justify-content: space-between;
  position: absolute;
  top: 50%;
  width: 100%;
  transform: translateY(-50%);
}

.modal-button-left,
.modal-button-right {
  background: none;
  border: none;
  color: white;
  font-size: 36px;
  cursor: pointer;
  outline: none;
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  color: white;
  font-size: 36px;
  font-weight: bold;
  cursor: pointer;
}

#galery{
   
  background-image: url("../imagenes/aesthetic1.png");
  background-color: black;
  background-repeat: no-repeat;
  background-position: center ;
  background-size: cover;
  padding: 10rem;
  display:flex;
  justify-content: center;
}

.titulo-galeria{
  color: white !important;
}

.subtitulo-galeria{
font-size: 15px;
color: white !important;
font-weight: 600;
}

.subtitulo_subseccion{
  color: white !important;
  font-size: 22px;

}

#fondoBajo{
  padding: 10rem !important;
}