body {
  background: #f5f5f5;
  /*font-family: 'Libre Franklin', sans-serif;*/
}
.Grid {
  width: 60rem;
  /*margin: 5rem auto;*/
  /*Cambiar tamaño en cuanto al margen exterior*/
  margin: 4rem auto;
}

.Grid-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1.1rem;
}




@media (max-width: 840px)
		 {			
	         .Grid-row
			{
				/*display: inline-grid;*/
                text-align: center;	
                 /*display: -webkit-inline-box;
                 text-align: CENTER;
                 padding: 2rem;	
                 justify-content: space-between;	*/			 
	         }
         }


	/* Se ejecutara cuando la ventana se menor a 400 px*/
	@media (max-width:500px){
	  .Grid {
		  width: 21rem;		  
		}

	
	}
	

	
	


/*-------------------------------------------------------
/             MEDIA QUERY CARDS                         /
-------------------------------------------------------*/

@media (max-width: 440px)
		 {	

		.Grid-row{
		   
			display: block;
			   
				 }
		 
		 .Card{
			 display:block;
			 padding: 10px 50px 30px 50px;
		 }
		 
		.Card-title{
			right:260px;
				 }
		.Card-button{
			left:580px;
		}

		 }
		 
		 
		 
		 
		 .Card {
  position: relative;
  flex: 0 1 15rem;
  /*background-color: #fff;*/
  background-color:#f5f5f5;
  /*del original comentado*/
  /*padding-bottom: 5rem;*/
  
  transition: background-color 0.2s cubic-bezier(0.5, 0.3, 0.8, 0.06);
  color: #000;
  /*Cambiar el tamaño de la tarjeta*/
  /*transform:scale(1);*/
}
.Card-thumb {
  position: relative;
  width: 200px;
  /*height: 80px; Si necesita más texto aumnetar aqui*/
  height:10rem;
  perspective-origin: 50% 0%;
  perspective: 800px;
  z-index: 1;
}
.Card-image,
.Card-shadow {
  position: absolute;
  display: block;
  width: 15rem;
  /*Cambiar tamaño de las tarjetas*/
  height: 10rem;
  transition: all 0.2s cubic-bezier(0.42, 0, 0.58, 1);
}
.Card-shadow {
  opacity: 0.8;
}
.Card-shadow:nth-child(1) {
  opacity: 0.6;
  background-color: #673ab7;
  transition: all 0.2s cubic-bezier(0.42, 0, 0.58, 1) 0.07s;
}
.Card-shadow:nth-child(2) {
  opacity: 0.7;
  background-color: #3f51b5;
  transition: all 0.2s cubic-bezier(0.42, 0, 0.58, 1) 0.05s;
}
.Card-shadow:nth-child(3) {
  background-color: #2196f3;
  transition: all 0.2s cubic-bezier(0.42, 0, 0.58, 1) 0.03s;
}
.Card-image {
  position: relative;
  background-size: auto 100%;
  background-position: center;
  background-repeat: no-repeat;
  background-color: #607d8b;
}
.Card-image::before {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background-color: #3f51b5;
  content: '';
  /*Cambiar opacity a 0*/
  opacity: 0;
  transition: opacity 0.1s;
}
.Card-title,
.Card-explore {
  /*position: absolute;*/

  bottom: 0;
  /*display: flex;*/
    /*del original comentado*/
 /* align-items: center;*/
  width: 100%;
  /*height: 5rem;*/
  height: 2.2rem;
  text-align: center;
  transition: all 0.2s cubic-bezier(0.5, 0.3, 0.8, 0.06);
}
.Card-title span,
.Card-explore span {
  padding: 0.5rem;
  flex: 1 1 auto;
  text-align: center;
  
  display:block;
  
}
.Card-explore {
  opacity: 0;
  transform: translate(0, -1rem);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  /* color: #673ab7; */
  color:#e0040b;
}
.Card-button {
  position: absolute;
  left: 50%;
  top: 5rem;
  padding: 0.5rem 1rem;
  background-color: #fff;
  border-radius: 2rem;
  
  /*border: 2px solid #3f51b5;*/
  border: 2px solid #e0040b;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  transform: translate(-50%, 2rem);
  cursor: pointer;
  transition: all 0.2s;
  opacity: 0;
  outline: none;
  z-index: 4;
}
.Card:hover,
.Card--active {
  background-color: #f5f5f5;
  cursor: pointer;
}
.Card:hover .Card-thumb,
.Card--active .Card-thumb {
  z-index: 3;
}
.Card:hover .Card-title,
.Card--active .Card-title {
  opacity: 0;
}
.Card:hover .Card-explore,
.Card--active .Card-explore {
  opacity: 1;
  transform: translate(0, 1rem);
  transition: all 0.2s cubic-bezier(0.42, 0, 0.58, 1) 0.1s;
}
.Card:hover .Card-image,
.Card--active .Card-image {
  transform: scale(1.05) translate(0, -1rem) rotateX(25deg);
}
.Card:hover .Card-image::before,
.Card--active .Card-image::before {
  opacity: 0.4;
}
.Card:hover .Card-shadow:nth-child(3),
.Card--active .Card-shadow:nth-child(3) {
  transform: scale(1.02) translate(0, -0.3rem) rotateX(15deg);
}
.Card:hover .Card-shadow:nth-child(2),
.Card--active .Card-shadow:nth-child(2) {
  transform: scale(0.9) translate(0, 1rem) rotateX(15deg);
}
.Card:hover .Card-shadow:nth-child(1),
.Card--active .Card-shadow:nth-child(1) {
  transform: scale(0.82) translate(0, 2.4rem) rotateX(5deg);
}
.Card:hover .Card-button,

.Card--active .Card-button {
  opacity: 1;
  /*color: #3f51b5;*/
  color:#e0040b;
  transform: translate(-50%, 0);
}
.Card:hover .Card-button:hover,
.Card--active .Card-button:hover {
  color: #fff;
  /*background-color: #3f51b5;*/
  background-color: #e0040b;
  
}
.Card--active,
.Card--active:hover {
  background: none;
}
.Card--active .Card-explore,
.Card--active:hover .Card-explore {
  opacity: 0;
  transform: translate(0, 3rem);
  transition: all 0.5s cubic-bezier(0.42, 0, 0.58, 1);
}
.Card--active .Card-image,
.Card--active:hover .Card-image {
  /*Dejar abierto la tarjeta de la galeria que se abre*/
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.42, 0, 0.58, 1);
  transform: scale(1.05) translate(0, -2.5rem) rotateX(50deg);
}
.Card--active .Card-image::before,
.Card--active:hover .Card-image::before {
  opacity: 0.4;
}
}
.Card--active .Card-button,
.Card--active:hover .Card-button {
  opacity: 0;
  transition: all 0.35s cubic-bezier(0.42, 0, 0.58, 1);
  transform: translate(-50%, -2rem) scale(1, 0.4);
}
/*INCIO TARJETA 1*/
.Grid-row:nth-child(1) .Card:nth-child(1).Card--active .Card-shadow:nth-child(3),
.Grid-row:nth-child(1) .Card:nth-child(1) .Card--active:hover .Card-shadow:nth-child(3) {
  transition: all 0.2s cubic-bezier(0.7, 0, 0.78, 1);
 /* transform: scale(1) translate(6%, 113%);QUITAR LA SOMBRA DETRAS DEL CUADRO DE GALERIA*/
}
.Grid-row:nth-child(1) .Card:nth-child(1).Card--active .Card-shadow:nth-child(2),
.Grid-row:nth-child(1) .Card:nth-child(1) .Card--active:hover .Card-shadow:nth-child(2) {
  transition: all 0.2s cubic-bezier(0.7, 0, 0.78, 1) 0.1s;
  /*transform: scale(1) translate(6%, 223%);QUITAR LA SOMBRA DETRAS DEL CUADRO DE GALERIA*/
}
.Grid-row:nth-child(1) .Card:nth-child(1).Card--active .Card-shadow:nth-child(1),
.Grid-row:nth-child(1) .Card:nth-child(1) .Card--active:hover .Card-shadow:nth-child(1) {
  transition: all 0.2s cubic-bezier(0.7, 0, 0.78, 1) 0.2s;
  /*transform: scale(2.1) translate(81%, 80%); QUITAR LA SOMBRA DETRAS DEL CUADRO DE GALERIA*/
}
.Grid-row:nth-child(1) .Card:nth-child(2).Card--active .Card-shadow:nth-child(3),
.Grid-row:nth-child(1) .Card:nth-child(2) .Card--active:hover .Card-shadow:nth-child(3) {
  transition: all 0.2s cubic-bezier(0.7, 0, 0.78, 1);
 /* transform: scale(1) translate(-108%, 113%); QUITAR LA SOMBRA DETRAS DEL CUADRO DE GALERIA*/
}


/*INCIO TARJETA 2*/
.Grid-row:nth-child(1) .Card:nth-child(2).Card--active .Card-shadow:nth-child(2),
.Grid-row:nth-child(1) .Card:nth-child(2) .Card--active:hover .Card-shadow:nth-child(2) {
  transition: all 0.2s cubic-bezier(0.7, 0, 0.78, 1) 0.1s;
  /*transform: scale(1) translate(-108%, 223%);*/
}
.Grid-row:nth-child(1) .Card:nth-child(2).Card--active .Card-shadow:nth-child(1),
.Grid-row:nth-child(1) .Card:nth-child(2) .Card--active:hover .Card-shadow:nth-child(1) {
  transition: all 0.2s cubic-bezier(0.7, 0, 0.78, 1) 0.2s;
  /*transform: scale(2.1) translate(26%, 80%);*/
}
.Grid-row:nth-child(1) .Card:nth-child(3).Card--active .Card-shadow:nth-child(3),
.Grid-row:nth-child(1) .Card:nth-child(3) .Card--active:hover .Card-shadow:nth-child(3) {
  transition: all 0.2s cubic-bezier(0.7, 0, 0.78, 1);
  /*transform: scale(1) translate(-222%, 113%);*/
}
.Grid-row:nth-child(1) .Card:nth-child(3).Card--active .Card-shadow:nth-child(2),
.Grid-row:nth-child(1) .Card:nth-child(3) .Card--active:hover .Card-shadow:nth-child(2) {
  transition: all 0.2s cubic-bezier(0.7, 0, 0.78, 1) 0.1s;
  /*transform: scale(1) translate(-222%, 223%);*/
}

/*INCIO TARJETA 3*/
.Grid-row:nth-child(1) .Card:nth-child(3).Card--active .Card-shadow:nth-child(1),
.Grid-row:nth-child(1) .Card:nth-child(3) .Card--active:hover .Card-shadow:nth-child(1) {
  transition: all 0.2s cubic-bezier(0.7, 0, 0.78, 1) 0.2s;
 /* transform: scale(2.1) translate(-29%, 80%);*/
}
.Grid-row:nth-child(2) .Card:nth-child(1).Card--active .Card-shadow:nth-child(3),
.Grid-row:nth-child(2) .Card:nth-child(1) .Card--active:hover .Card-shadow:nth-child(3) {
  transition: all 0.2s cubic-bezier(0.7, 0, 0.78, 1);
  /*transform: scale(1) translate(6%, -55%);*/
}
.Grid-row:nth-child(2) .Card:nth-child(1).Card--active .Card-shadow:nth-child(2),
.Grid-row:nth-child(2) .Card:nth-child(1) .Card--active:hover .Card-shadow:nth-child(2) {
  transition: all 0.2s cubic-bezier(0.7, 0, 0.78, 1) 0.1s;
  /*transform: scale(1) translate(6%, 55%);*/
}
.Grid-row:nth-child(2) .Card:nth-child(1).Card--active .Card-shadow:nth-child(1),
.Grid-row:nth-child(2) .Card:nth-child(1) .Card--active:hover .Card-shadow:nth-child(1) {
  transition: all 0.2s cubic-bezier(0.7, 0, 0.78, 1) 0.2s;
  /*transform: scale(2.1) translate(81%, 0%);*/
}
/*INCIO TARJETA 4*/
.Grid-row:nth-child(2) .Card:nth-child(2).Card--active .Card-shadow:nth-child(3),
.Grid-row:nth-child(2) .Card:nth-child(2) .Card--active:hover .Card-shadow:nth-child(3) {
  transition: all 0.2s cubic-bezier(0.7, 0, 0.78, 1);
  /*transform: scale(1) translate(-108%, -55%);*/
}
.Grid-row:nth-child(2) .Card:nth-child(2).Card--active .Card-shadow:nth-child(2),
.Grid-row:nth-child(2) .Card:nth-child(2) .Card--active:hover .Card-shadow:nth-child(2) {
  transition: all 0.2s cubic-bezier(0.7, 0, 0.78, 1) 0.1s;
  /*transform: scale(1) translate(-108%, 55%);*/
}
.Grid-row:nth-child(2) .Card:nth-child(2).Card--active .Card-shadow:nth-child(1),
.Grid-row:nth-child(2) .Card:nth-child(2) .Card--active:hover .Card-shadow:nth-child(1) {
  transition: all 0.2s cubic-bezier(0.7, 0, 0.78, 1) 0.2s;
  /*transform: scale(2.1) translate(26%, 0%);*/
}
.Grid-row:nth-child(2) .Card:nth-child(3).Card--active .Card-shadow:nth-child(3),
.Grid-row:nth-child(2) .Card:nth-child(3) .Card--active:hover .Card-shadow:nth-child(3) {
  transition: all 0.2s cubic-bezier(0.7, 0, 0.78, 1);
  /*transform: scale(1) translate(-222%, -55%);*/
}
/*INCIO TARJETA 5*/
.Grid-row:nth-child(2) .Card:nth-child(3).Card--active .Card-shadow:nth-child(2),
.Grid-row:nth-child(2) .Card:nth-child(3) .Card--active:hover .Card-shadow:nth-child(2) {
  transition: all 0.2s cubic-bezier(0.7, 0, 0.78, 1) 0.1s;
  /*transform: scale(1) translate(-222%, 55%);*/
}
.Grid-row:nth-child(2) .Card:nth-child(3).Card--active .Card-shadow:nth-child(1),
.Grid-row:nth-child(2) .Card:nth-child(3) .Card--active:hover .Card-shadow:nth-child(1) {
  transition: all 0.2s cubic-bezier(0.7, 0, 0.78, 1) 0.2s;
  /*transform: scale(2.1) translate(-29%, 0%);*/
}
.Grid-row:nth-child(3) .Card:nth-child(1).Card--active .Card-shadow:nth-child(3),
.Grid-row:nth-child(3) .Card:nth-child(1) .Card--active:hover .Card-shadow:nth-child(3) {
  transition: all 0.2s cubic-bezier(0.7, 0, 0.78, 1);
 /* transform: scale(1) translate(6%, -223%);*/
}
.Grid-row:nth-child(3) .Card:nth-child(1).Card--active .Card-shadow:nth-child(2),
.Grid-row:nth-child(3) .Card:nth-child(1) .Card--active:hover .Card-shadow:nth-child(2) {
  transition: all 0.2s cubic-bezier(0.7, 0, 0.78, 1) 0.1s;
  /*transform: scale(1) translate(6%, -113%);*/
}

/*INCIO TARJETA 6*/
.Grid-row:nth-child(3) .Card:nth-child(1).Card--active .Card-shadow:nth-child(1),
.Grid-row:nth-child(3) .Card:nth-child(1) .Card--active:hover .Card-shadow:nth-child(1) {
  transition: all 0.2s cubic-bezier(0.7, 0, 0.78, 1) 0.2s;
  /*transform: scale(2.1) translate(81%, -80%);*/
}
.Grid-row:nth-child(3) .Card:nth-child(2).Card--active .Card-shadow:nth-child(3),
.Grid-row:nth-child(3) .Card:nth-child(2) .Card--active:hover .Card-shadow:nth-child(3) {
  transition: all 0.2s cubic-bezier(0.7, 0, 0.78, 1);
  /*transform: scale(1) translate(-108%, -223%);*/
}
.Grid-row:nth-child(3) .Card:nth-child(2).Card--active .Card-shadow:nth-child(2),
.Grid-row:nth-child(3) .Card:nth-child(2) .Card--active:hover .Card-shadow:nth-child(2) {
  transition: all 0.2s cubic-bezier(0.7, 0, 0.78, 1) 0.1s;
  /*transform: scale(1) translate(-108%, -113%);*/
}
.Grid-row:nth-child(3) .Card:nth-child(2).Card--active .Card-shadow:nth-child(1),
.Grid-row:nth-child(3) .Card:nth-child(2) .Card--active:hover .Card-shadow:nth-child(1) {
  transition: all 0.2s cubic-bezier(0.7, 0, 0.78, 1) 0.2s;
  /*transform: scale(2.1) translate(26%, -80%);*/
}
.Grid-row:nth-child(3) .Card:nth-child(3).Card--active .Card-shadow:nth-child(3),
.Grid-row:nth-child(3) .Card:nth-child(3) .Card--active:hover .Card-shadow:nth-child(3) {
  transition: all 0.2s cubic-bezier(0.7, 0, 0.78, 1);
  transform: scale(1) translate(-222%, -223%);
}
.Grid-row:nth-child(3) .Card:nth-child(3).Card--active .Card-shadow:nth-child(2),
.Grid-row:nth-child(3) .Card:nth-child(3) .Card--active:hover .Card-shadow:nth-child(2) {
  transition: all 0.2s cubic-bezier(0.7, 0, 0.78, 1) 0.1s;
  transform: scale(1) translate(-222%, -113%);
}
.Grid-row:nth-child(3) .Card:nth-child(3).Card--active .Card-shadow:nth-child(1),
.Grid-row:nth-child(3) .Card:nth-child(3) .Card--active:hover .Card-shadow:nth-child(1) {
  transition: all 0.2s cubic-bezier(0.7, 0, 0.78, 1) 0.2s;
  transform: scale(2.1) translate(-29%, -80%);
}
.Gallery {
  display: block;
  position: fixed;
  /*top: 0;*/
  top:45px;
  right: 0;
  bottom: 0;
  left: 0;
  background: #f5f5f5;
  opacity: 0;
  transform: scale(1);
  transition: none;
  padding: 6rem 0;
  overflow-y: scroll;
}
.Gallery-header {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  background-color: #eee;
  padding-bottom: 3rem;
}
.Gallery-close {
  position: absolute;
  right: 1rem;
  top: 1.5rem;
  font-size: 3rem;
  opacity: 0.5;
  cursor: pointer;
}
.Gallery-close:hover {
  opacity: 0.8;
}
.Gallery-images {
  display: flex;
  width: 47rem;
  margin: 0 auto;
  justify-content: space-between;
 /* margin-bottom: 1rem;*/
 /*Cambiar el espacio entre cada foto*/
  margin-bottom: 5rem;
}
.Gallery-images:nth-child(3) {
  transition: all 0.2s cubic-bezier(0.7, 0, 0.78, 1) 0.33s;
  opacity: 0;
  transform: translate(0, 3rem) scale(1.1);
}
.Gallery-images:nth-child(4) {
  transition: all 0.2s cubic-bezier(0.7, 0, 0.78, 1) 0.44s;
  opacity: 0;
  transform: translate(0, 3rem) scale(1.1);
}
.Gallery-images:nth-child(5) {
  transition: all 0.2s cubic-bezier(0.7, 0, 0.78, 1) 0.55s;
  opacity: 0;
  transform: translate(0, 3rem) scale(1.1);
}
.Gallery-images:nth-child(6) {
  transition: all 0.2s cubic-bezier(0.7, 0, 0.78, 1) 0.66s;
  opacity: 0;
  transform: translate(0, 3rem) scale(1.1);
}
.Gallery-left {
  flex: 1 auto;
  display: flex;
  justify-content: space-between;
  flex-direction: column;
}
.Gallery-image {
  display: block;
  width: 15rem;
  height: 9.5rem;
  transition: all 0.2s cubic-bezier(0.42, 0, 0.58, 1);
  background: #aebfc7;
  background-size: auto 100%;
  background-position: center;
  background-repeat: no-repeat;
}
.Gallery-image--primary {
  width: 31rem;
  height: 20rem;
  background-color: #673ab7;
}
.Gallery--active {
  z-index: 100;
  background: #fff;
  /*Tamaño de la ventana*/
  transform: scale(0.9);
  /*width:900px;*/
  /*left:10px;*/
  opacity: 1;
  transition: all 0.5s cubic-bezier(0.7, 0, 0.78, 1) 0.1s;
  /*Mover en la pantalla
  margin-left:270px;*/

/*NUEVO*/
margin: 2em 12em;
 
}

         @media (max-width: 1030px)
		 {			
	            .Gallery--active 
			{
				padding: 5em;
                 margin: 1em 2em;				
	         }
         }




.Gallery--active .Gallery-close {
  display: block;
}
.Gallery--active .Gallery-images {
  opacity: 1; 
  /*transform: none;*/
  /*Tamaño de cada foto*/
  transform: scale(1.3);   
}


/*Galería correcta estilos*/
.gallery {
  padding-top: 40px;
}
@media screen and (min-width: 991px) {
  #gallery {
    padding: 60px 30px 0 30px;
  }
}
/*******/
.image-gallery {
  /*max-width: 800px; *//* ajusta según sea necesario */
  margin: 0;
}

.image-gallery img {
  width: 100%;
  height: auto;
}
/*******/
.img-wrapper {
  position: relative;
  margin-top: 15px;
}
.img-wrapper img {
  width: 100%;
}

.img-overlay {
  background: rgba(0, 0, 0, 0.7);
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
}
.img-overlay i {
  color: #fff;
  font-size: 3em;
}

.overlay {
  background: rgba(0, 0, 0, 0.7);
  width: 100%;
  height: 100%;
  position: fixed;
  top: 0;
  left: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 999;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}
.overlay img {
  margin: 0;
  width: 80%;
  height: auto;
  -o-object-fit: contain;
     object-fit: contain;
  padding: 5%;
}
@media screen and (min-width: 768px) {
  .overlay img {
    width: 60%;
  }
}
@media screen and (min-width: 1200px) {
  .overlay img {
    width: 50%;
  }
}

#nextButton {
  color: #fff;
  font-size: 2em;
  transition: opacity 0.8s;
}
#nextButton:hover {
  opacity: 0.7;
}
@media screen and (min-width: 768px) {
  #nextButton {
    font-size: 3em;
  }
}

#prevButton {
  color: #fff;
  font-size: 2em;
  transition: opacity 0.8s;
}
#prevButton:hover {
  opacity: 0.7;
}
@media screen and (min-width: 768px) {
  #prevButton {
    font-size: 3em;
  }
}

#exitButton {
  color: #fff;
  font-size: 2em;
  transition: opacity 0.8s;
  position: absolute;
  top: 15px;
  right: 15px;
}
#exitButton:hover {
  opacity: 0.7;
}
@media screen and (min-width: 768px) {
  #exitButton {
    font-size: 3em;
  }
}