/* ===== GALERÍA PAGE ===== */

body {
  background-color: #DDDBD1;
  font-family: "Suisse Regular", sans-serif;
  margin: 0;
  padding: 0;
}

/* NAV */
.galeria-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2rem 3rem;
  border-bottom: 1px solid black;
}

.galeria-nav h1 {
  position: static;
  font-size: 25px;
  font-weight: bold;
  letter-spacing: 0.3em;
  margin: 0;
}

.galeria-back {
  font-size: 9px;
  letter-spacing: 0.3em;
  color: black;
  text-transform: uppercase;
  border: 1px solid black;
  padding: 0.5rem 1rem;
  transition: background-color 0.5s linear, color 0.5s linear;
  text-decoration: none;
}

.galeria-back:hover {
  background-color: black;
  color: white;
  text-decoration: none;
}

/* GRID */
.galeria-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-left: 1px solid black;
}

.galeria-item {
  position: relative;
  overflow: hidden;
  border-right: 1px solid black;
  border-bottom: 1px solid black;
  cursor: pointer;
  aspect-ratio: 1 / 1;
  background-color: #DDDBD1;
}

.galeria-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s linear, opacity 0.5s linear;
}

.galeria-item:hover img {
  transform: scale(1.04);
  opacity: 0.85;
}

.galeria-title {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 0.6rem 1rem;
  font-size: 9px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: white;
  background-color: black;
  opacity: 0;
  transition: opacity 0.4s linear;
  pointer-events: none;
}

.galeria-item:hover .galeria-title {
  opacity: 1;
}

/* LIGHTBOX */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.92);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.lightbox.active {
  display: flex;
}

.lightbox img {
  max-width: 80vw;
  max-height: 80vh;
  object-fit: contain;
  width: auto;
  height: auto;
  display: block;
}

.lightbox-close {
  position: fixed;
  top: 2rem;
  right: 3rem;
  font-size: 2rem;
  color: white;
  cursor: pointer;
  letter-spacing: 0;
  line-height: 1;
  transition: opacity 0.3s;
}

.lightbox-close:hover {
  opacity: 0.6;
}

.lightbox-caption {
  margin-top: 1.2rem;
  font-size: 9px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: white;
}

/* RESPONSIVE */
@media screen and (max-width: 1024px) {
  .galeria-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media screen and (max-width: 600px) {
  .galeria-nav {
    padding: 1.5rem;
  }

  .galeria-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .lightbox img {
    max-width: 95vw;
    max-height: 70vh;
  }
}
