/* =========================
   BLOQUE DE OBRA
========================= */

.project_block {
  background-color: var(--bgc-card);
  padding: 2rem;
  border-radius: var(--border-r);
}

.project_block h2 {
  text-align: center;
  font-size: var(--fs-subtitle);
  margin-bottom: 4rem;
}

/* FLEX: carrusel + texto */
.project_content {
  display: flex;
  gap: 5rem;
  align-items: center;
}

/* columnas */
.project_carousel {
  flex: 1;
}

.project_text {
  flex: 1;
  text-align: justify;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.project_text p{
  font-size: var(--fs-text);
}

/* =========================
   CARRUSEL
========================= */

.carousel {
  position: relative;
  width: 100%;
  max-width: 100%; /* importante para flex */
  margin: 0 auto;
  border-radius: var(--border-r);
}

.carousel-view {
  width: 100%;
  height: 45rem;
  overflow: hidden;
  border-radius: var(--border-r);
  background: var(--color-tertiary);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.carousel-view img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* flechas */

.prev,
.next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);

  width: 5rem;
  height: 5rem;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 50%;
  border: none;

  font-size: 2.2rem;
  color: white;

  background: rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(4px);

  cursor: pointer;

  transition: all 0.25s ease;

  z-index: 100;
}

.prev:hover,
.next:hover {
  background: rgba(0, 0, 0, 0.45);
  transform: translateY(-50%) scale(1.1);
}

.prev {
  left: 1%;
}
.next {
  right: 1%;
}

/* =========================
   LIGHTBOX
========================= */

.lightbox {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.lightbox img {
  max-width: 95dvw;
  max-height: 95dvh;
  object-fit: contain;
}

.close {
  position: absolute;
  top: 30px;
  right: 40px;
  font-size: 4rem;
  color: white;
  background: none;
  border: none;
  cursor: pointer;
}

.light-prev,
.light-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 4rem;
  color: white;
  background: none;
  border: none;
  cursor: pointer;
}

.light-prev {
  left: 5%;
}
.light-next {
  right: 5%;
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 1024px) {
  .carousel-view {
    width: 100%;
    height: auto;
  }
  .prev,
  .next {
    width: 3.5rem;
    height: 3.5rem;
    font-size: 1.6rem;
  }
}

@media (max-width: 768px) {
  .project_content {
    flex-direction: column;
    gap: 2rem;
  }

  .project_text {
    text-align: center;
  }

  .carousel-view {
    height: 40rem;
  }

  .prev,
  .next {
    width: 3.5rem;
    height: 3.5rem;
    font-size: 1.6rem;
  }
}

@media (max-width: 480px) {
  .carousel-view {
    height: 30rem;
  }

  .prev,
  .next {
    width: 3rem;
    height: 3rem;
    font-size: 1.4rem;
  }
}
