/* =====================================================
   PROJETO-DETALHE.CSS
   Carregado nas páginas de DETALHE de cada projeto
   (ex: projeto-potter-light-dragoon-saber.html).
   Template reaproveitável: novos projetos usam o mesmo CSS.
   ===================================================== */

/* ---------- Hero (imagem/vídeo principal) ---------- */

.project-hero {
  position: relative;
  margin: 0 0 64px;
  overflow: hidden;
}

.project-hero__image {
  width: 100%;
  height: auto;
  display: block;
}

.project-hero__play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 1px solid var(--text);
  background: rgba(20, 18, 18, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  text-decoration: none;
  transition: transform 0.25s ease, background 0.25s ease;
}

.project-hero__play:hover,
.project-hero__play:focus-visible {
  background: rgba(20, 18, 18, 0.7);
  transform: translate(-50%, -50%) scale(1.06);
}

.project-hero__play svg {
  width: 22px;
  height: 22px;
  margin-left: 3px; /* otimiza centralização visual do ícone de play */
}

/* ---------- Seções de texto (Escopo, Metodologia, Relevância...) ---------- */

.project-section {
  margin-bottom: 64px;
}

.subsection-title {
  font-family: "IM Fell English", serif;
  font-style: normal;
  font-weight: 400;
  font-size: 1.5rem;
  margin-bottom: 18px;
}

.project-section p {
  font-family: "Spectral", serif;
  font-weight: 400;
  font-size: 1.2rem;
  line-height: 1.3;
  color: var(--text-dim);
  margin-bottom: 20px;
  text-align: justify;
  text-justify: inter-word;
}

.methodology-list {
  list-style: decimal;
  padding-left: 1.4em;
}

.methodology-list li {
  font-family: "Spectral", serif;
  font-weight: 400;
  font-size: 1.2rem;
  line-height: 1.3;
  color: var(--text-dim);
  margin-bottom: 20px;
  text-align: justify;
  text-justify: inter-word; 
  
}

.methodology-list li strong {
  color: var(--text);
  font-weight: 600;
}

/* ---------- Carrossel de imagens de referência ---------- */

.media-carousel {
  position: relative;
  max-width: 640px;
  margin: 0 auto 16px;
}

.media-carousel__track {
  position: relative;
  height: 420px;
  background: #00000010;
  overflow: hidden;
}

.media-carousel__slide {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  cursor: zoom-in;
}

.media-carousel__slide.is-active {
  display: block;
}

.media-carousel__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  opacity: 0.75;
  transition: opacity 0.2s ease;
}

.media-carousel__arrow:hover,
.media-carousel__arrow:focus-visible {
  opacity: 1;
}

.media-carousel__arrow svg {
  width: 28px;
  height: 28px;
}

.media-carousel__arrow--prev {
  left: -56px;
}

.media-carousel__arrow--next {
  right: -56px;
}

.media-carousel__dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 16px;
}

.media-carousel__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: var(--text-dim);
  opacity: 0.45;
  cursor: pointer;
  padding: 0;
  transition: opacity 0.2s ease;
}

.media-carousel__dot.is-active {
  opacity: 1;
  background: var(--text);
}

.media-carousel__caption {
  text-align: center;
  font-family: "Spectral", serif;
  font-style: normal;
  font-weight: 300;
  font-size: 0.9rem;
  color: var(--text-dim);
  margin-bottom: 56px;
}

/* ---------- Figuras simples (Réplica / Restauração Digital) ---------- */

.media-figure {
  margin: 0 auto 56px;
  max-width: 980px;
}

.media-figure img {
  width: 100%;
  height: auto;
  display: block;
}

.media-figure figcaption {
  text-align: center;
  font-family: "Spectral", serif;
  font-weight: 400;
  font-size: 0.95rem;
  color: var(--text-dim);
  margin-top: 12px;
}

/* ---------- Embed 3D (Sketchfab) ---------- */

.sketchfab-embed {
  position: relative;
  width: 100%;
  /* proporção 4:3 (padrão do player do Sketchfab).
     Se o seu modelo usar outra proporção, ajuste o padding-top:
     16:9 -> 56.25% | 1:1 -> 100% | 4:3 -> 75% */
  padding-top: 56%;
}

.sketchfab-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* ---------- Lightbox (imagem em tela cheia) ---------- */

.media-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.92);
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.media-lightbox.is-open {
  display: flex;
}

.media-lightbox__image {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  display: block;
}

.media-lightbox__close {
  position: absolute;
  top: 20px;
  right: 28px;
  background: none;
  border: none;
  color: var(--text);
  font-size: 2.4rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.85;
  transition: opacity 0.2s ease;
}

.media-lightbox__close:hover {
  opacity: 1;
}

.media-lightbox__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text);
  font-size: 3rem;
  line-height: 1;
  padding: 8px 18px;
  cursor: pointer;
  opacity: 0.75;
  transition: opacity 0.2s ease;
}

.media-lightbox__arrow:hover {
  opacity: 1;
}

.media-lightbox__arrow--prev {
  left: 12px;
}

.media-lightbox__arrow--next {
  right: 12px;
}

/* Trava o scroll da página por trás enquanto o lightbox está aberto */
body.lightbox-open {
  overflow: hidden;
}

/* ---------- Responsive ---------- */

@media (max-width: 720px) {
  .media-carousel__track {
    height: 260px;
  }

  /* No touch não existe hover nem clique preciso nas setas —
     o arraste (swipe) assume esse papel, então escondemos as setas. */
  .media-carousel__arrow {
    display: none;
  }
}

@media (max-width: 480px) {
  .subsection-title {
    font-size: 1.25rem;
  }

  .project-section p,
  .methodology-list li {
    font-size: 1.02rem;
    text-align: left;

  }

  .project-hero__play {
    width: 52px;
    height: 52px;
  }

  .project-hero__play svg {
    width: 18px;
    height: 18px;
  }

  .media-carousel__track {
    height: 200px;
  }

  .media-lightbox__close {
    font-size: 2rem;
    top: 14px;
    right: 18px;
  }

  .media-lightbox__arrow {
    font-size: 2.2rem;
    padding: 6px 10px;
  }

  .media-carousel__arrow {
    width: 32px;
    height: 32px;
  }

  .media-carousel__arrow svg {
    width: 22px;
    height: 22px;
  }
}
