.galeria-imagenes {
  display: flex;
  flex-direction: column;
  gap: 5px; /* espacio vertical entre filas */
}

.fila {
  display: grid;
  gap: 5px;
}

.fila-1 {
  grid-template-columns: repeat(1, 1fr);
  row-gap: 0 !important;
}

.fila-2 {
  grid-template-columns: repeat(2, 1fr);
}

.fila-3 {
  grid-template-columns: repeat(3, 1fr);
}

.fila-4 {
  grid-template-columns: repeat(4, 1fr);
}

.fila-5 {
  grid-template-columns: repeat(5, 1fr);
}

.fila-6 {
  grid-template-columns: repeat(6, 1fr);
}

.fila-7 {
  grid-template-columns: repeat(7, 1fr);
}

.fila-8 {
  grid-template-columns: repeat(8, 1fr);
}

.fila-9 {
  grid-template-columns: repeat(9, 1fr);
}

.fila img {
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 0px;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.fila img.efecto-hover:hover {
  transform: scale(1.05);
}

.jg-entry img.efecto-hover:hover {
  transform: scale(1.05);
}

.popup {
  position: fixed;
  inset: 0;
  backdrop-filter: blur(6px);
  background-color: rgba(0, 0, 0, 0.6);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}
.popup.visible {
  display: flex;
}
.popup-contenido {
  position: relative;
  background: #000000;
  padding: 1rem;
  border-radius: 12px;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}
.popup-contenido img {
  max-width: 100%;
  max-height: 70vh;
  border-radius: 10px;
  margin-bottom: 1rem;
}
.cerrar {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: white;
  color: black;
  border: none;
  font-size: 24px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  transition: background-color 0.2s, transform 0.2s;
}

.cerrar:hover {
  background-color: #f0f0f0;
  transform: scale(1.05);
}
.descargar {
  background-color: #00aaff;
  color: white;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: bold;
  text-decoration: none;
  transition: background 0.3s ease;
}
.descargar:hover {
  background-color: #008fcc;
}

#flickr-gallery {
  max-height: 80vh;        /* limita altura para que pueda scrollear */
  overflow-y: auto;        /* activa scroll vertical */
  scrollbar-width: none;   /* Firefox */
  -ms-overflow-style: none; /* IE y Edge */
}

#flickr-gallery::-webkit-scrollbar {
  display: none;           /* Chrome, Safari y Opera */
}

.foto-item {
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); 
    background-color: #f8f8f8;
}

.foto-item img {
    width: 100%; 
    height: 250px; 
    display: block;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.3s ease; 
}

@media (max-width: 768px) {
    .foto-item img {
        height: 130px;
    }
}