@import url('https://fonts.googleapis.com/css2?family=Barlow:wght@400;600&display=swap');

/* --- SECCIÓN PROYECTOS --- */
.proyectos-section {
  background: #fff;
  padding-top: 40px;
  text-align: center;
  font-family: 'Barlow', sans-serif;
}

.proyectos-section h2 {
  font-size: 30px;
  color: #000;
  margin-bottom: 40px;
  font-weight: 700;
  position: relative;
  display: inline-block;
}

.proyectos-section h2::after {
  content: '';
  display: block;
  width: 60%;
  height: 3px;
  background: #ff007d;
  margin: 8px auto 0 auto;
  border-radius: 2px;
}

/* --- GALERÍA --- */
.gallery {
  display: flex;
  flex-direction: column;
  gap: 0px;
}

.gallery-row {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0px;
}

.gallery-row div {
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.gallery-row img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.gallery-row div:hover img {
  transform: scale(1.08);
  opacity: 0.9;
}

/* --- LIGHTBOX --- */
.lightbox {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  text-align: center;
  overflow: hidden;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.lightbox-img {
  max-width: 70%;
  max-height: 80vh;
  margin-top: 5vh;
  border-radius: 10px;
  transition: 0.3s ease;

}

/* --- CONTROLES --- */
.close, .prev, .next {
  color: white;
  font-size: 45px;
  font-weight: bold;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  user-select: none;
  transition: color 0.3s;
}

.close {
  top: 20px;
  right: 40px;
  transform: none;
  font-size: 55px;
}

.prev { left: 5%; }
.next { right: 5%; }

.prev:hover, .next:hover, .close:hover {
  color: #ff007d;
}

/* --- RESPONSIVE --- */
@media (max-width: 1200px) {
  .gallery-row {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 800px) {
  .gallery-row {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 500px) {
  .proyectos-section {
    padding: 30px 20px;
  }

  .proyectos-section h2 {
    font-size: 22px;
  }

  .gallery-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .lightbox-img {
    max-width: 90%;
  }

  .close {
    font-size: 40px;
    right: 20px;
  }
}
