/* CONTENEDOR GENERAL */
.gallery-wrapper {
  width: 100%;
  max-width: 1200px;
  min-height: 100vh;
  justify-content: center;
  align-items: flex-start;
  padding: 40px 20px;
}

.gallery-wrapper h1 {
  font-size: 32px;
  margin-bottom: 24px;
}

/* ================================
   GRID DE COLUMNAS
   ================================ */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px; /* espacio ENTRE columnas */
}

.gallery-column {
  display: flex;
  flex-direction: column;
  gap: 12px; /* espacio ENTRE imágenes */
}

/* ESCALONADO POR COLUMNA */
.gallery-column:nth-child(1),
.gallery-column:nth-child(3) {
  margin-top: 40px;
}

.gallery-column:nth-child(2),
.gallery-column:nth-child(4) {
  margin-top: 0;
}

/* ================================
   IMÁGENES
   ================================ */

.gallery-column img {
  width: 100%;
  display: block;
  border-radius: 32px;
  transition:
    transform 0.4s ease,
    filter 0.4s ease,
    box-shadow 0.4s ease;
  transform-origin: center center;
}

.gallery-column img:hover {
  transform: scale(1.08);
  filter: blur(2px) brightness(0.8);
  box-shadow: 0 18px 40px rgba(0,0,0,0.6);
  cursor: pointer;
}

/* ================================
   MODAL
   ================================ */

.modal {
  position: fixed;
  inset: 0;
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 999;
}

.modal.open {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.75);
}

.modal-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  z-index: 100;
  display: flex;
  justify-content: center;
  align-items: center;
}

.modal-content img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 32px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.8);
}

.modal-close {
  position: absolute;
  top: -16px;
  right: -16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: #ffffff;
  color: #000;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0,0,0,0.5);
}

.modal-close:hover {
  background: #ff006e;
  color: #fff;
}

/* ================================
   RESPONSIVE
   ================================ */

/* TABLET: 3 columnas */
@media (max-width: 1024px) {
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .gallery-column {
    margin-top: 0;
  }

  .gallery-column:nth-child(1) { margin-top: 40px; }
  .gallery-column:nth-child(2) { margin-top: 0px; }
  .gallery-column:nth-child(3) { margin-top: 40px; }
}

/* MÓVIL: 2 columnas */
@media (max-width: 450px) {


  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery-column {
    margin-top: 0;
  }

  .gallery-column:nth-child(1) { margin-top: 20px; }
  .gallery-column:nth-child(2) { margin-top: 0; }
}
