*{
  margin: 0; padding: 0;
  box-sizing: border-box;

  text-transform: capitalize;
  transition:all .2s cubic-bezier(.34,1.12,.68,1.31);
}


.gallery{
  min-height: 100vh;
  width: 100%;
  /* background:#c7c7c7; */
  padding-bottom: 100px;
}

.gallery .controls{
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  padding:20px 0;
  list-style: none;
  text-align: center !important;
}

.gallery .controls .buttons{
  height:40px;
  width: 140px;
  background:rgba(0,89,156,1);
  color:#fff;
  font-size: 20px;
  line-height: 40px;
  cursor: pointer;
  margin:20px;
  box-shadow: 0 3px 5px rgba(0,0,0,.3);
  text-align: center !important;
}
.gallery .controls .btn {
  display: flex; /* Activar flexbox */
  align-items: center; /* Centrar verticalmente */
  justify-content: center; /* Centrar horizontalmente */
  height: 40px;
  width: calc(30% - 20px); /* Dos botones por línea, restando margen */
  background: rgba(0, 89, 156, 1);
  background: rgba(0,89,156,1);
  color: #fff;
  font-size: 16px;
  line-height: 10px;
  cursor: pointer;
  margin: 10px;
  box-shadow: 0 3px 5px rgba(0, 0, 0, 0.3);
  text-align: center !important;
  text-transform: uppercase;
  white-space: nowrap; /* Evita que el texto se divida en varias líneas */
}

.gallery .controls .btn.active {
  background: #e78d1b; /* Mismo color que el hover */
  color: #fff;
}

/* .gallery .controls .buttons .active{
  background:#e78d1b;
  color:#fff;
} */

.gallery .image-container{
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 20px !important;
}

.image-container{

  margin-top: 20px !important;
}
/* .gallery .image-container .image{

  height:200px;
  width: 300px;
  overflow: hidden;
  border:5px solid #c7c7c7;
  box-shadow: 0 3px 5px rgba(124,124,124,0.75);
  position: relative;
  margin: 20px;
} */
.gallery .image-container .image {
  height: 200px;
  width: 23%; /* Ajustado para que quepan 4 imágenes por fila */
  overflow: hidden;
  border: 5px solid #c7c7c7;
  box-shadow: 0 3px 5px rgba(124, 124, 124, 0.75);
  position: relative;
  margin: 1%; /* Espaciado entre imágenes */
}





.mfp-bg {
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  overflow: hidden;
  position: fixed;
  background: rgba(0,89,156,1) !important;
  opacity: .8;
  
}
.gallery .image-container .image img{
  height: 100%;
  width:100%;
  object-fit: cover;
  transition: transform 0.3s ease-in-out; /* Transition for hover effect */
  z-index: 1000; /* Lower z-index for the image */
}



.gallery .image-container .image:hover img{
  transform: scale(1.4);
  opacity: 0.7; /* Adjust opacity for darkening */
 
}


.gallery .image-container .image:hover .overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 89, 156, 0.75);
  opacity: 1;
  transition: opacity 0.3s ease-in-out;
  z-index: 2000; /* Higher z-index for the overlay */
}
.gallery .image-container .image:hover .text {
  /* ... (your text styles) */
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  transform: translate(-50%, -50%);
  z-index: 3000; /* Highest z-index for the text */
  color: #fff;
  font-size: 17px;
  text-align: center;
  text-transform: uppercase;
}




.mfp-title {
  font-size: 20px;
  font-weight: bold;
  color: #fff;
  margin-bottom: 10px;
  /* max-width: 400px; */
  text-align: center;
  line-height: 1.5;
  padding-right: 0px;
}

img.mfp-img {
  width: 800px;
  max-width: 100%;
  height: auto;
  display: block;
  line-height: 0;
  box-sizing: border-box;
  padding: 40px 0 40px;
  margin: 0 auto;
}




.mfp-arrow-left:after {
  border-right: 17px solid #e78d1b ;
  margin-left: 31px;
}

.mfp-arrow-right:after {
  border-left: 17px solid #e78d1b ;
  margin-left: 39px;
}

/* Media Queries para Responsividad */
@media (max-width: 1200px) {
  .gallery .image-container .image {
    width: 30%; /* 3 imágenes por fila en pantallas medianas */
  }
}

@media (max-width: 900px) {
  .gallery .image-container .image {
    width: 45%; /* 2 imágenes por fila en pantallas pequeñas */
  }
}

@media (max-width: 600px) {
  .gallery .image-container .image {
    width: 90%; /* 1 imagen por fila en pantallas muy pequeñas */
  }

  .gallery .controls {
    flex-direction: row; /* Asegura que los botones se alineen en fila */
    justify-content: center; /* Centra los botones horizontalmente */
  }

  .gallery .controls .btn {
    width: calc(80% - 40px); /* Dos botones por línea, restando margen */
    margin: 10px; /* Espaciado entre botones */
    min-width: 0; /* Elimina el ancho mínimo para que se ajuste */
    font-size: 12px !important;
  }
}