/* ================================================
   Sofía Abud — Project Details Stylesheet
   ================================================ */

.project-detail {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem 4rem;
}

.project-header {
  text-align: center;
  padding: 4rem 0 2rem;
}

.project-hero {
  margin-bottom: 3rem;
}

.project-hero-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}

.project-trailer {
  width: 100%;
  aspect-ratio: 4 / 3;
  background-color: #111;
  object-fit: contain;
}

.project-info {
  text-align: center;
  margin-bottom: 4rem;
  padding: 2rem 0;
  border-top: 1px solid #222;
  border-bottom: 1px solid #222;
}

.project-detail-title {
  font-family: 'Gambetta', serif;
  font-size: 2.5rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 1rem;
  color: var(--accent-color);
}

.project-meta-desc {
  font-size: 1.1rem;
  letter-spacing: 0.12em;
  color: #313131;
  margin-bottom: 0;
  text-transform: none;
  font-weight: 500;
}

.project-meta-credits {
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: #525252;
  text-transform: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  line-height: 1.8;
}

.project-stills {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.project-stills img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}

/* 4:3 Aspect Ratio override */
.project-stills.stills-4-3 img {
  aspect-ratio: 4 / 3;
}

.project-back {
  display: inline-block;
  margin-top: 3rem;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: none;
  color: #888;
  transition: color 0.3s ease;
}

.project-back:hover {
  color: #ffffff;
}

@media (max-width: 768px) {
  .project-detail {
    padding: 0 1rem 2rem;
  }

  .project-header {
    padding: 2.5rem 0 1.5rem;
  }

  .project-stills {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .project-detail-title {
    font-size: 1.6rem;
    margin-bottom: 0.5rem;
  }

  .project-meta-desc {
    font-size: 0.9rem;
    font-weight: 400; /* Para mantener la apariencia original en móvil con la nueva fuente */
  }

  .project-meta-credits {
    font-size: 0.9rem;
  }

  .project-back {
    display: block;
    text-align: center;
  }
}

/* ================================================
   Animations & Lightbox
   ================================================ */

/* Scroll Reveal */
.scroll-reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.scroll-reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Lightbox */
.lightbox-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

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

.lightbox-img {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  transform: scale(0.95);
  transition: transform 0.3s ease;
}

.lightbox-overlay.active .lightbox-img {
  transform: scale(1);
}

.lightbox-close {
  position: absolute;
  top: 15px;
  right: 25px;
  color: #fff;
  font-size: 2.5rem;
  font-weight: 300;
  cursor: pointer;
  user-select: none;
  z-index: 10000;
  transition: color 0.3s ease;
  line-height: 1;
}

.lightbox-close:hover {
  color: #ccc;
}

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #fff;
  font-size: 3rem;
  font-weight: 200;
  cursor: pointer;
  padding: 2rem;
  z-index: 10001;
  transition: color 0.3s ease, opacity 0.3s ease;
  opacity: 0.5;
  user-select: none;
}

.lightbox-prev {
  left: -80px; /* Posicionadas fuera de la imagen en desktop */
}

.lightbox-next {
  right: -80px;
}

@media (max-width: 1100px) {
  .lightbox-prev { left: 10px; }
  .lightbox-next { right: 10px; }
}

@media (max-width: 768px) {
  .lightbox-content {
    flex-direction: column;
  }

  .lightbox-prev,
  .lightbox-next {
    top: 100%; /* Justo debajo de la imagen */
    bottom: auto;
    transform: translateY(10px); /* Pequeño margen */
    font-size: 2.5rem;
    padding: 0.5rem;
    opacity: 0.8;
  }

  .lightbox-prev {
    left: 0;
  }

  .lightbox-next {
    right: 0;
  }
}