/* ============================================================
   PROJETOS
   ============================================================ */

.project-list{
  display: flex;
  flex-direction: column;
}
.project-card{
  display: flex;
  flex-wrap: wrap;
  gap: 56px;
  padding: 64px 0;
  border-top: 1px solid rgba(9,31,91,.1);
  align-items: center;
}
.project-list .project-card:last-child{ border-bottom: 1px solid rgba(9,31,91,.1); }
.project-card:nth-child(even){ flex-direction: row-reverse; }

.project-media{
  flex: 1.2 1 480px;
  position: relative;
  width: 100%;
  padding-bottom: 66%;
  overflow: hidden;
  background: var(--navy-deep);
}
.project-media img{
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity .5s ease;
}
.project-media .img-before{ opacity: 0; }
.project-card:hover .img-before,
.project-card:focus-within .img-before,
.project-card.show-before .img-before{ opacity: 1; }
.project-card:hover .img-after,
.project-card:focus-within .img-after,
.project-card.show-before .img-after{ opacity: 0; }

.tag-label{
  position: absolute;
  top: 18px;
  left: 18px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: .68rem;
  letter-spacing: .2em;
  color: var(--white);
  background: rgba(9,31,91,.78);
  padding: 7px 14px;
  transition: opacity .3s ease;
}
.tag-after{ opacity: 1; }
.tag-before{ opacity: 0; background: rgba(140,126,115,.92); }
.project-card:hover .tag-after,
.project-card:focus-within .tag-after,
.project-card.show-before .tag-after{ opacity: 0; }
.project-card:hover .tag-before,
.project-card:focus-within .tag-before,
.project-card.show-before .tag-before{ opacity: 1; }

.project-info{ flex: 1 1 380px; }
.project-meta{
  display: block;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .18em;
  color: var(--taupe);
  margin-bottom: 10px;
}
.project-info h2{ margin-bottom: 8px; }
.project-location{
  font-size: .92rem;
  color: var(--ink-soft);
  margin-bottom: 22px;
}
.project-specs{
  display: flex;
  margin-bottom: 22px;
}
.project-spec{ display: flex; flex-direction: column; gap: 4px; margin-right: 32px; }
.project-spec-label{
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--ink-soft);
}
.project-spec-value{
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--navy);
}
.project-diff{
  list-style: none;
  margin: 22px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.project-diff li{
  font-size: .9rem;
  color: var(--ink);
  padding-left: 18px;
  position: relative;
}
.project-diff li::before{
  content: "";
  position: absolute;
  left: 0; top: .6em;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--taupe);
}
.project-hint{
  margin-top: 22px;
  font-size: .8rem;
  color: var(--ink-soft);
  font-style: italic;
}

/* ---- GALERIA DE FOTOS ---- */
.project-gallery{
  margin-top: 32px;
}
.project-gallery-label{
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .18em;
  color: var(--taupe);
  margin-bottom: 14px;
  display: block;
}
.gallery-thumbs{
  display: flex;
  flex-wrap: wrap;
}
.gallery-thumb{
  flex: 1 1 90px;
  max-width: 110px;
  width: 110px;
  height: 110px;
  margin: 0 10px 10px 0;
  overflow: hidden;
  cursor: pointer;
  border: none;
  padding: 0;
  background: var(--navy-deep);
  position: relative;
  display: block;
}
.gallery-thumb img{
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .3s ease, opacity .3s ease;
}
.gallery-thumb:hover img{ transform: scale(1.08); opacity: .9; }
.gallery-thumb-more{
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-family: var(--font-display);
  font-size: .95rem;
  background: rgba(9,31,91,.78);
}

/* ---- VÍDEO ---- */
.project-video{
  margin-top: 32px;
}
.project-video video{
  width: 100%;
  display: block;
  background: var(--navy-deep);
}
.project-video-caption{
  margin-top: 10px;
  font-size: .82rem;
  color: var(--ink-soft);
  font-style: italic;
}

/* ---- LIGHTBOX ---- */
.lightbox{
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(6,14,46,.94);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.lightbox.open{ display: flex; }
.lightbox-img{
  max-width: min(1100px, 92vw);
  max-height: 86vh;
  object-fit: contain;
  box-shadow: 0 30px 80px -20px rgba(0,0,0,.6);
}
.lightbox-close,
.lightbox-prev,
.lightbox-next{
  position: absolute;
  background: none;
  border: 1px solid rgba(255,255,255,.3);
  color: var(--white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  transition: border-color .2s ease, background .2s ease;
}
.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover{
  border-color: var(--white);
  background: rgba(255,255,255,.08);
}
.lightbox-close{
  top: 24px; right: 24px;
  width: 44px; height: 44px;
  font-size: 1.4rem;
  border-radius: 50%;
}
.lightbox-prev,
.lightbox-next{
  top: 50%;
  width: 48px; height: 48px;
  font-size: 1.6rem;
  border-radius: 50%;
  transform: translateY(-50%);
}
.lightbox-prev{ left: 24px; }
.lightbox-next{ right: 24px; }
.lightbox-counter{
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,.6);
  font-size: .82rem;
  letter-spacing: .1em;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px){
  .project-card, .project-card:nth-child(even){
    flex-direction: column;
    gap: 32px;
  }
  .project-media{ flex-basis: 100%; }
  .project-info{ flex-basis: 100%; }
}

@media (max-width: 640px){
  .gallery-thumb{ flex: 1 1 70px; max-width: 80px; }
  .lightbox-prev, .lightbox-next{
    width: 40px; height: 40px; font-size: 1.3rem;
  }
  .lightbox-prev{ left: 8px; }
  .lightbox-next{ right: 8px; }
  .lightbox-close{ top: 12px; right: 12px; width: 40px; height: 40px; }
}
