 /*-----------------estilo galeria-----------------------*/

 .galeria{
     background: rgba(0,0,0,0.7);
    margin-bottom: 10px;
    width:100%;
    max-width: 1120px;
    height: 500px;
}

.galeria {
    width: 90%;
    margin: auto;
    list-style: none;
    padding: 0px;
    box-sizing: border-box;  
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    align-items: center;
}

.galeria li {
    margin: 5px;
}

.galeria img {
    width: 200px;
    height: 200px;
}

.galeria iframe {
    min-width: 200px;
    min-height: 200px;
    max-width: 200px;
    max-height: 200px;
}

#videos .container-products{
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-gap: 10px;
}

#videos iframe{
    min-width: 100%;
}

#videos .galeria{
    margin-top: 30px;
}

#videos .galeria li{
    width: 100%;
}

/*Estilos del modal*/

.modal {
    display: none;
}

.modal:target {
    
    display: block;
    position: fixed;
    background: rgba(0,0,0,0.8);
    top:  0;
    left: 0;
    width: 100%;
    height: 130%;
}

.modal h3 {
    color: #fff;
    font-size: 30px;
    text-align: center;
    margin: 15px 0;
}

.imagen {
    width: 100%;
    height: 50%;
    
    display: flex;
    justify-content: center;
    align-items: center;
}

.imagen a {
    color: #fff;
    font-size: 40px;
    text-decoration: none;
    margin: 0 10px;
}

.imagen a:nth-child(2) {
    margin: 0;
    height: 100%;
    flex-shrink: 2;
}

.imagen img {
    width: 500px;
    height: 100%;
    max-width: 100%;
    border: 7px solid #fff;
    box-sizing: border-box;
}

.cerrar {
    display: block;
    background: #fff;
    width: 25px;
    height: 25px;
    margin: 15px auto;
    text-align: center;
    text-decoration: none;
    font-size: 20px;
    color: #000;
    padding: -10px;
    border-radius: 50%;
    line-height: 25px;
}


#space-list{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-gap: 10px;
}

.galeria{
    min-height: 200px;
    max-height: 200px;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.galeria img{
    object-fit: cover;
    margin-top: 0;
    min-height: 190px;
    max-height: 190px;
}

.modal:target {
    
    display: block;
    position: fixed;
    background: rgba(0,0,0,0.8);
    top:  0;
    left: 0;
    width: 100%;
    height: 100%;
}

.modal h3 {
    color: #fff;
    font-size: 30px;
    text-align: center;
    margin: 15px 0;
    position: relative;
    top: 50px;
}

.modal:target img{
  margin-top: 50px;
  min-width: 150%;
  margin-left: -25%;
  min-height: 450px;
  object-fit: cover;
}

.next, .prev, .cerrar{
  background: rgba(255, 255, 255, 0.5);
  width: 50px;
  height: 50px;
  padding: 30px;
  position: relative;
  border-radius: 50%;
  top: 35%;
  left: 10%;
  display: flex;
  align-items: center;
  justify-content: center;
    color: #fff;
}

.prev{
  top: 35%;
  left: -10%;
}

.cerrar{
  top: 25%;
  left: 0%;
}

.fotosM .contenedor h1{
    margin-bottom: 30px;
}

iframe{
    width: 100%;
}

@media(min-width:200px) { 

  .galeria{
     background: rgba(0,0,0,0.7);
    margin-bottom: 10px;
    width:100%;
    max-width: 1120px;
    height: 300px;
}

.modal:target {
    
    display: block;
    position: fixed;
    background: rgba(0,0,0,0.8);
    top:  0;
    left: 0;
    width: 100%;
    height: 80%;
}
.modal h3 {
    color: #fff;
    font-size: 30px;
    text-align: center;
    margin: 60px 0;
}

}

@media(max-width:1000px) { 
#space-list{
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-gap: 10px; 
  margin-bottom: 20px;
}

.galeria{
    min-height: 100px;
    max-height: 10px;
    margin-bottom: 0px;
}

.galeria img{
    min-width: 100%;
    min-height: 90px;
    max-height: 90px;
}

.modal:target{
  height: 100%;
}

.modal:target img{
  margin-top: -30px;
  min-width: 170%;
  margin-left: -35%;
  min-height: 400px;
}

.next, .prev, .cerrar{
  top: 0%;
  left: -2%;
  min-width: 10px;
  max-width: 0px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.prev{
  top: 0%;
  left: 2%;
}

.cerrar{
  top: -4%;
  left: 0%;
}

.modal h3 {
    top: 20px;
}


#videos .container-products{
    grid-template-columns: repeat(1, 1fr);
}

#videos .galeria{
    min-width: 100%;
    min-height: 200px;
}

}



@media(min-width:768px) {

#space-list{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-gap: 10px; 
  margin-bottom: 20px;
}
     .galeria{
     background: rgba(0,0,0,0.7);
    margin-bottom: 0px;
    min-width:100%;
    max-width: 1120px;
   //height: 535px;
}

.galeria img {
    min-width: 100%;
}

.modal:target img{
  margin-top: -30px;
  min-width: 120%;
  margin-left: -10%;
  min-height: 700px;
}

.next, .prev, .cerrar{
  top: 20%;
  left: 7%;
}

.prev{
  top: 20%;
  left: -7%;
}

.cerrar{
  top: 25%;
  left: 0%;
}

.modal h3 {
    top: 20px;
}

}


@media(min-width:1024px) {  
.galeria{
     background: rgba(0,0,0,0.7);
    margin-bottom: 0px;
    width:100%;
    max-width: 1120px;
    height: 800px;
}
.galeria img {
    width: 300px;
    height: 300px;
}


.modal:target img{
  margin-top: -30px;
  min-width: 150%;
  margin-left: -25%;
  min-height: 400px;
}

.next, .prev, .cerrar{
  top: -10%;
  left: 12%;
}

.prev{
  top: -10%;
  left: -12%;
}

.cerrar{
  top: -4%;
  left: 0%;
}

.modal h3 {
    top: 20px;
}



}

@media(min-width:1024px) and (max-height:900px) {  
    .modal:target{
        min-height: 100%;
    }

    .modal:target img{
      margin-top: -5%;
      min-width: 150%;
      margin-left: -25%;
      min-height: 400px;
    }

    .next, .prev, .cerrar{
      top: 10%;
      left: 12%;
    }

    .prev{
      top: 10%;
      left: -12%;
    }

    .cerrar{
      top: 4%;
      left: 0%;
    }

    .modal h3 {
      top: 3%;
    }
}



@media(min-width:1024px) and (min-height:1024px) {  
    .modal:target{
        min-height: 100%;
    }

    .modal:target img{
      margin-top: 150px;
      min-width: 150%;
      margin-left: -25%;
      min-height: 400px;
    }

    .next, .prev, .cerrar{
      top: 20%;
      left: 12%;
    }

    .prev{
      top: 20%;
      left: -12%;
    }

    .cerrar{
      top: 12%;
      left: 0%;
    }

    .modal h3 {
      top: 13%;
    }
}


@media(min-width:1280px) {

#space-list{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-gap: 10px; 
  margin-bottom: 20px;
}
  
.galeria{
    background: rgba(0,0,0,0.7);
    width:100%;
    max-width: 1120px;
    height: 500px;
    display: flex;
    align-items: center;
  margin-bottom: 0px;
}
.galeria img {
    width: 300px;
    height: 300px;
    margin-top: 0px;
}

.modal:target {
    
    display: block;
    position: fixed;
    background: rgba(0,0,0,0.8);
    top:  0;
    left: 0;
    width: 100%;
    height: 100%;
}

.modal h3 {
    color: #fff;
    font-size: 30px;
    text-align: center;
    margin: 15px 0;
    position: relative;
    top: 50px;
}

.modal:target img{
  margin-top: 50px;
  min-width: 150%;
  margin-left: -25%;
  min-height: 450px;
}

.next, .prev, .cerrar{
  background: rgba(255, 255, 255, 0.5);
  width: 50px;
  height: 50px;
  padding: 30px;
  position: relative;
  border-radius: 50%;
  top: 35%;
  left: 10%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.prev{
  top: 35%;
  left: -10%;
}

.cerrar{
  top: 25%;
  left: 0%;
}


}