body {
  margin: 0;
  padding: 0;
}

.gallery-item {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0; /* clave para que estén pegadas */
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery a img {
  transition: opacity 0.3s ease;
}

.gallery a:hover img {
  opacity: 0.85;
}

.gallery-item-header {
  text-align: center;
  margin: 120px 0 60px;
}

.gallery-item-header h1 {
  font-size: 22px;
  letter-spacing: 0.15em;
  font-weight: 500;
}

.gallery-item-header p {
  margin-top: 8px;
  font-size: 12px;
  opacity: 0.6;
  letter-spacing: 0.12em;
}

.gallery-item-grid {
  max-width: 1600px;
  margin: 0 auto 140px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin-bottom: 50px; /* o algo grande */
}

.gallery-item-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Responsive */
@media (max-width: 1024px) {
  .gallery-item-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .gallery-item-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== BACK TO GALLERY ===== */

.gallery-back {
  display: flex;
  justify-content: center;
  margin: 100px 0 140px;
}

.back-to-gallery {
  font-size: 12px;
  letter-spacing: 0.18em;
  text-decoration: none;
  color: #000;
  padding-bottom: 4px;
  border-bottom: 1px solid #000;
  transition: opacity 0.3s ease;
}

.back-to-gallery:hover {
  opacity: 0.5;
}

.gallery-back {
  margin: 40px 0 40px;
}

