.gallery {
  display: grid;
  grid-auto-flow: column;                /* solo columnas (horizontal) */
  grid-auto-columns: 1fr;                /* todas las columnas del mismo ancho */
  gap: 0;
  width: 100%;                           /* ocupa todo el ancho disponible */
}

.gallery-item img {
  width: 100%;                           /* la imagen se adapta al ancho de la celda */
  height: auto;                          /* mantiene proporción */
  display: block;
}





    /* .gallery {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
      gap: 0;
    } */
   

    .gallery-item {
      position: relative;
      cursor: pointer;
      overflow: hidden;
      
    }

    /* .gallery-item img {
      width: 100%;
      height: auto;
      display: block;
      transition: transform 0.4s ease;
       
    } */

    .gallery-item:hover img {
       
      transform: scale(1.1);
      
    }


.gallery-item::after {
  content: "+";
  position: absolute;
  top: 0;                        
  left: 0;
  width: 100%;                  
  height: 100%;
  display: flex;                /* Para centrar el + */
  justify-content: center;
  align-items: center;
  font-size: 3rem;
  color: white;
  opacity: 0;
  transition: opacity 0.3s ease;
  background-color: rgba(0, 0, 0, 0.22); 
  pointer-events: none;
}

.gallery-item:hover::after {
  opacity: 1;
}

  
    .lightbox {
      display: none;
      position: fixed;
      inset: 0;
      background: rgba(0,0,0,0.9);
      justify-content: center;
      align-items: center;
      z-index: 9999;
    }

    .lightbox img {
      max-width: 90%;
      max-height: 80%;
      border-radius: 8px;
    }

 
    .lightbox .prev, .lightbox .next {
      position: absolute;
      top: 50%;
      transform: translateY(-50%);
      font-size: 3rem;
      color: white;
      cursor: pointer;
      user-select: none;
      padding: 10px;
    }

    .lightbox .prev { left: 20px; }
    .lightbox .next { right: 20px; }

  
    .lightbox .close {
      position: absolute;
      top: 20px;
      right: 30px;
      font-size: 3rem;
      color: white;
      cursor: pointer;
    }


    @media (min-width: 600px) {
  
  .ocultogaleria {
    display: none;
  }
  .visiblegaleria {
    display: block;
  }
}

@media (max-width: 600px) {
  
  .ocultogaleria {
    display: block;
  }
  .visiblegaleria {
    display: none;
  }
  
}
