/* --- Sección de la Galería --- */

.custom-gallery-section {
  background-color: #080a0e;
  padding: 100px 0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

.section-title-gallery {
  color: #ffffff;
  font-family: 'Outfit', sans-serif;
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 15px;
}

.gallery-subtitle {
  color: rgba(255, 255, 255, 0.5);
  font-size: 1rem;
}

/* --- Grilla de Imágenes --- */

.custom-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.gallery-item {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-radius: 16px;
  cursor: pointer;
  transition: transform 0.4s ease, box-shadow 0.4s ease, filter 0.4s ease;
  border: 1px solid rgba(255, 255, 255, 0.05);
  filter: brightness(0.9);
}

.gallery-item:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.6);
  filter: brightness(1.1);
  border-color: rgba(74, 144, 226, 0.4);
}

/* --- Estilos del Lightbox --- */

.custom-lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(5, 5, 5, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 99999;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.custom-lightbox.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-content {
  position: relative;
  max-width: 90%;
  max-height: 90vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

#lightboxImage {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
  transform: scale(0.95);
  transition: transform 0.3s ease;
}

.custom-lightbox.active #lightboxImage {
  transform: scale(1);
}

/* Botones del Lightbox */

.lightbox-close {
  position: absolute;
  top: 30px;
  right: 40px;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  font-size: 2rem;
  cursor: pointer;
  transition: color 0.3s ease, transform 0.3s ease;
  z-index: 100000;
}

.lightbox-close:hover {
  color: #ffffff;
  transform: scale(1.1);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.3s ease;
  z-index: 100000;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.lightbox-nav:hover {
  background: rgba(74, 144, 226, 0.3);
  border-color: rgba(74, 144, 226, 0.6);
  transform: translateY(-50%) scale(1.1);
}

.lightbox-prev {
  left: 40px;
}

.lightbox-next {
  right: 40px;
}

/* Responsive para móviles */

@media (max-width: 768px) {
  .custom-gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  }
}

@media (max-width: 768px) {
  .lightbox-nav {
    width: 45px;
    height: 45px;
    font-size: 1.2rem;
  }
}

@media (max-width: 768px) {
  .lightbox-prev {
    left: 15px;
  }
}

@media (max-width: 768px) {
  .lightbox-next {
    right: 15px;
  }
}

@media (max-width: 768px) {
  .lightbox-close {
    top: 15px;
    right: 20px;
    font-size: 1.5rem;
  }
}

