/* ==========================================
   PÁGINA GALERÍA Y VISOR LIGHTBOX
   ========================================== */
.seccion-galeria {
  padding: 70px 0;
}

.grid-galeria {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 25px;
}

.item-galeria {
  position: relative;
  height: 220px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--borde);
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  transition: var(--transicion);
}

.item-galeria img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.overlay-galeria {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(11, 17, 30, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.overlay-galeria i {
  color: var(--oro-acento);
  font-size: 2rem;
  transform: scale(0.8);
  transition: transform 0.3s ease;
}

.item-galeria:hover {
  transform: translateY(-5px);
  border-color: var(--oro-acento);
}

.item-galeria:hover img {
  transform: scale(1.08);
}

.item-galeria:hover .overlay-galeria {
  opacity: 1;
}

.item-galeria:hover .overlay-galeria i {
  transform: scale(1);
}

/* Lightbox Modal */
.lightbox-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 4000;
}

.lightbox-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.lightbox-content {
  text-align: center;
  max-width: 85%;
  max-height: 85%;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 75vh;
  border-radius: 6px;
  border: 1px solid var(--oro-acento);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
}

#lb-caption {
  color: #fff;
  margin-top: 15px;
  font-family: var(--fuente-titulos);
  font-size: 1.1rem;
}

.lightbox-btn {
  position: absolute;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  font-size: 1.5rem;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  cursor: pointer;
  transition: var(--transicion);
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-btn:hover {
  background: var(--oro-acento);
  color: #000;
}

.lightbox-btn.close {
  top: 20px;
  right: 25px;
  font-size: 2rem;
}
.lightbox-btn.prev {
  left: 25px;
}
.lightbox-btn.next {
  right: 25px;
}
