body {
  margin: 0;
}

.galeria-grid {
  display: grid;
  align-content: center;
  grid-template-columns: repeat(auto-fill, 70px);
  gap: 20px;
  padding: 30px;
  justify-content: center;
}

.thumbnail-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: transform 0.2s ease;
}

.thumbnail-btn img {
  width: 70px;
  height: 70px;
  object-fit: cover;
  border-radius: 50%;
}

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.popup-box {
  background: white;
  padding: 40px;
  border-radius: 40px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  max-width: 800px;
  width: 90%;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 30px;
  animation: popIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

#popup-img-grande {
  grid-column: 1;
  width: 150px;
  height: 150px;
  object-fit: contain;
  border-radius: 50%;
}

.popup-desc {
  grid-column: 2;
  text-align: start;
}

.popup-desc p {
  color: #333;
  margin: 0;
  line-height: 1.5;
  font-size: 1.1em;
}

.close-btn {
  grid-column: 2;
  justify-self: end;
  background: #dc3545;
  color: white;
  padding: 12px 28px;
  font-size: 16px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  margin-top: 15px;
  transition: background-color 0.2s;
}

.close-btn:hover {
  background-color: #c82333;
}

@keyframes popIn {
  0% {
    opacity: 0;
    transform: scale(0.95);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}
@media (max-width: 1024px) {
  .galeria-grid {
    grid-template-columns: repeat(auto-fill, 55px);
    gap: 15px;
  }

  .thumbnail-btn img {
    width: 55px;
    height: 55px;
  }
}

@media (max-width: 600px) {
  .galeria-grid {
    grid-template-columns: repeat(auto-fill, 50px);
    gap: 12px;
    padding: 15px;
  }

  .thumbnail-btn img {
    width: 50px;
    height: 50px;
  }

  .popup-box {
    grid-template-columns: 1fr;
    padding: 25px;
    border-radius: 20px;
    gap: 15px;
    text-align: center;
  }

  #popup-img-grande {
    grid-column: 1;
    justify-self: center;
    width: 120px;
    height: 120px;
  }

  .popup-desc {
    grid-column: 1;
    text-align: center;
  }

  .popup-desc p {
    font-size: 1em;
  }

  .close-btn {
    grid-column: 1;
    width: 100%;
    margin-top: 10px;
  }
}
